166 references to InputType
Aspire.Hosting (28)
ApplicationModel\ParameterResource.cs (2)
119InputType = 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 (1)
293InputType = InputType.Boolean,
Aspire.Hosting.Azure (11)
Provisioning\Internal\PublishModeProvisioningContextProvider.cs (6)
163InputType = InputType.Choice, 189InputType = InputType.SecretText, 262InputType = InputType.Choice, 288InputType = InputType.SecretText, 359InputType = InputType.Choice, 367InputType = InputType.Text,
Provisioning\Internal\RunModeProvisioningContextProvider.cs (5)
134InputType = InputType.Choice, 161InputType = string.IsNullOrEmpty(_options.SubscriptionId) ? InputType.Choice : InputType.Text, 196InputType = InputType.Choice, 219InputType = InputType.Text,
Aspire.Hosting.Azure.Tests (16)
AzureDeployerTests.cs (9)
55Assert.Equal(InputType.Choice, input.InputType); 72Assert.Equal(InputType.Choice, input.InputType); 90Assert.Equal(InputType.Choice, input.InputType); 96Assert.Equal(InputType.Text, input.InputType); 501Assert.Equal(InputType.Text, input.InputType); 551InputType = InputType.Number, 574Assert.Equal(InputType.Number, input.InputType); 737Assert.Equal(InputType.Text, input.InputType); 782Assert.Equal(InputType.Text, input.InputType);
ProvisioningContextProviderTests.cs (7)
286Assert.Equal(InputType.Choice, input.InputType); 293Assert.Equal(InputType.Choice, input.InputType); 300Assert.Equal(InputType.Choice, input.InputType); 307Assert.Equal(InputType.Text, input.InputType); 445Assert.Equal(InputType.Text, input.InputType); 453Assert.Equal(InputType.Choice, input.InputType); 460Assert.Equal(InputType.Text, input.InputType);
Aspire.Hosting.Tests (77)
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)
320new Aspire.Hosting.InteractionInput { Name = "Input", InputType = Aspire.Hosting.InputType.Text }); 367new Aspire.Hosting.InteractionInput { Name = "Input", InputType = Aspire.Hosting.InputType.Text, Label = "Input" });
InteractionServiceTests.cs (61)
278var input = new InteractionInput { Name = "Value", Label = "Value", InputType = InputType.Text, }; 300inputs: [new InputDto("Value", string.Empty, InputType.Text)]); 315var input = new InteractionInput { Name = "Value", Label = "Value", InputType = InputType.Text, Required = true }; 324inputs: [new InputDto("Value", string.Empty, InputType.Text)]); 338var input = new InteractionInput { Name = "Value", Label = "Value", InputType = InputType.Choice, Options = [KeyValuePair.Create("first", "First option!"), KeyValuePair.Create("second", "Second option!")] }; 347inputs: [new InputDto("Value", "not-in-options", InputType.Choice)]); 361var input = new InteractionInput { Name = "Value", Label = "Value", InputType = InputType.Choice, AllowCustomChoice = true, Options = [KeyValuePair.Create("first", "First option!"), KeyValuePair.Create("second", "Second option!")] }; 370inputs: [new InputDto("Value", "not-in-options", InputType.Choice)]); 382var input = new InteractionInput { Name = "Value", Label = "Value", InputType = InputType.Number }; 391inputs: [new InputDto("Value", "one", InputType.Number)]); 405var input = new InteractionInput { Name = "Value", Label = "Value", InputType = InputType.Boolean }; 414inputs: [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)] 429public async Task PromptInputsAsync_TextExceedsLimit_ReturnErrors(InputType inputType, int? maxLength) 434static async Task TextExceedsLimitCoreAsync(InputType inputType, int? maxLength, bool success) 449inputs: [new InputDto("Value", newValue, InputType.Text)]); 474InputType = InputType.Text, 481Assert.Equal(InputType.Text, input.InputType); 494InputType = InputType.Text, 512InputType = InputType.Text, 547InputType = InputType.Text, 559new InteractionInput { Name = "Username", Label = "Username", InputType = InputType.Text }, 560new InteractionInput { Name = "Password", Label = "Password", InputType = InputType.SecretText }, 561new InteractionInput { Name = "RememberMe", Label = "Remember Me", InputType = InputType.Boolean } 599new InteractionInput { Name = "UserName", Label = "User Name", InputType = InputType.Text }, 600new InteractionInput { Name = "EmailAddress", Label = "Email Address", InputType = InputType.Text }, 601new InteractionInput { Name = "Age", InputType = InputType.Number } 633new InteractionInput { Name = "ExplicitName", Label = "Explicit", InputType = InputType.Text }, 634new InteractionInput { Name = "GeneratedLabel", Label = "Generated Label", InputType = InputType.Text }, 635new InteractionInput { Name = "AnotherExplicit", Label = "Another", InputType = InputType.Text } 656new InteractionInput { Name = "Duplicate", Label = "First", InputType = InputType.Text }, 657new InteractionInput { Name = "Duplicate", Label = "Second", InputType = InputType.Text } 671new InteractionInput { Name = "Username", Label = "First", InputType = InputType.Text }, 672new InteractionInput { Name = "USERNAME", Label = "Second", InputType = InputType.Text } 686new InteractionInput { Name = "Input1", InputType = InputType.Text }, 687new InteractionInput { Name = "Input2", InputType = InputType.Text }, 688new InteractionInput { Name = "Input3", InputType = InputType.Text } 719new InteractionInput { Name = "SpecialInput", Label = "!@#$%^&*()", InputType = InputType.Text }, 720new InteractionInput { Name = "EmptyLabel", Label = "", InputType = InputType.Text }, 721new InteractionInput { Name = "WhitespaceLabel", Label = " ", InputType = InputType.Text } 756new InteractionInput { Name = "Valid", Label = "Valid", InputType = InputType.Text } 772new InteractionInput { Name = "Username", Label = "Username", InputType = InputType.Text }, 773new InteractionInput { Name = "Password", Label = "Password", InputType = InputType.SecretText } 786new InputDto("Username", "testuser", InputType.Text), 787new InputDto("Password", "testpass", InputType.SecretText) 829InputType = InputType.Choice, 879new InteractionInput { Name = "Username", Label = "Username", InputType = InputType.Text }, 883InputType = InputType.Choice, 910inputs: [new InputDto("Username", "testuser", InputType.Text)]).DefaultTimeout(); 934new InteractionInput { Name = "Email", Label = "Email", InputType = InputType.Text, Required = true }, 935new InteractionInput { Name = "Age", Label = "Age", InputType = InputType.Number, Required = true } 968new InputDto("Email", "test@example.com", InputType.Text), 969new InputDto("Age", "25", InputType.Number) 990InputType = InputType.Choice, 1002new InteractionInput { Name = "Age", Label = "Age", InputType = InputType.Number, Required = true } 1023InputType = InputType.Choice, 1035new InteractionInput { Name = "Age", Label = "Age", InputType = InputType.Number, Required = true }
Orchestrator\ParameterProcessorTests.cs (7)
210Assert.Equal(InputType.Text, input.InputType); 216Assert.Equal(InputType.Text, input.InputType); 222Assert.Equal(InputType.SecretText, input.InputType); 228Assert.Equal(InputType.Boolean, input.InputType); 437Assert.Equal(InputType.Text, param1Input.InputType); 443Assert.Equal(InputType.Text, param2Input.InputType); 477Assert.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 (10)
DistributedApplicationBuilderExtensions.cs (10)
50InputType = InputType.Text, 58InputType = InputType.Text, 66InputType = InputType.Choice, 79InputType = InputType.Choice, 134InputType = InputType.Text, 157InputType = InputType.SecretText, 172InputType = InputType.Choice, 193InputType = InputType.Boolean, 207InputType = InputType.Number, 222InputType = InputType.Choice,
Stress.AppHost (22)
InteractionCommands.cs (22)
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 }; 70var 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 }; 74InputType = InputType.Choice, 85InputType = InputType.Choice, 144InputType = InputType.Choice, 157InputType = InputType.Choice, 196InputType = InputType.Choice, 224InputType = InputType.Choice, 234var numberOfPeopleInput = new InteractionInput { Name = "NumberOfPeople", InputType = InputType.Number, Label = "Number of people", Placeholder = "Enter number of people", Value = "2", Required = true }; 237new InteractionInput { Name = "Name", InputType = InputType.Text, Label = "Name", Placeholder = "Enter name", Required = true, MaxLength = 50 }, 238new InteractionInput { Name = "Password", InputType = InputType.SecretText, Label = "Password", Placeholder = "Enter password", Required = true, MaxLength = 20 }, 242new InteractionInput { Name = "RememberMe", InputType = InputType.Boolean, Label = "Remember me", Placeholder = "What does this do?", Required = true }, 282InputType = InputType.Choice, 294InputType = InputType.Choice, 342InputType = InputType.Choice, 352InputType = InputType.Choice, 363InputType = InputType.Text, 421InputType = InputType.Choice, 433InputType = InputType.Choice, 451InputType = InputType.Choice, 564InputType = InputType.Text,