Class SuspensionHostExtensions
- Namespace
- ReactiveUI
- Assembly
- ReactiveUI.dll
Extension methods associated with the ISuspensionHost interface.
public static class SuspensionHostExtensions
- 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
ISuspensionHostThe 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
ISuspensionHostThe 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
ISuspensionHostThe suspension host.
driver
ISuspensionDriverThe suspension driver.
Returns
- IDisposable
A disposable which will stop responding to Suspend and Resume requests.