RxCommandStream<TParam, TResult> constructor
RxCommandStream<TParam, TResult>(StreamProvider<TParam, TResult> provider, Observable<bool> canExecute, bool emitInitialCommandResult, bool emitLastResult, bool emitsLastValueToNewSubscriptions)
Implementation
factory RxCommandStream(StreamProvider<TParam, TResult> provider, Observable<bool> canExecute,
bool emitInitialCommandResult, bool emitLastResult, bool emitsLastValueToNewSubscriptions) {
return new RxCommandStream._(
provider,
emitsLastValueToNewSubscriptions || emitInitialCommandResult
? new BehaviorSubject<CommandResult<TResult>>(
seedValue: emitInitialCommandResult ? new CommandResult<TResult>(null, null, false) : null)
: new PublishSubject<CommandResult<TResult>>(),
canExecute,
emitLastResult, emitsLastValueToNewSubscriptions);
}