166 references to InputType
Aspire.Hosting (28)
ApplicationModel\ParameterResource.cs (2)
119
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)
293
InputType =
InputType
.Boolean,
Aspire.Hosting.Azure (11)
Provisioning\Internal\PublishModeProvisioningContextProvider.cs (6)
163
InputType =
InputType
.Choice,
189
InputType =
InputType
.SecretText,
262
InputType =
InputType
.Choice,
288
InputType =
InputType
.SecretText,
359
InputType =
InputType
.Choice,
367
InputType =
InputType
.Text,
Provisioning\Internal\RunModeProvisioningContextProvider.cs (5)
134
InputType =
InputType
.Choice,
161
InputType = string.IsNullOrEmpty(_options.SubscriptionId) ?
InputType
.Choice :
InputType
.Text,
196
InputType =
InputType
.Choice,
219
InputType =
InputType
.Text,
Aspire.Hosting.Azure.Tests (16)
AzureDeployerTests.cs (9)
55
Assert.Equal(
InputType
.Choice, input.InputType);
72
Assert.Equal(
InputType
.Choice, input.InputType);
90
Assert.Equal(
InputType
.Choice, input.InputType);
96
Assert.Equal(
InputType
.Text, input.InputType);
501
Assert.Equal(
InputType
.Text, input.InputType);
551
InputType =
InputType
.Number,
574
Assert.Equal(
InputType
.Number, input.InputType);
737
Assert.Equal(
InputType
.Text, input.InputType);
782
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
.Text, input.InputType);
445
Assert.Equal(
InputType
.Text, input.InputType);
453
Assert.Equal(
InputType
.Choice, input.InputType);
460
Assert.Equal(
InputType
.Text, 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)
210
Assert.Equal(
InputType
.Text, input.InputType);
216
Assert.Equal(
InputType
.Text, input.InputType);
222
Assert.Equal(
InputType
.SecretText, input.InputType);
228
Assert.Equal(
InputType
.Boolean, input.InputType);
437
Assert.Equal(
InputType
.Text, param1Input.InputType);
443
Assert.Equal(
InputType
.Text, param2Input.InputType);
477
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,