85 writes to Label
Aspire.Hosting (3)
ApplicationModel\ParameterResource.cs (1)
131
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 (1)
271
Label
= InteractionStrings.ParametersInputsRememberLabel
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)
562
Label
= "Custom Port Number",
Aspire.Hosting.Tests (40)
AddParameterTests.cs (3)
384
Label
= "Custom Label",
443
Label
= "Custom Label",
488
Label
= "Custom Label",
Dashboard\DashboardServiceTests.cs (1)
367
new Aspire.Hosting.InteractionInput { Name = "Input", InputType = Aspire.Hosting.InputType.Text,
Label
= "Input" });
InteractionServiceTests.cs (36)
278
var input = new InteractionInput { Name = "Value",
Label
= "Value", InputType = InputType.Text, };
315
var input = new InteractionInput { Name = "Value",
Label
= "Value", InputType = InputType.Text, Required = true };
338
var input = new InteractionInput { Name = "Value",
Label
= "Value", InputType = InputType.Choice, Options = [KeyValuePair.Create("first", "First option!"), KeyValuePair.Create("second", "Second option!")] };
361
var input = new InteractionInput { Name = "Value",
Label
= "Value", InputType = InputType.Choice, AllowCustomChoice = true, Options = [KeyValuePair.Create("first", "First option!"), KeyValuePair.Create("second", "Second option!")] };
382
var input = new InteractionInput { Name = "Value",
Label
= "Value", InputType = InputType.Number };
405
var input = new InteractionInput { Name = "Value",
Label
= "Value", InputType = InputType.Boolean };
438
var input = new InteractionInput { Name = "Value",
Label
= "Value", InputType = inputType, MaxLength = maxLength };
473
Label
= "Test Label",
493
Label
= "Test Label",
511
Label
= "Test Label",
546
Label
= "Test Label",
559
new InteractionInput { Name = "Username",
Label
= "Username", InputType = InputType.Text },
560
new InteractionInput { Name = "Password",
Label
= "Password", InputType = InputType.SecretText },
561
new InteractionInput { Name = "RememberMe",
Label
= "Remember Me", InputType = InputType.Boolean }
599
new InteractionInput { Name = "UserName",
Label
= "User Name", InputType = InputType.Text },
600
new InteractionInput { Name = "EmailAddress",
Label
= "Email Address", InputType = InputType.Text },
633
new InteractionInput { Name = "ExplicitName",
Label
= "Explicit", InputType = InputType.Text },
634
new InteractionInput { Name = "GeneratedLabel",
Label
= "Generated Label", InputType = InputType.Text },
635
new InteractionInput { Name = "AnotherExplicit",
Label
= "Another", InputType = InputType.Text }
656
new InteractionInput { Name = "Duplicate",
Label
= "First", InputType = InputType.Text },
657
new InteractionInput { Name = "Duplicate",
Label
= "Second", InputType = InputType.Text }
671
new InteractionInput { Name = "Username",
Label
= "First", InputType = InputType.Text },
672
new InteractionInput { Name = "USERNAME",
Label
= "Second", InputType = InputType.Text }
719
new InteractionInput { Name = "SpecialInput",
Label
= "!@#$%^&*()", InputType = InputType.Text },
720
new InteractionInput { Name = "EmptyLabel",
Label
= "", InputType = InputType.Text },
721
new InteractionInput { Name = "WhitespaceLabel",
Label
= " ", InputType = InputType.Text }
756
new InteractionInput { Name = "Valid",
Label
= "Valid", InputType = InputType.Text }
772
new InteractionInput { Name = "Username",
Label
= "Username", InputType = InputType.Text },
773
new InteractionInput { Name = "Password",
Label
= "Password", InputType = InputType.SecretText }
879
new InteractionInput { Name = "Username",
Label
= "Username", InputType = InputType.Text },
934
new InteractionInput { Name = "Email",
Label
= "Email", InputType = InputType.Text, Required = true },
935
new InteractionInput { Name = "Age",
Label
= "Age", InputType = InputType.Number, Required = true }
989
Label
= "Choice",
1002
new InteractionInput { Name = "Age",
Label
= "Age", InputType = InputType.Number, Required = true }
1022
Label
= "Choice",
1035
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)
49
Label
= "Application Name",
57
Label
= "Application Version",
65
Label
= "SSL Certificate Type",
78
Label
= "More certificate details",
133
Label
= "Environment Name",
156
Label
= "Database Password",
171
Label
= "Region",
192
Label
= "Enable Verbose Logging",
206
Label
= "Instance Count",
221
Label
= "Strategy",
Stress.AppHost (19)
InteractionCommands.cs (19)
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 };
70
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 };
75
Label
= "Choice with long content",
86
Label
= "Choice with long content",
145
Label
= "Dinner",
158
Label
= "Requirements",
197
Label
= "Dinner",
225
Label
= "Requirements",
234
var numberOfPeopleInput = new InteractionInput { Name = "NumberOfPeople", InputType = InputType.Number,
Label
= "Number of people", Placeholder = "Enter number of people", Value = "2", Required = true };
237
new InteractionInput { Name = "Name", InputType = InputType.Text,
Label
= "Name", Placeholder = "Enter name", Required = true, MaxLength = 50 },
238
new InteractionInput { Name = "Password", InputType = InputType.SecretText,
Label
= "Password", Placeholder = "Enter password", Required = true, MaxLength = 20 },
242
new InteractionInput { Name = "RememberMe", InputType = InputType.Boolean,
Label
= "Remember me", Placeholder = "What does this do?", Required = true },
295
Label
= "Custom choice",
343
Label
= "Dynamic",
353
Label
= "Dynamic custom choice",
434
Label
= "Custom choice",
452
Label
= "Dynamic",
565
Label
= $"Input {i + 1}",
54 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)
55
Assert.Equal("Tenant ID", input.
Label
);
72
Assert.Equal("Subscription ID", input.
Label
);
90
Assert.Equal("Resource group", input.
Label
);
108
Assert.Equal("Location", input.
Label
);
510
Assert.Equal("test-param", input.
Label
);
582
Assert.Equal("Custom Port Number", input.
Label
);
748
Assert.Equal("dependent-param", input.
Label
);
793
Assert.Equal("app-port", input.
Label
);
1433
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 (30)
AddParameterTests.cs (4)
407
Assert.Equal("test", input.
Label
);
426
Assert.Equal("secret", input.
Label
);
454
Assert.Equal("Custom Label", input.
Label
);
498
Assert.Equal("Custom Label", input.
Label
);
InteractionServiceTests.cs (19)
480
Assert.Equal("Test Label", input.
Label
);
569
Assert.Equal("Username", collection["Username"].
Label
);
570
Assert.Equal("Password", collection["Password"].
Label
);
571
Assert.Equal("Remember Me", collection["RememberMe"].
Label
);
580
Assert.Equal("Username", usernameInput.
Label
);
616
Assert.Equal("User Name", collection["UserName"].
Label
);
617
Assert.Equal("Email Address", collection["EmailAddress"].
Label
);
618
Assert.Null(collection["Age"].
Label
); // No label specified, should use EffectiveLabel
622
Assert.Equal("User Name", collection[0].
Label
);
623
Assert.Equal("Email Address", collection[1].
Label
);
624
Assert.Null(collection[2].
Label
);
645
Assert.Equal("Explicit", collection["ExplicitName"].
Label
);
646
Assert.Equal("Another", collection["AnotherExplicit"].
Label
);
647
Assert.Equal("Generated Label", collection["GeneratedLabel"].
Label
);
740
Assert.Equal("!@#$%^&*()", collection["SpecialInput"].
Label
);
743
Assert.Equal("", collection["EmptyLabel"].
Label
);
746
Assert.Equal(" ", collection["WhitespaceLabel"].
Label
);
952
Assert.Equal("Email", emailInput.
Label
);
953
Assert.Equal("Age", ageInput.
Label
);
Orchestrator\ParameterProcessorTests.cs (7)
211
Assert.Equal("param1", input.
Label
);
217
Assert.Equal("param2", input.
Label
);
223
Assert.Equal("secretParam", input.
Label
);
229
Assert.Equal(InteractionStrings.ParametersInputsRememberLabel, input.
Label
);
436
Assert.Equal("param1", param1Input.
Label
);
442
Assert.Equal("param2", param2Input.
Label
);
476
Assert.Equal("secretParam", secretInput.
Label
);
Publishers.AppHost (5)
DistributedApplicationBuilderExtensions.cs (5)
102
var appNameInput = validationContext.Inputs.FirstOrDefault(i => i.
Label
== "Application Name");
108
var versionInput = validationContext.Inputs.FirstOrDefault(i => i.
Label
== "Application Version");
122
var appName = multiInputResult.Canceled ? "default-app" : (multiInputResult.Data?.FirstOrDefault(i => i.
Label
== "Application Name")?.Value ?? "default-app");
123
var appVersion = multiInputResult.Canceled ? "1.0.0" : (multiInputResult.Data?.FirstOrDefault(i => i.
Label
== "Application Version")?.Value ?? "1.0.0");
124
var sslType = multiInputResult.Canceled ? "self-signed" : (multiInputResult.Data?.FirstOrDefault(i => i.
Label
== "SSL Certificate Type")?.Value ?? "self-signed");
Stress.AppHost (1)
InteractionCommands.cs (1)
185
logger.LogInformation("Input: {Label} = {Value}", updatedInput.
Label
, updatedInput.Value);