64 instantiations of InteractionInput
Aspire.Hosting (3)
ApplicationModel\ParameterResource.cs (1)
116
var input = new
InteractionInput
InteractionService.cs (1)
77
return await PromptInputAsync(title, message, new
InteractionInput
{ Name = inputLabel, InputType = InputType.Text, Label = inputLabel, Required = true, Placeholder = placeHolder }, options, cancellationToken).ConfigureAwait(false);
Orchestrator\ParameterProcessor.cs (1)
152
var saveParameters = new
InteractionInput
Aspire.Hosting.Azure (3)
Provisioning\Internal\DefaultProvisioningContextProvider.cs (3)
108
new
InteractionInput
{ Name = LocationName, InputType = InputType.Choice, Label = AzureProvisioningStrings.LocationLabel, Placeholder = AzureProvisioningStrings.LocationPlaceholder, Required = true, Options = [..locations] },
109
new
InteractionInput
{ Name = SubscriptionIdName, InputType = InputType.SecretText, Label = AzureProvisioningStrings.SubscriptionIdLabel, Placeholder = AzureProvisioningStrings.SubscriptionIdPlaceholder, Required = true },
110
new
InteractionInput
{ Name = ResourceGroupName, InputType = InputType.Text, Label = AzureProvisioningStrings.ResourceGroupLabel, Value = GetDefaultResourceGroupName() },
Aspire.Hosting.Tests (39)
AddParameterTests.cs (3)
380
.WithCustomInput(p => new
InteractionInput
439
.WithCustomInput(p => new
InteractionInput
484
.WithCustomInput(p => new
InteractionInput
Dashboard\DashboardServiceTests.cs (2)
317
new Aspire.Hosting.
InteractionInput
{ Name = "Input", InputType = Aspire.Hosting.InputType.Text });
363
new Aspire.Hosting.
InteractionInput
{ Name = "Input", InputType = Aspire.Hosting.InputType.Text, Label = "Input" });
InteractionServiceTests.cs (34)
178
var input = new
InteractionInput
{ Name = "Value", Label = "Value", InputType = InputType.Text, };
211
var input = new
InteractionInput
{ Name = "Value", Label = "Value", InputType = InputType.Text, Required = true };
230
var input = new
InteractionInput
{ Name = "Value", Label = "Value", InputType = InputType.Choice, Options = [KeyValuePair.Create("first", "First option!"), KeyValuePair.Create("second", "Second option!")] };
250
var input = new
InteractionInput
{ Name = "Value", Label = "Value", InputType = InputType.Number };
270
var input = new
InteractionInput
{ Name = "Value", Label = "Value", InputType = InputType.Boolean };
300
var input = new
InteractionInput
{ Name = "Value", Label = "Value", InputType = inputType, MaxLength = maxLength };
328
var input = new
InteractionInput
348
var input = new
InteractionInput
366
var input = new
InteractionInput
401
var input = new
InteractionInput
417
new
InteractionInput
{ Name = "Username", Label = "Username", InputType = InputType.Text },
418
new
InteractionInput
{ Name = "Password", Label = "Password", InputType = InputType.SecretText },
419
new
InteractionInput
{ Name = "RememberMe", Label = "Remember Me", InputType = InputType.Boolean }
457
new
InteractionInput
{ Name = "UserName", Label = "User Name", InputType = InputType.Text },
458
new
InteractionInput
{ Name = "EmailAddress", Label = "Email Address", InputType = InputType.Text },
459
new
InteractionInput
{ Name = "Age", InputType = InputType.Number }
491
new
InteractionInput
{ Name = "ExplicitName", Label = "Explicit", InputType = InputType.Text },
492
new
InteractionInput
{ Name = "GeneratedLabel", Label = "Generated Label", InputType = InputType.Text },
493
new
InteractionInput
{ Name = "AnotherExplicit", Label = "Another", InputType = InputType.Text }
514
new
InteractionInput
{ Name = "Duplicate", Label = "First", InputType = InputType.Text },
515
new
InteractionInput
{ Name = "Duplicate", Label = "Second", InputType = InputType.Text }
529
new
InteractionInput
{ Name = "Username", Label = "First", InputType = InputType.Text },
530
new
InteractionInput
{ Name = "USERNAME", Label = "Second", InputType = InputType.Text }
544
new
InteractionInput
{ Name = "Input1", InputType = InputType.Text },
545
new
InteractionInput
{ Name = "Input2", InputType = InputType.Text },
546
new
InteractionInput
{ Name = "Input3", InputType = InputType.Text }
577
new
InteractionInput
{ Name = "SpecialInput", Label = "!@#$%^&*()", InputType = InputType.Text },
578
new
InteractionInput
{ Name = "EmptyLabel", Label = "", InputType = InputType.Text },
579
new
InteractionInput
{ Name = "WhitespaceLabel", Label = " ", InputType = InputType.Text }
614
new
InteractionInput
{ Name = "Valid", Label = "Valid", InputType = InputType.Text }
630
new
InteractionInput
{ Name = "Username", Label = "Username", InputType = InputType.Text },
631
new
InteractionInput
{ Name = "Password", Label = "Password", InputType = InputType.SecretText }
669
new
InteractionInput
{ Name = "Email", Label = "Email", InputType = InputType.Text, Required = true },
670
new
InteractionInput
{ Name = "Age", Label = "Age", InputType = InputType.Number, Required = true }
ExternalServices.AppHost (1)
AppHost.cs (1)
11
.WithCustomInput(p =>
new
()
ParameterEndToEnd.AppHost (1)
AppHost.cs (1)
46
.WithCustomInput(p =>
new
()
Publishers.AppHost (9)
DistributedApplicationBuilderExtensions.cs (9)
37
new
InteractionInput
45
new
InteractionInput
53
new
InteractionInput
99
new
InteractionInput
122
new
InteractionInput
137
new
InteractionInput
158
new
InteractionInput
172
new
InteractionInput
187
new
InteractionInput
Stress.AppHost (8)
InteractionCommands.cs (8)
57
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." };
58
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 };
104
var dinnerInput = new
InteractionInput
132
var numberOfPeopleInput = new
InteractionInput
{ Name = "NumberOfPeople", InputType = InputType.Number, Label = "Number of people", Placeholder = "Enter number of people", Value = "2", Required = true };
135
new
InteractionInput
{ Name = "Name", InputType = InputType.Text, Label = "Name", Placeholder = "Enter name", Required = true, MaxLength = 50 },
136
new
InteractionInput
{ Name = "Password", InputType = InputType.SecretText, Label = "Password", Placeholder = "Enter password", Required = true, MaxLength = 20 },
139
new
InteractionInput
{ Name = "RememberMe", InputType = InputType.Boolean, Label = "Remember me", Placeholder = "What does this do?", Required = true },
220
inputs.Add(new
InteractionInput
91 references to InteractionInput
Aspire.Hosting (37)
ApplicationModel\InputGeneratorAnnotation.cs (2)
13
public class InputGeneratorAnnotation(Func<ParameterResource,
InteractionInput
> inputGenerator) : IResourceAnnotation
18
public Func<ParameterResource,
InteractionInput
> InputGenerator => inputGenerator;
ApplicationModel\ParameterResource.cs (2)
108
internal
InteractionInput
CreateInput()
116
var
input = new InteractionInput
Dashboard\DashboardServiceData.cs (1)
173
var
modelInput = inputsInfo.Inputs[i];
IInteractionService.cs (19)
61
Task<InteractionResult<
InteractionInput
>> PromptInputAsync(string title, string? message, string inputLabel, string placeHolder, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default);
64
/// Prompts the user for a single input using a specified <see cref="
InteractionInput
"/>.
74
Task<InteractionResult<
InteractionInput
>> PromptInputAsync(string title, string? message,
InteractionInput
input, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default);
81
/// <param name="inputs">A collection of <see cref="
InteractionInput
"/> to prompt for.</param>
87
Task<InteractionResult<InteractionInputCollection>> PromptInputsAsync(string title, string? message, IReadOnlyList<
InteractionInput
> inputs, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default);
181
public sealed class InteractionInputCollection : IReadOnlyList<
InteractionInput
>
183
private readonly IReadOnlyList<
InteractionInput
> _inputs;
184
private readonly IReadOnlyDictionary<string,
InteractionInput
> _inputsByName;
190
public InteractionInputCollection(IReadOnlyList<
InteractionInput
> inputs)
192
var inputsByName = new Dictionary<string,
InteractionInput
>(StringComparer.OrdinalIgnoreCase);
196
foreach (
var
input in inputs)
215
public
InteractionInput
this[string name]
219
if (_inputsByName.TryGetValue(name, out
var
input))
232
public
InteractionInput
this[int index] => _inputs[index];
245
public bool TryGetByName(string name, [NotNullWhen(true)] out
InteractionInput
? input)
269
public IEnumerator<
InteractionInput
> GetEnumerator() => _inputs.GetEnumerator();
279
/// Specifies the type of input for an <see cref="
InteractionInput
"/>.
348
public void AddValidationError(
InteractionInput
input, string errorMessage)
InteractionService.cs (9)
75
public async Task<InteractionResult<
InteractionInput
>> PromptInputAsync(string title, string? message, string inputLabel, string placeHolder, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default)
80
public async Task<InteractionResult<
InteractionInput
>> PromptInputAsync(string title, string? message,
InteractionInput
input, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default)
85
return InteractionResult.Cancel<
InteractionInput
>();
91
public async Task<InteractionResult<InteractionInputCollection>> PromptInputsAsync(string title, string? message, IReadOnlyList<
InteractionInput
> inputs, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default)
108
var inputState = completion.State as IReadOnlyList<
InteractionInput
>;
239
if (result.State is IReadOnlyList<
InteractionInput
> inputs)
241
foreach (
var
input in inputs)
253
foreach (
var
input in inputs)
Orchestrator\ParameterProcessor.cs (3)
143
var resourceInputs = new List<(ParameterResource ParameterResource,
InteractionInput
Input)>();
148
var
input = parameter.CreateInput();
152
var
saveParameters = new InteractionInput
ParameterResourceBuilderExtensions.cs (1)
194
public static IResourceBuilder<ParameterResource> WithCustomInput(this IResourceBuilder<ParameterResource> builder, Func<ParameterResource,
InteractionInput
> createInput)
Aspire.Hosting.Azure (2)
Provisioning\Internal\DefaultProvisioningContextProvider.cs (2)
117
var
subscriptionInput = validationContext.Inputs[SubscriptionIdName];
123
var
resourceGroupInput = validationContext.Inputs[ResourceGroupName];
Aspire.Hosting.Azure.Tests (4)
tests\Shared\TestInteractionService.cs (4)
23
public Task<InteractionResult<
InteractionInput
>> PromptInputAsync(string title, string? message, string inputLabel, string placeHolder, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default)
28
public Task<InteractionResult<
InteractionInput
>> PromptInputAsync(string title, string? message,
InteractionInput
input, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default)
33
public async Task<InteractionResult<InteractionInputCollection>> PromptInputsAsync(string title, string? message, IReadOnlyList<
InteractionInput
> inputs, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default)
Aspire.Hosting.Tests (36)
AddParameterTests.cs (5)
403
var
input = parameter.Resource.CreateInput();
422
var
input = parameter.Resource.CreateInput();
450
var
input = parameter.Resource.CreateInput();
469
var
input = parameter.Resource.CreateInput();
496
var
input = parameter.Resource.CreateInput();
InteractionServiceTests.cs (24)
178
var
input = new InteractionInput { Name = "Value", Label = "Value", InputType = InputType.Text, };
211
var
input = new InteractionInput { Name = "Value", Label = "Value", InputType = InputType.Text, Required = true };
230
var
input = new InteractionInput { Name = "Value", Label = "Value", InputType = InputType.Choice, Options = [KeyValuePair.Create("first", "First option!"), KeyValuePair.Create("second", "Second option!")] };
250
var
input = new InteractionInput { Name = "Value", Label = "Value", InputType = InputType.Number };
270
var
input = new InteractionInput { Name = "Value", Label = "Value", InputType = InputType.Boolean };
300
var
input = new InteractionInput { Name = "Value", Label = "Value", InputType = inputType, MaxLength = maxLength };
328
var
input = new InteractionInput
348
var
input = new InteractionInput
366
var
input = new InteractionInput
401
var
input = new InteractionInput
415
var inputs = new List<
InteractionInput
>
437
Assert.True(collection.TryGetByName("Username", out
var
usernameInput));
440
Assert.False(collection.TryGetByName("NonExistent", out
var
nonExistentInput));
455
var inputs = new List<
InteractionInput
>
489
var inputs = new List<
InteractionInput
>
512
var inputs = new List<
InteractionInput
>
527
var inputs = new List<
InteractionInput
>
542
var inputs = new List<
InteractionInput
>
575
var inputs = new List<
InteractionInput
>
612
var inputs = new List<
InteractionInput
>
628
var inputs = new List<
InteractionInput
>
667
var inputs = new List<
InteractionInput
>
684
var
emailInput = context.Inputs["Email"];
685
var
ageInput = context.Inputs["Age"];
Orchestrator\ParameterProcessorTests.cs (3)
431
var
param1Input = inputsInteraction.Inputs[0];
437
var
param2Input = inputsInteraction.Inputs[1];
471
var
secretInput = inputsInteraction.Inputs[0];
tests\Shared\TestInteractionService.cs (4)
23
public Task<InteractionResult<
InteractionInput
>> PromptInputAsync(string title, string? message, string inputLabel, string placeHolder, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default)
28
public Task<InteractionResult<
InteractionInput
>> PromptInputAsync(string title, string? message,
InteractionInput
input, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default)
33
public async Task<InteractionResult<InteractionInputCollection>> PromptInputsAsync(string title, string? message, IReadOnlyList<
InteractionInput
> inputs, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default)
Publishers.AppHost (2)
DistributedApplicationBuilderExtensions.cs (2)
71
var
appNameInput = validationContext.Inputs.FirstOrDefault(i => i.Label == "Application Name");
77
var
versionInput = validationContext.Inputs.FirstOrDefault(i => i.Label == "Application Version");
Stress.AppHost (10)
InteractionCommands.cs (10)
57
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." };
58
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 };
78
var
input = context.Inputs[0];
96
var
input = result.Data;
104
var
dinnerInput = new InteractionInput
132
var
numberOfPeopleInput = new InteractionInput { Name = "NumberOfPeople", InputType = InputType.Number, Label = "Number of people", Placeholder = "Enter number of people", Value = "2", Required = true };
133
var inputs = new List<
InteractionInput
>
166
foreach (
var
updatedInput in result.Data)
217
var inputs = new List<
InteractionInput
>();
242
foreach (
var
input in result.Data)