Class UnityPlayerPrefsKeyValueStore
Unity implementation of IKeyValueStore using PlayerPrefs for persistence.
Inheritance
UnityPlayerPrefsKeyValueStore
Assembly: Serenity.UnityPlayerPrefsPersistence.Infrastructure.dll
Syntax
public class UnityPlayerPrefsKeyValueStore : IKeyValueStore, IKeyedStore, IPersistenceStore
Constructors
UnityPlayerPrefsKeyValueStore(string, string)
Declaration
public UnityPlayerPrefsKeyValueStore(string keyPrefix = "Serenity_", string @namespace = "playerprefs")
Parameters
| Type |
Name |
Description |
| string |
keyPrefix |
Optional prefix prepended to every PlayerPrefs key to avoid collisions.
Defaults to "Serenity_".
|
| string |
namespace |
Logical namespace for diagnostics/telemetry. Defaults to "playerprefs".
|
Properties
Namespace
Declaration
public string Namespace { get; }
Property Value
Methods
DeleteAsync(string, CancellationToken)
Declaration
public Task DeleteAsync(string key, CancellationToken cancellationToken)
Parameters
Returns
ExistsAsync(string, CancellationToken)
Declaration
public Task<bool> ExistsAsync(string key, CancellationToken cancellationToken)
Parameters
Returns
GetAsync(string, CancellationToken)
Declaration
public Task<ReadOnlyMemory<byte>?> GetAsync(string key, CancellationToken cancellationToken)
Parameters
Returns
| Type |
Description |
| Task<ReadOnlyMemory<byte>?> |
|
HealthCheckAsync(CancellationToken)
Declaration
public Task<bool> HealthCheckAsync(CancellationToken cancellationToken)
Parameters
Returns
SetAsync(string, ReadOnlyMemory<byte>, CancellationToken)
Declaration
public Task SetAsync(string key, ReadOnlyMemory<byte> value, CancellationToken cancellationToken)
Parameters
Returns
Implements