})} },System.Nullable{System.TimeSpan})} },System.IObservable{--1})} },System.IObservable{--1},System.Nullable{System.TimeSpan})} },ReactiveUI.Reactive.AutoPersistHelperMixins.AutoPersistMetadata)} },ReactiveUI.Reactive.AutoPersistHelperMixins.AutoPersistMetadata,System.Nullable{System.TimeSpan})} },System.IObservable{--1},ReactiveUI.Reactive.AutoPersistHelperMixins.AutoPersistMetadata)} },System.IObservable{--1},ReactiveUI.Reactive.AutoPersistHelperMixins.AutoPersistMetadata,System.Nullable{System.TimeSpan})}
AutoPersistHelperMixins.AutoPersist(T, Func>) method¶
Defined in
Type: AutoPersistHelperMixins
Namespace: ReactiveUI.Reactive
Assembly: ReactiveUI.Reactive.dll
Applies to
net10.0, net10.0-ios26.0, net10.0-android36.0, net10.0-maccatalyst26.0, net10.0-macos26.0, net10.0-tvos26.0, net9.0, net8.0, net462, net481
Overloads¶
-
public static IDisposable AutoPersist<T>(this T @this, Func<T, IObservable<Unit>> doPersist) where T : notnull, IReactiveObject -
public static IDisposable AutoPersist<T>(this T @this, Func<T, IObservable<Unit>> doPersist, TimeSpan? interval) where T : notnull, IReactiveObject -
public static IDisposable AutoPersist<T, TDontCare>(this T @this, Func<T, IObservable<Unit>> doPersist, IObservable<TDontCare> manualSaveSignal) where T : notnull, IReactiveObject where TDontCare : notnull -
public static IDisposable AutoPersist<T, TDontCare>(this T @this, Func<T, IObservable<Unit>> doPersist, IObservable<TDontCare> manualSaveSignal, TimeSpan? interval) where T : notnull, IReactiveObject where TDontCare : notnull -
public static IDisposable AutoPersist<T>(this T @this, Func<T, IObservable<Unit>> doPersist, AutoPersistHelperMixins.AutoPersistMetadata metadata) where T : notnull, IReactiveObject -
public static IDisposable AutoPersist<T>(this T @this, Func<T, IObservable<Unit>> doPersist, AutoPersistHelperMixins.AutoPersistMetadata metadata, TimeSpan? interval) where T : notnull, IReactiveObject -
public static IDisposable AutoPersist<T, TDontCare>(this T @this, Func<T, IObservable<Unit>> doPersist, IObservable<TDontCare> manualSaveSignal, AutoPersistHelperMixins.AutoPersistMetadata metadata) where T : notnull, IReactiveObject where TDontCare : notnull -
public static IDisposable AutoPersist<T, TDontCare>(this T @this, Func<T, IObservable<Unit>> doPersist, IObservable<TDontCare> manualSaveSignal, AutoPersistHelperMixins.AutoPersistMetadata metadata, TimeSpan? interval) where T : notnull, IReactiveObject where TDontCare : notnull
1. Overload¶
Attributes: [RequiresUnreferencedCode("AutoPersist may reflect over the runtime type; prefer the AutoPersistMetadata overloads for trimming/AOT.")] [RequiresDynamicCode("AutoPersist may reflect over the runtime type; prefer the AutoPersistMetadata overloads for trimming/AOT.")]
public static IDisposable AutoPersist<T>(this T @this, Func<T, IObservable<Unit>> doPersist) where T : notnull, IReactiveObject
Type parameters
| Name | Description |
|---|---|
T | -- |
Parameters
| Name | Type | Description |
|---|---|---|
this | T | -- |
doPersist | Func | -- |
Returns: IDisposable
2. Overload¶
Attributes: [RequiresUnreferencedCode("AutoPersist may reflect over the runtime type when it differs from T. In trimmed/AOT builds, required property/attribute metadata may be removed unless explicitly preserved. Prefer the overloads that accept AutoPersistMetadata to avoid runtime reflection.")] [RequiresDynamicCode("AutoPersist may reflect over the runtime type when it differs from T. In trimmed/AOT builds, required property/attribute metadata may be removed unless explicitly preserved. Prefer the overloads that accept AutoPersistMetadata to avoid runtime reflection.")]
public static IDisposable AutoPersist<T>(this T @this, Func<T, IObservable<Unit>> doPersist, TimeSpan? interval) where T : notnull, IReactiveObject
Type parameters
| Name | Description |
|---|---|
T | -- |
Parameters
| Name | Type | Description |
|---|---|---|
this | T | -- |
doPersist | Func | -- |
interval | TimeSpan? | -- |
Returns: IDisposable
3. Overload¶
Attributes: [RequiresUnreferencedCode("AutoPersist may reflect over the runtime type; prefer the AutoPersistMetadata overloads for trimming/AOT.")] [RequiresDynamicCode("AutoPersist may reflect over the runtime type; prefer the AutoPersistMetadata overloads for trimming/AOT.")]
public static IDisposable AutoPersist<T, TDontCare>(this T @this, Func<T, IObservable<Unit>> doPersist, IObservable<TDontCare> manualSaveSignal) where T : notnull, IReactiveObject where TDontCare : notnull
Type parameters
| Name | Description |
|---|---|
T | -- |
TDontCare | -- |
Parameters
| Name | Type | Description |
|---|---|---|
this | T | -- |
doPersist | Func | -- |
manualSaveSignal | IObservable | -- |
Returns: IDisposable
4. Overload¶
Attributes: [RequiresUnreferencedCode("AutoPersist may reflect over the runtime type when it differs from T. In trimmed/AOT builds, required property/attribute metadata may be removed unless explicitly preserved. Prefer the overloads that accept AutoPersistMetadata to avoid runtime reflection.")] [RequiresDynamicCode("AutoPersist may reflect over the runtime type when it differs from T. In trimmed/AOT builds, required property/attribute metadata may be removed unless explicitly preserved. Prefer the overloads that accept AutoPersistMetadata to avoid runtime reflection.")]
public static IDisposable AutoPersist<T, TDontCare>(this T @this, Func<T, IObservable<Unit>> doPersist, IObservable<TDontCare> manualSaveSignal, TimeSpan? interval) where T : notnull, IReactiveObject where TDontCare : notnull
Type parameters
| Name | Description |
|---|---|
T | -- |
TDontCare | -- |
Parameters
| Name | Type | Description |
|---|---|---|
this | T | -- |
doPersist | Func | -- |
manualSaveSignal | IObservable | -- |
interval | TimeSpan? | -- |
Returns: IDisposable
5. Overload¶
public static IDisposable AutoPersist<T>(this T @this, Func<T, IObservable<Unit>> doPersist, AutoPersistHelperMixins.AutoPersistMetadata metadata) where T : notnull, IReactiveObject
Type parameters
| Name | Description |
|---|---|
T | -- |
Parameters
| Name | Type | Description |
|---|---|---|
this | T | -- |
doPersist | Func | -- |
metadata | [AutoPersistMetadata](# | -- |
Returns: IDisposable
6. Overload¶
public static IDisposable AutoPersist<T>(this T @this, Func<T, IObservable<Unit>> doPersist, AutoPersistHelperMixins.AutoPersistMetadata metadata, TimeSpan? interval) where T : notnull, IReactiveObject
Type parameters
| Name | Description |
|---|---|
T | -- |
Parameters
| Name | Type | Description |
|---|---|---|
this | T | -- |
doPersist | Func | -- |
metadata | [AutoPersistMetadata](# | -- |
interval | TimeSpan? | -- |
Returns: IDisposable
7. Overload¶
public static IDisposable AutoPersist<T, TDontCare>(this T @this, Func<T, IObservable<Unit>> doPersist, IObservable<TDontCare> manualSaveSignal, AutoPersistHelperMixins.AutoPersistMetadata metadata) where T : notnull, IReactiveObject where TDontCare : notnull
Type parameters
| Name | Description |
|---|---|
T | -- |
TDontCare | -- |
Parameters
| Name | Type | Description |
|---|---|---|
this | T | -- |
doPersist | Func | -- |
manualSaveSignal | IObservable | -- |
metadata | [AutoPersistMetadata](# | -- |
Returns: IDisposable
8. Overload¶
public static IDisposable AutoPersist<T, TDontCare>(this T @this, Func<T, IObservable<Unit>> doPersist, IObservable<TDontCare> manualSaveSignal, AutoPersistHelperMixins.AutoPersistMetadata metadata, TimeSpan? interval) where T : notnull, IReactiveObject where TDontCare : notnull
Type parameters
| Name | Description |
|---|---|
T | -- |
TDontCare | -- |
Parameters
| Name | Type | Description |
|---|---|---|
this | T | -- |
doPersist | Func | -- |
manualSaveSignal | IObservable | -- |
metadata | [AutoPersistMetadata](# | -- |
interval | TimeSpan? | -- |
Returns: IDisposable