RSDTaskResult

public protocol RSDTaskResult : RSDResult, RSDAnswerResultFinder

RSDTaskResult is a result associated with a task. This object includes a step history, task run UUID, schema identifier, and asynchronous results.

  • A unique identifier for this task run.

    Declaration

    Swift

    var taskRunUUID: UUID
  • Schema info associated with this task.

    Declaration

    Swift

    var schemaInfo: RSDSchemaInfo?
  • A listing of the step history for this task or section. The listed step results should only include the last result for any given step.

    Declaration

    Swift

    var stepHistory: [RSDResult]
  • A list of all the asynchronous results for this task. The list should include uniquely identified results.

    Declaration

    Swift

    var asyncResults: [RSDResult]?
  • findResult(for:) Extension method

    Find a result within the step history.

    Declaration

    Swift

    public func findResult(for step: RSDStep) -> RSDResult?

    Parameters

    step

    The step associated with the result.

    Return Value

    The result or nil if not found.

  • findResult(with:) Extension method

    Find a result within the step history.

    Declaration

    Swift

    public func findResult(with identifier: String) -> RSDResult?

    Parameters

    identifier

    The identifier associated with the result.

    Return Value

    The result or nil if not found.

  • findAnswerResult(with:) Extension method

    Find an answer result within this collection. This method will return nil if there is a result but that result does not conform to to the RSDAnswerResult protocol.

    Declaration

    Swift

    public func findAnswerResult(with identifier:String ) -> RSDAnswerResult?

    Parameters

    identifier

    The identifier associated with the result.

    Return Value

    The result or nil if not found.

  • appendStepHistory(with:) Extension method

    Append the result to the end of the step history, replacing the previous instance with the same identifier.

    Declaration

    Swift

    mutating public func appendStepHistory(with result: RSDResult) -> RSDResult?

    Parameters

    result

    The result to add to the step history.

    Return Value

    The previous result or nil if there wasn’t one.

  • removeStepHistory(from:) Extension method

    Remove results from the step history from the result with the given identifier to the end of the array.

    Declaration

    Swift

    mutating public func removeStepHistory(from stepIdentifier: String) -> Array<RSDResult>?

    Parameters

    stepIdentifier

    The identifier of the result associated with the given step.

    Return Value

    The previous result or nil if there wasn’t one.

  • appendAsyncResult(with:) Extension method

    Append the async results with the given result, replacing the previous instance with the same identifier.

    Declaration

    Swift

    mutating public func appendAsyncResult(with result: RSDResult)

    Parameters

    result

    The result to add to the async results.