PublishingExtensions.FailAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| FailAsync(IReportingStep, String, CancellationToken) |
Completes a publishing step with an error. |
| FailAsync(IReportingTask, String, CancellationToken) |
Completes a publishing task with an error. |
FailAsync(IReportingStep, String, CancellationToken)
- Source:
- PublishingExtensions.cs
Completes a publishing step with an error.
public static System.Threading.Tasks.Task<Aspire.Hosting.Pipelines.IReportingStep> FailAsync(this Aspire.Hosting.Pipelines.IReportingStep step, string? errorMessage = default, System.Threading.CancellationToken cancellationToken = default);
static member FailAsync : Aspire.Hosting.Pipelines.IReportingStep * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Aspire.Hosting.Pipelines.IReportingStep>
<Extension()>
Public Function FailAsync (step As IReportingStep, Optional errorMessage As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of IReportingStep)
Parameters
- step
- IReportingStep
The step to complete.
- errorMessage
- String
Optional error message.
- cancellationToken
- CancellationToken
The cancellation token.
Returns
The completed step.
Applies to
FailAsync(IReportingTask, String, CancellationToken)
- Source:
- PublishingExtensions.cs
Completes a publishing task with an error.
public static System.Threading.Tasks.Task<Aspire.Hosting.Pipelines.IReportingTask> FailAsync(this Aspire.Hosting.Pipelines.IReportingTask task, string? errorMessage = default, System.Threading.CancellationToken cancellationToken = default);
static member FailAsync : Aspire.Hosting.Pipelines.IReportingTask * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Aspire.Hosting.Pipelines.IReportingTask>
<Extension()>
Public Function FailAsync (task As IReportingTask, Optional errorMessage As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of IReportingTask)
Parameters
- task
- IReportingTask
The task to complete.
- errorMessage
- String
Optional error message.
- cancellationToken
- CancellationToken
The cancellation token.
Returns
The completed task.