77 references to InputType
Aspire.Hosting (17)
ApplicationModel\ParameterResource.cs (2)
115
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)
125
public required
InputType
InputType { get; init; }
133
/// 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 { InputType =
InputType
.Text, Label = inputLabel, Required = true, Placeholder = placeHolder }, options, cancellationToken).ConfigureAwait(false);
265
case
InputType
.Text:
266
case
InputType
.SecretText:
274
case
InputType
.Choice:
280
case
InputType
.Boolean:
286
case
InputType
.Number:
Orchestrator\ParameterProcessor.cs (1)
153
InputType =
InputType
.Boolean,
Aspire.Hosting.Azure (3)
Provisioning\Internal\DefaultProvisioningContextProvider.cs (3)
104
new InteractionInput { InputType =
InputType
.Choice, Label = "Location", Placeholder = "Select location", Required = true, Options = [..locations] },
105
new InteractionInput { InputType =
InputType
.SecretText, Label = "Subscription ID", Placeholder = "Select subscription ID", Required = true },
106
new InteractionInput { InputType =
InputType
.Text, Label = "Resource group", Value = GetDefaultResourceGroupName() },
Aspire.Hosting.Azure.Tests (6)
AzureDeployerTests.cs (3)
85
Assert.Equal(
InputType
.Choice, input.InputType);
91
Assert.Equal(
InputType
.SecretText, input.InputType);
97
Assert.Equal(
InputType
.Text, input.InputType);
DefaultProvisioningContextProviderTests.cs (3)
281
Assert.Equal(
InputType
.Choice, input.InputType);
287
Assert.Equal(
InputType
.SecretText, input.InputType);
293
Assert.Equal(
InputType
.Text, input.InputType);
Aspire.Hosting.Tests (32)
AddParameterTests.cs (7)
443
InputType =
InputType
.Number,
466
Assert.Equal(
InputType
.Text, input.InputType);
485
Assert.Equal(
InputType
.SecretText, input.InputType);
501
InputType =
InputType
.Number,
512
Assert.Equal(
InputType
.Number, input.InputType);
545
InputType =
InputType
.Number,
555
Assert.Equal(
InputType
.Number, input.InputType);
Dashboard\DashboardServiceTests.cs (1)
317
new Aspire.Hosting.InteractionInput { InputType = Aspire.Hosting.
InputType
.Text, Label = "Input" });
InteractionServiceTests.cs (17)
178
var input = new InteractionInput { Label = "Value", InputType =
InputType
.Text, };
211
var input = new InteractionInput { Label = "Value", InputType =
InputType
.Text, Required = true };
230
var input = new InteractionInput { Label = "Value", InputType =
InputType
.Choice, Options = [KeyValuePair.Create("first", "First option!"), KeyValuePair.Create("second", "Second option!")] };
250
var input = new InteractionInput { Label = "Value", InputType =
InputType
.Number };
270
var input = new InteractionInput { 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)
331
InputType =
InputType
.Text,
338
Assert.Equal(
InputType
.Text, input.InputType);
350
InputType =
InputType
.Text,
367
InputType =
InputType
.Text,
401
InputType =
InputType
.Text,
Orchestrator\ParameterProcessorTests.cs (7)
209
Assert.Equal(
InputType
.Text, input.InputType);
215
Assert.Equal(
InputType
.Text, input.InputType);
221
Assert.Equal(
InputType
.SecretText, input.InputType);
227
Assert.Equal(
InputType
.Boolean, input.InputType);
436
Assert.Equal(
InputType
.Text, param1Input.InputType);
442
Assert.Equal(
InputType
.Text, param2Input.InputType);
476
Assert.Equal(
InputType
.SecretText, secretInput.InputType);
ExternalServices.AppHost (1)
AppHost.cs (1)
13
InputType =
InputType
.Text,
ParameterEndToEnd.AppHost (1)
AppHost.cs (1)
48
InputType =
InputType
.Number,
Publishers.AppHost (9)
DistributedApplicationBuilderExtensions.cs (9)
40
InputType =
InputType
.Text,
47
InputType =
InputType
.Text,
54
InputType =
InputType
.Choice,
99
InputType =
InputType
.Text,
121
InputType =
InputType
.SecretText,
135
InputType =
InputType
.Choice,
155
InputType =
InputType
.Boolean,
168
InputType =
InputType
.Number,
182
InputType =
InputType
.Choice,
Stress.AppHost (8)
InteractionCommands.cs (8)
57
var inputNoMarkdown = new InteractionInput { 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 { 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 };
106
InputType =
InputType
.Choice,
130
var numberOfPeopleInput = new InteractionInput { InputType =
InputType
.Number, Label = "Number of people", Placeholder = "Enter number of people", Value = "2", Required = true };
133
new InteractionInput { InputType =
InputType
.Text, Label = "Name", Placeholder = "Enter name", Required = true, MaxLength = 50 },
134
new InteractionInput { InputType =
InputType
.SecretText, Label = "Password", Placeholder = "Enter password", Required = true, MaxLength = 20 },
137
new InteractionInput { InputType =
InputType
.Boolean, Label = "Remember me", Placeholder = "What does this do?", Required = true },
220
InputType =
InputType
.Text,