diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-10-25 16:58:42 +0200 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-10-25 16:58:42 +0200 |
| commit | d530d39d7ed9b05e3e233adc62dceba2fd17e1fe (patch) | |
| tree | 2e042288fdeedd12e3ca0ee331743ebc115eb4b2 /Software/Visual_Studio/Tango.DataStore/DataStoreProtoObject.cs | |
| parent | adaddad79352c156303e9178a6f172a18af50cd2 (diff) | |
| download | Tango-d530d39d7ed9b05e3e233adc62dceba2fd17e1fe.tar.gz Tango-d530d39d7ed9b05e3e233adc62dceba2fd17e1fe.zip | |
Improved extension methods support on procedures.
Drastically reduces procedure designer loading time.
DataStore proto support fully working and tested.
Diffstat (limited to 'Software/Visual_Studio/Tango.DataStore/DataStoreProtoObject.cs')
| -rw-r--r-- | Software/Visual_Studio/Tango.DataStore/DataStoreProtoObject.cs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Tango.DataStore/DataStoreProtoObject.cs b/Software/Visual_Studio/Tango.DataStore/DataStoreProtoObject.cs index ec4cf1057..6661c2017 100644 --- a/Software/Visual_Studio/Tango.DataStore/DataStoreProtoObject.cs +++ b/Software/Visual_Studio/Tango.DataStore/DataStoreProtoObject.cs @@ -1,5 +1,6 @@ using Google.Protobuf; using Newtonsoft.Json; +using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; using System.IO; @@ -59,6 +60,11 @@ namespace Tango.DataStore return proto; } + public static DataStoreProtoObject FromJObject(JObject obj) + { + return (obj.ToObject<DataStoreProtoObject>()); + } + public static DataStoreProtoObject FromPMRDataStoreItem(DataStoreItem item) { DataStoreProtoObject proto = new DataStoreProtoObject(); |
