Skip to content

,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)} },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)} ,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)} ,System.IObservable{System.Boolean},System.Reactive.Concurrency.IScheduler)}

RxCommand.Create(Action, IObservable?, IScheduler?) method

Defined in

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

Applies to

netstandard2.0

Overloads

  • 1. public static RxCommand<Unit, Unit> Create(Action execute, IObservable<bool>? canExecute = null, IScheduler? outputScheduler = null)
  • 2. public static RxCommand<TParam, TResult> Create<TParam, TResult>(Func<TParam, TResult> execute, IObservable<bool>? canExecute = null, IScheduler? outputScheduler = null)
  • 3. public static RxCommand<TParam, Unit> Create<TParam>(Action<TParam> execute, IObservable<bool>? canExecute = null, IScheduler? outputScheduler = null)
  • 4. public static RxCommand<Unit, TResult> Create<TResult>(Func<TResult> execute, IObservable<bool>? canExecute = null, IScheduler? outputScheduler = null)
  • 5. public static RxCommand<Unit, TResult> Create<TResult>(Func<IObservable<TResult>> execute, IObservable<bool>? canExecute = null, IScheduler? outputScheduler = null)
  • 6. public static RxCommand<TParam, TResult> Create<TParam, TResult>(Func<TParam, IObservable<TResult>> execute, IObservable<bool>? canExecute = null, IScheduler? outputScheduler = null)
  • 7. public static RxCommand<Unit, TResult> Create<TResult>(Func<Task<TResult>> execute, IObservable<bool>? canExecute = null, IScheduler? outputScheduler = null)
  • 8. public static RxCommand<Unit, Unit> Create(Func<Task> execute, IObservable<bool>? canExecute = null, IScheduler? outputScheduler = null)
  • 9. public static RxCommand<Unit, Unit> Create(Func<CancellationToken, Task> execute, IObservable<bool>? canExecute = null, IScheduler? outputScheduler = null)
  • 10. public static RxCommand<TParam, TResult> Create<TParam, TResult>(Func<TParam, Task<TResult>> execute, IObservable<bool>? canExecute = null, IScheduler? outputScheduler = null)
  • 11. public static RxCommand<TParam, TResult> Create<TParam, TResult>(Func<TParam, CancellationToken, Task<TResult>> execute, IObservable<bool>? canExecute = null, IScheduler? outputScheduler = null)
  • 12. public static RxCommand<TParam, Unit> Create<TParam>(Func<TParam, Task> execute, IObservable<bool>? canExecute = null, IScheduler? outputScheduler = null)
  • 13. public static RxCommand<TParam, Unit> Create<TParam>(Func<TParam, CancellationToken, Task> execute, IObservable<bool>? canExecute = null, IScheduler? outputScheduler = null)

1. Overload

public static RxCommand<Unit, Unit> Create(Action execute, IObservable<bool>? canExecute = null, IScheduler? outputScheduler = null)

View source

Summary: Creates a parameterless RxCommand with synchronous execution logic.

Parameters

