290 references to CancellationToken
Aspire.Hosting (35)
ApplicationModel\ProjectResource.cs (8)
115await containerImageBuilder.BuildImageAsync(this, ctx.CancellationToken).ConfigureAwait(false); 131var containerRuntime = await ctx.Services.GetRequiredService<IContainerRuntimeResolver>().ResolveAsync(ctx.CancellationToken).ConfigureAwait(false); 134await containerRuntime.TagImageAsync(originalImageName, tempImageName, ctx.CancellationToken).ConfigureAwait(false); 145var containerWorkingDir = await GetContainerWorkingDirectoryAsync(projectMetadata.ProjectPath, logger, ctx.CancellationToken).ConfigureAwait(false); 163await dockerfileBuilder.WriteAsync(writer, ctx.CancellationToken).ConfigureAwait(false); 174ctx.CancellationToken).ConfigureAwait(false); 189ctx.CancellationToken).ConfigureAwait(false); 220await containerRuntime.RemoveImageAsync(tempImageName, ctx.CancellationToken).ConfigureAwait(false);
ContainerResourceBuilderExtensions.cs (1)
73ctx.CancellationToken).ConfigureAwait(false);
Pipelines\DistributedApplicationPipeline.cs (10)
56await parameterProcessor.InitializeParametersAsync(context.Model, waitForResolution: true, context.CancellationToken).ConfigureAwait(false); 103context.CancellationToken).ConfigureAwait(false); 113await deploymentStateManager.ClearAllStateAsync(context.CancellationToken).ConfigureAwait(false); 165var containerRuntime = await runtimeResolver.ResolveAsync(context.CancellationToken).ConfigureAwait(false); 167if (await containerRuntime.CheckIfRunningAsync(context.CancellationToken).ConfigureAwait(false)) 183cancellationToken: context.CancellationToken).ConfigureAwait(false); 191using var waitCts = CancellationTokenSource.CreateLinkedTokenSource(context.CancellationToken); 203catch (OperationCanceledException) when (!context.CancellationToken.IsCancellationRequested) 245context.CancellationToken).ConfigureAwait(false); 370await deploymentStateManager.ClearAllStateAsync(context.CancellationToken).ConfigureAwait(false);
Pipelines\PipelineStepHelpers.cs (14)
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); 87var containerRuntime = await context.Services.GetRequiredService<IContainerRuntimeResolver>().ResolveAsync(context.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)
68var publishingContext = new ManifestPublishingContext(executionContext, manifestPath, jsonWriter, context.CancellationToken); 70await publishingContext.WriteModel(context.Model, context.CancellationToken).ConfigureAwait(false);
Aspire.Hosting.Azure (26)
AzureBicepResource.cs (6)
346.CreateTaskAsync(new MarkdownString($"Deploying **{resource.Name}**"), context.CancellationToken) 354resource, context.CancellationToken).ConfigureAwait(false)) 360context.CancellationToken).ConfigureAwait(false); 365resource, provisioningContext, context.CancellationToken) 371context.CancellationToken).ConfigureAwait(false); 386context.CancellationToken).ConfigureAwait(false);
AzureEnvironmentResource.cs (20)
87await preparer.PrepareResourcesAsync(context.Model, context.CancellationToken).ConfigureAwait(false); 120var provisioningContext = await provisioningContextProvider.CreateProvisioningContextAsync(ctx.CancellationToken).ConfigureAwait(false); 205await tokenCredentialProvider.TokenCredential.GetTokenAsync(tokenRequest, context.CancellationToken) 211context.CancellationToken).ConfigureAwait(false); 218context.CancellationToken).ConfigureAwait(false); 230var azureStateSection = await deploymentStateManager.AcquireSectionAsync("Azure", context.CancellationToken).ConfigureAwait(false); 240context.CancellationToken).ConfigureAwait(false); 258var (subscription, _) = await armClient.GetSubscriptionAndTenantAsync(context.CancellationToken).ConfigureAwait(false); 265var rgResponse = await resourceGroups.GetAsync(resourceGroupName, context.CancellationToken).ConfigureAwait(false); 274context.CancellationToken).ConfigureAwait(false); 284context.CancellationToken).ConfigureAwait(false); 289await foreach (var resource in resourceGroup.GetResourcesAsync(context.CancellationToken).ConfigureAwait(false)) 299context.CancellationToken).ConfigureAwait(false); 314context.CancellationToken).ConfigureAwait(false); 324context.CancellationToken).ConfigureAwait(false); 348context.CancellationToken).ConfigureAwait(false); 360context.CancellationToken).ConfigureAwait(false); 365await resourceGroup.DeleteAsync(WaitUntil.Started, context.CancellationToken).ConfigureAwait(false); 375context.CancellationToken).ConfigureAwait(false); 382context.CancellationToken).ConfigureAwait(false);
Aspire.Hosting.Azure.AppContainers (5)
AzureContainerAppEnvironmentResource.cs (3)
158var domainValue = await ContainerAppDomain.GetValueAsync(context.CancellationToken).ConfigureAwait(false); 167context.CancellationToken).ConfigureAwait(false); 182var cancellationToken = context.CancellationToken;
AzureContainerAppResource.cs (2)
50var domainValue = await containerAppEnv.ContainerAppDomain.GetValueAsync(ctx.CancellationToken).ConfigureAwait(false); 51var portalLink = await ContainerAppUrls.GetPortalLinkAsync(containerAppEnv, targetResource.Name.ToLowerInvariant(), ctx.CancellationToken).ConfigureAwait(false);
Aspire.Hosting.Azure.AppService (9)
AzureAppServiceEnvironmentResource.cs (6)
185var cancellationToken = context.CancellationToken; 242var dashboardUri = await DashboardUriReference.GetValueAsync(context.CancellationToken).ConfigureAwait(false); 252context.CancellationToken).ConfigureAwait(false); 263context.CancellationToken).ConfigureAwait(false); 304context.CancellationToken).ConfigureAwait(false); 313context.CancellationToken).ConfigureAwait(false);
AzureAppServiceWebSiteResource.cs (3)
55await computerEnv.DeploymentSlotParameter.GetValueAsync(ctx.CancellationToken).ConfigureAwait(false); 61var portalLink = await AppSvcUrls.GetPortalLinkAsync(computerEnv, websiteName, deploymentSlot, ctx.CancellationToken).ConfigureAwait(false); 114var websiteSuffix = await computerEnv.WebSiteSuffix.GetValueAsync(context.CancellationToken).ConfigureAwait(false);
Aspire.Hosting.Azure.ContainerRegistry (6)
AzureContainerRegistryHelpers.cs (6)
28var registryName = await registry.Name.GetValueAsync(context.CancellationToken).ConfigureAwait(false) ?? 31var registryEndpoint = await registry.Endpoint.GetValueAsync(context.CancellationToken).ConfigureAwait(false) ?? 36context.CancellationToken).ConfigureAwait(false); 51context.CancellationToken).ConfigureAwait(false); 56context.CancellationToken).ConfigureAwait(false); 62context.CancellationToken).ConfigureAwait(false);
Aspire.Hosting.Azure.Kubernetes (12)
AzureKubernetesEnvironmentResource.AksPipeline.cs (12)
214context.CancellationToken).ConfigureAwait(false); 223var clusterName = await NameOutputReference.GetValueAsync(context.CancellationToken).ConfigureAwait(false) 241context.CancellationToken).ConfigureAwait(false); 279await File.WriteAllTextAsync(kubeConfigPath, kubeConfigContent, context.CancellationToken).ConfigureAwait(false); 310context.CancellationToken).ConfigureAwait(false); 316context.CancellationToken).ConfigureAwait(false); 350context.CancellationToken).ConfigureAwait(false); 371var subnetId = await ((IValueProvider)lb.SubnetIdReference).GetValueAsync(context.CancellationToken).ConfigureAwait(false); 389context.CancellationToken).ConfigureAwait(false); 457var result = await applyResultTask.WaitAsync(context.CancellationToken).ConfigureAwait(false); 482context.CancellationToken).ConfigureAwait(false); 488context.CancellationToken).ConfigureAwait(false);
Aspire.Hosting.Azure.Sandboxes (46)
AzureSandboxContainerDeployment.cs (46)
238context.CancellationToken).ConfigureAwait(false); 239var stateSection = await deploymentStateManager.AcquireSectionAsync(GetStateSectionName(resource), context.CancellationToken).ConfigureAwait(false); 263await deploymentStateManager.SaveSectionAsync(stateSection, context.CancellationToken).ConfigureAwait(false); 281var diskTask = await context.ReportingStep.CreateTaskAsync($"Creating sandbox disk image for {targetResource.Name}", context.CancellationToken).ConfigureAwait(false); 294await diskTask.CompleteAsync($"Created sandbox disk image {diskImageId}", CompletionState.Completed, context.CancellationToken).ConfigureAwait(false); 308var createTask = await context.ReportingStep.CreateTaskAsync($"Creating sandbox for {targetResource.Name}", context.CancellationToken).ConfigureAwait(false); 320await createTask.CompleteAsync($"Created sandbox {sandboxId}", CompletionState.Completed, context.CancellationToken).ConfigureAwait(false); 325var lifecycleTask = await context.ReportingStep.CreateTaskAsync($"Configuring lifecycle for {resource.Name}", context.CancellationToken).ConfigureAwait(false); 332context.CancellationToken).ConfigureAwait(false); 333await lifecycleTask.CompleteAsync("Lifecycle policy configured", CompletionState.Completed, context.CancellationToken).ConfigureAwait(false); 340var exposeTask = await context.ReportingStep.CreateTaskAsync($"Exposing sandbox port {endpoint.TargetPort}", context.CancellationToken).ConfigureAwait(false); 349await WaitForPublicHttpAsync(endpointUrl, GetPublicEndpointReadyTimeout(resource), context.CancellationToken).ConfigureAwait(false); 363await exposeTask.CompleteAsync(new MarkdownString($"Public URL: [{endpointUrl}]({endpointUrl})"), CompletionState.Completed, context.CancellationToken).ConfigureAwait(false); 398await deploymentStateManager.SaveSectionAsync(stateSection, context.CancellationToken).ConfigureAwait(false); 464await deploymentStateManager.SaveSectionAsync(stateSection, context.CancellationToken).ConfigureAwait(false); 637context.CancellationToken).ConfigureAwait(false); 651context.CancellationToken).ConfigureAwait(false); 699await Task.Delay(TimeSpan.FromSeconds(2), context.CancellationToken).ConfigureAwait(false); 700diskImage = await client.GetDiskImageAsync(scope, diskImage.Id, context.CancellationToken).ConfigureAwait(false); 755context.CancellationToken); 931context.CancellationToken).ConfigureAwait(false); 943.GetValueAsync(new ValueProviderContext { ExecutionContext = context.ExecutionContext, Caller = resource.TargetResource }, context.CancellationToken) 962context.CancellationToken).ConfigureAwait(false); 1037var callbackContext = new CommandLineArgsCallbackContext(args, resource, context.CancellationToken) 1073var result = await runtime.InspectImageConfigAsync(imageReference, context.CancellationToken).ConfigureAwait(false); 1101return context.Services.GetRequiredService<IContainerRuntimeResolver>().ResolveAsync(context.CancellationToken); 1109var callbackContext = new EnvironmentCallbackContext(context.ExecutionContext, resource, environmentVariables, context.CancellationToken) 1168.GetValueAsync(new ValueProviderContext { ExecutionContext = context.ExecutionContext, Caller = resource }, context.CancellationToken) 1278context.CancellationToken).ConfigureAwait(false); 1279var stateSection = await deploymentStateManager.AcquireSectionAsync(GetStateSectionName(resource), context.CancellationToken).ConfigureAwait(false); 1294context.CancellationToken).ConfigureAwait(false); 1312context.CancellationToken).ConfigureAwait(false); 1348await deploymentStateManager.DeleteSectionAsync(stateSection, context.CancellationToken).ConfigureAwait(false); 1357var sandboxesSection = await deploymentStateManager.AcquireCurrentSectionAsync(SandboxStateParentSection, context.CancellationToken).ConfigureAwait(false); 1372context.CancellationToken).ConfigureAwait(false); 1373var stateSection = await deploymentStateManager.AcquireSectionAsync(sectionName, context.CancellationToken).ConfigureAwait(false); 1376await deploymentStateManager.DeleteSectionAsync(stateSection, context.CancellationToken).ConfigureAwait(false); 1387var cleanupTask = await context.ReportingStep.CreateTaskAsync($"Deleting stale sandbox deployment {sectionName}", context.CancellationToken).ConfigureAwait(false); 1425await deploymentStateManager.DeleteSectionAsync(stateSection, context.CancellationToken).ConfigureAwait(false); 1426await cleanupTask.CompleteAsync($"Deleted stale sandbox deployment {sectionName}", CompletionState.Completed, context.CancellationToken).ConfigureAwait(false); 1522catch (Exception ex) when (ex is not OperationCanceledException || !context.CancellationToken.IsCancellationRequested) 1535catch (Exception ex) when (ex is not OperationCanceledException || !context.CancellationToken.IsCancellationRequested) 1575sandboxes = await client.ListSandboxesAsync(scope, labelSelector, context.CancellationToken).ConfigureAwait(false); 1597diskImages = await client.ListDiskImagesAsync(scope, labelSelector, context.CancellationToken).ConfigureAwait(false); 2193var effectiveCancellationToken = cancellationToken ?? context.CancellationToken; 2253var effectiveCancellationToken = cancellationToken ?? context.CancellationToken;
Aspire.Hosting.Docker (26)
DockerComposeEnvironmentResource.cs (24)
146var stateSection = await deploymentStateManager.AcquireSectionAsync($"DockerCompose:{Name}", ctx.CancellationToken).ConfigureAwait(false); 154ctx.CancellationToken).ConfigureAwait(false); 166var runtime = await ctx.Services.GetRequiredService<IContainerRuntimeResolver>().ResolveAsync(ctx.CancellationToken).ConfigureAwait(false); 176ctx.CancellationToken).ConfigureAwait(false); 179await runtime.ComposeDownAsync(composeContext, ctx.CancellationToken).ConfigureAwait(false); 183ctx.CancellationToken).ConfigureAwait(false); 189await deploymentStateManager.DeleteSectionAsync(stateSection, ctx.CancellationToken).ConfigureAwait(false); 283context.CancellationToken); 305var cancellationToken = context.CancellationToken; 411var runtime = await context.Services.GetRequiredService<IContainerRuntimeResolver>().ResolveAsync(context.CancellationToken).ConfigureAwait(false); 415context.CancellationToken).ConfigureAwait(false); 422await runtime.ComposeUpAsync(composeContext, context.CancellationToken).ConfigureAwait(false); 426var stateSection = await deploymentStateManager.AcquireSectionAsync($"DockerCompose:{Name}", context.CancellationToken).ConfigureAwait(false); 430await deploymentStateManager.SaveSectionAsync(stateSection, context.CancellationToken).ConfigureAwait(false); 435context.CancellationToken).ConfigureAwait(false); 439await deployTask.CompleteAsync($"Compose deployment failed ({runtime.Name}): {ex.Message}", CompletionState.CompletedWithError, context.CancellationToken).ConfigureAwait(false); 457var runtime = await context.Services.GetRequiredService<IContainerRuntimeResolver>().ResolveAsync(context.CancellationToken).ConfigureAwait(false); 461context.CancellationToken).ConfigureAwait(false); 468await runtime.ComposeDownAsync(composeContext, context.CancellationToken).ConfigureAwait(false); 473context.CancellationToken).ConfigureAwait(false); 477await deployTask.CompleteAsync($"Compose shutdown failed ({runtime.Name}): {ex.Message}", CompletionState.CompletedWithError, context.CancellationToken).ConfigureAwait(false); 508context.CancellationToken).ConfigureAwait(false); 539defaultValue ??= await parameter.GetValueAsync(context.CancellationToken).ConfigureAwait(false); 544defaultValue = await vp.GetValueAsync(context.CancellationToken).ConfigureAwait(false);
DockerComposeServiceResource.cs (2)
338var runtime = await context.Services.GetRequiredService<IContainerRuntimeResolver>().ResolveAsync(context.CancellationToken).ConfigureAwait(false); 340var services = await runtime.ComposeListServicesAsync(composeContext, context.CancellationToken).ConfigureAwait(false);
Aspire.Hosting.EntityFrameworkCore (1)
EFResourceBuilderExtensions.cs (1)
368stepContext.CancellationToken,
Aspire.Hosting.Foundry (9)
HostedAgent\AzureHostedAgentResource.cs (7)
110var imageName = await ((IValueProvider)Image).GetValueAsync(context.CancellationToken).ConfigureAwait(false); 119EnvironmentVariables = await GetResolvedEnvironmentVariablesAsync(context.ExecutionContext, this, Target, context.Logger, context.CancellationToken).ConfigureAwait(false), 164var projectEndpoint = await project.Endpoint.GetValueAsync(context.CancellationToken).ConfigureAwait(false); 176cancellationToken: context.CancellationToken 179await UpdateAgentEndpointProtocolsAsync(projectClient.AgentAdministrationClient, def, context.CancellationToken).ConfigureAwait(false); 252var foundryResourceId = await project.Parent.Id.GetValueAsync(context.CancellationToken).ConfigureAwait(false); 279context.CancellationToken).ConfigureAwait(false);
PromptAgent\AzurePromptAgentResource.cs (2)
88var version = await DeployAsync(Project, stepCtx, logRetry: null, stepCtx.CancellationToken).ConfigureAwait(false); 306var linkedCts = CancellationTokenSource.CreateLinkedTokenSource(context.CancellationToken, lifetime.ApplicationStopping);
Aspire.Hosting.Kubernetes (62)
CertManagerExtensions.cs (4)
439var manifest = await BuildClusterIssuerManifestAsync(context.Model, certManager, issuer, context.Logger, context.CancellationToken) 452await File.WriteAllTextAsync(manifestPath, manifest, context.CancellationToken).ConfigureAwait(false); 477var result = await resultTask.WaitAsync(context.CancellationToken).ConfigureAwait(false); 534var result = await resultTask.WaitAsync(context.CancellationToken).ConfigureAwait(false);
Deployment\HelmDeploymentEngine.cs (23)
50var resolvedRelease = await releaseAnnotation.ReleaseName.GetValueAsync(context.CancellationToken).ConfigureAwait(false); 74var resolvedNs = await nsAnnotation.Namespace.GetValueAsync(context.CancellationToken).ConfigureAwait(false); 141await HelmVersionValidator.EnsureMinimumVersionAsync(helmRunner, ctx.CancellationToken).ConfigureAwait(false); 191var stateSection = await deploymentStateManager.AcquireSectionAsync($"Helm:{environment.Name}", ctx.CancellationToken).ConfigureAwait(false); 200ctx.CancellationToken).ConfigureAwait(false); 212await HelmVersionValidator.EnsureMinimumVersionAsync(helmRunner, ctx.CancellationToken).ConfigureAwait(false); 219await deploymentStateManager.DeleteSectionAsync(stateSection, ctx.CancellationToken).ConfigureAwait(false); 253context.CancellationToken).ConfigureAwait(false); 263await ResolveAndWriteDeployValuesAsync(outputPath, environment, context.CancellationToken).ConfigureAwait(false); 268context.CancellationToken).ConfigureAwait(false); 275context.CancellationToken).ConfigureAwait(false); 422context.CancellationToken).ConfigureAwait(false); 470cancellationToken: context.CancellationToken).ConfigureAwait(false); 485var stateSection = await deploymentStateManager.AcquireSectionAsync($"Helm:{environment.Name}", context.CancellationToken).ConfigureAwait(false); 488await deploymentStateManager.SaveSectionAsync(stateSection, context.CancellationToken).ConfigureAwait(false); 493context.CancellationToken).ConfigureAwait(false); 501context.CancellationToken).ConfigureAwait(false); 523var endpoints = await GetServiceEndpointsAsync(computeResource.Name.ToServiceName(), @namespace, environment.KubeConfigPath, context.Logger, context.CancellationToken).ConfigureAwait(false); 589context.CancellationToken).ConfigureAwait(false); 609cancellationToken: context.CancellationToken).ConfigureAwait(false); 620context.CancellationToken).ConfigureAwait(false); 628context.CancellationToken).ConfigureAwait(false); 659context.CancellationToken).ConfigureAwait(false);
KubernetesEnvironmentResource.cs (29)
413context.CancellationToken); 434var cancellationToken = context.CancellationToken; 516await ProcessIngressResources(appModel, deploymentTargets, logger, context.CancellationToken).ConfigureAwait(false); 519await ProcessGatewayResources(appModel, deploymentTargets, logger, context.CancellationToken).ConfigureAwait(false); 522await ProcessPersistentVolumeResources(appModel, context.CancellationToken).ConfigureAwait(false); 1368var resolvedNs = await nsAnnotation.Namespace.GetValueAsync(context.CancellationToken).ConfigureAwait(false); 1378var secretName = await ResolveExpressionAtDeployTimeAsync(secretNameExpr, context.CancellationToken).ConfigureAwait(false); 1451await File.WriteAllTextAsync(patchFilePath, patchJson, context.CancellationToken).ConfigureAwait(false); 1479var patchExitResult = await patchResult.WaitAsync(context.CancellationToken).ConfigureAwait(false); 1539var result = await checkResult.WaitAsync(context.CancellationToken).ConfigureAwait(false); 1564await File.WriteAllTextAsync(certPath, certPem, context.CancellationToken).ConfigureAwait(false); 1565await File.WriteAllTextAsync(keyPath, keyPem, context.CancellationToken).ConfigureAwait(false); 1584var createExitResult = await createResult.WaitAsync(context.CancellationToken).ConfigureAwait(false); 1683}, context.CancellationToken).ConfigureAwait(false); 1764var result = await getResult.WaitAsync(context.CancellationToken).ConfigureAwait(false); 1822var resolvedNs = await nsAnnotation.Namespace.GetValueAsync(context.CancellationToken).ConfigureAwait(false); 1852getExit = (await getResult.WaitAsync(context.CancellationToken).ConfigureAwait(false)).ExitCode; 1897await File.WriteAllTextAsync(patchFilePath, patchJson, context.CancellationToken).ConfigureAwait(false); 1916var patchExit = (await patchResult.WaitAsync(context.CancellationToken).ConfigureAwait(false)).ExitCode; 2027var exitResult = await getResult.WaitAsync(context.CancellationToken).ConfigureAwait(false); 2078await File.WriteAllTextAsync(manifestPath, minimal.ToJsonString(), context.CancellationToken).ConfigureAwait(false); 2097var applyExitResult = await applyResult.WaitAsync(context.CancellationToken).ConfigureAwait(false); 2126var resolvedNs = await nsAnnotation.Namespace.GetValueAsync(context.CancellationToken).ConfigureAwait(false); 2156var secretName = await ResolveExpressionAtDeployTimeAsync(secretNameExpr, context.CancellationToken).ConfigureAwait(false); 2157var hostname = await ResolveExpressionAtDeployTimeAsync(hostnameExpr, context.CancellationToken).ConfigureAwait(false); 2176var result = await checkResult.WaitAsync(context.CancellationToken).ConfigureAwait(false); 2201await File.WriteAllTextAsync(certPath, certPem, context.CancellationToken).ConfigureAwait(false); 2202await File.WriteAllTextAsync(keyPath, keyPem, context.CancellationToken).ConfigureAwait(false); 2221var createExitResult = await createResult.WaitAsync(context.CancellationToken).ConfigureAwait(false);
KubernetesHelmChartExtensions.cs (6)
358cancellationToken: context.CancellationToken).ConfigureAwait(false); 376.AcquireSectionAsync(GetStateSectionName(environment, chart), context.CancellationToken) 380await deploymentStateManager.SaveSectionAsync(stateSection, context.CancellationToken).ConfigureAwait(false); 400.AcquireSectionAsync(GetStateSectionName(environment, chart), context.CancellationToken) 432cancellationToken: context.CancellationToken).ConfigureAwait(false); 444await deploymentStateManager.DeleteSectionAsync(stateSection, context.CancellationToken).ConfigureAwait(false);
Aspire.Hosting.Radius (4)
Publishing\RadCredentialRegisterStep.cs (1)
67var cancellationToken = context.CancellationToken;
Publishing\RadiusBicepPublishingContext.cs (1)
53var cancellationToken = context.CancellationToken;
Publishing\RadiusDeploymentPipelineStep.cs (1)
102var cancellationToken = context.CancellationToken;
Publishing\SealedSecretApplyStep.cs (1)
68var cancellationToken = context.CancellationToken;
Aspire.Hosting.Tests (1)
Pipelines\DistributedApplicationPipelineTests.cs (1)
826wasCancelled = context.CancellationToken.IsCancellationRequested;
Aspire.Hosting.TestUtilities (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)
127cancellationToken: context.CancellationToken); 164cancellationToken: context.CancellationToken); 179cancellationToken: context.CancellationToken); 200cancellationToken: context.CancellationToken); 214cancellationToken: context.CancellationToken); 229cancellationToken: context.CancellationToken); 249cancellationToken: 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);