Class Stash
Declaration
public abstract class Stash
Derived:
MatchinghamGames.StashModule.StashPersistentPath, MatchinghamGames.StashModule.StashPlayerPrefs
Fields
storedValues
Declaration
public Dictionary<string, object> storedValues
id
Declaration
public string id
Methods
Set<T>(string, T)
Declaration
public void Set<T>(string key, T value)
Parameters
Type | Name |
---|---|
System.String | key |
<T> | value |
Type Parameters
T
Get<T>(string, T)
Declaration
public T Get<T>(string key, T defaultValue)
Returns
<T>
Parameters
Type | Name |
---|---|
System.String | key |
<T> | defaultValue |
Type Parameters
T
Get<T>(string)
Declaration
public virtual T Get<T>(string key)
Returns
<T>
Parameters
Type | Name |
---|---|
System.String | key |
Type Parameters
T
Has(string)
Declaration
public bool Has(string key)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
System.String | key |
Save()
Declaration
public abstract void Save()
PlayerPrefs(string, StashErrorHandler, bool)
Declaration
public static Stash PlayerPrefs(string id, StashErrorHandler onError, bool autosave = true)
Returns
MatchinghamGames.StashModule.Stash
Parameters
Type | Name |
---|---|
System.String | id |
MatchinghamGames.StashModule.StashErrorHandler | onError |
System.Boolean | autosave |
PlayerPrefsAsync(string, StashErrorHandler, bool)
Declaration
public static Task<Stash> PlayerPrefsAsync(string id, StashErrorHandler onError, bool autosave = true)
Returns
System.Threading.Tasks.Task<MatchinghamGames.StashModule.Stash>
Parameters
Type | Name |
---|---|
System.String | id |
MatchinghamGames.StashModule.StashErrorHandler | onError |
System.Boolean | autosave |
PersistentPath(string, StashErrorHandler, bool)
Declaration
public static Stash PersistentPath(string id, StashErrorHandler onError, bool autosave = true)
Returns
MatchinghamGames.StashModule.Stash
Parameters
Type | Name |
---|---|
System.String | id |
MatchinghamGames.StashModule.StashErrorHandler | onError |
System.Boolean | autosave |
PersistentPathAsync(string, StashErrorHandler, bool)
Declaration
public static Task<Stash> PersistentPathAsync(string id, StashErrorHandler onError, bool autosave = true)
Returns
System.Threading.Tasks.Task<MatchinghamGames.StashModule.Stash>
Parameters
Type | Name |
---|---|
System.String | id |
MatchinghamGames.StashModule.StashErrorHandler | onError |
System.Boolean | autosave |
FromDecryptedBytes<T>(byte[])
Declaration
public T FromDecryptedBytes<T>(byte[] bytes) where T : new()
Returns
<T>
Parameters
Type | Name |
---|---|
System.Byte[] | bytes |
Type Parameters
T
ToEncryptedBytes<T>(T)
Declaration
public byte[] ToEncryptedBytes<T>(T value)
Returns
System.Byte[]
Parameters
Type | Name |
---|---|
<T> | value |
Type Parameters
T