86 writes to Label
Aspire.Hosting (4)
ApplicationModel\ParameterResource.cs (1)
143
Label
= Name,
InteractionService.cs (1)
108
return await PromptInputAsync(title, message, new InteractionInput { Name = InteractionHelpers.LabelToName(inputLabel), InputType = InputType.Text,
Label
= inputLabel, Required = true, Placeholder = placeHolder }, options, cancellationToken).ConfigureAwait(false);
Orchestrator\ParameterProcessor.cs (2)
312
Label
= InteractionStrings.ParametersInputsRememberLabel,
351
Label
= InteractionStrings.ParametersInputsDeleteLabel
Aspire.Hosting.Azure (10)
Provisioning\Internal\PublishModeProvisioningContextProvider.cs (6)
163
Label
= AzureProvisioningStrings.TenantLabel,
189
Label
= AzureProvisioningStrings.TenantLabel,
262
Label
= AzureProvisioningStrings.SubscriptionIdLabel,
288
Label
= AzureProvisioningStrings.SubscriptionIdLabel,
356
Label
= AzureProvisioningStrings.ResourceGroupLabel,
454
Label
= AzureProvisioningStrings.LocationLabel,
Provisioning\Internal\RunModeProvisioningContextProvider.cs (4)
135
Label
= AzureProvisioningStrings.TenantLabel,
186
Label
= AzureProvisioningStrings.SubscriptionIdLabel,
200
Label
= AzureProvisioningStrings.ResourceGroupLabel,
237
Label
= AzureProvisioningStrings.LocationLabel,
Aspire.Hosting.Azure.Tests (1)
AzureDeployerTests.cs (1)
636
Label
= "Custom Port Number",
Aspire.Hosting.Tests (40)
AddParameterTests.cs (3)
385
Label
= "Custom Label",
444
Label
= "Custom Label",
489
Label
= "Custom Label",
Dashboard\DashboardServiceTests.cs (1)
368
new Aspire.Hosting.InteractionInput { Name = "Input", InputType = Aspire.Hosting.InputType.Text,
Label
= "Input" });
InteractionServiceTests.cs (36)
279
var input = new InteractionInput { Name = "Value",
Label
= "Value", InputType = InputType.Text, };
316
var input = new InteractionInput { Name = "Value",
Label
= "Value", InputType = InputType.Text, Required = true };
339
var input = new InteractionInput { Name = "Value",
Label
= "Value", InputType = InputType.Choice, Options = [KeyValuePair.Create("first", "First option!"), KeyValuePair.Create("second", "Second option!")] };
362
var input = new InteractionInput { Name = "Value",
Label
= "Value", InputType = InputType.Choice, AllowCustomChoice = true, Options = [KeyValuePair.Create("first", "First option!"), KeyValuePair.Create("second", "Second option!")] };
383
var input = new InteractionInput { Name = "Value",
Label
= "Value", InputType = InputType.Number };
406
var input = new InteractionInput { Name = "Value",
Label
= "Value", InputType = InputType.Boolean };
439
var input = new InteractionInput { Name = "Value",
Label
= "Value", InputType = inputType, MaxLength = maxLength };
474
Label
= "Test Label",
494
Label
= "Test Label",
512
Label
= "Test Label",
547
Label
= "Test Label",
560
new InteractionInput { Name = "Username",
Label
= "Username", InputType = InputType.Text },
561
new InteractionInput { Name = "Password",
Label
= "Password", InputType = InputType.SecretText },
562
new InteractionInput { Name = "RememberMe",
Label
= "Remember Me", InputType = InputType.Boolean }
600
new InteractionInput { Name = "UserName",
Label
= "User Name", InputType = InputType.Text },
601
new InteractionInput { Name = "EmailAddress",
Label
= "Email Address", InputType = InputType.Text },
634
new InteractionInput { Name = "ExplicitName",
Label
= "Explicit", InputType = InputType.Text },
635
new InteractionInput { Name = "GeneratedLabel",
Label
= "Generated Label", InputType = InputType.Text },
636
new InteractionInput { Name = "AnotherExplicit",
Label
= "Another", InputType = InputType.Text }
657
new InteractionInput { Name = "Duplicate",
Label
= "First", InputType = InputType.Text },
658
new InteractionInput { Name = "Duplicate",
Label
= "Second", InputType = InputType.Text }
672
new InteractionInput { Name = "Username",
Label
= "First", InputType = InputType.Text },
673
new InteractionInput { Name = "USERNAME",
Label
= "Second", InputType = InputType.Text }
720
new InteractionInput { Name = "SpecialInput",
Label
= "!@#$%^&*()", InputType = InputType.Text },
721
new InteractionInput { Name = "EmptyLabel",
Label
= "", InputType = InputType.Text },
722
new InteractionInput { Name = "WhitespaceLabel",
Label
= " ", InputType = InputType.Text }
757
new InteractionInput { Name = "Valid",
Label
= "Valid", InputType = InputType.Text }
773
new InteractionInput { Name = "Username",
Label
= "Username", InputType = InputType.Text },
774
new InteractionInput { Name = "Password",
Label
= "Password", InputType = InputType.SecretText }
880
new InteractionInput { Name = "Username",
Label
= "Username", InputType = InputType.Text },
935
new InteractionInput { Name = "Email",
Label
= "Email", InputType = InputType.Text, Required = true },
936
new InteractionInput { Name = "Age",
Label
= "Age", InputType = InputType.Number, Required = true }
990
Label
= "Choice",
1003
new InteractionInput { Name = "Age",
Label
= "Age", InputType = InputType.Number, Required = true }
1023
Label
= "Choice",
1036
new InteractionInput { Name = "Age",
Label
= "Age", InputType = InputType.Number, Required = true }
ExternalServices.AppHost (1)
AppHost.cs (1)
16
Label
= p.Name,
ParameterEndToEnd.AppHost (1)
AppHost.cs (1)
50
Label
= "Custom Input",
Publishers.AppHost (10)
DistributedApplicationBuilderExtensions.cs (10)
50
Label
= "Application Name",
58
Label
= "Application Version",
66
Label
= "SSL Certificate Type",
79
Label
= "More certificate details",
134
Label
= "Environment Name",
157
Label
= "Database Password",
172
Label
= "Region",
193
Label
= "Enable Verbose Logging",
207
Label
= "Instance Count",
222
Label
= "Strategy",
Stress.AppHost (19)
InteractionCommands.cs (19)
58
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." };
59
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 };
71
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.", EnableDescriptionMarkdown = true };
76
Label
= "Choice with long content",
87
Label
= "Choice with long content",
146
Label
= "Dinner",
159
Label
= "Requirements",
198
Label
= "Dinner",
226
Label
= "Requirements",
235
var numberOfPeopleInput = new InteractionInput { Name = "NumberOfPeople", InputType = InputType.Number,
Label
= "Number of people", Placeholder = "Enter number of people", Value = "2", Required = true };
238
new InteractionInput { Name = "Name", InputType = InputType.Text,
Label
= "Name", Placeholder = "Enter name", Required = true, MaxLength = 50 },
239
new InteractionInput { Name = "Password", InputType = InputType.SecretText,
Label
= "Password", Placeholder = "Enter password", Required = true, MaxLength = 20 },
243
new InteractionInput { Name = "RememberMe", InputType = InputType.Boolean,
Label
= "Remember me", Placeholder = "What does this do?", Required = true },
296
Label
= "Custom choice",
344
Label
= "Dynamic",
354
Label
= "Dynamic custom choice",
435
Label
= "Custom choice",
453
Label
= "Dynamic",
566
Label
= $"Input {i + 1}",
59 references to Label
Aspire.Hosting (2)
IInteractionService.cs (2)
262
internal string EffectiveLabel => string.IsNullOrWhiteSpace(
Label
) ? Name :
Label
;
Aspire.Hosting.Azure.Tests (16)
AzureDeployerTests.cs (9)
57
Assert.Equal("Tenant ID", input.
Label
);
74
Assert.Equal("Subscription ID", input.
Label
);
92
Assert.Equal("Resource group", input.
Label
);
110
Assert.Equal("Location", input.
Label
);
584
Assert.Equal("unresolved-test-param", input.
Label
);
656
Assert.Equal("Custom Port Number", input.
Label
);
847
Assert.Equal("dependent-param", input.
Label
);
892
Assert.Equal("app-port", input.
Label
);
1673
var parameterNames = string.Join(", ", interaction.Inputs.Select(i => i.
Label
));
ProvisioningContextProviderTests.cs (7)
285
Assert.Equal("Tenant ID", input.
Label
);
292
Assert.Equal("Subscription ID", input.
Label
);
299
Assert.Equal("Resource group", input.
Label
);
306
Assert.Equal("Location", input.
Label
);
455
Assert.Equal("Subscription ID", input.
Label
);
463
Assert.Equal("Resource group", input.
Label
);
470
Assert.Equal("Location", input.
Label
);
Aspire.Hosting.Tests (35)
AddParameterTests.cs (4)
408
Assert.Equal("test", input.
Label
);
427
Assert.Equal("secret", input.
Label
);
455
Assert.Equal("Custom Label", input.
Label
);
499
Assert.Equal("Custom Label", input.
Label
);
InteractionServiceTests.cs (19)
481
Assert.Equal("Test Label", input.
Label
);
570
Assert.Equal("Username", collection["Username"].
Label
);
571
Assert.Equal("Password", collection["Password"].
Label
);
572
Assert.Equal("Remember Me", collection["RememberMe"].
Label
);
581
Assert.Equal("Username", usernameInput.
Label
);
617
Assert.Equal("User Name", collection["UserName"].
Label
);
618
Assert.Equal("Email Address", collection["EmailAddress"].
Label
);
619
Assert.Null(collection["Age"].
Label
); // No label specified, should use EffectiveLabel
623
Assert.Equal("User Name", collection[0].
Label
);
624
Assert.Equal("Email Address", collection[1].
Label
);
625
Assert.Null(collection[2].
Label
);
646
Assert.Equal("Explicit", collection["ExplicitName"].
Label
);
647
Assert.Equal("Another", collection["AnotherExplicit"].
Label
);
648
Assert.Equal("Generated Label", collection["GeneratedLabel"].
Label
);
741
Assert.Equal("!@#$%^&*()", collection["SpecialInput"].
Label
);
744
Assert.Equal("", collection["EmptyLabel"].
Label
);
747
Assert.Equal(" ", collection["WhitespaceLabel"].
Label
);
953
Assert.Equal("Email", emailInput.
Label
);
954
Assert.Equal("Age", ageInput.
Label
);
Orchestrator\ParameterProcessorTests.cs (12)
218
Assert.Equal("param1", input.
Label
);
224
Assert.Equal("param2", input.
Label
);
230
Assert.Equal("secretParam", input.
Label
);
236
Assert.Equal(InteractionStrings.ParametersInputsRememberLabel, input.
Label
);
446
Assert.Equal("param1", param1Input.
Label
);
452
Assert.Equal("param2", param2Input.
Label
);
489
Assert.Equal("secretParam", secretInput.
Label
);
524
Assert.Equal("param1", paramInput.
Label
);
527
Assert.Equal(InteractionStrings.ParametersInputsRememberLabel, saveCheckbox.
Label
);
563
Assert.Equal("param1", paramInput.
Label
);
566
Assert.Equal(InteractionStrings.ParametersInputsRememberLabel, saveCheckbox.
Label
);
918
Assert.Equal("testParam", inputInteraction.Inputs["testParam"].
Label
);
Publishers.AppHost (5)
DistributedApplicationBuilderExtensions.cs (5)
103
var appNameInput = validationContext.Inputs.FirstOrDefault(i => i.
Label
== "Application Name");
109
var versionInput = validationContext.Inputs.FirstOrDefault(i => i.
Label
== "Application Version");
123
var appName = multiInputResult.Canceled ? "default-app" : (multiInputResult.Data?.FirstOrDefault(i => i.
Label
== "Application Name")?.Value ?? "default-app");
124
var appVersion = multiInputResult.Canceled ? "1.0.0" : (multiInputResult.Data?.FirstOrDefault(i => i.
Label
== "Application Version")?.Value ?? "1.0.0");
125
var sslType = multiInputResult.Canceled ? "self-signed" : (multiInputResult.Data?.FirstOrDefault(i => i.
Label
== "SSL Certificate Type")?.Value ?? "self-signed");
Stress.AppHost (1)
InteractionCommands.cs (1)
186
logger.LogInformation("Input: {Label} = {Value}", updatedInput.
Label
, updatedInput.Value);