295 references to CancellationToken
Aspire.Hosting (30)
ApplicationModel\DotnetProgramPublishing.cs (3)
135
await containerImageBuilder.BuildImageAsync(resource, context.
CancellationToken
).ConfigureAwait(false);
146
context.
CancellationToken
).ConfigureAwait(false);
157
context.
CancellationToken
).ConfigureAwait(false);
ContainerResourceBuilderExtensions.cs (1)
70
ctx.
CancellationToken
).ConfigureAwait(false);
PipelineOutputDiffingExtensions.cs (3)
201
var snapshot = await snapshotter.CaptureAsync(GetOutputDirectory(context), context.
CancellationToken
).ConfigureAwait(false);
213
var after = await snapshotter.CaptureAsync(GetOutputDirectory(context), context.
CancellationToken
).ConfigureAwait(false);
215
var changes = await outputComparer.CompareAsync(before, after, context.
CancellationToken
).ConfigureAwait(false);
Pipelines\DistributedApplicationPipeline.cs (7)
54
await parameterProcessor.InitializeParametersAsync(context.Model, waitForResolution: true, context.
CancellationToken
).ConfigureAwait(false);
101
context.
CancellationToken
).ConfigureAwait(false);
111
await deploymentStateManager.ClearAllStateAsync(context.
CancellationToken
).ConfigureAwait(false);
163
var containerRuntime = await runtimeResolver.ResolveAsync(context.
CancellationToken
).ConfigureAwait(false);
165
await readiness.EnsureRunningAsync(containerRuntime, context.
CancellationToken
).ConfigureAwait(false);
199
context.
CancellationToken
).ConfigureAwait(false);
324
await deploymentStateManager.ClearAllStateAsync(context.
CancellationToken
).ConfigureAwait(false);
Pipelines\PipelineStepHelpers.cs (14)
36
context.
CancellationToken
).ConfigureAwait(false);
47
var registryEndpoint = await registry.Endpoint.GetValueAsync(context.
CancellationToken
).ConfigureAwait(false);
65
var targetTag = await cir.GetValueAsync(new ValueProviderContext { ExecutionContext = context.ExecutionContext }, context.
CancellationToken
).ConfigureAwait(false);
69
context.
CancellationToken
).ConfigureAwait(false);
86
var containerRuntime = await context.Services.GetRequiredService<IContainerRuntimeResolver>().ResolveAsync(context.
CancellationToken
).ConfigureAwait(false);
87
await containerRuntime.TagImageAsync(localImageName, targetTag, context.
CancellationToken
).ConfigureAwait(false);
92
context.
CancellationToken
).ConfigureAwait(false);
99
context.
CancellationToken
).ConfigureAwait(false);
107
var registryName = await registry.Name.GetValueAsync(context.
CancellationToken
).ConfigureAwait(false)
111
var targetTag = await cir.GetValueAsync(new ValueProviderContext { ExecutionContext = context.ExecutionContext }, context.
CancellationToken
).ConfigureAwait(false);
115
context.
CancellationToken
).ConfigureAwait(false);
127
await containerImageManager.PushImageAsync(resource, context.
CancellationToken
).ConfigureAwait(false);
132
context.
CancellationToken
).ConfigureAwait(false);
139
context.
CancellationToken
).ConfigureAwait(false);
Publishing\ManifestPublishingExtensions.cs (2)
66
var publishingContext = new ManifestPublishingContext(executionContext, manifestPath, jsonWriter, context.
CancellationToken
);
68
await publishingContext.WriteModel(context.Model, context.
CancellationToken
).ConfigureAwait(false);
Aspire.Hosting.Azure (27)
AzureBicepResource.cs (6)
344
.CreateTaskAsync(new MarkdownString($"Deploying **{resource.Name}**"), context.
CancellationToken
)
352
resource, context.
CancellationToken
).ConfigureAwait(false))
358
context.
CancellationToken
).ConfigureAwait(false);
363
resource, provisioningContext, context.
CancellationToken
)
369
context.
CancellationToken
).ConfigureAwait(false);
384
context.
CancellationToken
).ConfigureAwait(false);
AzureEnvironmentResource.cs (21)
84
await preparer.PrepareResourcesAsync(context.Model, context.
CancellationToken
).ConfigureAwait(false);
121
var provisioningContext = await provisioningContextProvider.CreateProvisioningContextAsync(ctx.
CancellationToken
).ConfigureAwait(false);
205
await provisioningContextProvider.RetrieveAzureProvisioningOptions(context.
CancellationToken
).ConfigureAwait(false);
223
await credential.GetTokenAsync(new TokenRequestContext([scope]), context.
CancellationToken
).ConfigureAwait(false);
230
context.
CancellationToken
).ConfigureAwait(false);
238
context.
CancellationToken
).ConfigureAwait(false);
248
var azureStateSection = await deploymentStateManager.AcquireSectionAsync("Azure", context.
CancellationToken
).ConfigureAwait(false);
258
context.
CancellationToken
).ConfigureAwait(false);
276
var (subscription, _) = await armClient.GetSubscriptionAndTenantAsync(context.
CancellationToken
).ConfigureAwait(false);
283
var rgResponse = await resourceGroups.GetAsync(resourceGroupName, context.
CancellationToken
).ConfigureAwait(false);
292
context.
CancellationToken
).ConfigureAwait(false);
302
context.
CancellationToken
).ConfigureAwait(false);
307
await foreach (var resource in resourceGroup.GetResourcesAsync(context.
CancellationToken
).ConfigureAwait(false))
317
context.
CancellationToken
).ConfigureAwait(false);
332
context.
CancellationToken
).ConfigureAwait(false);
342
context.
CancellationToken
).ConfigureAwait(false);
366
context.
CancellationToken
).ConfigureAwait(false);
378
context.
CancellationToken
).ConfigureAwait(false);
383
await resourceGroup.DeleteAsync(WaitUntil.Started, context.
CancellationToken
).ConfigureAwait(false);
393
context.
CancellationToken
).ConfigureAwait(false);
400
context.
CancellationToken
).ConfigureAwait(false);
Aspire.Hosting.Azure.AppContainers (5)
AzureContainerAppEnvironmentResource.cs (3)
174
var domainValue = await ContainerAppDomain.GetValueAsync(context.
CancellationToken
).ConfigureAwait(false);
183
context.
CancellationToken
).ConfigureAwait(false);
198
var cancellationToken = context.
CancellationToken
;
AzureContainerAppResource.cs (2)
51
var domainValue = await containerAppEnv.ContainerAppDomain.GetValueAsync(ctx.
CancellationToken
).ConfigureAwait(false);
52
var portalLink = await ContainerAppUrls.GetPortalLinkAsync(containerAppEnv, targetResource.Name.ToLowerInvariant(), ctx.
CancellationToken
).ConfigureAwait(false);
Aspire.Hosting.Azure.AppService (9)
AzureAppServiceEnvironmentResource.cs (6)
226
var cancellationToken = context.
CancellationToken
;
284
var dashboardUri = await DashboardUriReference.GetValueAsync(context.
CancellationToken
).ConfigureAwait(false);
294
context.
CancellationToken
).ConfigureAwait(false);
305
context.
CancellationToken
).ConfigureAwait(false);
346
context.
CancellationToken
).ConfigureAwait(false);
355
context.
CancellationToken
).ConfigureAwait(false);
AzureAppServiceWebSiteResource.cs (3)
56
await computerEnv.DeploymentSlotParameter.GetValueAsync(ctx.
CancellationToken
).ConfigureAwait(false);
62
var portalLink = await AppSvcUrls.GetPortalLinkAsync(computerEnv, websiteName, deploymentSlot, ctx.
CancellationToken
).ConfigureAwait(false);
115
var websiteSuffix = await computerEnv.WebSiteSuffix.GetValueAsync(context.
CancellationToken
).ConfigureAwait(false);
Aspire.Hosting.Azure.ContainerRegistry (6)
AzureContainerRegistryHelpers.cs (6)
26
var registryName = await registry.Name.GetValueAsync(context.
CancellationToken
).ConfigureAwait(false) ??
29
var registryEndpoint = await registry.Endpoint.GetValueAsync(context.
CancellationToken
).ConfigureAwait(false) ??
34
context.
CancellationToken
).ConfigureAwait(false);
49
context.
CancellationToken
).ConfigureAwait(false);
54
context.
CancellationToken
).ConfigureAwait(false);
60
context.
CancellationToken
).ConfigureAwait(false);
Aspire.Hosting.Azure.Kubernetes (13)
AzureKubernetesEnvironmentResource.AksPipeline.cs (13)
210
var resourceId = await Id.GetValueAsync(context.
CancellationToken
).ConfigureAwait(false);
231
context.
CancellationToken
).ConfigureAwait(false);
277
context.
CancellationToken
).ConfigureAwait(false);
301
await File.WriteAllTextAsync(kubeConfigPath, kubeConfigContent, context.
CancellationToken
).ConfigureAwait(false);
332
context.
CancellationToken
).ConfigureAwait(false);
338
context.
CancellationToken
).ConfigureAwait(false);
348
.AcquireSectionAsync($"Azure:Deployments:{Name}", context.
CancellationToken
)
466
context.
CancellationToken
).ConfigureAwait(false);
487
var subnetId = await ((IValueProvider)lb.SubnetIdReference).GetValueAsync(context.
CancellationToken
).ConfigureAwait(false);
505
context.
CancellationToken
).ConfigureAwait(false);
573
var result = await applyResultTask.WaitAsync(context.
CancellationToken
).ConfigureAwait(false);
598
context.
CancellationToken
).ConfigureAwait(false);
604
context.
CancellationToken
).ConfigureAwait(false);
Aspire.Hosting.Azure.Sandboxes (47)
AzureSandboxContainerDeployment.cs (46)
256
context.
CancellationToken
).ConfigureAwait(false);
257
var stateSection = await deploymentStateManager.AcquireSectionAsync(GetStateSectionName(resource), context.
CancellationToken
).ConfigureAwait(false);
281
await deploymentStateManager.SaveSectionAsync(stateSection, context.
CancellationToken
).ConfigureAwait(false);
299
var diskTask = await context.ReportingStep.CreateTaskAsync($"Creating sandbox disk image for {targetResource.Name}", context.
CancellationToken
).ConfigureAwait(false);
312
await diskTask.CompleteAsync($"Created sandbox disk image {diskImageId}", CompletionState.Completed, context.
CancellationToken
).ConfigureAwait(false);
326
var createTask = await context.ReportingStep.CreateTaskAsync($"Creating sandbox for {targetResource.Name}", context.
CancellationToken
).ConfigureAwait(false);
338
await createTask.CompleteAsync($"Created sandbox {sandboxId}", CompletionState.Completed, context.
CancellationToken
).ConfigureAwait(false);
343
var lifecycleTask = await context.ReportingStep.CreateTaskAsync($"Configuring lifecycle for {resource.Name}", context.
CancellationToken
).ConfigureAwait(false);
350
context.
CancellationToken
).ConfigureAwait(false);
351
await lifecycleTask.CompleteAsync("Lifecycle policy configured", CompletionState.Completed, context.
CancellationToken
).ConfigureAwait(false);
358
var exposeTask = await context.ReportingStep.CreateTaskAsync($"Exposing sandbox port {endpoint.TargetPort}", context.
CancellationToken
).ConfigureAwait(false);
376
await exposeTask.CompleteAsync(new MarkdownString($"Public URL: [{endpointUrl}]({endpointUrl})"), CompletionState.Completed, context.
CancellationToken
).ConfigureAwait(false);
411
await deploymentStateManager.SaveSectionAsync(stateSection, context.
CancellationToken
).ConfigureAwait(false);
477
await deploymentStateManager.SaveSectionAsync(stateSection, context.
CancellationToken
).ConfigureAwait(false);
650
context.
CancellationToken
).ConfigureAwait(false);
664
context.
CancellationToken
).ConfigureAwait(false);
712
await Task.Delay(TimeSpan.FromSeconds(2), context.
CancellationToken
).ConfigureAwait(false);
713
diskImage = await client.GetDiskImageAsync(scope, diskImage.Id, context.
CancellationToken
).ConfigureAwait(false);
768
context.
CancellationToken
);
946
context.
CancellationToken
).ConfigureAwait(false);
976
.GetValueAsync(new ValueProviderContext { ExecutionContext = context.ExecutionContext, Caller = resource.TargetResource }, context.
CancellationToken
)
995
context.
CancellationToken
).ConfigureAwait(false);
1070
var callbackContext = new CommandLineArgsCallbackContext(args, resource, context.
CancellationToken
)
1106
var result = await runtime.InspectImageConfigAsync(imageReference, context.
CancellationToken
).ConfigureAwait(false);
1134
return context.Services.GetRequiredService<IContainerRuntimeResolver>().ResolveAsync(context.
CancellationToken
);
1142
var callbackContext = new EnvironmentCallbackContext(context.ExecutionContext, resource, environmentVariables, context.
CancellationToken
)
1183
context.
CancellationToken
).ConfigureAwait(false) ?? string.Empty;
1208
.GetValueAsync(new ValueProviderContext { ExecutionContext = context.ExecutionContext, Caller = resource }, context.
CancellationToken
)
1318
context.
CancellationToken
).ConfigureAwait(false);
1319
var stateSection = await deploymentStateManager.AcquireSectionAsync(GetStateSectionName(resource), context.
CancellationToken
).ConfigureAwait(false);
1334
context.
CancellationToken
).ConfigureAwait(false);
1352
context.
CancellationToken
).ConfigureAwait(false);
1388
await deploymentStateManager.DeleteSectionAsync(stateSection, context.
CancellationToken
).ConfigureAwait(false);
1397
var sandboxesSection = await deploymentStateManager.AcquireCurrentSectionAsync(SandboxStateParentSection, context.
CancellationToken
).ConfigureAwait(false);
1412
context.
CancellationToken
).ConfigureAwait(false);
1413
var stateSection = await deploymentStateManager.AcquireSectionAsync(sectionName, context.
CancellationToken
).ConfigureAwait(false);
1416
await deploymentStateManager.DeleteSectionAsync(stateSection, context.
CancellationToken
).ConfigureAwait(false);
1427
var cleanupTask = await context.ReportingStep.CreateTaskAsync($"Deleting stale sandbox deployment {sectionName}", context.
CancellationToken
).ConfigureAwait(false);
1465
await deploymentStateManager.DeleteSectionAsync(stateSection, context.
CancellationToken
).ConfigureAwait(false);
1466
await cleanupTask.CompleteAsync($"Deleted stale sandbox deployment {sectionName}", CompletionState.Completed, context.
CancellationToken
).ConfigureAwait(false);
1599
catch (Exception ex) when (ex is not OperationCanceledException || !context.
CancellationToken
.IsCancellationRequested)
1612
catch (Exception ex) when (ex is not OperationCanceledException || !context.
CancellationToken
.IsCancellationRequested)
1652
sandboxes = await client.ListSandboxesAsync(scope, labelSelector, context.
CancellationToken
).ConfigureAwait(false);
1674
diskImages = await client.ListDiskImagesAsync(scope, labelSelector, context.
CancellationToken
).ConfigureAwait(false);
2228
var effectiveCancellationToken = cancellationToken ?? context.
CancellationToken
;
2288
var effectiveCancellationToken = cancellationToken ?? context.
CancellationToken
;
AzureSandboxGroupResource.cs (1)
178
context.
CancellationToken
).ConfigureAwait(false);
Aspire.Hosting.Azure.Tests (1)
AzureDeployerTests.cs (1)
184
await credential.GetTokenAsync(new TokenRequestContext([AcrLoginService.AcrScope]), context.
CancellationToken
);
Aspire.Hosting.Docker (26)
DockerComposeEnvironmentResource.cs (24)
149
var stateSection = await deploymentStateManager.AcquireSectionAsync($"DockerCompose:{Name}", ctx.
CancellationToken
).ConfigureAwait(false);
157
ctx.
CancellationToken
).ConfigureAwait(false);
169
var runtime = await ctx.Services.GetRequiredService<IContainerRuntimeResolver>().ResolveAsync(ctx.
CancellationToken
).ConfigureAwait(false);
179
ctx.
CancellationToken
).ConfigureAwait(false);
182
await runtime.ComposeDownAsync(composeContext, ctx.
CancellationToken
).ConfigureAwait(false);
186
ctx.
CancellationToken
).ConfigureAwait(false);
192
await deploymentStateManager.DeleteSectionAsync(stateSection, ctx.
CancellationToken
).ConfigureAwait(false);
287
context.
CancellationToken
);
309
var cancellationToken = context.
CancellationToken
;
443
var runtime = await context.Services.GetRequiredService<IContainerRuntimeResolver>().ResolveAsync(context.
CancellationToken
).ConfigureAwait(false);
447
context.
CancellationToken
).ConfigureAwait(false);
454
await runtime.ComposeUpAsync(composeContext, context.
CancellationToken
).ConfigureAwait(false);
458
var stateSection = await deploymentStateManager.AcquireSectionAsync($"DockerCompose:{Name}", context.
CancellationToken
).ConfigureAwait(false);
462
await deploymentStateManager.SaveSectionAsync(stateSection, context.
CancellationToken
).ConfigureAwait(false);
467
context.
CancellationToken
).ConfigureAwait(false);
471
await deployTask.CompleteAsync($"Compose deployment failed ({runtime.Name}): {ex.Message}", CompletionState.CompletedWithError, context.
CancellationToken
).ConfigureAwait(false);
489
var runtime = await context.Services.GetRequiredService<IContainerRuntimeResolver>().ResolveAsync(context.
CancellationToken
).ConfigureAwait(false);
493
context.
CancellationToken
).ConfigureAwait(false);
500
await runtime.ComposeDownAsync(composeContext, context.
CancellationToken
).ConfigureAwait(false);
505
context.
CancellationToken
).ConfigureAwait(false);
509
await deployTask.CompleteAsync($"Compose shutdown failed ({runtime.Name}): {ex.Message}", CompletionState.CompletedWithError, context.
CancellationToken
).ConfigureAwait(false);
540
context.
CancellationToken
).ConfigureAwait(false);
571
defaultValue ??= await parameter.GetValueAsync(context.
CancellationToken
).ConfigureAwait(false);
576
defaultValue = await vp.GetValueAsync(context.
CancellationToken
).ConfigureAwait(false);
DockerComposeServiceResource.cs (2)
342
var runtime = await context.Services.GetRequiredService<IContainerRuntimeResolver>().ResolveAsync(context.
CancellationToken
).ConfigureAwait(false);
344
var services = await runtime.ComposeListServicesAsync(composeContext, context.
CancellationToken
).ConfigureAwait(false);
Aspire.Hosting.EntityFrameworkCore (1)
EFResourceBuilderExtensions.cs (1)
449
stepContext.
CancellationToken
,
Aspire.Hosting.Foundry (10)
HostedAgent\AzureHostedAgentResource.cs (6)
108
var imageName = await ((IValueProvider)Image).GetValueAsync(context.
CancellationToken
).ConfigureAwait(false);
117
EnvironmentVariables = await GetResolvedEnvironmentVariablesAsync(context.ExecutionContext, this, context.Logger, context.
CancellationToken
).ConfigureAwait(false),
162
var projectEndpoint = await project.Endpoint.GetValueAsync(context.
CancellationToken
).ConfigureAwait(false);
169
var version = await CreateAgentVersionAsync(projectClient.AgentAdministrationClient, def, context.
CancellationToken
).ConfigureAwait(false);
254
var foundryResourceId = await project.Parent.Id.GetValueAsync(context.
CancellationToken
).ConfigureAwait(false);
281
context.
CancellationToken
).ConfigureAwait(false);
PromptAgent\AzurePromptAgentResource.cs (2)
88
var version = await DeployAsync(Project, stepCtx, logRetry: null, stepCtx.
CancellationToken
).ConfigureAwait(false);
306
var linkedCts = CancellationTokenSource.CreateLinkedTokenSource(context.
CancellationToken
, lifetime.ApplicationStopping);
Toolbox\FoundryToolboxResource.cs (2)
81
stepContext.
CancellationToken
).ConfigureAwait(false);
307
context.
CancellationToken
,
Aspire.Hosting.Kubernetes (66)
CertManagerExtensions.cs (7)
425
var manifest = await BuildClusterIssuerManifestAsync(context.Model, certManager, issuer, context.Logger, context.
CancellationToken
)
430
var resourceVersion = await GetExternalAccountBindingSecretResourceVersionAsync(issuer, context.
CancellationToken
).ConfigureAwait(false);
431
var secretSpec = await BuildExternalAccountBindingSecretApplySpecAsync(issuer, resourceVersion, context.
CancellationToken
).ConfigureAwait(false);
435
var result = await secretResult.WaitAsync(context.
CancellationToken
).ConfigureAwait(false);
468
var result = await resultTask.WaitAsync(context.
CancellationToken
).ConfigureAwait(false);
526
var result = await resultTask.WaitAsync(context.
CancellationToken
).ConfigureAwait(false);
581
var result = await deleteResult.WaitAsync(context.
CancellationToken
).ConfigureAwait(false);
Deployment\HelmDeploymentEngine.cs (23)
50
var resolvedRelease = await releaseAnnotation.ReleaseName.GetValueAsync(context.
CancellationToken
).ConfigureAwait(false);
74
var resolvedNs = await nsAnnotation.Namespace.GetValueAsync(context.
CancellationToken
).ConfigureAwait(false);
141
await HelmVersionValidator.EnsureMinimumVersionAsync(helmRunner, ctx.
CancellationToken
).ConfigureAwait(false);
200
var stateSection = await deploymentStateManager.AcquireSectionAsync($"Helm:{environment.Name}", ctx.
CancellationToken
).ConfigureAwait(false);
209
ctx.
CancellationToken
).ConfigureAwait(false);
223
await deploymentStateManager.DeleteSectionAsync(stateSection, ctx.
CancellationToken
).ConfigureAwait(false);
256
context.
CancellationToken
).ConfigureAwait(false);
266
await ResolveAndWriteDeployValuesAsync(outputPath, environment, context.
CancellationToken
).ConfigureAwait(false);
271
context.
CancellationToken
).ConfigureAwait(false);
278
context.
CancellationToken
).ConfigureAwait(false);
424
context.
CancellationToken
).ConfigureAwait(false);
472
cancellationToken: context.
CancellationToken
).ConfigureAwait(false);
487
var stateSection = await deploymentStateManager.AcquireSectionAsync($"Helm:{environment.Name}", context.
CancellationToken
).ConfigureAwait(false);
490
await deploymentStateManager.SaveSectionAsync(stateSection, context.
CancellationToken
).ConfigureAwait(false);
495
context.
CancellationToken
).ConfigureAwait(false);
503
context.
CancellationToken
).ConfigureAwait(false);
525
var endpoints = await GetServiceEndpointsAsync(computeResource.Name.ToServiceName(), @namespace, environment.KubeConfigPath, context.Logger, context.
CancellationToken
).ConfigureAwait(false);
601
context.
CancellationToken
).ConfigureAwait(false);
612
context.
CancellationToken
).ConfigureAwait(false);
629
cancellationToken: context.
CancellationToken
).ConfigureAwait(false);
640
context.
CancellationToken
).ConfigureAwait(false);
648
context.
CancellationToken
).ConfigureAwait(false);
692
context.
CancellationToken
).ConfigureAwait(false);
KubernetesEnvironmentResource.cs (29)
420
context.
CancellationToken
);
441
var cancellationToken = context.
CancellationToken
;
532
await ProcessIngressResources(appModel, deploymentTargets, logger, context.
CancellationToken
).ConfigureAwait(false);
535
await ProcessGatewayResources(appModel, deploymentTargets, logger, context.
CancellationToken
).ConfigureAwait(false);
538
await ProcessPersistentVolumeResources(appModel, context.
CancellationToken
).ConfigureAwait(false);
1450
var resolvedNs = await nsAnnotation.Namespace.GetValueAsync(context.
CancellationToken
).ConfigureAwait(false);
1460
var secretName = await ResolveExpressionAtDeployTimeAsync(secretNameExpr, context.
CancellationToken
).ConfigureAwait(false);
1533
await File.WriteAllTextAsync(patchFilePath, patchJson, context.
CancellationToken
).ConfigureAwait(false);
1561
var patchExitResult = await patchResult.WaitAsync(context.
CancellationToken
).ConfigureAwait(false);
1621
var result = await checkResult.WaitAsync(context.
CancellationToken
).ConfigureAwait(false);
1646
await File.WriteAllTextAsync(certPath, certPem, context.
CancellationToken
).ConfigureAwait(false);
1647
await File.WriteAllTextAsync(keyPath, keyPem, context.
CancellationToken
).ConfigureAwait(false);
1666
var createExitResult = await createResult.WaitAsync(context.
CancellationToken
).ConfigureAwait(false);
1765
}, context.
CancellationToken
).ConfigureAwait(false);
1846
var result = await getResult.WaitAsync(context.
CancellationToken
).ConfigureAwait(false);
1904
var resolvedNs = await nsAnnotation.Namespace.GetValueAsync(context.
CancellationToken
).ConfigureAwait(false);
1934
getExit = (await getResult.WaitAsync(context.
CancellationToken
).ConfigureAwait(false)).ExitCode;
1979
await File.WriteAllTextAsync(patchFilePath, patchJson, context.
CancellationToken
).ConfigureAwait(false);
1998
var patchExit = (await patchResult.WaitAsync(context.
CancellationToken
).ConfigureAwait(false)).ExitCode;
2109
var exitResult = await getResult.WaitAsync(context.
CancellationToken
).ConfigureAwait(false);
2160
await File.WriteAllTextAsync(manifestPath, minimal.ToJsonString(), context.
CancellationToken
).ConfigureAwait(false);
2179
var applyExitResult = await applyResult.WaitAsync(context.
CancellationToken
).ConfigureAwait(false);
2208
var resolvedNs = await nsAnnotation.Namespace.GetValueAsync(context.
CancellationToken
).ConfigureAwait(false);
2238
var secretName = await ResolveExpressionAtDeployTimeAsync(secretNameExpr, context.
CancellationToken
).ConfigureAwait(false);
2239
var hostname = await ResolveExpressionAtDeployTimeAsync(hostnameExpr, context.
CancellationToken
).ConfigureAwait(false);
2258
var result = await checkResult.WaitAsync(context.
CancellationToken
).ConfigureAwait(false);
2283
await File.WriteAllTextAsync(certPath, certPem, context.
CancellationToken
).ConfigureAwait(false);
2284
await File.WriteAllTextAsync(keyPath, keyPem, context.
CancellationToken
).ConfigureAwait(false);
2303
var createExitResult = await createResult.WaitAsync(context.
CancellationToken
).ConfigureAwait(false);
KubernetesHelmChartExtensions.cs (7)
350
cancellationToken: context.
CancellationToken
).ConfigureAwait(false);
368
.AcquireSectionAsync(GetStateSectionName(environment, chart), context.
CancellationToken
)
372
await deploymentStateManager.SaveSectionAsync(stateSection, context.
CancellationToken
).ConfigureAwait(false);
400
.AcquireSectionAsync(GetStateSectionName(environment, chart), context.
CancellationToken
)
414
context.
CancellationToken
).ConfigureAwait(false);
444
cancellationToken: context.
CancellationToken
).ConfigureAwait(false);
456
await deploymentStateManager.DeleteSectionAsync(stateSection, context.
CancellationToken
).ConfigureAwait(false);
Aspire.Hosting.Radius (5)
Publishing\RadCredentialRegisterStep.cs (1)
64
var cancellationToken = context.
CancellationToken
;
Publishing\RadiusBicepPublishingContext.cs (1)
50
var cancellationToken = context.
CancellationToken
;
Publishing\RadiusDeploymentPipelineStep.cs (1)
507
var cancellationToken = context.
CancellationToken
;
Publishing\SealedSecretApplyStep.cs (1)
64
var cancellationToken = context.
CancellationToken
;
RadiusEnvironmentResource.cs (1)
85
Action = stepContext => RadiusDeploymentPipelineStep.VerifyControlPlaneVersionAsync(stepContext.Logger, stepContext.
CancellationToken
),
Aspire.Hosting.Tests (1)
Pipelines\DistributedApplicationPipelineTests.cs (1)
883
wasCancelled = context.
CancellationToken
.IsCancellationRequested;
Aspire.Hosting.TestUtilities (3)
Helpers\JsonDocumentManifestPublisher.cs (3)
82
var publishingContext = new ManifestPublishingContext(executionContext, manifestPath, writer, context.
CancellationToken
);
84
await publishingContext.WriteModel(context.Model, context.
CancellationToken
).ConfigureAwait(false);
87
manifestStore.ManifestDocument = await JsonDocument.ParseAsync(stream, cancellationToken: context.
CancellationToken
).ConfigureAwait(false);
Pipelines.AppHost (28)
AppHost.cs (28)
64
.CreateTaskAsync($"Granting file share access to current user", context.
CancellationToken
)
87
context.
CancellationToken
).ConfigureAwait(false);
91
var userObjectId = await getUserProcess.StandardOutput.ReadToEndAsync(context.
CancellationToken
).ConfigureAwait(false);
94
await getUserProcess.WaitForExitAsync(context.
CancellationToken
).ConfigureAwait(false);
98
var error = await getUserProcess.StandardError.ReadToEndAsync(context.
CancellationToken
).ConfigureAwait(false);
102
context.
CancellationToken
).ConfigureAwait(false);
122
context.
CancellationToken
).ConfigureAwait(false);
126
var subscriptionId = await getSubscriptionProcess.StandardOutput.ReadToEndAsync(context.
CancellationToken
).ConfigureAwait(false);
129
await getSubscriptionProcess.WaitForExitAsync(context.
CancellationToken
).ConfigureAwait(false);
133
var error = await getSubscriptionProcess.StandardError.ReadToEndAsync(context.
CancellationToken
).ConfigureAwait(false);
137
context.
CancellationToken
).ConfigureAwait(false);
157
context.
CancellationToken
).ConfigureAwait(false);
161
var resourceGroup = await getResourceGroupProcess.StandardOutput.ReadToEndAsync(context.
CancellationToken
).ConfigureAwait(false);
164
await getResourceGroupProcess.WaitForExitAsync(context.
CancellationToken
).ConfigureAwait(false);
168
var error = await getResourceGroupProcess.StandardError.ReadToEndAsync(context.
CancellationToken
).ConfigureAwait(false);
172
context.
CancellationToken
).ConfigureAwait(false);
195
context.
CancellationToken
).ConfigureAwait(false);
199
await assignRoleProcess.WaitForExitAsync(context.
CancellationToken
).ConfigureAwait(false);
203
var error = await assignRoleProcess.StandardError.ReadToEndAsync(context.
CancellationToken
).ConfigureAwait(false);
207
context.
CancellationToken
).ConfigureAwait(false);
214
context.
CancellationToken
).ConfigureAwait(false);
221
context.
CancellationToken
).ConfigureAwait(false);
263
.CreateTaskAsync($"Uploading {Path.GetFileName(sourcePath)} to {fileShareName}", deployingContext.
CancellationToken
)
273
deployingContext.
CancellationToken
).ConfigureAwait(false);
303
await directoryClient.CreateIfNotExistsAsync(cancellationToken: deployingContext.
CancellationToken
).ConfigureAwait(false);
311
await fileClient.CreateAsync(fileStream.Length, cancellationToken: deployingContext.
CancellationToken
).ConfigureAwait(false);
312
await fileClient.UploadAsync(fileStream, cancellationToken: deployingContext.
CancellationToken
).ConfigureAwait(false);
318
deployingContext.
CancellationToken
).ConfigureAwait(false);
Pipelines.Library (1)
DistributedApplicationPipelineExtensions.cs (1)
55
context.
CancellationToken
).ConfigureAwait(false);
Publishers.AppHost (7)
DistributedApplicationBuilderExtensions.cs (7)
125
cancellationToken: context.
CancellationToken
);
162
cancellationToken: context.
CancellationToken
);
177
cancellationToken: context.
CancellationToken
);
198
cancellationToken: context.
CancellationToken
);
212
cancellationToken: context.
CancellationToken
);
227
cancellationToken: context.
CancellationToken
);
247
cancellationToken: context.
CancellationToken
);
SimplePipelines.AppHost (9)
AppHost.cs (9)
9
.CreateTaskAsync("Running hello-world step", context.
CancellationToken
)
14
await Task.Delay(500, context.
CancellationToken
).ConfigureAwait(false);
19
context.
CancellationToken
).ConfigureAwait(false);
27
.CreateTaskAsync("Running custom deploy prerequisite", context.
CancellationToken
)
32
await Task.Delay(500, context.
CancellationToken
).ConfigureAwait(false);
37
context.
CancellationToken
).ConfigureAwait(false);
45
.CreateTaskAsync("Running custom publish prerequisite", context.
CancellationToken
)
50
await Task.Delay(500, context.
CancellationToken
).ConfigureAwait(false);
55
context.
CancellationToken
).ConfigureAwait(false);