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