C# Class June.LocalStorage.Providers.DefaultLocalStore

Default local storage provider uses PlayerPerfs as persistent store.
Inheritance: ILocalStore
Mostra file Open project: JuneSoftware/LocalStorage

Protected Properties

Property Type Description
_INDEX string>.Dictionary

Public Methods

Method Description
DefaultLocalStore ( ) : System

Initializes a new instance of the DefaultLocalStorage class.

DeleteAll ( ) : void

Clears all the data.

DeleteKey ( string key ) : void

Deletes the key from storage and INDEX.

GetFloat ( string key ) : float

Gets the float value for the key.

GetInt ( string key ) : int

Gets an integer value for the key.

GetSerializedData ( ) : object>.IDictionary

Gets the serialized data.

GetString ( string key ) : string

Gets the string value for the key.

HasKey ( string key ) : bool

Checks if the key exists.

Initialize ( ) : void

Initialize this instance.

Save ( ) : void

Saves currently modified data.

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.

SetStringWithoutKey ( string key, string value ) : void

Sets the string value for a key without including it in the INDEX.

Protected Methods

Method Description
AddKey ( string key, string type ) : void

Adds a key to the index.

DeSerializeKeys ( ) : void

Deserialize keys from PlayerPerfs and creates a in-memory representation.

RemoveKey ( string key ) : void

Removes a key from the index.

SerializeKeys ( ) : string

Serializes the keys present in the in-memory representation of the index.

Method Details

AddKey() protected method

Adds a key to the index.
protected AddKey ( string key, string type ) : void
key string Key.
type string Type.
return void

DeSerializeKeys() protected method

Deserialize keys from PlayerPerfs and creates a in-memory representation.
protected DeSerializeKeys ( ) : void
return void

DefaultLocalStore() public method

Initializes a new instance of the DefaultLocalStorage class.
public DefaultLocalStore ( ) : System
return System

DeleteAll() public method

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

DeleteKey() public method

Deletes the key from storage and INDEX.
public DeleteKey ( string key ) : void
key string Key.
return void

GetFloat() public method

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

GetInt() public method

Gets an integer value for the key.
public GetInt ( string key ) : int
key string Key.
return int

GetSerializedData() public method

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

GetString() public method

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

HasKey() public method

Checks if the key exists.
public HasKey ( string key ) : bool
key string Key.
return bool

Initialize() public method

Initialize this instance.
public Initialize ( ) : void
return void

RemoveKey() protected method

Removes a key from the index.
protected RemoveKey ( string key ) : void
key string Key.
return void

Save() public method

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

SerializeKeys() protected method

Serializes the keys present in the in-memory representation of the index.
protected SerializeKeys ( ) : string
return string

SetFloat() public method

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

SetInt() public method

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

SetString() public method

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

SetStringWithoutKey() public method

Sets the string value for a key without including it in the INDEX.
public SetStringWithoutKey ( string key, string value ) : void
key string Key.
value string Value.
return void

Property Details

_INDEX protected_oe property

In memory representaion of the index.
protected Dictionary _INDEX
return string>.Dictionary