102 references to InputType
Aspire.Hosting (17)
ApplicationModel\ParameterResource.cs (2)
119
InputType = Secret ?
InputType
.SecretText :
InputType
.Text,
Dashboard\DashboardService.cs (6)
204
private static Aspire.DashboardService.Proto.V1.InputType MapInputType(Aspire.Hosting.
InputType
inputType)
208
Aspire.Hosting.
InputType
.Text => Aspire.DashboardService.Proto.V1.InputType.Text,
209
Aspire.Hosting.
InputType
.SecretText => Aspire.DashboardService.Proto.V1.InputType.SecretText,
210
Aspire.Hosting.
InputType
.Choice => Aspire.DashboardService.Proto.V1.InputType.Choice,
211
Aspire.Hosting.
InputType
.Boolean => Aspire.DashboardService.Proto.V1.InputType.Boolean,
212
Aspire.Hosting.
InputType
.Number => Aspire.DashboardService.Proto.V1.InputType.Number,
IInteractionService.cs (2)
134
public required
InputType
InputType { get; init; }
142
/// Gets or sets the options for the input. Only used by <see cref="
InputType
.Choice"/> inputs.
InteractionService.cs (6)
77
return await PromptInputAsync(title, message, new InteractionInput { Name = inputLabel, InputType =
InputType
.Text, Label = inputLabel, Required = true, Placeholder = placeHolder }, options, cancellationToken).ConfigureAwait(false);
268
case
InputType
.Text:
269
case
InputType
.SecretText:
277
case
InputType
.Choice:
283
case
InputType
.Boolean:
289
case
InputType
.Number:
Orchestrator\ParameterProcessor.cs (1)
155
InputType =
InputType
.Boolean,
Aspire.Hosting.Azure (3)
Provisioning\Internal\DefaultProvisioningContextProvider.cs (3)
108
new InteractionInput { Name = LocationName, InputType =
InputType
.Choice, Label = AzureProvisioningStrings.LocationLabel, Placeholder = AzureProvisioningStrings.LocationPlaceholder, Required = true, Options = [..locations] },
109
new InteractionInput { Name = SubscriptionIdName, InputType =
InputType
.SecretText, Label = AzureProvisioningStrings.SubscriptionIdLabel, Placeholder = AzureProvisioningStrings.SubscriptionIdPlaceholder, Required = true },
110
new InteractionInput { Name = ResourceGroupName, InputType =
InputType
.Text, Label = AzureProvisioningStrings.ResourceGroupLabel, Value = GetDefaultResourceGroupName() },
Aspire.Hosting.Azure.Tests (6)
AzureDeployerTests.cs (3)
87
Assert.Equal(
InputType
.Choice, input.InputType);
93
Assert.Equal(
InputType
.SecretText, input.InputType);
99
Assert.Equal(
InputType
.Text, input.InputType);
DefaultProvisioningContextProviderTests.cs (3)
298
Assert.Equal(
InputType
.Choice, input.InputType);
305
Assert.Equal(
InputType
.SecretText, input.InputType);
312
Assert.Equal(
InputType
.Text, input.InputType);
Aspire.Hosting.Tests (57)
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)
317
new Aspire.Hosting.InteractionInput { Name = "Input", InputType = Aspire.Hosting.
InputType
.Text });
363
new Aspire.Hosting.InteractionInput { Name = "Input", InputType = Aspire.Hosting.
InputType
.Text, Label = "Input" });
InteractionServiceTests.cs (41)
178
var input = new InteractionInput { Name = "Value", Label = "Value", InputType =
InputType
.Text, };
211
var input = new InteractionInput { Name = "Value", Label = "Value", InputType =
InputType
.Text, Required = true };
230
var input = new InteractionInput { Name = "Value", Label = "Value", InputType =
InputType
.Choice, Options = [KeyValuePair.Create("first", "First option!"), KeyValuePair.Create("second", "Second option!")] };
250
var input = new InteractionInput { Name = "Value", Label = "Value", InputType =
InputType
.Number };
270
var input = new InteractionInput { Name = "Value", Label = "Value", InputType =
InputType
.Boolean };
286
[InlineData(
InputType
.Text, null)]
287
[InlineData(
InputType
.Text, 1)]
288
[InlineData(
InputType
.Text, 10)]
289
[InlineData(
InputType
.Text, InteractionHelpers.DefaultMaxLength)]
290
[InlineData(
InputType
.SecretText, 10)]
291
public async Task PromptInputsAsync_TextExceedsLimit_ReturnErrors(
InputType
inputType, int? maxLength)
296
static async Task TextExceedsLimitCoreAsync(
InputType
inputType, int? maxLength, bool success)
332
InputType =
InputType
.Text,
339
Assert.Equal(
InputType
.Text, input.InputType);
352
InputType =
InputType
.Text,
370
InputType =
InputType
.Text,
405
InputType =
InputType
.Text,
417
new InteractionInput { Name = "Username", Label = "Username", InputType =
InputType
.Text },
418
new InteractionInput { Name = "Password", Label = "Password", InputType =
InputType
.SecretText },
419
new InteractionInput { Name = "RememberMe", Label = "Remember Me", InputType =
InputType
.Boolean }
457
new InteractionInput { Name = "UserName", Label = "User Name", InputType =
InputType
.Text },
458
new InteractionInput { Name = "EmailAddress", Label = "Email Address", InputType =
InputType
.Text },
459
new InteractionInput { Name = "Age", InputType =
InputType
.Number }
491
new InteractionInput { Name = "ExplicitName", Label = "Explicit", InputType =
InputType
.Text },
492
new InteractionInput { Name = "GeneratedLabel", Label = "Generated Label", InputType =
InputType
.Text },
493
new InteractionInput { Name = "AnotherExplicit", Label = "Another", InputType =
InputType
.Text }
514
new InteractionInput { Name = "Duplicate", Label = "First", InputType =
InputType
.Text },
515
new InteractionInput { Name = "Duplicate", Label = "Second", InputType =
InputType
.Text }
529
new InteractionInput { Name = "Username", Label = "First", InputType =
InputType
.Text },
530
new InteractionInput { Name = "USERNAME", Label = "Second", InputType =
InputType
.Text }
544
new InteractionInput { Name = "Input1", InputType =
InputType
.Text },
545
new InteractionInput { Name = "Input2", InputType =
InputType
.Text },
546
new InteractionInput { Name = "Input3", InputType =
InputType
.Text }
577
new InteractionInput { Name = "SpecialInput", Label = "!@#$%^&*()", InputType =
InputType
.Text },
578
new InteractionInput { Name = "EmptyLabel", Label = "", InputType =
InputType
.Text },
579
new InteractionInput { Name = "WhitespaceLabel", Label = " ", InputType =
InputType
.Text }
614
new InteractionInput { Name = "Valid", Label = "Valid", InputType =
InputType
.Text }
630
new InteractionInput { Name = "Username", Label = "Username", InputType =
InputType
.Text },
631
new InteractionInput { Name = "Password", Label = "Password", InputType =
InputType
.SecretText }
669
new InteractionInput { Name = "Email", Label = "Email", InputType =
InputType
.Text, Required = true },
670
new InteractionInput { Name = "Age", Label = "Age", InputType =
InputType
.Number, Required = true }
Orchestrator\ParameterProcessorTests.cs (7)
208
Assert.Equal(
InputType
.Text, input.InputType);
214
Assert.Equal(
InputType
.Text, input.InputType);
220
Assert.Equal(
InputType
.SecretText, input.InputType);
226
Assert.Equal(
InputType
.Boolean, input.InputType);
435
Assert.Equal(
InputType
.Text, param1Input.InputType);
441
Assert.Equal(
InputType
.Text, param2Input.InputType);
475
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 (9)
DistributedApplicationBuilderExtensions.cs (9)
41
InputType =
InputType
.Text,
49
InputType =
InputType
.Text,
57
InputType =
InputType
.Choice,
103
InputType =
InputType
.Text,
126
InputType =
InputType
.SecretText,
141
InputType =
InputType
.Choice,
162
InputType =
InputType
.Boolean,
176
InputType =
InputType
.Number,
191
InputType =
InputType
.Choice,
Stress.AppHost (8)
InteractionCommands.cs (8)
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 };
107
InputType =
InputType
.Choice,
132
var numberOfPeopleInput = new InteractionInput { Name = "NumberOfPeople", InputType =
InputType
.Number, Label = "Number of people", Placeholder = "Enter number of people", Value = "2", Required = true };
135
new InteractionInput { Name = "Name", InputType =
InputType
.Text, Label = "Name", Placeholder = "Enter name", Required = true, MaxLength = 50 },
136
new InteractionInput { Name = "Password", InputType =
InputType
.SecretText, Label = "Password", Placeholder = "Enter password", Required = true, MaxLength = 20 },
139
new InteractionInput { Name = "RememberMe", InputType =
InputType
.Boolean, Label = "Remember me", Placeholder = "What does this do?", Required = true },
223
InputType =
InputType
.Text,