91 references to CancellationToken
Aspire.Hosting (11)
ApplicationModel\ProjectResource.cs (6)
101ctx.CancellationToken).ConfigureAwait(false); 120await containerRuntime.TagImageAsync(originalImageName, tempImageName, ctx.CancellationToken).ConfigureAwait(false); 131var containerWorkingDir = await GetContainerWorkingDirectoryAsync(projectMetadata.ProjectPath, logger, ctx.CancellationToken).ConfigureAwait(false); 145await dockerfileBuilder.WriteAsync(writer, ctx.CancellationToken).ConfigureAwait(false); 162ctx.CancellationToken).ConfigureAwait(false); 193await containerRuntime.RemoveImageAsync(tempImageName, ctx.CancellationToken).ConfigureAwait(false);
ContainerResourceBuilderExtensions.cs (1)
51ctx.CancellationToken).ConfigureAwait(false);
Pipelines\DistributedApplicationPipeline.cs (2)
79context.CancellationToken).ConfigureAwait(false); 99await parameterProcessor.InitializeParametersAsync(context.Model, waitForResolution: true, context.CancellationToken).ConfigureAwait(false);
Publishing\ManifestPublishingExtensions.cs (2)
66var publishingContext = new ManifestPublishingContext(executionContext, manifestPath, jsonWriter, context.CancellationToken); 68await publishingContext.WriteModel(context.Model, context.CancellationToken).ConfigureAwait(false);
Aspire.Hosting.Azure (22)
AzureBicepResource.cs (6)
319.CreateTaskAsync($"Deploying **{resource.Name}**", context.CancellationToken) 327configuration, resource, context.CancellationToken).ConfigureAwait(false)) 333context.CancellationToken).ConfigureAwait(false); 338resource, provisioningContext, context.CancellationToken) 344context.CancellationToken).ConfigureAwait(false); 359context.CancellationToken).ConfigureAwait(false);
AzureEnvironmentResource.cs (4)
93var provisioningContext = await provisioningContextProvider.CreateProvisioningContextAsync(ctx.CancellationToken).ConfigureAwait(false); 143await tokenCredentialProvider.TokenCredential.GetTokenAsync(tokenRequest, context.CancellationToken) 149context.CancellationToken).ConfigureAwait(false); 156context.CancellationToken).ConfigureAwait(false);
AzureEnvironmentResourceHelpers.cs (12)
34var registryName = await registry.Name.GetValueAsync(context.CancellationToken).ConfigureAwait(false) ?? 37var registryEndpoint = await registry.Endpoint.GetValueAsync(context.CancellationToken).ConfigureAwait(false) ?? 40var loginTask = await context.ReportingStep.CreateTaskAsync($"Logging in to **{registryName}**", context.CancellationToken).ConfigureAwait(false); 55context.CancellationToken).ConfigureAwait(false); 57await loginTask.CompleteAsync($"Successfully logged in to **{registryEndpoint}**", CompletionState.Completed, context.CancellationToken).ConfigureAwait(false); 61await loginTask.FailAsync($"Login to ACR **{registryEndpoint}** failed: {ex.Message}", cancellationToken: context.CancellationToken).ConfigureAwait(false); 69var registryName = await registry.Name.GetValueAsync(context.CancellationToken).ConfigureAwait(false) ?? 78var targetTag = await cir.GetValueAsync(context.CancellationToken).ConfigureAwait(false); 80var pushTask = await context.ReportingStep.CreateTaskAsync($"Pushing **{resource.Name}** to **{registryName}**", context.CancellationToken).ConfigureAwait(false); 89await TagAndPushImage(localImageName, targetTag, context.CancellationToken, containerImageBuilder).ConfigureAwait(false); 90await pushTask.CompleteAsync($"Successfully pushed **{resource.Name}** to `{targetTag}`", CompletionState.Completed, context.CancellationToken).ConfigureAwait(false); 94await pushTask.CompleteAsync($"Failed to push **{resource.Name}**: {ex.Message}", CompletionState.CompletedWithError, context.CancellationToken).ConfigureAwait(false);
Aspire.Hosting.Azure.AppContainers (3)
AzureContainerAppEnvironmentResource.cs (2)
138var domainValue = await ContainerAppDomain.GetValueAsync(context.CancellationToken).ConfigureAwait(false); 145context.CancellationToken).ConfigureAwait(false);
AzureContainerAppResource.cs (1)
81var domainValue = await containerAppEnv.ContainerAppDomain.GetValueAsync(ctx.CancellationToken).ConfigureAwait(false);
Aspire.Hosting.Azure.AppService (3)
AzureAppServiceEnvironmentResource.cs (2)
141var dashboardUri = await DashboardUriReference.GetValueAsync(context.CancellationToken).ConfigureAwait(false); 146context.CancellationToken).ConfigureAwait(false);
AzureAppServiceWebSiteResource.cs (1)
79var websiteSuffix = await computerEnv.WebSiteSuffix.GetValueAsync(ctx.CancellationToken).ConfigureAwait(false);
Aspire.Hosting.Docker (12)
DockerComposeEnvironmentResource.cs (12)
193context.CancellationToken); 209var deployTask = await context.ReportingStep.CreateTaskAsync($"Running docker compose up for **{Name}**", context.CancellationToken).ConfigureAwait(false); 244.WaitAsync(context.CancellationToken) 249await deployTask.FailAsync($"docker compose up failed with exit code {processResult.ExitCode}", cancellationToken: context.CancellationToken).ConfigureAwait(false); 253await deployTask.CompleteAsync($"Service **{Name}** is now running with Docker Compose locally", CompletionState.Completed, context.CancellationToken).ConfigureAwait(false); 259await deployTask.CompleteAsync($"Docker Compose deployment failed: {ex.Message}", CompletionState.CompletedWithError, context.CancellationToken).ConfigureAwait(false); 276var deployTask = await context.ReportingStep.CreateTaskAsync($"Running docker compose down for **{Name}**", context.CancellationToken).ConfigureAwait(false); 303.WaitAsync(context.CancellationToken) 308await deployTask.FailAsync($"docker compose down failed with exit code {processResult.ExitCode}", cancellationToken: context.CancellationToken).ConfigureAwait(false); 312await deployTask.CompleteAsync($"Docker Compose shutdown complete for **{Name}**", CompletionState.Completed, context.CancellationToken).ConfigureAwait(false); 318await deployTask.CompleteAsync($"Docker Compose shutdown failed: {ex.Message}", CompletionState.CompletedWithError, context.CancellationToken).ConfigureAwait(false); 342defaultValue = await parameter.GetValueAsync(context.CancellationToken).ConfigureAwait(false);
Aspire.Hosting.Kubernetes (1)
KubernetesEnvironmentResource.cs (1)
119context.CancellationToken);
Aspire.Hosting.Tests (3)
Helpers\JsonDocumentManifestPublisher.cs (3)
84var publishingContext = new ManifestPublishingContext(executionContext, manifestPath, writer, context.CancellationToken); 86await publishingContext.WriteModel(context.Model, context.CancellationToken).ConfigureAwait(false); 89manifestStore.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) 89context.CancellationToken).ConfigureAwait(false); 93var userObjectId = await getUserProcess.StandardOutput.ReadToEndAsync(context.CancellationToken).ConfigureAwait(false); 96await getUserProcess.WaitForExitAsync(context.CancellationToken).ConfigureAwait(false); 100var error = await getUserProcess.StandardError.ReadToEndAsync(context.CancellationToken).ConfigureAwait(false); 104context.CancellationToken).ConfigureAwait(false); 124context.CancellationToken).ConfigureAwait(false); 128var subscriptionId = await getSubscriptionProcess.StandardOutput.ReadToEndAsync(context.CancellationToken).ConfigureAwait(false); 131await getSubscriptionProcess.WaitForExitAsync(context.CancellationToken).ConfigureAwait(false); 135var error = await getSubscriptionProcess.StandardError.ReadToEndAsync(context.CancellationToken).ConfigureAwait(false); 139context.CancellationToken).ConfigureAwait(false); 159context.CancellationToken).ConfigureAwait(false); 163var resourceGroup = await getResourceGroupProcess.StandardOutput.ReadToEndAsync(context.CancellationToken).ConfigureAwait(false); 166await getResourceGroupProcess.WaitForExitAsync(context.CancellationToken).ConfigureAwait(false); 170var error = await getResourceGroupProcess.StandardError.ReadToEndAsync(context.CancellationToken).ConfigureAwait(false); 174context.CancellationToken).ConfigureAwait(false); 197context.CancellationToken).ConfigureAwait(false); 201await assignRoleProcess.WaitForExitAsync(context.CancellationToken).ConfigureAwait(false); 205var error = await assignRoleProcess.StandardError.ReadToEndAsync(context.CancellationToken).ConfigureAwait(false); 209context.CancellationToken).ConfigureAwait(false); 216context.CancellationToken).ConfigureAwait(false); 223context.CancellationToken).ConfigureAwait(false); 265.CreateTaskAsync($"Uploading {Path.GetFileName(sourcePath)} to {fileShareName}", deployingContext.CancellationToken) 275deployingContext.CancellationToken).ConfigureAwait(false); 305await directoryClient.CreateIfNotExistsAsync(cancellationToken: deployingContext.CancellationToken).ConfigureAwait(false); 313await fileClient.CreateAsync(fileStream.Length, cancellationToken: deployingContext.CancellationToken).ConfigureAwait(false); 314await fileClient.UploadAsync(fileStream, cancellationToken: deployingContext.CancellationToken).ConfigureAwait(false); 320deployingContext.CancellationToken).ConfigureAwait(false);
Pipelines.Library (1)
DistributedApplicationPipelineExtensions.cs (1)
47context.CancellationToken).ConfigureAwait(false);
Publishers.AppHost (7)
DistributedApplicationBuilderExtensions.cs (7)
120cancellationToken: context.CancellationToken); 146cancellationToken: context.CancellationToken); 161cancellationToken: context.CancellationToken); 182cancellationToken: context.CancellationToken); 196cancellationToken: context.CancellationToken); 211cancellationToken: context.CancellationToken); 231cancellationToken: context.CancellationToken);