35 instantiations of DeploymentStateSection
Aspire.Hosting (1)
Pipelines\Internal\DeploymentStateManagerBase.cs (1)
201
var section = new
DeploymentStateSection
(sectionName, data, metadata.Version);
Aspire.Hosting.Azure.Kubernetes.Tests (2)
tests\Shared\InMemoryDeploymentStateManager.cs (2)
30
return Task.FromResult(new
DeploymentStateSection
(sectionName, data, version));
32
return Task.FromResult(new
DeploymentStateSection
(sectionName, [], 0));
Aspire.Hosting.Azure.Sandboxes (4)
AzureSandboxContainerDeployment.cs (4)
449
new
DeploymentStateSection
(
1376
new
DeploymentStateSection
(stateSection.SectionName, pendingLegacyDeploymentCleanup, version: 0),
1447
new
DeploymentStateSection
(sectionName, pendingLegacyDeploymentCleanup, version: 0),
1630
return new
DeploymentStateSection
(
Aspire.Hosting.Azure.Tests (19)
AzureBicepProvisionerTests.cs (1)
2048
return Task.FromResult(new
DeploymentStateSection
(sectionName, [], 0));
AzureDeployerTests.cs (1)
1779
=> Task.FromResult(new
DeploymentStateSection
(sectionName, [], 0));
AzureEnvironmentResourceExtensionsTests.cs (1)
5713
return Task.FromResult(new
DeploymentStateSection
(sectionName, data, version: 0));
AzureSandboxesTests.cs (8)
786
var ownerOnlyState = new
DeploymentStateSection
(
790
var emptyState = new
DeploymentStateSection
(
802
var state = new
DeploymentStateSection
(
868
var state = new
DeploymentStateSection
(
904
var state = new
DeploymentStateSection
(
971
var previousState = new
DeploymentStateSection
(
1090
var state = new
DeploymentStateSection
("sandbox", new JsonObject
1128
var state = new
DeploymentStateSection
("sandbox", new JsonObject
BicepUtilitiesTests.cs (5)
527
var stateSection = new
DeploymentStateSection
("test", [], 0);
540
var stateSection = new
DeploymentStateSection
("test", new JsonObject
562
var stateSection = new
DeploymentStateSection
("test", new JsonObject
587
var stateSection = new
DeploymentStateSection
("test", new JsonObject
624
var stateSection = new
DeploymentStateSection
("test", new JsonObject
ProvisioningTestHelpers.cs (1)
1057
return Task.FromResult(new
DeploymentStateSection
(sectionName, sectionData, 0));
tests\Shared\InMemoryDeploymentStateManager.cs (2)
30
return Task.FromResult(new
DeploymentStateSection
(sectionName, data, version));
32
return Task.FromResult(new
DeploymentStateSection
(sectionName, [], 0));
Aspire.Hosting.Docker.Tests (2)
tests\Shared\InMemoryDeploymentStateManager.cs (2)
30
return Task.FromResult(new
DeploymentStateSection
(sectionName, data, version));
32
return Task.FromResult(new
DeploymentStateSection
(sectionName, [], 0));
Aspire.Hosting.Kubernetes.Tests (2)
tests\Shared\InMemoryDeploymentStateManager.cs (2)
30
return Task.FromResult(new
DeploymentStateSection
(sectionName, data, version));
32
return Task.FromResult(new
DeploymentStateSection
(sectionName, [], 0));
Aspire.Hosting.Tests (5)
Orchestrator\ApplicationOrchestratorTests.cs (1)
1215
return Task.FromResult(new
DeploymentStateSection
(sectionName, [], 0));
Orchestrator\ParameterProcessorTests.cs (2)
1608
return Task.FromResult(new
DeploymentStateSection
(sectionName, [], 0));
2433
return Task.FromResult(new
DeploymentStateSection
(sectionName, sectionData, 0));
Publishing\DeploymentStateManagerTests.cs (2)
80
oldSection = new
DeploymentStateSection
(section1.SectionName, section1.Data, oldVersion);
326
var oldSection = new
DeploymentStateSection
(section1.SectionName, section1.Data, oldVersion);
404 references to DeploymentStateSection
Aspire.Hosting (20)
Orchestrator\ParameterProcessor.cs (8)
361
var
parameterSection = await deploymentStateManager.AcquireSectionAsync(parameterResource.ConfigurationKey, context.CancellationToken).ConfigureAwait(false);
401
var
parameterSection = await deploymentStateManager.AcquireSectionAsync(parameterResource.ConfigurationKey, context.CancellationToken).ConfigureAwait(false);
440
var
parameterSection = await deploymentStateManager.AcquireSectionAsync(parameterResource.ConfigurationKey, cancellationToken).ConfigureAwait(false);
490
var
parameterSection = await deploymentStateManager.AcquireSectionAsync(parameterResource.ConfigurationKey, cancellationToken).ConfigureAwait(false);
566
var
parameterSection = await deploymentStateManager.AcquireSectionAsync(parameterResource.ConfigurationKey, cancellationToken).ConfigureAwait(false);
650
var
slot = await deploymentStateManager.AcquireSectionAsync(parameterResource.ConfigurationKey, cancellationToken).ConfigureAwait(false);
902
var
slot = await deploymentStateManager.AcquireSectionAsync(parameter.ConfigurationKey, cancellationToken).ConfigureAwait(false);
911
var
slot = await deploymentStateManager.AcquireSectionAsync(parameter.ConfigurationKey, cancellationToken).ConfigureAwait(false);
Pipelines\DeploymentStateSection.cs (1)
12
/// Initializes a new instance of the <see cref="
DeploymentStateSection
"/> class.
Pipelines\IDeploymentStateManager.cs (4)
23
Task<
DeploymentStateSection
> AcquireSectionAsync(string sectionName, CancellationToken cancellationToken = default);
35
Task<
DeploymentStateSection
> AcquireCurrentSectionAsync(string sectionName, CancellationToken cancellationToken = default)
45
Task SaveSectionAsync(
DeploymentStateSection
section, CancellationToken cancellationToken = default);
54
Task DeleteSectionAsync(
DeploymentStateSection
section, CancellationToken cancellationToken = default);
Pipelines\Internal\DeploymentStateManagerBase.cs (7)
170
public Task<
DeploymentStateSection
> AcquireSectionAsync(string sectionName, CancellationToken cancellationToken = default) =>
174
public Task<
DeploymentStateSection
> AcquireCurrentSectionAsync(string sectionName, CancellationToken cancellationToken = default) =>
177
private async Task<
DeploymentStateSection
> AcquireSectionAsync(string sectionName, bool includeLegacyState, CancellationToken cancellationToken)
201
var
section = new DeploymentStateSection(sectionName, data, metadata.Version);
245
public async Task SaveSectionAsync(
DeploymentStateSection
section, CancellationToken cancellationToken = default)
266
public async Task DeleteSectionAsync(
DeploymentStateSection
section, CancellationToken cancellationToken = default)
286
private async Task EnsureStateAndSectionAsync(
DeploymentStateSection
section, CancellationToken cancellationToken)
Aspire.Hosting.Azure (40)
AzureEnvironmentResource.cs (1)
245
var
azureStateSection = await deploymentStateManager.AcquireSectionAsync("Azure", context.CancellationToken).ConfigureAwait(false);
AzureProvisioningController.cs (19)
1258
var
section = await deploymentStateManager.AcquireSectionAsync(sectionName, cancellationToken).ConfigureAwait(false);
1925
var
section = await deploymentStateManager.AcquireSectionAsync($"Azure:Deployments:{bicepResource.Name}", cancellationToken).ConfigureAwait(false);
1950
var
section = await deploymentStateManager.AcquireSectionAsync("Azure", cancellationToken).ConfigureAwait(false);
2627
var
section = await deploymentStateManager.AcquireSectionAsync($"Azure:Deployments:{resource.Name}", cancellationToken).ConfigureAwait(false);
2870
var
section = await deploymentStateManager.AcquireSectionAsync($"Azure:Deployments:{bicepResource.Name}", cancellationToken).ConfigureAwait(false);
2889
var
section = await deploymentStateManager.AcquireSectionAsync($"Azure:Deployments:{resourceName}", cancellationToken).ConfigureAwait(false);
2902
var
section = await deploymentStateManager.AcquireSectionAsync($"Azure:Deployments:{resourceName}", cancellationToken).ConfigureAwait(false);
2928
var
section = await deploymentStateManager.AcquireSectionAsync($"Azure:Deployments:{bicepResource.Name}", cancellationToken).ConfigureAwait(false);
2965
var
section = await deploymentStateManager.AcquireSectionAsync(sectionName, cancellationToken).ConfigureAwait(false);
3049
var
section = await deploymentStateManager.AcquireSectionAsync($"Azure:Deployments:{resource.Name}", cancellationToken).ConfigureAwait(false);
3217
private static string? TryGetCachedDeploymentId(
DeploymentStateSection
section)
3220
private static bool IsActiveCachedDeployment(
DeploymentStateSection
section)
3274
private string? TryGetPreservedLocationOverride(AzureBicepResource resource,
DeploymentStateSection
section, string? environmentLocation)
3313
private static string? TryGetExplicitLocationOverride(
DeploymentStateSection
section)
3492
var
section = await deploymentStateManager.AcquireSectionAsync("Azure", cancellationToken).ConfigureAwait(false);
3518
var
section = await deploymentStateManager.AcquireSectionAsync($"Azure:Deployments:{resource.Name}", cancellationToken).ConfigureAwait(false);
3637
var
section = await deploymentStateManager.AcquireSectionAsync($"Azure:Deployments:{resource.Name}", cancellationToken).ConfigureAwait(false);
3712
var
section = await deploymentStateManager.AcquireSectionAsync($"Azure:Deployments:{resource.Name}", cancellationToken).ConfigureAwait(false);
3944
var
section = await deploymentStateManager.AcquireSectionAsync($"Azure:Deployments:{bicepResource.Name}").ConfigureAwait(false);
Provisioning\BicepUtilities.cs (1)
143
public static async ValueTask<string?> GetCurrentChecksumAsync(AzureBicepResource resource,
DeploymentStateSection
section, DistributedApplicationExecutionContext executionContext, ILogger logger, CancellationToken cancellationToken = default)
Provisioning\Internal\BaseProvisioningContextProvider.cs (3)
122
var
azureStateSection = await _deploymentStateManager.AcquireSectionAsync("Azure", cancellationToken).ConfigureAwait(false);
214
var
azureStateSection = await _deploymentStateManager.AcquireSectionAsync("Azure", cancellationToken).ConfigureAwait(false);
222
DeploymentStateSection
azureStateSection,
Provisioning\Internal\RunModeProvisioningContextProvider.cs (1)
233
var
azureSection = await _deploymentStateManager.AcquireSectionAsync("Azure", cancellationToken).ConfigureAwait(false);
Provisioning\Provisioners\BicepProvisioner.cs (15)
51
var
stateSection = await deploymentStateManager.AcquireSectionAsync($"Azure:Deployments:{resource.Name}", cancellationToken).ConfigureAwait(false);
173
var
stateSection = await deploymentStateManager.AcquireSectionAsync(sectionName, cancellationToken).ConfigureAwait(false);
348
DeploymentStateSection
stateSection,
391
DeploymentStateSection
stateSection,
436
private async Task PersistReconciledProvisioningStateAsync(
DeploymentStateSection
stateSection, string provisioningState, CancellationToken cancellationToken)
450
private async Task ClearCachedRunningDeploymentStateAsync(
DeploymentStateSection
stateSection, CancellationToken cancellationToken)
467
DeploymentStateSection
stateSection,
490
private static bool IsRunningCachedDeployment(
DeploymentStateSection
stateSection)
623
var
canceledStateSection = await deploymentStateManager.AcquireSectionAsync(sectionName, CancellationToken.None).ConfigureAwait(false);
674
DeploymentStateSection
? stateSection = null;
856
var
stateSection = await deploymentStateManager.AcquireSectionAsync(sectionName, cancellationToken).ConfigureAwait(false);
1318
DeploymentStateSection
stateSection,
1479
var
section = await deploymentStateManager.AcquireSectionAsync("Azure", cancellationToken).ConfigureAwait(false);
1489
private static string? GetStateValue(
DeploymentStateSection
section, string key) =>
1492
private static string GetConfiguredLocation(
DeploymentStateSection
section, string? fallbackLocation)
Aspire.Hosting.Azure.Kubernetes (5)
AzureKubernetesEnvironmentResource.AksPipeline.cs (2)
362
var
deploymentStateSection = await deploymentStateManager
774
var
azureState = await deploymentStateManager.AcquireSectionAsync("Azure", cancellationToken).ConfigureAwait(false);
AzureKubernetesEnvironmentResource.cs (3)
98
var
deploymentStateSection = await deploymentStateManager
167
var
environmentState = await deploymentStateManager
183
var
chartState = await deploymentStateManager
Aspire.Hosting.Azure.Kubernetes.Tests (5)
AzureKubernetesInfrastructureTests.cs (2)
363
var
chartStateAfterFirstDestroy = await stateManager.AcquireSectionAsync(
725
var
sentinelState = await stateManager.AcquireSectionAsync(
tests\Shared\InMemoryDeploymentStateManager.cs (3)
25
public Task<
DeploymentStateSection
> AcquireSectionAsync(string sectionName, CancellationToken cancellationToken = default)
35
public Task SaveSectionAsync(
DeploymentStateSection
section, CancellationToken cancellationToken = default)
42
public Task DeleteSectionAsync(
DeploymentStateSection
section, CancellationToken cancellationToken = default)
Aspire.Hosting.Azure.Sandboxes (25)
AzureSandboxContainerDeployment.cs (23)
257
var
stateSection = await deploymentStateManager.AcquireSectionAsync(GetStateSectionName(resource), context.CancellationToken).ConfigureAwait(false);
259
var
previousStateSection = CloneStateSection(stateSection);
1319
var
stateSection = await deploymentStateManager.AcquireSectionAsync(GetStateSectionName(resource), context.CancellationToken).ConfigureAwait(false);
1397
var
sandboxesSection = await deploymentStateManager.AcquireCurrentSectionAsync(SandboxStateParentSection, context.CancellationToken).ConfigureAwait(false);
1413
var
stateSection = await deploymentStateManager.AcquireSectionAsync(sectionName, context.CancellationToken).ConfigureAwait(false);
1588
DeploymentStateSection
stateSection,
1628
private static
DeploymentStateSection
CloneStateSection(
DeploymentStateSection
stateSection)
1868
private static string GetStateResourceName(
DeploymentStateSection
stateSection, string sectionName)
1926
DeploymentStateSection
stateSection,
1945
DeploymentStateSection
stateSection,
1962
DeploymentStateSection
stateSection,
1979
private static JsonObject? GetPendingLegacyDeploymentCleanup(
DeploymentStateSection
stateSection) =>
1983
DeploymentStateSection
stateSection,
2056
DeploymentStateSection
previousStateSection,
2092
DeploymentStateSection
stateSection,
2104
internal static void ValidateDeploymentScope(
DeploymentStateSection
stateSection, AzureDevComputeResourceScope scope)
2134
internal static bool HasRemoteDeploymentState(
DeploymentStateSection
stateSection) =>
2150
private static string? GetFirstStateUrl(
DeploymentStateSection
stateSection)
2168
private static IReadOnlySet<string> GetExcludedDeployIds(string deployId,
DeploymentStateSection
previousStateSection)
2183
private static IReadOnlySet<string> GetExcludedResourceIds(string id,
DeploymentStateSection
previousStateSection, string stateKey)
2198
private static IEnumerable<int> GetStatePorts(
DeploymentStateSection
stateSection)
2300
private static string GetRequiredStateValue(
DeploymentStateSection
section, string name)
AzureSandboxEndpointPropertyValueProvider.cs (2)
63
var
stateSection = await deploymentStateManager
117
private bool TryGetUrl(
DeploymentStateSection
stateSection, [NotNullWhen(true)] out string? url)
Aspire.Hosting.Azure.Tests (146)
AzureBicepProvisionerTests.cs (28)
40
var
cached = await deploymentState.AcquireSectionAsync("Azure:Deployments:registration");
51
var
azureState = await deploymentState.AcquireSectionAsync("Azure");
934
var
section = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage2", CancellationToken.None);
968
var
section = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage2", CancellationToken.None);
1004
var
azureSection = await deploymentStateManager.AcquireSectionAsync("Azure", CancellationToken.None);
1012
var
section = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage2", CancellationToken.None);
1055
var
azureSection = await deploymentStateManager.AcquireSectionAsync("Azure", CancellationToken.None);
1063
var
section = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage2", CancellationToken.None);
1097
var
section = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage2", CancellationToken.None);
1131
var
section = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage2", CancellationToken.None);
1180
var
section = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage2", CancellationToken.None);
1435
var
section = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage2", CancellationToken.None);
1468
var
section = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage2", CancellationToken.None);
1500
var
section = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage2", CancellationToken.None);
1534
var
section = await deploymentStateManager.AcquireSectionAsync($"Azure:Deployments:{resource.Name}");
1593
var
section = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage2", CancellationToken.None);
1694
var
section = await deploymentStateManager.AcquireSectionAsync($"Azure:Deployments:{resource.Name}");
1749
var
section = await deploymentStateManager.AcquireSectionAsync($"Azure:Deployments:{resource.Name}");
1775
var
section = await deploymentStateManager.AcquireSectionAsync($"Azure:Deployments:{resource.Name}");
1804
var
section = await deploymentStateManager.AcquireSectionAsync($"Azure:Deployments:{resource.Name}");
1830
var
section = await deploymentStateManager.AcquireSectionAsync($"Azure:Deployments:{resource.Name}");
1855
var
section = await deploymentStateManager.AcquireSectionAsync($"Azure:Deployments:{resource.Name}");
1888
var
section = await deploymentStateManager.AcquireSectionAsync($"Azure:Deployments:{resource.Name}");
1946
var
section = await deploymentStateManager.AcquireSectionAsync($"Azure:Deployments:{resource.Name}");
2046
public Task<
DeploymentStateSection
> AcquireSectionAsync(string sectionName, CancellationToken cancellationToken = default)
2051
public Task<
DeploymentStateSection
> AcquireCurrentSectionAsync(string sectionName, CancellationToken cancellationToken = default)
2054
public Task DeleteSectionAsync(
DeploymentStateSection
section, CancellationToken cancellationToken = default)
2059
public Task SaveSectionAsync(
DeploymentStateSection
section, CancellationToken cancellationToken = default)
AzureDeployerTests.cs (4)
1778
public Task<
DeploymentStateSection
> AcquireSectionAsync(string sectionName, CancellationToken cancellationToken = default)
1781
public Task<
DeploymentStateSection
> AcquireCurrentSectionAsync(string sectionName, CancellationToken cancellationToken = default)
1784
public Task DeleteSectionAsync(
DeploymentStateSection
section, CancellationToken cancellationToken = default) => Task.CompletedTask;
1786
public Task SaveSectionAsync(
DeploymentStateSection
section, CancellationToken cancellationToken = default) => Task.CompletedTask;
AzureEnvironmentResourceExtensionsTests.cs (80)
75
var
azure = await deploymentState.AcquireSectionAsync("Azure", cts.Token);
80
var
directoryState = await deploymentState.AcquireSectionAsync("Azure:Deployments:directory", cts.Token);
94
var
storageState = await deploymentState.AcquireSectionAsync("Azure:Deployments:storage", cts.Token);
320
var
saved = await deploymentState.AcquireSectionAsync("Azure", cts.Token);
614
var
azureSection = await deploymentStateManager.AcquireSectionAsync("Azure");
619
var
storageSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage");
885
var
storageSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage");
921
var
storageSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage");
1107
var
azureSection = await deploymentStateManager.AcquireSectionAsync("Azure");
1114
var
storageSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage");
1219
var
storageSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage");
1494
var
storageSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage");
1552
var
storageSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage");
1613
var
storageSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage");
1675
var
storageSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage");
1803
var
storageSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage");
1979
var
storageSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage");
2017
var
storageSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage");
2084
var
storageSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage");
2098
var
storage2Section = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage2");
2187
var
keyVaultSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:kv");
2259
var
storageSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage");
2338
var
storageSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage");
2405
var
storageSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage");
2409
var
storage2Section = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage2");
2483
var
storageSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage");
2487
var
storage2Section = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage2");
3121
var
storageSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage");
3168
var
storageSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage");
3226
var
bicepSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage-deployment");
3229
var
visibleSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage");
3255
var
azureSection = await deploymentStateManager.AcquireSectionAsync("Azure");
3261
var
storageSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage");
3327
var
storageSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage");
3394
var
storageSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage");
3453
var
storageSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage");
3519
var
storageSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage");
3583
var
storageSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage");
3648
var
storageSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage");
3701
var
azureSection = await deploymentStateManager.AcquireSectionAsync("Azure");
3708
var
storageSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage");
3712
var
storage2Section = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage2");
3779
var
azureSection = await deploymentStateManager.AcquireSectionAsync("Azure");
3826
var
azureSection = await deploymentStateManager.AcquireSectionAsync("Azure");
3875
var
azureSection = await deploymentStateManager.AcquireSectionAsync("Azure");
3921
var
azureSection = await deploymentStateManager.AcquireSectionAsync("Azure");
3927
var
storageSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage");
3981
var
azureSection = await deploymentStateManager.AcquireSectionAsync("Azure");
3987
var
storage2Section = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage2");
4022
var
azureSection = await deploymentStateManager.AcquireSectionAsync("Azure");
4028
var
storage2Section = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage2");
4067
var
azureSection = await deploymentStateManager.AcquireSectionAsync("Azure");
4100
var
storage2Section = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage2");
4127
var
storageSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage");
4229
var
keyVaultSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:kv3");
4309
var
keyVaultSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:kv3");
4633
var
azureSection = await deploymentStateManager.AcquireSectionAsync("Azure");
4641
var
storageSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage");
4682
var
azureSection = await deploymentStateManager.AcquireSectionAsync("Azure");
4688
var
storageSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage");
4730
var
azureSection = await deploymentStateManager.AcquireSectionAsync("Azure");
4736
var
storageSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage");
4746
var
storage2Section = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage2");
4790
var
azureSection = await deploymentStateManager.AcquireSectionAsync("Azure");
4796
var
storageSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage");
4829
var
azureSection = await deploymentStateManager.AcquireSectionAsync("Azure");
4836
var
storageSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage");
4888
var
storageSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage");
4929
var
azureSection = await deploymentStateManager.AcquireSectionAsync("Azure");
4935
var
storageSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage");
4977
var
azureSection = await deploymentStateManager.AcquireSectionAsync("Azure");
4983
var
storageSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage");
5114
var
storageSection = await deploymentStateManager.AcquireSectionAsync("Azure:Deployments:storage");
5704
public Task<
DeploymentStateSection
> AcquireSectionAsync(string sectionName, CancellationToken cancellationToken = default)
5716
public Task<
DeploymentStateSection
> AcquireCurrentSectionAsync(string sectionName, CancellationToken cancellationToken = default)
5719
public Task DeleteSectionAsync(
DeploymentStateSection
section, CancellationToken cancellationToken = default)
5729
public Task SaveSectionAsync(
DeploymentStateSection
section, CancellationToken cancellationToken = default)
5883
var
azureSection = await deploymentStateManager.AcquireSectionAsync("Azure", cancellationToken);
5896
var
azureSection = await deploymentStateManager.AcquireSectionAsync("Azure", cancellationToken);
6034
var
section = await deploymentStateManager.AcquireSectionAsync($"Azure:Deployments:{resource.Name}", cancellationToken).ConfigureAwait(false);
AzureSandboxesTests.cs (15)
786
var
ownerOnlyState = new DeploymentStateSection(
790
var
emptyState = new DeploymentStateSection(
802
var
state = new DeploymentStateSection(
868
var
state = new DeploymentStateSection(
904
var
state = new DeploymentStateSection(
971
var
previousState = new DeploymentStateSection(
1090
var
state = new DeploymentStateSection("sandbox", new JsonObject
1128
var
state = new DeploymentStateSection("sandbox", new JsonObject
1152
var
azureState = await stateManager.AcquireSectionAsync("Azure", TestContext.Current.CancellationToken);
2800
var
state = await stateManager.AcquireSectionAsync(
2933
var
state = await stateManager.AcquireSectionAsync(
3219
var
state = await stateManager.AcquireSectionAsync(
3627
public Task<
DeploymentStateSection
> AcquireSectionAsync(string sectionName, CancellationToken cancellationToken = default) => throw new NotSupportedException();
3628
public Task SaveSectionAsync(
DeploymentStateSection
section, CancellationToken cancellationToken = default) => throw new NotSupportedException();
3629
public Task DeleteSectionAsync(
DeploymentStateSection
section, CancellationToken cancellationToken = default) => throw new NotSupportedException();
BicepUtilitiesTests.cs (7)
57
var
cached = await deploymentState.AcquireSectionAsync("Azure:Deployments:registration");
63
var
azureState = await deploymentState.AcquireSectionAsync("Azure");
527
var
stateSection = new DeploymentStateSection("test", [], 0);
540
var
stateSection = new DeploymentStateSection("test", new JsonObject
562
var
stateSection = new DeploymentStateSection("test", new JsonObject
587
var
stateSection = new DeploymentStateSection("test", new JsonObject
624
var
stateSection = new DeploymentStateSection("test", new JsonObject
ProvisioningContextProviderTests.cs (3)
51
var
saved = await deploymentState.AcquireSectionAsync("Azure", cts.Token);
175
var
saved = await deploymentState.AcquireSectionAsync("Azure", cts.Token);
327
var
azureSection = await deploymentStateManager.AcquireSectionAsync("Azure", CancellationToken.None);
ProvisioningContextTests.cs (2)
202
var
azureSection = await manager.AcquireSectionAsync("Azure");
206
var
loadedSection = await manager.AcquireSectionAsync("Azure");
ProvisioningTestHelpers.cs (4)
1052
public Task<
DeploymentStateSection
> AcquireSectionAsync(string sectionName, CancellationToken cancellationToken = default)
1060
public Task<
DeploymentStateSection
> AcquireCurrentSectionAsync(string sectionName, CancellationToken cancellationToken = default)
1063
public Task DeleteSectionAsync(
DeploymentStateSection
section, CancellationToken cancellationToken = default)
1068
public Task SaveSectionAsync(
DeploymentStateSection
section, CancellationToken cancellationToken = default)
tests\Shared\InMemoryDeploymentStateManager.cs (3)
25
public Task<
DeploymentStateSection
> AcquireSectionAsync(string sectionName, CancellationToken cancellationToken = default)
35
public Task SaveSectionAsync(
DeploymentStateSection
section, CancellationToken cancellationToken = default)
42
public Task DeleteSectionAsync(
DeploymentStateSection
section, CancellationToken cancellationToken = default)
Aspire.Hosting.Docker (2)
DockerComposeEnvironmentResource.cs (2)
144
var
stateSection = await deploymentStateManager.AcquireSectionAsync($"DockerCompose:{Name}", ctx.CancellationToken).ConfigureAwait(false);
452
var
stateSection = await deploymentStateManager.AcquireSectionAsync($"DockerCompose:{Name}", context.CancellationToken).ConfigureAwait(false);
Aspire.Hosting.Docker.Tests (4)
DockerComposeTests.cs (1)
1053
var
stateSection = await stateManager.AcquireSectionAsync("DockerCompose:env");
tests\Shared\InMemoryDeploymentStateManager.cs (3)
25
public Task<
DeploymentStateSection
> AcquireSectionAsync(string sectionName, CancellationToken cancellationToken = default)
35
public Task SaveSectionAsync(
DeploymentStateSection
section, CancellationToken cancellationToken = default)
42
public Task DeleteSectionAsync(
DeploymentStateSection
section, CancellationToken cancellationToken = default)
Aspire.Hosting.Kubernetes (4)
Deployment\HelmDeploymentEngine.cs (2)
200
var
stateSection = await deploymentStateManager.AcquireSectionAsync($"Helm:{environment.Name}", ctx.CancellationToken).ConfigureAwait(false);
487
var
stateSection = await deploymentStateManager.AcquireSectionAsync($"Helm:{environment.Name}", context.CancellationToken).ConfigureAwait(false);
KubernetesHelmChartExtensions.cs (2)
367
var
stateSection = await deploymentStateManager
399
var
stateSection = await deploymentStateManager
Aspire.Hosting.Kubernetes.Tests (6)
KubernetesDeployTests.cs (3)
1992
var
stateSection = await stateManager.AcquireSectionAsync("Helm:env");
2038
var
stateSection = await stateManager.AcquireSectionAsync("Helm:env");
2091
var
stateSection = await stateManager.AcquireSectionAsync("HelmChart:env:podinfo");
tests\Shared\InMemoryDeploymentStateManager.cs (3)
25
public Task<
DeploymentStateSection
> AcquireSectionAsync(string sectionName, CancellationToken cancellationToken = default)
35
public Task SaveSectionAsync(
DeploymentStateSection
section, CancellationToken cancellationToken = default)
42
public Task DeleteSectionAsync(
DeploymentStateSection
section, CancellationToken cancellationToken = default)
Aspire.Hosting.Tests (147)
DistributedApplicationBuilderTests.cs (2)
669
var
section = await manager.AcquireSectionAsync("Resource");
715
var
section = await manager.AcquireSectionAsync("Resource");
Orchestrator\ApplicationOrchestratorTests.cs (4)
1213
public Task<
DeploymentStateSection
> AcquireSectionAsync(string sectionName, CancellationToken cancellationToken = default)
1218
public Task<
DeploymentStateSection
> AcquireCurrentSectionAsync(string sectionName, CancellationToken cancellationToken = default)
1221
public Task SaveSectionAsync(
DeploymentStateSection
section, CancellationToken cancellationToken = default)
1228
public Task DeleteSectionAsync(
DeploymentStateSection
section, CancellationToken cancellationToken = default)
Orchestrator\ParameterProcessorTests.cs (13)
1135
var
section = await deploymentStateManager.AcquireSectionAsync(parameter.ConfigurationKey).DefaultTimeout();
1206
var
section = await deploymentStateManager.AcquireSectionAsync(parameter.ConfigurationKey).DefaultTimeout();
1606
public Task<
DeploymentStateSection
> AcquireSectionAsync(string sectionName, CancellationToken cancellationToken = default)
1611
public Task<
DeploymentStateSection
> AcquireCurrentSectionAsync(string sectionName, CancellationToken cancellationToken = default)
1614
public Task SaveSectionAsync(
DeploymentStateSection
section, CancellationToken cancellationToken = default)
1621
public Task DeleteSectionAsync(
DeploymentStateSection
section, CancellationToken cancellationToken = default)
1835
var
section = await capturingStateManager.AcquireSectionAsync($"Parameters:{parameter.Name}").DefaultTimeout();
2090
var
section = await stateManager.AcquireSectionAsync(configurationKey).DefaultTimeout();
2396
var
section = await capturingStateManager.AcquireSectionAsync($"Parameters:{parameter.Name}").DefaultTimeout();
2424
public Task<
DeploymentStateSection
> AcquireSectionAsync(string sectionName, CancellationToken cancellationToken = default)
2436
public Task<
DeploymentStateSection
> AcquireCurrentSectionAsync(string sectionName, CancellationToken cancellationToken = default)
2439
public async Task SaveSectionAsync(
DeploymentStateSection
section, CancellationToken cancellationToken = default)
2460
public Task DeleteSectionAsync(
DeploymentStateSection
section, CancellationToken cancellationToken = default)
Publishing\DeploymentStateManagerTests.cs (128)
25
var
section = await stateManager.AcquireSectionAsync("Parameters");
39
var
section1 = await stateManager.AcquireSectionAsync("Parameters");
45
var
section2 = await stateManager.AcquireSectionAsync("Parameters");
56
var
section = await stateManager.AcquireSectionAsync("Parameters");
62
var
restartedSection = await restartedStateManager.AcquireSectionAsync("Parameters");
73
DeploymentStateSection
oldSection;
74
var
section1 = await stateManager.AcquireSectionAsync("Parameters");
84
var
section2 = await stateManager.AcquireSectionAsync("Parameters");
102
var
parametersSection = await stateManager.AcquireSectionAsync("Parameters");
103
var
azureSection = await stateManager.AcquireSectionAsync("Azure");
112
var
parametersCheck = await stateManager.AcquireSectionAsync("Parameters");
113
var
azureCheck = await stateManager.AcquireSectionAsync("Azure");
133
var
section = await stateManager.AcquireSectionAsync($"Section{sectionIndex}");
145
var
section = await verifyManager.AcquireSectionAsync($"Section{i}");
155
var
section1 = await stateManager.AcquireSectionAsync("Parameters");
161
var
section2 = await stateManager.AcquireSectionAsync("Parameters");
162
var
section3 = await stateManager.AcquireSectionAsync("Azure");
176
var
section1 = await stateManager.AcquireSectionAsync("Parameters");
183
var
section2 = await stateManager2.AcquireSectionAsync("Parameters");
196
var
section3 = await stateManager3.AcquireSectionAsync("Parameters");
213
var
section2 = await stateManager.AcquireSectionAsync("Parameters");
232
var
parametersSection = await stateManager.AcquireSectionAsync("Parameters");
233
var
azureSection = await stateManager.AcquireSectionAsync("Azure");
235
var
restartedParametersSection = await restartedStateManager.AcquireSectionAsync("Parameters");
249
var
section = await stateManager.AcquireSectionAsync("TestParent:TestChild:TestGrandchild");
254
var
retrievedSection = await stateManager.AcquireSectionAsync("TestParent:TestChild:TestGrandchild");
266
var
section = await stateManager.AcquireSectionAsync("Parent:Child:Grandchild");
272
var
verifySection = await verifyManager.AcquireSectionAsync("Parent:Child:Grandchild");
282
var
section1 = await stateManager.AcquireSectionAsync("Root:Branch1:Leaf");
283
var
section2 = await stateManager.AcquireSectionAsync("Root:Branch2:Leaf");
291
var
verify1 = await stateManager.AcquireSectionAsync("Root:Branch1:Leaf");
292
var
verify2 = await stateManager.AcquireSectionAsync("Root:Branch2:Leaf");
303
var
section = await stateManager.AcquireSectionAsync("Root:Branch1:Leaf");
309
var
verify = await stateManager.AcquireSectionAsync("Root:Branch1:Leaf");
320
var
section1 = await stateManager.AcquireSectionAsync("Parent:Child:Grandchild");
326
var
oldSection = new DeploymentStateSection(section1.SectionName, section1.Data, oldVersion);
329
var
section2 = await stateManager.AcquireSectionAsync("Parent:Child:Grandchild");
345
var
section = await stateManager.AcquireSectionAsync("Nonexistent:Path:Here");
359
var
topLevel = await stateManager.AcquireSectionAsync("TopLevel");
360
var
nested = await stateManager.AcquireSectionAsync("Parent:Child");
368
var
verifyTop = await stateManager.AcquireSectionAsync("TopLevel");
369
var
verifyNested = await stateManager.AcquireSectionAsync("Parent:Child");
381
var
section = await stateManager.AcquireSectionAsync("PermTest");
472
var
legacySection = await legacyStateManager.AcquireSectionAsync("Migration");
477
var
migratedSection = await migratingStateManager.AcquireSectionAsync("Migration");
489
var
currentSection = await currentStateManager.AcquireSectionAsync("Migration");
509
var
legacySection = await legacyStateManager.AcquireSectionAsync("Legacy");
513
var
migratedSection = await migratingStateManager.AcquireSectionAsync("Legacy");
525
var
sameManagerLegacySection = await migratingStateManager.AcquireSectionAsync("Legacy");
530
var
legacyAfterRestart = await restartedStateManager.AcquireSectionAsync("Legacy");
531
var
replacementAfterRestart = await restartedStateManager.AcquireSectionAsync("Replacement");
548
var
section = await stateManager.AcquireSectionAsync("Parameters");
555
var
restartedSection = await restartedStateManager.AcquireSectionAsync("Parameters");
565
var
legacySection = await legacyStateManager.AcquireSectionAsync("Parameters");
570
var
section = await stateManager.AcquireSectionAsync("Parameters");
593
var
parameterSection = await migratingStateManager.AcquireSectionAsync("Parameters:secret");
620
var
section = await stateManager.AcquireSectionAsync("Parameters:secret");
626
var
restartedSection = await restartedStateManager.AcquireSectionAsync("Parameters:secret");
643
var
initialSection = await initialStateManager.AcquireSectionAsync("Parameters:secret");
649
var
staleSection = await staleStateManager.AcquireSectionAsync("Parameters:secret");
650
var
updatingSection = await updatingStateManager.AcquireSectionAsync("Parameters:secret");
657
var
restartedSection = await restartedStateManager.AcquireSectionAsync("Parameters:secret");
674
var
initialSection = await initialStateManager.AcquireSectionAsync("Settings");
680
var
staleObjectSection = await staleObjectManager.AcquireSectionAsync("Settings");
681
var
scalarSection = await scalarManager.AcquireSectionAsync("Settings");
689
var
restartedSection = await restartedStateManager.AcquireSectionAsync("Settings");
708
var
firstSection = await firstStateManager.AcquireSectionAsync("Settings");
709
var
secondSection = await secondStateManager.AcquireSectionAsync("Settings");
717
var
restartedSection = await restartedStateManager.AcquireSectionAsync("Settings");
736
var
firstLegacySection = await legacyStateManager.AcquireSectionAsync("Azure:Sandboxes:first");
739
var
secondLegacySection = await legacyStateManager.AcquireSectionAsync("Azure:Sandboxes:second");
744
var
currentParentSection = await firstStateManager.AcquireCurrentSectionAsync("Azure:Sandboxes");
747
var
firstSection = await firstStateManager.AcquireSectionAsync("Azure:Sandboxes:first");
752
var
migratedFirstSection = await firstCanonicalStateManager.AcquireSectionAsync("Azure:Sandboxes:first");
753
var
inheritedSecondSection = await firstCanonicalStateManager.AcquireSectionAsync("Azure:Sandboxes:second");
758
var
migratedParentSection = await firstStateManager.AcquireSectionAsync("Azure:Sandboxes");
760
var
migratedCurrentParentSection = await firstStateManager.AcquireCurrentSectionAsync("Azure:Sandboxes");
764
var
restartedFirstSection = await restartedFirstStateManager.AcquireSectionAsync("Azure:Sandboxes:first");
765
var
restartedSecondSection = await restartedFirstStateManager.AcquireSectionAsync("Azure:Sandboxes:second");
766
var
restartedCurrentParentSection = await restartedFirstStateManager.AcquireCurrentSectionAsync("Azure:Sandboxes");
772
var
secondSection = await secondStateManager.AcquireSectionAsync("Azure:Sandboxes:second");
781
var
clearedFirstLegacySection = await legacyAfterClearManager.AcquireSectionAsync("Azure:Sandboxes:first");
782
var
preservedSecondLegacySection = await legacyAfterClearManager.AcquireSectionAsync("Azure:Sandboxes:second");
793
var
legacyAzureSection = await legacyStateManager.AcquireSectionAsync("Azure");
803
var
azureSection = await migratingStateManager.AcquireSectionAsync("Azure");
807
var
currentAzureSection = await migratingStateManager.AcquireCurrentSectionAsync("Azure");
812
var
restartedAzureSection = await restartedStateManager.AcquireSectionAsync("Azure");
829
var
legacyAzureSection = await legacyStateManager.AcquireSectionAsync("Azure");
837
var
azureSection = await migratingStateManager.AcquireSectionAsync("Azure");
840
var
newSandboxSection = await migratingStateManager.AcquireSectionAsync("Azure:Sandboxes:new");
845
var
restartedAzureSection = await restartedStateManager.AcquireSectionAsync("Azure");
870
var
legacySandboxesSection = await legacyStateManager.AcquireSectionAsync("Azure:Sandboxes");
882
var
firstSandboxSection = await migratingStateManager.AcquireSectionAsync("Azure:Sandboxes:first");
885
var
newChildSection = await migratingStateManager.AcquireSectionAsync("Azure:Sandboxes:first:new");
890
var
restartedSandboxesSection = await restartedStateManager.AcquireSectionAsync("Azure:Sandboxes");
914
var
firstLegacySection = await legacyStateManager.AcquireSectionAsync("Azure:Sandboxes:first");
917
var
secondLegacySection = await legacyStateManager.AcquireSectionAsync("Azure:Sandboxes:second");
923
var
firstSection = await firstStateManager.AcquireSectionAsync("Azure:Sandboxes:first");
924
var
secondSection = await secondStateManager.AcquireSectionAsync("Azure:Sandboxes:second");
933
var
restartedFirstSection = await restartedStateManager.AcquireSectionAsync("Azure:Sandboxes:first");
934
var
restartedSecondSection = await restartedStateManager.AcquireSectionAsync("Azure:Sandboxes:second");
940
var
currentParentSection = await restartedStateManager.AcquireCurrentSectionAsync("Azure:Sandboxes");
950
var
legacyAzureSection = await legacyStateManager.AcquireSectionAsync("Azure");
957
var
firstAzureSection = await firstStateManager.AcquireSectionAsync("Azure");
958
var
secondAzureSection = await secondStateManager.AcquireSectionAsync("Azure");
967
var
restartedAzureSection = await restartedStateManager.AcquireSectionAsync("Azure");
971
var
currentAzureSection = await restartedStateManager.AcquireCurrentSectionAsync("Azure");
982
var
legacySection = await legacyStateManager.AcquireSectionAsync("Azure");
999
var
suppressedLegacySection = await restartedCurrentStateManager.AcquireSectionAsync("Azure");
1002
var
preservedLegacySection = await preservedLegacyStateManager.AcquireSectionAsync("Azure");
1012
var
currentSection = await currentStateManager.AcquireSectionAsync("Azure");
1031
var
migratedSection = await migratingStateManager.AcquireSectionAsync("Azure");
1043
var
currentSection = await currentStateManager.AcquireSectionAsync("Azure");
1055
var
restartedSection = await restartedStateManager.AcquireSectionAsync("Azure");
1063
var
savedSection = await CreateFileDeploymentStateManager(currentSha).AcquireSectionAsync("Azure");
1073
var
section = await stateManager.AcquireSectionAsync("Azure");
1083
var
currentSection = await stateManager.AcquireCurrentSectionAsync("Azure");
1093
var
legacySection = await legacyStateManager.AcquireSectionAsync("Azure:Sandboxes:frontend");
1098
var
migratedSection = await migratingStateManager.AcquireSectionAsync("Azure:Sandboxes:frontend");
1103
var
restartedSection = await restartedStateManager.AcquireSectionAsync("Azure:Sandboxes:frontend");
1114
var
firstLegacySection = await legacyStateManager.AcquireSectionAsync("Azure:Sandboxes:first");
1117
var
secondLegacySection = await legacyStateManager.AcquireSectionAsync("Azure:Sandboxes:second");
1122
var
firstSection = await migratingStateManager.AcquireSectionAsync("Azure:Sandboxes:first");
1126
var
azureSection = await parentSavingStateManager.AcquireSectionAsync("Azure");
1149
var
firstLegacySection = await legacyStateManager.AcquireSectionAsync("Azure:Sandboxes:first");
1152
var
secondLegacySection = await legacyStateManager.AcquireSectionAsync("Azure:Sandboxes:second");
1158
var
firstSection = await firstStateManager.AcquireSectionAsync("Azure:Sandboxes:first");
1159
var
secondSection = await secondStateManager.AcquireSectionAsync("Azure:Sandboxes:second");