Interface ISuspensionHost
- Namespace
- ReactiveUI
- Assembly
- ReactiveUI.dll
ISuspensionHost represents a standardized version of the events that the host operating system publishes. Subscribe to these events in order to handle app suspend / resume.
public interface ISuspensionHost : IReactiveObject, INotifyPropertyChanged, INotifyPropertyChanging, IEnableLogger
- Inherited Members
- Extension Methods
Properties
AppState
Gets or sets the current application state - get a typed version of this via GetAppState<T>(ISuspensionHost). The "application state" is a notion entirely defined via the client application - the framework places no restrictions on the object other than it can be serialized.
Property Value
CreateNewAppState
Gets or sets a function that can be used to create a new application state - usually this method just calls 'new' on an object.
Property Value
IsLaunchingNew
Gets or sets the observable which signals when the application is launching new. This can happen when an app has recently crashed, as well as the first time the app has been launched. Apps should create their state from scratch.
Property Value
- IObservable<Unit>
IsResuming
Gets or sets the observable which signals when the application is resuming from suspended state (i.e. it was previously running but its process was destroyed).
Property Value
- IObservable<Unit>
IsUnpausing
Gets or sets the observable which signals when the application is activated. Note that this may mean that your process was not actively running before this signal.
Property Value
- IObservable<Unit>
ShouldInvalidateState
Gets or sets the observable which signals that the saved application state should be deleted, this usually is called after an app has crashed.
Property Value
- IObservable<Unit>
ShouldPersistState
Gets or sets the observable which signals when the application should persist its state to disk.
Property Value
- IObservable<IDisposable>
Returns an IDisposable that should be disposed once the application finishes persisting its state.