290 references to CancellationToken
Aspire.Hosting (35)
ApplicationModel\ProjectResource.cs (8)
115
await containerImageBuilder.BuildImageAsync(this, ctx.
CancellationToken
).ConfigureAwait(false);
131
var containerRuntime = await ctx.Services.GetRequiredService<IContainerRuntimeResolver>().ResolveAsync(ctx.
CancellationToken
).ConfigureAwait(false);
134
await containerRuntime.TagImageAsync(originalImageName, tempImageName, ctx.
CancellationToken
).ConfigureAwait(false);
145
var containerWorkingDir = await GetContainerWorkingDirectoryAsync(projectMetadata.ProjectPath, logger, ctx.
CancellationToken
).ConfigureAwait(false);
163
await dockerfileBuilder.WriteAsync(writer, ctx.
CancellationToken
).ConfigureAwait(false);
174
ctx.
CancellationToken
).ConfigureAwait(false);
189
ctx.
CancellationToken
).ConfigureAwait(false);
220
await containerRuntime.RemoveImageAsync(tempImageName, ctx.
CancellationToken
).ConfigureAwait(false);
ContainerResourceBuilderExtensions.cs (1)
73
ctx.
CancellationToken
).ConfigureAwait(false);
Pipelines\DistributedApplicationPipeline.cs (10)
56
await parameterProcessor.InitializeParametersAsync(context.Model, waitForResolution: true, context.
CancellationToken
).ConfigureAwait(false);
103
context.
CancellationToken
).ConfigureAwait(false);
113
await deploymentStateManager.ClearAllStateAsync(context.
CancellationToken
).ConfigureAwait(false);
165
var containerRuntime = await runtimeResolver.ResolveAsync(context.
CancellationToken
).ConfigureAwait(false);
167
if (await containerRuntime.CheckIfRunningAsync(context.
CancellationToken
).ConfigureAwait(false))
183
cancellationToken: context.
CancellationToken
).ConfigureAwait(false);
191
using var waitCts = CancellationTokenSource.CreateLinkedTokenSource(context.
CancellationToken
);
203
catch (OperationCanceledException) when (!context.
CancellationToken
.IsCancellationRequested)
245
context.
CancellationToken
).ConfigureAwait(false);
370
await deploymentStateManager.ClearAllStateAsync(context.
CancellationToken
).ConfigureAwait(false);
Pipelines\PipelineStepHelpers.cs (14)
37
context.
CancellationToken
).ConfigureAwait(false);
48
var registryEndpoint = await registry.Endpoint.GetValueAsync(context.
CancellationToken
).ConfigureAwait(false);
66
var targetTag = await cir.GetValueAsync(new ValueProviderContext { ExecutionContext = context.ExecutionContext }, context.
CancellationToken
).ConfigureAwait(false);
70
context.
CancellationToken
).ConfigureAwait(false);
87
var containerRuntime = await context.Services.GetRequiredService<IContainerRuntimeResolver>().ResolveAsync(context.
CancellationToken
).ConfigureAwait(false);
88
await containerRuntime.TagImageAsync(localImageName, targetTag, context.
CancellationToken
).ConfigureAwait(false);
93
context.
CancellationToken
).ConfigureAwait(false);
100
context.
CancellationToken
).ConfigureAwait(false);
108
var registryName = await registry.Name.GetValueAsync(context.
CancellationToken
).ConfigureAwait(false)
112
var targetTag = await cir.GetValueAsync(new ValueProviderContext { ExecutionContext = context.ExecutionContext }, context.
CancellationToken
).ConfigureAwait(false);
116
context.
CancellationToken
).ConfigureAwait(false);
128
await containerImageManager.PushImageAsync(resource, context.
CancellationToken
).ConfigureAwait(false);
133
context.
CancellationToken
).ConfigureAwait(false);
140
context.
CancellationToken
).ConfigureAwait(false);
Publishing\ManifestPublishingExtensions.cs (2)
68
var publishingContext = new ManifestPublishingContext(executionContext, manifestPath, jsonWriter, context.
CancellationToken
);
70
await publishingContext.WriteModel(context.Model, context.
CancellationToken
).ConfigureAwait(false);
Aspire.Hosting.Azure (26)
AzureBicepResource.cs (6)
346
.CreateTaskAsync(new MarkdownString($"Deploying **{resource.Name}**"), context.
CancellationToken
)
354
resource, context.
CancellationToken
).ConfigureAwait(false))
360
context.
CancellationToken
).ConfigureAwait(false);
365
resource, provisioningContext, context.
CancellationToken
)
371
context.
CancellationToken
).ConfigureAwait(false);
386
context.
CancellationToken
).ConfigureAwait(false);
AzureEnvironmentResource.cs (20)
87
await preparer.PrepareResourcesAsync(context.Model, context.
CancellationToken
).ConfigureAwait(false);
120
var provisioningContext = await provisioningContextProvider.CreateProvisioningContextAsync(ctx.
CancellationToken
).ConfigureAwait(false);
205
await tokenCredentialProvider.TokenCredential.GetTokenAsync(tokenRequest, context.
CancellationToken
)
211
context.
CancellationToken
).ConfigureAwait(false);
218
context.
CancellationToken
).ConfigureAwait(false);
230
var azureStateSection = await deploymentStateManager.AcquireSectionAsync("Azure", context.
CancellationToken
).ConfigureAwait(false);
240
context.
CancellationToken
).ConfigureAwait(false);
258
var (subscription, _) = await armClient.GetSubscriptionAndTenantAsync(context.
CancellationToken
).ConfigureAwait(false);
265
var rgResponse = await resourceGroups.GetAsync(resourceGroupName, context.
CancellationToken
).ConfigureAwait(false);
274
context.
CancellationToken
).ConfigureAwait(false);
284
context.
CancellationToken
).ConfigureAwait(false);
289
await foreach (var resource in resourceGroup.GetResourcesAsync(context.
CancellationToken
).ConfigureAwait(false))
299
context.
CancellationToken
).ConfigureAwait(false);
314
context.
CancellationToken
).ConfigureAwait(false);
324
context.
CancellationToken
).ConfigureAwait(false);
348
context.
CancellationToken
).ConfigureAwait(false);
360
context.
CancellationToken
).ConfigureAwait(false);
365
await resourceGroup.DeleteAsync(WaitUntil.Started, context.
CancellationToken
).ConfigureAwait(false);
375
context.
CancellationToken
).ConfigureAwait(false);
382
context.
CancellationToken
).ConfigureAwait(false);
Aspire.Hosting.Azure.AppContainers (5)
AzureContainerAppEnvironmentResource.cs (3)
158
var domainValue = await ContainerAppDomain.GetValueAsync(context.
CancellationToken
).ConfigureAwait(false);
167
context.
CancellationToken
).ConfigureAwait(false);
182
var cancellationToken = context.
CancellationToken
;
AzureContainerAppResource.cs (2)
50
var domainValue = await containerAppEnv.ContainerAppDomain.GetValueAsync(ctx.
CancellationToken
).ConfigureAwait(false);
51
var portalLink = await ContainerAppUrls.GetPortalLinkAsync(containerAppEnv, targetResource.Name.ToLowerInvariant(), ctx.
CancellationToken
).ConfigureAwait(false);
Aspire.Hosting.Azure.AppService (9)
AzureAppServiceEnvironmentResource.cs (6)
185
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)
55
await computerEnv.DeploymentSlotParameter.GetValueAsync(ctx.
CancellationToken
).ConfigureAwait(false);
61
var portalLink = await AppSvcUrls.GetPortalLinkAsync(computerEnv, websiteName, deploymentSlot, ctx.
CancellationToken
).ConfigureAwait(false);
114
var websiteSuffix = await computerEnv.WebSiteSuffix.GetValueAsync(context.
CancellationToken
).ConfigureAwait(false);
Aspire.Hosting.Azure.ContainerRegistry (6)
AzureContainerRegistryHelpers.cs (6)
28
var registryName = await registry.Name.GetValueAsync(context.
CancellationToken
).ConfigureAwait(false) ??
31
var registryEndpoint = await registry.Endpoint.GetValueAsync(context.
CancellationToken
).ConfigureAwait(false) ??
36
context.
CancellationToken
).ConfigureAwait(false);
51
context.
CancellationToken
).ConfigureAwait(false);
56
context.
CancellationToken
).ConfigureAwait(false);
62
context.
CancellationToken
).ConfigureAwait(false);
Aspire.Hosting.Azure.Kubernetes (12)
AzureKubernetesEnvironmentResource.AksPipeline.cs (12)
214
context.
CancellationToken
).ConfigureAwait(false);
223
var clusterName = await NameOutputReference.GetValueAsync(context.
CancellationToken
).ConfigureAwait(false)
241
context.
CancellationToken
).ConfigureAwait(false);
279
await File.WriteAllTextAsync(kubeConfigPath, kubeConfigContent, context.
CancellationToken
).ConfigureAwait(false);
310
context.
CancellationToken
).ConfigureAwait(false);
316
context.
CancellationToken
).ConfigureAwait(false);
350
context.
CancellationToken
).ConfigureAwait(false);
371
var subnetId = await ((IValueProvider)lb.SubnetIdReference).GetValueAsync(context.
CancellationToken
).ConfigureAwait(false);
389
context.
CancellationToken
).ConfigureAwait(false);
457
var result = await applyResultTask.WaitAsync(context.
CancellationToken
).ConfigureAwait(false);
482
context.
CancellationToken
).ConfigureAwait(false);
488
context.
CancellationToken
).ConfigureAwait(false);
Aspire.Hosting.Azure.Sandboxes (46)
AzureSandboxContainerDeployment.cs (46)
238
context.
CancellationToken
).ConfigureAwait(false);
239
var stateSection = await deploymentStateManager.AcquireSectionAsync(GetStateSectionName(resource), context.
CancellationToken
).ConfigureAwait(false);
263
await deploymentStateManager.SaveSectionAsync(stateSection, context.
CancellationToken
).ConfigureAwait(false);
281
var diskTask = await context.ReportingStep.CreateTaskAsync($"Creating sandbox disk image for {targetResource.Name}", context.
CancellationToken
).ConfigureAwait(false);
294
await diskTask.CompleteAsync($"Created sandbox disk image {diskImageId}", CompletionState.Completed, context.
CancellationToken
).ConfigureAwait(false);
308
var createTask = await context.ReportingStep.CreateTaskAsync($"Creating sandbox for {targetResource.Name}", context.
CancellationToken
).ConfigureAwait(false);
320
await createTask.CompleteAsync($"Created sandbox {sandboxId}", CompletionState.Completed, context.
CancellationToken
).ConfigureAwait(false);
325
var lifecycleTask = await context.ReportingStep.CreateTaskAsync($"Configuring lifecycle for {resource.Name}", context.
CancellationToken
).ConfigureAwait(false);
332
context.
CancellationToken
).ConfigureAwait(false);
333
await lifecycleTask.CompleteAsync("Lifecycle policy configured", CompletionState.Completed, context.
CancellationToken
).ConfigureAwait(false);
340
var exposeTask = await context.ReportingStep.CreateTaskAsync($"Exposing sandbox port {endpoint.TargetPort}", context.
CancellationToken
).ConfigureAwait(false);
349
await WaitForPublicHttpAsync(endpointUrl, GetPublicEndpointReadyTimeout(resource), context.
CancellationToken
).ConfigureAwait(false);
363
await exposeTask.CompleteAsync(new MarkdownString($"Public URL: [{endpointUrl}]({endpointUrl})"), CompletionState.Completed, context.
CancellationToken
).ConfigureAwait(false);
398
await deploymentStateManager.SaveSectionAsync(stateSection, context.
CancellationToken
).ConfigureAwait(false);
464
await deploymentStateManager.SaveSectionAsync(stateSection, context.
CancellationToken
).ConfigureAwait(false);
637
context.
CancellationToken
).ConfigureAwait(false);
651
context.
CancellationToken
).ConfigureAwait(false);
699
await Task.Delay(TimeSpan.FromSeconds(2), context.
CancellationToken
).ConfigureAwait(false);
700
diskImage = await client.GetDiskImageAsync(scope, diskImage.Id, context.
CancellationToken
).ConfigureAwait(false);
755
context.
CancellationToken
);
931
context.
CancellationToken
).ConfigureAwait(false);
943
.GetValueAsync(new ValueProviderContext { ExecutionContext = context.ExecutionContext, Caller = resource.TargetResource }, context.
CancellationToken
)
962
context.
CancellationToken
).ConfigureAwait(false);
1037
var callbackContext = new CommandLineArgsCallbackContext(args, resource, context.
CancellationToken
)
1073
var result = await runtime.InspectImageConfigAsync(imageReference, context.
CancellationToken
).ConfigureAwait(false);
1101
return context.Services.GetRequiredService<IContainerRuntimeResolver>().ResolveAsync(context.
CancellationToken
);
1109
var callbackContext = new EnvironmentCallbackContext(context.ExecutionContext, resource, environmentVariables, context.
CancellationToken
)
1168
.GetValueAsync(new ValueProviderContext { ExecutionContext = context.ExecutionContext, Caller = resource }, context.
CancellationToken
)
1278
context.
CancellationToken
).ConfigureAwait(false);
1279
var stateSection = await deploymentStateManager.AcquireSectionAsync(GetStateSectionName(resource), context.
CancellationToken
).ConfigureAwait(false);
1294
context.
CancellationToken
).ConfigureAwait(false);
1312
context.
CancellationToken
).ConfigureAwait(false);
1348
await deploymentStateManager.DeleteSectionAsync(stateSection, context.
CancellationToken
).ConfigureAwait(false);
1357
var sandboxesSection = await deploymentStateManager.AcquireCurrentSectionAsync(SandboxStateParentSection, context.
CancellationToken
).ConfigureAwait(false);
1372
context.
CancellationToken
).ConfigureAwait(false);
1373
var stateSection = await deploymentStateManager.AcquireSectionAsync(sectionName, context.
CancellationToken
).ConfigureAwait(false);
1376
await deploymentStateManager.DeleteSectionAsync(stateSection, context.
CancellationToken
).ConfigureAwait(false);
1387
var cleanupTask = await context.ReportingStep.CreateTaskAsync($"Deleting stale sandbox deployment {sectionName}", context.
CancellationToken
).ConfigureAwait(false);
1425
await deploymentStateManager.DeleteSectionAsync(stateSection, context.
CancellationToken
).ConfigureAwait(false);
1426
await cleanupTask.CompleteAsync($"Deleted stale sandbox deployment {sectionName}", CompletionState.Completed, context.
CancellationToken
).ConfigureAwait(false);
1522
catch (Exception ex) when (ex is not OperationCanceledException || !context.
CancellationToken
.IsCancellationRequested)
1535
catch (Exception ex) when (ex is not OperationCanceledException || !context.
CancellationToken
.IsCancellationRequested)
1575
sandboxes = await client.ListSandboxesAsync(scope, labelSelector, context.
CancellationToken
).ConfigureAwait(false);
1597
diskImages = await client.ListDiskImagesAsync(scope, labelSelector, context.
CancellationToken
).ConfigureAwait(false);
2193
var effectiveCancellationToken = cancellationToken ?? context.
CancellationToken
;
2253
var effectiveCancellationToken = cancellationToken ?? context.
CancellationToken
;
Aspire.Hosting.Docker (26)
DockerComposeEnvironmentResource.cs (24)
146
var stateSection = await deploymentStateManager.AcquireSectionAsync($"DockerCompose:{Name}", ctx.
CancellationToken
).ConfigureAwait(false);
154
ctx.
CancellationToken
).ConfigureAwait(false);
166
var runtime = await ctx.Services.GetRequiredService<IContainerRuntimeResolver>().ResolveAsync(ctx.
CancellationToken
).ConfigureAwait(false);
176
ctx.
CancellationToken
).ConfigureAwait(false);
179
await runtime.ComposeDownAsync(composeContext, ctx.
CancellationToken
).ConfigureAwait(false);
183
ctx.
CancellationToken
).ConfigureAwait(false);
189
await deploymentStateManager.DeleteSectionAsync(stateSection, ctx.
CancellationToken
).ConfigureAwait(false);
283
context.
CancellationToken
);
305
var cancellationToken = context.
CancellationToken
;
411
var runtime = await context.Services.GetRequiredService<IContainerRuntimeResolver>().ResolveAsync(context.
CancellationToken
).ConfigureAwait(false);
415
context.
CancellationToken
).ConfigureAwait(false);
422
await runtime.ComposeUpAsync(composeContext, context.
CancellationToken
).ConfigureAwait(false);
426
var stateSection = await deploymentStateManager.AcquireSectionAsync($"DockerCompose:{Name}", context.
CancellationToken
).ConfigureAwait(false);
430
await deploymentStateManager.SaveSectionAsync(stateSection, context.
CancellationToken
).ConfigureAwait(false);
435
context.
CancellationToken
).ConfigureAwait(false);
439
await deployTask.CompleteAsync($"Compose deployment failed ({runtime.Name}): {ex.Message}", CompletionState.CompletedWithError, context.
CancellationToken
).ConfigureAwait(false);
457
var runtime = await context.Services.GetRequiredService<IContainerRuntimeResolver>().ResolveAsync(context.
CancellationToken
).ConfigureAwait(false);
461
context.
CancellationToken
).ConfigureAwait(false);
468
await runtime.ComposeDownAsync(composeContext, context.
CancellationToken
).ConfigureAwait(false);
473
context.
CancellationToken
).ConfigureAwait(false);
477
await deployTask.CompleteAsync($"Compose shutdown failed ({runtime.Name}): {ex.Message}", CompletionState.CompletedWithError, context.
CancellationToken
).ConfigureAwait(false);
508
context.
CancellationToken
).ConfigureAwait(false);
539
defaultValue ??= await parameter.GetValueAsync(context.
CancellationToken
).ConfigureAwait(false);
544
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)
368
stepContext.
CancellationToken
,
Aspire.Hosting.Foundry (9)
HostedAgent\AzureHostedAgentResource.cs (7)
110
var imageName = await ((IValueProvider)Image).GetValueAsync(context.
CancellationToken
).ConfigureAwait(false);
119
EnvironmentVariables = await GetResolvedEnvironmentVariablesAsync(context.ExecutionContext, this, Target, context.Logger, context.
CancellationToken
).ConfigureAwait(false),
164
var projectEndpoint = await project.Endpoint.GetValueAsync(context.
CancellationToken
).ConfigureAwait(false);
176
cancellationToken: context.
CancellationToken
179
await UpdateAgentEndpointProtocolsAsync(projectClient.AgentAdministrationClient, def, context.
CancellationToken
).ConfigureAwait(false);
252
var foundryResourceId = await project.Parent.Id.GetValueAsync(context.
CancellationToken
).ConfigureAwait(false);
279
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);
Aspire.Hosting.Kubernetes (62)
CertManagerExtensions.cs (4)
439
var manifest = await BuildClusterIssuerManifestAsync(context.Model, certManager, issuer, context.Logger, context.
CancellationToken
)
452
await File.WriteAllTextAsync(manifestPath, manifest, context.
CancellationToken
).ConfigureAwait(false);
477
var result = await resultTask.WaitAsync(context.
CancellationToken
).ConfigureAwait(false);
534
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);
191
var stateSection = await deploymentStateManager.AcquireSectionAsync($"Helm:{environment.Name}", ctx.
CancellationToken
).ConfigureAwait(false);
200
ctx.
CancellationToken
).ConfigureAwait(false);
212
await HelmVersionValidator.EnsureMinimumVersionAsync(helmRunner, ctx.
CancellationToken
).ConfigureAwait(false);
219
await deploymentStateManager.DeleteSectionAsync(stateSection, ctx.
CancellationToken
).ConfigureAwait(false);
253
context.
CancellationToken
).ConfigureAwait(false);
263
await ResolveAndWriteDeployValuesAsync(outputPath, environment, context.
CancellationToken
).ConfigureAwait(false);
268
context.
CancellationToken
).ConfigureAwait(false);
275
context.
CancellationToken
).ConfigureAwait(false);
422
context.
CancellationToken
).ConfigureAwait(false);
470
cancellationToken: context.
CancellationToken
).ConfigureAwait(false);
485
var stateSection = await deploymentStateManager.AcquireSectionAsync($"Helm:{environment.Name}", context.
CancellationToken
).ConfigureAwait(false);
488
await deploymentStateManager.SaveSectionAsync(stateSection, context.
CancellationToken
).ConfigureAwait(false);
493
context.
CancellationToken
).ConfigureAwait(false);
501
context.
CancellationToken
).ConfigureAwait(false);
523
var endpoints = await GetServiceEndpointsAsync(computeResource.Name.ToServiceName(), @namespace, environment.KubeConfigPath, context.Logger, context.
CancellationToken
).ConfigureAwait(false);
589
context.
CancellationToken
).ConfigureAwait(false);
609
cancellationToken: context.
CancellationToken
).ConfigureAwait(false);
620
context.
CancellationToken
).ConfigureAwait(false);
628
context.
CancellationToken
).ConfigureAwait(false);
659
context.
CancellationToken
).ConfigureAwait(false);
KubernetesEnvironmentResource.cs (29)
413
context.
CancellationToken
);
434
var cancellationToken = context.
CancellationToken
;
516
await ProcessIngressResources(appModel, deploymentTargets, logger, context.
CancellationToken
).ConfigureAwait(false);
519
await ProcessGatewayResources(appModel, deploymentTargets, logger, context.
CancellationToken
).ConfigureAwait(false);
522
await ProcessPersistentVolumeResources(appModel, context.
CancellationToken
).ConfigureAwait(false);
1368
var resolvedNs = await nsAnnotation.Namespace.GetValueAsync(context.
CancellationToken
).ConfigureAwait(false);
1378
var secretName = await ResolveExpressionAtDeployTimeAsync(secretNameExpr, context.
CancellationToken
).ConfigureAwait(false);
1451
await File.WriteAllTextAsync(patchFilePath, patchJson, context.
CancellationToken
).ConfigureAwait(false);
1479
var patchExitResult = await patchResult.WaitAsync(context.
CancellationToken
).ConfigureAwait(false);
1539
var result = await checkResult.WaitAsync(context.
CancellationToken
).ConfigureAwait(false);
1564
await File.WriteAllTextAsync(certPath, certPem, context.
CancellationToken
).ConfigureAwait(false);
1565
await File.WriteAllTextAsync(keyPath, keyPem, context.
CancellationToken
).ConfigureAwait(false);
1584
var createExitResult = await createResult.WaitAsync(context.
CancellationToken
).ConfigureAwait(false);
1683
}, context.
CancellationToken
).ConfigureAwait(false);
1764
var result = await getResult.WaitAsync(context.
CancellationToken
).ConfigureAwait(false);
1822
var resolvedNs = await nsAnnotation.Namespace.GetValueAsync(context.
CancellationToken
).ConfigureAwait(false);
1852
getExit = (await getResult.WaitAsync(context.
CancellationToken
).ConfigureAwait(false)).ExitCode;
1897
await File.WriteAllTextAsync(patchFilePath, patchJson, context.
CancellationToken
).ConfigureAwait(false);
1916
var patchExit = (await patchResult.WaitAsync(context.
CancellationToken
).ConfigureAwait(false)).ExitCode;
2027
var exitResult = await getResult.WaitAsync(context.
CancellationToken
).ConfigureAwait(false);
2078
await File.WriteAllTextAsync(manifestPath, minimal.ToJsonString(), context.
CancellationToken
).ConfigureAwait(false);
2097
var applyExitResult = await applyResult.WaitAsync(context.
CancellationToken
).ConfigureAwait(false);
2126
var resolvedNs = await nsAnnotation.Namespace.GetValueAsync(context.
CancellationToken
).ConfigureAwait(false);
2156
var secretName = await ResolveExpressionAtDeployTimeAsync(secretNameExpr, context.
CancellationToken
).ConfigureAwait(false);
2157
var hostname = await ResolveExpressionAtDeployTimeAsync(hostnameExpr, context.
CancellationToken
).ConfigureAwait(false);
2176
var result = await checkResult.WaitAsync(context.
CancellationToken
).ConfigureAwait(false);
2201
await File.WriteAllTextAsync(certPath, certPem, context.
CancellationToken
).ConfigureAwait(false);
2202
await File.WriteAllTextAsync(keyPath, keyPem, context.
CancellationToken
).ConfigureAwait(false);
2221
var createExitResult = await createResult.WaitAsync(context.
CancellationToken
).ConfigureAwait(false);
KubernetesHelmChartExtensions.cs (6)
358
cancellationToken: context.
CancellationToken
).ConfigureAwait(false);
376
.AcquireSectionAsync(GetStateSectionName(environment, chart), context.
CancellationToken
)
380
await deploymentStateManager.SaveSectionAsync(stateSection, context.
CancellationToken
).ConfigureAwait(false);
400
.AcquireSectionAsync(GetStateSectionName(environment, chart), context.
CancellationToken
)
432
cancellationToken: context.
CancellationToken
).ConfigureAwait(false);
444
await deploymentStateManager.DeleteSectionAsync(stateSection, context.
CancellationToken
).ConfigureAwait(false);
Aspire.Hosting.Radius (4)
Publishing\RadCredentialRegisterStep.cs (1)
67
var cancellationToken = context.
CancellationToken
;
Publishing\RadiusBicepPublishingContext.cs (1)
53
var cancellationToken = context.
CancellationToken
;
Publishing\RadiusDeploymentPipelineStep.cs (1)
102
var cancellationToken = context.
CancellationToken
;
Publishing\SealedSecretApplyStep.cs (1)
68
var cancellationToken = context.
CancellationToken
;
Aspire.Hosting.Tests (1)
Pipelines\DistributedApplicationPipelineTests.cs (1)
826
wasCancelled = context.
CancellationToken
.IsCancellationRequested;
Aspire.Hosting.TestUtilities (3)
Helpers\JsonDocumentManifestPublisher.cs (3)
84
var publishingContext = new ManifestPublishingContext(executionContext, manifestPath, writer, context.
CancellationToken
);
86
await publishingContext.WriteModel(context.Model, context.
CancellationToken
).ConfigureAwait(false);
89
manifestStore.ManifestDocument = await JsonDocument.ParseAsync(stream, cancellationToken: context.
CancellationToken
).ConfigureAwait(false);
Pipelines.AppHost (28)
AppHost.cs (28)
66
.CreateTaskAsync($"Granting file share access to current user", context.
CancellationToken
)
89
context.
CancellationToken
).ConfigureAwait(false);
93
var userObjectId = await getUserProcess.StandardOutput.ReadToEndAsync(context.
CancellationToken
).ConfigureAwait(false);
96
await getUserProcess.WaitForExitAsync(context.
CancellationToken
).ConfigureAwait(false);
100
var error = await getUserProcess.StandardError.ReadToEndAsync(context.
CancellationToken
).ConfigureAwait(false);
104
context.
CancellationToken
).ConfigureAwait(false);
124
context.
CancellationToken
).ConfigureAwait(false);
128
var subscriptionId = await getSubscriptionProcess.StandardOutput.ReadToEndAsync(context.
CancellationToken
).ConfigureAwait(false);
131
await getSubscriptionProcess.WaitForExitAsync(context.
CancellationToken
).ConfigureAwait(false);
135
var error = await getSubscriptionProcess.StandardError.ReadToEndAsync(context.
CancellationToken
).ConfigureAwait(false);
139
context.
CancellationToken
).ConfigureAwait(false);
159
context.
CancellationToken
).ConfigureAwait(false);
163
var resourceGroup = await getResourceGroupProcess.StandardOutput.ReadToEndAsync(context.
CancellationToken
).ConfigureAwait(false);
166
await getResourceGroupProcess.WaitForExitAsync(context.
CancellationToken
).ConfigureAwait(false);
170
var error = await getResourceGroupProcess.StandardError.ReadToEndAsync(context.
CancellationToken
).ConfigureAwait(false);
174
context.
CancellationToken
).ConfigureAwait(false);
197
context.
CancellationToken
).ConfigureAwait(false);
201
await assignRoleProcess.WaitForExitAsync(context.
CancellationToken
).ConfigureAwait(false);
205
var error = await assignRoleProcess.StandardError.ReadToEndAsync(context.
CancellationToken
).ConfigureAwait(false);
209
context.
CancellationToken
).ConfigureAwait(false);
216
context.
CancellationToken
).ConfigureAwait(false);
223
context.
CancellationToken
).ConfigureAwait(false);
265
.CreateTaskAsync($"Uploading {Path.GetFileName(sourcePath)} to {fileShareName}", deployingContext.
CancellationToken
)
275
deployingContext.
CancellationToken
).ConfigureAwait(false);
305
await directoryClient.CreateIfNotExistsAsync(cancellationToken: deployingContext.
CancellationToken
).ConfigureAwait(false);
313
await fileClient.CreateAsync(fileStream.Length, cancellationToken: deployingContext.
CancellationToken
).ConfigureAwait(false);
314
await fileClient.UploadAsync(fileStream, cancellationToken: deployingContext.
CancellationToken
).ConfigureAwait(false);
320
deployingContext.
CancellationToken
).ConfigureAwait(false);
Pipelines.Library (1)
DistributedApplicationPipelineExtensions.cs (1)
47
context.
CancellationToken
).ConfigureAwait(false);
Publishers.AppHost (7)
DistributedApplicationBuilderExtensions.cs (7)
127
cancellationToken: context.
CancellationToken
);
164
cancellationToken: context.
CancellationToken
);
179
cancellationToken: context.
CancellationToken
);
200
cancellationToken: context.
CancellationToken
);
214
cancellationToken: context.
CancellationToken
);
229
cancellationToken: context.
CancellationToken
);
249
cancellationToken: context.
CancellationToken
);
SimplePipelines.AppHost (9)
AppHost.cs (9)
11
.CreateTaskAsync("Running hello-world step", context.
CancellationToken
)
16
await Task.Delay(500, context.
CancellationToken
).ConfigureAwait(false);
21
context.
CancellationToken
).ConfigureAwait(false);
29
.CreateTaskAsync("Running custom deploy prerequisite", context.
CancellationToken
)
34
await Task.Delay(500, context.
CancellationToken
).ConfigureAwait(false);
39
context.
CancellationToken
).ConfigureAwait(false);
47
.CreateTaskAsync("Running custom publish prerequisite", context.
CancellationToken
)
52
await Task.Delay(500, context.
CancellationToken
).ConfigureAwait(false);
57
context.
CancellationToken
).ConfigureAwait(false);