,System.Func{Akavache.IBlobCache>
Defined in Type: SettingsBase
Namespace: Akavache.Settings
Assembly: Akavache.Settings.dll
Applies to
net10.0, net10.0-tvos26.0, net10.0-maccatalyst26.0, net10.0-browserwasm1.0, net10.0-desktop1.0, net10.0-android36.0, net10.0-ios26.0, net10.0-windows10.0.19041, net10.0-macos26.0, net9.0, net9.0-windows10.0.19041, net9.0-browserwasm1.0, net9.0-desktop1.0, net8.0, net8.0-windows10.0.19041, net8.0-ios17.5, net8.0-maccatalyst17.5, net8.0-macos14.2, net8.0-macos14.5, net8.0-tvos17.2, netstandard2.1, net481, net462
Overloads
- 1.
protected SettingsBase(string className) - 2.
protected SettingsBase(string className, Func<IBlobCache> userAccountResolver, Func<IBlobCache> localMachineResolver, Func<IBlobCache> inMemoryResolver)
1. Overload
protected SettingsBase(string className)
Summary: Initializes a new instance of the SettingsBase class that resolves its backing cache from the ambient CacheDatabase.
Parameters
| Name | Type | Description |
|---|---|---|
className | string | Name of the class — used as the settings key prefix. |
2. Overload
protected SettingsBase(string className, Func<IBlobCache> userAccountResolver, Func<IBlobCache> localMachineResolver, Func<IBlobCache> inMemoryResolver)
Summary:
Initializes a new instance of the SettingsBase class with explicit
ambient-cache resolvers. The resolver delegates are used by
TryGetFromCacheDatabase when the explicit registry does not contain
an entry for className; each resolver is wrapped in a
try/catch so an unconfigured cache kind simply falls through to the
next. This overload exists to make the class testable without touching the
global CacheDatabase singleton.
Parameters
| Name | Type | Description |
|---|---|---|
className | string | Name of the class — used as the settings key prefix. |
userAccountResolver | Func | Delegate that returns the UserAccount cache, or throws when unavailable. |
localMachineResolver | Func | Delegate that returns the LocalMachine cache, or throws when unavailable. |
inMemoryResolver | Func | Delegate that returns the InMemory cache, or throws when unavailable. |