Table of Contents

Class SuspensionHostExtensions

Namespace
ReactiveUI
Assembly
ReactiveUI.dll

Extension methods associated with the ISuspensionHost interface.

public static class SuspensionHostExtensions : Object
Inheritance
SuspensionHostExtensions

Methods

GetAppState<T>(ISuspensionHost)

Get the current App State of a class derived from ISuspensionHost.

public static T GetAppState<T>(this ISuspensionHost item)

Parameters

item ISuspensionHost

The suspension host.

Returns

T

The app state.

Type Parameters

T

The app state type.

ObserveAppState<T>(ISuspensionHost)

Observe changes to the AppState of a class derived from ISuspensionHost.

public static IObservable<T> ObserveAppState<T>(this ISuspensionHost item) where T : class

Parameters

item ISuspensionHost

The suspension host.

Returns

IObservable<T>

An observable of the app state.

Type Parameters

T

The observable type.

SetupDefaultSuspendResume(ISuspensionHost, ISuspensionDriver?)

Setup our suspension driver for a class derived off ISuspensionHost interface. This will make your suspension host respond to suspend and resume requests.

public static IDisposable SetupDefaultSuspendResume(this ISuspensionHost item, ISuspensionDriver? driver = null)

Parameters

item ISuspensionHost

The suspension host.

driver ISuspensionDriver

The suspension driver.

Returns

IDisposable

A disposable which will stop responding to Suspend and Resume requests.