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/RemoteDataStorePutRequest.cs | |
| parent | 2d803e9410cd383d8e66c300f86fe0f7374c81ea (diff) | |
| download | Tango-adaddad79352c156303e9178a6f172a18af50cd2.tar.gz Tango-adaddad79352c156303e9178a6f172a18af50cd2.zip | |
Refactored DataStore Proto.
Diffstat (limited to 'Software/Visual_Studio/Tango.DataStore.Remote/RemoteDataStorePutRequest.cs')
| -rw-r--r-- | Software/Visual_Studio/Tango.DataStore.Remote/RemoteDataStorePutRequest.cs | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/Software/Visual_Studio/Tango.DataStore.Remote/RemoteDataStorePutRequest.cs b/Software/Visual_Studio/Tango.DataStore.Remote/RemoteDataStorePutRequest.cs index 6ea13bf6b..77aa5e41f 100644 --- a/Software/Visual_Studio/Tango.DataStore.Remote/RemoteDataStorePutRequest.cs +++ b/Software/Visual_Studio/Tango.DataStore.Remote/RemoteDataStorePutRequest.cs @@ -11,6 +11,27 @@ namespace Tango.DataStore.Remote public String Collection { get; set; } public DataType DataType { get; set; } public String Key { get; set; } - public Object Value { get; set; } + + private Object _value; + public Object Value + { + get + { + return DataType == DataType.Proto ? ProtoObject : _value; + } + set + { + if (value is DataStoreProtoObject protoValue) + { + ProtoObject = protoValue; + } + else + { + _value = value; + } + } + } + + public DataStoreProtoObject ProtoObject { get; set; } } } |
