MockCommand<TParam, TResult> constructor
Factory constructor that can take an optional observable to control if the command can be executet
Implementation
factory MockCommand(
{Observable<bool> canExecute, bool emitInitialCommandResult = false, bool emitLastResult = false, bool emitsLastValueToNewSubscriptions = false,TResult initialLastResult}) {
return new MockCommand._(
emitsLastValueToNewSubscriptions
? new BehaviorSubject<TResult>()
: new PublishSubject<TResult>(),
canExecute,
emitLastResult, false ,emitInitialCommandResult,initialLastResult);
}