290 references to CancellationToken
Aspire.Hosting (27)
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);
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 (26)
AzureBicepResource.cs (6)
342
.CreateTaskAsync(new MarkdownString($"Deploying **{resource.Name}**"), context.
CancellationToken
)
350
resource, context.
CancellationToken
).ConfigureAwait(false))
356
context.
CancellationToken
).ConfigureAwait(false);
361
resource, provisioningContext, context.
CancellationToken
)
367
context.
CancellationToken
).ConfigureAwait(false);
382
context.
CancellationToken
).ConfigureAwait(false);
AzureEnvironmentResource.cs (20)
83
await preparer.PrepareResourcesAsync(context.Model, context.
CancellationToken
).ConfigureAwait(false);
116
var provisioningContext = await provisioningContextProvider.CreateProvisioningContextAsync(ctx.
CancellationToken
).ConfigureAwait(false);
201
await tokenCredentialProvider.TokenCredential.GetTokenAsync(tokenRequest, context.
CancellationToken
)
207
context.
CancellationToken
).ConfigureAwait(false);
214
context.
CancellationToken
).ConfigureAwait(false);
226
var azureStateSection = await deploymentStateManager.AcquireSectionAsync("Azure", context.
CancellationToken
).ConfigureAwait(false);
236
context.
CancellationToken
).ConfigureAwait(false);
254
var (subscription, _) = await armClient.GetSubscriptionAndTenantAsync(context.
CancellationToken
).ConfigureAwait(false);
261
var rgResponse = await resourceGroups.GetAsync(resourceGroupName, context.
CancellationToken
).ConfigureAwait(false);
270
context.
CancellationToken
).ConfigureAwait(false);
280
context.
CancellationToken
).ConfigureAwait(false);
285
await foreach (var resource in resourceGroup.GetResourcesAsync(context.
CancellationToken
).ConfigureAwait(false))
295
context.
CancellationToken
).ConfigureAwait(false);
310
context.
CancellationToken
).ConfigureAwait(false);
320
context.
CancellationToken
).ConfigureAwait(false);
344
context.
CancellationToken
).ConfigureAwait(false);
356
context.
CancellationToken
).ConfigureAwait(false);
361
await resourceGroup.DeleteAsync(WaitUntil.Started, context.
CancellationToken
).ConfigureAwait(false);
371
context.
CancellationToken
).ConfigureAwait(false);
378
context.
CancellationToken
).ConfigureAwait(false);
Aspire.Hosting.Azure.AppContainers (5)
AzureContainerAppEnvironmentResource.cs (3)
156
var domainValue = await ContainerAppDomain.GetValueAsync(context.
CancellationToken
).ConfigureAwait(false);
165
context.
CancellationToken
).ConfigureAwait(false);
180
var cancellationToken = context.
CancellationToken
;
AzureContainerAppResource.cs (2)
48
var domainValue = await containerAppEnv.ContainerAppDomain.GetValueAsync(ctx.
CancellationToken
).ConfigureAwait(false);
49
var portalLink = await ContainerAppUrls.GetPortalLinkAsync(containerAppEnv, targetResource.Name.ToLowerInvariant(), ctx.
CancellationToken
).ConfigureAwait(false);
Aspire.Hosting.Azure.AppService (9)
AzureAppServiceEnvironmentResource.cs (6)
184
var cancellationToken = context.
CancellationToken
;
242
var dashboardUri = await DashboardUriReference.GetValueAsync(context.
CancellationToken
).ConfigureAwait(false);
252
context.
CancellationToken
).ConfigureAwait(false);
263
context.
CancellationToken
).ConfigureAwait(false);
304
context.
CancellationToken
).ConfigureAwait(false);
313
context.
CancellationToken
).ConfigureAwait(false);
AzureAppServiceWebSiteResource.cs (3)
53
await computerEnv.DeploymentSlotParameter.GetValueAsync(ctx.
CancellationToken
).ConfigureAwait(false);
59
var portalLink = await AppSvcUrls.GetPortalLinkAsync(computerEnv, websiteName, deploymentSlot, ctx.
CancellationToken
).ConfigureAwait(false);
112
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 (15)
AzureKubernetesEnvironmentResource.AksPipeline.cs (15)
213
var clusterName = await NameOutputReference.GetValueAsync(context.
CancellationToken
).ConfigureAwait(false)
233
context.
CancellationToken
).ConfigureAwait(false);
255
context.
CancellationToken
).ConfigureAwait(false);
292
context.
CancellationToken
).ConfigureAwait(false);
316
await File.WriteAllTextAsync(kubeConfigPath, kubeConfigContent, context.
CancellationToken
).ConfigureAwait(false);
347
context.
CancellationToken
).ConfigureAwait(false);
353
context.
CancellationToken
).ConfigureAwait(false);
363
.AcquireSectionAsync($"Azure:Deployments:{Name}", context.
CancellationToken
)
430
context.
CancellationToken
).ConfigureAwait(false);
514
context.
CancellationToken
).ConfigureAwait(false);
535
var subnetId = await ((IValueProvider)lb.SubnetIdReference).GetValueAsync(context.
CancellationToken
).ConfigureAwait(false);
553
context.
CancellationToken
).ConfigureAwait(false);
621
var result = await applyResultTask.WaitAsync(context.
CancellationToken
).ConfigureAwait(false);
646
context.
CancellationToken
).ConfigureAwait(false);
652
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.Docker (26)
DockerComposeEnvironmentResource.cs (24)
144
var stateSection = await deploymentStateManager.AcquireSectionAsync($"DockerCompose:{Name}", ctx.
CancellationToken
).ConfigureAwait(false);
152
ctx.
CancellationToken
).ConfigureAwait(false);
164
var runtime = await ctx.Services.GetRequiredService<IContainerRuntimeResolver>().ResolveAsync(ctx.
CancellationToken
).ConfigureAwait(false);
174
ctx.
CancellationToken
).ConfigureAwait(false);
177
await runtime.ComposeDownAsync(composeContext, ctx.
CancellationToken
).ConfigureAwait(false);
181
ctx.
CancellationToken
).ConfigureAwait(false);
187
await deploymentStateManager.DeleteSectionAsync(stateSection, ctx.
CancellationToken
).ConfigureAwait(false);
281
context.
CancellationToken
);
303
var cancellationToken = context.
CancellationToken
;
437
var runtime = await context.Services.GetRequiredService<IContainerRuntimeResolver>().ResolveAsync(context.
CancellationToken
).ConfigureAwait(false);
441
context.
CancellationToken
).ConfigureAwait(false);
448
await runtime.ComposeUpAsync(composeContext, context.
CancellationToken
).ConfigureAwait(false);
452
var stateSection = await deploymentStateManager.AcquireSectionAsync($"DockerCompose:{Name}", context.
CancellationToken
).ConfigureAwait(false);
456
await deploymentStateManager.SaveSectionAsync(stateSection, context.
CancellationToken
).ConfigureAwait(false);
461
context.
CancellationToken
).ConfigureAwait(false);
465
await deployTask.CompleteAsync($"Compose deployment failed ({runtime.Name}): {ex.Message}", CompletionState.CompletedWithError, context.
CancellationToken
).ConfigureAwait(false);
483
var runtime = await context.Services.GetRequiredService<IContainerRuntimeResolver>().ResolveAsync(context.
CancellationToken
).ConfigureAwait(false);
487
context.
CancellationToken
).ConfigureAwait(false);
494
await runtime.ComposeDownAsync(composeContext, context.
CancellationToken
).ConfigureAwait(false);
499
context.
CancellationToken
).ConfigureAwait(false);
503
await deployTask.CompleteAsync($"Compose shutdown failed ({runtime.Name}): {ex.Message}", CompletionState.CompletedWithError, context.
CancellationToken
).ConfigureAwait(false);
534
context.
CancellationToken
).ConfigureAwait(false);
565
defaultValue ??= await parameter.GetValueAsync(context.
CancellationToken
).ConfigureAwait(false);
570
defaultValue = await vp.GetValueAsync(context.
CancellationToken
).ConfigureAwait(false);
DockerComposeServiceResource.cs (2)
338
var runtime = await context.Services.GetRequiredService<IContainerRuntimeResolver>().ResolveAsync(context.
CancellationToken
).ConfigureAwait(false);
340
var services = await runtime.ComposeListServicesAsync(composeContext, context.
CancellationToken
).ConfigureAwait(false);
Aspire.Hosting.EntityFrameworkCore (1)
EFResourceBuilderExtensions.cs (1)
454
stepContext.
CancellationToken
,
Aspire.Hosting.Foundry (11)
HostedAgent\AzureHostedAgentResource.cs (7)
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);
174
cancellationToken: context.
CancellationToken
177
await UpdateAgentEndpointProtocolsAsync(projectClient.AgentAdministrationClient, def, context.
CancellationToken
).ConfigureAwait(false);
250
var foundryResourceId = await project.Parent.Id.GetValueAsync(context.
CancellationToken
).ConfigureAwait(false);
277
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 (63)
CertManagerExtensions.cs (4)
438
var manifest = await BuildClusterIssuerManifestAsync(context.Model, certManager, issuer, context.Logger, context.
CancellationToken
)
451
await File.WriteAllTextAsync(manifestPath, manifest, context.
CancellationToken
).ConfigureAwait(false);
476
var result = await resultTask.WaitAsync(context.
CancellationToken
).ConfigureAwait(false);
541
var result = await resultTask.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);
425
context.
CancellationToken
).ConfigureAwait(false);
473
cancellationToken: context.
CancellationToken
).ConfigureAwait(false);
488
var stateSection = await deploymentStateManager.AcquireSectionAsync($"Helm:{environment.Name}", context.
CancellationToken
).ConfigureAwait(false);
491
await deploymentStateManager.SaveSectionAsync(stateSection, context.
CancellationToken
).ConfigureAwait(false);
496
context.
CancellationToken
).ConfigureAwait(false);
504
context.
CancellationToken
).ConfigureAwait(false);
526
var endpoints = await GetServiceEndpointsAsync(computeResource.Name.ToServiceName(), @namespace, environment.KubeConfigPath, context.Logger, context.
CancellationToken
).ConfigureAwait(false);
602
context.
CancellationToken
).ConfigureAwait(false);
613
context.
CancellationToken
).ConfigureAwait(false);
630
cancellationToken: context.
CancellationToken
).ConfigureAwait(false);
641
context.
CancellationToken
).ConfigureAwait(false);
649
context.
CancellationToken
).ConfigureAwait(false);
693
context.
CancellationToken
).ConfigureAwait(false);
KubernetesEnvironmentResource.cs (29)
417
context.
CancellationToken
);
438
var cancellationToken = context.
CancellationToken
;
520
await ProcessIngressResources(appModel, deploymentTargets, logger, context.
CancellationToken
).ConfigureAwait(false);
523
await ProcessGatewayResources(appModel, deploymentTargets, logger, context.
CancellationToken
).ConfigureAwait(false);
526
await ProcessPersistentVolumeResources(appModel, context.
CancellationToken
).ConfigureAwait(false);
1438
var resolvedNs = await nsAnnotation.Namespace.GetValueAsync(context.
CancellationToken
).ConfigureAwait(false);
1448
var secretName = await ResolveExpressionAtDeployTimeAsync(secretNameExpr, context.
CancellationToken
).ConfigureAwait(false);
1521
await File.WriteAllTextAsync(patchFilePath, patchJson, context.
CancellationToken
).ConfigureAwait(false);
1549
var patchExitResult = await patchResult.WaitAsync(context.
CancellationToken
).ConfigureAwait(false);
1609
var result = await checkResult.WaitAsync(context.
CancellationToken
).ConfigureAwait(false);
1634
await File.WriteAllTextAsync(certPath, certPem, context.
CancellationToken
).ConfigureAwait(false);
1635
await File.WriteAllTextAsync(keyPath, keyPem, context.
CancellationToken
).ConfigureAwait(false);
1654
var createExitResult = await createResult.WaitAsync(context.
CancellationToken
).ConfigureAwait(false);
1753
}, context.
CancellationToken
).ConfigureAwait(false);
1834
var result = await getResult.WaitAsync(context.
CancellationToken
).ConfigureAwait(false);
1892
var resolvedNs = await nsAnnotation.Namespace.GetValueAsync(context.
CancellationToken
).ConfigureAwait(false);
1922
getExit = (await getResult.WaitAsync(context.
CancellationToken
).ConfigureAwait(false)).ExitCode;
1967
await File.WriteAllTextAsync(patchFilePath, patchJson, context.
CancellationToken
).ConfigureAwait(false);
1986
var patchExit = (await patchResult.WaitAsync(context.
CancellationToken
).ConfigureAwait(false)).ExitCode;
2097
var exitResult = await getResult.WaitAsync(context.
CancellationToken
).ConfigureAwait(false);
2148
await File.WriteAllTextAsync(manifestPath, minimal.ToJsonString(), context.
CancellationToken
).ConfigureAwait(false);
2167
var applyExitResult = await applyResult.WaitAsync(context.
CancellationToken
).ConfigureAwait(false);
2196
var resolvedNs = await nsAnnotation.Namespace.GetValueAsync(context.
CancellationToken
).ConfigureAwait(false);
2226
var secretName = await ResolveExpressionAtDeployTimeAsync(secretNameExpr, context.
CancellationToken
).ConfigureAwait(false);
2227
var hostname = await ResolveExpressionAtDeployTimeAsync(hostnameExpr, context.
CancellationToken
).ConfigureAwait(false);
2246
var result = await checkResult.WaitAsync(context.
CancellationToken
).ConfigureAwait(false);
2271
await File.WriteAllTextAsync(certPath, certPem, context.
CancellationToken
).ConfigureAwait(false);
2272
await File.WriteAllTextAsync(keyPath, keyPem, context.
CancellationToken
).ConfigureAwait(false);
2291
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)
824
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)
44
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);