From adaddad79352c156303e9178a6f172a18af50cd2 Mon Sep 17 00:00:00 2001 From: Roy Ben Shabat Date: Sat, 24 Oct 2020 06:40:07 +0300 Subject: Refactored DataStore Proto. --- .../Tango.DataStore.Remote/RemoteDataStoreItem.cs | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'Software/Visual_Studio/Tango.DataStore.Remote/RemoteDataStoreItem.cs') 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()); + } + else + { + return _value; + } + } + set { _value = value; } + } + public DateTime Date { get; set; } public bool IsSynchronized { get; set; } -- cgit v1.3.1