RxCommandSync<TParam, TResult> constructor

RxCommandSync<TParam, TResult>(Func1<TParam, TResult> func, Observable<bool> canExecute, bool emitInitialCommandResult, bool emitLastResult, bool emitsLastValueToNewSubscriptions, TResult initialLastResult)

Implementation

factory RxCommandSync(Func1<TParam, TResult> func, Observable<bool> canExecute, bool emitInitialCommandResult,
    bool emitLastResult, bool emitsLastValueToNewSubscriptions, TResult initialLastResult) {

  return new RxCommandSync._(
      func,
      emitsLastValueToNewSubscriptions || emitInitialCommandResult
          ? new BehaviorSubject<TResult>()
          : new PublishSubject<TResult>(),
      canExecute,
      emitLastResult, emitsLastValueToNewSubscriptions || emitInitialCommandResult, emitInitialCommandResult, initialLastResult);
}