CloudOnce v2.7.5
Unified Game Services API
CloudOnce.Internal.SyncableItem Class Reference

Data-class for regular cloud preferences. Takes care of serialization and deserialization of the data. The value can be reset to default or altered. More...

Inheritance diagram for CloudOnce.Internal.SyncableItem:
[legend]
Collaboration diagram for CloudOnce.Internal.SyncableItem:
[legend]

Public Member Functions

 SyncableItem (JSONObject itemData)
 Initializes a new instance of the SyncableItem class. Reconstructs the item from a JSONObject. More...
 
 SyncableItem (string value, SyncableItemMetaData metadata)
 Initializes a new instance of the SyncableItem class. More...
 
bool Equals (SyncableItem other)
 Checks if this item is identical to another. More...
 
JSONObject ToJSONObject ()
 Converts the item into a JSONObject. More...
 
void FromJSONObject (JSONObject jsonObject)
 Reconstructs the item from a JSONObject. More...
 
override string ToString ()
 Returns the meta data as a formatted string. More...
 
JSONObject ToJSONObject ()
 
void FromJSONObject (JSONObject jsonObject)
 

Properties

SyncableItemMetaData Metadata [get]
 The items meta data. Used for serialization and conflict resolution.
 
string ValueString [get, set]
 The item's value as a string.
 

Detailed Description

Data-class for regular cloud preferences. Takes care of serialization and deserialization of the data. The value can be reset to default or altered.

Constructor & Destructor Documentation

◆ SyncableItem() [1/2]

CloudOnce.Internal.SyncableItem.SyncableItem ( JSONObject  itemData)
inline

Initializes a new instance of the SyncableItem class. Reconstructs the item from a JSONObject.

Parameters
itemDataThe JSONObject containing the SyncableItem

◆ SyncableItem() [2/2]

CloudOnce.Internal.SyncableItem.SyncableItem ( string  value,
SyncableItemMetaData  metadata 
)
inline

Initializes a new instance of the SyncableItem class.

Parameters
valueThe value in string form
metadataA collection of info about the SyncableItem

Member Function Documentation

◆ Equals()

bool CloudOnce.Internal.SyncableItem.Equals ( SyncableItem  other)
inline

Checks if this item is identical to another.

Parameters
otherThe other item to check against.
Returns
Returns true if the items are identical, false if there are any differences.

◆ FromJSONObject()

void CloudOnce.Internal.SyncableItem.FromJSONObject ( JSONObject  jsonObject)
inline

Reconstructs the item from a JSONObject.

Parameters
jsonObjectJSONObject containing the item data.

Implements CloudOnce.Internal.IJsonDeserializable.

◆ ToJSONObject()

JSONObject CloudOnce.Internal.SyncableItem.ToJSONObject ( )
inline

Converts the item into a JSONObject.

Returns
JSONObject containing the item.

Implements CloudOnce.Internal.IJsonSerializable.

◆ ToString()

override string CloudOnce.Internal.SyncableItem.ToString ( )
inline

Returns the meta data as a formatted string.

Returns
The meta data as a formatted string.

The documentation for this class was generated from the following file: