173 references to InputType
Aspire.Hosting (29)
ApplicationModel\ParameterResource.cs (2)
142InputType = Secret ? InputType.SecretText : InputType.Text,
Dashboard\DashboardService.cs (12)
224private static Aspire.DashboardService.Proto.V1.InputType MapInputType(Aspire.Hosting.InputType inputType) 228Aspire.Hosting.InputType.Text => Aspire.DashboardService.Proto.V1.InputType.Text, 229Aspire.Hosting.InputType.SecretText => Aspire.DashboardService.Proto.V1.InputType.SecretText, 230Aspire.Hosting.InputType.Choice => Aspire.DashboardService.Proto.V1.InputType.Choice, 231Aspire.Hosting.InputType.Boolean => Aspire.DashboardService.Proto.V1.InputType.Boolean, 232Aspire.Hosting.InputType.Number => Aspire.DashboardService.Proto.V1.InputType.Number, 237public static Aspire.Hosting.InputType MapInputType(Aspire.DashboardService.Proto.V1.InputType inputType) 241Aspire.DashboardService.Proto.V1.InputType.Text => InputType.Text, 242Aspire.DashboardService.Proto.V1.InputType.SecretText => InputType.SecretText, 243Aspire.DashboardService.Proto.V1.InputType.Choice => InputType.Choice, 244Aspire.DashboardService.Proto.V1.InputType.Boolean => InputType.Boolean, 245Aspire.DashboardService.Proto.V1.InputType.Number => InputType.Number,
Dashboard\DashboardServiceData.cs (2)
192public record InputDto(string Name, string Value, InputType InputType); 209if (requestInput.InputType == InputType.Boolean)
IInteractionService.cs (4)
290public 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)
108return await PromptInputAsync(title, message, new InteractionInput { Name = InteractionHelpers.LabelToName(inputLabel), InputType = InputType.Text, Label = inputLabel, Required = true, Placeholder = placeHolder }, options, cancellationToken).ConfigureAwait(false); 176if (input.InputType == InputType.Choice) 396case InputType.Text: 397case InputType.SecretText: 405case InputType.Choice: 415case InputType.Boolean: 421case InputType.Number:
Orchestrator\ParameterProcessor.cs (2)
311InputType = InputType.Boolean, 350InputType = InputType.Boolean,
Aspire.Hosting.Azure (12)
Provisioning\Internal\PublishModeProvisioningContextProvider.cs (6)
162InputType = InputType.Choice, 188InputType = InputType.SecretText, 261InputType = InputType.Choice, 287InputType = InputType.SecretText, 355InputType = InputType.Choice, 453InputType = InputType.Choice,
Provisioning\Internal\RunModeProvisioningContextProvider.cs (6)
134InputType = InputType.Choice, 159InputType inputType = InputType.Text; 162inputType = InputType.Choice; 199InputType = InputType.Choice, 236InputType = InputType.Choice,
Aspire.Hosting.Azure.Tests (18)
AzureDeployerTests.cs (9)
58Assert.Equal(InputType.Choice, input.InputType); 75Assert.Equal(InputType.Choice, input.InputType); 93Assert.Equal(InputType.Choice, input.InputType); 111Assert.Equal(InputType.Choice, input.InputType); 585Assert.Equal(InputType.Text, input.InputType); 635InputType = InputType.Number, 658Assert.Equal(InputType.Number, input.InputType); 848Assert.Equal(InputType.Text, input.InputType); 893Assert.Equal(InputType.Text, input.InputType);
ProvisioningContextProviderTests.cs (9)
286Assert.Equal(InputType.Choice, input.InputType); 293Assert.Equal(InputType.Choice, input.InputType); 300Assert.Equal(InputType.Choice, input.InputType); 307Assert.Equal(InputType.Choice, input.InputType); 456Assert.Equal(InputType.Text, input.InputType); 464Assert.Equal(InputType.Choice, input.InputType); 471Assert.Equal(InputType.Choice, input.InputType); 600Assert.Equal(InputType.Choice, subscriptionInput.InputType); 750Assert.Equal(InputType.Text, subscriptionInput.InputType);
Aspire.Hosting.Tests (80)
AddParameterTests.cs (7)
384InputType = InputType.Number, 407Assert.Equal(InputType.Text, input.InputType); 426Assert.Equal(InputType.SecretText, input.InputType); 443InputType = InputType.Number, 454Assert.Equal(InputType.Number, input.InputType); 488InputType = InputType.Number, 498Assert.Equal(InputType.Number, input.InputType);
Dashboard\DashboardServiceTests.cs (2)
321new Aspire.Hosting.InteractionInput { Name = "Input", InputType = Aspire.Hosting.InputType.Text }); 368new Aspire.Hosting.InteractionInput { Name = "Input", InputType = Aspire.Hosting.InputType.Text, Label = "Input" });
InteractionServiceTests.cs (61)
279var input = new InteractionInput { Name = "Value", Label = "Value", InputType = InputType.Text, }; 301inputs: [new InputDto("Value", string.Empty, InputType.Text)]); 316var input = new InteractionInput { Name = "Value", Label = "Value", InputType = InputType.Text, Required = true }; 325inputs: [new InputDto("Value", string.Empty, InputType.Text)]); 339var input = new InteractionInput { Name = "Value", Label = "Value", InputType = InputType.Choice, Options = [KeyValuePair.Create("first", "First option!"), KeyValuePair.Create("second", "Second option!")] }; 348inputs: [new InputDto("Value", "not-in-options", InputType.Choice)]); 362var input = new InteractionInput { Name = "Value", Label = "Value", InputType = InputType.Choice, AllowCustomChoice = true, Options = [KeyValuePair.Create("first", "First option!"), KeyValuePair.Create("second", "Second option!")] }; 371inputs: [new InputDto("Value", "not-in-options", InputType.Choice)]); 383var input = new InteractionInput { Name = "Value", Label = "Value", InputType = InputType.Number }; 392inputs: [new InputDto("Value", "one", InputType.Number)]); 406var input = new InteractionInput { Name = "Value", Label = "Value", InputType = InputType.Boolean }; 415inputs: [new InputDto("Value", "maybe", InputType.Number)]); 425[InlineData(InputType.Text, null)] 426[InlineData(InputType.Text, 1)] 427[InlineData(InputType.Text, 10)] 428[InlineData(InputType.Text, InteractionHelpers.DefaultMaxLength)] 429[InlineData(InputType.SecretText, 10)] 430public async Task PromptInputsAsync_TextExceedsLimit_ReturnErrors(InputType inputType, int? maxLength) 435static async Task TextExceedsLimitCoreAsync(InputType inputType, int? maxLength, bool success) 450inputs: [new InputDto("Value", newValue, InputType.Text)]); 475InputType = InputType.Text, 482Assert.Equal(InputType.Text, input.InputType); 495InputType = InputType.Text, 513InputType = InputType.Text, 548InputType = InputType.Text, 560new InteractionInput { Name = "Username", Label = "Username", InputType = InputType.Text }, 561new InteractionInput { Name = "Password", Label = "Password", InputType = InputType.SecretText }, 562new InteractionInput { Name = "RememberMe", Label = "Remember Me", InputType = InputType.Boolean } 600new InteractionInput { Name = "UserName", Label = "User Name", InputType = InputType.Text }, 601new InteractionInput { Name = "EmailAddress", Label = "Email Address", InputType = InputType.Text }, 602new InteractionInput { Name = "Age", InputType = InputType.Number } 634new InteractionInput { Name = "ExplicitName", Label = "Explicit", InputType = InputType.Text }, 635new InteractionInput { Name = "GeneratedLabel", Label = "Generated Label", InputType = InputType.Text }, 636new InteractionInput { Name = "AnotherExplicit", Label = "Another", InputType = InputType.Text } 657new InteractionInput { Name = "Duplicate", Label = "First", InputType = InputType.Text }, 658new InteractionInput { Name = "Duplicate", Label = "Second", InputType = InputType.Text } 672new InteractionInput { Name = "Username", Label = "First", InputType = InputType.Text }, 673new InteractionInput { Name = "USERNAME", Label = "Second", InputType = InputType.Text } 687new InteractionInput { Name = "Input1", InputType = InputType.Text }, 688new InteractionInput { Name = "Input2", InputType = InputType.Text }, 689new InteractionInput { Name = "Input3", InputType = InputType.Text } 720new InteractionInput { Name = "SpecialInput", Label = "!@#$%^&*()", InputType = InputType.Text }, 721new InteractionInput { Name = "EmptyLabel", Label = "", InputType = InputType.Text }, 722new InteractionInput { Name = "WhitespaceLabel", Label = " ", InputType = InputType.Text } 757new InteractionInput { Name = "Valid", Label = "Valid", InputType = InputType.Text } 773new InteractionInput { Name = "Username", Label = "Username", InputType = InputType.Text }, 774new InteractionInput { Name = "Password", Label = "Password", InputType = InputType.SecretText } 787new InputDto("Username", "testuser", InputType.Text), 788new InputDto("Password", "testpass", InputType.SecretText) 830InputType = InputType.Choice, 880new InteractionInput { Name = "Username", Label = "Username", InputType = InputType.Text }, 884InputType = InputType.Choice, 911inputs: [new InputDto("Username", "testuser", InputType.Text)]).DefaultTimeout(); 935new InteractionInput { Name = "Email", Label = "Email", InputType = InputType.Text, Required = true }, 936new InteractionInput { Name = "Age", Label = "Age", InputType = InputType.Number, Required = true } 969new InputDto("Email", "test@example.com", InputType.Text), 970new InputDto("Age", "25", InputType.Number) 991InputType = InputType.Choice, 1003new InteractionInput { Name = "Age", Label = "Age", InputType = InputType.Number, Required = true } 1024InputType = InputType.Choice, 1036new InteractionInput { Name = "Age", Label = "Age", InputType = InputType.Number, Required = true }
Orchestrator\ParameterProcessorTests.cs (10)
219Assert.Equal(InputType.Text, input.InputType); 225Assert.Equal(InputType.Text, input.InputType); 231Assert.Equal(InputType.SecretText, input.InputType); 237Assert.Equal(InputType.Boolean, input.InputType); 449Assert.Equal(InputType.Text, param1Input.InputType); 455Assert.Equal(InputType.Text, param2Input.InputType); 492Assert.Equal(InputType.SecretText, secretInput.InputType); 528Assert.Equal(InputType.Boolean, saveCheckbox.InputType); 567Assert.Equal(InputType.Boolean, saveCheckbox.InputType); 994Assert.Equal(InputType.SecretText, inputInteraction.Inputs["secretParam"].InputType);
ExternalServices.AppHost (1)
AppHost.cs (1)
14InputType = InputType.Text,
ParameterEndToEnd.AppHost (1)
AppHost.cs (1)
49InputType = InputType.Number,
Publishers.AppHost (10)
DistributedApplicationBuilderExtensions.cs (10)
51InputType = InputType.Text, 59InputType = InputType.Text, 67InputType = InputType.Choice, 80InputType = InputType.Choice, 135InputType = InputType.Text, 158InputType = InputType.SecretText, 173InputType = InputType.Choice, 194InputType = InputType.Boolean, 208InputType = InputType.Number, 223InputType = InputType.Choice,
Stress.AppHost (22)
InteractionCommands.cs (22)
58var 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." }; 59var 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 }; 71var 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 }; 75InputType = InputType.Choice, 86InputType = InputType.Choice, 145InputType = InputType.Choice, 158InputType = InputType.Choice, 197InputType = InputType.Choice, 225InputType = InputType.Choice, 235var numberOfPeopleInput = new InteractionInput { Name = "NumberOfPeople", InputType = InputType.Number, Label = "Number of people", Placeholder = "Enter number of people", Value = "2", Required = true }; 238new InteractionInput { Name = "Name", InputType = InputType.Text, Label = "Name", Placeholder = "Enter name", Required = true, MaxLength = 50 }, 239new InteractionInput { Name = "Password", InputType = InputType.SecretText, Label = "Password", Placeholder = "Enter password", Required = true, MaxLength = 20 }, 243new InteractionInput { Name = "RememberMe", InputType = InputType.Boolean, Label = "Remember me", Placeholder = "What does this do?", Required = true }, 283InputType = InputType.Choice, 295InputType = InputType.Choice, 343InputType = InputType.Choice, 353InputType = InputType.Choice, 364InputType = InputType.Text, 422InputType = InputType.Choice, 434InputType = InputType.Choice, 452InputType = InputType.Choice, 565InputType = InputType.Text,