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