|
7 | 7 | using Microsoft.AspNetCore.Authorization; |
8 | 8 | using Microsoft.Extensions.Hosting; |
9 | 9 | using Microsoft.Extensions.Logging; |
10 | | -using static Aspire.Hosting.ApplicationModel.Interaction; |
| 10 | +using static Aspire.Hosting.Interaction; |
11 | 11 |
|
12 | 12 | namespace Aspire.Hosting.Dashboard; |
13 | 13 |
|
@@ -117,7 +117,7 @@ async Task WatchInteractionsInternal(CancellationToken cancellationToken) |
117 | 117 |
|
118 | 118 | var inputInstances = inputs.Inputs.Select(input => |
119 | 119 | { |
120 | | - var dto = new InteractionInput |
| 120 | + var dto = new Aspire.DashboardService.Proto.V1.InteractionInput |
121 | 121 | { |
122 | 122 | InputType = MapInputType(input.InputType), |
123 | 123 | Required = input.Required |
@@ -174,33 +174,33 @@ async Task WatchInteractionsInternal(CancellationToken cancellationToken) |
174 | 174 | } |
175 | 175 |
|
176 | 176 | #pragma warning disable ASPIREINTERACTION001 // Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed. |
177 | | - private static MessageIntent MapMessageIntent(ApplicationModel.MessageIntent? intent) |
| 177 | + private static Aspire.DashboardService.Proto.V1.MessageIntent MapMessageIntent(Aspire.Hosting.MessageIntent? intent) |
178 | 178 | { |
179 | 179 | if (intent is null) |
180 | 180 | { |
181 | | - return MessageIntent.None; |
| 181 | + return Aspire.DashboardService.Proto.V1.MessageIntent.None; |
182 | 182 | } |
183 | 183 |
|
184 | 184 | return intent.Value switch |
185 | 185 | { |
186 | | - ApplicationModel.MessageIntent.Success => MessageIntent.Success, |
187 | | - ApplicationModel.MessageIntent.Warning => MessageIntent.Warning, |
188 | | - ApplicationModel.MessageIntent.Error => MessageIntent.Error, |
189 | | - ApplicationModel.MessageIntent.Information => MessageIntent.Information, |
190 | | - ApplicationModel.MessageIntent.Confirmation => MessageIntent.Confirmation, |
191 | | - _ => MessageIntent.None, |
| 186 | + Aspire.Hosting.MessageIntent.Success => Aspire.DashboardService.Proto.V1.MessageIntent.Success, |
| 187 | + Aspire.Hosting.MessageIntent.Warning => Aspire.DashboardService.Proto.V1.MessageIntent.Warning, |
| 188 | + Aspire.Hosting.MessageIntent.Error => Aspire.DashboardService.Proto.V1.MessageIntent.Error, |
| 189 | + Aspire.Hosting.MessageIntent.Information => Aspire.DashboardService.Proto.V1.MessageIntent.Information, |
| 190 | + Aspire.Hosting.MessageIntent.Confirmation => Aspire.DashboardService.Proto.V1.MessageIntent.Confirmation, |
| 191 | + _ => Aspire.DashboardService.Proto.V1.MessageIntent.None, |
192 | 192 | }; |
193 | 193 | } |
194 | 194 |
|
195 | | - private static InputType MapInputType(ApplicationModel.InputType inputType) |
| 195 | + private static Aspire.DashboardService.Proto.V1.InputType MapInputType(Aspire.Hosting.InputType inputType) |
196 | 196 | { |
197 | 197 | return inputType switch |
198 | 198 | { |
199 | | - ApplicationModel.InputType.Text => InputType.Text, |
200 | | - ApplicationModel.InputType.SecretText => InputType.SecretText, |
201 | | - ApplicationModel.InputType.Choice => InputType.Choice, |
202 | | - ApplicationModel.InputType.Boolean => InputType.Boolean, |
203 | | - ApplicationModel.InputType.Number => InputType.Number, |
| 199 | + Aspire.Hosting.InputType.Text => Aspire.DashboardService.Proto.V1.InputType.Text, |
| 200 | + Aspire.Hosting.InputType.SecretText => Aspire.DashboardService.Proto.V1.InputType.SecretText, |
| 201 | + Aspire.Hosting.InputType.Choice => Aspire.DashboardService.Proto.V1.InputType.Choice, |
| 202 | + Aspire.Hosting.InputType.Boolean => Aspire.DashboardService.Proto.V1.InputType.Boolean, |
| 203 | + Aspire.Hosting.InputType.Number => Aspire.DashboardService.Proto.V1.InputType.Number, |
204 | 204 | _ => throw new InvalidOperationException($"Unexpected input type: {inputType}"), |
205 | 205 | }; |
206 | 206 | } |
|
0 commit comments