167 references to InputType
Aspire.Hosting (28)
ApplicationModel\ParameterResource.cs (2)
130
InputType = Secret ?
InputType
.SecretText :
InputType
.Text,
Dashboard\DashboardService.cs (12)
224
private static Aspire.DashboardService.Proto.V1.InputType MapInputType(Aspire.Hosting.
InputType
inputType)
228
Aspire.Hosting.
InputType
.Text => Aspire.DashboardService.Proto.V1.InputType.Text,
229
Aspire.Hosting.
InputType
.SecretText => Aspire.DashboardService.Proto.V1.InputType.SecretText,
230
Aspire.Hosting.
InputType
.Choice => Aspire.DashboardService.Proto.V1.InputType.Choice,
231
Aspire.Hosting.
InputType
.Boolean => Aspire.DashboardService.Proto.V1.InputType.Boolean,
232
Aspire.Hosting.
InputType
.Number => Aspire.DashboardService.Proto.V1.InputType.Number,
237
public static Aspire.Hosting.
InputType
MapInputType(Aspire.DashboardService.Proto.V1.InputType inputType)
241
Aspire.DashboardService.Proto.V1.InputType.Text =>
InputType
.Text,
242
Aspire.DashboardService.Proto.V1.InputType.SecretText =>
InputType
.SecretText,
243
Aspire.DashboardService.Proto.V1.InputType.Choice =>
InputType
.Choice,
244
Aspire.DashboardService.Proto.V1.InputType.Boolean =>
InputType
.Boolean,
245
Aspire.DashboardService.Proto.V1.InputType.Number =>
InputType
.Number,
Dashboard\DashboardServiceData.cs (2)
192
public record InputDto(string Name, string Value,
InputType
InputType);
209
if (requestInput.InputType ==
InputType
.Boolean)
IInteractionService.cs (4)
290
public required
InputType
InputType { get; init; }
298
/// Gets or sets the options for the input. Only used by <see cref="
InputType
.Choice"/> inputs.
320
/// Gets a value indicating whether a custom choice is allowed. Only used by <see cref="
InputType
.Choice"/> inputs.
325
/// Gets or sets a value indicating whether a custom choice is allowed. Only used by <see cref="
InputType
.Choice"/> inputs.
InteractionService.cs (7)
108
return await PromptInputAsync(title, message, new InteractionInput { Name = InteractionHelpers.LabelToName(inputLabel), InputType =
InputType
.Text, Label = inputLabel, Required = true, Placeholder = placeHolder }, options, cancellationToken).ConfigureAwait(false);
176
if (input.InputType ==
InputType
.Choice)
396
case
InputType
.Text:
397
case
InputType
.SecretText:
405
case
InputType
.Choice:
415
case
InputType
.Boolean:
421
case
InputType
.Number:
Orchestrator\ParameterProcessor.cs (1)
270
InputType =
InputType
.Boolean,
Aspire.Hosting.Azure (12)
Provisioning\Internal\PublishModeProvisioningContextProvider.cs (6)
162
InputType =
InputType
.Choice,
188
InputType =
InputType
.SecretText,
261
InputType =
InputType
.Choice,
287
InputType =
InputType
.SecretText,
355
InputType =
InputType
.Choice,
453
InputType =
InputType
.Choice,
Provisioning\Internal\RunModeProvisioningContextProvider.cs (6)
134
InputType =
InputType
.Choice,
159
InputType
inputType =
InputType
.Text;
162
inputType =
InputType
.Choice;
199
InputType =
InputType
.Choice,
236
InputType =
InputType
.Choice,
Aspire.Hosting.Azure.Tests (16)
AzureDeployerTests.cs (9)
56
Assert.Equal(
InputType
.Choice, input.InputType);
73
Assert.Equal(
InputType
.Choice, input.InputType);
91
Assert.Equal(
InputType
.Choice, input.InputType);
109
Assert.Equal(
InputType
.Choice, input.InputType);
511
Assert.Equal(
InputType
.Text, input.InputType);
561
InputType =
InputType
.Number,
584
Assert.Equal(
InputType
.Number, input.InputType);
749
Assert.Equal(
InputType
.Text, input.InputType);
794
Assert.Equal(
InputType
.Text, input.InputType);
ProvisioningContextProviderTests.cs (7)
286
Assert.Equal(
InputType
.Choice, input.InputType);
293
Assert.Equal(
InputType
.Choice, input.InputType);
300
Assert.Equal(
InputType
.Choice, input.InputType);
307
Assert.Equal(
InputType
.Choice, input.InputType);
456
Assert.Equal(
InputType
.Text, input.InputType);
464
Assert.Equal(
InputType
.Choice, input.InputType);
471
Assert.Equal(
InputType
.Choice, input.InputType);
Aspire.Hosting.Tests (77)
AddParameterTests.cs (7)
383
InputType =
InputType
.Number,
406
Assert.Equal(
InputType
.Text, input.InputType);
425
Assert.Equal(
InputType
.SecretText, input.InputType);
442
InputType =
InputType
.Number,
453
Assert.Equal(
InputType
.Number, input.InputType);
487
InputType =
InputType
.Number,
497
Assert.Equal(
InputType
.Number, input.InputType);
Dashboard\DashboardServiceTests.cs (2)
320
new Aspire.Hosting.InteractionInput { Name = "Input", InputType = Aspire.Hosting.
InputType
.Text });
367
new Aspire.Hosting.InteractionInput { Name = "Input", InputType = Aspire.Hosting.
InputType
.Text, Label = "Input" });
InteractionServiceTests.cs (61)
278
var input = new InteractionInput { Name = "Value", Label = "Value", InputType =
InputType
.Text, };
300
inputs: [new InputDto("Value", string.Empty,
InputType
.Text)]);
315
var input = new InteractionInput { Name = "Value", Label = "Value", InputType =
InputType
.Text, Required = true };
324
inputs: [new InputDto("Value", string.Empty,
InputType
.Text)]);
338
var input = new InteractionInput { Name = "Value", Label = "Value", InputType =
InputType
.Choice, Options = [KeyValuePair.Create("first", "First option!"), KeyValuePair.Create("second", "Second option!")] };
347
inputs: [new InputDto("Value", "not-in-options",
InputType
.Choice)]);
361
var input = new InteractionInput { Name = "Value", Label = "Value", InputType =
InputType
.Choice, AllowCustomChoice = true, Options = [KeyValuePair.Create("first", "First option!"), KeyValuePair.Create("second", "Second option!")] };
370
inputs: [new InputDto("Value", "not-in-options",
InputType
.Choice)]);
382
var input = new InteractionInput { Name = "Value", Label = "Value", InputType =
InputType
.Number };
391
inputs: [new InputDto("Value", "one",
InputType
.Number)]);
405
var input = new InteractionInput { Name = "Value", Label = "Value", InputType =
InputType
.Boolean };
414
inputs: [new InputDto("Value", "maybe",
InputType
.Number)]);
424
[InlineData(
InputType
.Text, null)]
425
[InlineData(
InputType
.Text, 1)]
426
[InlineData(
InputType
.Text, 10)]
427
[InlineData(
InputType
.Text, InteractionHelpers.DefaultMaxLength)]
428
[InlineData(
InputType
.SecretText, 10)]
429
public async Task PromptInputsAsync_TextExceedsLimit_ReturnErrors(
InputType
inputType, int? maxLength)
434
static async Task TextExceedsLimitCoreAsync(
InputType
inputType, int? maxLength, bool success)
449
inputs: [new InputDto("Value", newValue,
InputType
.Text)]);
474
InputType =
InputType
.Text,
481
Assert.Equal(
InputType
.Text, input.InputType);
494
InputType =
InputType
.Text,
512
InputType =
InputType
.Text,
547
InputType =
InputType
.Text,
559
new InteractionInput { Name = "Username", Label = "Username", InputType =
InputType
.Text },
560
new InteractionInput { Name = "Password", Label = "Password", InputType =
InputType
.SecretText },
561
new InteractionInput { Name = "RememberMe", Label = "Remember Me", InputType =
InputType
.Boolean }
599
new InteractionInput { Name = "UserName", Label = "User Name", InputType =
InputType
.Text },
600
new InteractionInput { Name = "EmailAddress", Label = "Email Address", InputType =
InputType
.Text },
601
new InteractionInput { Name = "Age", InputType =
InputType
.Number }
633
new InteractionInput { Name = "ExplicitName", Label = "Explicit", InputType =
InputType
.Text },
634
new InteractionInput { Name = "GeneratedLabel", Label = "Generated Label", InputType =
InputType
.Text },
635
new InteractionInput { Name = "AnotherExplicit", Label = "Another", InputType =
InputType
.Text }
656
new InteractionInput { Name = "Duplicate", Label = "First", InputType =
InputType
.Text },
657
new InteractionInput { Name = "Duplicate", Label = "Second", InputType =
InputType
.Text }
671
new InteractionInput { Name = "Username", Label = "First", InputType =
InputType
.Text },
672
new InteractionInput { Name = "USERNAME", Label = "Second", InputType =
InputType
.Text }
686
new InteractionInput { Name = "Input1", InputType =
InputType
.Text },
687
new InteractionInput { Name = "Input2", InputType =
InputType
.Text },
688
new InteractionInput { Name = "Input3", InputType =
InputType
.Text }
719
new InteractionInput { Name = "SpecialInput", Label = "!@#$%^&*()", InputType =
InputType
.Text },
720
new InteractionInput { Name = "EmptyLabel", Label = "", InputType =
InputType
.Text },
721
new InteractionInput { Name = "WhitespaceLabel", Label = " ", InputType =
InputType
.Text }
756
new InteractionInput { Name = "Valid", Label = "Valid", InputType =
InputType
.Text }
772
new InteractionInput { Name = "Username", Label = "Username", InputType =
InputType
.Text },
773
new InteractionInput { Name = "Password", Label = "Password", InputType =
InputType
.SecretText }
786
new InputDto("Username", "testuser",
InputType
.Text),
787
new InputDto("Password", "testpass",
InputType
.SecretText)
829
InputType =
InputType
.Choice,
879
new InteractionInput { Name = "Username", Label = "Username", InputType =
InputType
.Text },
883
InputType =
InputType
.Choice,
910
inputs: [new InputDto("Username", "testuser",
InputType
.Text)]).DefaultTimeout();
934
new InteractionInput { Name = "Email", Label = "Email", InputType =
InputType
.Text, Required = true },
935
new InteractionInput { Name = "Age", Label = "Age", InputType =
InputType
.Number, Required = true }
968
new InputDto("Email", "test@example.com",
InputType
.Text),
969
new InputDto("Age", "25",
InputType
.Number)
990
InputType =
InputType
.Choice,
1002
new InteractionInput { Name = "Age", Label = "Age", InputType =
InputType
.Number, Required = true }
1023
InputType =
InputType
.Choice,
1035
new InteractionInput { Name = "Age", Label = "Age", InputType =
InputType
.Number, Required = true }
Orchestrator\ParameterProcessorTests.cs (7)
212
Assert.Equal(
InputType
.Text, input.InputType);
218
Assert.Equal(
InputType
.Text, input.InputType);
224
Assert.Equal(
InputType
.SecretText, input.InputType);
230
Assert.Equal(
InputType
.Boolean, input.InputType);
439
Assert.Equal(
InputType
.Text, param1Input.InputType);
445
Assert.Equal(
InputType
.Text, param2Input.InputType);
479
Assert.Equal(
InputType
.SecretText, secretInput.InputType);
ExternalServices.AppHost (1)
AppHost.cs (1)
14
InputType =
InputType
.Text,
ParameterEndToEnd.AppHost (1)
AppHost.cs (1)
49
InputType =
InputType
.Number,
Publishers.AppHost (10)
DistributedApplicationBuilderExtensions.cs (10)
50
InputType =
InputType
.Text,
58
InputType =
InputType
.Text,
66
InputType =
InputType
.Choice,
79
InputType =
InputType
.Choice,
134
InputType =
InputType
.Text,
157
InputType =
InputType
.SecretText,
172
InputType =
InputType
.Choice,
193
InputType =
InputType
.Boolean,
207
InputType =
InputType
.Number,
222
InputType =
InputType
.Choice,
Stress.AppHost (22)
InteractionCommands.cs (22)
57
var inputNoMarkdown = new InteractionInput { Name = "Name", Label = "<strong>Name</strong>", InputType =
InputType
.Text, Placeholder = "Enter <strong>your</strong> name.", Description = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce id massa arcu. Morbi ac risus eget augue venenatis hendrerit. Morbi posuere, neque id efficitur ultrices, velit augue suscipit ante, vitae lacinia elit risus nec dui.\r\n\r\nFor more information about the `IInteractionService`, see https://learn.microsoft.com." };
58
var inputHasMarkdown = new InteractionInput { Name = "Name", Label = "<strong>Name</strong>", InputType =
InputType
.Text, Placeholder = "Enter <strong>your</strong> name.", Description = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce id massa arcu. Morbi ac risus eget augue venenatis hendrerit. Morbi posuere, neque id efficitur ultrices, velit augue suscipit ante, vitae lacinia elit risus nec dui.\r\n\r\nFor more information about the `IInteractionService`, see https://learn.microsoft.com.", EnableDescriptionMarkdown = true };
70
var inputHasMarkdown = new InteractionInput { Name = "Name", Label = "<strong>Name</strong>", InputType =
InputType
.Text, Placeholder = "Enter <strong>your</strong> name.", Description = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce id massa arcu. Morbi ac risus eget augue venenatis hendrerit. Morbi posuere, **neque id** efficitur ultrices, velit augue suscipit ante, vitae lacinia elit risus nec dui.", EnableDescriptionMarkdown = true };
74
InputType =
InputType
.Choice,
85
InputType =
InputType
.Choice,
144
InputType =
InputType
.Choice,
157
InputType =
InputType
.Choice,
196
InputType =
InputType
.Choice,
224
InputType =
InputType
.Choice,
234
var numberOfPeopleInput = new InteractionInput { Name = "NumberOfPeople", InputType =
InputType
.Number, Label = "Number of people", Placeholder = "Enter number of people", Value = "2", Required = true };
237
new InteractionInput { Name = "Name", InputType =
InputType
.Text, Label = "Name", Placeholder = "Enter name", Required = true, MaxLength = 50 },
238
new InteractionInput { Name = "Password", InputType =
InputType
.SecretText, Label = "Password", Placeholder = "Enter password", Required = true, MaxLength = 20 },
242
new InteractionInput { Name = "RememberMe", InputType =
InputType
.Boolean, Label = "Remember me", Placeholder = "What does this do?", Required = true },
282
InputType =
InputType
.Choice,
294
InputType =
InputType
.Choice,
342
InputType =
InputType
.Choice,
352
InputType =
InputType
.Choice,
363
InputType =
InputType
.Text,
421
InputType =
InputType
.Choice,
433
InputType =
InputType
.Choice,
451
InputType =
InputType
.Choice,
564
InputType =
InputType
.Text,