30 instantiations of DeploymentStateSection
Aspire.Hosting (1)
Pipelines\Internal\DeploymentStateManagerBase.cs (1)
203var section = new DeploymentStateSection(sectionName, data, metadata.Version);
Aspire.Hosting.Azure.Kubernetes.Tests (2)
tests\Shared\InMemoryDeploymentStateManager.cs (2)
32return Task.FromResult(new DeploymentStateSection(sectionName, data, version)); 34return Task.FromResult(new DeploymentStateSection(sectionName, [], 0));
Aspire.Hosting.Azure.Sandboxes (4)
AzureSandboxContainerDeployment.cs (4)
451new DeploymentStateSection( 1378new DeploymentStateSection(stateSection.SectionName, pendingLegacyDeploymentCleanup, version: 0), 1449new DeploymentStateSection(sectionName, pendingLegacyDeploymentCleanup, version: 0), 1632return new DeploymentStateSection(
Aspire.Hosting.Azure.Tests (14)
AzureBicepProvisionerTests.cs (1)
1950return Task.FromResult(new DeploymentStateSection(sectionName, [], 0));
AzureDeployerTests.cs (1)
1534=> Task.FromResult(new DeploymentStateSection(sectionName, [], 0));
AzureEnvironmentResourceExtensionsTests.cs (1)
5383return Task.FromResult(new DeploymentStateSection(sectionName, data, version: 0));
AzureSandboxesTests.cs (8)
787var ownerOnlyState = new DeploymentStateSection( 791var emptyState = new DeploymentStateSection( 803var state = new DeploymentStateSection( 869var state = new DeploymentStateSection( 905var state = new DeploymentStateSection( 972var previousState = new DeploymentStateSection( 1091var state = new DeploymentStateSection("sandbox", new JsonObject 1129var state = new DeploymentStateSection("sandbox", new JsonObject
ProvisioningTestHelpers.cs (1)
1043return Task.FromResult(new DeploymentStateSection(sectionName, sectionData, 0));
tests\Shared\InMemoryDeploymentStateManager.cs (2)
32return Task.FromResult(new DeploymentStateSection(sectionName, data, version)); 34return Task.FromResult(new DeploymentStateSection(sectionName, [], 0));
Aspire.Hosting.Docker.Tests (2)
tests\Shared\InMemoryDeploymentStateManager.cs (2)
32return Task.FromResult(new DeploymentStateSection(sectionName, data, version)); 34return Task.FromResult(new DeploymentStateSection(sectionName, [], 0));
Aspire.Hosting.Kubernetes.Tests (2)
tests\Shared\InMemoryDeploymentStateManager.cs (2)
32return Task.FromResult(new DeploymentStateSection(sectionName, data, version)); 34return Task.FromResult(new DeploymentStateSection(sectionName, [], 0));
Aspire.Hosting.Tests (5)
Orchestrator\ApplicationOrchestratorTests.cs (1)
1170return Task.FromResult(new DeploymentStateSection(sectionName, [], 0));
Orchestrator\ParameterProcessorTests.cs (2)
1306return Task.FromResult(new DeploymentStateSection(sectionName, [], 0)); 1668return Task.FromResult(new DeploymentStateSection(sectionName, sectionData, 0));
Publishing\DeploymentStateManagerTests.cs (2)
83oldSection = new DeploymentStateSection(section1.SectionName, section1.Data, oldVersion); 329var oldSection = new DeploymentStateSection(section1.SectionName, section1.Data, oldVersion);
384 references to DeploymentStateSection
Aspire.Hosting (19)
Orchestrator\ParameterProcessor.cs (7)
254var parameterSection = await deploymentStateManager.AcquireSectionAsync(parameterResource.ConfigurationKey, context.CancellationToken).ConfigureAwait(false); 294var parameterSection = await deploymentStateManager.AcquireSectionAsync(parameterResource.ConfigurationKey, context.CancellationToken).ConfigureAwait(false); 349var parameterSection = await deploymentStateManager.AcquireSectionAsync(parameterResource.ConfigurationKey, cancellationToken).ConfigureAwait(false); 379var parameterSection = await deploymentStateManager.AcquireSectionAsync(parameterResource.ConfigurationKey, cancellationToken).ConfigureAwait(false); 456var parameterSection = await deploymentStateManager.AcquireSectionAsync(parameterResource.ConfigurationKey, cancellationToken).ConfigureAwait(false); 521var slot = await deploymentStateManager.AcquireSectionAsync(parameterResource.ConfigurationKey, cancellationToken).ConfigureAwait(false); 683var slot = await deploymentStateManager.AcquireSectionAsync(parameter.ConfigurationKey, cancellationToken).ConfigureAwait(false);
Pipelines\DeploymentStateSection.cs (1)
13/// Initializes a new instance of the <see cref="DeploymentStateSection"/> class.
Pipelines\IDeploymentStateManager.cs (4)
26Task<DeploymentStateSection> AcquireSectionAsync(string sectionName, CancellationToken cancellationToken = default); 38Task<DeploymentStateSection> AcquireCurrentSectionAsync(string sectionName, CancellationToken cancellationToken = default) 48Task SaveSectionAsync(DeploymentStateSection section, CancellationToken cancellationToken = default); 57Task DeleteSectionAsync(DeploymentStateSection section, CancellationToken cancellationToken = default);
Pipelines\Internal\DeploymentStateManagerBase.cs (7)
172public Task<DeploymentStateSection> AcquireSectionAsync(string sectionName, CancellationToken cancellationToken = default) => 176public Task<DeploymentStateSection> AcquireCurrentSectionAsync(string sectionName, CancellationToken cancellationToken = default) => 179private async Task<DeploymentStateSection> AcquireSectionAsync(string sectionName, bool includeLegacyState, CancellationToken cancellationToken) 203var section = new DeploymentStateSection(sectionName, data, metadata.Version); 247public async Task SaveSectionAsync(DeploymentStateSection section, CancellationToken cancellationToken = default) 268public async Task DeleteSectionAsync(DeploymentStateSection section, CancellationToken cancellationToken = default) 288private async Task EnsureStateAndSectionAsync(DeploymentStateSection section, CancellationToken cancellationToken)
Aspire.Hosting.Azure (39)
AzureEnvironmentResource.cs (1)
230var azureStateSection = await deploymentStateManager.AcquireSectionAsync("Azure", context.CancellationToken).ConfigureAwait(false);
AzureProvisioningController.cs (18)
1213var section = await deploymentStateManager.AcquireSectionAsync(sectionName, cancellationToken).ConfigureAwait(false); 1856var section = await deploymentStateManager.AcquireSectionAsync("Azure", cancellationToken).ConfigureAwait(false); 2509var section = await deploymentStateManager.AcquireSectionAsync($"Azure:Deployments:{resource.Name}", cancellationToken).ConfigureAwait(false); 2744var section = await deploymentStateManager.AcquireSectionAsync($"Azure:Deployments:{bicepResource.Name}", cancellationToken).ConfigureAwait(false); 2763var section = await deploymentStateManager.AcquireSectionAsync($"Azure:Deployments:{resourceName}", cancellationToken).ConfigureAwait(false); 2776var section = await deploymentStateManager.AcquireSectionAsync($"Azure:Deployments:{resourceName}", cancellationToken).ConfigureAwait(false); 2802var section = await deploymentStateManager.AcquireSectionAsync($"Azure:Deployments:{bicepResource.Name}", cancellationToken).ConfigureAwait(false); 2839var section = await deploymentStateManager.AcquireSectionAsync(sectionName, cancellationToken).ConfigureAwait(false); 2923var section = await deploymentStateManager.AcquireSectionAsync($"Azure:Deployments:{resource.Name}", cancellationToken).ConfigureAwait(false); 3091private static string? TryGetCachedDeploymentId(DeploymentStateSection section) 3094private static bool IsActiveCachedDeployment(DeploymentStateSection section) 3148private string? TryGetPreservedLocationOverride(AzureBicepResource resource, DeploymentStateSection section, string? environmentLocation) 3187private static string? TryGetExplicitLocationOverride(DeploymentStateSection section) 3366var section = await deploymentStateManager.AcquireSectionAsync("Azure", cancellationToken).ConfigureAwait(false); 3392var section = await deploymentStateManager.AcquireSectionAsync($"Azure:Deployments:{resource.Name}", cancellationToken).ConfigureAwait(false); 3511var section = await deploymentStateManager.AcquireSectionAsync($"Azure:Deployments:{resource.Name}", cancellationToken).ConfigureAwait(false); 3581var section = await deploymentStateManager.AcquireSectionAsync($"Azure:Deployments:{resource.Name}", cancellationToken).ConfigureAwait(false); 3813var section = await deploymentStateManager.AcquireSectionAsync($"Azure:Deployments:{bicepResource.Name}").ConfigureAwait(false);
Provisioning\BicepUtilities.cs (1)
169public static async ValueTask<string?> GetCurrentChecksumAsync(AzureBicepResource resource, DeploymentStateSection section, ILogger logger, CancellationToken cancellationToken = default)
Provisioning\Internal\BaseProvisioningContextProvider.cs (3)
115var azureStateSection = await _deploymentStateManager.AcquireSectionAsync("Azure", cancellationToken).ConfigureAwait(false); 207var azureStateSection = await _deploymentStateManager.AcquireSectionAsync("Azure", cancellationToken).ConfigureAwait(false); 215DeploymentStateSection azureStateSection,
Provisioning\Internal\RunModeProvisioningContextProvider.cs (1)
227var azureSection = await _deploymentStateManager.AcquireSectionAsync("Azure", cancellationToken).ConfigureAwait(false);
Provisioning\Provisioners\BicepProvisioner.cs (15)
54var stateSection = await deploymentStateManager.AcquireSectionAsync($"Azure:Deployments:{resource.Name}", cancellationToken).ConfigureAwait(false); 176var stateSection = await deploymentStateManager.AcquireSectionAsync(sectionName, cancellationToken).ConfigureAwait(false); 351DeploymentStateSection stateSection, 394DeploymentStateSection stateSection, 439private async Task PersistReconciledProvisioningStateAsync(DeploymentStateSection stateSection, string provisioningState, CancellationToken cancellationToken) 453private async Task ClearCachedRunningDeploymentStateAsync(DeploymentStateSection stateSection, CancellationToken cancellationToken) 470DeploymentStateSection stateSection, 493private static bool IsRunningCachedDeployment(DeploymentStateSection stateSection) 621var canceledStateSection = await deploymentStateManager.AcquireSectionAsync(sectionName, CancellationToken.None).ConfigureAwait(false); 672DeploymentStateSection? stateSection = null; 854var stateSection = await deploymentStateManager.AcquireSectionAsync(sectionName, cancellationToken).ConfigureAwait(false); 1316DeploymentStateSection stateSection, 1476var section = await deploymentStateManager.AcquireSectionAsync("Azure", cancellationToken).ConfigureAwait(false); 1486private static string? GetStateValue(DeploymentStateSection section, string key) => 1489private static string GetConfiguredLocation(DeploymentStateSection section, string? fallbackLocation)
Aspire.Hosting.Azure.Kubernetes (5)
AzureKubernetesEnvironmentResource.AksPipeline.cs (2)
367var deploymentStateSection = await deploymentStateManager 779var azureState = await deploymentStateManager.AcquireSectionAsync("Azure", cancellationToken).ConfigureAwait(false);
AzureKubernetesEnvironmentResource.cs (3)
101var deploymentStateSection = await deploymentStateManager 170var environmentState = await deploymentStateManager 186var chartState = await deploymentStateManager
Aspire.Hosting.Azure.Kubernetes.Tests (5)
AzureKubernetesInfrastructureTests.cs (2)
338var chartStateAfterFirstDestroy = await stateManager.AcquireSectionAsync( 700var sentinelState = await stateManager.AcquireSectionAsync(
tests\Shared\InMemoryDeploymentStateManager.cs (3)
27public Task<DeploymentStateSection> AcquireSectionAsync(string sectionName, CancellationToken cancellationToken = default) 37public Task SaveSectionAsync(DeploymentStateSection section, CancellationToken cancellationToken = default) 44public Task DeleteSectionAsync(DeploymentStateSection section, CancellationToken cancellationToken = default)
Aspire.Hosting.Azure.Sandboxes (25)
AzureSandboxContainerDeployment.cs (23)
259var stateSection = await deploymentStateManager.AcquireSectionAsync(GetStateSectionName(resource), context.CancellationToken).ConfigureAwait(false); 261var previousStateSection = CloneStateSection(stateSection); 1321var stateSection = await deploymentStateManager.AcquireSectionAsync(GetStateSectionName(resource), context.CancellationToken).ConfigureAwait(false); 1399var sandboxesSection = await deploymentStateManager.AcquireCurrentSectionAsync(SandboxStateParentSection, context.CancellationToken).ConfigureAwait(false); 1415var stateSection = await deploymentStateManager.AcquireSectionAsync(sectionName, context.CancellationToken).ConfigureAwait(false); 1590DeploymentStateSection stateSection, 1630private static DeploymentStateSection CloneStateSection(DeploymentStateSection stateSection) 1870private static string GetStateResourceName(DeploymentStateSection stateSection, string sectionName) 1928DeploymentStateSection stateSection, 1947DeploymentStateSection stateSection, 1964DeploymentStateSection stateSection, 1981private static JsonObject? GetPendingLegacyDeploymentCleanup(DeploymentStateSection stateSection) => 1985DeploymentStateSection stateSection, 2058DeploymentStateSection previousStateSection, 2094DeploymentStateSection stateSection, 2106internal static void ValidateDeploymentScope(DeploymentStateSection stateSection, AzureDevComputeResourceScope scope) 2136internal static bool HasRemoteDeploymentState(DeploymentStateSection stateSection) => 2152private static string? GetFirstStateUrl(DeploymentStateSection stateSection) 2170private static IReadOnlySet<string> GetExcludedDeployIds(string deployId, DeploymentStateSection previousStateSection) 2185private static IReadOnlySet<string> GetExcludedResourceIds(string id, DeploymentStateSection previousStateSection, string stateKey) 2200private static IEnumerable<int> GetStatePorts(DeploymentStateSection stateSection) 2302private static string GetRequiredStateValue(DeploymentStateSection section, string name)
AzureSandboxEndpointPropertyValueProvider.cs (2)
66var stateSection = await deploymentStateManager 120private bool TryGetUrl(DeploymentStateSection stateSection, [NotNullWhen(true)] out string? url)
Aspire.Hosting.Azure.Tests (131)
AzureBicepProvisionerTests.cs (26)
836var section = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage2", CancellationToken.None); 870var section = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage2", CancellationToken.None); 906var azureSection = await deploymentStateManager.AcquireSectionAsync("Azure", CancellationToken.None); 914var section = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage2", CancellationToken.None); 957var azureSection = await deploymentStateManager.AcquireSectionAsync("Azure", CancellationToken.None); 965var section = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage2", CancellationToken.None); 999var section = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage2", CancellationToken.None); 1033var section = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage2", CancellationToken.None); 1082var section = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage2", CancellationToken.None); 1337var section = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage2", CancellationToken.None); 1370var section = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage2", CancellationToken.None); 1402var section = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage2", CancellationToken.None); 1436var section = await deploymentStateManager.AcquireSectionAsync($"Azure:Deployments:{resource.Name}"); 1495var section = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage2", CancellationToken.None); 1596var section = await deploymentStateManager.AcquireSectionAsync($"Azure:Deployments:{resource.Name}"); 1651var section = await deploymentStateManager.AcquireSectionAsync($"Azure:Deployments:{resource.Name}"); 1677var section = await deploymentStateManager.AcquireSectionAsync($"Azure:Deployments:{resource.Name}"); 1706var section = await deploymentStateManager.AcquireSectionAsync($"Azure:Deployments:{resource.Name}"); 1732var section = await deploymentStateManager.AcquireSectionAsync($"Azure:Deployments:{resource.Name}"); 1757var section = await deploymentStateManager.AcquireSectionAsync($"Azure:Deployments:{resource.Name}"); 1790var section = await deploymentStateManager.AcquireSectionAsync($"Azure:Deployments:{resource.Name}"); 1848var section = await deploymentStateManager.AcquireSectionAsync($"Azure:Deployments:{resource.Name}"); 1948public Task<DeploymentStateSection> AcquireSectionAsync(string sectionName, CancellationToken cancellationToken = default) 1953public Task<DeploymentStateSection> AcquireCurrentSectionAsync(string sectionName, CancellationToken cancellationToken = default) 1956public Task DeleteSectionAsync(DeploymentStateSection section, CancellationToken cancellationToken = default) 1961public Task SaveSectionAsync(DeploymentStateSection section, CancellationToken cancellationToken = default)
AzureDeployerTests.cs (4)
1533public Task<DeploymentStateSection> AcquireSectionAsync(string sectionName, CancellationToken cancellationToken = default) 1536public Task<DeploymentStateSection> AcquireCurrentSectionAsync(string sectionName, CancellationToken cancellationToken = default) 1539public Task DeleteSectionAsync(DeploymentStateSection section, CancellationToken cancellationToken = default) => Task.CompletedTask; 1541public Task SaveSectionAsync(DeploymentStateSection section, CancellationToken cancellationToken = default) => Task.CompletedTask;
AzureEnvironmentResourceExtensionsTests.cs (76)
318var azureSection = await deploymentStateManager.AcquireSectionAsync("Azure"); 323var storageSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage"); 589var storageSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage"); 625var storageSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage"); 789var azureSection = await deploymentStateManager.AcquireSectionAsync("Azure"); 796var storageSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage"); 901var storageSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage"); 1176var storageSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage"); 1234var storageSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage"); 1295var storageSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage"); 1357var storageSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage"); 1485var storageSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage"); 1661var storageSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage"); 1699var storageSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage"); 1766var storageSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage"); 1780var storage2Section = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage2"); 1869var keyVaultSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:kv"); 1941var storageSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage"); 2020var storageSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage"); 2087var storageSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage"); 2091var storage2Section = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage2"); 2165var storageSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage"); 2169var storage2Section = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage2"); 2803var storageSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage"); 2850var storageSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage"); 2908var bicepSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage-deployment"); 2911var visibleSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage"); 2937var azureSection = await deploymentStateManager.AcquireSectionAsync("Azure"); 2943var storageSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage"); 3009var storageSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage"); 3076var storageSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage"); 3135var storageSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage"); 3201var storageSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage"); 3265var storageSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage"); 3330var storageSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage"); 3383var azureSection = await deploymentStateManager.AcquireSectionAsync("Azure"); 3390var storageSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage"); 3394var storage2Section = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage2"); 3461var azureSection = await deploymentStateManager.AcquireSectionAsync("Azure"); 3508var azureSection = await deploymentStateManager.AcquireSectionAsync("Azure"); 3557var azureSection = await deploymentStateManager.AcquireSectionAsync("Azure"); 3603var azureSection = await deploymentStateManager.AcquireSectionAsync("Azure"); 3609var storageSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage"); 3663var azureSection = await deploymentStateManager.AcquireSectionAsync("Azure"); 3669var storage2Section = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage2"); 3704var azureSection = await deploymentStateManager.AcquireSectionAsync("Azure"); 3710var storage2Section = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage2"); 3749var azureSection = await deploymentStateManager.AcquireSectionAsync("Azure"); 3782var storage2Section = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage2"); 3809var storageSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage"); 3911var keyVaultSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:kv3"); 3991var keyVaultSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:kv3"); 4315var azureSection = await deploymentStateManager.AcquireSectionAsync("Azure"); 4323var storageSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage"); 4364var azureSection = await deploymentStateManager.AcquireSectionAsync("Azure"); 4370var storageSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage"); 4412var azureSection = await deploymentStateManager.AcquireSectionAsync("Azure"); 4418var storageSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage"); 4428var storage2Section = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage2"); 4472var azureSection = await deploymentStateManager.AcquireSectionAsync("Azure"); 4478var storageSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage"); 4511var azureSection = await deploymentStateManager.AcquireSectionAsync("Azure"); 4518var storageSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage"); 4570var storageSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage"); 4611var azureSection = await deploymentStateManager.AcquireSectionAsync("Azure"); 4617var storageSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage"); 4659var azureSection = await deploymentStateManager.AcquireSectionAsync("Azure"); 4665var storageSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage"); 4796var storageSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage"); 5374public Task<DeploymentStateSection> AcquireSectionAsync(string sectionName, CancellationToken cancellationToken = default) 5386public Task<DeploymentStateSection> AcquireCurrentSectionAsync(string sectionName, CancellationToken cancellationToken = default) 5389public Task DeleteSectionAsync(DeploymentStateSection section, CancellationToken cancellationToken = default) 5399public Task SaveSectionAsync(DeploymentStateSection section, CancellationToken cancellationToken = default) 5553var azureSection = await deploymentStateManager.AcquireSectionAsync("Azure", cancellationToken); 5565var azureSection = await deploymentStateManager.AcquireSectionAsync("Azure", cancellationToken); 5698var section = await deploymentStateManager.AcquireSectionAsync($"Azure:Deployments:{resource.Name}", cancellationToken).ConfigureAwait(false);
AzureSandboxesTests.cs (15)
787var ownerOnlyState = new DeploymentStateSection( 791var emptyState = new DeploymentStateSection( 803var state = new DeploymentStateSection( 869var state = new DeploymentStateSection( 905var state = new DeploymentStateSection( 972var previousState = new DeploymentStateSection( 1091var state = new DeploymentStateSection("sandbox", new JsonObject 1129var state = new DeploymentStateSection("sandbox", new JsonObject 1153var azureState = await stateManager.AcquireSectionAsync("Azure", TestContext.Current.CancellationToken); 2727var state = await stateManager.AcquireSectionAsync( 2860var state = await stateManager.AcquireSectionAsync( 3146var state = await stateManager.AcquireSectionAsync( 3554public Task<DeploymentStateSection> AcquireSectionAsync(string sectionName, CancellationToken cancellationToken = default) => throw new NotSupportedException(); 3555public Task SaveSectionAsync(DeploymentStateSection section, CancellationToken cancellationToken = default) => throw new NotSupportedException(); 3556public Task DeleteSectionAsync(DeploymentStateSection section, CancellationToken cancellationToken = default) => throw new NotSupportedException();
ProvisioningContextProviderTests.cs (1)
136var azureSection = await deploymentStateManager.AcquireSectionAsync("Azure", CancellationToken.None);
ProvisioningContextTests.cs (2)
202var azureSection = await manager.AcquireSectionAsync("Azure"); 206var loadedSection = await manager.AcquireSectionAsync("Azure");
ProvisioningTestHelpers.cs (4)
1038public Task<DeploymentStateSection> AcquireSectionAsync(string sectionName, CancellationToken cancellationToken = default) 1046public Task<DeploymentStateSection> AcquireCurrentSectionAsync(string sectionName, CancellationToken cancellationToken = default) 1049public Task DeleteSectionAsync(DeploymentStateSection section, CancellationToken cancellationToken = default) 1054public Task SaveSectionAsync(DeploymentStateSection section, CancellationToken cancellationToken = default)
tests\Shared\InMemoryDeploymentStateManager.cs (3)
27public Task<DeploymentStateSection> AcquireSectionAsync(string sectionName, CancellationToken cancellationToken = default) 37public Task SaveSectionAsync(DeploymentStateSection section, CancellationToken cancellationToken = default) 44public Task DeleteSectionAsync(DeploymentStateSection section, CancellationToken cancellationToken = default)
Aspire.Hosting.Docker (2)
DockerComposeEnvironmentResource.cs (2)
146var stateSection = await deploymentStateManager.AcquireSectionAsync($"DockerCompose:{Name}", ctx.CancellationToken).ConfigureAwait(false); 454var stateSection = await deploymentStateManager.AcquireSectionAsync($"DockerCompose:{Name}", context.CancellationToken).ConfigureAwait(false);
Aspire.Hosting.Docker.Tests (4)
DockerComposeTests.cs (1)
1055var stateSection = await stateManager.AcquireSectionAsync("DockerCompose:env");
tests\Shared\InMemoryDeploymentStateManager.cs (3)
27public Task<DeploymentStateSection> AcquireSectionAsync(string sectionName, CancellationToken cancellationToken = default) 37public Task SaveSectionAsync(DeploymentStateSection section, CancellationToken cancellationToken = default) 44public Task DeleteSectionAsync(DeploymentStateSection section, CancellationToken cancellationToken = default)
Aspire.Hosting.Kubernetes (4)
Deployment\HelmDeploymentEngine.cs (2)
203var stateSection = await deploymentStateManager.AcquireSectionAsync($"Helm:{environment.Name}", ctx.CancellationToken).ConfigureAwait(false); 491var stateSection = await deploymentStateManager.AcquireSectionAsync($"Helm:{environment.Name}", context.CancellationToken).ConfigureAwait(false);
KubernetesHelmChartExtensions.cs (2)
370var stateSection = await deploymentStateManager 402var stateSection = await deploymentStateManager
Aspire.Hosting.Kubernetes.Tests (6)
KubernetesDeployTests.cs (3)
1994var stateSection = await stateManager.AcquireSectionAsync("Helm:env"); 2040var stateSection = await stateManager.AcquireSectionAsync("Helm:env"); 2093var stateSection = await stateManager.AcquireSectionAsync("HelmChart:env:podinfo");
tests\Shared\InMemoryDeploymentStateManager.cs (3)
27public Task<DeploymentStateSection> AcquireSectionAsync(string sectionName, CancellationToken cancellationToken = default) 37public Task SaveSectionAsync(DeploymentStateSection section, CancellationToken cancellationToken = default) 44public Task DeleteSectionAsync(DeploymentStateSection section, CancellationToken cancellationToken = default)
Aspire.Hosting.Tests (144)
Orchestrator\ApplicationOrchestratorTests.cs (4)
1168public Task<DeploymentStateSection> AcquireSectionAsync(string sectionName, CancellationToken cancellationToken = default) 1173public Task<DeploymentStateSection> AcquireCurrentSectionAsync(string sectionName, CancellationToken cancellationToken = default) 1176public Task SaveSectionAsync(DeploymentStateSection section, CancellationToken cancellationToken = default) 1183public Task DeleteSectionAsync(DeploymentStateSection section, CancellationToken cancellationToken = default)
Orchestrator\ParameterProcessorTests.cs (12)
974var section = await deploymentStateManager.AcquireSectionAsync(parameter.ConfigurationKey).DefaultTimeout(); 1045var section = await deploymentStateManager.AcquireSectionAsync(parameter.ConfigurationKey).DefaultTimeout(); 1304public Task<DeploymentStateSection> AcquireSectionAsync(string sectionName, CancellationToken cancellationToken = default) 1309public Task<DeploymentStateSection> AcquireCurrentSectionAsync(string sectionName, CancellationToken cancellationToken = default) 1312public Task SaveSectionAsync(DeploymentStateSection section, CancellationToken cancellationToken = default) 1319public Task DeleteSectionAsync(DeploymentStateSection section, CancellationToken cancellationToken = default) 1533var section = await capturingStateManager.AcquireSectionAsync($"Parameters:{parameter.Name}").DefaultTimeout(); 1634var section = await capturingStateManager.AcquireSectionAsync($"Parameters:{parameter.Name}").DefaultTimeout(); 1661public Task<DeploymentStateSection> AcquireSectionAsync(string sectionName, CancellationToken cancellationToken = default) 1671public Task<DeploymentStateSection> AcquireCurrentSectionAsync(string sectionName, CancellationToken cancellationToken = default) 1674public Task SaveSectionAsync(DeploymentStateSection section, CancellationToken cancellationToken = default) 1690public Task DeleteSectionAsync(DeploymentStateSection section, CancellationToken cancellationToken = default)
Publishing\DeploymentStateManagerTests.cs (128)
28var section = await stateManager.AcquireSectionAsync("Parameters"); 42var section1 = await stateManager.AcquireSectionAsync("Parameters"); 48var section2 = await stateManager.AcquireSectionAsync("Parameters"); 59var section = await stateManager.AcquireSectionAsync("Parameters"); 65var restartedSection = await restartedStateManager.AcquireSectionAsync("Parameters"); 76DeploymentStateSection oldSection; 77var section1 = await stateManager.AcquireSectionAsync("Parameters"); 87var section2 = await stateManager.AcquireSectionAsync("Parameters"); 105var parametersSection = await stateManager.AcquireSectionAsync("Parameters"); 106var azureSection = await stateManager.AcquireSectionAsync("Azure"); 115var parametersCheck = await stateManager.AcquireSectionAsync("Parameters"); 116var azureCheck = await stateManager.AcquireSectionAsync("Azure"); 136var section = await stateManager.AcquireSectionAsync($"Section{sectionIndex}"); 148var section = await verifyManager.AcquireSectionAsync($"Section{i}"); 158var section1 = await stateManager.AcquireSectionAsync("Parameters"); 164var section2 = await stateManager.AcquireSectionAsync("Parameters"); 165var section3 = await stateManager.AcquireSectionAsync("Azure"); 179var section1 = await stateManager.AcquireSectionAsync("Parameters"); 186var section2 = await stateManager2.AcquireSectionAsync("Parameters"); 199var section3 = await stateManager3.AcquireSectionAsync("Parameters"); 216var section2 = await stateManager.AcquireSectionAsync("Parameters"); 235var parametersSection = await stateManager.AcquireSectionAsync("Parameters"); 236var azureSection = await stateManager.AcquireSectionAsync("Azure"); 238var restartedParametersSection = await restartedStateManager.AcquireSectionAsync("Parameters"); 252var section = await stateManager.AcquireSectionAsync("TestParent:TestChild:TestGrandchild"); 257var retrievedSection = await stateManager.AcquireSectionAsync("TestParent:TestChild:TestGrandchild"); 269var section = await stateManager.AcquireSectionAsync("Parent:Child:Grandchild"); 275var verifySection = await verifyManager.AcquireSectionAsync("Parent:Child:Grandchild"); 285var section1 = await stateManager.AcquireSectionAsync("Root:Branch1:Leaf"); 286var section2 = await stateManager.AcquireSectionAsync("Root:Branch2:Leaf"); 294var verify1 = await stateManager.AcquireSectionAsync("Root:Branch1:Leaf"); 295var verify2 = await stateManager.AcquireSectionAsync("Root:Branch2:Leaf"); 306var section = await stateManager.AcquireSectionAsync("Root:Branch1:Leaf"); 312var verify = await stateManager.AcquireSectionAsync("Root:Branch1:Leaf"); 323var section1 = await stateManager.AcquireSectionAsync("Parent:Child:Grandchild"); 329var oldSection = new DeploymentStateSection(section1.SectionName, section1.Data, oldVersion); 332var section2 = await stateManager.AcquireSectionAsync("Parent:Child:Grandchild"); 348var section = await stateManager.AcquireSectionAsync("Nonexistent:Path:Here"); 362var topLevel = await stateManager.AcquireSectionAsync("TopLevel"); 363var nested = await stateManager.AcquireSectionAsync("Parent:Child"); 371var verifyTop = await stateManager.AcquireSectionAsync("TopLevel"); 372var verifyNested = await stateManager.AcquireSectionAsync("Parent:Child"); 384var section = await stateManager.AcquireSectionAsync("PermTest"); 475var legacySection = await legacyStateManager.AcquireSectionAsync("Migration"); 480var migratedSection = await migratingStateManager.AcquireSectionAsync("Migration"); 492var currentSection = await currentStateManager.AcquireSectionAsync("Migration"); 512var legacySection = await legacyStateManager.AcquireSectionAsync("Legacy"); 516var migratedSection = await migratingStateManager.AcquireSectionAsync("Legacy"); 528var sameManagerLegacySection = await migratingStateManager.AcquireSectionAsync("Legacy"); 533var legacyAfterRestart = await restartedStateManager.AcquireSectionAsync("Legacy"); 534var replacementAfterRestart = await restartedStateManager.AcquireSectionAsync("Replacement"); 551var section = await stateManager.AcquireSectionAsync("Parameters"); 558var restartedSection = await restartedStateManager.AcquireSectionAsync("Parameters"); 568var legacySection = await legacyStateManager.AcquireSectionAsync("Parameters"); 573var section = await stateManager.AcquireSectionAsync("Parameters"); 596var parameterSection = await migratingStateManager.AcquireSectionAsync("Parameters:secret"); 623var section = await stateManager.AcquireSectionAsync("Parameters:secret"); 629var restartedSection = await restartedStateManager.AcquireSectionAsync("Parameters:secret"); 646var initialSection = await initialStateManager.AcquireSectionAsync("Parameters:secret"); 652var staleSection = await staleStateManager.AcquireSectionAsync("Parameters:secret"); 653var updatingSection = await updatingStateManager.AcquireSectionAsync("Parameters:secret"); 660var restartedSection = await restartedStateManager.AcquireSectionAsync("Parameters:secret"); 677var initialSection = await initialStateManager.AcquireSectionAsync("Settings"); 683var staleObjectSection = await staleObjectManager.AcquireSectionAsync("Settings"); 684var scalarSection = await scalarManager.AcquireSectionAsync("Settings"); 692var restartedSection = await restartedStateManager.AcquireSectionAsync("Settings"); 711var firstSection = await firstStateManager.AcquireSectionAsync("Settings"); 712var secondSection = await secondStateManager.AcquireSectionAsync("Settings"); 720var restartedSection = await restartedStateManager.AcquireSectionAsync("Settings"); 739var firstLegacySection = await legacyStateManager.AcquireSectionAsync("Azure:Sandboxes:first"); 742var secondLegacySection = await legacyStateManager.AcquireSectionAsync("Azure:Sandboxes:second"); 747var currentParentSection = await firstStateManager.AcquireCurrentSectionAsync("Azure:Sandboxes"); 750var firstSection = await firstStateManager.AcquireSectionAsync("Azure:Sandboxes:first"); 755var migratedFirstSection = await firstCanonicalStateManager.AcquireSectionAsync("Azure:Sandboxes:first"); 756var inheritedSecondSection = await firstCanonicalStateManager.AcquireSectionAsync("Azure:Sandboxes:second"); 761var migratedParentSection = await firstStateManager.AcquireSectionAsync("Azure:Sandboxes"); 763var migratedCurrentParentSection = await firstStateManager.AcquireCurrentSectionAsync("Azure:Sandboxes"); 767var restartedFirstSection = await restartedFirstStateManager.AcquireSectionAsync("Azure:Sandboxes:first"); 768var restartedSecondSection = await restartedFirstStateManager.AcquireSectionAsync("Azure:Sandboxes:second"); 769var restartedCurrentParentSection = await restartedFirstStateManager.AcquireCurrentSectionAsync("Azure:Sandboxes"); 775var secondSection = await secondStateManager.AcquireSectionAsync("Azure:Sandboxes:second"); 784var clearedFirstLegacySection = await legacyAfterClearManager.AcquireSectionAsync("Azure:Sandboxes:first"); 785var preservedSecondLegacySection = await legacyAfterClearManager.AcquireSectionAsync("Azure:Sandboxes:second"); 796var legacyAzureSection = await legacyStateManager.AcquireSectionAsync("Azure"); 806var azureSection = await migratingStateManager.AcquireSectionAsync("Azure"); 810var currentAzureSection = await migratingStateManager.AcquireCurrentSectionAsync("Azure"); 815var restartedAzureSection = await restartedStateManager.AcquireSectionAsync("Azure"); 832var legacyAzureSection = await legacyStateManager.AcquireSectionAsync("Azure"); 840var azureSection = await migratingStateManager.AcquireSectionAsync("Azure"); 843var newSandboxSection = await migratingStateManager.AcquireSectionAsync("Azure:Sandboxes:new"); 848var restartedAzureSection = await restartedStateManager.AcquireSectionAsync("Azure"); 873var legacySandboxesSection = await legacyStateManager.AcquireSectionAsync("Azure:Sandboxes"); 885var firstSandboxSection = await migratingStateManager.AcquireSectionAsync("Azure:Sandboxes:first"); 888var newChildSection = await migratingStateManager.AcquireSectionAsync("Azure:Sandboxes:first:new"); 893var restartedSandboxesSection = await restartedStateManager.AcquireSectionAsync("Azure:Sandboxes"); 917var firstLegacySection = await legacyStateManager.AcquireSectionAsync("Azure:Sandboxes:first"); 920var secondLegacySection = await legacyStateManager.AcquireSectionAsync("Azure:Sandboxes:second"); 926var firstSection = await firstStateManager.AcquireSectionAsync("Azure:Sandboxes:first"); 927var secondSection = await secondStateManager.AcquireSectionAsync("Azure:Sandboxes:second"); 936var restartedFirstSection = await restartedStateManager.AcquireSectionAsync("Azure:Sandboxes:first"); 937var restartedSecondSection = await restartedStateManager.AcquireSectionAsync("Azure:Sandboxes:second"); 943var currentParentSection = await restartedStateManager.AcquireCurrentSectionAsync("Azure:Sandboxes"); 953var legacyAzureSection = await legacyStateManager.AcquireSectionAsync("Azure"); 960var firstAzureSection = await firstStateManager.AcquireSectionAsync("Azure"); 961var secondAzureSection = await secondStateManager.AcquireSectionAsync("Azure"); 970var restartedAzureSection = await restartedStateManager.AcquireSectionAsync("Azure"); 974var currentAzureSection = await restartedStateManager.AcquireCurrentSectionAsync("Azure"); 985var legacySection = await legacyStateManager.AcquireSectionAsync("Azure"); 1002var suppressedLegacySection = await restartedCurrentStateManager.AcquireSectionAsync("Azure"); 1005var preservedLegacySection = await preservedLegacyStateManager.AcquireSectionAsync("Azure"); 1015var currentSection = await currentStateManager.AcquireSectionAsync("Azure"); 1034var migratedSection = await migratingStateManager.AcquireSectionAsync("Azure"); 1046var currentSection = await currentStateManager.AcquireSectionAsync("Azure"); 1058var restartedSection = await restartedStateManager.AcquireSectionAsync("Azure"); 1066var savedSection = await CreateFileDeploymentStateManager(currentSha).AcquireSectionAsync("Azure"); 1076var section = await stateManager.AcquireSectionAsync("Azure"); 1086var currentSection = await stateManager.AcquireCurrentSectionAsync("Azure"); 1096var legacySection = await legacyStateManager.AcquireSectionAsync("Azure:Sandboxes:frontend"); 1101var migratedSection = await migratingStateManager.AcquireSectionAsync("Azure:Sandboxes:frontend"); 1106var restartedSection = await restartedStateManager.AcquireSectionAsync("Azure:Sandboxes:frontend"); 1117var firstLegacySection = await legacyStateManager.AcquireSectionAsync("Azure:Sandboxes:first"); 1120var secondLegacySection = await legacyStateManager.AcquireSectionAsync("Azure:Sandboxes:second"); 1125var firstSection = await migratingStateManager.AcquireSectionAsync("Azure:Sandboxes:first"); 1129var azureSection = await parentSavingStateManager.AcquireSectionAsync("Azure"); 1152var firstLegacySection = await legacyStateManager.AcquireSectionAsync("Azure:Sandboxes:first"); 1155var secondLegacySection = await legacyStateManager.AcquireSectionAsync("Azure:Sandboxes:second"); 1161var firstSection = await firstStateManager.AcquireSectionAsync("Azure:Sandboxes:first"); 1162var secondSection = await secondStateManager.AcquireSectionAsync("Azure:Sandboxes:second");