RSDTask

public protocol RSDTask

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 { get }
  • Additional information about the result schema.

    Declaration

    Swift

    var schemaInfo: RSDSchemaInfo? { get }
  • Copyright information for the task.

    Declaration

    Swift

    var copyright: String? { get }
  • The step navigator for this task.

    Declaration

    Swift

    var stepNavigator: RSDStepNavigator { get }
  • A list of asynchronous actions to run on the task.

    Declaration

    Swift

    var asyncActions: [RSDAsyncActionConfiguration]? { get }
  • Instantiate a task result that is appropriate for this task.

    Declaration

    Swift

    func instantiateTaskResult() -> RSDTaskResult

    Return 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
  • Filter the asyncActions and return only those actions to start with this step. This will return the configurations where the startStepIdentifier matches the current step as well as configurations where the startStepIdentifier is nil if and only if isFirstStep equals true.

    Declaration

    Swift

    public func asyncActionsToStart(at step: RSDStep, isFirstStep: Bool) -> [RSDAsyncActionConfiguration]

    Parameters

    step

    The step that is about to be displayed.

    isFirstStep

    true if this is the first step in the task, otherwise false.

    Return Value

    The array of async actions to start.