297 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 (15)
AzureKubernetesEnvironmentResource.AksPipeline.cs (15)
218
var clusterName = await NameOutputReference.GetValueAsync(context.
CancellationToken
).ConfigureAwait(false)
238
context.
CancellationToken
).ConfigureAwait(false);
260
context.
CancellationToken
).ConfigureAwait(false);
297
context.
CancellationToken
).ConfigureAwait(false);
321
await File.WriteAllTextAsync(kubeConfigPath, kubeConfigContent, context.
CancellationToken
).ConfigureAwait(false);
352
context.
CancellationToken
).ConfigureAwait(false);
358
context.
CancellationToken
).ConfigureAwait(false);
368
.AcquireSectionAsync($"Azure:Deployments:{Name}", context.
CancellationToken
)
435
context.
CancellationToken
).ConfigureAwait(false);
519
context.
CancellationToken
).ConfigureAwait(false);
540
var subnetId = await ((IValueProvider)lb.SubnetIdReference).GetValueAsync(context.
CancellationToken
).ConfigureAwait(false);
558
context.
CancellationToken
).ConfigureAwait(false);
626
var result = await applyResultTask.WaitAsync(context.
CancellationToken
).ConfigureAwait(false);
651
context.
CancellationToken
).ConfigureAwait(false);
657
context.
CancellationToken
).ConfigureAwait(false);
Aspire.Hosting.Azure.Sandboxes (47)
AzureSandboxContainerDeployment.cs (46)
258
context.
CancellationToken
).ConfigureAwait(false);
259
var stateSection = await deploymentStateManager.AcquireSectionAsync(GetStateSectionName(resource), context.
CancellationToken
).ConfigureAwait(false);
283
await deploymentStateManager.SaveSectionAsync(stateSection, context.
CancellationToken
).ConfigureAwait(false);
301
var diskTask = await context.ReportingStep.CreateTaskAsync($"Creating sandbox disk image for {targetResource.Name}", context.
CancellationToken
).ConfigureAwait(false);
314
await diskTask.CompleteAsync($"Created sandbox disk image {diskImageId}", CompletionState.Completed, context.
CancellationToken
).ConfigureAwait(false);
328
var createTask = await context.ReportingStep.CreateTaskAsync($"Creating sandbox for {targetResource.Name}", context.
CancellationToken
).ConfigureAwait(false);
340
await createTask.CompleteAsync($"Created sandbox {sandboxId}", CompletionState.Completed, context.
CancellationToken
).ConfigureAwait(false);
345
var lifecycleTask = await context.ReportingStep.CreateTaskAsync($"Configuring lifecycle for {resource.Name}", context.
CancellationToken
).ConfigureAwait(false);
352
context.
CancellationToken
).ConfigureAwait(false);
353
await lifecycleTask.CompleteAsync("Lifecycle policy configured", CompletionState.Completed, context.
CancellationToken
).ConfigureAwait(false);
360
var exposeTask = await context.ReportingStep.CreateTaskAsync($"Exposing sandbox port {endpoint.TargetPort}", context.
CancellationToken
).ConfigureAwait(false);
378
await exposeTask.CompleteAsync(new MarkdownString($"Public URL: [{endpointUrl}]({endpointUrl})"), CompletionState.Completed, context.
CancellationToken
).ConfigureAwait(false);
413
await deploymentStateManager.SaveSectionAsync(stateSection, context.
CancellationToken
).ConfigureAwait(false);
479
await deploymentStateManager.SaveSectionAsync(stateSection, context.
CancellationToken
).ConfigureAwait(false);
652
context.
CancellationToken
).ConfigureAwait(false);
666
context.
CancellationToken
).ConfigureAwait(false);
714
await Task.Delay(TimeSpan.FromSeconds(2), context.
CancellationToken
).ConfigureAwait(false);
715
diskImage = await client.GetDiskImageAsync(scope, diskImage.Id, context.
CancellationToken
).ConfigureAwait(false);
770
context.
CancellationToken
);
948
context.
CancellationToken
).ConfigureAwait(false);
978
.GetValueAsync(new ValueProviderContext { ExecutionContext = context.ExecutionContext, Caller = resource.TargetResource }, context.
CancellationToken
)
997
context.
CancellationToken
).ConfigureAwait(false);
1072
var callbackContext = new CommandLineArgsCallbackContext(args, resource, context.
CancellationToken
)
1108
var result = await runtime.InspectImageConfigAsync(imageReference, context.
CancellationToken
).ConfigureAwait(false);
1136
return context.Services.GetRequiredService<IContainerRuntimeResolver>().ResolveAsync(context.
CancellationToken
);
1144
var callbackContext = new EnvironmentCallbackContext(context.ExecutionContext, resource, environmentVariables, context.
CancellationToken
)
1185
context.
CancellationToken
).ConfigureAwait(false) ?? string.Empty;
1210
.GetValueAsync(new ValueProviderContext { ExecutionContext = context.ExecutionContext, Caller = resource }, context.
CancellationToken
)
1320
context.
CancellationToken
).ConfigureAwait(false);
1321
var stateSection = await deploymentStateManager.AcquireSectionAsync(GetStateSectionName(resource), context.
CancellationToken
).ConfigureAwait(false);
1336
context.
CancellationToken
).ConfigureAwait(false);
1354
context.
CancellationToken
).ConfigureAwait(false);
1390
await deploymentStateManager.DeleteSectionAsync(stateSection, context.
CancellationToken
).ConfigureAwait(false);
1399
var sandboxesSection = await deploymentStateManager.AcquireCurrentSectionAsync(SandboxStateParentSection, context.
CancellationToken
).ConfigureAwait(false);
1414
context.
CancellationToken
).ConfigureAwait(false);
1415
var stateSection = await deploymentStateManager.AcquireSectionAsync(sectionName, context.
CancellationToken
).ConfigureAwait(false);
1418
await deploymentStateManager.DeleteSectionAsync(stateSection, context.
CancellationToken
).ConfigureAwait(false);
1429
var cleanupTask = await context.ReportingStep.CreateTaskAsync($"Deleting stale sandbox deployment {sectionName}", context.
CancellationToken
).ConfigureAwait(false);
1467
await deploymentStateManager.DeleteSectionAsync(stateSection, context.
CancellationToken
).ConfigureAwait(false);
1468
await cleanupTask.CompleteAsync($"Deleted stale sandbox deployment {sectionName}", CompletionState.Completed, context.
CancellationToken
).ConfigureAwait(false);
1601
catch (Exception ex) when (ex is not OperationCanceledException || !context.
CancellationToken
.IsCancellationRequested)
1614
catch (Exception ex) when (ex is not OperationCanceledException || !context.
CancellationToken
.IsCancellationRequested)
1654
sandboxes = await client.ListSandboxesAsync(scope, labelSelector, context.
CancellationToken
).ConfigureAwait(false);
1676
diskImages = await client.ListDiskImagesAsync(scope, labelSelector, context.
CancellationToken
).ConfigureAwait(false);
2230
var effectiveCancellationToken = cancellationToken ?? context.
CancellationToken
;
2290
var effectiveCancellationToken = cancellationToken ?? context.
CancellationToken
;
AzureSandboxGroupResource.cs (1)
180
context.
CancellationToken
).ConfigureAwait(false);
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
;
439
var runtime = await context.Services.GetRequiredService<IContainerRuntimeResolver>().ResolveAsync(context.
CancellationToken
).ConfigureAwait(false);
443
context.
CancellationToken
).ConfigureAwait(false);
450
await runtime.ComposeUpAsync(composeContext, context.
CancellationToken
).ConfigureAwait(false);
454
var stateSection = await deploymentStateManager.AcquireSectionAsync($"DockerCompose:{Name}", context.
CancellationToken
).ConfigureAwait(false);
458
await deploymentStateManager.SaveSectionAsync(stateSection, context.
CancellationToken
).ConfigureAwait(false);
463
context.
CancellationToken
).ConfigureAwait(false);
467
await deployTask.CompleteAsync($"Compose deployment failed ({runtime.Name}): {ex.Message}", CompletionState.CompletedWithError, context.
CancellationToken
).ConfigureAwait(false);
485
var runtime = await context.Services.GetRequiredService<IContainerRuntimeResolver>().ResolveAsync(context.
CancellationToken
).ConfigureAwait(false);
489
context.
CancellationToken
).ConfigureAwait(false);
496
await runtime.ComposeDownAsync(composeContext, context.
CancellationToken
).ConfigureAwait(false);
501
context.
CancellationToken
).ConfigureAwait(false);
505
await deployTask.CompleteAsync($"Compose shutdown failed ({runtime.Name}): {ex.Message}", CompletionState.CompletedWithError, context.
CancellationToken
).ConfigureAwait(false);
536
context.
CancellationToken
).ConfigureAwait(false);
567
defaultValue ??= await parameter.GetValueAsync(context.
CancellationToken
).ConfigureAwait(false);
572
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 (11)
HostedAgent\AzureHostedAgentResource.cs (7)
106
var imageName = await ((IValueProvider)Image).GetValueAsync(context.
CancellationToken
).ConfigureAwait(false);
115
EnvironmentVariables = await GetResolvedEnvironmentVariablesAsync(context.ExecutionContext, this, Target, context.Logger, context.
CancellationToken
).ConfigureAwait(false),
160
var projectEndpoint = await project.Endpoint.GetValueAsync(context.
CancellationToken
).ConfigureAwait(false);
172
cancellationToken: context.
CancellationToken
175
await UpdateAgentEndpointProtocolsAsync(projectClient.AgentAdministrationClient, def, context.
CancellationToken
).ConfigureAwait(false);
248
var foundryResourceId = await project.Parent.Id.GetValueAsync(context.
CancellationToken
).ConfigureAwait(false);
275
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)
440
var manifest = await BuildClusterIssuerManifestAsync(context.Model, certManager, issuer, context.Logger, context.
CancellationToken
)
453
await File.WriteAllTextAsync(manifestPath, manifest, context.
CancellationToken
).ConfigureAwait(false);
478
var result = await resultTask.WaitAsync(context.
CancellationToken
).ConfigureAwait(false);
543
var result = await resultTask.WaitAsync(context.
CancellationToken
).ConfigureAwait(false);
Deployment\HelmDeploymentEngine.cs (23)
53
var resolvedRelease = await releaseAnnotation.ReleaseName.GetValueAsync(context.
CancellationToken
).ConfigureAwait(false);
77
var resolvedNs = await nsAnnotation.Namespace.GetValueAsync(context.
CancellationToken
).ConfigureAwait(false);
144
await HelmVersionValidator.EnsureMinimumVersionAsync(helmRunner, ctx.
CancellationToken
).ConfigureAwait(false);
203
var stateSection = await deploymentStateManager.AcquireSectionAsync($"Helm:{environment.Name}", ctx.
CancellationToken
).ConfigureAwait(false);
212
ctx.
CancellationToken
).ConfigureAwait(false);
226
await deploymentStateManager.DeleteSectionAsync(stateSection, ctx.
CancellationToken
).ConfigureAwait(false);
259
context.
CancellationToken
).ConfigureAwait(false);
269
await ResolveAndWriteDeployValuesAsync(outputPath, environment, context.
CancellationToken
).ConfigureAwait(false);
274
context.
CancellationToken
).ConfigureAwait(false);
281
context.
CancellationToken
).ConfigureAwait(false);
428
context.
CancellationToken
).ConfigureAwait(false);
476
cancellationToken: context.
CancellationToken
).ConfigureAwait(false);
491
var stateSection = await deploymentStateManager.AcquireSectionAsync($"Helm:{environment.Name}", context.
CancellationToken
).ConfigureAwait(false);
494
await deploymentStateManager.SaveSectionAsync(stateSection, context.
CancellationToken
).ConfigureAwait(false);
499
context.
CancellationToken
).ConfigureAwait(false);
507
context.
CancellationToken
).ConfigureAwait(false);
529
var endpoints = await GetServiceEndpointsAsync(computeResource.Name.ToServiceName(), @namespace, environment.KubeConfigPath, context.Logger, context.
CancellationToken
).ConfigureAwait(false);
605
context.
CancellationToken
).ConfigureAwait(false);
616
context.
CancellationToken
).ConfigureAwait(false);
633
cancellationToken: context.
CancellationToken
).ConfigureAwait(false);
644
context.
CancellationToken
).ConfigureAwait(false);
652
context.
CancellationToken
).ConfigureAwait(false);
696
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);
1401
var resolvedNs = await nsAnnotation.Namespace.GetValueAsync(context.
CancellationToken
).ConfigureAwait(false);
1411
var secretName = await ResolveExpressionAtDeployTimeAsync(secretNameExpr, context.
CancellationToken
).ConfigureAwait(false);
1484
await File.WriteAllTextAsync(patchFilePath, patchJson, context.
CancellationToken
).ConfigureAwait(false);
1512
var patchExitResult = await patchResult.WaitAsync(context.
CancellationToken
).ConfigureAwait(false);
1572
var result = await checkResult.WaitAsync(context.
CancellationToken
).ConfigureAwait(false);
1597
await File.WriteAllTextAsync(certPath, certPem, context.
CancellationToken
).ConfigureAwait(false);
1598
await File.WriteAllTextAsync(keyPath, keyPem, context.
CancellationToken
).ConfigureAwait(false);
1617
var createExitResult = await createResult.WaitAsync(context.
CancellationToken
).ConfigureAwait(false);
1716
}, context.
CancellationToken
).ConfigureAwait(false);
1797
var result = await getResult.WaitAsync(context.
CancellationToken
).ConfigureAwait(false);
1855
var resolvedNs = await nsAnnotation.Namespace.GetValueAsync(context.
CancellationToken
).ConfigureAwait(false);
1885
getExit = (await getResult.WaitAsync(context.
CancellationToken
).ConfigureAwait(false)).ExitCode;
1930
await File.WriteAllTextAsync(patchFilePath, patchJson, context.
CancellationToken
).ConfigureAwait(false);
1949
var patchExit = (await patchResult.WaitAsync(context.
CancellationToken
).ConfigureAwait(false)).ExitCode;
2060
var exitResult = await getResult.WaitAsync(context.
CancellationToken
).ConfigureAwait(false);
2111
await File.WriteAllTextAsync(manifestPath, minimal.ToJsonString(), context.
CancellationToken
).ConfigureAwait(false);
2130
var applyExitResult = await applyResult.WaitAsync(context.
CancellationToken
).ConfigureAwait(false);
2159
var resolvedNs = await nsAnnotation.Namespace.GetValueAsync(context.
CancellationToken
).ConfigureAwait(false);
2189
var secretName = await ResolveExpressionAtDeployTimeAsync(secretNameExpr, context.
CancellationToken
).ConfigureAwait(false);
2190
var hostname = await ResolveExpressionAtDeployTimeAsync(hostnameExpr, context.
CancellationToken
).ConfigureAwait(false);
2209
var result = await checkResult.WaitAsync(context.
CancellationToken
).ConfigureAwait(false);
2234
await File.WriteAllTextAsync(certPath, certPem, context.
CancellationToken
).ConfigureAwait(false);
2235
await File.WriteAllTextAsync(keyPath, keyPem, context.
CancellationToken
).ConfigureAwait(false);
2254
var createExitResult = await createResult.WaitAsync(context.
CancellationToken
).ConfigureAwait(false);
KubernetesHelmChartExtensions.cs (7)
353
cancellationToken: context.
CancellationToken
).ConfigureAwait(false);
371
.AcquireSectionAsync(GetStateSectionName(environment, chart), context.
CancellationToken
)
375
await deploymentStateManager.SaveSectionAsync(stateSection, context.
CancellationToken
).ConfigureAwait(false);
403
.AcquireSectionAsync(GetStateSectionName(environment, chart), context.
CancellationToken
)
417
context.
CancellationToken
).ConfigureAwait(false);
447
cancellationToken: context.
CancellationToken
).ConfigureAwait(false);
459
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);