diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-10-24 06:40:07 +0300 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-10-24 06:40:07 +0300 |
| commit | adaddad79352c156303e9178a6f172a18af50cd2 (patch) | |
| tree | 0ff2a59c3007bc9c40b7b543a9a2afe32dbc3d45 /Software/Visual_Studio/Tango.DataStore.Remote/RemoteDataStoreItem.cs | |
| parent | 2d803e9410cd383d8e66c300f86fe0f7374c81ea (diff) | |
| download | Tango-adaddad79352c156303e9178a6f172a18af50cd2.tar.gz Tango-adaddad79352c156303e9178a6f172a18af50cd2.zip | |
Refactored DataStore Proto.
Diffstat (limited to 'Software/Visual_Studio/Tango.DataStore.Remote/RemoteDataStoreItem.cs')
| -rw-r--r-- | Software/Visual_Studio/Tango.DataStore.Remote/RemoteDataStoreItem.cs | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/Software/Visual_Studio/Tango.DataStore.Remote/RemoteDataStoreItem.cs b/Software/Visual_Studio/Tango.DataStore.Remote/RemoteDataStoreItem.cs index c58e3ab28..4327a0bd6 100644 --- a/Software/Visual_Studio/Tango.DataStore.Remote/RemoteDataStoreItem.cs +++ b/Software/Visual_Studio/Tango.DataStore.Remote/RemoteDataStoreItem.cs @@ -1,4 +1,5 @@ -using System; +using Newtonsoft.Json.Linq; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -11,7 +12,24 @@ namespace Tango.DataStore.Remote public string Guid { get; set; } public string Key { get; set; } public DataType Type { get; set; } - public object Value { get; set; } + + private object _value; + public object Value + { + get + { + if (_value is JObject jObject) + { + return (jObject.ToObject<DataStoreProtoObject>()); + } + else + { + return _value; + } + } + set { _value = value; } + } + public DateTime Date { get; set; } public bool IsSynchronized { get; set; } |