NameTypeDescription
executeActionThe action to execute whenever the command is executed.
canExecute = nullIObservable?An optional observable that dictates the availability of the command for execution.
outputScheduler = null[IScheduler?](#An optional scheduler that is used to surface events. Defaults to RxApp.MainThreadScheduler.

Returns: RxCommand -- The RxCommand instance.

2. Overload

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

View source

Summary: Creates a RxCommand with synchronous execution logic that takes a parameter of type TParam and returns a value of type TResult.

Type parameters

NameDescription
TParamThe type of the parameter passed through to command execution.
TResultThe type of value returned by command executions.

Parameters

NameTypeDescription
executeFuncThe function to execute whenever the command is executed.
canExecute = nullIObservable?An optional observable that dictates the availability of the command for execution.
outputScheduler = null[IScheduler?](#An optional scheduler that is used to surface events. Defaults to RxApp.MainThreadScheduler.

Returns: RxCommand -- The RxCommand instance.

3. Overload

public static RxCommand<TParam, Unit> Create<TParam>(Action<TParam> execute, IObservable<bool>? canExecute = null, IScheduler? outputScheduler = null)

View source

Summary: Creates a RxCommand with synchronous execution logic that takes a parameter of type TParam.

Type parameters

NameDescription
TParamThe type of the parameter passed through to command execution.

Parameters

NameTypeDescription
executeActionThe action to execute whenever the command is executed.
canExecute = nullIObservable?An optional observable that dictates the availability of the command for execution.
outputScheduler = null[IScheduler?](#An optional scheduler that is used to surface events. Defaults to RxApp.MainThreadScheduler.

Returns: RxCommand -- The RxCommand instance.

4. Overload

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

View source

Summary: Creates a parameterless RxCommand with synchronous execution logic that returns a value of type TResult.

Type parameters

NameDescription
TResultThe type of value returned by command executions.

Parameters

NameTypeDescription
executeFuncThe function to execute whenever the command is executed.
canExecute = nullIObservable?An optional observable that dictates the availability of the command for execution.
outputScheduler = null[IScheduler?](#An optional scheduler that is used to surface events. Defaults to RxApp.MainThreadScheduler.

Returns: RxCommand -- The RxCommand instance.

5. Overload

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

View source

Summary: Creates a parameterless RxCommand with asynchronous execution logic.

Type parameters

NameDescription
TResultThe type of the command's result.

Parameters

NameTypeDescription
executeFunc>Provides an observable representing the command's asynchronous execution logic.
canExecute = nullIObservable?An optional observable that dictates the availability of the command for execution.
outputScheduler = null[IScheduler?](#An optional scheduler that is used to surface events. Defaults to RxApp.MainThreadScheduler.

Returns: RxCommand -- The RxCommand instance.

6. Overload

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

View source

Summary: Creates a RxCommand with asynchronous execution logic that takes a parameter of type TParam.

Type parameters

NameDescription
TParamThe type of the parameter passed through to command execution.
TResultThe type of the command's result.

Parameters

NameTypeDescription
executeFunc>Provides an observable representing the command's asynchronous execution logic.
canExecute = nullIObservable?An optional observable that dictates the availability of the command for execution.
outputScheduler = null[IScheduler?](#An optional scheduler that is used to surface events. Defaults to RxApp.MainThreadScheduler.

Returns: RxCommand -- The RxCommand instance.

7. Overload

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

View source

Summary: Creates a parameterless RxCommand with asynchronous execution logic.

Type parameters

NameDescription
TResultThe type of the command's result.

Parameters

NameTypeDescription
executeFunc>Provides a Task representing the command's asynchronous execution logic.
canExecute = nullIObservable?An optional observable that dictates the availability of the command for execution.
outputScheduler = null[IScheduler?](#An optional scheduler that is used to surface events. Defaults to RxApp.MainThreadScheduler.

Returns: RxCommand -- The RxCommand instance.

8. Overload

public static RxCommand<Unit, Unit> Create(Func<Task> execute, IObservable<bool>? canExecute = null, IScheduler? outputScheduler = null)

View source

Summary: Creates a parameterless RxCommand with asynchronous execution logic.

Parameters

NameTypeDescription
executeFuncProvides a Task representing the command's asynchronous execution logic.
canExecute = nullIObservable?An optional observable that dictates the availability of the command for execution.
outputScheduler = null[IScheduler?](#An optional scheduler that is used to surface events. Defaults to RxApp.MainThreadScheduler.

Returns: RxCommand -- The RxCommand instance.

9. Overload

public static RxCommand<Unit, Unit> Create(Func<CancellationToken, Task> execute, IObservable<bool>? canExecute = null, IScheduler? outputScheduler = null)

View source

Summary: Creates a parameterless, cancellable RxCommand with asynchronous execution logic.

Parameters

NameTypeDescription
executeFuncProvides a Task representing the command's asynchronous execution logic.
canExecute = nullIObservable?An optional observable that dictates the availability of the command for execution.
outputScheduler = null[IScheduler?](#An optional scheduler that is used to surface events. Defaults to RxApp.MainThreadScheduler.

Returns: RxCommand -- The RxCommand instance.

10. Overload

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

View source

Summary: Creates a RxCommand with asynchronous execution logic that takes a parameter of type TParam.

Type parameters

NameDescription
TParamThe type of the parameter passed through to command execution.
TResultThe type of the command's result.

Parameters

NameTypeDescription
executeFunc>Provides a Task representing the command's asynchronous execution logic.
canExecute = nullIObservable?An optional observable that dictates the availability of the command for execution.
outputScheduler = null[IScheduler?](#An optional scheduler that is used to surface events. Defaults to RxApp.MainThreadScheduler.

Returns: RxCommand -- The RxCommand instance.

11. Overload

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

View source

Summary: Creates a RxCommand with asynchronous, cancellable execution logic that takes a parameter of type TParam.

Type parameters

NameDescription
TParamThe type of the parameter passed through to command execution.
TResultThe type of the command's result.

Parameters

NameTypeDescription
executeFunc>Provides a Task representing the command's asynchronous execution logic.
canExecute = nullIObservable?An optional observable that dictates the availability of the command for execution.
outputScheduler = null[IScheduler?](#An optional scheduler that is used to surface events. Defaults to RxApp.MainThreadScheduler.

Returns: RxCommand -- The RxCommand instance.

12. Overload

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

View source

Summary: Creates a RxCommand with asynchronous execution logic that takes a parameter of type TParam.

Type parameters

NameDescription
TParamThe type of the parameter passed through to command execution.

Parameters

NameTypeDescription
executeFuncProvides a Task representing the command's asynchronous execution logic.
canExecute = nullIObservable?An optional observable that dictates the availability of the command for execution.
outputScheduler = null[IScheduler?](#An optional scheduler that is used to surface events. Defaults to RxApp.MainThreadScheduler.

Returns: RxCommand -- The RxCommand instance.

13. Overload

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

View source

Summary: Creates a RxCommand with asynchronous, cancellable execution logic that takes a parameter of type TParam.

Type parameters

NameDescription
TParamThe type of the parameter passed through to command execution.

Parameters

NameTypeDescription
executeFuncProvides a Task representing the command's asynchronous execution logic.
canExecute = nullIObservable?An optional observable that dictates the availability of the command for execution.
outputScheduler = null[IScheduler?](#An optional scheduler that is used to surface events. Defaults to RxApp.MainThreadScheduler.

Returns: RxCommand -- The RxCommand instance.