121 references to CancellationToken
Aspire.Hosting (26)
ApplicationModel\ProjectResource.cs (7)
131
await containerImageBuilder.BuildImageAsync(this, ctx.
CancellationToken
).ConfigureAwait(false);
150
await containerRuntime.TagImageAsync(originalImageName, tempImageName, ctx.
CancellationToken
).ConfigureAwait(false);
161
var containerWorkingDir = await GetContainerWorkingDirectoryAsync(projectMetadata.ProjectPath, logger, ctx.
CancellationToken
).ConfigureAwait(false);
179
await dockerfileBuilder.WriteAsync(writer, ctx.
CancellationToken
).ConfigureAwait(false);
189
cancellationToken: ctx.
CancellationToken
).ConfigureAwait(false);
204
ctx.
CancellationToken
).ConfigureAwait(false);
235
await containerRuntime.RemoveImageAsync(tempImageName, ctx.
CancellationToken
).ConfigureAwait(false);
ContainerResourceBuilderExtensions.cs (1)
50
ctx.
CancellationToken
).ConfigureAwait(false);
Pipelines\DistributedApplicationPipeline.cs (3)
53
await parameterProcessor.InitializeParametersAsync(context.Model, waitForResolution: true, context.
CancellationToken
).ConfigureAwait(false);
99
context.
CancellationToken
).ConfigureAwait(false);
185
context.
CancellationToken
).ConfigureAwait(false);
Pipelines\PipelineStepHelpers.cs (13)
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);
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)
67
var publishingContext = new ManifestPublishingContext(executionContext, manifestPath, jsonWriter, context.
CancellationToken
);
69
await publishingContext.WriteModel(context.Model, context.
CancellationToken
).ConfigureAwait(false);
Aspire.Hosting.Azure (10)
AzureBicepResource.cs (6)
321
.CreateTaskAsync(new MarkdownString($"Deploying **{resource.Name}**"), context.
CancellationToken
)
329
configuration, resource, context.
CancellationToken
).ConfigureAwait(false))
335
context.
CancellationToken
).ConfigureAwait(false);
340
resource, provisioningContext, context.
CancellationToken
)
346
context.
CancellationToken
).ConfigureAwait(false);
361
context.
CancellationToken
).ConfigureAwait(false);
AzureEnvironmentResource.cs (4)
96
var provisioningContext = await provisioningContextProvider.CreateProvisioningContextAsync(ctx.
CancellationToken
).ConfigureAwait(false);
172
await tokenCredentialProvider.TokenCredential.GetTokenAsync(tokenRequest, context.
CancellationToken
)
178
context.
CancellationToken
).ConfigureAwait(false);
185
context.
CancellationToken
).ConfigureAwait(false);
Aspire.Hosting.Azure.AppContainers (3)
AzureContainerAppEnvironmentResource.cs (2)
131
var domainValue = await ContainerAppDomain.GetValueAsync(context.
CancellationToken
).ConfigureAwait(false);
140
context.
CancellationToken
).ConfigureAwait(false);
AzureContainerAppResource.cs (1)
50
var domainValue = await containerAppEnv.ContainerAppDomain.GetValueAsync(ctx.
CancellationToken
).ConfigureAwait(false);
Aspire.Hosting.Azure.AppService (7)
AzureAppServiceEnvironmentResource.cs (5)
146
var dashboardUri = await DashboardUriReference.GetValueAsync(context.
CancellationToken
).ConfigureAwait(false);
156
context.
CancellationToken
).ConfigureAwait(false);
167
context.
CancellationToken
).ConfigureAwait(false);
208
context.
CancellationToken
).ConfigureAwait(false);
217
context.
CancellationToken
).ConfigureAwait(false);
AzureAppServiceWebSiteResource.cs (2)
55
await computerEnv.DeploymentSlotParameter.GetValueAsync(ctx.
CancellationToken
).ConfigureAwait(false);
111
var websiteSuffix = await computerEnv.WebSiteSuffix.GetValueAsync(context.
CancellationToken
).ConfigureAwait(false);
Aspire.Hosting.Azure.ContainerRegistry (6)
AzureContainerRegistryHelpers.cs (6)
29
var registryName = await registry.Name.GetValueAsync(context.
CancellationToken
).ConfigureAwait(false) ??
32
var registryEndpoint = await registry.Endpoint.GetValueAsync(context.
CancellationToken
).ConfigureAwait(false) ??
37
context.
CancellationToken
).ConfigureAwait(false);
52
context.
CancellationToken
).ConfigureAwait(false);
57
context.
CancellationToken
).ConfigureAwait(false);
63
context.
CancellationToken
).ConfigureAwait(false);
Aspire.Hosting.Docker (14)
DockerComposeEnvironmentResource.cs (13)
212
context.
CancellationToken
);
229
context.
CancellationToken
).ConfigureAwait(false);
260
.WaitAsync(context.
CancellationToken
)
265
await deployTask.FailAsync($"docker compose up failed with exit code {processResult.ExitCode}", cancellationToken: context.
CancellationToken
).ConfigureAwait(false);
272
context.
CancellationToken
).ConfigureAwait(false);
278
await deployTask.CompleteAsync($"Docker Compose deployment failed: {ex.Message}", CompletionState.CompletedWithError, context.
CancellationToken
).ConfigureAwait(false);
296
context.
CancellationToken
).ConfigureAwait(false);
319
.WaitAsync(context.
CancellationToken
)
324
await deployTask.FailAsync($"docker compose down failed with exit code {processResult.ExitCode}", cancellationToken: context.
CancellationToken
).ConfigureAwait(false);
331
context.
CancellationToken
).ConfigureAwait(false);
337
await deployTask.CompleteAsync($"Docker Compose shutdown failed: {ex.Message}", CompletionState.CompletedWithError, context.
CancellationToken
).ConfigureAwait(false);
362
defaultValue = await parameter.GetValueAsync(context.
CancellationToken
).ConfigureAwait(false);
367
defaultValue = await ((IValueProvider)cir).GetValueAsync(context.
CancellationToken
).ConfigureAwait(false);
DockerComposeServiceResource.cs (1)
402
.WaitAsync(context.
CancellationToken
)
Aspire.Hosting.Foundry (6)
HostedAgent\AzureHostedAgentResource.cs (4)
98
var imageName = await ((IValueProvider)Image).GetValueAsync(context.
CancellationToken
).ConfigureAwait(false);
107
EnvironmentVariables = await GetResolvedEnvironmentVariablesAsync(context.ExecutionContext, Target, context.Logger, context.
CancellationToken
).ConfigureAwait(false),
137
var projectEndpoint = await project.Endpoint.GetValueAsync(context.
CancellationToken
).ConfigureAwait(false);
147
context.
CancellationToken
HostedAgent\AzurePromptAgentResource.cs (2)
114
var projectEndpoint = await project.Endpoint.GetValueAsync(context.
CancellationToken
).ConfigureAwait(false);
134
context.
CancellationToken
Aspire.Hosting.Kubernetes (1)
KubernetesEnvironmentResource.cs (1)
126
context.
CancellationToken
);
Aspire.Hosting.Tests (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)
121
cancellationToken: context.
CancellationToken
);
147
cancellationToken: context.
CancellationToken
);
162
cancellationToken: context.
CancellationToken
);
183
cancellationToken: context.
CancellationToken
);
197
cancellationToken: context.
CancellationToken
);
212
cancellationToken: context.
CancellationToken
);
232
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);