Table of Contents

Class MessageBusExtensions

Namespace
ReactiveUI.Testing
Assembly
ReactiveUI.Testing.dll

Message bus testing extensions.

public static class MessageBusExtensions
Inheritance
MessageBusExtensions

Methods

With(IMessageBus, Action)

Override the default Message Bus during the specified block.

public static void With(this IMessageBus messageBus, Action block)

Parameters

messageBus IMessageBus

The message bus to use for the block.

block Action

The action to execute.

WithMessageBus(IMessageBus)

WithMessageBus allows you to override the default Message Bus implementation until the object returned is disposed. If a message bus is not specified, a default empty one is created.

public static IDisposable WithMessageBus(this IMessageBus messageBus)

Parameters

messageBus IMessageBus

The message bus to use, or null to create a new one using the default implementation.

Returns

IDisposable

An object that when disposed, restores the original message bus.

With<TRet>(IMessageBus, Func<TRet>)

Override the default Message Bus during the specified block.

public static TRet With<TRet>(this IMessageBus messageBus, Func<TRet> block)

Parameters

messageBus IMessageBus

The message bus to use for the block.

block Func<TRet>

The function to execute.

Returns

TRet

The return value of the function.

Type Parameters

TRet

The return type.