Skip to content

,System.IObservable{System.Boolean},System.Reactive.Concurrency.IScheduler)} },System.IObservable{System.Boolean},System.Reactive.Concurrency.IScheduler)} },System.IObservable{System.Boolean},System.Reactive.Concurrency.IScheduler)} },System.IObservable{System.Boolean},System.Reactive.Concurrency.IScheduler)}

RxCommand(Func, IObservable?, IScheduler?) constructor

Defined in

Type: RxCommand Namespace: ReactiveMarbles.Command Assembly: ReactiveMarbles.Command.dll

Applies to

netstandard2.0

Overloads

  • 1. public RxCommand(Func<TParam, TResult> execute, IObservable<bool>? canExecute, IScheduler? outputScheduler = null)
  • 2. public RxCommand(Func<TParam, Task<TResult>> execute, IObservable<bool>? canExecute, IScheduler? outputScheduler = null)
  • 3. public RxCommand(Func<TParam, CancellationToken, Task<TResult>> execute, IObservable<bool>? canExecute, IScheduler? outputScheduler = null)
  • 4. public RxCommand(Func<TParam, IObservable<TResult>> execute, IObservable<bool>? canExecute, IScheduler? outputScheduler = null)

1. Overload

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

View source

Summary: Initializes a new instance of the RxCommand class.

Parameters

NameTypeDescription
executeFuncThe Func to perform when the command is executed.
canExecuteIObservable?A observable which has a value if the command can execute.
outputScheduler = null[IScheduler?](#The scheduler where to send output after the main execution.

Exceptions

TypeCondition
System.ArgumentNullExceptionThrown if any dependent parameters are null.

2. Overload

public RxCommand(Func<TParam, Task<TResult>> execute, IObservable<bool>? canExecute, IScheduler? outputScheduler = null)

View source

Summary: Initializes a new instance of the RxCommand class.

Parameters

NameTypeDescription
executeFunc>The Func to perform when the command is executed.
canExecuteIObservable?A observable which has a value if the command can execute.
outputScheduler = null[IScheduler?](#The scheduler where to send output after the main execution.

Exceptions

TypeCondition
System.ArgumentNullExceptionThrown if any dependent parameters are null.

3. Overload

public RxCommand(Func<TParam, CancellationToken, Task<TResult>> execute, IObservable<bool>? canExecute, IScheduler? outputScheduler = null)

View source

Summary: Initializes a new instance of the RxCommand class.

Parameters

NameTypeDescription
executeFunc>The Func to perform when the command is executed.
canExecuteIObservable?A observable which has a value if the command can execute.
outputScheduler = null[IScheduler?](#The scheduler where to send output after the main execution.

Exceptions

TypeCondition
System.ArgumentNullExceptionThrown if any dependent parameters are null.

4. Overload

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

View source

Summary: Initializes a new instance of the RxCommand class.

Parameters

NameTypeDescription
executeFunc>The Func to perform when the command is executed.
canExecuteIObservable?A observable which has a value if the command can execute.
outputScheduler = null[IScheduler?](#The scheduler where to send output after the main execution.

Exceptions

TypeCondition
System.ArgumentNullExceptionThrown if any dependent parameters are null.