85 references to
Aspire.Hosting.Azure (18)
Provisioning\Internal\PublishModeProvisioningContextProvider.cs (9)
176
_options.TenantId = result.Data
[
TenantName].Value;
199
var tenantInput = validationContext.Inputs
[
TenantName];
211
_options.TenantId = manualResult.Data
[
TenantName].Value;
275
_options.SubscriptionId = result.Data
[
SubscriptionIdName].Value;
298
var subscriptionInput = validationContext.Inputs
[
SubscriptionIdName];
310
_options.SubscriptionId = manualResult.Data
[
SubscriptionIdName].Value;
374
var resourceGroupInput = validationContext.Inputs
[
ResourceGroupName];
389
var selectedResourceGroup = resourceGroupResult.Data
[
ResourceGroupName].Value;
467
_options.Location = locationResult.Data
[
LocationName].Value;
Provisioning\Internal\RunModeProvisioningContextProvider.cs (9)
168
var tenantId = context.AllInputs
[
TenantName].Value ?? string.Empty;
208
var subscriptionId = context.AllInputs
[
SubscriptionIdName].Value ?? string.Empty;
245
var subscriptionId = context.AllInputs
[
SubscriptionIdName].Value ?? string.Empty;
246
var resourceGroupName = context.AllInputs
[
ResourceGroupName].Value ?? string.Empty;
291
var subscriptionInput = validationContext.Inputs
[
SubscriptionIdName];
297
var resourceGroupInput = validationContext.Inputs
[
ResourceGroupName];
315
_options.Location = result.Data
[
LocationName].Value;
316
_options.SubscriptionId ??= result.Data
[
SubscriptionIdName].Value;
317
_options.ResourceGroup = result.Data
[
ResourceGroupName].Value;
Aspire.Hosting.Azure.Tests (26)
AzureDeployerTests.cs (3)
1371
var apiKeyInput = parameterInputs.Inputs
[
"api-key"];
1372
var dbInput = parameterInputs.Inputs
[
"mydb"];
1373
var customInput = parameterInputs.Inputs
[
"custom-setting"];
ProvisioningContextProviderTests.cs (23)
311
inputsInteraction.Inputs
[
BaseProvisioningContextProvider.SubscriptionIdName].Value = "12345678-1234-1234-1234-123456789012";
314
await inputsInteraction.Inputs
[
BaseProvisioningContextProvider.ResourceGroupName].DynamicLoading!.LoadCallback(new LoadInputContext
318
Input = inputsInteraction.Inputs
[
BaseProvisioningContextProvider.ResourceGroupName],
323
inputsInteraction.Inputs
[
BaseProvisioningContextProvider.ResourceGroupName].Value = "test-new-rg";
326
await inputsInteraction.Inputs
[
BaseProvisioningContextProvider.LocationName].DynamicLoading!.LoadCallback(new LoadInputContext
330
Input = inputsInteraction.Inputs
[
BaseProvisioningContextProvider.LocationName],
334
inputsInteraction.Inputs
[
BaseProvisioningContextProvider.LocationName].Value = inputsInteraction.Inputs
[
BaseProvisioningContextProvider.LocationName].Options!.First(kvp => kvp.Key == "westus").Value;
382
inputsInteraction.Inputs
[
BaseProvisioningContextProvider.SubscriptionIdName].Value = "not a guid";
385
await inputsInteraction.Inputs
[
BaseProvisioningContextProvider.LocationName].DynamicLoading!.LoadCallback(new LoadInputContext
389
Input = inputsInteraction.Inputs
[
BaseProvisioningContextProvider.LocationName],
393
inputsInteraction.Inputs
[
BaseProvisioningContextProvider.LocationName].Value = inputsInteraction.Inputs
[
BaseProvisioningContextProvider.LocationName].Options!.First(kvp => kvp.Key == "westus").Value;
394
inputsInteraction.Inputs
[
BaseProvisioningContextProvider.ResourceGroupName].Value = "invalid group";
476
await inputsInteraction.Inputs
[
BaseProvisioningContextProvider.ResourceGroupName].DynamicLoading!.LoadCallback(new LoadInputContext
480
Input = inputsInteraction.Inputs
[
BaseProvisioningContextProvider.ResourceGroupName],
485
inputsInteraction.Inputs
[
BaseProvisioningContextProvider.ResourceGroupName].Value = "test-new-rg";
488
await inputsInteraction.Inputs
[
BaseProvisioningContextProvider.LocationName].DynamicLoading!.LoadCallback(new LoadInputContext
492
Input = inputsInteraction.Inputs
[
BaseProvisioningContextProvider.LocationName],
497
await inputsInteraction.Inputs
[
BaseProvisioningContextProvider.LocationName].DynamicLoading!.LoadCallback(new LoadInputContext
501
Input = inputsInteraction.Inputs
[
BaseProvisioningContextProvider.LocationName],
505
inputsInteraction.Inputs
[
BaseProvisioningContextProvider.LocationName].Value = inputsInteraction.Inputs
[
BaseProvisioningContextProvider.LocationName].Options!.First(kvp => kvp.Key == "westus").Value;
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"];