Skip to main content

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
TypeName
System.Stringkey
<T>value
Type Parameters
  • T

Get<T>(string, T)

Declaration
public T Get<T>(string key, T defaultValue)
Returns

<T>

Parameters
TypeName
System.Stringkey
<T>defaultValue
Type Parameters
  • T

Get<T>(string)

Declaration
public virtual T Get<T>(string key)
Returns

<T>

Parameters
TypeName
System.Stringkey
Type Parameters
  • T

Has(string)

Declaration
public bool Has(string key)
Returns

System.Boolean

Parameters
TypeName
System.Stringkey

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
TypeName
System.Stringid
MatchinghamGames.StashModule.StashErrorHandleronError
System.Booleanautosave

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
TypeName
System.Stringid
MatchinghamGames.StashModule.StashErrorHandleronError
System.Booleanautosave

PersistentPath(string, StashErrorHandler, bool)

Declaration
public static Stash PersistentPath(string id, StashErrorHandler onError, bool autosave = true)
Returns

MatchinghamGames.StashModule.Stash

Parameters
TypeName
System.Stringid
MatchinghamGames.StashModule.StashErrorHandleronError
System.Booleanautosave

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
TypeName
System.Stringid
MatchinghamGames.StashModule.StashErrorHandleronError
System.Booleanautosave

FromDecryptedBytes<T>(byte[])

Declaration
public T FromDecryptedBytes<T>(byte[] bytes) where T : new()
Returns

<T>

Parameters
TypeName
System.Byte[]bytes
Type Parameters
  • T

ToEncryptedBytes<T>(T)

Declaration
public byte[] ToEncryptedBytes<T>(T value)
Returns

System.Byte[]

Parameters
TypeName
<T>value
Type Parameters
  • T