C# 클래스 June.LocalStorage.Providers.JSONLocalStore

JSON local storage provider.
상속: ILocalStore
파일 보기 프로젝트 열기: JuneSoftware/LocalStorage

보호된 프로퍼티들

프로퍼티 타입 설명
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