73 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)
284
saveParameters = new
InteractionInput
Aspire.Hosting.Azure (9)
Provisioning\Internal\PublishModeProvisioningContextProvider.cs (6)
163
new
InteractionInput
189
new
InteractionInput
280
new
InteractionInput
288
new
InteractionInput
331
new
InteractionInput
339
new
InteractionInput
Provisioning\Internal\RunModeProvisioningContextProvider.cs (3)
136
new
InteractionInput
{ Name = LocationName, InputType = InputType.Choice, Label = AzureProvisioningStrings.LocationLabel, Placeholder = AzureProvisioningStrings.LocationPlaceholder, Required = true, Options = [..locations] },
137
new
InteractionInput
{ Name = SubscriptionIdName, InputType = InputType.SecretText, Label = AzureProvisioningStrings.SubscriptionIdLabel, Placeholder = AzureProvisioningStrings.SubscriptionIdPlaceholder, Required = true },
138
new
InteractionInput
{ Name = ResourceGroupName, InputType = InputType.Text, Label = AzureProvisioningStrings.ResourceGroupLabel, Value = GetDefaultResourceGroupName() },
Aspire.Hosting.Azure.Tests (1)
AzureDeployerTests.cs (1)
495
.WithCustomInput(p => new
InteractionInput
Aspire.Hosting.Tests (40)
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 (35)
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.Choice, AllowCustomChoice = true, Options = [KeyValuePair.Create("first", "First option!"), KeyValuePair.Create("second", "Second option!")] };
268
var input = new
InteractionInput
{ Name = "Value", Label = "Value", InputType = InputType.Number };
288
var input = new
InteractionInput
{ Name = "Value", Label = "Value", InputType = InputType.Boolean };
318
var input = new
InteractionInput
{ Name = "Value", Label = "Value", InputType = inputType, MaxLength = maxLength };
346
var input = new
InteractionInput
366
var input = new
InteractionInput
384
var input = new
InteractionInput
419
var input = new
InteractionInput
435
new
InteractionInput
{ Name = "Username", Label = "Username", InputType = InputType.Text },
436
new
InteractionInput
{ Name = "Password", Label = "Password", InputType = InputType.SecretText },
437
new
InteractionInput
{ Name = "RememberMe", Label = "Remember Me", InputType = InputType.Boolean }
475
new
InteractionInput
{ Name = "UserName", Label = "User Name", InputType = InputType.Text },
476
new
InteractionInput
{ Name = "EmailAddress", Label = "Email Address", InputType = InputType.Text },
477
new
InteractionInput
{ Name = "Age", InputType = InputType.Number }
509
new
InteractionInput
{ Name = "ExplicitName", Label = "Explicit", InputType = InputType.Text },
510
new
InteractionInput
{ Name = "GeneratedLabel", Label = "Generated Label", InputType = InputType.Text },
511
new
InteractionInput
{ Name = "AnotherExplicit", Label = "Another", InputType = InputType.Text }
532
new
InteractionInput
{ Name = "Duplicate", Label = "First", InputType = InputType.Text },
533
new
InteractionInput
{ Name = "Duplicate", Label = "Second", InputType = InputType.Text }
547
new
InteractionInput
{ Name = "Username", Label = "First", InputType = InputType.Text },
548
new
InteractionInput
{ Name = "USERNAME", Label = "Second", InputType = InputType.Text }
562
new
InteractionInput
{ Name = "Input1", InputType = InputType.Text },
563
new
InteractionInput
{ Name = "Input2", InputType = InputType.Text },
564
new
InteractionInput
{ Name = "Input3", InputType = InputType.Text }
595
new
InteractionInput
{ Name = "SpecialInput", Label = "!@#$%^&*()", InputType = InputType.Text },
596
new
InteractionInput
{ Name = "EmptyLabel", Label = "", InputType = InputType.Text },
597
new
InteractionInput
{ Name = "WhitespaceLabel", Label = " ", InputType = InputType.Text }
632
new
InteractionInput
{ Name = "Valid", Label = "Valid", InputType = InputType.Text }
648
new
InteractionInput
{ Name = "Username", Label = "Username", InputType = InputType.Text },
649
new
InteractionInput
{ Name = "Password", Label = "Password", InputType = InputType.SecretText }
687
new
InteractionInput
{ Name = "Email", Label = "Email", InputType = InputType.Text, Required = true },
688
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 (9)
InteractionCommands.cs (9)
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 requirementsInput = new
InteractionInput
145
var numberOfPeopleInput = new
InteractionInput
{ Name = "NumberOfPeople", InputType = InputType.Number, Label = "Number of people", Placeholder = "Enter number of people", Value = "2", Required = true };
148
new
InteractionInput
{ Name = "Name", InputType = InputType.Text, Label = "Name", Placeholder = "Enter name", Required = true, MaxLength = 50 },
149
new
InteractionInput
{ Name = "Password", InputType = InputType.SecretText, Label = "Password", Placeholder = "Enter password", Required = true, MaxLength = 20 },
153
new
InteractionInput
{ Name = "RememberMe", InputType = InputType.Boolean, Label = "Remember me", Placeholder = "What does this do?", Required = true },
234
inputs.Add(new
InteractionInput
100 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)
177
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);
186
public sealed class InteractionInputCollection : IReadOnlyList<
InteractionInput
>
188
private readonly IReadOnlyList<
InteractionInput
> _inputs;
189
private readonly IReadOnlyDictionary<string,
InteractionInput
> _inputsByName;
195
public InteractionInputCollection(IReadOnlyList<
InteractionInput
> inputs)
197
var inputsByName = new Dictionary<string,
InteractionInput
>(StringComparer.OrdinalIgnoreCase);
201
foreach (
var
input in inputs)
220
public
InteractionInput
this[string name]
224
if (_inputsByName.TryGetValue(name, out
var
input))
237
public
InteractionInput
this[int index] => _inputs[index];
250
public bool TryGetByName(string name, [NotNullWhen(true)] out
InteractionInput
? input)
274
public IEnumerator<
InteractionInput
> GetEnumerator() => _inputs.GetEnumerator();
284
/// Specifies the type of input for an <see cref="
InteractionInput
"/>.
354
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)
270
var resourceInputs = new List<(ParameterResource ParameterResource,
InteractionInput
Input)>();
275
var
input = parameter.CreateInput();
280
InteractionInput
? saveParameters = null;
ParameterResourceBuilderExtensions.cs (1)
194
public static IResourceBuilder<ParameterResource> WithCustomInput(this IResourceBuilder<ParameterResource> builder, Func<ParameterResource,
InteractionInput
> createInput)
Aspire.Hosting.Azure (5)
Provisioning\Internal\PublishModeProvisioningContextProvider.cs (3)
203
var
subscriptionInput = validationContext.Inputs[SubscriptionIdName];
301
var
resourceGroupInput = validationContext.Inputs[ResourceGroupName];
352
var
resourceGroupInput = validationContext.Inputs[ResourceGroupName];
Provisioning\Internal\RunModeProvisioningContextProvider.cs (2)
145
var
subscriptionInput = validationContext.Inputs[SubscriptionIdName];
151
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.DevTunnels.Tests (4)
DevTunnelCliInstallationManagerTests.cs (4)
56
public Task<InteractionResult<
InteractionInput
>> PromptInputAsync(string title, string? message, string inputLabel, string placeHolder, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default)
61
public Task<InteractionResult<
InteractionInput
>> PromptInputAsync(string title, string? message,
InteractionInput
input, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default)
66
public Task<InteractionResult<InteractionInputCollection>> PromptInputsAsync(string title, string? message, IReadOnlyList<
InteractionInput
> inputs, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default)
Aspire.Hosting.Tests (37)
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 (25)
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.Choice, AllowCustomChoice = true, Options = [KeyValuePair.Create("first", "First option!"), KeyValuePair.Create("second", "Second option!")] };
268
var
input = new InteractionInput { Name = "Value", Label = "Value", InputType = InputType.Number };
288
var
input = new InteractionInput { Name = "Value", Label = "Value", InputType = InputType.Boolean };
318
var
input = new InteractionInput { Name = "Value", Label = "Value", InputType = inputType, MaxLength = maxLength };
346
var
input = new InteractionInput
366
var
input = new InteractionInput
384
var
input = new InteractionInput
419
var
input = new InteractionInput
433
var inputs = new List<
InteractionInput
>
455
Assert.True(collection.TryGetByName("Username", out
var
usernameInput));
458
Assert.False(collection.TryGetByName("NonExistent", out
var
nonExistentInput));
473
var inputs = new List<
InteractionInput
>
507
var inputs = new List<
InteractionInput
>
530
var inputs = new List<
InteractionInput
>
545
var inputs = new List<
InteractionInput
>
560
var inputs = new List<
InteractionInput
>
593
var inputs = new List<
InteractionInput
>
630
var inputs = new List<
InteractionInput
>
646
var inputs = new List<
InteractionInput
>
685
var inputs = new List<
InteractionInput
>
702
var
emailInput = context.Inputs["Email"];
703
var
ageInput = context.Inputs["Age"];
Orchestrator\ParameterProcessorTests.cs (3)
432
var
param1Input = inputsInteraction.Inputs[0];
438
var
param2Input = inputsInteraction.Inputs[1];
472
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 (11)
InteractionCommands.cs (11)
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
requirementsInput = new InteractionInput
145
var
numberOfPeopleInput = new InteractionInput { Name = "NumberOfPeople", InputType = InputType.Number, Label = "Number of people", Placeholder = "Enter number of people", Value = "2", Required = true };
146
var inputs = new List<
InteractionInput
>
180
foreach (
var
updatedInput in result.Data)
231
var inputs = new List<
InteractionInput
>();
256
foreach (
var
input in result.Data)