})} },System.IObservable{System.Boolean})} )} ,System.IObservable{System.Boolean})}
CommandSignal(Func>) constructor¶
Defined in
Type: CommandSignalReactiveUI.Primitives.Signals
Assembly: ReactiveUI.Primitives.Core.dll
Applies to
net10.0, net10.0, net10.0-desktop1.0, net10.0-desktop1.0, net10.0-browserwasm1.0, net10.0-browserwasm1.0, net9.0, net9.0, net9.0-desktop1.0, net9.0-desktop1.0, net9.0-browserwasm1.0, net9.0-browserwasm1.0, net8.0, net8.0, net8.0-ios17.5, net8.0-macos14.5, net8.0-macos14.5, net8.0-macos14.2, net8.0-macos14.2, net8.0-maccatalyst17.5, net8.0-maccatalyst17.5, net8.0-tvos17.2, net8.0-tvos17.2, net8.0-ios17.5, netstandard2.1, netstandard2.1, net481, net462, net462, net481
Overloads¶
- 1.
public CommandSignal(Func<CancellationToken, Task<TResult>> execute) - 2.
public CommandSignal(Func<CancellationToken, Task<TResult>> execute, IObservable<bool>? canRun) - 3.
public CommandSignal(Func<TResult> execute) - 4.
public CommandSignal(Func<TResult> execute, IObservable<bool>? canRun)
1. Overload¶
public CommandSignal(Func<CancellationToken, Task<TResult>> execute)
Summary: Initializes a new instance of the CommandSignal class.
Parameters
| Name | Type | Description |
|---|---|---|
execute | Func | The async operation to execute. |
2. Overload¶
public CommandSignal(Func<CancellationToken, Task<TResult>> execute, IObservable<bool>? canRun)
Summary: Initializes a new instance of the CommandSignal class.
Parameters
| Name | Type | Description |
|---|---|---|
execute | Func | The async operation to execute. |
canRun | IObservable | Gating signal. When null, execution is always allowed. |
3. Overload¶
public CommandSignal(Func<TResult> execute)
Summary: Initializes a new instance of the CommandSignal class.
Parameters
| Name | Type | Description |
|---|---|---|
execute | Func | The synchronous operation to execute. |
4. Overload¶
public CommandSignal(Func<TResult> execute, IObservable<bool>? canRun)
Summary: Initializes a new instance of the CommandSignal class.
Parameters
| Name | Type | Description |
|---|---|---|
execute | Func | The synchronous operation to execute. |
canRun | IObservable | Gating signal. When null, execution is always allowed. |