91 references to CancellationToken
Aspire.Hosting (11)
ApplicationModel\ProjectResource.cs (6)
101
ctx.
CancellationToken
).ConfigureAwait(false);
120
await containerRuntime.TagImageAsync(originalImageName, tempImageName, ctx.
CancellationToken
).ConfigureAwait(false);
131
var containerWorkingDir = await GetContainerWorkingDirectoryAsync(projectMetadata.ProjectPath, logger, ctx.
CancellationToken
).ConfigureAwait(false);
145
await dockerfileBuilder.WriteAsync(writer, ctx.
CancellationToken
).ConfigureAwait(false);
162
ctx.
CancellationToken
).ConfigureAwait(false);
193
await containerRuntime.RemoveImageAsync(tempImageName, ctx.
CancellationToken
).ConfigureAwait(false);
ContainerResourceBuilderExtensions.cs (1)
51
ctx.
CancellationToken
).ConfigureAwait(false);
Pipelines\DistributedApplicationPipeline.cs (2)
79
context.
CancellationToken
).ConfigureAwait(false);
99
await parameterProcessor.InitializeParametersAsync(context.Model, waitForResolution: true, 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 (22)
AzureBicepResource.cs (6)
319
.CreateTaskAsync($"Deploying **{resource.Name}**", context.
CancellationToken
)
327
configuration, resource, context.
CancellationToken
).ConfigureAwait(false))
333
context.
CancellationToken
).ConfigureAwait(false);
338
resource, provisioningContext, context.
CancellationToken
)
344
context.
CancellationToken
).ConfigureAwait(false);
359
context.
CancellationToken
).ConfigureAwait(false);
AzureEnvironmentResource.cs (4)
93
var provisioningContext = await provisioningContextProvider.CreateProvisioningContextAsync(ctx.
CancellationToken
).ConfigureAwait(false);
143
await tokenCredentialProvider.TokenCredential.GetTokenAsync(tokenRequest, context.
CancellationToken
)
149
context.
CancellationToken
).ConfigureAwait(false);
156
context.
CancellationToken
).ConfigureAwait(false);
AzureEnvironmentResourceHelpers.cs (12)
34
var registryName = await registry.Name.GetValueAsync(context.
CancellationToken
).ConfigureAwait(false) ??
37
var registryEndpoint = await registry.Endpoint.GetValueAsync(context.
CancellationToken
).ConfigureAwait(false) ??
40
var loginTask = await context.ReportingStep.CreateTaskAsync($"Logging in to **{registryName}**", context.
CancellationToken
).ConfigureAwait(false);
55
context.
CancellationToken
).ConfigureAwait(false);
57
await loginTask.CompleteAsync($"Successfully logged in to **{registryEndpoint}**", CompletionState.Completed, context.
CancellationToken
).ConfigureAwait(false);
61
await loginTask.FailAsync($"Login to ACR **{registryEndpoint}** failed: {ex.Message}", cancellationToken: context.
CancellationToken
).ConfigureAwait(false);
69
var registryName = await registry.Name.GetValueAsync(context.
CancellationToken
).ConfigureAwait(false) ??
78
var targetTag = await cir.GetValueAsync(context.
CancellationToken
).ConfigureAwait(false);
80
var pushTask = await context.ReportingStep.CreateTaskAsync($"Pushing **{resource.Name}** to **{registryName}**", context.
CancellationToken
).ConfigureAwait(false);
89
await TagAndPushImage(localImageName, targetTag, context.
CancellationToken
, containerImageBuilder).ConfigureAwait(false);
90
await pushTask.CompleteAsync($"Successfully pushed **{resource.Name}** to `{targetTag}`", CompletionState.Completed, context.
CancellationToken
).ConfigureAwait(false);
94
await pushTask.CompleteAsync($"Failed to push **{resource.Name}**: {ex.Message}", CompletionState.CompletedWithError, context.
CancellationToken
).ConfigureAwait(false);
Aspire.Hosting.Azure.AppContainers (3)
AzureContainerAppEnvironmentResource.cs (2)
138
var domainValue = await ContainerAppDomain.GetValueAsync(context.
CancellationToken
).ConfigureAwait(false);
145
context.
CancellationToken
).ConfigureAwait(false);
AzureContainerAppResource.cs (1)
81
var domainValue = await containerAppEnv.ContainerAppDomain.GetValueAsync(ctx.
CancellationToken
).ConfigureAwait(false);
Aspire.Hosting.Azure.AppService (3)
AzureAppServiceEnvironmentResource.cs (2)
141
var dashboardUri = await DashboardUriReference.GetValueAsync(context.
CancellationToken
).ConfigureAwait(false);
146
context.
CancellationToken
).ConfigureAwait(false);
AzureAppServiceWebSiteResource.cs (1)
79
var websiteSuffix = await computerEnv.WebSiteSuffix.GetValueAsync(ctx.
CancellationToken
).ConfigureAwait(false);
Aspire.Hosting.Docker (12)
DockerComposeEnvironmentResource.cs (12)
193
context.
CancellationToken
);
209
var deployTask = await context.ReportingStep.CreateTaskAsync($"Running docker compose up for **{Name}**", context.
CancellationToken
).ConfigureAwait(false);
244
.WaitAsync(context.
CancellationToken
)
249
await deployTask.FailAsync($"docker compose up failed with exit code {processResult.ExitCode}", cancellationToken: context.
CancellationToken
).ConfigureAwait(false);
253
await deployTask.CompleteAsync($"Service **{Name}** is now running with Docker Compose locally", CompletionState.Completed, context.
CancellationToken
).ConfigureAwait(false);
259
await deployTask.CompleteAsync($"Docker Compose deployment failed: {ex.Message}", CompletionState.CompletedWithError, context.
CancellationToken
).ConfigureAwait(false);
276
var deployTask = await context.ReportingStep.CreateTaskAsync($"Running docker compose down for **{Name}**", context.
CancellationToken
).ConfigureAwait(false);
303
.WaitAsync(context.
CancellationToken
)
308
await deployTask.FailAsync($"docker compose down failed with exit code {processResult.ExitCode}", cancellationToken: context.
CancellationToken
).ConfigureAwait(false);
312
await deployTask.CompleteAsync($"Docker Compose shutdown complete for **{Name}**", CompletionState.Completed, context.
CancellationToken
).ConfigureAwait(false);
318
await deployTask.CompleteAsync($"Docker Compose shutdown failed: {ex.Message}", CompletionState.CompletedWithError, context.
CancellationToken
).ConfigureAwait(false);
342
defaultValue = await parameter.GetValueAsync(context.
CancellationToken
).ConfigureAwait(false);
Aspire.Hosting.Kubernetes (1)
KubernetesEnvironmentResource.cs (1)
119
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)
120
cancellationToken: context.
CancellationToken
);
146
cancellationToken: context.
CancellationToken
);
161
cancellationToken: context.
CancellationToken
);
182
cancellationToken: context.
CancellationToken
);
196
cancellationToken: context.
CancellationToken
);
211
cancellationToken: context.
CancellationToken
);
231
cancellationToken: context.
CancellationToken
);