Skip to content

AppSupportJsonSuspensionDriver class

Defined in

Namespace: ReactiveUI Assembly: ReactiveUI.dll Full name: ReactiveUI.AppSupportJsonSuspensionDriver Modifiers: public sealed

Summary

View source

        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, net9.0-ios18.0, net9.0-macos15.0, net9.0-maccatalyst18.0, net9.0-tvos18.0, net8.0-ios18.0, net8.0-maccatalyst18.0, net8.0-macos15.0, net8.0-tvos18.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

NameSummary
.ctorInitializes a new instance of the [AppSupportJsonSuspensionDriver](# class.

Methods

NameSummary
LoadStateLoads application state from persistent storage using source-generated System.Text.Json metadata.
SaveStateSaves application state to persistent storage using source-generated System.Text.Json metadata.
InvalidateStateInvalidates the persisted application state (for example, by deleting it from disk).
Inherited members