117 references to InputType
Aspire.Hosting (18)
ApplicationModel\ParameterResource.cs (2)
119InputType = Secret ? InputType.SecretText : InputType.Text,
Dashboard\DashboardService.cs (6)
205private static Aspire.DashboardService.Proto.V1.InputType MapInputType(Aspire.Hosting.InputType inputType) 209Aspire.Hosting.InputType.Text => Aspire.DashboardService.Proto.V1.InputType.Text, 210Aspire.Hosting.InputType.SecretText => Aspire.DashboardService.Proto.V1.InputType.SecretText, 211Aspire.Hosting.InputType.Choice => Aspire.DashboardService.Proto.V1.InputType.Choice, 212Aspire.Hosting.InputType.Boolean => Aspire.DashboardService.Proto.V1.InputType.Boolean, 213Aspire.Hosting.InputType.Number => Aspire.DashboardService.Proto.V1.InputType.Number,
IInteractionService.cs (3)
134public required InputType InputType { get; init; } 142/// Gets or sets the options for the input. Only used by <see cref="InputType.Choice"/> inputs. 157/// Gets or sets a value indicating whether a custom choice is allowed. Only used by <see cref="InputType.Choice"/> inputs.
InteractionService.cs (6)
77return await PromptInputAsync(title, message, new InteractionInput { Name = inputLabel, InputType = InputType.Text, Label = inputLabel, Required = true, Placeholder = placeHolder }, options, cancellationToken).ConfigureAwait(false); 268case InputType.Text: 269case InputType.SecretText: 277case InputType.Choice: 286case InputType.Boolean: 292case InputType.Number:
Orchestrator\ParameterProcessor.cs (1)
287InputType = InputType.Boolean,
Aspire.Hosting.Azure (9)
Provisioning\Internal\PublishModeProvisioningContextProvider.cs (6)
166InputType = InputType.Choice, 192InputType = InputType.SecretText, 283InputType = InputType.Choice, 291InputType = InputType.Text, 334InputType = InputType.Choice, 342InputType = InputType.Text,
Provisioning\Internal\RunModeProvisioningContextProvider.cs (3)
136new InteractionInput { Name = LocationName, InputType = InputType.Choice, Label = AzureProvisioningStrings.LocationLabel, Placeholder = AzureProvisioningStrings.LocationPlaceholder, Required = true, Options = [..locations] }, 137new InteractionInput { Name = SubscriptionIdName, InputType = InputType.SecretText, Label = AzureProvisioningStrings.SubscriptionIdLabel, Placeholder = AzureProvisioningStrings.SubscriptionIdPlaceholder, Required = true }, 138new InteractionInput { Name = ResourceGroupName, InputType = InputType.Text, Label = AzureProvisioningStrings.ResourceGroupLabel, Value = GetDefaultResourceGroupName() },
Aspire.Hosting.Azure.Tests (12)
AzureDeployerTests.cs (9)
78Assert.Equal(InputType.Choice, input.InputType); 96Assert.Equal(InputType.Choice, input.InputType); 102Assert.Equal(InputType.Text, input.InputType); 448Assert.Equal(InputType.Text, input.InputType); 498InputType = InputType.Number, 521Assert.Equal(InputType.Number, input.InputType); 662Assert.Equal(InputType.SecretText, input.InputType); 708Assert.Equal(InputType.Text, input.InputType); 753Assert.Equal(InputType.Text, input.InputType);
ProvisioningContextProviderTests.cs (3)
284Assert.Equal(InputType.Choice, input.InputType); 291Assert.Equal(InputType.SecretText, input.InputType); 298Assert.Equal(InputType.Text, input.InputType);
Aspire.Hosting.Tests (58)
AddParameterTests.cs (7)
383InputType = InputType.Number, 406Assert.Equal(InputType.Text, input.InputType); 425Assert.Equal(InputType.SecretText, input.InputType); 442InputType = InputType.Number, 453Assert.Equal(InputType.Number, input.InputType); 487InputType = InputType.Number, 497Assert.Equal(InputType.Number, input.InputType);
Dashboard\DashboardServiceTests.cs (2)
317new Aspire.Hosting.InteractionInput { Name = "Input", InputType = Aspire.Hosting.InputType.Text }); 363new Aspire.Hosting.InteractionInput { Name = "Input", InputType = Aspire.Hosting.InputType.Text, Label = "Input" });
InteractionServiceTests.cs (42)
178var input = new InteractionInput { Name = "Value", Label = "Value", InputType = InputType.Text, }; 211var input = new InteractionInput { Name = "Value", Label = "Value", InputType = InputType.Text, Required = true }; 230var input = new InteractionInput { Name = "Value", Label = "Value", InputType = InputType.Choice, Options = [KeyValuePair.Create("first", "First option!"), KeyValuePair.Create("second", "Second option!")] }; 250var input = new InteractionInput { Name = "Value", Label = "Value", InputType = InputType.Choice, AllowCustomChoice = true, Options = [KeyValuePair.Create("first", "First option!"), KeyValuePair.Create("second", "Second option!")] }; 268var input = new InteractionInput { Name = "Value", Label = "Value", InputType = InputType.Number }; 288var input = new InteractionInput { Name = "Value", Label = "Value", InputType = InputType.Boolean }; 304[InlineData(InputType.Text, null)] 305[InlineData(InputType.Text, 1)] 306[InlineData(InputType.Text, 10)] 307[InlineData(InputType.Text, InteractionHelpers.DefaultMaxLength)] 308[InlineData(InputType.SecretText, 10)] 309public async Task PromptInputsAsync_TextExceedsLimit_ReturnErrors(InputType inputType, int? maxLength) 314static async Task TextExceedsLimitCoreAsync(InputType inputType, int? maxLength, bool success) 350InputType = InputType.Text, 357Assert.Equal(InputType.Text, input.InputType); 370InputType = InputType.Text, 388InputType = InputType.Text, 423InputType = InputType.Text, 435new InteractionInput { Name = "Username", Label = "Username", InputType = InputType.Text }, 436new InteractionInput { Name = "Password", Label = "Password", InputType = InputType.SecretText }, 437new InteractionInput { Name = "RememberMe", Label = "Remember Me", InputType = InputType.Boolean } 475new InteractionInput { Name = "UserName", Label = "User Name", InputType = InputType.Text }, 476new InteractionInput { Name = "EmailAddress", Label = "Email Address", InputType = InputType.Text }, 477new InteractionInput { Name = "Age", InputType = InputType.Number } 509new InteractionInput { Name = "ExplicitName", Label = "Explicit", InputType = InputType.Text }, 510new InteractionInput { Name = "GeneratedLabel", Label = "Generated Label", InputType = InputType.Text }, 511new InteractionInput { Name = "AnotherExplicit", Label = "Another", InputType = InputType.Text } 532new InteractionInput { Name = "Duplicate", Label = "First", InputType = InputType.Text }, 533new InteractionInput { Name = "Duplicate", Label = "Second", InputType = InputType.Text } 547new InteractionInput { Name = "Username", Label = "First", InputType = InputType.Text }, 548new InteractionInput { Name = "USERNAME", Label = "Second", InputType = InputType.Text } 562new InteractionInput { Name = "Input1", InputType = InputType.Text }, 563new InteractionInput { Name = "Input2", InputType = InputType.Text }, 564new InteractionInput { Name = "Input3", InputType = InputType.Text } 595new InteractionInput { Name = "SpecialInput", Label = "!@#$%^&*()", InputType = InputType.Text }, 596new InteractionInput { Name = "EmptyLabel", Label = "", InputType = InputType.Text }, 597new InteractionInput { Name = "WhitespaceLabel", Label = " ", InputType = InputType.Text } 632new InteractionInput { Name = "Valid", Label = "Valid", InputType = InputType.Text } 648new InteractionInput { Name = "Username", Label = "Username", InputType = InputType.Text }, 649new InteractionInput { Name = "Password", Label = "Password", InputType = InputType.SecretText } 687new InteractionInput { Name = "Email", Label = "Email", InputType = InputType.Text, Required = true }, 688new InteractionInput { Name = "Age", Label = "Age", InputType = InputType.Number, Required = true }
Orchestrator\ParameterProcessorTests.cs (7)
209Assert.Equal(InputType.Text, input.InputType); 215Assert.Equal(InputType.Text, input.InputType); 221Assert.Equal(InputType.SecretText, input.InputType); 227Assert.Equal(InputType.Boolean, input.InputType); 436Assert.Equal(InputType.Text, param1Input.InputType); 442Assert.Equal(InputType.Text, param2Input.InputType); 476Assert.Equal(InputType.SecretText, secretInput.InputType);
ExternalServices.AppHost (1)
AppHost.cs (1)
14InputType = InputType.Text,
ParameterEndToEnd.AppHost (1)
AppHost.cs (1)
49InputType = InputType.Number,
Publishers.AppHost (9)
DistributedApplicationBuilderExtensions.cs (9)
41InputType = InputType.Text, 49InputType = InputType.Text, 57InputType = InputType.Choice, 103InputType = InputType.Text, 126InputType = InputType.SecretText, 141InputType = InputType.Choice, 162InputType = InputType.Boolean, 176InputType = InputType.Number, 191InputType = InputType.Choice,
Stress.AppHost (9)
InteractionCommands.cs (9)
57var 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." }; 58var 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 }; 107InputType = InputType.Choice, 135InputType = InputType.Choice, 145var numberOfPeopleInput = new InteractionInput { Name = "NumberOfPeople", InputType = InputType.Number, Label = "Number of people", Placeholder = "Enter number of people", Value = "2", Required = true }; 148new InteractionInput { Name = "Name", InputType = InputType.Text, Label = "Name", Placeholder = "Enter name", Required = true, MaxLength = 50 }, 149new InteractionInput { Name = "Password", InputType = InputType.SecretText, Label = "Password", Placeholder = "Enter password", Required = true, MaxLength = 20 }, 153new InteractionInput { Name = "RememberMe", InputType = InputType.Boolean, Label = "Remember me", Placeholder = "What does this do?", Required = true }, 237InputType = InputType.Text,