ActionContext
public class ActionContext<InputType> where InputType : FlintLoggable
The context in which an action executes. Contains the initial state and contextual logger.
The context can be passed forward, or a new instance derived with new state, so that e.g. a subsystem can be passed the logger and state information as a single opaque value, without passing forward the entire action request
-
The input to the action
Declaration
Swift
public let input: InputType
-
Undocumented
Declaration
Swift
public var logs: ContextualLoggers { get }
-
The source of the action, used to tell if it came from the application itself or e.g. Siri.
Declaration
Swift
public let source: ActionSource
-
Perform the action in the same session as this current action request, passing on the contextual loggers Use this to perform other actions within action implementations.
Declaration
Swift
public func perform<FeatureType, ActionType>(_ actionBinding: StaticActionBinding<FeatureType, ActionType>, input: ActionType.InputType, presenter: ActionType.PresenterType, userInitiated: Bool, completion: ((ActionOutcome) -> ())? = nil)
-
Perform the action in the same session as this current action request, passing on the contextual loggers Use this to perform other actions within action implementations.
Declaration
Swift
public func perform<FeatureType, ActionType>(_ conditionalRequest: VerifiedActionBinding<FeatureType, ActionType>, input: ActionType.InputType, presenter: ActionType.PresenterType, userInitiated: Bool, completion: ((ActionOutcome) -> ())? = nil)
-
Undocumented
Declaration
Swift
public var debugDescriptionOfInput: String? { get }