39 instantiations of InteractionInput
Aspire.Hosting (3)
ApplicationModel\ParameterResource.cs (1)
113var input = new InteractionInput
InteractionService.cs (1)
77return await PromptInputAsync(title, message, new InteractionInput { InputType = InputType.Text, Label = inputLabel, Required = true, Placeholder = placeHolder }, options, cancellationToken).ConfigureAwait(false);
Orchestrator\ParameterProcessor.cs (1)
151var saveParameters = new InteractionInput
Aspire.Hosting.Azure (3)
Provisioning\Internal\DefaultProvisioningContextProvider.cs (3)
104new InteractionInput { InputType = InputType.Choice, Label = "Location", Placeholder = "Select location", Required = true, Options = [..locations] }, 105new InteractionInput { InputType = InputType.SecretText, Label = "Subscription ID", Placeholder = "Select subscription ID", Required = true }, 106new 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)
317new Aspire.Hosting.InteractionInput { InputType = Aspire.Hosting.InputType.Text, Label = "Input" });
InteractionServiceTests.cs (10)
178var input = new InteractionInput { Label = "Value", InputType = InputType.Text, }; 211var input = new InteractionInput { Label = "Value", InputType = InputType.Text, Required = true }; 230var input = new InteractionInput { Label = "Value", InputType = InputType.Choice, Options = [KeyValuePair.Create("first", "First option!"), KeyValuePair.Create("second", "Second option!")] }; 250var input = new InteractionInput { Label = "Value", InputType = InputType.Number }; 270var input = new InteractionInput { Label = "Value", InputType = InputType.Boolean }; 300var input = new InteractionInput { Label = "Value", InputType = inputType, MaxLength = maxLength }; 328var input = new InteractionInput 347var input = new InteractionInput 364var input = new InteractionInput 398var 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)
37new InteractionInput 44new InteractionInput 51new InteractionInput 96new InteractionInput 118new InteractionInput 132new InteractionInput 152new InteractionInput 165new InteractionInput 179new InteractionInput
Stress.AppHost (8)
InteractionCommands.cs (8)
57var 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." }; 58var 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 }; 104var dinnerInput = new InteractionInput 130var numberOfPeopleInput = new InteractionInput { InputType = InputType.Number, Label = "Number of people", Placeholder = "Enter number of people", Value = "2", Required = true }; 133new InteractionInput { InputType = InputType.Text, Label = "Name", Placeholder = "Enter name", Required = true, MaxLength = 50 }, 134new InteractionInput { InputType = InputType.SecretText, Label = "Password", Placeholder = "Enter password", Required = true, MaxLength = 20 }, 137new InteractionInput { InputType = InputType.Boolean, Label = "Remember me", Placeholder = "What does this do?", Required = true }, 218inputs.Add(new InteractionInput
78 references to InteractionInput
Aspire.Hosting (32)
ApplicationModel\InputGeneratorAnnotation.cs (2)
13public class InputGeneratorAnnotation(Func<ParameterResource, InteractionInput> inputGenerator) : IResourceAnnotation 18public Func<ParameterResource, InteractionInput> InputGenerator => inputGenerator;
ApplicationModel\ParameterResource.cs (2)
105internal InteractionInput CreateInput() 113var input = new InteractionInput
Dashboard\DashboardServiceData.cs (1)
173var modelInput = inputsInfo.Inputs[i];
IInteractionService.cs (10)
59Task<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"/>. 72Task<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> 85Task<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"/>. 220public required IReadOnlyList<InteractionInput> Inputs { get; init; } 237public void AddValidationError(InteractionInput input, string errorMessage)
InteractionService.cs (13)
75public async Task<InteractionResult<InteractionInput>> PromptInputAsync(string title, string? message, string inputLabel, string placeHolder, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default) 80public async Task<InteractionResult<InteractionInput>> PromptInputAsync(string title, string? message, InteractionInput input, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default) 85return InteractionResult.Cancel<InteractionInput>(); 91public async Task<InteractionResult<IReadOnlyList<InteractionInput>>> PromptInputsAsync(string title, string? message, IReadOnlyList<InteractionInput> inputs, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default) 105var inputState = completion.State as IReadOnlyList<InteractionInput>; 107? InteractionResult.Cancel<IReadOnlyList<InteractionInput>>() 236if (result.State is IReadOnlyList<InteractionInput> inputs) 238foreach (var input in inputs) 250foreach (var input in inputs) 436public InputsInteractionInfo(IReadOnlyList<InteractionInput> inputs) 441public IReadOnlyList<InteractionInput> Inputs { get; }
Orchestrator\ParameterProcessor.cs (3)
142var resourceInputs = new List<(ParameterResource ParameterResource, InteractionInput Input)>(); 147var input = parameter.CreateInput(); 151var saveParameters = new InteractionInput
ParameterResourceBuilderExtensions.cs (1)
194public static IResourceBuilder<ParameterResource> WithCustomInput(this IResourceBuilder<ParameterResource> builder, Func<ParameterResource, InteractionInput> createInput)
Aspire.Hosting.Azure (2)
Provisioning\Internal\DefaultProvisioningContextProvider.cs (2)
113var subscriptionInput = validationContext.Inputs[1]; 119var resourceGroupInput = validationContext.Inputs[2];
Aspire.Hosting.Azure.Tests (7)
tests\Shared\TestInteractionService.cs (7)
10internal sealed record InteractionData(string Title, string? Message, IReadOnlyList<InteractionInput> Inputs, InteractionOptions? Options, TaskCompletionSource<object> CompletionTcs); 23public Task<InteractionResult<InteractionInput>> PromptInputAsync(string title, string? message, string inputLabel, string placeHolder, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default) 28public Task<InteractionResult<InteractionInput>> PromptInputAsync(string title, string? message, InteractionInput input, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default) 33public async Task<InteractionResult<IReadOnlyList<InteractionInput>>> PromptInputsAsync(string title, string? message, IReadOnlyList<InteractionInput> inputs, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default) 37return (InteractionResult<IReadOnlyList<InteractionInput>>)await data.CompletionTcs.Task;
Aspire.Hosting.Tests (25)
AddParameterTests.cs (5)
463var input = parameter.Resource.CreateInput(); 482var input = parameter.Resource.CreateInput(); 509var input = parameter.Resource.CreateInput(); 528var input = parameter.Resource.CreateInput(); 554var input = parameter.Resource.CreateInput();
InteractionServiceTests.cs (10)
178var input = new InteractionInput { Label = "Value", InputType = InputType.Text, }; 211var input = new InteractionInput { Label = "Value", InputType = InputType.Text, Required = true }; 230var input = new InteractionInput { Label = "Value", InputType = InputType.Choice, Options = [KeyValuePair.Create("first", "First option!"), KeyValuePair.Create("second", "Second option!")] }; 250var input = new InteractionInput { Label = "Value", InputType = InputType.Number }; 270var input = new InteractionInput { Label = "Value", InputType = InputType.Boolean }; 300var input = new InteractionInput { Label = "Value", InputType = inputType, MaxLength = maxLength }; 328var input = new InteractionInput 347var input = new InteractionInput 364var input = new InteractionInput 398var input = new InteractionInput
Orchestrator\ParameterProcessorTests.cs (3)
432var param1Input = inputsInteraction.Inputs[0]; 438var param2Input = inputsInteraction.Inputs[1]; 472var secretInput = inputsInteraction.Inputs[0];
tests\Shared\TestInteractionService.cs (7)
10internal sealed record InteractionData(string Title, string? Message, IReadOnlyList<InteractionInput> Inputs, InteractionOptions? Options, TaskCompletionSource<object> CompletionTcs); 23public Task<InteractionResult<InteractionInput>> PromptInputAsync(string title, string? message, string inputLabel, string placeHolder, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default) 28public Task<InteractionResult<InteractionInput>> PromptInputAsync(string title, string? message, InteractionInput input, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default) 33public async Task<InteractionResult<IReadOnlyList<InteractionInput>>> PromptInputsAsync(string title, string? message, IReadOnlyList<InteractionInput> inputs, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default) 37return (InteractionResult<IReadOnlyList<InteractionInput>>)await data.CompletionTcs.Task;
Publishers.AppHost (2)
DistributedApplicationBuilderExtensions.cs (2)
68var appNameInput = validationContext.Inputs.FirstOrDefault(i => i.Label == "Application Name"); 74var versionInput = validationContext.Inputs.FirstOrDefault(i => i.Label == "Application Version");
Stress.AppHost (10)
InteractionCommands.cs (10)
57var 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." }; 58var 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 }; 78var input = context.Inputs[0]; 96var input = result.Data; 104var dinnerInput = new InteractionInput 130var numberOfPeopleInput = new InteractionInput { InputType = InputType.Number, Label = "Number of people", Placeholder = "Enter number of people", Value = "2", Required = true }; 131var inputs = new List<InteractionInput> 164foreach (var updatedInput in result.Data) 215var inputs = new List<InteractionInput>(); 239foreach (var input in result.Data)