74 references to
Aspire.Hosting.Azure (16)
Provisioning\Internal\PublishModeProvisioningContextProvider.cs (9)
177
_options.TenantId = result.Data
[
TenantName].Value;
200
var tenantInput = validationContext.Inputs
[
TenantName];
212
_options.TenantId = manualResult.Data
[
TenantName].Value;
276
_options.SubscriptionId = result.Data
[
SubscriptionIdName].Value;
299
var subscriptionInput = validationContext.Inputs
[
SubscriptionIdName];
311
_options.SubscriptionId = manualResult.Data
[
SubscriptionIdName].Value;
377
var resourceGroupInput = validationContext.Inputs
[
ResourceGroupName];
389
_options.Location = result.Data
[
LocationName].Value;
390
_options.ResourceGroup = result.Data
[
ResourceGroupName].Value;
Provisioning\Internal\RunModeProvisioningContextProvider.cs (7)
179
var tenantId = context.AllInputs
[
TenantName].Value ?? string.Empty;
205
var subscriptionId = context.AllInputs
[
SubscriptionIdName].Value ?? string.Empty;
242
var subscriptionInput = validationContext.Inputs
[
SubscriptionIdName];
248
var resourceGroupInput = validationContext.Inputs
[
ResourceGroupName];
266
_options.Location = result.Data
[
LocationName].Value;
267
_options.SubscriptionId ??= result.Data
[
SubscriptionIdName].Value;
268
_options.ResourceGroup = result.Data
[
ResourceGroupName].Value;
Aspire.Hosting.Azure.Tests (17)
ProvisioningContextProviderTests.cs (17)
311
inputsInteraction.Inputs
[
BaseProvisioningContextProvider.SubscriptionIdName].Value = "12345678-1234-1234-1234-123456789012";
314
await inputsInteraction.Inputs
[
BaseProvisioningContextProvider.LocationName].DynamicLoading!.LoadCallback(new LoadInputContext
318
Input = inputsInteraction.Inputs
[
BaseProvisioningContextProvider.LocationName],
322
inputsInteraction.Inputs
[
BaseProvisioningContextProvider.LocationName].Value = inputsInteraction.Inputs
[
BaseProvisioningContextProvider.LocationName].Options!.First(kvp => kvp.Key == "westus").Value;
323
inputsInteraction.Inputs
[
BaseProvisioningContextProvider.ResourceGroupName].Value = "rg-myrg";
371
inputsInteraction.Inputs
[
BaseProvisioningContextProvider.SubscriptionIdName].Value = "not a guid";
374
await inputsInteraction.Inputs
[
BaseProvisioningContextProvider.LocationName].DynamicLoading!.LoadCallback(new LoadInputContext
378
Input = inputsInteraction.Inputs
[
BaseProvisioningContextProvider.LocationName],
382
inputsInteraction.Inputs
[
BaseProvisioningContextProvider.LocationName].Value = inputsInteraction.Inputs
[
BaseProvisioningContextProvider.LocationName].Options!.First(kvp => kvp.Key == "westus").Value;
383
inputsInteraction.Inputs
[
BaseProvisioningContextProvider.ResourceGroupName].Value = "invalid group";
465
await inputsInteraction.Inputs
[
BaseProvisioningContextProvider.LocationName].DynamicLoading!.LoadCallback(new LoadInputContext
469
Input = inputsInteraction.Inputs
[
BaseProvisioningContextProvider.LocationName],
473
inputsInteraction.Inputs
[
BaseProvisioningContextProvider.LocationName].Value = inputsInteraction.Inputs
[
BaseProvisioningContextProvider.LocationName].Options!.First(kvp => kvp.Key == "westus").Value;
474
inputsInteraction.Inputs
[
BaseProvisioningContextProvider.ResourceGroupName].Value = "rg-myrg";
Aspire.Hosting.Tests (37)
InteractionServiceTests.cs (37)
569
Assert.Equal("Username", collection
[
"Username"].Label);
570
Assert.Equal("Password", collection
[
"Password"].Label);
571
Assert.Equal("Remember Me", collection
[
"RememberMe"].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
619
Assert.Equal("Age", collection
[
"Age"].EffectiveLabel);
645
Assert.Equal("Explicit", collection
[
"ExplicitName"].Label);
646
Assert.Equal("Another", collection
[
"AnotherExplicit"].Label);
647
Assert.Equal("Generated Label", collection
[
"GeneratedLabel"].Label);
703
Assert.NotNull(collection
[
"Input1"]);
704
Assert.NotNull(collection
[
"Input2"]);
705
Assert.NotNull(collection
[
"Input3"]);
708
Assert.Equal("Input1", collection
[
"Input1"].EffectiveLabel);
709
Assert.Equal("Input2", collection
[
"Input2"].EffectiveLabel);
710
Assert.Equal("Input3", collection
[
"Input3"].EffectiveLabel);
736
Assert.NotNull(collection
[
name]);
740
Assert.Equal("!@#$%^&*()", collection
[
"SpecialInput"].Label);
741
Assert.Equal("!@#$%^&*()", collection
[
"SpecialInput"].EffectiveLabel);
743
Assert.Equal("", collection
[
"EmptyLabel"].Label);
744
Assert.Equal("EmptyLabel", collection
[
"EmptyLabel"].EffectiveLabel); // Falls back to name
746
Assert.Equal(" ", collection
[
"WhitespaceLabel"].Label);
747
Assert.Equal("WhitespaceLabel", collection
[
"WhitespaceLabel"].EffectiveLabel); // Falls back to name
761
var exception = Assert.Throws<KeyNotFoundException>(() => collection
[
"Invalid"]);
800
Assert.Equal("testuser", resultCollection
[
"Username"].Value);
801
Assert.Equal("testpass", resultCollection
[
"Password"].Value);
848
Assert.True(inputsInteractionInfo.Inputs
[
"Dynamic"].DynamicLoadingState!.Loading);
849
Assert.Null(inputsInteractionInfo.Inputs
[
"Dynamic"].Options);
857
Assert.False(inputsInteractionInfo.Inputs
[
"Dynamic"].DynamicLoadingState!.Loading);
858
Assert.Equal("loaded", inputsInteractionInfo.Inputs
[
"Dynamic"].Options![0].Key);
903
Assert.False(inputsInteractionInfo.Inputs
[
"Dynamic"].DynamicLoadingState!.Loading);
904
Assert.Null(inputsInteractionInfo.Inputs
[
"Dynamic"].Options);
916
Assert.True(inputsInteractionInfo.Inputs
[
"Dynamic"].DynamicLoadingState!.Loading);
923
Assert.False(inputsInteractionInfo.Inputs
[
"Dynamic"].DynamicLoadingState!.Loading);
924
Assert.Equal("loaded", inputsInteractionInfo.Inputs
[
"Dynamic"].Options![0].Key);
949
var emailInput = context.Inputs
[
"Email"];
950
var ageInput = context.Inputs
[
"Age"];
Publishers.AppHost (1)
DistributedApplicationBuilderExtensions.cs (1)
87
var dependsOnInput = c.AllInputs
[
"SSLCertificateType"];
Stress.AppHost (3)
InteractionCommands.cs (3)
318
var dependsOnInput = context.AllInputs
[
"PredefinedOptions"];
373
var dependsOnInput = context.AllInputs
[
"Dynamic"];
461
var dependsOnInput = context.AllInputs
[
"PredefinedOptions"];