View on GitHub

mini-swift

Minimal Flux architecture written in Swift.

CLASS

Dispatcher

public final class Dispatcher

Properties

subscriptionCount

public var subscriptionCount: Int

Methods

init()

public init()

add(middleware:)

public func add(middleware: Middleware)

remove(middleware:)

public func remove(middleware: Middleware)

register(service:)

public func register(service: Service)

unregister(service:)

public func unregister(service: Service)

subscribe(priority:tag:completion:)

public func subscribe(priority: Int, tag: String, completion: @escaping (Action) -> Void) -> DispatcherSubscription

registerInternal(subscription:)

public func registerInternal(subscription: DispatcherSubscription) -> DispatcherSubscription

unregisterInternal(subscription:)

public func unregisterInternal(subscription: DispatcherSubscription)

subscribe(completion:)

public func subscribe<T: Action>(completion: @escaping (T) -> Void) -> DispatcherSubscription

subscribe(tag:completion:)

public func subscribe<T: Action>(tag: String, completion: @escaping (T) -> Void) -> DispatcherSubscription

subscribe(tag:completion:)

public func subscribe(tag: String, completion: @escaping (Action) -> Void) -> DispatcherSubscription

dispatch(_:mode:)

public func dispatch(_ action: Action, mode: Dispatcher.DispatchMode.UI)