aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.PMR/DataStore/GetDataStoreItemResponse.cs
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2020-10-23 03:13:09 +0300
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2020-10-23 03:13:09 +0300
commit8d2b13aaa70bc6a8f521df4eab165caf078c33fa (patch)
tree325567b00d55fa751da7492be067e7878b132e28 /Software/Visual_Studio/Tango.PMR/DataStore/GetDataStoreItemResponse.cs
parenta79900d579ae9f624b35aa933784e4e0f0c65d03 (diff)
downloadTango-8d2b13aaa70bc6a8f521df4eab165caf078c33fa.tar.gz
Tango-8d2b13aaa70bc6a8f521df4eab165caf078c33fa.zip
DataStore Improvements.
Diffstat (limited to 'Software/Visual_Studio/Tango.PMR/DataStore/GetDataStoreItemResponse.cs')
-rw-r--r--Software/Visual_Studio/Tango.PMR/DataStore/GetDataStoreItemResponse.cs42
1 files changed, 35 insertions, 7 deletions
diff --git a/Software/Visual_Studio/Tango.PMR/DataStore/GetDataStoreItemResponse.cs b/Software/Visual_Studio/Tango.PMR/DataStore/GetDataStoreItemResponse.cs
index 892f197d8..a42d22d23 100644
--- a/Software/Visual_Studio/Tango.PMR/DataStore/GetDataStoreItemResponse.cs
+++ b/Software/Visual_Studio/Tango.PMR/DataStore/GetDataStoreItemResponse.cs
@@ -23,14 +23,14 @@ namespace Tango.PMR.DataStore {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
"Ch5HZXREYXRhU3RvcmVJdGVtUmVzcG9uc2UucHJvdG8SE1RhbmdvLlBNUi5E",
- "YXRhU3RvcmUaE0RhdGFTdG9yZUl0ZW0ucHJvdG8iTAoYR2V0RGF0YVN0b3Jl",
- "SXRlbVJlc3BvbnNlEjAKBEl0ZW0YASABKAsyIi5UYW5nby5QTVIuRGF0YVN0",
- "b3JlLkRhdGFTdG9yZUl0ZW1CHwodY29tLnR3aW5lLnRhbmdvLnBtci5kYXRh",
- "c3RvcmViBnByb3RvMw=="));
+ "YXRhU3RvcmUaE0RhdGFTdG9yZUl0ZW0ucHJvdG8iWQoYR2V0RGF0YVN0b3Jl",
+ "SXRlbVJlc3BvbnNlEgsKA0tleRgBIAEoCRIwCgRJdGVtGAIgASgLMiIuVGFu",
+ "Z28uUE1SLkRhdGFTdG9yZS5EYXRhU3RvcmVJdGVtQh8KHWNvbS50d2luZS50",
+ "YW5nby5wbXIuZGF0YXN0b3JlYgZwcm90bzM="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { global::Tango.PMR.DataStore.DataStoreItemReflection.Descriptor, },
new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
- new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.DataStore.GetDataStoreItemResponse), global::Tango.PMR.DataStore.GetDataStoreItemResponse.Parser, new[]{ "Item" }, null, null, null)
+ new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.DataStore.GetDataStoreItemResponse), global::Tango.PMR.DataStore.GetDataStoreItemResponse.Parser, new[]{ "Key", "Item" }, null, null, null)
}));
}
#endregion
@@ -61,6 +61,7 @@ namespace Tango.PMR.DataStore {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public GetDataStoreItemResponse(GetDataStoreItemResponse other) : this() {
+ key_ = other.key_;
Item = other.item_ != null ? other.Item.Clone() : null;
}
@@ -69,8 +70,19 @@ namespace Tango.PMR.DataStore {
return new GetDataStoreItemResponse(this);
}
+ /// <summary>Field number for the "Key" field.</summary>
+ public const int KeyFieldNumber = 1;
+ private string key_ = "";
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public string Key {
+ get { return key_; }
+ set {
+ key_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
/// <summary>Field number for the "Item" field.</summary>
- public const int ItemFieldNumber = 1;
+ public const int ItemFieldNumber = 2;
private global::Tango.PMR.DataStore.DataStoreItem item_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public global::Tango.PMR.DataStore.DataStoreItem Item {
@@ -93,6 +105,7 @@ namespace Tango.PMR.DataStore {
if (ReferenceEquals(other, this)) {
return true;
}
+ if (Key != other.Key) return false;
if (!object.Equals(Item, other.Item)) return false;
return true;
}
@@ -100,6 +113,7 @@ namespace Tango.PMR.DataStore {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override int GetHashCode() {
int hash = 1;
+ if (Key.Length != 0) hash ^= Key.GetHashCode();
if (item_ != null) hash ^= Item.GetHashCode();
return hash;
}
@@ -111,8 +125,12 @@ namespace Tango.PMR.DataStore {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void WriteTo(pb::CodedOutputStream output) {
- if (item_ != null) {
+ if (Key.Length != 0) {
output.WriteRawTag(10);
+ output.WriteString(Key);
+ }
+ if (item_ != null) {
+ output.WriteRawTag(18);
output.WriteMessage(Item);
}
}
@@ -120,6 +138,9 @@ namespace Tango.PMR.DataStore {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int CalculateSize() {
int size = 0;
+ if (Key.Length != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(Key);
+ }
if (item_ != null) {
size += 1 + pb::CodedOutputStream.ComputeMessageSize(Item);
}
@@ -131,6 +152,9 @@ namespace Tango.PMR.DataStore {
if (other == null) {
return;
}
+ if (other.Key.Length != 0) {
+ Key = other.Key;
+ }
if (other.item_ != null) {
if (item_ == null) {
item_ = new global::Tango.PMR.DataStore.DataStoreItem();
@@ -148,6 +172,10 @@ namespace Tango.PMR.DataStore {
input.SkipLastField();
break;
case 10: {
+ Key = input.ReadString();
+ break;
+ }
+ case 18: {
if (item_ == null) {
item_ = new global::Tango.PMR.DataStore.DataStoreItem();
}