Table of Contents

Class ReactiveCommandMixins

Namespace
ReactiveUI
Assembly
ReactiveUI.dll

Extension methods associated with the ReactiveCommand class.

public static class ReactiveCommandMixins : Object
Inheritance
ReactiveCommandMixins

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).

public static IDisposable InvokeCommand<T>(this IObservable<T> item, ICommand? command)

Parameters

item IObservable<T>

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.

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 ReactiveCommandBase<T, TResult>

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 TTarget

The 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 TTarget

The root object which has the Command.

commandProperty Expression<Func<TTarget, ReactiveCommandBase<T, TResult>>>

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.