,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)
Summary: Creates a parameterless RxCommand with synchronous execution logic.
Parameters
| Name | Type | Description |
|---|---|---|
execute | Action | The action to execute whenever the command is executed. |
canExecute = null | IObservable | 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: RxCommandRxCommand instance.
2. Overload¶
public static RxCommand<TParam, TResult> Create<TParam, TResult>(Func<TParam, TResult> execute, IObservable<bool>? canExecute = null, IScheduler? outputScheduler = null)
Summary:
Creates a RxCommand with synchronous execution logic that takes a parameter of type TParam
and returns a value of type TResult.
Type parameters
| Name | Description |
|---|---|
TParam | The type of the parameter passed through to command execution. |
TResult | The type of value returned by command executions. |
Parameters
| Name | Type | Description |
|---|---|---|
execute | Func | The function to execute whenever the command is executed. |
canExecute = null | IObservable | 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: RxCommandRxCommand instance.
3. Overload¶
public static RxCommand<TParam, Unit> Create<TParam>(Action<TParam> execute, IObservable<bool>? canExecute = null, IScheduler? outputScheduler = null)
Summary:
Creates a RxCommand with synchronous execution logic that takes a parameter of type TParam.
Type parameters
| Name | Description |
|---|---|
TParam | The type of the parameter passed through to command execution. |
Parameters
| Name | Type | Description |
|---|---|---|
execute | Action | The action to execute whenever the command is executed. |
canExecute = null | IObservable | 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: RxCommandRxCommand instance.
4. Overload¶
public static RxCommand<Unit, TResult> Create<TResult>(Func<TResult> execute, IObservable<bool>? canExecute = null, IScheduler? outputScheduler = null)
Summary:
Creates a parameterless RxCommand with synchronous execution logic that returns a value
of type TResult.
Type parameters
| Name | Description |
|---|---|
TResult | The type of value returned by command executions. |
Parameters
| Name | Type | Description |
|---|---|---|
execute | Func | The function to execute whenever the command is executed. |
canExecute = null | IObservable | 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: RxCommandRxCommand instance.
5. Overload¶
public static RxCommand<Unit, TResult> Create<TResult>(Func<IObservable<TResult>> execute, IObservable<bool>? canExecute = null, IScheduler? outputScheduler = null)
Summary: Creates a parameterless RxCommand with asynchronous execution logic.
Type parameters
| Name | Description |
|---|---|
TResult | The type of the command's result. |
Parameters
| Name | Type | Description |
|---|---|---|
execute | Func | Provides an observable representing the command's asynchronous execution logic. |
canExecute = null | IObservable | 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: RxCommandRxCommand instance.
6. Overload¶
public static RxCommand<TParam, TResult> Create<TParam, TResult>(Func<TParam, IObservable<TResult>> execute, IObservable<bool>? canExecute = null, IScheduler? outputScheduler = null)
Summary:
Creates a RxCommand with asynchronous execution logic that takes a parameter of type TParam.
Type parameters
| Name | Description |
|---|---|
TParam | The type of the parameter passed through to command execution. |
TResult | The type of the command's result. |
Parameters
| Name | Type | Description |
|---|---|---|
execute | Func | Provides an observable representing the command's asynchronous execution logic. |
canExecute = null | IObservable | 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: RxCommandRxCommand instance.
7. Overload¶
public static RxCommand<Unit, TResult> Create<TResult>(Func<Task<TResult>> execute, IObservable<bool>? canExecute = null, IScheduler? outputScheduler = null)
Summary: Creates a parameterless RxCommand with asynchronous execution logic.
Type parameters
| Name | Description |
|---|---|
TResult | The type of the command's result. |
Parameters
| Name | Type | Description |
|---|---|---|
execute | Func | Provides a Task representing the command's asynchronous execution logic. |
canExecute = null | IObservable | 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: RxCommandRxCommand instance.
8. Overload¶
public static RxCommand<Unit, Unit> Create(Func<Task> execute, IObservable<bool>? canExecute = null, IScheduler? outputScheduler = null)
Summary: Creates a parameterless RxCommand with asynchronous execution logic.
Parameters
| Name | Type | Description |
|---|---|---|
execute | Func | Provides a Task representing the command's asynchronous execution logic. |
canExecute = null | IObservable | 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: RxCommandRxCommand instance.
9. Overload¶
public static RxCommand<Unit, Unit> Create(Func<CancellationToken, Task> execute, IObservable<bool>? canExecute = null, IScheduler? outputScheduler = null)
Summary: Creates a parameterless, cancellable RxCommand with asynchronous execution logic.
Parameters
| Name | Type | Description |
|---|---|---|
execute | Func | Provides a Task representing the command's asynchronous execution logic. |
canExecute = null | IObservable | 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: RxCommandRxCommand instance.
10. Overload¶
public static RxCommand<TParam, TResult> Create<TParam, TResult>(Func<TParam, Task<TResult>> execute, IObservable<bool>? canExecute = null, IScheduler? outputScheduler = null)
Summary:
Creates a RxCommand with asynchronous execution logic that takes a parameter of type TParam.
Type parameters
| Name | Description |
|---|---|
TParam | The type of the parameter passed through to command execution. |
TResult | The type of the command's result. |
Parameters
| Name | Type | Description |
|---|---|---|
execute | Func | Provides a Task representing the command's asynchronous execution logic. |
canExecute = null | IObservable | 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: RxCommandRxCommand instance.
11. Overload¶
public static RxCommand<TParam, TResult> Create<TParam, TResult>(Func<TParam, CancellationToken, Task<TResult>> execute, IObservable<bool>? canExecute = null, IScheduler? outputScheduler = null)
Summary:
Creates a RxCommand with asynchronous, cancellable execution logic that takes a parameter of type TParam.
Type parameters
| Name | Description |
|---|---|
TParam | The type of the parameter passed through to command execution. |
TResult | The type of the command's result. |
Parameters
| Name | Type | Description |
|---|---|---|
execute | Func | Provides a Task representing the command's asynchronous execution logic. |
canExecute = null | IObservable | 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: RxCommandRxCommand instance.
12. Overload¶
public static RxCommand<TParam, Unit> Create<TParam>(Func<TParam, Task> execute, IObservable<bool>? canExecute = null, IScheduler? outputScheduler = null)
Summary:
Creates a RxCommand with asynchronous execution logic that takes a parameter of type TParam.
Type parameters
| Name | Description |
|---|---|
TParam | The type of the parameter passed through to command execution. |
Parameters
| Name | Type | Description |
|---|---|---|
execute | Func | Provides a Task representing the command's asynchronous execution logic. |
canExecute = null | IObservable | 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: RxCommandRxCommand instance.
13. Overload¶
public static RxCommand<TParam, Unit> Create<TParam>(Func<TParam, CancellationToken, Task> execute, IObservable<bool>? canExecute = null, IScheduler? outputScheduler = null)
Summary:
Creates a RxCommand with asynchronous, cancellable execution logic that takes a parameter of type TParam.
Type parameters
| Name | Description |
|---|---|
TParam | The type of the parameter passed through to command execution. |
Parameters
| Name | Type | Description |
|---|---|---|
execute | Func | Provides a Task representing the command's asynchronous execution logic. |
canExecute = null | IObservable | 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: RxCommandRxCommand instance.