RxCommandSync<TParam, TResult> constructor
RxCommandSync<TParam, TResult>(Func1<TParam, TResult> func, Observable<bool> canExecute, bool emitInitialCommandResult, bool buffer, bool emitsLastValueToNewSubscriptions)
Implementation
factory RxCommandSync(Func1<TParam, TResult> func, Observable<bool> canExecute, bool emitInitialCommandResult,
bool buffer, bool emitsLastValueToNewSubscriptions) {
return new RxCommandSync._(
func,
emitsLastValueToNewSubscriptions || emitInitialCommandResult
? new BehaviorSubject<CommandResult<TResult>>(
seedValue: emitInitialCommandResult ? new CommandResult<TResult>(null, null, false) : null)
: new PublishSubject<CommandResult<TResult>>(),
canExecute,
buffer, emitsLastValueToNewSubscriptions);
}