,System.Windows.Input.ICommand)} ,ReactiveMarbles.Command.RxCommand{--0,--1})} ,--1,System.Linq.Expressions.Expression{System.Func{--1,System.Windows.Input.ICommand}})} ,--2,System.Linq.Expressions.Expression{System.Func{--2,ReactiveMarbles.Command.RxCommand{--0,--1}}})} )}
RxCommandExtensions.InvokeCommand(IObservable, ICommand?) method¶
Defined in
Type: RxCommandExtensions
Namespace: ReactiveMarbles.Command
Assembly: ReactiveMarbles.Command.dll
Applies to
netstandard2.0
Overloads¶
- 1.
public static IDisposable InvokeCommand<T>(this IObservable<T> item, ICommand? command) - 2.
public static IDisposable InvokeCommand<T, TResult>(this IObservable<T> item, RxCommand<T, TResult>? command) - 3.
public static IDisposable InvokeCommand<T, TTarget>(this IObservable<T> item, TTarget? target, Expression<Func<TTarget, ICommand?>> commandProperty) where TTarget : class, INotifyPropertyChanged - 4.
public static IDisposable InvokeCommand<T, TResult, TTarget>(this IObservable<T> item, TTarget? target, Expression<Func<TTarget, RxCommand<T, TResult>?>> commandProperty) where TTarget : class, INotifyPropertyChanged - 5.
public static IDisposable InvokeCommand<TParam, TResult>(this IObservable<TParam> source) where TParam : IRxCommand<TParam, TResult>
1. Overload¶
public static IDisposable InvokeCommand<T>(this IObservable<T> item, ICommand? command)
Summary: A utility method that will pipe an Observable to an ICommand (i.e. it will first call its CanExecute with the provided value, then if the command can be executed, Execute() will be called).
Type parameters
| Name | Description |
|---|---|
T | The type. |
Parameters
| Name | Type | Description |
|---|---|---|
item | IObservable | The source observable to pipe into the command. |
command | ICommand? | The command to be executed. |
Returns: IDisposable -- An object that when disposes, disconnects the Observable from the command.
2. Overload¶
public static IDisposable InvokeCommand<T, TResult>(this IObservable<T> item, RxCommand<T, TResult>? command)
Summary: A utility method that will pipe an Observable to an ICommand (i.e. it will first call its CanExecute with the provided value, then if the command can be executed, Execute() will be called).
Type parameters
| Name | Description |
|---|---|
T | The type. |
TResult | The result type. |
Parameters
| Name | Type | Description |
|---|---|---|
item | IObservable | The source observable to pipe into the command. |
command | [RxCommand | The command to be executed. |
Returns: IDisposable -- An object that when disposes, disconnects the Observable from the command.
3. Overload¶
public static IDisposable InvokeCommand<T, TTarget>(this IObservable<T> item, TTarget? target, Expression<Func<TTarget, ICommand?>> commandProperty) where TTarget : class, INotifyPropertyChanged
Summary: A utility method that will pipe an Observable to an ICommand (i.e. it will first call its CanExecute with the provided value, then if the command can be executed, Execute() will be called).
Type parameters
| Name | Description |
|---|---|
T | The type. |
TTarget | The target type. |
Parameters
| Name | Type | Description |
|---|---|---|
item | IObservable | The source observable to pipe into the command. |
target | TTarget? | The root object which has the Command. |
commandProperty | Expression | The expression to reference the Command. |
Returns: IDisposable -- An object that when disposes, disconnects the Observable from the command.
4. Overload¶
public static IDisposable InvokeCommand<T, TResult, TTarget>(this IObservable<T> item, TTarget? target, Expression<Func<TTarget, RxCommand<T, TResult>?>> commandProperty) where TTarget : class, INotifyPropertyChanged
Summary: A utility method that will pipe an Observable to an ICommand (i.e. it will first call its CanExecute with the provided value, then if the command can be executed, Execute() will be called).
Type parameters
| Name | Description |
|---|---|
T | The type. |
TResult | The result type. |
TTarget | The target type. |
Parameters
| Name | Type | Description |
|---|---|---|
item | IObservable | The source observable to pipe into the command. |
target | TTarget? | The root object which has the Command. |
commandProperty | Expression | The expression to reference the Command. |
Returns: IDisposable -- An object that when disposes, disconnects the Observable from the command.
5. Overload¶
public static IDisposable InvokeCommand<TParam, TResult>(this IObservable<TParam> source) where TParam : IRxCommand<TParam, TResult>
Summary: A utility method that will pipe an IRxCommand from an Observable (i.e. it will first call its CanExecute with the provided value, then if the command can be executed, Execute() will be called).
Type parameters
| Name | Description |
|---|---|
TParam | The type. |
TResult | The result type. |
Parameters
| Name | Type | Description |
|---|---|---|
source | IObservable | The source observable to pipe into the command. |
Returns: IDisposable -- An object that when disposes, disconnects the Observable from the command.