73 instantiations of InteractionInput
Aspire.Hosting (3)
ApplicationModel\ParameterResource.cs (1)
116var input = new InteractionInput
InteractionService.cs (1)
77return 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)
284saveParameters = new InteractionInput
Aspire.Hosting.Azure (9)
Provisioning\Internal\PublishModeProvisioningContextProvider.cs (6)
163new InteractionInput 189new InteractionInput 280new InteractionInput 288new InteractionInput 331new InteractionInput 339new InteractionInput
Provisioning\Internal\RunModeProvisioningContextProvider.cs (3)
136new InteractionInput { Name = LocationName, InputType = InputType.Choice, Label = AzureProvisioningStrings.LocationLabel, Placeholder = AzureProvisioningStrings.LocationPlaceholder, Required = true, Options = [..locations] }, 137new InteractionInput { Name = SubscriptionIdName, InputType = InputType.SecretText, Label = AzureProvisioningStrings.SubscriptionIdLabel, Placeholder = AzureProvisioningStrings.SubscriptionIdPlaceholder, Required = true }, 138new 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)
317new Aspire.Hosting.InteractionInput { Name = "Input", InputType = Aspire.Hosting.InputType.Text }); 363new Aspire.Hosting.InteractionInput { Name = "Input", InputType = Aspire.Hosting.InputType.Text, Label = "Input" });
InteractionServiceTests.cs (35)
178var input = new InteractionInput { Name = "Value", Label = "Value", InputType = InputType.Text, }; 211var input = new InteractionInput { Name = "Value", Label = "Value", InputType = InputType.Text, Required = true }; 230var input = new InteractionInput { Name = "Value", Label = "Value", InputType = InputType.Choice, Options = [KeyValuePair.Create("first", "First option!"), KeyValuePair.Create("second", "Second option!")] }; 250var input = new InteractionInput { Name = "Value", Label = "Value", InputType = InputType.Choice, AllowCustomChoice = true, Options = [KeyValuePair.Create("first", "First option!"), KeyValuePair.Create("second", "Second option!")] }; 268var input = new InteractionInput { Name = "Value", Label = "Value", InputType = InputType.Number }; 288var input = new InteractionInput { Name = "Value", Label = "Value", InputType = InputType.Boolean }; 318var input = new InteractionInput { Name = "Value", Label = "Value", InputType = inputType, MaxLength = maxLength }; 346var input = new InteractionInput 366var input = new InteractionInput 384var input = new InteractionInput 419var input = new InteractionInput 435new InteractionInput { Name = "Username", Label = "Username", InputType = InputType.Text }, 436new InteractionInput { Name = "Password", Label = "Password", InputType = InputType.SecretText }, 437new InteractionInput { Name = "RememberMe", Label = "Remember Me", InputType = InputType.Boolean } 475new InteractionInput { Name = "UserName", Label = "User Name", InputType = InputType.Text }, 476new InteractionInput { Name = "EmailAddress", Label = "Email Address", InputType = InputType.Text }, 477new InteractionInput { Name = "Age", InputType = InputType.Number } 509new InteractionInput { Name = "ExplicitName", Label = "Explicit", InputType = InputType.Text }, 510new InteractionInput { Name = "GeneratedLabel", Label = "Generated Label", InputType = InputType.Text }, 511new InteractionInput { Name = "AnotherExplicit", Label = "Another", InputType = InputType.Text } 532new InteractionInput { Name = "Duplicate", Label = "First", InputType = InputType.Text }, 533new InteractionInput { Name = "Duplicate", Label = "Second", InputType = InputType.Text } 547new InteractionInput { Name = "Username", Label = "First", InputType = InputType.Text }, 548new InteractionInput { Name = "USERNAME", Label = "Second", InputType = InputType.Text } 562new InteractionInput { Name = "Input1", InputType = InputType.Text }, 563new InteractionInput { Name = "Input2", InputType = InputType.Text }, 564new InteractionInput { Name = "Input3", InputType = InputType.Text } 595new InteractionInput { Name = "SpecialInput", Label = "!@#$%^&*()", InputType = InputType.Text }, 596new InteractionInput { Name = "EmptyLabel", Label = "", InputType = InputType.Text }, 597new InteractionInput { Name = "WhitespaceLabel", Label = " ", InputType = InputType.Text } 632new InteractionInput { Name = "Valid", Label = "Valid", InputType = InputType.Text } 648new InteractionInput { Name = "Username", Label = "Username", InputType = InputType.Text }, 649new InteractionInput { Name = "Password", Label = "Password", InputType = InputType.SecretText } 687new InteractionInput { Name = "Email", Label = "Email", InputType = InputType.Text, Required = true }, 688new 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)
37new InteractionInput 45new InteractionInput 53new InteractionInput 99new InteractionInput 122new InteractionInput 137new InteractionInput 158new InteractionInput 172new InteractionInput 187new InteractionInput
Stress.AppHost (9)
InteractionCommands.cs (9)
57var 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." }; 58var 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 }; 104var dinnerInput = new InteractionInput 132var requirementsInput = new InteractionInput 145var numberOfPeopleInput = new InteractionInput { Name = "NumberOfPeople", InputType = InputType.Number, Label = "Number of people", Placeholder = "Enter number of people", Value = "2", Required = true }; 148new InteractionInput { Name = "Name", InputType = InputType.Text, Label = "Name", Placeholder = "Enter name", Required = true, MaxLength = 50 }, 149new InteractionInput { Name = "Password", InputType = InputType.SecretText, Label = "Password", Placeholder = "Enter password", Required = true, MaxLength = 20 }, 153new InteractionInput { Name = "RememberMe", InputType = InputType.Boolean, Label = "Remember me", Placeholder = "What does this do?", Required = true }, 234inputs.Add(new InteractionInput
100 references to InteractionInput
Aspire.Hosting (37)
ApplicationModel\InputGeneratorAnnotation.cs (2)
13public class InputGeneratorAnnotation(Func<ParameterResource, InteractionInput> inputGenerator) : IResourceAnnotation 18public Func<ParameterResource, InteractionInput> InputGenerator => inputGenerator;
ApplicationModel\ParameterResource.cs (2)
108internal InteractionInput CreateInput() 116var input = new InteractionInput
Dashboard\DashboardServiceData.cs (1)
177var modelInput = inputsInfo.Inputs[i];
IInteractionService.cs (19)
61Task<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"/>. 74Task<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> 87Task<InteractionResult<InteractionInputCollection>> PromptInputsAsync(string title, string? message, IReadOnlyList<InteractionInput> inputs, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default); 186public sealed class InteractionInputCollection : IReadOnlyList<InteractionInput> 188private readonly IReadOnlyList<InteractionInput> _inputs; 189private readonly IReadOnlyDictionary<string, InteractionInput> _inputsByName; 195public InteractionInputCollection(IReadOnlyList<InteractionInput> inputs) 197var inputsByName = new Dictionary<string, InteractionInput>(StringComparer.OrdinalIgnoreCase); 201foreach (var input in inputs) 220public InteractionInput this[string name] 224if (_inputsByName.TryGetValue(name, out var input)) 237public InteractionInput this[int index] => _inputs[index]; 250public bool TryGetByName(string name, [NotNullWhen(true)] out InteractionInput? input) 274public IEnumerator<InteractionInput> GetEnumerator() => _inputs.GetEnumerator(); 284/// Specifies the type of input for an <see cref="InteractionInput"/>. 354public void AddValidationError(InteractionInput input, string errorMessage)
InteractionService.cs (9)
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<InteractionInputCollection>> PromptInputsAsync(string title, string? message, IReadOnlyList<InteractionInput> inputs, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default) 108var inputState = completion.State as IReadOnlyList<InteractionInput>; 239if (result.State is IReadOnlyList<InteractionInput> inputs) 241foreach (var input in inputs) 253foreach (var input in inputs)
Orchestrator\ParameterProcessor.cs (3)
270var resourceInputs = new List<(ParameterResource ParameterResource, InteractionInput Input)>(); 275var input = parameter.CreateInput(); 280InteractionInput? saveParameters = null;
ParameterResourceBuilderExtensions.cs (1)
194public static IResourceBuilder<ParameterResource> WithCustomInput(this IResourceBuilder<ParameterResource> builder, Func<ParameterResource, InteractionInput> createInput)
Aspire.Hosting.Azure (5)
Provisioning\Internal\PublishModeProvisioningContextProvider.cs (3)
203var subscriptionInput = validationContext.Inputs[SubscriptionIdName]; 301var resourceGroupInput = validationContext.Inputs[ResourceGroupName]; 352var resourceGroupInput = validationContext.Inputs[ResourceGroupName];
Provisioning\Internal\RunModeProvisioningContextProvider.cs (2)
145var subscriptionInput = validationContext.Inputs[SubscriptionIdName]; 151var resourceGroupInput = validationContext.Inputs[ResourceGroupName];
Aspire.Hosting.Azure.Tests (4)
tests\Shared\TestInteractionService.cs (4)
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<InteractionInputCollection>> PromptInputsAsync(string title, string? message, IReadOnlyList<InteractionInput> inputs, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default)
Aspire.Hosting.DevTunnels.Tests (4)
DevTunnelCliInstallationManagerTests.cs (4)
56public Task<InteractionResult<InteractionInput>> PromptInputAsync(string title, string? message, string inputLabel, string placeHolder, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default) 61public Task<InteractionResult<InteractionInput>> PromptInputAsync(string title, string? message, InteractionInput input, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default) 66public Task<InteractionResult<InteractionInputCollection>> PromptInputsAsync(string title, string? message, IReadOnlyList<InteractionInput> inputs, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default)
Aspire.Hosting.Tests (37)
AddParameterTests.cs (5)
403var input = parameter.Resource.CreateInput(); 422var input = parameter.Resource.CreateInput(); 450var input = parameter.Resource.CreateInput(); 469var input = parameter.Resource.CreateInput(); 496var input = parameter.Resource.CreateInput();
InteractionServiceTests.cs (25)
178var input = new InteractionInput { Name = "Value", Label = "Value", InputType = InputType.Text, }; 211var input = new InteractionInput { Name = "Value", Label = "Value", InputType = InputType.Text, Required = true }; 230var input = new InteractionInput { Name = "Value", Label = "Value", InputType = InputType.Choice, Options = [KeyValuePair.Create("first", "First option!"), KeyValuePair.Create("second", "Second option!")] }; 250var input = new InteractionInput { Name = "Value", Label = "Value", InputType = InputType.Choice, AllowCustomChoice = true, Options = [KeyValuePair.Create("first", "First option!"), KeyValuePair.Create("second", "Second option!")] }; 268var input = new InteractionInput { Name = "Value", Label = "Value", InputType = InputType.Number }; 288var input = new InteractionInput { Name = "Value", Label = "Value", InputType = InputType.Boolean }; 318var input = new InteractionInput { Name = "Value", Label = "Value", InputType = inputType, MaxLength = maxLength }; 346var input = new InteractionInput 366var input = new InteractionInput 384var input = new InteractionInput 419var input = new InteractionInput 433var inputs = new List<InteractionInput> 455Assert.True(collection.TryGetByName("Username", out var usernameInput)); 458Assert.False(collection.TryGetByName("NonExistent", out var nonExistentInput)); 473var inputs = new List<InteractionInput> 507var inputs = new List<InteractionInput> 530var inputs = new List<InteractionInput> 545var inputs = new List<InteractionInput> 560var inputs = new List<InteractionInput> 593var inputs = new List<InteractionInput> 630var inputs = new List<InteractionInput> 646var inputs = new List<InteractionInput> 685var inputs = new List<InteractionInput> 702var emailInput = context.Inputs["Email"]; 703var ageInput = context.Inputs["Age"];
Orchestrator\ParameterProcessorTests.cs (3)
432var param1Input = inputsInteraction.Inputs[0]; 438var param2Input = inputsInteraction.Inputs[1]; 472var secretInput = inputsInteraction.Inputs[0];
tests\Shared\TestInteractionService.cs (4)
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<InteractionInputCollection>> PromptInputsAsync(string title, string? message, IReadOnlyList<InteractionInput> inputs, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default)
Publishers.AppHost (2)
DistributedApplicationBuilderExtensions.cs (2)
71var appNameInput = validationContext.Inputs.FirstOrDefault(i => i.Label == "Application Name"); 77var versionInput = validationContext.Inputs.FirstOrDefault(i => i.Label == "Application Version");
Stress.AppHost (11)
InteractionCommands.cs (11)
57var 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." }; 58var 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 }; 78var input = context.Inputs[0]; 96var input = result.Data; 104var dinnerInput = new InteractionInput 132var requirementsInput = new InteractionInput 145var numberOfPeopleInput = new InteractionInput { Name = "NumberOfPeople", InputType = InputType.Number, Label = "Number of people", Placeholder = "Enter number of people", Value = "2", Required = true }; 146var inputs = new List<InteractionInput> 180foreach (var updatedInput in result.Data) 231var inputs = new List<InteractionInput>(); 256foreach (var input in result.Data)