RSDTask
public protocol RSDTask : RSDUIActionHandler
RSDTask is the interface for running a task. It includes information about how to calculate progress,
validation, and the order of display for the steps.
-
A short string that uniquely identifies the task.
Declaration
Swift
var identifier: String -
Additional information about the task.
Declaration
Swift
var taskInfo: RSDTaskInfoStep? -
Additional information about the result schema.
Declaration
Swift
var schemaInfo: RSDSchemaInfo? -
The step navigator for this task.
Declaration
Swift
var stepNavigator: RSDStepNavigator -
A list of asynchronous actions to run on the task.
Declaration
Swift
var asyncActions: [RSDAsyncActionConfiguration]? -
Instantiate a task result that is appropriate for this task.
Declaration
Swift
func instantiateTaskResult() -> RSDTaskResultReturn Value
A task result for this task.
-
Validate the task to check for any model configuration that should throw an error.
Throws
An error appropriate to the failed validation.Declaration
Swift
func validate() throws
-
asyncActionsToStart(at:isFirstStep:)Extension methodFilter the
asyncActionsand return only those actions to start with this step. This will return the configurations where thestartStepIdentifiermatches the current step as well as configurations where thestartStepIdentifierisnilif and only ifisFirstStepequalstrue.Declaration
Swift
public func asyncActionsToStart(at step: RSDStep, isFirstStep: Bool) -> [RSDAsyncActionConfiguration]Parameters
stepThe step that is about to be displayed.
isFirstSteptrueif this is the first step in the task, otherwisefalse.Return Value
The array of async actions to start.
View on GitHub
RSDTask Protocol Reference