BGC Tools
|
Public Member Functions | |
ProfileData (string userName) | |
virtual void | Clear () |
Clear all values and keys More... | |
void | SetInt (string key, int value) |
Set value at indicated key More... | |
void | SetBool (string key, bool value) |
Set value at indicated key More... | |
void | SetString (string key, string value) |
Set value at indicated key More... | |
void | SetFloat (string key, float value) |
Set value at indicated key More... | |
void | SetDouble (string key, double value) |
Set value at indicated key More... | |
void | SetJsonValue (string key, JsonValue value) |
Set value at indicated key More... | |
void | SetJsonArray (string key, JsonArray value) |
Set value at indicated key More... | |
int | GetInt (string key, int defaultReturn=0) |
Get value associated with indicated key More... | |
bool | GetBool (string key, bool defaultReturn=false) |
Get value associated with indicated key More... | |
float | GetFloat (string key, float defaultReturn=0f) |
Get value associated with indicated key More... | |
double | GetDouble (string key, double defaultReturn=0.0) |
Get value associated with indicated key More... | |
string | GetString (string key, string defaultReturn="") |
Get value associated with indicated key More... | |
JsonValue | GetJsonValue (string key, JsonValue defaultReturn=default(JsonValue)) |
Get value associated with indicated key More... | |
JsonArray | GetJsonArray (string key, JsonArray defaultReturn=default(JsonArray)) |
Get value associated with indicated key More... | |
bool | HasKey (string key) |
Get if any value is associated with indicated key More... | |
void | RemoveKey (string key) |
Remove any value is associated with indicated key More... | |
void | Serialize () |
Save contents to file More... | |
bool | Deserialize () |
Load user contents from file More... | |
virtual void | DeletePlayerData () |
Protected Attributes | |
string | PlayerFilePath |
Path of the user datafile More... | |
Properties | |
string | UserName [get] |
abstract bool | IsDefault [get] |
Is this an instance of default data? More... | |
Private Attributes | |
JsonObject | userData = new JsonObject() |
const int | userDataSerializationVersion = 1 |
Definition at line 9 of file ProfileData.cs.
|
inline |
Definition at line 17 of file ProfileData.cs.
|
inlinevirtual |
Clear all values and keys
Definition at line 31 of file ProfileData.cs.
References LightJson.JsonObject.Clear().
|
inlinevirtual |
Reimplemented in BGC.Users.DefaultData.
Definition at line 312 of file ProfileData.cs.
Referenced by BGC.Users.PlayerData.DeleteUserData().
|
inline |
Load user contents from file
Definition at line 298 of file ProfileData.cs.
References LightJson.JsonObject.ContainsKey(), and BGC.IO.FileReader.ReadJsonFile().
Referenced by BGC.Users.PlayerData.DeleteUserData(), BGC.Users.PlayerData.GetMigrationData(), and BGC.Users.PlayerData.LogIn().
|
inline |
Get value associated with indicated key
defaultReturn | The value to return if the key is not present in dictionary |
Definition at line 193 of file ProfileData.cs.
References LightJson.JsonObject.ContainsKey().
Referenced by BGC.Users.PlayerData.GetMigrationData().
|
inline |
Get value associated with indicated key
defaultReturn | The value to return if the key is not present in dictionary |
Definition at line 224 of file ProfileData.cs.
References LightJson.JsonObject.ContainsKey().
|
inline |
Get value associated with indicated key
defaultReturn | The value to return if the key is not present in dictionary |
Definition at line 212 of file ProfileData.cs.
References LightJson.JsonObject.ContainsKey().
|
inline |
Get value associated with indicated key
defaultReturn | The value to return if the key is not present in dictionary |
Definition at line 181 of file ProfileData.cs.
References LightJson.JsonObject.ContainsKey().
|
inline |
Get value associated with indicated key
defaultReturn | The value to return if the key is not present in dictionary |
Definition at line 260 of file ProfileData.cs.
References LightJson.JsonObject.ContainsKey(), and LightJson.JsonObject.Remove().
|
inline |
Get value associated with indicated key
defaultReturn | The value to return if the key is not present in dictionary |
Definition at line 248 of file ProfileData.cs.
References LightJson.JsonObject.ContainsKey().
|
inline |
Get value associated with indicated key
defaultReturn | The value to return if the key is not present in dictionary |
Definition at line 236 of file ProfileData.cs.
References LightJson.JsonObject.ContainsKey().
Referenced by BGC.Users.PlayerData.GetMigrationData().
bool BGC.Users.ProfileData.HasKey | ( | string | key | ) |
Get if any value is associated with indicated key
void BGC.Users.ProfileData.RemoveKey | ( | string | key | ) |
Remove any value is associated with indicated key
|
inline |
Save contents to file
Definition at line 277 of file ProfileData.cs.
References BGC.IO.FileWriter.WriteJson().
Referenced by BGC.Users.PlayerData.AddUser().
|
inline |
Set value at indicated key
Definition at line 59 of file ProfileData.cs.
References LightJson.JsonObject.Add(), and LightJson.JsonObject.ContainsKey().
|
inline |
Set value at indicated key
Definition at line 129 of file ProfileData.cs.
References LightJson.JsonObject.Add(), and LightJson.JsonObject.ContainsKey().
|
inline |
Set value at indicated key
Definition at line 108 of file ProfileData.cs.
References LightJson.JsonObject.Add(), and LightJson.JsonObject.ContainsKey().
|
inline |
Set value at indicated key
Definition at line 37 of file ProfileData.cs.
References LightJson.JsonObject.Add(), and LightJson.JsonObject.ContainsKey().
|
inline |
Set value at indicated key
Definition at line 165 of file ProfileData.cs.
References LightJson.JsonObject.Add(), and LightJson.JsonObject.ContainsKey().
|
inline |
Set value at indicated key
Definition at line 150 of file ProfileData.cs.
References LightJson.JsonObject.Add(), and LightJson.JsonObject.ContainsKey().
|
inline |
Set value at indicated key
Definition at line 87 of file ProfileData.cs.
References LightJson.JsonObject.Add(), and LightJson.JsonObject.ContainsKey().
|
protected |
Path of the user datafile
Definition at line 26 of file ProfileData.cs.
|
private |
Definition at line 13 of file ProfileData.cs.
|
private |
Definition at line 15 of file ProfileData.cs.
|
get |
Is this an instance of default data?
Definition at line 23 of file ProfileData.cs.
|
get |
Definition at line 11 of file ProfileData.cs.
Referenced by BGC.Users.PlayerData.GetMigrationData().