C# Class June.ILocalStore

Local storage Interface.
Datei anzeigen Open project: JuneSoftware/LocalStorage

Public Methods

Method Description
Decrement ( string key ) : void

Decrement the the integer value of a specified key.

DeleteAll ( ) : void

Clears all data.

DeleteKey ( string key ) : void

Deletes the key.

DeserializeData ( object>.IDictionary jsonObj ) : bool

Deserializes the data.

GetBool ( string key ) : bool

Gets the boolean value for a key.

GetBoolOrDefault ( string key ) : bool

Gets the bool value if key is present else returns default bool value.

GetFloat ( string key ) : float

Gets the float value for a key.

GetFloatOrDefault ( string key ) : float

Gets the float if key is present else returns default float value.

GetInt ( string key ) : int

Gets the int value for a key.

GetIntOrDefault ( string key ) : int

Gets the int value if key is present else returns default int value.

GetSerializedData ( ) : object>.IDictionary

Gets the serialized data.

GetSerializedDataJSON ( ) : string

Gets the serialized data JSON.

GetSerializedDataJSON ( object>.IDictionary dict ) : string

Gets the serialized data in JSON format.

GetString ( string key ) : string

Gets the string value for a key.

GetStringArray ( string key ) : string[]

Gets the string array for a key.

GetStringOrDefault ( string key ) : string

Gets the string value if key is present else returns default string value.

HasKey ( string key ) : bool

Checks if the key exists.

Increment ( string key ) : void

Increments the integer value of a specified key.

Initialize ( ) : void

Initialize this instance. This is where the provider should write its initialization code. This could be called from the constructor as well. While creating an instance the LocalStorage class does not explicity call this Initialize method, but expects the provider to be initialized after calling the constructor. This method is only provided incase the game wants to re-initialize the provider for any reason.

Save ( ) : void

Saves currently modified data.

SetBool ( string key, bool value ) : void

Sets the bool value for a key.

SetFloat ( string key, float value ) : void

Sets the float value for a key.

SetInt ( string key, int value ) : void

Sets the int value for a key.

SetString ( string key, string value ) : void

Sets the string value for a key.

SetStringArray ( string key, string values ) : void

Sets the string array value for a key.

Method Details

Decrement() public method

Decrement the the integer value of a specified key.
public Decrement ( string key ) : void
key string /// Key. ///
return void

DeleteAll() public abstract method

Clears all data.
public abstract DeleteAll ( ) : void
return void

DeleteKey() public abstract method

Deletes the key.
public abstract DeleteKey ( string key ) : void
key string /// Key. ///
return void

DeserializeData() public method

Deserializes the data.
public DeserializeData ( object>.IDictionary jsonObj ) : bool
jsonObj object>.IDictionary /// If set to true json object. ///
return bool

GetBool() public method

Gets the boolean value for a key.
public GetBool ( string key ) : bool
key string /// If set to true key. ///
return bool

GetBoolOrDefault() public method

Gets the bool value if key is present else returns default bool value.
public GetBoolOrDefault ( string key ) : bool
key string /// If set to true key. ///
return bool

GetFloat() public abstract method

Gets the float value for a key.
public abstract GetFloat ( string key ) : float
key string /// Key. ///
return float

GetFloatOrDefault() public method

Gets the float if key is present else returns default float value.
public GetFloatOrDefault ( string key ) : float
key string /// Key. ///
return float

GetInt() public abstract method

Gets the int value for a key.
public abstract GetInt ( string key ) : int
key string /// Key. ///
return int

GetIntOrDefault() public method

Gets the int value if key is present else returns default int value.
public GetIntOrDefault ( string key ) : int
key string /// Key. ///
return int

GetSerializedData() public abstract method

Gets the serialized data.
public abstract GetSerializedData ( ) : object>.IDictionary
return object>.IDictionary

GetSerializedDataJSON() public method

Gets the serialized data JSON.
public GetSerializedDataJSON ( ) : string
return string

GetSerializedDataJSON() public method

Gets the serialized data in JSON format.
public GetSerializedDataJSON ( object>.IDictionary dict ) : string
dict object>.IDictionary
return string

GetString() public abstract method

Gets the string value for a key.
public abstract GetString ( string key ) : string
key string /// Key. ///
return string

GetStringArray() public method

Gets the string array for a key.
public GetStringArray ( string key ) : string[]
key string /// Key. ///
return string[]

GetStringOrDefault() public method

Gets the string value if key is present else returns default string value.
public GetStringOrDefault ( string key ) : string
key string /// Key. ///
return string

HasKey() public abstract method

Checks if the key exists.
public abstract HasKey ( string key ) : bool
key string /// If set to true key. ///
return bool

Increment() public method

Increments the integer value of a specified key.
public Increment ( string key ) : void
key string /// Key. ///
return void

Initialize() public abstract method

Initialize this instance. This is where the provider should write its initialization code. This could be called from the constructor as well. While creating an instance the LocalStorage class does not explicity call this Initialize method, but expects the provider to be initialized after calling the constructor. This method is only provided incase the game wants to re-initialize the provider for any reason.
public abstract Initialize ( ) : void
return void

Save() public abstract method

Saves currently modified data.
public abstract Save ( ) : void
return void

SetBool() public method

Sets the bool value for a key.
public SetBool ( string key, bool value ) : void
key string /// Key. ///
value bool /// Value. ///
return void

SetFloat() public abstract method

Sets the float value for a key.
public abstract SetFloat ( string key, float value ) : void
key string /// Key. ///
value float /// Value. ///
return void

SetInt() public abstract method

Sets the int value for a key.
public abstract SetInt ( string key, int value ) : void
key string /// Key. ///
value int /// Value. ///
return void

SetString() public abstract method

Sets the string value for a key.
public abstract SetString ( string key, string value ) : void
key string /// Key. ///
value string /// Value. ///
return void

SetStringArray() public method

Sets the string array value for a key.
public SetStringArray ( string key, string values ) : void
key string /// Key. ///
values string /// Values. ///
return void