The recording of the first ever ReactiveUI virtual conference is available on our YouTube Channel.


Create<TParam, TResult>(Func<TParam, TResult>, IObservable<bool>, IScheduler?) Method


Creates a ReactiveCommand<TParam, TResult> with synchronous execution logic that takes a parameter of type TParam and returns a value of type TResult.
Containing Type


public static ReactiveCommand<TParam, TResult> Create<TParam, TResult>(Func<TParam, TResult> execute, IObservable<bool> canExecute = null, IScheduler? outputScheduler = null)

Type Parameters

Name Description
TParam The type of the parameter passed through to command execution.
TResult The type of value returned by command executions.


Name Type Description
execute Func<TParam, TResult> The function to execute whenever the command is executed.
canExecute IObservable<bool> An optional observable that dictates the availability of the command for execution.
outputScheduler IScheduler? An optional scheduler that is used to surface events. Defaults to RxApp.MainThreadScheduler.

Return Value

Type Description
ReactiveCommand<TParam, TResult> The ReactiveCommand instance.