aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.DataStore.Remote/RemoteDataStoreItem.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/Tango.DataStore.Remote/RemoteDataStoreItem.cs')
-rw-r--r--Software/Visual_Studio/Tango.DataStore.Remote/RemoteDataStoreItem.cs47
1 files changed, 47 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Tango.DataStore.Remote/RemoteDataStoreItem.cs b/Software/Visual_Studio/Tango.DataStore.Remote/RemoteDataStoreItem.cs
new file mode 100644
index 000000000..4327a0bd6
--- /dev/null
+++ b/Software/Visual_Studio/Tango.DataStore.Remote/RemoteDataStoreItem.cs
@@ -0,0 +1,47 @@
+using Newtonsoft.Json.Linq;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Tango.DataStore.Remote
+{
+ public class RemoteDataStoreItem : IDataStoreItem
+ {
+ public string Guid { get; set; }
+ public string Key { get; set; }
+ public DataType Type { 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; }
+
+ public RemoteDataStoreItem()
+ {
+ Guid = System.Guid.NewGuid().ToString();
+ Date = DateTime.UtcNow;
+ }
+
+ public override string ToString()
+ {
+ return DataStoreHelper.FormatDataStoreItem(this);
+ }
+ }
+}