createSync method

RxCommand<Unit, Unit> createSync (Action action, [ Observable<bool> canExecute ])

Creates a RxCommand for a synchronous handler function with no parameter and no return type action: handler function canExecute : observable that can bve used to enable/diable the command based on some other state change if omitted the command can be executed always except it's already executing

Implementation

static RxCommand<Unit, Unit> createSync(Action action,[Observable<bool> canExecute])
{
    return new RxCommandSync<Unit,Unit>((_) {action(); return Unit.Default;},canExecute);
}