Class ReactiveCommandMixins
- Namespace
- ReactiveUI
- Assembly
- ReactiveUI.dll
Extension methods associated with the ReactiveCommand class.
- Inheritance
-
Reactive
Command Mixins
Methods
InvokeCommand<T>(IObservable<T>, ICommand?)
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).
Parameters
item
IObservable<T>The source observable to pipe into the command.
command
ICommandThe command to be executed.
Returns
- IDisposable
An object that when disposes, disconnects the Observable from the command.
Type Parameters
T
The type.
InvokeCommand<T, TResult>(IObservable<T>, ReactiveCommandBase<T, TResult>?)
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).
public static IDisposable InvokeCommand<T, TResult>(this IObservable<T> item, ReactiveCommandBase<T, TResult>? command)
Parameters
item
IObservable<T>The source observable to pipe into the command.
command
ReactiveCommand <T, TResult>Base The command to be executed.
Returns
- IDisposable
An object that when disposes, disconnects the Observable from the command.
Type Parameters
T
The type.
TResult
The result type.
InvokeCommand<T, TTarget>(IObservable<T>, TTarget?, Expression<Func<TTarget, ICommand?>>)
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).
public static IDisposable InvokeCommand<T, TTarget>(this IObservable<T> item, TTarget? target, Expression<Func<TTarget, ICommand?>> commandProperty) where TTarget : class
Parameters
item
IObservable<T>The source observable to pipe into the command.
target
TTargetThe root object which has the Command.
commandProperty
Expression<Func<TTarget, ICommand>>The expression to reference the Command.
Returns
- IDisposable
An object that when disposes, disconnects the Observable from the command.
Type Parameters
T
The type.
TTarget
The target type.
InvokeCommand<T, TResult, TTarget>(IObservable<T>, TTarget?, Expression<Func<TTarget, ReactiveCommandBase<T, TResult>?>>)
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).
public static IDisposable InvokeCommand<T, TResult, TTarget>(this IObservable<T> item, TTarget? target, Expression<Func<TTarget, ReactiveCommandBase<T, TResult>?>> commandProperty) where TTarget : class
Parameters
item
IObservable<T>The source observable to pipe into the command.
target
TTargetThe root object which has the Command.
commandProperty
Expression<Func<TTarget, ReactiveCommand <T, TResult>>>Base The expression to reference the Command.
Returns
- IDisposable
An object that when disposes, disconnects the Observable from the command.
Type Parameters
T
The type.
TResult
The result type.
TTarget
The target type.