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

ReactiveCommand.

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

Summary

Creates a parameterless ReactiveCommand<TParam, TResult> with asynchronous execution logic.
Namespace
ReactiveUI
Containing Type
ReactiveCommand

Syntax

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

Type Parameters

Name Description
TResult The type of the command's result.

Parameters

Name Type Description
execute Func<IObservable<TResult>> Provides an observable representing the command's asynchronous execution logic.
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<Unit, TResult> The ReactiveCommand instance.