AppSupportJsonSuspensionDriver class¶
Attributes: [DebuggerDisplay("AppSupportJsonSuspensionDriver")]
Defined in
Namespace: ReactiveUI.Reactive
Assembly: ReactiveUI.Reactive.dll
Full name: ReactiveUI.Reactive.AppSupportJsonSuspensionDriver
Modifiers: public sealed
Summary¶
Loads and saves state to persistent storage under the platform Application Support directory.
Applies to
net10.0-ios26.0, net10.0-macos26.0, net10.0-maccatalyst26.0, net10.0-tvos26.0
Class hierarchy
classDiagram
class AppSupportJsonSuspensionDriver
class ISuspensionDriver {
<>
}
ISuspensionDriver <|.. AppSupportJsonSuspensionDriver
Implements: ISuspensionDriver
Remarks¶
This driver supports two serialization modes:
-
Source-generated System.Text.Json via overloads accepting JsonTypeInfo. This is trimming/AOT-friendly.
-
Reflection-based System.Text.Json via ISuspensionDriver interface methods. These are marked with RequiresUnreferencedCodeAttribute and RequiresDynamicCodeAttribute.
The persisted file name is state.dat.
Constructors¶
| Name | Summary |
|---|---|
| .ctor | Initializes a new instance of the [AppSupportJsonSuspensionDriver](# class using the default Data subdirectory beneath Application Support. |
Methods¶
| Name | Summary |
|---|---|
| LoadState | Loads application state from persistent storage using source-generated System.Text.Json metadata. |
| SaveState | Saves application state to persistent storage using source-generated System.Text.Json metadata. |
| InvalidateState | Invalidates the persisted application state (for example, by deleting it from disk). |