Skip to content

TaskStepExtensions

Static class in Oadm.Sdk.Plugins · Oadm.Sdk.dll

Helpers for the common step patterns on ITaskExecutionContext.

public static class TaskStepExtensions

Guide: Task plugins

static void SkipStep(this ITaskExecutionContext ctx, string name, string reason)

Marks a (planned) step as Skipped without running it: ctx.BeginStep(name).Skip(reason).

static Task<T> StepAsync<T>(this ITaskExecutionContext ctx, string name, Func<ITaskStep, Task<T>> body)

Runs body as one step: Done when it returns (unless it ended the step itself), Failed with the exception message when it throws (“Cancelled.” on cancellation); the exception is rethrown.

static Task StepAsync(this ITaskExecutionContext ctx, string name, Func<ITaskStep, Task> body)

Runs body as one step: Done when it returns (unless it ended the step itself), Failed with the exception message when it throws (“Cancelled.” on cancellation); the exception is rethrown.