C# Класс June.LocalStorage.Providers.JSONLocalStore

JSON local storage provider.
Наследование: ILocalStore
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
DATA object>.IDictionary
FILE_PATH string

Открытые методы

Метод Описание
DeleteAll ( ) : void

Clears all data.

DeleteKey ( string key ) : void

Deletes the key.

GetFloat ( string key ) : float

Gets the float value for a key.

GetInt ( string key ) : int

Gets the int value for a key.

GetSerializedData ( ) : IDictionary,System.Collections.Generic

Gets the serialized data.

GetString ( string key ) : string

Gets the string value for a key.

HasKey ( string key ) : bool

Checks if the key exists.

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.

JSONLocalStore ( ) : System

Initializes a new instance of the JSONLocalStorage class.

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.

Защищенные методы

Метод Описание
Deserialize ( string data ) : void

Deserialize the specified data.

Get ( string key ) : object

Get the specified key's value.

ReadDataFromFile ( ) : void

Reads the data from file.

Serialize ( object>.IDictionary data ) : string

Serialize the specified data.

Set ( string key, object value ) : void

Set the specified key and value.

WriteDataToFile ( ) : void

Writes the data to file.

Описание методов

DeleteAll() публичный Метод

Clears all data.
public DeleteAll ( ) : void
Результат void

DeleteKey() публичный Метод

Deletes the key.
public DeleteKey ( string key ) : void
key string Key.
Результат void

Deserialize() защищенный Метод

Deserialize the specified data.
protected Deserialize ( string data ) : void
data string Data.
Результат void

Get() защищенный Метод

Get the specified key's value.
protected Get ( string key ) : object
key string Key.
Результат object

GetFloat() публичный Метод

Gets the float value for a key.
public GetFloat ( string key ) : float
key string Key.
Результат float

GetInt() публичный Метод

Gets the int value for a key.
public GetInt ( string key ) : int
key string Key.
Результат int

GetSerializedData() публичный Метод

Gets the serialized data.
public GetSerializedData ( ) : IDictionary,System.Collections.Generic
Результат IDictionary,System.Collections.Generic

GetString() публичный Метод

Gets the string value for a key.
public GetString ( string key ) : string
key string Key.
Результат string

HasKey() публичный Метод

Checks if the key exists.
public HasKey ( string key ) : bool
key string Key.
Результат bool

Initialize() публичный Метод

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 Initialize ( ) : void
Результат void

JSONLocalStore() публичный Метод

Initializes a new instance of the JSONLocalStorage class.
public JSONLocalStore ( ) : System
Результат System

ReadDataFromFile() защищенный Метод

Reads the data from file.
protected ReadDataFromFile ( ) : void
Результат void

Save() публичный Метод

Saves currently modified data.
public Save ( ) : void
Результат void

Serialize() защищенный Метод

Serialize the specified data.
protected Serialize ( object>.IDictionary data ) : string
data object>.IDictionary Data.
Результат string

Set() защищенный Метод

Set the specified key and value.
protected Set ( string key, object value ) : void
key string Key.
value object Value.
Результат void

SetFloat() публичный Метод

Sets the float value for a key.
public SetFloat ( string key, float value ) : void
key string Key.
value float Value.
Результат void

SetInt() публичный Метод

Sets the int value for a key.
public SetInt ( string key, int value ) : void
key string Key.
value int Value.
Результат void

SetString() публичный Метод

Sets the string value for a key.
public SetString ( string key, string value ) : void
key string Key.
value string Value.
Результат void

WriteDataToFile() защищенный Метод

Writes the data to file.
protected WriteDataToFile ( ) : void
Результат void

Описание свойств

DATA защищенное статическое свойство

protected static IDictionary DATA
Результат object>.IDictionary

FILE_PATH защищенное статическое свойство

protected static string FILE_PATH
Результат string