39 instantiations of InteractionInput
Aspire.Hosting (3)
ApplicationModel\ParameterResource.cs (1)
113
var input = new
InteractionInput
InteractionService.cs (1)
77
return await PromptInputAsync(title, message, new
InteractionInput
{ InputType = InputType.Text, Label = inputLabel, Required = true, Placeholder = placeHolder }, options, cancellationToken).ConfigureAwait(false);
Orchestrator\ParameterProcessor.cs (1)
151
var saveParameters = new
InteractionInput
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.Tests (14)
AddParameterTests.cs (3)
441
.WithCustomInput(p => new
InteractionInput
499
.WithCustomInput(p => new
InteractionInput
543
.WithCustomInput(p => new
InteractionInput
Dashboard\DashboardServiceTests.cs (1)
317
new Aspire.Hosting.
InteractionInput
{ InputType = Aspire.Hosting.InputType.Text, Label = "Input" });
InteractionServiceTests.cs (10)
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 };
300
var input = new
InteractionInput
{ Label = "Value", InputType = inputType, MaxLength = maxLength };
328
var input = new
InteractionInput
347
var input = new
InteractionInput
364
var input = new
InteractionInput
398
var input = new
InteractionInput
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
44
new
InteractionInput
51
new
InteractionInput
96
new
InteractionInput
118
new
InteractionInput
132
new
InteractionInput
152
new
InteractionInput
165
new
InteractionInput
179
new
InteractionInput
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 };
104
var dinnerInput = new
InteractionInput
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 },
218
inputs.Add(new
InteractionInput
78 references to InteractionInput
Aspire.Hosting (32)
ApplicationModel\InputGeneratorAnnotation.cs (2)
13
public class InputGeneratorAnnotation(Func<ParameterResource,
InteractionInput
> inputGenerator) : IResourceAnnotation
18
public Func<ParameterResource,
InteractionInput
> InputGenerator => inputGenerator;
ApplicationModel\ParameterResource.cs (2)
105
internal
InteractionInput
CreateInput()
113
var
input = new InteractionInput
Dashboard\DashboardServiceData.cs (1)
173
var
modelInput = inputsInfo.Inputs[i];
IInteractionService.cs (10)
59
Task<InteractionResult<
InteractionInput
>> PromptInputAsync(string title, string? message, string inputLabel, string placeHolder, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default);
62
/// Prompts the user for a single input using a specified <see cref="
InteractionInput
"/>.
72
Task<InteractionResult<
InteractionInput
>> PromptInputAsync(string title, string? message,
InteractionInput
input, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default);
79
/// <param name="inputs">A collection of <see cref="
InteractionInput
"/> to prompt for.</param>
85
Task<InteractionResult<IReadOnlyList<
InteractionInput
>>> PromptInputsAsync(string title, string? message, IReadOnlyList<
InteractionInput
> inputs, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default);
168
/// Specifies the type of input for an <see cref="
InteractionInput
"/>.
220
public required IReadOnlyList<
InteractionInput
> Inputs { get; init; }
237
public void AddValidationError(
InteractionInput
input, string errorMessage)
InteractionService.cs (13)
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<IReadOnlyList<
InteractionInput
>>> PromptInputsAsync(string title, string? message, IReadOnlyList<
InteractionInput
> inputs, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default)
105
var inputState = completion.State as IReadOnlyList<
InteractionInput
>;
107
? InteractionResult.Cancel<IReadOnlyList<
InteractionInput
>>()
236
if (result.State is IReadOnlyList<
InteractionInput
> inputs)
238
foreach (
var
input in inputs)
250
foreach (
var
input in inputs)
436
public InputsInteractionInfo(IReadOnlyList<
InteractionInput
> inputs)
441
public IReadOnlyList<
InteractionInput
> Inputs { get; }
Orchestrator\ParameterProcessor.cs (3)
142
var resourceInputs = new List<(ParameterResource ParameterResource,
InteractionInput
Input)>();
147
var
input = parameter.CreateInput();
151
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)
113
var
subscriptionInput = validationContext.Inputs[1];
119
var
resourceGroupInput = validationContext.Inputs[2];
Aspire.Hosting.Azure.Tests (7)
tests\Shared\TestInteractionService.cs (7)
10
internal sealed record InteractionData(string Title, string? Message, IReadOnlyList<
InteractionInput
> Inputs, InteractionOptions? Options, TaskCompletionSource<object> CompletionTcs);
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<IReadOnlyList<
InteractionInput
>>> PromptInputsAsync(string title, string? message, IReadOnlyList<
InteractionInput
> inputs, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default)
37
return (InteractionResult<IReadOnlyList<
InteractionInput
>>)await data.CompletionTcs.Task;
Aspire.Hosting.Tests (25)
AddParameterTests.cs (5)
463
var
input = parameter.Resource.CreateInput();
482
var
input = parameter.Resource.CreateInput();
509
var
input = parameter.Resource.CreateInput();
528
var
input = parameter.Resource.CreateInput();
554
var
input = parameter.Resource.CreateInput();
InteractionServiceTests.cs (10)
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 };
300
var
input = new InteractionInput { Label = "Value", InputType = inputType, MaxLength = maxLength };
328
var
input = new InteractionInput
347
var
input = new InteractionInput
364
var
input = new InteractionInput
398
var
input = new InteractionInput
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 (7)
10
internal sealed record InteractionData(string Title, string? Message, IReadOnlyList<
InteractionInput
> Inputs, InteractionOptions? Options, TaskCompletionSource<object> CompletionTcs);
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<IReadOnlyList<
InteractionInput
>>> PromptInputsAsync(string title, string? message, IReadOnlyList<
InteractionInput
> inputs, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default)
37
return (InteractionResult<IReadOnlyList<
InteractionInput
>>)await data.CompletionTcs.Task;
Publishers.AppHost (2)
DistributedApplicationBuilderExtensions.cs (2)
68
var
appNameInput = validationContext.Inputs.FirstOrDefault(i => i.Label == "Application Name");
74
var
versionInput = validationContext.Inputs.FirstOrDefault(i => i.Label == "Application Version");
Stress.AppHost (10)
InteractionCommands.cs (10)
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 };
78
var
input = context.Inputs[0];
96
var
input = result.Data;
104
var
dinnerInput = new InteractionInput
130
var
numberOfPeopleInput = new InteractionInput { InputType = InputType.Number, Label = "Number of people", Placeholder = "Enter number of people", Value = "2", Required = true };
131
var inputs = new List<
InteractionInput
>
164
foreach (
var
updatedInput in result.Data)
215
var inputs = new List<
InteractionInput
>();
239
foreach (
var
input in result.Data)