OLD | NEW |
(Empty) | |
| 1 // Generated by the protocol buffer compiler. DO NOT EDIT! |
| 2 // source: google/protobuf/unittest_proto3.proto |
| 3 #pragma warning disable 1591, 0612, 3021 |
| 4 #region Designer generated code |
| 5 |
| 6 using pb = global::Google.Protobuf; |
| 7 using pbc = global::Google.Protobuf.Collections; |
| 8 using pbr = global::Google.Protobuf.Reflection; |
| 9 using scg = global::System.Collections.Generic; |
| 10 namespace Google.Protobuf.TestProtos { |
| 11 |
| 12 /// <summary>Holder for reflection information generated from google/protobuf/
unittest_proto3.proto</summary> |
| 13 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 14 public static partial class UnittestProto3Reflection { |
| 15 |
| 16 #region Descriptor |
| 17 /// <summary>File descriptor for google/protobuf/unittest_proto3.proto</summ
ary> |
| 18 public static pbr::FileDescriptor Descriptor { |
| 19 get { return descriptor; } |
| 20 } |
| 21 private static pbr::FileDescriptor descriptor; |
| 22 |
| 23 static UnittestProto3Reflection() { |
| 24 byte[] descriptorData = global::System.Convert.FromBase64String( |
| 25 string.Concat( |
| 26 "CiVnb29nbGUvcHJvdG9idWYvdW5pdHRlc3RfcHJvdG8zLnByb3RvEhFwcm90", |
| 27 "b2J1Zl91bml0dGVzdBosZ29vZ2xlL3Byb3RvYnVmL3VuaXR0ZXN0X2ltcG9y", |
| 28 "dF9wcm90bzMucHJvdG8i8A8KDFRlc3RBbGxUeXBlcxIUCgxzaW5nbGVfaW50", |
| 29 "MzIYASABKAUSFAoMc2luZ2xlX2ludDY0GAIgASgDEhUKDXNpbmdsZV91aW50", |
| 30 "MzIYAyABKA0SFQoNc2luZ2xlX3VpbnQ2NBgEIAEoBBIVCg1zaW5nbGVfc2lu", |
| 31 "dDMyGAUgASgREhUKDXNpbmdsZV9zaW50NjQYBiABKBISFgoOc2luZ2xlX2Zp", |
| 32 "eGVkMzIYByABKAcSFgoOc2luZ2xlX2ZpeGVkNjQYCCABKAYSFwoPc2luZ2xl", |
| 33 "X3NmaXhlZDMyGAkgASgPEhcKD3NpbmdsZV9zZml4ZWQ2NBgKIAEoEBIUCgxz", |
| 34 "aW5nbGVfZmxvYXQYCyABKAISFQoNc2luZ2xlX2RvdWJsZRgMIAEoARITCgtz", |
| 35 "aW5nbGVfYm9vbBgNIAEoCBIVCg1zaW5nbGVfc3RyaW5nGA4gASgJEhQKDHNp", |
| 36 "bmdsZV9ieXRlcxgPIAEoDBJMChVzaW5nbGVfbmVzdGVkX21lc3NhZ2UYEiAB", |
| 37 "KAsyLS5wcm90b2J1Zl91bml0dGVzdC5UZXN0QWxsVHlwZXMuTmVzdGVkTWVz", |
| 38 "c2FnZRJBChZzaW5nbGVfZm9yZWlnbl9tZXNzYWdlGBMgASgLMiEucHJvdG9i", |
| 39 "dWZfdW5pdHRlc3QuRm9yZWlnbk1lc3NhZ2USRgoVc2luZ2xlX2ltcG9ydF9t", |
| 40 "ZXNzYWdlGBQgASgLMicucHJvdG9idWZfdW5pdHRlc3RfaW1wb3J0LkltcG9y", |
| 41 "dE1lc3NhZ2USRgoSc2luZ2xlX25lc3RlZF9lbnVtGBUgASgOMioucHJvdG9i", |
| 42 "dWZfdW5pdHRlc3QuVGVzdEFsbFR5cGVzLk5lc3RlZEVudW0SOwoTc2luZ2xl", |
| 43 "X2ZvcmVpZ25fZW51bRgWIAEoDjIeLnByb3RvYnVmX3VuaXR0ZXN0LkZvcmVp", |
| 44 "Z25FbnVtEkAKEnNpbmdsZV9pbXBvcnRfZW51bRgXIAEoDjIkLnByb3RvYnVm", |
| 45 "X3VuaXR0ZXN0X2ltcG9ydC5JbXBvcnRFbnVtElMKHHNpbmdsZV9wdWJsaWNf", |
| 46 "aW1wb3J0X21lc3NhZ2UYGiABKAsyLS5wcm90b2J1Zl91bml0dGVzdF9pbXBv", |
| 47 "cnQuUHVibGljSW1wb3J0TWVzc2FnZRIWCg5yZXBlYXRlZF9pbnQzMhgfIAMo", |
| 48 "BRIWCg5yZXBlYXRlZF9pbnQ2NBggIAMoAxIXCg9yZXBlYXRlZF91aW50MzIY", |
| 49 "ISADKA0SFwoPcmVwZWF0ZWRfdWludDY0GCIgAygEEhcKD3JlcGVhdGVkX3Np", |
| 50 "bnQzMhgjIAMoERIXCg9yZXBlYXRlZF9zaW50NjQYJCADKBISGAoQcmVwZWF0", |
| 51 "ZWRfZml4ZWQzMhglIAMoBxIYChByZXBlYXRlZF9maXhlZDY0GCYgAygGEhkK", |
| 52 "EXJlcGVhdGVkX3NmaXhlZDMyGCcgAygPEhkKEXJlcGVhdGVkX3NmaXhlZDY0", |
| 53 "GCggAygQEhYKDnJlcGVhdGVkX2Zsb2F0GCkgAygCEhcKD3JlcGVhdGVkX2Rv", |
| 54 "dWJsZRgqIAMoARIVCg1yZXBlYXRlZF9ib29sGCsgAygIEhcKD3JlcGVhdGVk", |
| 55 "X3N0cmluZxgsIAMoCRIWCg5yZXBlYXRlZF9ieXRlcxgtIAMoDBJOChdyZXBl", |
| 56 "YXRlZF9uZXN0ZWRfbWVzc2FnZRgwIAMoCzItLnByb3RvYnVmX3VuaXR0ZXN0", |
| 57 "LlRlc3RBbGxUeXBlcy5OZXN0ZWRNZXNzYWdlEkMKGHJlcGVhdGVkX2ZvcmVp", |
| 58 "Z25fbWVzc2FnZRgxIAMoCzIhLnByb3RvYnVmX3VuaXR0ZXN0LkZvcmVpZ25N", |
| 59 "ZXNzYWdlEkgKF3JlcGVhdGVkX2ltcG9ydF9tZXNzYWdlGDIgAygLMicucHJv", |
| 60 "dG9idWZfdW5pdHRlc3RfaW1wb3J0LkltcG9ydE1lc3NhZ2USSAoUcmVwZWF0", |
| 61 "ZWRfbmVzdGVkX2VudW0YMyADKA4yKi5wcm90b2J1Zl91bml0dGVzdC5UZXN0", |
| 62 "QWxsVHlwZXMuTmVzdGVkRW51bRI9ChVyZXBlYXRlZF9mb3JlaWduX2VudW0Y", |
| 63 "NCADKA4yHi5wcm90b2J1Zl91bml0dGVzdC5Gb3JlaWduRW51bRJCChRyZXBl", |
| 64 "YXRlZF9pbXBvcnRfZW51bRg1IAMoDjIkLnByb3RvYnVmX3VuaXR0ZXN0X2lt", |
| 65 "cG9ydC5JbXBvcnRFbnVtElUKHnJlcGVhdGVkX3B1YmxpY19pbXBvcnRfbWVz", |
| 66 "c2FnZRg2IAMoCzItLnByb3RvYnVmX3VuaXR0ZXN0X2ltcG9ydC5QdWJsaWNJ", |
| 67 "bXBvcnRNZXNzYWdlEhYKDG9uZW9mX3VpbnQzMhhvIAEoDUgAEk0KFG9uZW9m", |
| 68 "X25lc3RlZF9tZXNzYWdlGHAgASgLMi0ucHJvdG9idWZfdW5pdHRlc3QuVGVz", |
| 69 "dEFsbFR5cGVzLk5lc3RlZE1lc3NhZ2VIABIWCgxvbmVvZl9zdHJpbmcYcSAB", |
| 70 "KAlIABIVCgtvbmVvZl9ieXRlcxhyIAEoDEgAGhsKDU5lc3RlZE1lc3NhZ2US", |
| 71 "CgoCYmIYASABKAUiVgoKTmVzdGVkRW51bRIbChdORVNURURfRU5VTV9VTlNQ", |
| 72 "RUNJRklFRBAAEgcKA0ZPTxABEgcKA0JBUhACEgcKA0JBWhADEhAKA05FRxD/", |
| 73 "//////////8BQg0KC29uZW9mX2ZpZWxkIrsBChJOZXN0ZWRUZXN0QWxsVHlw", |
| 74 "ZXMSNAoFY2hpbGQYASABKAsyJS5wcm90b2J1Zl91bml0dGVzdC5OZXN0ZWRU", |
| 75 "ZXN0QWxsVHlwZXMSMAoHcGF5bG9hZBgCIAEoCzIfLnByb3RvYnVmX3VuaXR0", |
| 76 "ZXN0LlRlc3RBbGxUeXBlcxI9Cg5yZXBlYXRlZF9jaGlsZBgDIAMoCzIlLnBy", |
| 77 "b3RvYnVmX3VuaXR0ZXN0Lk5lc3RlZFRlc3RBbGxUeXBlcyI0ChRUZXN0RGVw", |
| 78 "cmVjYXRlZEZpZWxkcxIcChBkZXByZWNhdGVkX2ludDMyGAEgASgFQgIYASIb", |
| 79 "Cg5Gb3JlaWduTWVzc2FnZRIJCgFjGAEgASgFIjAKElRlc3RSZXNlcnZlZEZp", |
| 80 "ZWxkc0oECAIQA0oECA8QEEoECAkQDFIDYmFyUgNiYXoiWgoRVGVzdEZvcmVp", |
| 81 "Z25OZXN0ZWQSRQoOZm9yZWlnbl9uZXN0ZWQYASABKAsyLS5wcm90b2J1Zl91", |
| 82 "bml0dGVzdC5UZXN0QWxsVHlwZXMuTmVzdGVkTWVzc2FnZSI0ChhUZXN0UmVh", |
| 83 "bGx5TGFyZ2VUYWdOdW1iZXISCQoBYRgBIAEoBRINCgJiYhj///9/IAEoBSJV", |
| 84 "ChRUZXN0UmVjdXJzaXZlTWVzc2FnZRIyCgFhGAEgASgLMicucHJvdG9idWZf", |
| 85 "dW5pdHRlc3QuVGVzdFJlY3Vyc2l2ZU1lc3NhZ2USCQoBaRgCIAEoBSJLChRU", |
| 86 "ZXN0TXV0dWFsUmVjdXJzaW9uQRIzCgJiYhgBIAEoCzInLnByb3RvYnVmX3Vu", |
| 87 "aXR0ZXN0LlRlc3RNdXR1YWxSZWN1cnNpb25CImIKFFRlc3RNdXR1YWxSZWN1", |
| 88 "cnNpb25CEjIKAWEYASABKAsyJy5wcm90b2J1Zl91bml0dGVzdC5UZXN0TXV0", |
| 89 "dWFsUmVjdXJzaW9uQRIWCg5vcHRpb25hbF9pbnQzMhgCIAEoBSLrAgoXVGVz", |
| 90 "dENhbWVsQ2FzZUZpZWxkTmFtZXMSFgoOUHJpbWl0aXZlRmllbGQYASABKAUS", |
| 91 "EwoLU3RyaW5nRmllbGQYAiABKAkSMQoJRW51bUZpZWxkGAMgASgOMh4ucHJv", |
| 92 "dG9idWZfdW5pdHRlc3QuRm9yZWlnbkVudW0SNwoMTWVzc2FnZUZpZWxkGAQg", |
| 93 "ASgLMiEucHJvdG9idWZfdW5pdHRlc3QuRm9yZWlnbk1lc3NhZ2USHgoWUmVw", |
| 94 "ZWF0ZWRQcmltaXRpdmVGaWVsZBgHIAMoBRIbChNSZXBlYXRlZFN0cmluZ0Zp", |
| 95 "ZWxkGAggAygJEjkKEVJlcGVhdGVkRW51bUZpZWxkGAkgAygOMh4ucHJvdG9i", |
| 96 "dWZfdW5pdHRlc3QuRm9yZWlnbkVudW0SPwoUUmVwZWF0ZWRNZXNzYWdlRmll", |
| 97 "bGQYCiADKAsyIS5wcm90b2J1Zl91bml0dGVzdC5Gb3JlaWduTWVzc2FnZSLH", |
| 98 "AQoSVGVzdEZpZWxkT3JkZXJpbmdzEhEKCW15X3N0cmluZxgLIAEoCRIOCgZt", |
| 99 "eV9pbnQYASABKAMSEAoIbXlfZmxvYXQYZSABKAISUwoVc2luZ2xlX25lc3Rl", |
| 100 "ZF9tZXNzYWdlGMgBIAEoCzIzLnByb3RvYnVmX3VuaXR0ZXN0LlRlc3RGaWVs", |
| 101 "ZE9yZGVyaW5ncy5OZXN0ZWRNZXNzYWdlGicKDU5lc3RlZE1lc3NhZ2USCgoC", |
| 102 "b28YAiABKAMSCgoCYmIYASABKAUiSwoRU3BhcnNlRW51bU1lc3NhZ2USNgoL", |
| 103 "c3BhcnNlX2VudW0YASABKA4yIS5wcm90b2J1Zl91bml0dGVzdC5UZXN0U3Bh", |
| 104 "cnNlRW51bSIZCglPbmVTdHJpbmcSDAoEZGF0YRgBIAEoCSIaCgpNb3JlU3Ry", |
| 105 "aW5nEgwKBGRhdGEYASADKAkiGAoIT25lQnl0ZXMSDAoEZGF0YRgBIAEoDCIZ", |
| 106 "CglNb3JlQnl0ZXMSDAoEZGF0YRgBIAEoDCIcCgxJbnQzMk1lc3NhZ2USDAoE", |
| 107 "ZGF0YRgBIAEoBSIdCg1VaW50MzJNZXNzYWdlEgwKBGRhdGEYASABKA0iHAoM", |
| 108 "SW50NjRNZXNzYWdlEgwKBGRhdGEYASABKAMiHQoNVWludDY0TWVzc2FnZRIM", |
| 109 "CgRkYXRhGAEgASgEIhsKC0Jvb2xNZXNzYWdlEgwKBGRhdGEYASABKAgicwoJ", |
| 110 "VGVzdE9uZW9mEhEKB2Zvb19pbnQYASABKAVIABIUCgpmb29fc3RyaW5nGAIg", |
| 111 "ASgJSAASNgoLZm9vX21lc3NhZ2UYAyABKAsyHy5wcm90b2J1Zl91bml0dGVz", |
| 112 "dC5UZXN0QWxsVHlwZXNIAEIFCgNmb28iqgMKD1Rlc3RQYWNrZWRUeXBlcxIY", |
| 113 "CgxwYWNrZWRfaW50MzIYWiADKAVCAhABEhgKDHBhY2tlZF9pbnQ2NBhbIAMo", |
| 114 "A0ICEAESGQoNcGFja2VkX3VpbnQzMhhcIAMoDUICEAESGQoNcGFja2VkX3Vp", |
| 115 "bnQ2NBhdIAMoBEICEAESGQoNcGFja2VkX3NpbnQzMhheIAMoEUICEAESGQoN", |
| 116 "cGFja2VkX3NpbnQ2NBhfIAMoEkICEAESGgoOcGFja2VkX2ZpeGVkMzIYYCAD", |
| 117 "KAdCAhABEhoKDnBhY2tlZF9maXhlZDY0GGEgAygGQgIQARIbCg9wYWNrZWRf", |
| 118 "c2ZpeGVkMzIYYiADKA9CAhABEhsKD3BhY2tlZF9zZml4ZWQ2NBhjIAMoEEIC", |
| 119 "EAESGAoMcGFja2VkX2Zsb2F0GGQgAygCQgIQARIZCg1wYWNrZWRfZG91Ymxl", |
| 120 "GGUgAygBQgIQARIXCgtwYWNrZWRfYm9vbBhmIAMoCEICEAESNwoLcGFja2Vk", |
| 121 "X2VudW0YZyADKA4yHi5wcm90b2J1Zl91bml0dGVzdC5Gb3JlaWduRW51bUIC", |
| 122 "EAEiyAMKEVRlc3RVbnBhY2tlZFR5cGVzEhoKDnVucGFja2VkX2ludDMyGFog", |
| 123 "AygFQgIQABIaCg51bnBhY2tlZF9pbnQ2NBhbIAMoA0ICEAASGwoPdW5wYWNr", |
| 124 "ZWRfdWludDMyGFwgAygNQgIQABIbCg91bnBhY2tlZF91aW50NjQYXSADKARC", |
| 125 "AhAAEhsKD3VucGFja2VkX3NpbnQzMhheIAMoEUICEAASGwoPdW5wYWNrZWRf", |
| 126 "c2ludDY0GF8gAygSQgIQABIcChB1bnBhY2tlZF9maXhlZDMyGGAgAygHQgIQ", |
| 127 "ABIcChB1bnBhY2tlZF9maXhlZDY0GGEgAygGQgIQABIdChF1bnBhY2tlZF9z", |
| 128 "Zml4ZWQzMhhiIAMoD0ICEAASHQoRdW5wYWNrZWRfc2ZpeGVkNjQYYyADKBBC", |
| 129 "AhAAEhoKDnVucGFja2VkX2Zsb2F0GGQgAygCQgIQABIbCg91bnBhY2tlZF9k", |
| 130 "b3VibGUYZSADKAFCAhAAEhkKDXVucGFja2VkX2Jvb2wYZiADKAhCAhAAEjkK", |
| 131 "DXVucGFja2VkX2VudW0YZyADKA4yHi5wcm90b2J1Zl91bml0dGVzdC5Gb3Jl", |
| 132 "aWduRW51bUICEAAiwAEKI1Rlc3RSZXBlYXRlZFNjYWxhckRpZmZlcmVudFRh", |
| 133 "Z1NpemVzEhgKEHJlcGVhdGVkX2ZpeGVkMzIYDCADKAcSFgoOcmVwZWF0ZWRf", |
| 134 "aW50MzIYDSADKAUSGQoQcmVwZWF0ZWRfZml4ZWQ2NBj+DyADKAYSFwoOcmVw", |
| 135 "ZWF0ZWRfaW50NjQY/w8gAygDEhgKDnJlcGVhdGVkX2Zsb2F0GP7/DyADKAIS", |
| 136 "GQoPcmVwZWF0ZWRfdWludDY0GP//DyADKAQiKAobVGVzdENvbW1lbnRJbmpl", |
| 137 "Y3Rpb25NZXNzYWdlEgkKAWEYASABKAkiDAoKRm9vUmVxdWVzdCINCgtGb29S", |
| 138 "ZXNwb25zZSISChBGb29DbGllbnRNZXNzYWdlIhIKEEZvb1NlcnZlck1lc3Nh", |
| 139 "Z2UiDAoKQmFyUmVxdWVzdCINCgtCYXJSZXNwb25zZSpZCgtGb3JlaWduRW51", |
| 140 "bRIXChNGT1JFSUdOX1VOU1BFQ0lGSUVEEAASDwoLRk9SRUlHTl9GT08QBBIP", |
| 141 "CgtGT1JFSUdOX0JBUhAFEg8KC0ZPUkVJR05fQkFaEAYqdQoUVGVzdEVudW1X", |
| 142 "aXRoRHVwVmFsdWUSKAokVEVTVF9FTlVNX1dJVEhfRFVQX1ZBTFVFX1VOU1BF", |
| 143 "Q0lGSUVEEAASCAoERk9PMRABEggKBEJBUjEQAhIHCgNCQVoQAxIICgRGT08y", |
| 144 "EAESCAoEQkFSMhACGgIQASqdAQoOVGVzdFNwYXJzZUVudW0SIAocVEVTVF9T", |
| 145 "UEFSU0VfRU5VTV9VTlNQRUNJRklFRBAAEgwKCFNQQVJTRV9BEHsSDgoIU1BB", |
| 146 "UlNFX0IQpucDEg8KCFNQQVJTRV9DELKxgAYSFQoIU1BBUlNFX0QQ8f//////", |
| 147 "////ARIVCghTUEFSU0VfRRC03vz///////8BEgwKCFNQQVJTRV9HEAIymQEK", |
| 148 "C1Rlc3RTZXJ2aWNlEkQKA0ZvbxIdLnByb3RvYnVmX3VuaXR0ZXN0LkZvb1Jl", |
| 149 "cXVlc3QaHi5wcm90b2J1Zl91bml0dGVzdC5Gb29SZXNwb25zZRJECgNCYXIS", |
| 150 "HS5wcm90b2J1Zl91bml0dGVzdC5CYXJSZXF1ZXN0Gh4ucHJvdG9idWZfdW5p", |
| 151 "dHRlc3QuQmFyUmVzcG9uc2VCOkINVW5pdHRlc3RQcm90b0gBgAEBiAEBkAEB", |
| 152 "+AEBqgIaR29vZ2xlLlByb3RvYnVmLlRlc3RQcm90b3NiBnByb3RvMw==")); |
| 153 descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, |
| 154 new pbr::FileDescriptor[] { global::Google.Protobuf.TestProtos.Unittes
tImportProto3Reflection.Descriptor, }, |
| 155 new pbr::GeneratedCodeInfo(new[] {typeof(global::Google.Protobuf.TestP
rotos.ForeignEnum), typeof(global::Google.Protobuf.TestProtos.TestEnumWithDupVal
ue), typeof(global::Google.Protobuf.TestProtos.TestSparseEnum), }, new pbr::Gene
ratedCodeInfo[] { |
| 156 new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos
.TestAllTypes), global::Google.Protobuf.TestProtos.TestAllTypes.Parser, new[]{ "
SingleInt32", "SingleInt64", "SingleUint32", "SingleUint64", "SingleSint32", "Si
ngleSint64", "SingleFixed32", "SingleFixed64", "SingleSfixed32", "SingleSfixed64
", "SingleFloat", "SingleDouble", "SingleBool", "SingleString", "SingleBytes", "
SingleNestedMessage", "SingleForeignMessage", "SingleImportMessage", "SingleNest
edEnum", "SingleForeignEnum", "SingleImportEnum", "SinglePublicImportMessage", "
RepeatedInt32", "RepeatedInt64", "RepeatedUint32", "RepeatedUint64", "RepeatedSi
nt32", "RepeatedSint64", "RepeatedFixed32", "RepeatedFixed64", "RepeatedSfixed32
", "RepeatedSfixed64", "RepeatedFloat", "RepeatedDouble", "RepeatedBool", "Repea
tedString", "RepeatedBytes", "RepeatedNestedMessage", "RepeatedForeignMessage",
"RepeatedImportMessage", "RepeatedNestedEnum", "RepeatedForeignEnum", "RepeatedI
mportEnum", "RepeatedPublicImportMessage", "OneofUint32", "OneofNestedMessage",
"OneofString", "OneofBytes" }, new[]{ "OneofField" }, new[]{ typeof(global::Goog
le.Protobuf.TestProtos.TestAllTypes.Types.NestedEnum) }, new pbr::GeneratedCodeI
nfo[] { new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.Tes
tAllTypes.Types.NestedMessage), global::Google.Protobuf.TestProtos.TestAllTypes.
Types.NestedMessage.Parser, new[]{ "Bb" }, null, null, null)}), |
| 157 new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos
.NestedTestAllTypes), global::Google.Protobuf.TestProtos.NestedTestAllTypes.Pars
er, new[]{ "Child", "Payload", "RepeatedChild" }, null, null, null), |
| 158 new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos
.TestDeprecatedFields), global::Google.Protobuf.TestProtos.TestDeprecatedFields.
Parser, new[]{ "DeprecatedInt32" }, null, null, null), |
| 159 new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos
.ForeignMessage), global::Google.Protobuf.TestProtos.ForeignMessage.Parser, new[
]{ "C" }, null, null, null), |
| 160 new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos
.TestReservedFields), global::Google.Protobuf.TestProtos.TestReservedFields.Pars
er, null, null, null, null), |
| 161 new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos
.TestForeignNested), global::Google.Protobuf.TestProtos.TestForeignNested.Parser
, new[]{ "ForeignNested" }, null, null, null), |
| 162 new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos
.TestReallyLargeTagNumber), global::Google.Protobuf.TestProtos.TestReallyLargeTa
gNumber.Parser, new[]{ "A", "Bb" }, null, null, null), |
| 163 new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos
.TestRecursiveMessage), global::Google.Protobuf.TestProtos.TestRecursiveMessage.
Parser, new[]{ "A", "I" }, null, null, null), |
| 164 new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos
.TestMutualRecursionA), global::Google.Protobuf.TestProtos.TestMutualRecursionA.
Parser, new[]{ "Bb" }, null, null, null), |
| 165 new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos
.TestMutualRecursionB), global::Google.Protobuf.TestProtos.TestMutualRecursionB.
Parser, new[]{ "A", "OptionalInt32" }, null, null, null), |
| 166 new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos
.TestCamelCaseFieldNames), global::Google.Protobuf.TestProtos.TestCamelCaseField
Names.Parser, new[]{ "PrimitiveField", "StringField", "EnumField", "MessageField
", "RepeatedPrimitiveField", "RepeatedStringField", "RepeatedEnumField", "Repeat
edMessageField" }, null, null, null), |
| 167 new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos
.TestFieldOrderings), global::Google.Protobuf.TestProtos.TestFieldOrderings.Pars
er, new[]{ "MyString", "MyInt", "MyFloat", "SingleNestedMessage" }, null, null,
new pbr::GeneratedCodeInfo[] { new pbr::GeneratedCodeInfo(typeof(global::Google.
Protobuf.TestProtos.TestFieldOrderings.Types.NestedMessage), global::Google.Prot
obuf.TestProtos.TestFieldOrderings.Types.NestedMessage.Parser, new[]{ "Oo", "Bb"
}, null, null, null)}), |
| 168 new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos
.SparseEnumMessage), global::Google.Protobuf.TestProtos.SparseEnumMessage.Parser
, new[]{ "SparseEnum" }, null, null, null), |
| 169 new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos
.OneString), global::Google.Protobuf.TestProtos.OneString.Parser, new[]{ "Data"
}, null, null, null), |
| 170 new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos
.MoreString), global::Google.Protobuf.TestProtos.MoreString.Parser, new[]{ "Data
" }, null, null, null), |
| 171 new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos
.OneBytes), global::Google.Protobuf.TestProtos.OneBytes.Parser, new[]{ "Data" },
null, null, null), |
| 172 new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos
.MoreBytes), global::Google.Protobuf.TestProtos.MoreBytes.Parser, new[]{ "Data"
}, null, null, null), |
| 173 new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos
.Int32Message), global::Google.Protobuf.TestProtos.Int32Message.Parser, new[]{ "
Data" }, null, null, null), |
| 174 new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos
.Uint32Message), global::Google.Protobuf.TestProtos.Uint32Message.Parser, new[]{
"Data" }, null, null, null), |
| 175 new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos
.Int64Message), global::Google.Protobuf.TestProtos.Int64Message.Parser, new[]{ "
Data" }, null, null, null), |
| 176 new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos
.Uint64Message), global::Google.Protobuf.TestProtos.Uint64Message.Parser, new[]{
"Data" }, null, null, null), |
| 177 new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos
.BoolMessage), global::Google.Protobuf.TestProtos.BoolMessage.Parser, new[]{ "Da
ta" }, null, null, null), |
| 178 new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos
.TestOneof), global::Google.Protobuf.TestProtos.TestOneof.Parser, new[]{ "FooInt
", "FooString", "FooMessage" }, new[]{ "Foo" }, null, null), |
| 179 new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos
.TestPackedTypes), global::Google.Protobuf.TestProtos.TestPackedTypes.Parser, ne
w[]{ "PackedInt32", "PackedInt64", "PackedUint32", "PackedUint64", "PackedSint32
", "PackedSint64", "PackedFixed32", "PackedFixed64", "PackedSfixed32", "PackedSf
ixed64", "PackedFloat", "PackedDouble", "PackedBool", "PackedEnum" }, null, null
, null), |
| 180 new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos
.TestUnpackedTypes), global::Google.Protobuf.TestProtos.TestUnpackedTypes.Parser
, new[]{ "UnpackedInt32", "UnpackedInt64", "UnpackedUint32", "UnpackedUint64", "
UnpackedSint32", "UnpackedSint64", "UnpackedFixed32", "UnpackedFixed64", "Unpack
edSfixed32", "UnpackedSfixed64", "UnpackedFloat", "UnpackedDouble", "UnpackedBoo
l", "UnpackedEnum" }, null, null, null), |
| 181 new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos
.TestRepeatedScalarDifferentTagSizes), global::Google.Protobuf.TestProtos.TestRe
peatedScalarDifferentTagSizes.Parser, new[]{ "RepeatedFixed32", "RepeatedInt32",
"RepeatedFixed64", "RepeatedInt64", "RepeatedFloat", "RepeatedUint64" }, null,
null, null), |
| 182 new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos
.TestCommentInjectionMessage), global::Google.Protobuf.TestProtos.TestCommentInj
ectionMessage.Parser, new[]{ "A" }, null, null, null), |
| 183 new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos
.FooRequest), global::Google.Protobuf.TestProtos.FooRequest.Parser, null, null,
null, null), |
| 184 new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos
.FooResponse), global::Google.Protobuf.TestProtos.FooResponse.Parser, null, null
, null, null), |
| 185 new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos
.FooClientMessage), global::Google.Protobuf.TestProtos.FooClientMessage.Parser,
null, null, null, null), |
| 186 new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos
.FooServerMessage), global::Google.Protobuf.TestProtos.FooServerMessage.Parser,
null, null, null, null), |
| 187 new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos
.BarRequest), global::Google.Protobuf.TestProtos.BarRequest.Parser, null, null,
null, null), |
| 188 new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos
.BarResponse), global::Google.Protobuf.TestProtos.BarResponse.Parser, null, null
, null, null) |
| 189 })); |
| 190 } |
| 191 #endregion |
| 192 |
| 193 } |
| 194 #region Enums |
| 195 public enum ForeignEnum { |
| 196 FOREIGN_UNSPECIFIED = 0, |
| 197 FOREIGN_FOO = 4, |
| 198 FOREIGN_BAR = 5, |
| 199 FOREIGN_BAZ = 6, |
| 200 } |
| 201 |
| 202 /// <summary> |
| 203 /// Test an enum that has multiple values with the same number. |
| 204 /// </summary> |
| 205 public enum TestEnumWithDupValue { |
| 206 TEST_ENUM_WITH_DUP_VALUE_UNSPECIFIED = 0, |
| 207 FOO1 = 1, |
| 208 BAR1 = 2, |
| 209 BAZ = 3, |
| 210 FOO2 = 1, |
| 211 BAR2 = 2, |
| 212 } |
| 213 |
| 214 /// <summary> |
| 215 /// Test an enum with large, unordered values. |
| 216 /// </summary> |
| 217 public enum TestSparseEnum { |
| 218 TEST_SPARSE_ENUM_UNSPECIFIED = 0, |
| 219 SPARSE_A = 123, |
| 220 SPARSE_B = 62374, |
| 221 SPARSE_C = 12589234, |
| 222 SPARSE_D = -15, |
| 223 SPARSE_E = -53452, |
| 224 /// <summary> |
| 225 /// In proto3, value 0 must be the first one specified |
| 226 /// SPARSE_F = 0; |
| 227 /// </summary> |
| 228 SPARSE_G = 2, |
| 229 } |
| 230 |
| 231 #endregion |
| 232 |
| 233 #region Messages |
| 234 /// <summary> |
| 235 /// This proto includes every type of field in both singular and repeated |
| 236 /// forms. |
| 237 /// </summary> |
| 238 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 239 public sealed partial class TestAllTypes : pb::IMessage<TestAllTypes> { |
| 240 private static readonly pb::MessageParser<TestAllTypes> _parser = new pb::Me
ssageParser<TestAllTypes>(() => new TestAllTypes()); |
| 241 public static pb::MessageParser<TestAllTypes> Parser { get { return _parser;
} } |
| 242 |
| 243 public static pbr::MessageDescriptor Descriptor { |
| 244 get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.D
escriptor.MessageTypes[0]; } |
| 245 } |
| 246 |
| 247 pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 248 get { return Descriptor; } |
| 249 } |
| 250 |
| 251 public TestAllTypes() { |
| 252 OnConstruction(); |
| 253 } |
| 254 |
| 255 partial void OnConstruction(); |
| 256 |
| 257 public TestAllTypes(TestAllTypes other) : this() { |
| 258 singleInt32_ = other.singleInt32_; |
| 259 singleInt64_ = other.singleInt64_; |
| 260 singleUint32_ = other.singleUint32_; |
| 261 singleUint64_ = other.singleUint64_; |
| 262 singleSint32_ = other.singleSint32_; |
| 263 singleSint64_ = other.singleSint64_; |
| 264 singleFixed32_ = other.singleFixed32_; |
| 265 singleFixed64_ = other.singleFixed64_; |
| 266 singleSfixed32_ = other.singleSfixed32_; |
| 267 singleSfixed64_ = other.singleSfixed64_; |
| 268 singleFloat_ = other.singleFloat_; |
| 269 singleDouble_ = other.singleDouble_; |
| 270 singleBool_ = other.singleBool_; |
| 271 singleString_ = other.singleString_; |
| 272 singleBytes_ = other.singleBytes_; |
| 273 SingleNestedMessage = other.singleNestedMessage_ != null ? other.SingleNes
tedMessage.Clone() : null; |
| 274 SingleForeignMessage = other.singleForeignMessage_ != null ? other.SingleF
oreignMessage.Clone() : null; |
| 275 SingleImportMessage = other.singleImportMessage_ != null ? other.SingleImp
ortMessage.Clone() : null; |
| 276 singleNestedEnum_ = other.singleNestedEnum_; |
| 277 singleForeignEnum_ = other.singleForeignEnum_; |
| 278 singleImportEnum_ = other.singleImportEnum_; |
| 279 SinglePublicImportMessage = other.singlePublicImportMessage_ != null ? oth
er.SinglePublicImportMessage.Clone() : null; |
| 280 repeatedInt32_ = other.repeatedInt32_.Clone(); |
| 281 repeatedInt64_ = other.repeatedInt64_.Clone(); |
| 282 repeatedUint32_ = other.repeatedUint32_.Clone(); |
| 283 repeatedUint64_ = other.repeatedUint64_.Clone(); |
| 284 repeatedSint32_ = other.repeatedSint32_.Clone(); |
| 285 repeatedSint64_ = other.repeatedSint64_.Clone(); |
| 286 repeatedFixed32_ = other.repeatedFixed32_.Clone(); |
| 287 repeatedFixed64_ = other.repeatedFixed64_.Clone(); |
| 288 repeatedSfixed32_ = other.repeatedSfixed32_.Clone(); |
| 289 repeatedSfixed64_ = other.repeatedSfixed64_.Clone(); |
| 290 repeatedFloat_ = other.repeatedFloat_.Clone(); |
| 291 repeatedDouble_ = other.repeatedDouble_.Clone(); |
| 292 repeatedBool_ = other.repeatedBool_.Clone(); |
| 293 repeatedString_ = other.repeatedString_.Clone(); |
| 294 repeatedBytes_ = other.repeatedBytes_.Clone(); |
| 295 repeatedNestedMessage_ = other.repeatedNestedMessage_.Clone(); |
| 296 repeatedForeignMessage_ = other.repeatedForeignMessage_.Clone(); |
| 297 repeatedImportMessage_ = other.repeatedImportMessage_.Clone(); |
| 298 repeatedNestedEnum_ = other.repeatedNestedEnum_.Clone(); |
| 299 repeatedForeignEnum_ = other.repeatedForeignEnum_.Clone(); |
| 300 repeatedImportEnum_ = other.repeatedImportEnum_.Clone(); |
| 301 repeatedPublicImportMessage_ = other.repeatedPublicImportMessage_.Clone(); |
| 302 switch (other.OneofFieldCase) { |
| 303 case OneofFieldOneofCase.OneofUint32: |
| 304 OneofUint32 = other.OneofUint32; |
| 305 break; |
| 306 case OneofFieldOneofCase.OneofNestedMessage: |
| 307 OneofNestedMessage = other.OneofNestedMessage.Clone(); |
| 308 break; |
| 309 case OneofFieldOneofCase.OneofString: |
| 310 OneofString = other.OneofString; |
| 311 break; |
| 312 case OneofFieldOneofCase.OneofBytes: |
| 313 OneofBytes = other.OneofBytes; |
| 314 break; |
| 315 } |
| 316 |
| 317 } |
| 318 |
| 319 public TestAllTypes Clone() { |
| 320 return new TestAllTypes(this); |
| 321 } |
| 322 |
| 323 /// <summary>Field number for the "single_int32" field.</summary> |
| 324 public const int SingleInt32FieldNumber = 1; |
| 325 private int singleInt32_; |
| 326 /// <summary> |
| 327 /// Singular |
| 328 /// </summary> |
| 329 public int SingleInt32 { |
| 330 get { return singleInt32_; } |
| 331 set { |
| 332 singleInt32_ = value; |
| 333 } |
| 334 } |
| 335 |
| 336 /// <summary>Field number for the "single_int64" field.</summary> |
| 337 public const int SingleInt64FieldNumber = 2; |
| 338 private long singleInt64_; |
| 339 public long SingleInt64 { |
| 340 get { return singleInt64_; } |
| 341 set { |
| 342 singleInt64_ = value; |
| 343 } |
| 344 } |
| 345 |
| 346 /// <summary>Field number for the "single_uint32" field.</summary> |
| 347 public const int SingleUint32FieldNumber = 3; |
| 348 private uint singleUint32_; |
| 349 public uint SingleUint32 { |
| 350 get { return singleUint32_; } |
| 351 set { |
| 352 singleUint32_ = value; |
| 353 } |
| 354 } |
| 355 |
| 356 /// <summary>Field number for the "single_uint64" field.</summary> |
| 357 public const int SingleUint64FieldNumber = 4; |
| 358 private ulong singleUint64_; |
| 359 public ulong SingleUint64 { |
| 360 get { return singleUint64_; } |
| 361 set { |
| 362 singleUint64_ = value; |
| 363 } |
| 364 } |
| 365 |
| 366 /// <summary>Field number for the "single_sint32" field.</summary> |
| 367 public const int SingleSint32FieldNumber = 5; |
| 368 private int singleSint32_; |
| 369 public int SingleSint32 { |
| 370 get { return singleSint32_; } |
| 371 set { |
| 372 singleSint32_ = value; |
| 373 } |
| 374 } |
| 375 |
| 376 /// <summary>Field number for the "single_sint64" field.</summary> |
| 377 public const int SingleSint64FieldNumber = 6; |
| 378 private long singleSint64_; |
| 379 public long SingleSint64 { |
| 380 get { return singleSint64_; } |
| 381 set { |
| 382 singleSint64_ = value; |
| 383 } |
| 384 } |
| 385 |
| 386 /// <summary>Field number for the "single_fixed32" field.</summary> |
| 387 public const int SingleFixed32FieldNumber = 7; |
| 388 private uint singleFixed32_; |
| 389 public uint SingleFixed32 { |
| 390 get { return singleFixed32_; } |
| 391 set { |
| 392 singleFixed32_ = value; |
| 393 } |
| 394 } |
| 395 |
| 396 /// <summary>Field number for the "single_fixed64" field.</summary> |
| 397 public const int SingleFixed64FieldNumber = 8; |
| 398 private ulong singleFixed64_; |
| 399 public ulong SingleFixed64 { |
| 400 get { return singleFixed64_; } |
| 401 set { |
| 402 singleFixed64_ = value; |
| 403 } |
| 404 } |
| 405 |
| 406 /// <summary>Field number for the "single_sfixed32" field.</summary> |
| 407 public const int SingleSfixed32FieldNumber = 9; |
| 408 private int singleSfixed32_; |
| 409 public int SingleSfixed32 { |
| 410 get { return singleSfixed32_; } |
| 411 set { |
| 412 singleSfixed32_ = value; |
| 413 } |
| 414 } |
| 415 |
| 416 /// <summary>Field number for the "single_sfixed64" field.</summary> |
| 417 public const int SingleSfixed64FieldNumber = 10; |
| 418 private long singleSfixed64_; |
| 419 public long SingleSfixed64 { |
| 420 get { return singleSfixed64_; } |
| 421 set { |
| 422 singleSfixed64_ = value; |
| 423 } |
| 424 } |
| 425 |
| 426 /// <summary>Field number for the "single_float" field.</summary> |
| 427 public const int SingleFloatFieldNumber = 11; |
| 428 private float singleFloat_; |
| 429 public float SingleFloat { |
| 430 get { return singleFloat_; } |
| 431 set { |
| 432 singleFloat_ = value; |
| 433 } |
| 434 } |
| 435 |
| 436 /// <summary>Field number for the "single_double" field.</summary> |
| 437 public const int SingleDoubleFieldNumber = 12; |
| 438 private double singleDouble_; |
| 439 public double SingleDouble { |
| 440 get { return singleDouble_; } |
| 441 set { |
| 442 singleDouble_ = value; |
| 443 } |
| 444 } |
| 445 |
| 446 /// <summary>Field number for the "single_bool" field.</summary> |
| 447 public const int SingleBoolFieldNumber = 13; |
| 448 private bool singleBool_; |
| 449 public bool SingleBool { |
| 450 get { return singleBool_; } |
| 451 set { |
| 452 singleBool_ = value; |
| 453 } |
| 454 } |
| 455 |
| 456 /// <summary>Field number for the "single_string" field.</summary> |
| 457 public const int SingleStringFieldNumber = 14; |
| 458 private string singleString_ = ""; |
| 459 public string SingleString { |
| 460 get { return singleString_; } |
| 461 set { |
| 462 singleString_ = pb::Preconditions.CheckNotNull(value, "value"); |
| 463 } |
| 464 } |
| 465 |
| 466 /// <summary>Field number for the "single_bytes" field.</summary> |
| 467 public const int SingleBytesFieldNumber = 15; |
| 468 private pb::ByteString singleBytes_ = pb::ByteString.Empty; |
| 469 public pb::ByteString SingleBytes { |
| 470 get { return singleBytes_; } |
| 471 set { |
| 472 singleBytes_ = pb::Preconditions.CheckNotNull(value, "value"); |
| 473 } |
| 474 } |
| 475 |
| 476 /// <summary>Field number for the "single_nested_message" field.</summary> |
| 477 public const int SingleNestedMessageFieldNumber = 18; |
| 478 private global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage
singleNestedMessage_; |
| 479 public global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage S
ingleNestedMessage { |
| 480 get { return singleNestedMessage_; } |
| 481 set { |
| 482 singleNestedMessage_ = value; |
| 483 } |
| 484 } |
| 485 |
| 486 /// <summary>Field number for the "single_foreign_message" field.</summary> |
| 487 public const int SingleForeignMessageFieldNumber = 19; |
| 488 private global::Google.Protobuf.TestProtos.ForeignMessage singleForeignMessa
ge_; |
| 489 public global::Google.Protobuf.TestProtos.ForeignMessage SingleForeignMessag
e { |
| 490 get { return singleForeignMessage_; } |
| 491 set { |
| 492 singleForeignMessage_ = value; |
| 493 } |
| 494 } |
| 495 |
| 496 /// <summary>Field number for the "single_import_message" field.</summary> |
| 497 public const int SingleImportMessageFieldNumber = 20; |
| 498 private global::Google.Protobuf.TestProtos.ImportMessage singleImportMessage
_; |
| 499 public global::Google.Protobuf.TestProtos.ImportMessage SingleImportMessage
{ |
| 500 get { return singleImportMessage_; } |
| 501 set { |
| 502 singleImportMessage_ = value; |
| 503 } |
| 504 } |
| 505 |
| 506 /// <summary>Field number for the "single_nested_enum" field.</summary> |
| 507 public const int SingleNestedEnumFieldNumber = 21; |
| 508 private global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedEnum sin
gleNestedEnum_ = global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedEnu
m.NESTED_ENUM_UNSPECIFIED; |
| 509 public global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedEnum Sing
leNestedEnum { |
| 510 get { return singleNestedEnum_; } |
| 511 set { |
| 512 singleNestedEnum_ = value; |
| 513 } |
| 514 } |
| 515 |
| 516 /// <summary>Field number for the "single_foreign_enum" field.</summary> |
| 517 public const int SingleForeignEnumFieldNumber = 22; |
| 518 private global::Google.Protobuf.TestProtos.ForeignEnum singleForeignEnum_ =
global::Google.Protobuf.TestProtos.ForeignEnum.FOREIGN_UNSPECIFIED; |
| 519 public global::Google.Protobuf.TestProtos.ForeignEnum SingleForeignEnum { |
| 520 get { return singleForeignEnum_; } |
| 521 set { |
| 522 singleForeignEnum_ = value; |
| 523 } |
| 524 } |
| 525 |
| 526 /// <summary>Field number for the "single_import_enum" field.</summary> |
| 527 public const int SingleImportEnumFieldNumber = 23; |
| 528 private global::Google.Protobuf.TestProtos.ImportEnum singleImportEnum_ = gl
obal::Google.Protobuf.TestProtos.ImportEnum.IMPORT_ENUM_UNSPECIFIED; |
| 529 public global::Google.Protobuf.TestProtos.ImportEnum SingleImportEnum { |
| 530 get { return singleImportEnum_; } |
| 531 set { |
| 532 singleImportEnum_ = value; |
| 533 } |
| 534 } |
| 535 |
| 536 /// <summary>Field number for the "single_public_import_message" field.</sum
mary> |
| 537 public const int SinglePublicImportMessageFieldNumber = 26; |
| 538 private global::Google.Protobuf.TestProtos.PublicImportMessage singlePublicI
mportMessage_; |
| 539 /// <summary> |
| 540 /// Defined in unittest_import_public.proto |
| 541 /// </summary> |
| 542 public global::Google.Protobuf.TestProtos.PublicImportMessage SinglePublicIm
portMessage { |
| 543 get { return singlePublicImportMessage_; } |
| 544 set { |
| 545 singlePublicImportMessage_ = value; |
| 546 } |
| 547 } |
| 548 |
| 549 /// <summary>Field number for the "repeated_int32" field.</summary> |
| 550 public const int RepeatedInt32FieldNumber = 31; |
| 551 private static readonly pb::FieldCodec<int> _repeated_repeatedInt32_codec |
| 552 = pb::FieldCodec.ForInt32(250); |
| 553 private readonly pbc::RepeatedField<int> repeatedInt32_ = new pbc::RepeatedF
ield<int>(); |
| 554 /// <summary> |
| 555 /// Repeated |
| 556 /// </summary> |
| 557 public pbc::RepeatedField<int> RepeatedInt32 { |
| 558 get { return repeatedInt32_; } |
| 559 } |
| 560 |
| 561 /// <summary>Field number for the "repeated_int64" field.</summary> |
| 562 public const int RepeatedInt64FieldNumber = 32; |
| 563 private static readonly pb::FieldCodec<long> _repeated_repeatedInt64_codec |
| 564 = pb::FieldCodec.ForInt64(258); |
| 565 private readonly pbc::RepeatedField<long> repeatedInt64_ = new pbc::Repeated
Field<long>(); |
| 566 public pbc::RepeatedField<long> RepeatedInt64 { |
| 567 get { return repeatedInt64_; } |
| 568 } |
| 569 |
| 570 /// <summary>Field number for the "repeated_uint32" field.</summary> |
| 571 public const int RepeatedUint32FieldNumber = 33; |
| 572 private static readonly pb::FieldCodec<uint> _repeated_repeatedUint32_codec |
| 573 = pb::FieldCodec.ForUInt32(266); |
| 574 private readonly pbc::RepeatedField<uint> repeatedUint32_ = new pbc::Repeate
dField<uint>(); |
| 575 public pbc::RepeatedField<uint> RepeatedUint32 { |
| 576 get { return repeatedUint32_; } |
| 577 } |
| 578 |
| 579 /// <summary>Field number for the "repeated_uint64" field.</summary> |
| 580 public const int RepeatedUint64FieldNumber = 34; |
| 581 private static readonly pb::FieldCodec<ulong> _repeated_repeatedUint64_codec |
| 582 = pb::FieldCodec.ForUInt64(274); |
| 583 private readonly pbc::RepeatedField<ulong> repeatedUint64_ = new pbc::Repeat
edField<ulong>(); |
| 584 public pbc::RepeatedField<ulong> RepeatedUint64 { |
| 585 get { return repeatedUint64_; } |
| 586 } |
| 587 |
| 588 /// <summary>Field number for the "repeated_sint32" field.</summary> |
| 589 public const int RepeatedSint32FieldNumber = 35; |
| 590 private static readonly pb::FieldCodec<int> _repeated_repeatedSint32_codec |
| 591 = pb::FieldCodec.ForSInt32(282); |
| 592 private readonly pbc::RepeatedField<int> repeatedSint32_ = new pbc::Repeated
Field<int>(); |
| 593 public pbc::RepeatedField<int> RepeatedSint32 { |
| 594 get { return repeatedSint32_; } |
| 595 } |
| 596 |
| 597 /// <summary>Field number for the "repeated_sint64" field.</summary> |
| 598 public const int RepeatedSint64FieldNumber = 36; |
| 599 private static readonly pb::FieldCodec<long> _repeated_repeatedSint64_codec |
| 600 = pb::FieldCodec.ForSInt64(290); |
| 601 private readonly pbc::RepeatedField<long> repeatedSint64_ = new pbc::Repeate
dField<long>(); |
| 602 public pbc::RepeatedField<long> RepeatedSint64 { |
| 603 get { return repeatedSint64_; } |
| 604 } |
| 605 |
| 606 /// <summary>Field number for the "repeated_fixed32" field.</summary> |
| 607 public const int RepeatedFixed32FieldNumber = 37; |
| 608 private static readonly pb::FieldCodec<uint> _repeated_repeatedFixed32_codec |
| 609 = pb::FieldCodec.ForFixed32(298); |
| 610 private readonly pbc::RepeatedField<uint> repeatedFixed32_ = new pbc::Repeat
edField<uint>(); |
| 611 public pbc::RepeatedField<uint> RepeatedFixed32 { |
| 612 get { return repeatedFixed32_; } |
| 613 } |
| 614 |
| 615 /// <summary>Field number for the "repeated_fixed64" field.</summary> |
| 616 public const int RepeatedFixed64FieldNumber = 38; |
| 617 private static readonly pb::FieldCodec<ulong> _repeated_repeatedFixed64_code
c |
| 618 = pb::FieldCodec.ForFixed64(306); |
| 619 private readonly pbc::RepeatedField<ulong> repeatedFixed64_ = new pbc::Repea
tedField<ulong>(); |
| 620 public pbc::RepeatedField<ulong> RepeatedFixed64 { |
| 621 get { return repeatedFixed64_; } |
| 622 } |
| 623 |
| 624 /// <summary>Field number for the "repeated_sfixed32" field.</summary> |
| 625 public const int RepeatedSfixed32FieldNumber = 39; |
| 626 private static readonly pb::FieldCodec<int> _repeated_repeatedSfixed32_codec |
| 627 = pb::FieldCodec.ForSFixed32(314); |
| 628 private readonly pbc::RepeatedField<int> repeatedSfixed32_ = new pbc::Repeat
edField<int>(); |
| 629 public pbc::RepeatedField<int> RepeatedSfixed32 { |
| 630 get { return repeatedSfixed32_; } |
| 631 } |
| 632 |
| 633 /// <summary>Field number for the "repeated_sfixed64" field.</summary> |
| 634 public const int RepeatedSfixed64FieldNumber = 40; |
| 635 private static readonly pb::FieldCodec<long> _repeated_repeatedSfixed64_code
c |
| 636 = pb::FieldCodec.ForSFixed64(322); |
| 637 private readonly pbc::RepeatedField<long> repeatedSfixed64_ = new pbc::Repea
tedField<long>(); |
| 638 public pbc::RepeatedField<long> RepeatedSfixed64 { |
| 639 get { return repeatedSfixed64_; } |
| 640 } |
| 641 |
| 642 /// <summary>Field number for the "repeated_float" field.</summary> |
| 643 public const int RepeatedFloatFieldNumber = 41; |
| 644 private static readonly pb::FieldCodec<float> _repeated_repeatedFloat_codec |
| 645 = pb::FieldCodec.ForFloat(330); |
| 646 private readonly pbc::RepeatedField<float> repeatedFloat_ = new pbc::Repeate
dField<float>(); |
| 647 public pbc::RepeatedField<float> RepeatedFloat { |
| 648 get { return repeatedFloat_; } |
| 649 } |
| 650 |
| 651 /// <summary>Field number for the "repeated_double" field.</summary> |
| 652 public const int RepeatedDoubleFieldNumber = 42; |
| 653 private static readonly pb::FieldCodec<double> _repeated_repeatedDouble_code
c |
| 654 = pb::FieldCodec.ForDouble(338); |
| 655 private readonly pbc::RepeatedField<double> repeatedDouble_ = new pbc::Repea
tedField<double>(); |
| 656 public pbc::RepeatedField<double> RepeatedDouble { |
| 657 get { return repeatedDouble_; } |
| 658 } |
| 659 |
| 660 /// <summary>Field number for the "repeated_bool" field.</summary> |
| 661 public const int RepeatedBoolFieldNumber = 43; |
| 662 private static readonly pb::FieldCodec<bool> _repeated_repeatedBool_codec |
| 663 = pb::FieldCodec.ForBool(346); |
| 664 private readonly pbc::RepeatedField<bool> repeatedBool_ = new pbc::RepeatedF
ield<bool>(); |
| 665 public pbc::RepeatedField<bool> RepeatedBool { |
| 666 get { return repeatedBool_; } |
| 667 } |
| 668 |
| 669 /// <summary>Field number for the "repeated_string" field.</summary> |
| 670 public const int RepeatedStringFieldNumber = 44; |
| 671 private static readonly pb::FieldCodec<string> _repeated_repeatedString_code
c |
| 672 = pb::FieldCodec.ForString(354); |
| 673 private readonly pbc::RepeatedField<string> repeatedString_ = new pbc::Repea
tedField<string>(); |
| 674 public pbc::RepeatedField<string> RepeatedString { |
| 675 get { return repeatedString_; } |
| 676 } |
| 677 |
| 678 /// <summary>Field number for the "repeated_bytes" field.</summary> |
| 679 public const int RepeatedBytesFieldNumber = 45; |
| 680 private static readonly pb::FieldCodec<pb::ByteString> _repeated_repeatedByt
es_codec |
| 681 = pb::FieldCodec.ForBytes(362); |
| 682 private readonly pbc::RepeatedField<pb::ByteString> repeatedBytes_ = new pbc
::RepeatedField<pb::ByteString>(); |
| 683 public pbc::RepeatedField<pb::ByteString> RepeatedBytes { |
| 684 get { return repeatedBytes_; } |
| 685 } |
| 686 |
| 687 /// <summary>Field number for the "repeated_nested_message" field.</summary> |
| 688 public const int RepeatedNestedMessageFieldNumber = 48; |
| 689 private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.Te
stAllTypes.Types.NestedMessage> _repeated_repeatedNestedMessage_codec |
| 690 = pb::FieldCodec.ForMessage(386, global::Google.Protobuf.TestProtos.Test
AllTypes.Types.NestedMessage.Parser); |
| 691 private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.TestA
llTypes.Types.NestedMessage> repeatedNestedMessage_ = new pbc::RepeatedField<glo
bal::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage>(); |
| 692 public pbc::RepeatedField<global::Google.Protobuf.TestProtos.TestAllTypes.Ty
pes.NestedMessage> RepeatedNestedMessage { |
| 693 get { return repeatedNestedMessage_; } |
| 694 } |
| 695 |
| 696 /// <summary>Field number for the "repeated_foreign_message" field.</summary
> |
| 697 public const int RepeatedForeignMessageFieldNumber = 49; |
| 698 private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.Fo
reignMessage> _repeated_repeatedForeignMessage_codec |
| 699 = pb::FieldCodec.ForMessage(394, global::Google.Protobuf.TestProtos.Fore
ignMessage.Parser); |
| 700 private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.Forei
gnMessage> repeatedForeignMessage_ = new pbc::RepeatedField<global::Google.Proto
buf.TestProtos.ForeignMessage>(); |
| 701 public pbc::RepeatedField<global::Google.Protobuf.TestProtos.ForeignMessage>
RepeatedForeignMessage { |
| 702 get { return repeatedForeignMessage_; } |
| 703 } |
| 704 |
| 705 /// <summary>Field number for the "repeated_import_message" field.</summary> |
| 706 public const int RepeatedImportMessageFieldNumber = 50; |
| 707 private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.Im
portMessage> _repeated_repeatedImportMessage_codec |
| 708 = pb::FieldCodec.ForMessage(402, global::Google.Protobuf.TestProtos.Impo
rtMessage.Parser); |
| 709 private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.Impor
tMessage> repeatedImportMessage_ = new pbc::RepeatedField<global::Google.Protobu
f.TestProtos.ImportMessage>(); |
| 710 public pbc::RepeatedField<global::Google.Protobuf.TestProtos.ImportMessage>
RepeatedImportMessage { |
| 711 get { return repeatedImportMessage_; } |
| 712 } |
| 713 |
| 714 /// <summary>Field number for the "repeated_nested_enum" field.</summary> |
| 715 public const int RepeatedNestedEnumFieldNumber = 51; |
| 716 private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.Te
stAllTypes.Types.NestedEnum> _repeated_repeatedNestedEnum_codec |
| 717 = pb::FieldCodec.ForEnum(410, x => (int) x, x => (global::Google.Protobu
f.TestProtos.TestAllTypes.Types.NestedEnum) x); |
| 718 private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.TestA
llTypes.Types.NestedEnum> repeatedNestedEnum_ = new pbc::RepeatedField<global::G
oogle.Protobuf.TestProtos.TestAllTypes.Types.NestedEnum>(); |
| 719 public pbc::RepeatedField<global::Google.Protobuf.TestProtos.TestAllTypes.Ty
pes.NestedEnum> RepeatedNestedEnum { |
| 720 get { return repeatedNestedEnum_; } |
| 721 } |
| 722 |
| 723 /// <summary>Field number for the "repeated_foreign_enum" field.</summary> |
| 724 public const int RepeatedForeignEnumFieldNumber = 52; |
| 725 private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.Fo
reignEnum> _repeated_repeatedForeignEnum_codec |
| 726 = pb::FieldCodec.ForEnum(418, x => (int) x, x => (global::Google.Protobu
f.TestProtos.ForeignEnum) x); |
| 727 private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.Forei
gnEnum> repeatedForeignEnum_ = new pbc::RepeatedField<global::Google.Protobuf.Te
stProtos.ForeignEnum>(); |
| 728 public pbc::RepeatedField<global::Google.Protobuf.TestProtos.ForeignEnum> Re
peatedForeignEnum { |
| 729 get { return repeatedForeignEnum_; } |
| 730 } |
| 731 |
| 732 /// <summary>Field number for the "repeated_import_enum" field.</summary> |
| 733 public const int RepeatedImportEnumFieldNumber = 53; |
| 734 private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.Im
portEnum> _repeated_repeatedImportEnum_codec |
| 735 = pb::FieldCodec.ForEnum(426, x => (int) x, x => (global::Google.Protobu
f.TestProtos.ImportEnum) x); |
| 736 private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.Impor
tEnum> repeatedImportEnum_ = new pbc::RepeatedField<global::Google.Protobuf.Test
Protos.ImportEnum>(); |
| 737 public pbc::RepeatedField<global::Google.Protobuf.TestProtos.ImportEnum> Rep
eatedImportEnum { |
| 738 get { return repeatedImportEnum_; } |
| 739 } |
| 740 |
| 741 /// <summary>Field number for the "repeated_public_import_message" field.</s
ummary> |
| 742 public const int RepeatedPublicImportMessageFieldNumber = 54; |
| 743 private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.Pu
blicImportMessage> _repeated_repeatedPublicImportMessage_codec |
| 744 = pb::FieldCodec.ForMessage(434, global::Google.Protobuf.TestProtos.Publ
icImportMessage.Parser); |
| 745 private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.Publi
cImportMessage> repeatedPublicImportMessage_ = new pbc::RepeatedField<global::Go
ogle.Protobuf.TestProtos.PublicImportMessage>(); |
| 746 /// <summary> |
| 747 /// Defined in unittest_import_public.proto |
| 748 /// </summary> |
| 749 public pbc::RepeatedField<global::Google.Protobuf.TestProtos.PublicImportMes
sage> RepeatedPublicImportMessage { |
| 750 get { return repeatedPublicImportMessage_; } |
| 751 } |
| 752 |
| 753 /// <summary>Field number for the "oneof_uint32" field.</summary> |
| 754 public const int OneofUint32FieldNumber = 111; |
| 755 public uint OneofUint32 { |
| 756 get { return oneofFieldCase_ == OneofFieldOneofCase.OneofUint32 ? (uint) o
neofField_ : 0; } |
| 757 set { |
| 758 oneofField_ = value; |
| 759 oneofFieldCase_ = OneofFieldOneofCase.OneofUint32; |
| 760 } |
| 761 } |
| 762 |
| 763 /// <summary>Field number for the "oneof_nested_message" field.</summary> |
| 764 public const int OneofNestedMessageFieldNumber = 112; |
| 765 public global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage O
neofNestedMessage { |
| 766 get { return oneofFieldCase_ == OneofFieldOneofCase.OneofNestedMessage ? (
global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage) oneofField_
: null; } |
| 767 set { |
| 768 oneofField_ = value; |
| 769 oneofFieldCase_ = value == null ? OneofFieldOneofCase.None : OneofFieldO
neofCase.OneofNestedMessage; |
| 770 } |
| 771 } |
| 772 |
| 773 /// <summary>Field number for the "oneof_string" field.</summary> |
| 774 public const int OneofStringFieldNumber = 113; |
| 775 public string OneofString { |
| 776 get { return oneofFieldCase_ == OneofFieldOneofCase.OneofString ? (string)
oneofField_ : ""; } |
| 777 set { |
| 778 oneofField_ = pb::Preconditions.CheckNotNull(value, "value"); |
| 779 oneofFieldCase_ = OneofFieldOneofCase.OneofString; |
| 780 } |
| 781 } |
| 782 |
| 783 /// <summary>Field number for the "oneof_bytes" field.</summary> |
| 784 public const int OneofBytesFieldNumber = 114; |
| 785 public pb::ByteString OneofBytes { |
| 786 get { return oneofFieldCase_ == OneofFieldOneofCase.OneofBytes ? (pb::Byte
String) oneofField_ : pb::ByteString.Empty; } |
| 787 set { |
| 788 oneofField_ = pb::Preconditions.CheckNotNull(value, "value"); |
| 789 oneofFieldCase_ = OneofFieldOneofCase.OneofBytes; |
| 790 } |
| 791 } |
| 792 |
| 793 private object oneofField_; |
| 794 /// <summary>Enum of possible cases for the "oneof_field" oneof.</summary> |
| 795 public enum OneofFieldOneofCase { |
| 796 None = 0, |
| 797 OneofUint32 = 111, |
| 798 OneofNestedMessage = 112, |
| 799 OneofString = 113, |
| 800 OneofBytes = 114, |
| 801 } |
| 802 private OneofFieldOneofCase oneofFieldCase_ = OneofFieldOneofCase.None; |
| 803 public OneofFieldOneofCase OneofFieldCase { |
| 804 get { return oneofFieldCase_; } |
| 805 } |
| 806 |
| 807 public void ClearOneofField() { |
| 808 oneofFieldCase_ = OneofFieldOneofCase.None; |
| 809 oneofField_ = null; |
| 810 } |
| 811 |
| 812 public override bool Equals(object other) { |
| 813 return Equals(other as TestAllTypes); |
| 814 } |
| 815 |
| 816 public bool Equals(TestAllTypes other) { |
| 817 if (ReferenceEquals(other, null)) { |
| 818 return false; |
| 819 } |
| 820 if (ReferenceEquals(other, this)) { |
| 821 return true; |
| 822 } |
| 823 if (SingleInt32 != other.SingleInt32) return false; |
| 824 if (SingleInt64 != other.SingleInt64) return false; |
| 825 if (SingleUint32 != other.SingleUint32) return false; |
| 826 if (SingleUint64 != other.SingleUint64) return false; |
| 827 if (SingleSint32 != other.SingleSint32) return false; |
| 828 if (SingleSint64 != other.SingleSint64) return false; |
| 829 if (SingleFixed32 != other.SingleFixed32) return false; |
| 830 if (SingleFixed64 != other.SingleFixed64) return false; |
| 831 if (SingleSfixed32 != other.SingleSfixed32) return false; |
| 832 if (SingleSfixed64 != other.SingleSfixed64) return false; |
| 833 if (SingleFloat != other.SingleFloat) return false; |
| 834 if (SingleDouble != other.SingleDouble) return false; |
| 835 if (SingleBool != other.SingleBool) return false; |
| 836 if (SingleString != other.SingleString) return false; |
| 837 if (SingleBytes != other.SingleBytes) return false; |
| 838 if (!object.Equals(SingleNestedMessage, other.SingleNestedMessage)) return
false; |
| 839 if (!object.Equals(SingleForeignMessage, other.SingleForeignMessage)) retu
rn false; |
| 840 if (!object.Equals(SingleImportMessage, other.SingleImportMessage)) return
false; |
| 841 if (SingleNestedEnum != other.SingleNestedEnum) return false; |
| 842 if (SingleForeignEnum != other.SingleForeignEnum) return false; |
| 843 if (SingleImportEnum != other.SingleImportEnum) return false; |
| 844 if (!object.Equals(SinglePublicImportMessage, other.SinglePublicImportMess
age)) return false; |
| 845 if(!repeatedInt32_.Equals(other.repeatedInt32_)) return false; |
| 846 if(!repeatedInt64_.Equals(other.repeatedInt64_)) return false; |
| 847 if(!repeatedUint32_.Equals(other.repeatedUint32_)) return false; |
| 848 if(!repeatedUint64_.Equals(other.repeatedUint64_)) return false; |
| 849 if(!repeatedSint32_.Equals(other.repeatedSint32_)) return false; |
| 850 if(!repeatedSint64_.Equals(other.repeatedSint64_)) return false; |
| 851 if(!repeatedFixed32_.Equals(other.repeatedFixed32_)) return false; |
| 852 if(!repeatedFixed64_.Equals(other.repeatedFixed64_)) return false; |
| 853 if(!repeatedSfixed32_.Equals(other.repeatedSfixed32_)) return false; |
| 854 if(!repeatedSfixed64_.Equals(other.repeatedSfixed64_)) return false; |
| 855 if(!repeatedFloat_.Equals(other.repeatedFloat_)) return false; |
| 856 if(!repeatedDouble_.Equals(other.repeatedDouble_)) return false; |
| 857 if(!repeatedBool_.Equals(other.repeatedBool_)) return false; |
| 858 if(!repeatedString_.Equals(other.repeatedString_)) return false; |
| 859 if(!repeatedBytes_.Equals(other.repeatedBytes_)) return false; |
| 860 if(!repeatedNestedMessage_.Equals(other.repeatedNestedMessage_)) return fa
lse; |
| 861 if(!repeatedForeignMessage_.Equals(other.repeatedForeignMessage_)) return
false; |
| 862 if(!repeatedImportMessage_.Equals(other.repeatedImportMessage_)) return fa
lse; |
| 863 if(!repeatedNestedEnum_.Equals(other.repeatedNestedEnum_)) return false; |
| 864 if(!repeatedForeignEnum_.Equals(other.repeatedForeignEnum_)) return false; |
| 865 if(!repeatedImportEnum_.Equals(other.repeatedImportEnum_)) return false; |
| 866 if(!repeatedPublicImportMessage_.Equals(other.repeatedPublicImportMessage_
)) return false; |
| 867 if (OneofUint32 != other.OneofUint32) return false; |
| 868 if (!object.Equals(OneofNestedMessage, other.OneofNestedMessage)) return f
alse; |
| 869 if (OneofString != other.OneofString) return false; |
| 870 if (OneofBytes != other.OneofBytes) return false; |
| 871 if (OneofFieldCase != other.OneofFieldCase) return false; |
| 872 return true; |
| 873 } |
| 874 |
| 875 public override int GetHashCode() { |
| 876 int hash = 1; |
| 877 if (SingleInt32 != 0) hash ^= SingleInt32.GetHashCode(); |
| 878 if (SingleInt64 != 0L) hash ^= SingleInt64.GetHashCode(); |
| 879 if (SingleUint32 != 0) hash ^= SingleUint32.GetHashCode(); |
| 880 if (SingleUint64 != 0UL) hash ^= SingleUint64.GetHashCode(); |
| 881 if (SingleSint32 != 0) hash ^= SingleSint32.GetHashCode(); |
| 882 if (SingleSint64 != 0L) hash ^= SingleSint64.GetHashCode(); |
| 883 if (SingleFixed32 != 0) hash ^= SingleFixed32.GetHashCode(); |
| 884 if (SingleFixed64 != 0UL) hash ^= SingleFixed64.GetHashCode(); |
| 885 if (SingleSfixed32 != 0) hash ^= SingleSfixed32.GetHashCode(); |
| 886 if (SingleSfixed64 != 0L) hash ^= SingleSfixed64.GetHashCode(); |
| 887 if (SingleFloat != 0F) hash ^= SingleFloat.GetHashCode(); |
| 888 if (SingleDouble != 0D) hash ^= SingleDouble.GetHashCode(); |
| 889 if (SingleBool != false) hash ^= SingleBool.GetHashCode(); |
| 890 if (SingleString.Length != 0) hash ^= SingleString.GetHashCode(); |
| 891 if (SingleBytes.Length != 0) hash ^= SingleBytes.GetHashCode(); |
| 892 if (singleNestedMessage_ != null) hash ^= SingleNestedMessage.GetHashCode(
); |
| 893 if (singleForeignMessage_ != null) hash ^= SingleForeignMessage.GetHashCod
e(); |
| 894 if (singleImportMessage_ != null) hash ^= SingleImportMessage.GetHashCode(
); |
| 895 if (SingleNestedEnum != global::Google.Protobuf.TestProtos.TestAllTypes.Ty
pes.NestedEnum.NESTED_ENUM_UNSPECIFIED) hash ^= SingleNestedEnum.GetHashCode(); |
| 896 if (SingleForeignEnum != global::Google.Protobuf.TestProtos.ForeignEnum.FO
REIGN_UNSPECIFIED) hash ^= SingleForeignEnum.GetHashCode(); |
| 897 if (SingleImportEnum != global::Google.Protobuf.TestProtos.ImportEnum.IMPO
RT_ENUM_UNSPECIFIED) hash ^= SingleImportEnum.GetHashCode(); |
| 898 if (singlePublicImportMessage_ != null) hash ^= SinglePublicImportMessage.
GetHashCode(); |
| 899 hash ^= repeatedInt32_.GetHashCode(); |
| 900 hash ^= repeatedInt64_.GetHashCode(); |
| 901 hash ^= repeatedUint32_.GetHashCode(); |
| 902 hash ^= repeatedUint64_.GetHashCode(); |
| 903 hash ^= repeatedSint32_.GetHashCode(); |
| 904 hash ^= repeatedSint64_.GetHashCode(); |
| 905 hash ^= repeatedFixed32_.GetHashCode(); |
| 906 hash ^= repeatedFixed64_.GetHashCode(); |
| 907 hash ^= repeatedSfixed32_.GetHashCode(); |
| 908 hash ^= repeatedSfixed64_.GetHashCode(); |
| 909 hash ^= repeatedFloat_.GetHashCode(); |
| 910 hash ^= repeatedDouble_.GetHashCode(); |
| 911 hash ^= repeatedBool_.GetHashCode(); |
| 912 hash ^= repeatedString_.GetHashCode(); |
| 913 hash ^= repeatedBytes_.GetHashCode(); |
| 914 hash ^= repeatedNestedMessage_.GetHashCode(); |
| 915 hash ^= repeatedForeignMessage_.GetHashCode(); |
| 916 hash ^= repeatedImportMessage_.GetHashCode(); |
| 917 hash ^= repeatedNestedEnum_.GetHashCode(); |
| 918 hash ^= repeatedForeignEnum_.GetHashCode(); |
| 919 hash ^= repeatedImportEnum_.GetHashCode(); |
| 920 hash ^= repeatedPublicImportMessage_.GetHashCode(); |
| 921 if (oneofFieldCase_ == OneofFieldOneofCase.OneofUint32) hash ^= OneofUint3
2.GetHashCode(); |
| 922 if (oneofFieldCase_ == OneofFieldOneofCase.OneofNestedMessage) hash ^= One
ofNestedMessage.GetHashCode(); |
| 923 if (oneofFieldCase_ == OneofFieldOneofCase.OneofString) hash ^= OneofStrin
g.GetHashCode(); |
| 924 if (oneofFieldCase_ == OneofFieldOneofCase.OneofBytes) hash ^= OneofBytes.
GetHashCode(); |
| 925 hash ^= (int) oneofFieldCase_; |
| 926 return hash; |
| 927 } |
| 928 |
| 929 public override string ToString() { |
| 930 return pb::JsonFormatter.ToDiagnosticString(this); |
| 931 } |
| 932 |
| 933 public void WriteTo(pb::CodedOutputStream output) { |
| 934 if (SingleInt32 != 0) { |
| 935 output.WriteRawTag(8); |
| 936 output.WriteInt32(SingleInt32); |
| 937 } |
| 938 if (SingleInt64 != 0L) { |
| 939 output.WriteRawTag(16); |
| 940 output.WriteInt64(SingleInt64); |
| 941 } |
| 942 if (SingleUint32 != 0) { |
| 943 output.WriteRawTag(24); |
| 944 output.WriteUInt32(SingleUint32); |
| 945 } |
| 946 if (SingleUint64 != 0UL) { |
| 947 output.WriteRawTag(32); |
| 948 output.WriteUInt64(SingleUint64); |
| 949 } |
| 950 if (SingleSint32 != 0) { |
| 951 output.WriteRawTag(40); |
| 952 output.WriteSInt32(SingleSint32); |
| 953 } |
| 954 if (SingleSint64 != 0L) { |
| 955 output.WriteRawTag(48); |
| 956 output.WriteSInt64(SingleSint64); |
| 957 } |
| 958 if (SingleFixed32 != 0) { |
| 959 output.WriteRawTag(61); |
| 960 output.WriteFixed32(SingleFixed32); |
| 961 } |
| 962 if (SingleFixed64 != 0UL) { |
| 963 output.WriteRawTag(65); |
| 964 output.WriteFixed64(SingleFixed64); |
| 965 } |
| 966 if (SingleSfixed32 != 0) { |
| 967 output.WriteRawTag(77); |
| 968 output.WriteSFixed32(SingleSfixed32); |
| 969 } |
| 970 if (SingleSfixed64 != 0L) { |
| 971 output.WriteRawTag(81); |
| 972 output.WriteSFixed64(SingleSfixed64); |
| 973 } |
| 974 if (SingleFloat != 0F) { |
| 975 output.WriteRawTag(93); |
| 976 output.WriteFloat(SingleFloat); |
| 977 } |
| 978 if (SingleDouble != 0D) { |
| 979 output.WriteRawTag(97); |
| 980 output.WriteDouble(SingleDouble); |
| 981 } |
| 982 if (SingleBool != false) { |
| 983 output.WriteRawTag(104); |
| 984 output.WriteBool(SingleBool); |
| 985 } |
| 986 if (SingleString.Length != 0) { |
| 987 output.WriteRawTag(114); |
| 988 output.WriteString(SingleString); |
| 989 } |
| 990 if (SingleBytes.Length != 0) { |
| 991 output.WriteRawTag(122); |
| 992 output.WriteBytes(SingleBytes); |
| 993 } |
| 994 if (singleNestedMessage_ != null) { |
| 995 output.WriteRawTag(146, 1); |
| 996 output.WriteMessage(SingleNestedMessage); |
| 997 } |
| 998 if (singleForeignMessage_ != null) { |
| 999 output.WriteRawTag(154, 1); |
| 1000 output.WriteMessage(SingleForeignMessage); |
| 1001 } |
| 1002 if (singleImportMessage_ != null) { |
| 1003 output.WriteRawTag(162, 1); |
| 1004 output.WriteMessage(SingleImportMessage); |
| 1005 } |
| 1006 if (SingleNestedEnum != global::Google.Protobuf.TestProtos.TestAllTypes.Ty
pes.NestedEnum.NESTED_ENUM_UNSPECIFIED) { |
| 1007 output.WriteRawTag(168, 1); |
| 1008 output.WriteEnum((int) SingleNestedEnum); |
| 1009 } |
| 1010 if (SingleForeignEnum != global::Google.Protobuf.TestProtos.ForeignEnum.FO
REIGN_UNSPECIFIED) { |
| 1011 output.WriteRawTag(176, 1); |
| 1012 output.WriteEnum((int) SingleForeignEnum); |
| 1013 } |
| 1014 if (SingleImportEnum != global::Google.Protobuf.TestProtos.ImportEnum.IMPO
RT_ENUM_UNSPECIFIED) { |
| 1015 output.WriteRawTag(184, 1); |
| 1016 output.WriteEnum((int) SingleImportEnum); |
| 1017 } |
| 1018 if (singlePublicImportMessage_ != null) { |
| 1019 output.WriteRawTag(210, 1); |
| 1020 output.WriteMessage(SinglePublicImportMessage); |
| 1021 } |
| 1022 repeatedInt32_.WriteTo(output, _repeated_repeatedInt32_codec); |
| 1023 repeatedInt64_.WriteTo(output, _repeated_repeatedInt64_codec); |
| 1024 repeatedUint32_.WriteTo(output, _repeated_repeatedUint32_codec); |
| 1025 repeatedUint64_.WriteTo(output, _repeated_repeatedUint64_codec); |
| 1026 repeatedSint32_.WriteTo(output, _repeated_repeatedSint32_codec); |
| 1027 repeatedSint64_.WriteTo(output, _repeated_repeatedSint64_codec); |
| 1028 repeatedFixed32_.WriteTo(output, _repeated_repeatedFixed32_codec); |
| 1029 repeatedFixed64_.WriteTo(output, _repeated_repeatedFixed64_codec); |
| 1030 repeatedSfixed32_.WriteTo(output, _repeated_repeatedSfixed32_codec); |
| 1031 repeatedSfixed64_.WriteTo(output, _repeated_repeatedSfixed64_codec); |
| 1032 repeatedFloat_.WriteTo(output, _repeated_repeatedFloat_codec); |
| 1033 repeatedDouble_.WriteTo(output, _repeated_repeatedDouble_codec); |
| 1034 repeatedBool_.WriteTo(output, _repeated_repeatedBool_codec); |
| 1035 repeatedString_.WriteTo(output, _repeated_repeatedString_codec); |
| 1036 repeatedBytes_.WriteTo(output, _repeated_repeatedBytes_codec); |
| 1037 repeatedNestedMessage_.WriteTo(output, _repeated_repeatedNestedMessage_cod
ec); |
| 1038 repeatedForeignMessage_.WriteTo(output, _repeated_repeatedForeignMessage_c
odec); |
| 1039 repeatedImportMessage_.WriteTo(output, _repeated_repeatedImportMessage_cod
ec); |
| 1040 repeatedNestedEnum_.WriteTo(output, _repeated_repeatedNestedEnum_codec); |
| 1041 repeatedForeignEnum_.WriteTo(output, _repeated_repeatedForeignEnum_codec); |
| 1042 repeatedImportEnum_.WriteTo(output, _repeated_repeatedImportEnum_codec); |
| 1043 repeatedPublicImportMessage_.WriteTo(output, _repeated_repeatedPublicImpor
tMessage_codec); |
| 1044 if (oneofFieldCase_ == OneofFieldOneofCase.OneofUint32) { |
| 1045 output.WriteRawTag(248, 6); |
| 1046 output.WriteUInt32(OneofUint32); |
| 1047 } |
| 1048 if (oneofFieldCase_ == OneofFieldOneofCase.OneofNestedMessage) { |
| 1049 output.WriteRawTag(130, 7); |
| 1050 output.WriteMessage(OneofNestedMessage); |
| 1051 } |
| 1052 if (oneofFieldCase_ == OneofFieldOneofCase.OneofString) { |
| 1053 output.WriteRawTag(138, 7); |
| 1054 output.WriteString(OneofString); |
| 1055 } |
| 1056 if (oneofFieldCase_ == OneofFieldOneofCase.OneofBytes) { |
| 1057 output.WriteRawTag(146, 7); |
| 1058 output.WriteBytes(OneofBytes); |
| 1059 } |
| 1060 } |
| 1061 |
| 1062 public int CalculateSize() { |
| 1063 int size = 0; |
| 1064 if (SingleInt32 != 0) { |
| 1065 size += 1 + pb::CodedOutputStream.ComputeInt32Size(SingleInt32); |
| 1066 } |
| 1067 if (SingleInt64 != 0L) { |
| 1068 size += 1 + pb::CodedOutputStream.ComputeInt64Size(SingleInt64); |
| 1069 } |
| 1070 if (SingleUint32 != 0) { |
| 1071 size += 1 + pb::CodedOutputStream.ComputeUInt32Size(SingleUint32); |
| 1072 } |
| 1073 if (SingleUint64 != 0UL) { |
| 1074 size += 1 + pb::CodedOutputStream.ComputeUInt64Size(SingleUint64); |
| 1075 } |
| 1076 if (SingleSint32 != 0) { |
| 1077 size += 1 + pb::CodedOutputStream.ComputeSInt32Size(SingleSint32); |
| 1078 } |
| 1079 if (SingleSint64 != 0L) { |
| 1080 size += 1 + pb::CodedOutputStream.ComputeSInt64Size(SingleSint64); |
| 1081 } |
| 1082 if (SingleFixed32 != 0) { |
| 1083 size += 1 + 4; |
| 1084 } |
| 1085 if (SingleFixed64 != 0UL) { |
| 1086 size += 1 + 8; |
| 1087 } |
| 1088 if (SingleSfixed32 != 0) { |
| 1089 size += 1 + 4; |
| 1090 } |
| 1091 if (SingleSfixed64 != 0L) { |
| 1092 size += 1 + 8; |
| 1093 } |
| 1094 if (SingleFloat != 0F) { |
| 1095 size += 1 + 4; |
| 1096 } |
| 1097 if (SingleDouble != 0D) { |
| 1098 size += 1 + 8; |
| 1099 } |
| 1100 if (SingleBool != false) { |
| 1101 size += 1 + 1; |
| 1102 } |
| 1103 if (SingleString.Length != 0) { |
| 1104 size += 1 + pb::CodedOutputStream.ComputeStringSize(SingleString); |
| 1105 } |
| 1106 if (SingleBytes.Length != 0) { |
| 1107 size += 1 + pb::CodedOutputStream.ComputeBytesSize(SingleBytes); |
| 1108 } |
| 1109 if (singleNestedMessage_ != null) { |
| 1110 size += 2 + pb::CodedOutputStream.ComputeMessageSize(SingleNestedMessage
); |
| 1111 } |
| 1112 if (singleForeignMessage_ != null) { |
| 1113 size += 2 + pb::CodedOutputStream.ComputeMessageSize(SingleForeignMessag
e); |
| 1114 } |
| 1115 if (singleImportMessage_ != null) { |
| 1116 size += 2 + pb::CodedOutputStream.ComputeMessageSize(SingleImportMessage
); |
| 1117 } |
| 1118 if (SingleNestedEnum != global::Google.Protobuf.TestProtos.TestAllTypes.Ty
pes.NestedEnum.NESTED_ENUM_UNSPECIFIED) { |
| 1119 size += 2 + pb::CodedOutputStream.ComputeEnumSize((int) SingleNestedEnum
); |
| 1120 } |
| 1121 if (SingleForeignEnum != global::Google.Protobuf.TestProtos.ForeignEnum.FO
REIGN_UNSPECIFIED) { |
| 1122 size += 2 + pb::CodedOutputStream.ComputeEnumSize((int) SingleForeignEnu
m); |
| 1123 } |
| 1124 if (SingleImportEnum != global::Google.Protobuf.TestProtos.ImportEnum.IMPO
RT_ENUM_UNSPECIFIED) { |
| 1125 size += 2 + pb::CodedOutputStream.ComputeEnumSize((int) SingleImportEnum
); |
| 1126 } |
| 1127 if (singlePublicImportMessage_ != null) { |
| 1128 size += 2 + pb::CodedOutputStream.ComputeMessageSize(SinglePublicImportM
essage); |
| 1129 } |
| 1130 size += repeatedInt32_.CalculateSize(_repeated_repeatedInt32_codec); |
| 1131 size += repeatedInt64_.CalculateSize(_repeated_repeatedInt64_codec); |
| 1132 size += repeatedUint32_.CalculateSize(_repeated_repeatedUint32_codec); |
| 1133 size += repeatedUint64_.CalculateSize(_repeated_repeatedUint64_codec); |
| 1134 size += repeatedSint32_.CalculateSize(_repeated_repeatedSint32_codec); |
| 1135 size += repeatedSint64_.CalculateSize(_repeated_repeatedSint64_codec); |
| 1136 size += repeatedFixed32_.CalculateSize(_repeated_repeatedFixed32_codec); |
| 1137 size += repeatedFixed64_.CalculateSize(_repeated_repeatedFixed64_codec); |
| 1138 size += repeatedSfixed32_.CalculateSize(_repeated_repeatedSfixed32_codec); |
| 1139 size += repeatedSfixed64_.CalculateSize(_repeated_repeatedSfixed64_codec); |
| 1140 size += repeatedFloat_.CalculateSize(_repeated_repeatedFloat_codec); |
| 1141 size += repeatedDouble_.CalculateSize(_repeated_repeatedDouble_codec); |
| 1142 size += repeatedBool_.CalculateSize(_repeated_repeatedBool_codec); |
| 1143 size += repeatedString_.CalculateSize(_repeated_repeatedString_codec); |
| 1144 size += repeatedBytes_.CalculateSize(_repeated_repeatedBytes_codec); |
| 1145 size += repeatedNestedMessage_.CalculateSize(_repeated_repeatedNestedMessa
ge_codec); |
| 1146 size += repeatedForeignMessage_.CalculateSize(_repeated_repeatedForeignMes
sage_codec); |
| 1147 size += repeatedImportMessage_.CalculateSize(_repeated_repeatedImportMessa
ge_codec); |
| 1148 size += repeatedNestedEnum_.CalculateSize(_repeated_repeatedNestedEnum_cod
ec); |
| 1149 size += repeatedForeignEnum_.CalculateSize(_repeated_repeatedForeignEnum_c
odec); |
| 1150 size += repeatedImportEnum_.CalculateSize(_repeated_repeatedImportEnum_cod
ec); |
| 1151 size += repeatedPublicImportMessage_.CalculateSize(_repeated_repeatedPubli
cImportMessage_codec); |
| 1152 if (oneofFieldCase_ == OneofFieldOneofCase.OneofUint32) { |
| 1153 size += 2 + pb::CodedOutputStream.ComputeUInt32Size(OneofUint32); |
| 1154 } |
| 1155 if (oneofFieldCase_ == OneofFieldOneofCase.OneofNestedMessage) { |
| 1156 size += 2 + pb::CodedOutputStream.ComputeMessageSize(OneofNestedMessage)
; |
| 1157 } |
| 1158 if (oneofFieldCase_ == OneofFieldOneofCase.OneofString) { |
| 1159 size += 2 + pb::CodedOutputStream.ComputeStringSize(OneofString); |
| 1160 } |
| 1161 if (oneofFieldCase_ == OneofFieldOneofCase.OneofBytes) { |
| 1162 size += 2 + pb::CodedOutputStream.ComputeBytesSize(OneofBytes); |
| 1163 } |
| 1164 return size; |
| 1165 } |
| 1166 |
| 1167 public void MergeFrom(TestAllTypes other) { |
| 1168 if (other == null) { |
| 1169 return; |
| 1170 } |
| 1171 if (other.SingleInt32 != 0) { |
| 1172 SingleInt32 = other.SingleInt32; |
| 1173 } |
| 1174 if (other.SingleInt64 != 0L) { |
| 1175 SingleInt64 = other.SingleInt64; |
| 1176 } |
| 1177 if (other.SingleUint32 != 0) { |
| 1178 SingleUint32 = other.SingleUint32; |
| 1179 } |
| 1180 if (other.SingleUint64 != 0UL) { |
| 1181 SingleUint64 = other.SingleUint64; |
| 1182 } |
| 1183 if (other.SingleSint32 != 0) { |
| 1184 SingleSint32 = other.SingleSint32; |
| 1185 } |
| 1186 if (other.SingleSint64 != 0L) { |
| 1187 SingleSint64 = other.SingleSint64; |
| 1188 } |
| 1189 if (other.SingleFixed32 != 0) { |
| 1190 SingleFixed32 = other.SingleFixed32; |
| 1191 } |
| 1192 if (other.SingleFixed64 != 0UL) { |
| 1193 SingleFixed64 = other.SingleFixed64; |
| 1194 } |
| 1195 if (other.SingleSfixed32 != 0) { |
| 1196 SingleSfixed32 = other.SingleSfixed32; |
| 1197 } |
| 1198 if (other.SingleSfixed64 != 0L) { |
| 1199 SingleSfixed64 = other.SingleSfixed64; |
| 1200 } |
| 1201 if (other.SingleFloat != 0F) { |
| 1202 SingleFloat = other.SingleFloat; |
| 1203 } |
| 1204 if (other.SingleDouble != 0D) { |
| 1205 SingleDouble = other.SingleDouble; |
| 1206 } |
| 1207 if (other.SingleBool != false) { |
| 1208 SingleBool = other.SingleBool; |
| 1209 } |
| 1210 if (other.SingleString.Length != 0) { |
| 1211 SingleString = other.SingleString; |
| 1212 } |
| 1213 if (other.SingleBytes.Length != 0) { |
| 1214 SingleBytes = other.SingleBytes; |
| 1215 } |
| 1216 if (other.singleNestedMessage_ != null) { |
| 1217 if (singleNestedMessage_ == null) { |
| 1218 singleNestedMessage_ = new global::Google.Protobuf.TestProtos.TestAllT
ypes.Types.NestedMessage(); |
| 1219 } |
| 1220 SingleNestedMessage.MergeFrom(other.SingleNestedMessage); |
| 1221 } |
| 1222 if (other.singleForeignMessage_ != null) { |
| 1223 if (singleForeignMessage_ == null) { |
| 1224 singleForeignMessage_ = new global::Google.Protobuf.TestProtos.Foreign
Message(); |
| 1225 } |
| 1226 SingleForeignMessage.MergeFrom(other.SingleForeignMessage); |
| 1227 } |
| 1228 if (other.singleImportMessage_ != null) { |
| 1229 if (singleImportMessage_ == null) { |
| 1230 singleImportMessage_ = new global::Google.Protobuf.TestProtos.ImportMe
ssage(); |
| 1231 } |
| 1232 SingleImportMessage.MergeFrom(other.SingleImportMessage); |
| 1233 } |
| 1234 if (other.SingleNestedEnum != global::Google.Protobuf.TestProtos.TestAllTy
pes.Types.NestedEnum.NESTED_ENUM_UNSPECIFIED) { |
| 1235 SingleNestedEnum = other.SingleNestedEnum; |
| 1236 } |
| 1237 if (other.SingleForeignEnum != global::Google.Protobuf.TestProtos.ForeignE
num.FOREIGN_UNSPECIFIED) { |
| 1238 SingleForeignEnum = other.SingleForeignEnum; |
| 1239 } |
| 1240 if (other.SingleImportEnum != global::Google.Protobuf.TestProtos.ImportEnu
m.IMPORT_ENUM_UNSPECIFIED) { |
| 1241 SingleImportEnum = other.SingleImportEnum; |
| 1242 } |
| 1243 if (other.singlePublicImportMessage_ != null) { |
| 1244 if (singlePublicImportMessage_ == null) { |
| 1245 singlePublicImportMessage_ = new global::Google.Protobuf.TestProtos.Pu
blicImportMessage(); |
| 1246 } |
| 1247 SinglePublicImportMessage.MergeFrom(other.SinglePublicImportMessage); |
| 1248 } |
| 1249 repeatedInt32_.Add(other.repeatedInt32_); |
| 1250 repeatedInt64_.Add(other.repeatedInt64_); |
| 1251 repeatedUint32_.Add(other.repeatedUint32_); |
| 1252 repeatedUint64_.Add(other.repeatedUint64_); |
| 1253 repeatedSint32_.Add(other.repeatedSint32_); |
| 1254 repeatedSint64_.Add(other.repeatedSint64_); |
| 1255 repeatedFixed32_.Add(other.repeatedFixed32_); |
| 1256 repeatedFixed64_.Add(other.repeatedFixed64_); |
| 1257 repeatedSfixed32_.Add(other.repeatedSfixed32_); |
| 1258 repeatedSfixed64_.Add(other.repeatedSfixed64_); |
| 1259 repeatedFloat_.Add(other.repeatedFloat_); |
| 1260 repeatedDouble_.Add(other.repeatedDouble_); |
| 1261 repeatedBool_.Add(other.repeatedBool_); |
| 1262 repeatedString_.Add(other.repeatedString_); |
| 1263 repeatedBytes_.Add(other.repeatedBytes_); |
| 1264 repeatedNestedMessage_.Add(other.repeatedNestedMessage_); |
| 1265 repeatedForeignMessage_.Add(other.repeatedForeignMessage_); |
| 1266 repeatedImportMessage_.Add(other.repeatedImportMessage_); |
| 1267 repeatedNestedEnum_.Add(other.repeatedNestedEnum_); |
| 1268 repeatedForeignEnum_.Add(other.repeatedForeignEnum_); |
| 1269 repeatedImportEnum_.Add(other.repeatedImportEnum_); |
| 1270 repeatedPublicImportMessage_.Add(other.repeatedPublicImportMessage_); |
| 1271 switch (other.OneofFieldCase) { |
| 1272 case OneofFieldOneofCase.OneofUint32: |
| 1273 OneofUint32 = other.OneofUint32; |
| 1274 break; |
| 1275 case OneofFieldOneofCase.OneofNestedMessage: |
| 1276 OneofNestedMessage = other.OneofNestedMessage; |
| 1277 break; |
| 1278 case OneofFieldOneofCase.OneofString: |
| 1279 OneofString = other.OneofString; |
| 1280 break; |
| 1281 case OneofFieldOneofCase.OneofBytes: |
| 1282 OneofBytes = other.OneofBytes; |
| 1283 break; |
| 1284 } |
| 1285 |
| 1286 } |
| 1287 |
| 1288 public void MergeFrom(pb::CodedInputStream input) { |
| 1289 uint tag; |
| 1290 while ((tag = input.ReadTag()) != 0) { |
| 1291 switch(tag) { |
| 1292 default: |
| 1293 input.SkipLastField(); |
| 1294 break; |
| 1295 case 8: { |
| 1296 SingleInt32 = input.ReadInt32(); |
| 1297 break; |
| 1298 } |
| 1299 case 16: { |
| 1300 SingleInt64 = input.ReadInt64(); |
| 1301 break; |
| 1302 } |
| 1303 case 24: { |
| 1304 SingleUint32 = input.ReadUInt32(); |
| 1305 break; |
| 1306 } |
| 1307 case 32: { |
| 1308 SingleUint64 = input.ReadUInt64(); |
| 1309 break; |
| 1310 } |
| 1311 case 40: { |
| 1312 SingleSint32 = input.ReadSInt32(); |
| 1313 break; |
| 1314 } |
| 1315 case 48: { |
| 1316 SingleSint64 = input.ReadSInt64(); |
| 1317 break; |
| 1318 } |
| 1319 case 61: { |
| 1320 SingleFixed32 = input.ReadFixed32(); |
| 1321 break; |
| 1322 } |
| 1323 case 65: { |
| 1324 SingleFixed64 = input.ReadFixed64(); |
| 1325 break; |
| 1326 } |
| 1327 case 77: { |
| 1328 SingleSfixed32 = input.ReadSFixed32(); |
| 1329 break; |
| 1330 } |
| 1331 case 81: { |
| 1332 SingleSfixed64 = input.ReadSFixed64(); |
| 1333 break; |
| 1334 } |
| 1335 case 93: { |
| 1336 SingleFloat = input.ReadFloat(); |
| 1337 break; |
| 1338 } |
| 1339 case 97: { |
| 1340 SingleDouble = input.ReadDouble(); |
| 1341 break; |
| 1342 } |
| 1343 case 104: { |
| 1344 SingleBool = input.ReadBool(); |
| 1345 break; |
| 1346 } |
| 1347 case 114: { |
| 1348 SingleString = input.ReadString(); |
| 1349 break; |
| 1350 } |
| 1351 case 122: { |
| 1352 SingleBytes = input.ReadBytes(); |
| 1353 break; |
| 1354 } |
| 1355 case 146: { |
| 1356 if (singleNestedMessage_ == null) { |
| 1357 singleNestedMessage_ = new global::Google.Protobuf.TestProtos.Test
AllTypes.Types.NestedMessage(); |
| 1358 } |
| 1359 input.ReadMessage(singleNestedMessage_); |
| 1360 break; |
| 1361 } |
| 1362 case 154: { |
| 1363 if (singleForeignMessage_ == null) { |
| 1364 singleForeignMessage_ = new global::Google.Protobuf.TestProtos.For
eignMessage(); |
| 1365 } |
| 1366 input.ReadMessage(singleForeignMessage_); |
| 1367 break; |
| 1368 } |
| 1369 case 162: { |
| 1370 if (singleImportMessage_ == null) { |
| 1371 singleImportMessage_ = new global::Google.Protobuf.TestProtos.Impo
rtMessage(); |
| 1372 } |
| 1373 input.ReadMessage(singleImportMessage_); |
| 1374 break; |
| 1375 } |
| 1376 case 168: { |
| 1377 singleNestedEnum_ = (global::Google.Protobuf.TestProtos.TestAllTypes
.Types.NestedEnum) input.ReadEnum(); |
| 1378 break; |
| 1379 } |
| 1380 case 176: { |
| 1381 singleForeignEnum_ = (global::Google.Protobuf.TestProtos.ForeignEnum
) input.ReadEnum(); |
| 1382 break; |
| 1383 } |
| 1384 case 184: { |
| 1385 singleImportEnum_ = (global::Google.Protobuf.TestProtos.ImportEnum)
input.ReadEnum(); |
| 1386 break; |
| 1387 } |
| 1388 case 210: { |
| 1389 if (singlePublicImportMessage_ == null) { |
| 1390 singlePublicImportMessage_ = new global::Google.Protobuf.TestProto
s.PublicImportMessage(); |
| 1391 } |
| 1392 input.ReadMessage(singlePublicImportMessage_); |
| 1393 break; |
| 1394 } |
| 1395 case 250: |
| 1396 case 248: { |
| 1397 repeatedInt32_.AddEntriesFrom(input, _repeated_repeatedInt32_codec); |
| 1398 break; |
| 1399 } |
| 1400 case 258: |
| 1401 case 256: { |
| 1402 repeatedInt64_.AddEntriesFrom(input, _repeated_repeatedInt64_codec); |
| 1403 break; |
| 1404 } |
| 1405 case 266: |
| 1406 case 264: { |
| 1407 repeatedUint32_.AddEntriesFrom(input, _repeated_repeatedUint32_codec
); |
| 1408 break; |
| 1409 } |
| 1410 case 274: |
| 1411 case 272: { |
| 1412 repeatedUint64_.AddEntriesFrom(input, _repeated_repeatedUint64_codec
); |
| 1413 break; |
| 1414 } |
| 1415 case 282: |
| 1416 case 280: { |
| 1417 repeatedSint32_.AddEntriesFrom(input, _repeated_repeatedSint32_codec
); |
| 1418 break; |
| 1419 } |
| 1420 case 290: |
| 1421 case 288: { |
| 1422 repeatedSint64_.AddEntriesFrom(input, _repeated_repeatedSint64_codec
); |
| 1423 break; |
| 1424 } |
| 1425 case 298: |
| 1426 case 301: { |
| 1427 repeatedFixed32_.AddEntriesFrom(input, _repeated_repeatedFixed32_cod
ec); |
| 1428 break; |
| 1429 } |
| 1430 case 306: |
| 1431 case 305: { |
| 1432 repeatedFixed64_.AddEntriesFrom(input, _repeated_repeatedFixed64_cod
ec); |
| 1433 break; |
| 1434 } |
| 1435 case 314: |
| 1436 case 317: { |
| 1437 repeatedSfixed32_.AddEntriesFrom(input, _repeated_repeatedSfixed32_c
odec); |
| 1438 break; |
| 1439 } |
| 1440 case 322: |
| 1441 case 321: { |
| 1442 repeatedSfixed64_.AddEntriesFrom(input, _repeated_repeatedSfixed64_c
odec); |
| 1443 break; |
| 1444 } |
| 1445 case 330: |
| 1446 case 333: { |
| 1447 repeatedFloat_.AddEntriesFrom(input, _repeated_repeatedFloat_codec); |
| 1448 break; |
| 1449 } |
| 1450 case 338: |
| 1451 case 337: { |
| 1452 repeatedDouble_.AddEntriesFrom(input, _repeated_repeatedDouble_codec
); |
| 1453 break; |
| 1454 } |
| 1455 case 346: |
| 1456 case 344: { |
| 1457 repeatedBool_.AddEntriesFrom(input, _repeated_repeatedBool_codec); |
| 1458 break; |
| 1459 } |
| 1460 case 354: { |
| 1461 repeatedString_.AddEntriesFrom(input, _repeated_repeatedString_codec
); |
| 1462 break; |
| 1463 } |
| 1464 case 362: { |
| 1465 repeatedBytes_.AddEntriesFrom(input, _repeated_repeatedBytes_codec); |
| 1466 break; |
| 1467 } |
| 1468 case 386: { |
| 1469 repeatedNestedMessage_.AddEntriesFrom(input, _repeated_repeatedNeste
dMessage_codec); |
| 1470 break; |
| 1471 } |
| 1472 case 394: { |
| 1473 repeatedForeignMessage_.AddEntriesFrom(input, _repeated_repeatedFore
ignMessage_codec); |
| 1474 break; |
| 1475 } |
| 1476 case 402: { |
| 1477 repeatedImportMessage_.AddEntriesFrom(input, _repeated_repeatedImpor
tMessage_codec); |
| 1478 break; |
| 1479 } |
| 1480 case 410: |
| 1481 case 408: { |
| 1482 repeatedNestedEnum_.AddEntriesFrom(input, _repeated_repeatedNestedEn
um_codec); |
| 1483 break; |
| 1484 } |
| 1485 case 418: |
| 1486 case 416: { |
| 1487 repeatedForeignEnum_.AddEntriesFrom(input, _repeated_repeatedForeign
Enum_codec); |
| 1488 break; |
| 1489 } |
| 1490 case 426: |
| 1491 case 424: { |
| 1492 repeatedImportEnum_.AddEntriesFrom(input, _repeated_repeatedImportEn
um_codec); |
| 1493 break; |
| 1494 } |
| 1495 case 434: { |
| 1496 repeatedPublicImportMessage_.AddEntriesFrom(input, _repeated_repeate
dPublicImportMessage_codec); |
| 1497 break; |
| 1498 } |
| 1499 case 888: { |
| 1500 OneofUint32 = input.ReadUInt32(); |
| 1501 break; |
| 1502 } |
| 1503 case 898: { |
| 1504 global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage
subBuilder = new global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMes
sage(); |
| 1505 if (oneofFieldCase_ == OneofFieldOneofCase.OneofNestedMessage) { |
| 1506 subBuilder.MergeFrom(OneofNestedMessage); |
| 1507 } |
| 1508 input.ReadMessage(subBuilder); |
| 1509 OneofNestedMessage = subBuilder; |
| 1510 break; |
| 1511 } |
| 1512 case 906: { |
| 1513 OneofString = input.ReadString(); |
| 1514 break; |
| 1515 } |
| 1516 case 914: { |
| 1517 OneofBytes = input.ReadBytes(); |
| 1518 break; |
| 1519 } |
| 1520 } |
| 1521 } |
| 1522 } |
| 1523 |
| 1524 #region Nested types |
| 1525 /// <summary>Container for nested types declared in the TestAllTypes message
type.</summary> |
| 1526 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 1527 public static partial class Types { |
| 1528 public enum NestedEnum { |
| 1529 NESTED_ENUM_UNSPECIFIED = 0, |
| 1530 FOO = 1, |
| 1531 BAR = 2, |
| 1532 BAZ = 3, |
| 1533 /// <summary> |
| 1534 /// Intentionally negative. |
| 1535 /// </summary> |
| 1536 NEG = -1, |
| 1537 } |
| 1538 |
| 1539 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 1540 public sealed partial class NestedMessage : pb::IMessage<NestedMessage> { |
| 1541 private static readonly pb::MessageParser<NestedMessage> _parser = new p
b::MessageParser<NestedMessage>(() => new NestedMessage()); |
| 1542 public static pb::MessageParser<NestedMessage> Parser { get { return _pa
rser; } } |
| 1543 |
| 1544 public static pbr::MessageDescriptor Descriptor { |
| 1545 get { return global::Google.Protobuf.TestProtos.TestAllTypes.Descripto
r.NestedTypes[0]; } |
| 1546 } |
| 1547 |
| 1548 pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 1549 get { return Descriptor; } |
| 1550 } |
| 1551 |
| 1552 public NestedMessage() { |
| 1553 OnConstruction(); |
| 1554 } |
| 1555 |
| 1556 partial void OnConstruction(); |
| 1557 |
| 1558 public NestedMessage(NestedMessage other) : this() { |
| 1559 bb_ = other.bb_; |
| 1560 } |
| 1561 |
| 1562 public NestedMessage Clone() { |
| 1563 return new NestedMessage(this); |
| 1564 } |
| 1565 |
| 1566 /// <summary>Field number for the "bb" field.</summary> |
| 1567 public const int BbFieldNumber = 1; |
| 1568 private int bb_; |
| 1569 /// <summary> |
| 1570 /// The field name "b" fails to compile in proto1 because it conflicts
with |
| 1571 /// a local variable named "b" in one of the generated methods. Doh. |
| 1572 /// This file needs to compile in proto1 to test backwards-compatibilit
y. |
| 1573 /// </summary> |
| 1574 public int Bb { |
| 1575 get { return bb_; } |
| 1576 set { |
| 1577 bb_ = value; |
| 1578 } |
| 1579 } |
| 1580 |
| 1581 public override bool Equals(object other) { |
| 1582 return Equals(other as NestedMessage); |
| 1583 } |
| 1584 |
| 1585 public bool Equals(NestedMessage other) { |
| 1586 if (ReferenceEquals(other, null)) { |
| 1587 return false; |
| 1588 } |
| 1589 if (ReferenceEquals(other, this)) { |
| 1590 return true; |
| 1591 } |
| 1592 if (Bb != other.Bb) return false; |
| 1593 return true; |
| 1594 } |
| 1595 |
| 1596 public override int GetHashCode() { |
| 1597 int hash = 1; |
| 1598 if (Bb != 0) hash ^= Bb.GetHashCode(); |
| 1599 return hash; |
| 1600 } |
| 1601 |
| 1602 public override string ToString() { |
| 1603 return pb::JsonFormatter.ToDiagnosticString(this); |
| 1604 } |
| 1605 |
| 1606 public void WriteTo(pb::CodedOutputStream output) { |
| 1607 if (Bb != 0) { |
| 1608 output.WriteRawTag(8); |
| 1609 output.WriteInt32(Bb); |
| 1610 } |
| 1611 } |
| 1612 |
| 1613 public int CalculateSize() { |
| 1614 int size = 0; |
| 1615 if (Bb != 0) { |
| 1616 size += 1 + pb::CodedOutputStream.ComputeInt32Size(Bb); |
| 1617 } |
| 1618 return size; |
| 1619 } |
| 1620 |
| 1621 public void MergeFrom(NestedMessage other) { |
| 1622 if (other == null) { |
| 1623 return; |
| 1624 } |
| 1625 if (other.Bb != 0) { |
| 1626 Bb = other.Bb; |
| 1627 } |
| 1628 } |
| 1629 |
| 1630 public void MergeFrom(pb::CodedInputStream input) { |
| 1631 uint tag; |
| 1632 while ((tag = input.ReadTag()) != 0) { |
| 1633 switch(tag) { |
| 1634 default: |
| 1635 input.SkipLastField(); |
| 1636 break; |
| 1637 case 8: { |
| 1638 Bb = input.ReadInt32(); |
| 1639 break; |
| 1640 } |
| 1641 } |
| 1642 } |
| 1643 } |
| 1644 |
| 1645 } |
| 1646 |
| 1647 } |
| 1648 #endregion |
| 1649 |
| 1650 } |
| 1651 |
| 1652 /// <summary> |
| 1653 /// This proto includes a recusively nested message. |
| 1654 /// </summary> |
| 1655 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 1656 public sealed partial class NestedTestAllTypes : pb::IMessage<NestedTestAllTyp
es> { |
| 1657 private static readonly pb::MessageParser<NestedTestAllTypes> _parser = new
pb::MessageParser<NestedTestAllTypes>(() => new NestedTestAllTypes()); |
| 1658 public static pb::MessageParser<NestedTestAllTypes> Parser { get { return _p
arser; } } |
| 1659 |
| 1660 public static pbr::MessageDescriptor Descriptor { |
| 1661 get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.D
escriptor.MessageTypes[1]; } |
| 1662 } |
| 1663 |
| 1664 pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 1665 get { return Descriptor; } |
| 1666 } |
| 1667 |
| 1668 public NestedTestAllTypes() { |
| 1669 OnConstruction(); |
| 1670 } |
| 1671 |
| 1672 partial void OnConstruction(); |
| 1673 |
| 1674 public NestedTestAllTypes(NestedTestAllTypes other) : this() { |
| 1675 Child = other.child_ != null ? other.Child.Clone() : null; |
| 1676 Payload = other.payload_ != null ? other.Payload.Clone() : null; |
| 1677 repeatedChild_ = other.repeatedChild_.Clone(); |
| 1678 } |
| 1679 |
| 1680 public NestedTestAllTypes Clone() { |
| 1681 return new NestedTestAllTypes(this); |
| 1682 } |
| 1683 |
| 1684 /// <summary>Field number for the "child" field.</summary> |
| 1685 public const int ChildFieldNumber = 1; |
| 1686 private global::Google.Protobuf.TestProtos.NestedTestAllTypes child_; |
| 1687 public global::Google.Protobuf.TestProtos.NestedTestAllTypes Child { |
| 1688 get { return child_; } |
| 1689 set { |
| 1690 child_ = value; |
| 1691 } |
| 1692 } |
| 1693 |
| 1694 /// <summary>Field number for the "payload" field.</summary> |
| 1695 public const int PayloadFieldNumber = 2; |
| 1696 private global::Google.Protobuf.TestProtos.TestAllTypes payload_; |
| 1697 public global::Google.Protobuf.TestProtos.TestAllTypes Payload { |
| 1698 get { return payload_; } |
| 1699 set { |
| 1700 payload_ = value; |
| 1701 } |
| 1702 } |
| 1703 |
| 1704 /// <summary>Field number for the "repeated_child" field.</summary> |
| 1705 public const int RepeatedChildFieldNumber = 3; |
| 1706 private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.Ne
stedTestAllTypes> _repeated_repeatedChild_codec |
| 1707 = pb::FieldCodec.ForMessage(26, global::Google.Protobuf.TestProtos.Neste
dTestAllTypes.Parser); |
| 1708 private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.Neste
dTestAllTypes> repeatedChild_ = new pbc::RepeatedField<global::Google.Protobuf.T
estProtos.NestedTestAllTypes>(); |
| 1709 public pbc::RepeatedField<global::Google.Protobuf.TestProtos.NestedTestAllTy
pes> RepeatedChild { |
| 1710 get { return repeatedChild_; } |
| 1711 } |
| 1712 |
| 1713 public override bool Equals(object other) { |
| 1714 return Equals(other as NestedTestAllTypes); |
| 1715 } |
| 1716 |
| 1717 public bool Equals(NestedTestAllTypes other) { |
| 1718 if (ReferenceEquals(other, null)) { |
| 1719 return false; |
| 1720 } |
| 1721 if (ReferenceEquals(other, this)) { |
| 1722 return true; |
| 1723 } |
| 1724 if (!object.Equals(Child, other.Child)) return false; |
| 1725 if (!object.Equals(Payload, other.Payload)) return false; |
| 1726 if(!repeatedChild_.Equals(other.repeatedChild_)) return false; |
| 1727 return true; |
| 1728 } |
| 1729 |
| 1730 public override int GetHashCode() { |
| 1731 int hash = 1; |
| 1732 if (child_ != null) hash ^= Child.GetHashCode(); |
| 1733 if (payload_ != null) hash ^= Payload.GetHashCode(); |
| 1734 hash ^= repeatedChild_.GetHashCode(); |
| 1735 return hash; |
| 1736 } |
| 1737 |
| 1738 public override string ToString() { |
| 1739 return pb::JsonFormatter.ToDiagnosticString(this); |
| 1740 } |
| 1741 |
| 1742 public void WriteTo(pb::CodedOutputStream output) { |
| 1743 if (child_ != null) { |
| 1744 output.WriteRawTag(10); |
| 1745 output.WriteMessage(Child); |
| 1746 } |
| 1747 if (payload_ != null) { |
| 1748 output.WriteRawTag(18); |
| 1749 output.WriteMessage(Payload); |
| 1750 } |
| 1751 repeatedChild_.WriteTo(output, _repeated_repeatedChild_codec); |
| 1752 } |
| 1753 |
| 1754 public int CalculateSize() { |
| 1755 int size = 0; |
| 1756 if (child_ != null) { |
| 1757 size += 1 + pb::CodedOutputStream.ComputeMessageSize(Child); |
| 1758 } |
| 1759 if (payload_ != null) { |
| 1760 size += 1 + pb::CodedOutputStream.ComputeMessageSize(Payload); |
| 1761 } |
| 1762 size += repeatedChild_.CalculateSize(_repeated_repeatedChild_codec); |
| 1763 return size; |
| 1764 } |
| 1765 |
| 1766 public void MergeFrom(NestedTestAllTypes other) { |
| 1767 if (other == null) { |
| 1768 return; |
| 1769 } |
| 1770 if (other.child_ != null) { |
| 1771 if (child_ == null) { |
| 1772 child_ = new global::Google.Protobuf.TestProtos.NestedTestAllTypes(); |
| 1773 } |
| 1774 Child.MergeFrom(other.Child); |
| 1775 } |
| 1776 if (other.payload_ != null) { |
| 1777 if (payload_ == null) { |
| 1778 payload_ = new global::Google.Protobuf.TestProtos.TestAllTypes(); |
| 1779 } |
| 1780 Payload.MergeFrom(other.Payload); |
| 1781 } |
| 1782 repeatedChild_.Add(other.repeatedChild_); |
| 1783 } |
| 1784 |
| 1785 public void MergeFrom(pb::CodedInputStream input) { |
| 1786 uint tag; |
| 1787 while ((tag = input.ReadTag()) != 0) { |
| 1788 switch(tag) { |
| 1789 default: |
| 1790 input.SkipLastField(); |
| 1791 break; |
| 1792 case 10: { |
| 1793 if (child_ == null) { |
| 1794 child_ = new global::Google.Protobuf.TestProtos.NestedTestAllTypes
(); |
| 1795 } |
| 1796 input.ReadMessage(child_); |
| 1797 break; |
| 1798 } |
| 1799 case 18: { |
| 1800 if (payload_ == null) { |
| 1801 payload_ = new global::Google.Protobuf.TestProtos.TestAllTypes(); |
| 1802 } |
| 1803 input.ReadMessage(payload_); |
| 1804 break; |
| 1805 } |
| 1806 case 26: { |
| 1807 repeatedChild_.AddEntriesFrom(input, _repeated_repeatedChild_codec); |
| 1808 break; |
| 1809 } |
| 1810 } |
| 1811 } |
| 1812 } |
| 1813 |
| 1814 } |
| 1815 |
| 1816 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 1817 public sealed partial class TestDeprecatedFields : pb::IMessage<TestDeprecated
Fields> { |
| 1818 private static readonly pb::MessageParser<TestDeprecatedFields> _parser = ne
w pb::MessageParser<TestDeprecatedFields>(() => new TestDeprecatedFields()); |
| 1819 public static pb::MessageParser<TestDeprecatedFields> Parser { get { return
_parser; } } |
| 1820 |
| 1821 public static pbr::MessageDescriptor Descriptor { |
| 1822 get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.D
escriptor.MessageTypes[2]; } |
| 1823 } |
| 1824 |
| 1825 pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 1826 get { return Descriptor; } |
| 1827 } |
| 1828 |
| 1829 public TestDeprecatedFields() { |
| 1830 OnConstruction(); |
| 1831 } |
| 1832 |
| 1833 partial void OnConstruction(); |
| 1834 |
| 1835 public TestDeprecatedFields(TestDeprecatedFields other) : this() { |
| 1836 deprecatedInt32_ = other.deprecatedInt32_; |
| 1837 } |
| 1838 |
| 1839 public TestDeprecatedFields Clone() { |
| 1840 return new TestDeprecatedFields(this); |
| 1841 } |
| 1842 |
| 1843 /// <summary>Field number for the "deprecated_int32" field.</summary> |
| 1844 public const int DeprecatedInt32FieldNumber = 1; |
| 1845 private int deprecatedInt32_; |
| 1846 [global::System.ObsoleteAttribute()] |
| 1847 public int DeprecatedInt32 { |
| 1848 get { return deprecatedInt32_; } |
| 1849 set { |
| 1850 deprecatedInt32_ = value; |
| 1851 } |
| 1852 } |
| 1853 |
| 1854 public override bool Equals(object other) { |
| 1855 return Equals(other as TestDeprecatedFields); |
| 1856 } |
| 1857 |
| 1858 public bool Equals(TestDeprecatedFields other) { |
| 1859 if (ReferenceEquals(other, null)) { |
| 1860 return false; |
| 1861 } |
| 1862 if (ReferenceEquals(other, this)) { |
| 1863 return true; |
| 1864 } |
| 1865 if (DeprecatedInt32 != other.DeprecatedInt32) return false; |
| 1866 return true; |
| 1867 } |
| 1868 |
| 1869 public override int GetHashCode() { |
| 1870 int hash = 1; |
| 1871 if (DeprecatedInt32 != 0) hash ^= DeprecatedInt32.GetHashCode(); |
| 1872 return hash; |
| 1873 } |
| 1874 |
| 1875 public override string ToString() { |
| 1876 return pb::JsonFormatter.ToDiagnosticString(this); |
| 1877 } |
| 1878 |
| 1879 public void WriteTo(pb::CodedOutputStream output) { |
| 1880 if (DeprecatedInt32 != 0) { |
| 1881 output.WriteRawTag(8); |
| 1882 output.WriteInt32(DeprecatedInt32); |
| 1883 } |
| 1884 } |
| 1885 |
| 1886 public int CalculateSize() { |
| 1887 int size = 0; |
| 1888 if (DeprecatedInt32 != 0) { |
| 1889 size += 1 + pb::CodedOutputStream.ComputeInt32Size(DeprecatedInt32); |
| 1890 } |
| 1891 return size; |
| 1892 } |
| 1893 |
| 1894 public void MergeFrom(TestDeprecatedFields other) { |
| 1895 if (other == null) { |
| 1896 return; |
| 1897 } |
| 1898 if (other.DeprecatedInt32 != 0) { |
| 1899 DeprecatedInt32 = other.DeprecatedInt32; |
| 1900 } |
| 1901 } |
| 1902 |
| 1903 public void MergeFrom(pb::CodedInputStream input) { |
| 1904 uint tag; |
| 1905 while ((tag = input.ReadTag()) != 0) { |
| 1906 switch(tag) { |
| 1907 default: |
| 1908 input.SkipLastField(); |
| 1909 break; |
| 1910 case 8: { |
| 1911 DeprecatedInt32 = input.ReadInt32(); |
| 1912 break; |
| 1913 } |
| 1914 } |
| 1915 } |
| 1916 } |
| 1917 |
| 1918 } |
| 1919 |
| 1920 /// <summary> |
| 1921 /// Define these after TestAllTypes to make sure the compiler can handle |
| 1922 /// that. |
| 1923 /// </summary> |
| 1924 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 1925 public sealed partial class ForeignMessage : pb::IMessage<ForeignMessage> { |
| 1926 private static readonly pb::MessageParser<ForeignMessage> _parser = new pb::
MessageParser<ForeignMessage>(() => new ForeignMessage()); |
| 1927 public static pb::MessageParser<ForeignMessage> Parser { get { return _parse
r; } } |
| 1928 |
| 1929 public static pbr::MessageDescriptor Descriptor { |
| 1930 get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.D
escriptor.MessageTypes[3]; } |
| 1931 } |
| 1932 |
| 1933 pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 1934 get { return Descriptor; } |
| 1935 } |
| 1936 |
| 1937 public ForeignMessage() { |
| 1938 OnConstruction(); |
| 1939 } |
| 1940 |
| 1941 partial void OnConstruction(); |
| 1942 |
| 1943 public ForeignMessage(ForeignMessage other) : this() { |
| 1944 c_ = other.c_; |
| 1945 } |
| 1946 |
| 1947 public ForeignMessage Clone() { |
| 1948 return new ForeignMessage(this); |
| 1949 } |
| 1950 |
| 1951 /// <summary>Field number for the "c" field.</summary> |
| 1952 public const int CFieldNumber = 1; |
| 1953 private int c_; |
| 1954 public int C { |
| 1955 get { return c_; } |
| 1956 set { |
| 1957 c_ = value; |
| 1958 } |
| 1959 } |
| 1960 |
| 1961 public override bool Equals(object other) { |
| 1962 return Equals(other as ForeignMessage); |
| 1963 } |
| 1964 |
| 1965 public bool Equals(ForeignMessage other) { |
| 1966 if (ReferenceEquals(other, null)) { |
| 1967 return false; |
| 1968 } |
| 1969 if (ReferenceEquals(other, this)) { |
| 1970 return true; |
| 1971 } |
| 1972 if (C != other.C) return false; |
| 1973 return true; |
| 1974 } |
| 1975 |
| 1976 public override int GetHashCode() { |
| 1977 int hash = 1; |
| 1978 if (C != 0) hash ^= C.GetHashCode(); |
| 1979 return hash; |
| 1980 } |
| 1981 |
| 1982 public override string ToString() { |
| 1983 return pb::JsonFormatter.ToDiagnosticString(this); |
| 1984 } |
| 1985 |
| 1986 public void WriteTo(pb::CodedOutputStream output) { |
| 1987 if (C != 0) { |
| 1988 output.WriteRawTag(8); |
| 1989 output.WriteInt32(C); |
| 1990 } |
| 1991 } |
| 1992 |
| 1993 public int CalculateSize() { |
| 1994 int size = 0; |
| 1995 if (C != 0) { |
| 1996 size += 1 + pb::CodedOutputStream.ComputeInt32Size(C); |
| 1997 } |
| 1998 return size; |
| 1999 } |
| 2000 |
| 2001 public void MergeFrom(ForeignMessage other) { |
| 2002 if (other == null) { |
| 2003 return; |
| 2004 } |
| 2005 if (other.C != 0) { |
| 2006 C = other.C; |
| 2007 } |
| 2008 } |
| 2009 |
| 2010 public void MergeFrom(pb::CodedInputStream input) { |
| 2011 uint tag; |
| 2012 while ((tag = input.ReadTag()) != 0) { |
| 2013 switch(tag) { |
| 2014 default: |
| 2015 input.SkipLastField(); |
| 2016 break; |
| 2017 case 8: { |
| 2018 C = input.ReadInt32(); |
| 2019 break; |
| 2020 } |
| 2021 } |
| 2022 } |
| 2023 } |
| 2024 |
| 2025 } |
| 2026 |
| 2027 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 2028 public sealed partial class TestReservedFields : pb::IMessage<TestReservedFiel
ds> { |
| 2029 private static readonly pb::MessageParser<TestReservedFields> _parser = new
pb::MessageParser<TestReservedFields>(() => new TestReservedFields()); |
| 2030 public static pb::MessageParser<TestReservedFields> Parser { get { return _p
arser; } } |
| 2031 |
| 2032 public static pbr::MessageDescriptor Descriptor { |
| 2033 get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.D
escriptor.MessageTypes[4]; } |
| 2034 } |
| 2035 |
| 2036 pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 2037 get { return Descriptor; } |
| 2038 } |
| 2039 |
| 2040 public TestReservedFields() { |
| 2041 OnConstruction(); |
| 2042 } |
| 2043 |
| 2044 partial void OnConstruction(); |
| 2045 |
| 2046 public TestReservedFields(TestReservedFields other) : this() { |
| 2047 } |
| 2048 |
| 2049 public TestReservedFields Clone() { |
| 2050 return new TestReservedFields(this); |
| 2051 } |
| 2052 |
| 2053 public override bool Equals(object other) { |
| 2054 return Equals(other as TestReservedFields); |
| 2055 } |
| 2056 |
| 2057 public bool Equals(TestReservedFields other) { |
| 2058 if (ReferenceEquals(other, null)) { |
| 2059 return false; |
| 2060 } |
| 2061 if (ReferenceEquals(other, this)) { |
| 2062 return true; |
| 2063 } |
| 2064 return true; |
| 2065 } |
| 2066 |
| 2067 public override int GetHashCode() { |
| 2068 int hash = 1; |
| 2069 return hash; |
| 2070 } |
| 2071 |
| 2072 public override string ToString() { |
| 2073 return pb::JsonFormatter.ToDiagnosticString(this); |
| 2074 } |
| 2075 |
| 2076 public void WriteTo(pb::CodedOutputStream output) { |
| 2077 } |
| 2078 |
| 2079 public int CalculateSize() { |
| 2080 int size = 0; |
| 2081 return size; |
| 2082 } |
| 2083 |
| 2084 public void MergeFrom(TestReservedFields other) { |
| 2085 if (other == null) { |
| 2086 return; |
| 2087 } |
| 2088 } |
| 2089 |
| 2090 public void MergeFrom(pb::CodedInputStream input) { |
| 2091 uint tag; |
| 2092 while ((tag = input.ReadTag()) != 0) { |
| 2093 switch(tag) { |
| 2094 default: |
| 2095 input.SkipLastField(); |
| 2096 break; |
| 2097 } |
| 2098 } |
| 2099 } |
| 2100 |
| 2101 } |
| 2102 |
| 2103 /// <summary> |
| 2104 /// Test that we can use NestedMessage from outside TestAllTypes. |
| 2105 /// </summary> |
| 2106 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 2107 public sealed partial class TestForeignNested : pb::IMessage<TestForeignNested
> { |
| 2108 private static readonly pb::MessageParser<TestForeignNested> _parser = new p
b::MessageParser<TestForeignNested>(() => new TestForeignNested()); |
| 2109 public static pb::MessageParser<TestForeignNested> Parser { get { return _pa
rser; } } |
| 2110 |
| 2111 public static pbr::MessageDescriptor Descriptor { |
| 2112 get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.D
escriptor.MessageTypes[5]; } |
| 2113 } |
| 2114 |
| 2115 pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 2116 get { return Descriptor; } |
| 2117 } |
| 2118 |
| 2119 public TestForeignNested() { |
| 2120 OnConstruction(); |
| 2121 } |
| 2122 |
| 2123 partial void OnConstruction(); |
| 2124 |
| 2125 public TestForeignNested(TestForeignNested other) : this() { |
| 2126 ForeignNested = other.foreignNested_ != null ? other.ForeignNested.Clone()
: null; |
| 2127 } |
| 2128 |
| 2129 public TestForeignNested Clone() { |
| 2130 return new TestForeignNested(this); |
| 2131 } |
| 2132 |
| 2133 /// <summary>Field number for the "foreign_nested" field.</summary> |
| 2134 public const int ForeignNestedFieldNumber = 1; |
| 2135 private global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage
foreignNested_; |
| 2136 public global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage F
oreignNested { |
| 2137 get { return foreignNested_; } |
| 2138 set { |
| 2139 foreignNested_ = value; |
| 2140 } |
| 2141 } |
| 2142 |
| 2143 public override bool Equals(object other) { |
| 2144 return Equals(other as TestForeignNested); |
| 2145 } |
| 2146 |
| 2147 public bool Equals(TestForeignNested other) { |
| 2148 if (ReferenceEquals(other, null)) { |
| 2149 return false; |
| 2150 } |
| 2151 if (ReferenceEquals(other, this)) { |
| 2152 return true; |
| 2153 } |
| 2154 if (!object.Equals(ForeignNested, other.ForeignNested)) return false; |
| 2155 return true; |
| 2156 } |
| 2157 |
| 2158 public override int GetHashCode() { |
| 2159 int hash = 1; |
| 2160 if (foreignNested_ != null) hash ^= ForeignNested.GetHashCode(); |
| 2161 return hash; |
| 2162 } |
| 2163 |
| 2164 public override string ToString() { |
| 2165 return pb::JsonFormatter.ToDiagnosticString(this); |
| 2166 } |
| 2167 |
| 2168 public void WriteTo(pb::CodedOutputStream output) { |
| 2169 if (foreignNested_ != null) { |
| 2170 output.WriteRawTag(10); |
| 2171 output.WriteMessage(ForeignNested); |
| 2172 } |
| 2173 } |
| 2174 |
| 2175 public int CalculateSize() { |
| 2176 int size = 0; |
| 2177 if (foreignNested_ != null) { |
| 2178 size += 1 + pb::CodedOutputStream.ComputeMessageSize(ForeignNested); |
| 2179 } |
| 2180 return size; |
| 2181 } |
| 2182 |
| 2183 public void MergeFrom(TestForeignNested other) { |
| 2184 if (other == null) { |
| 2185 return; |
| 2186 } |
| 2187 if (other.foreignNested_ != null) { |
| 2188 if (foreignNested_ == null) { |
| 2189 foreignNested_ = new global::Google.Protobuf.TestProtos.TestAllTypes.T
ypes.NestedMessage(); |
| 2190 } |
| 2191 ForeignNested.MergeFrom(other.ForeignNested); |
| 2192 } |
| 2193 } |
| 2194 |
| 2195 public void MergeFrom(pb::CodedInputStream input) { |
| 2196 uint tag; |
| 2197 while ((tag = input.ReadTag()) != 0) { |
| 2198 switch(tag) { |
| 2199 default: |
| 2200 input.SkipLastField(); |
| 2201 break; |
| 2202 case 10: { |
| 2203 if (foreignNested_ == null) { |
| 2204 foreignNested_ = new global::Google.Protobuf.TestProtos.TestAllTyp
es.Types.NestedMessage(); |
| 2205 } |
| 2206 input.ReadMessage(foreignNested_); |
| 2207 break; |
| 2208 } |
| 2209 } |
| 2210 } |
| 2211 } |
| 2212 |
| 2213 } |
| 2214 |
| 2215 /// <summary> |
| 2216 /// Test that really large tag numbers don't break anything. |
| 2217 /// </summary> |
| 2218 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 2219 public sealed partial class TestReallyLargeTagNumber : pb::IMessage<TestReally
LargeTagNumber> { |
| 2220 private static readonly pb::MessageParser<TestReallyLargeTagNumber> _parser
= new pb::MessageParser<TestReallyLargeTagNumber>(() => new TestReallyLargeTagNu
mber()); |
| 2221 public static pb::MessageParser<TestReallyLargeTagNumber> Parser { get { ret
urn _parser; } } |
| 2222 |
| 2223 public static pbr::MessageDescriptor Descriptor { |
| 2224 get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.D
escriptor.MessageTypes[6]; } |
| 2225 } |
| 2226 |
| 2227 pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 2228 get { return Descriptor; } |
| 2229 } |
| 2230 |
| 2231 public TestReallyLargeTagNumber() { |
| 2232 OnConstruction(); |
| 2233 } |
| 2234 |
| 2235 partial void OnConstruction(); |
| 2236 |
| 2237 public TestReallyLargeTagNumber(TestReallyLargeTagNumber other) : this() { |
| 2238 a_ = other.a_; |
| 2239 bb_ = other.bb_; |
| 2240 } |
| 2241 |
| 2242 public TestReallyLargeTagNumber Clone() { |
| 2243 return new TestReallyLargeTagNumber(this); |
| 2244 } |
| 2245 |
| 2246 /// <summary>Field number for the "a" field.</summary> |
| 2247 public const int AFieldNumber = 1; |
| 2248 private int a_; |
| 2249 /// <summary> |
| 2250 /// The largest possible tag number is 2^28 - 1, since the wire format uses |
| 2251 /// three bits to communicate wire type. |
| 2252 /// </summary> |
| 2253 public int A { |
| 2254 get { return a_; } |
| 2255 set { |
| 2256 a_ = value; |
| 2257 } |
| 2258 } |
| 2259 |
| 2260 /// <summary>Field number for the "bb" field.</summary> |
| 2261 public const int BbFieldNumber = 268435455; |
| 2262 private int bb_; |
| 2263 public int Bb { |
| 2264 get { return bb_; } |
| 2265 set { |
| 2266 bb_ = value; |
| 2267 } |
| 2268 } |
| 2269 |
| 2270 public override bool Equals(object other) { |
| 2271 return Equals(other as TestReallyLargeTagNumber); |
| 2272 } |
| 2273 |
| 2274 public bool Equals(TestReallyLargeTagNumber other) { |
| 2275 if (ReferenceEquals(other, null)) { |
| 2276 return false; |
| 2277 } |
| 2278 if (ReferenceEquals(other, this)) { |
| 2279 return true; |
| 2280 } |
| 2281 if (A != other.A) return false; |
| 2282 if (Bb != other.Bb) return false; |
| 2283 return true; |
| 2284 } |
| 2285 |
| 2286 public override int GetHashCode() { |
| 2287 int hash = 1; |
| 2288 if (A != 0) hash ^= A.GetHashCode(); |
| 2289 if (Bb != 0) hash ^= Bb.GetHashCode(); |
| 2290 return hash; |
| 2291 } |
| 2292 |
| 2293 public override string ToString() { |
| 2294 return pb::JsonFormatter.ToDiagnosticString(this); |
| 2295 } |
| 2296 |
| 2297 public void WriteTo(pb::CodedOutputStream output) { |
| 2298 if (A != 0) { |
| 2299 output.WriteRawTag(8); |
| 2300 output.WriteInt32(A); |
| 2301 } |
| 2302 if (Bb != 0) { |
| 2303 output.WriteRawTag(248, 255, 255, 255, 7); |
| 2304 output.WriteInt32(Bb); |
| 2305 } |
| 2306 } |
| 2307 |
| 2308 public int CalculateSize() { |
| 2309 int size = 0; |
| 2310 if (A != 0) { |
| 2311 size += 1 + pb::CodedOutputStream.ComputeInt32Size(A); |
| 2312 } |
| 2313 if (Bb != 0) { |
| 2314 size += 5 + pb::CodedOutputStream.ComputeInt32Size(Bb); |
| 2315 } |
| 2316 return size; |
| 2317 } |
| 2318 |
| 2319 public void MergeFrom(TestReallyLargeTagNumber other) { |
| 2320 if (other == null) { |
| 2321 return; |
| 2322 } |
| 2323 if (other.A != 0) { |
| 2324 A = other.A; |
| 2325 } |
| 2326 if (other.Bb != 0) { |
| 2327 Bb = other.Bb; |
| 2328 } |
| 2329 } |
| 2330 |
| 2331 public void MergeFrom(pb::CodedInputStream input) { |
| 2332 uint tag; |
| 2333 while ((tag = input.ReadTag()) != 0) { |
| 2334 switch(tag) { |
| 2335 default: |
| 2336 input.SkipLastField(); |
| 2337 break; |
| 2338 case 8: { |
| 2339 A = input.ReadInt32(); |
| 2340 break; |
| 2341 } |
| 2342 case 2147483640: { |
| 2343 Bb = input.ReadInt32(); |
| 2344 break; |
| 2345 } |
| 2346 } |
| 2347 } |
| 2348 } |
| 2349 |
| 2350 } |
| 2351 |
| 2352 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 2353 public sealed partial class TestRecursiveMessage : pb::IMessage<TestRecursiveM
essage> { |
| 2354 private static readonly pb::MessageParser<TestRecursiveMessage> _parser = ne
w pb::MessageParser<TestRecursiveMessage>(() => new TestRecursiveMessage()); |
| 2355 public static pb::MessageParser<TestRecursiveMessage> Parser { get { return
_parser; } } |
| 2356 |
| 2357 public static pbr::MessageDescriptor Descriptor { |
| 2358 get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.D
escriptor.MessageTypes[7]; } |
| 2359 } |
| 2360 |
| 2361 pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 2362 get { return Descriptor; } |
| 2363 } |
| 2364 |
| 2365 public TestRecursiveMessage() { |
| 2366 OnConstruction(); |
| 2367 } |
| 2368 |
| 2369 partial void OnConstruction(); |
| 2370 |
| 2371 public TestRecursiveMessage(TestRecursiveMessage other) : this() { |
| 2372 A = other.a_ != null ? other.A.Clone() : null; |
| 2373 i_ = other.i_; |
| 2374 } |
| 2375 |
| 2376 public TestRecursiveMessage Clone() { |
| 2377 return new TestRecursiveMessage(this); |
| 2378 } |
| 2379 |
| 2380 /// <summary>Field number for the "a" field.</summary> |
| 2381 public const int AFieldNumber = 1; |
| 2382 private global::Google.Protobuf.TestProtos.TestRecursiveMessage a_; |
| 2383 public global::Google.Protobuf.TestProtos.TestRecursiveMessage A { |
| 2384 get { return a_; } |
| 2385 set { |
| 2386 a_ = value; |
| 2387 } |
| 2388 } |
| 2389 |
| 2390 /// <summary>Field number for the "i" field.</summary> |
| 2391 public const int IFieldNumber = 2; |
| 2392 private int i_; |
| 2393 public int I { |
| 2394 get { return i_; } |
| 2395 set { |
| 2396 i_ = value; |
| 2397 } |
| 2398 } |
| 2399 |
| 2400 public override bool Equals(object other) { |
| 2401 return Equals(other as TestRecursiveMessage); |
| 2402 } |
| 2403 |
| 2404 public bool Equals(TestRecursiveMessage other) { |
| 2405 if (ReferenceEquals(other, null)) { |
| 2406 return false; |
| 2407 } |
| 2408 if (ReferenceEquals(other, this)) { |
| 2409 return true; |
| 2410 } |
| 2411 if (!object.Equals(A, other.A)) return false; |
| 2412 if (I != other.I) return false; |
| 2413 return true; |
| 2414 } |
| 2415 |
| 2416 public override int GetHashCode() { |
| 2417 int hash = 1; |
| 2418 if (a_ != null) hash ^= A.GetHashCode(); |
| 2419 if (I != 0) hash ^= I.GetHashCode(); |
| 2420 return hash; |
| 2421 } |
| 2422 |
| 2423 public override string ToString() { |
| 2424 return pb::JsonFormatter.ToDiagnosticString(this); |
| 2425 } |
| 2426 |
| 2427 public void WriteTo(pb::CodedOutputStream output) { |
| 2428 if (a_ != null) { |
| 2429 output.WriteRawTag(10); |
| 2430 output.WriteMessage(A); |
| 2431 } |
| 2432 if (I != 0) { |
| 2433 output.WriteRawTag(16); |
| 2434 output.WriteInt32(I); |
| 2435 } |
| 2436 } |
| 2437 |
| 2438 public int CalculateSize() { |
| 2439 int size = 0; |
| 2440 if (a_ != null) { |
| 2441 size += 1 + pb::CodedOutputStream.ComputeMessageSize(A); |
| 2442 } |
| 2443 if (I != 0) { |
| 2444 size += 1 + pb::CodedOutputStream.ComputeInt32Size(I); |
| 2445 } |
| 2446 return size; |
| 2447 } |
| 2448 |
| 2449 public void MergeFrom(TestRecursiveMessage other) { |
| 2450 if (other == null) { |
| 2451 return; |
| 2452 } |
| 2453 if (other.a_ != null) { |
| 2454 if (a_ == null) { |
| 2455 a_ = new global::Google.Protobuf.TestProtos.TestRecursiveMessage(); |
| 2456 } |
| 2457 A.MergeFrom(other.A); |
| 2458 } |
| 2459 if (other.I != 0) { |
| 2460 I = other.I; |
| 2461 } |
| 2462 } |
| 2463 |
| 2464 public void MergeFrom(pb::CodedInputStream input) { |
| 2465 uint tag; |
| 2466 while ((tag = input.ReadTag()) != 0) { |
| 2467 switch(tag) { |
| 2468 default: |
| 2469 input.SkipLastField(); |
| 2470 break; |
| 2471 case 10: { |
| 2472 if (a_ == null) { |
| 2473 a_ = new global::Google.Protobuf.TestProtos.TestRecursiveMessage()
; |
| 2474 } |
| 2475 input.ReadMessage(a_); |
| 2476 break; |
| 2477 } |
| 2478 case 16: { |
| 2479 I = input.ReadInt32(); |
| 2480 break; |
| 2481 } |
| 2482 } |
| 2483 } |
| 2484 } |
| 2485 |
| 2486 } |
| 2487 |
| 2488 /// <summary> |
| 2489 /// Test that mutual recursion works. |
| 2490 /// </summary> |
| 2491 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 2492 public sealed partial class TestMutualRecursionA : pb::IMessage<TestMutualRecu
rsionA> { |
| 2493 private static readonly pb::MessageParser<TestMutualRecursionA> _parser = ne
w pb::MessageParser<TestMutualRecursionA>(() => new TestMutualRecursionA()); |
| 2494 public static pb::MessageParser<TestMutualRecursionA> Parser { get { return
_parser; } } |
| 2495 |
| 2496 public static pbr::MessageDescriptor Descriptor { |
| 2497 get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.D
escriptor.MessageTypes[8]; } |
| 2498 } |
| 2499 |
| 2500 pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 2501 get { return Descriptor; } |
| 2502 } |
| 2503 |
| 2504 public TestMutualRecursionA() { |
| 2505 OnConstruction(); |
| 2506 } |
| 2507 |
| 2508 partial void OnConstruction(); |
| 2509 |
| 2510 public TestMutualRecursionA(TestMutualRecursionA other) : this() { |
| 2511 Bb = other.bb_ != null ? other.Bb.Clone() : null; |
| 2512 } |
| 2513 |
| 2514 public TestMutualRecursionA Clone() { |
| 2515 return new TestMutualRecursionA(this); |
| 2516 } |
| 2517 |
| 2518 /// <summary>Field number for the "bb" field.</summary> |
| 2519 public const int BbFieldNumber = 1; |
| 2520 private global::Google.Protobuf.TestProtos.TestMutualRecursionB bb_; |
| 2521 public global::Google.Protobuf.TestProtos.TestMutualRecursionB Bb { |
| 2522 get { return bb_; } |
| 2523 set { |
| 2524 bb_ = value; |
| 2525 } |
| 2526 } |
| 2527 |
| 2528 public override bool Equals(object other) { |
| 2529 return Equals(other as TestMutualRecursionA); |
| 2530 } |
| 2531 |
| 2532 public bool Equals(TestMutualRecursionA other) { |
| 2533 if (ReferenceEquals(other, null)) { |
| 2534 return false; |
| 2535 } |
| 2536 if (ReferenceEquals(other, this)) { |
| 2537 return true; |
| 2538 } |
| 2539 if (!object.Equals(Bb, other.Bb)) return false; |
| 2540 return true; |
| 2541 } |
| 2542 |
| 2543 public override int GetHashCode() { |
| 2544 int hash = 1; |
| 2545 if (bb_ != null) hash ^= Bb.GetHashCode(); |
| 2546 return hash; |
| 2547 } |
| 2548 |
| 2549 public override string ToString() { |
| 2550 return pb::JsonFormatter.ToDiagnosticString(this); |
| 2551 } |
| 2552 |
| 2553 public void WriteTo(pb::CodedOutputStream output) { |
| 2554 if (bb_ != null) { |
| 2555 output.WriteRawTag(10); |
| 2556 output.WriteMessage(Bb); |
| 2557 } |
| 2558 } |
| 2559 |
| 2560 public int CalculateSize() { |
| 2561 int size = 0; |
| 2562 if (bb_ != null) { |
| 2563 size += 1 + pb::CodedOutputStream.ComputeMessageSize(Bb); |
| 2564 } |
| 2565 return size; |
| 2566 } |
| 2567 |
| 2568 public void MergeFrom(TestMutualRecursionA other) { |
| 2569 if (other == null) { |
| 2570 return; |
| 2571 } |
| 2572 if (other.bb_ != null) { |
| 2573 if (bb_ == null) { |
| 2574 bb_ = new global::Google.Protobuf.TestProtos.TestMutualRecursionB(); |
| 2575 } |
| 2576 Bb.MergeFrom(other.Bb); |
| 2577 } |
| 2578 } |
| 2579 |
| 2580 public void MergeFrom(pb::CodedInputStream input) { |
| 2581 uint tag; |
| 2582 while ((tag = input.ReadTag()) != 0) { |
| 2583 switch(tag) { |
| 2584 default: |
| 2585 input.SkipLastField(); |
| 2586 break; |
| 2587 case 10: { |
| 2588 if (bb_ == null) { |
| 2589 bb_ = new global::Google.Protobuf.TestProtos.TestMutualRecursionB(
); |
| 2590 } |
| 2591 input.ReadMessage(bb_); |
| 2592 break; |
| 2593 } |
| 2594 } |
| 2595 } |
| 2596 } |
| 2597 |
| 2598 } |
| 2599 |
| 2600 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 2601 public sealed partial class TestMutualRecursionB : pb::IMessage<TestMutualRecu
rsionB> { |
| 2602 private static readonly pb::MessageParser<TestMutualRecursionB> _parser = ne
w pb::MessageParser<TestMutualRecursionB>(() => new TestMutualRecursionB()); |
| 2603 public static pb::MessageParser<TestMutualRecursionB> Parser { get { return
_parser; } } |
| 2604 |
| 2605 public static pbr::MessageDescriptor Descriptor { |
| 2606 get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.D
escriptor.MessageTypes[9]; } |
| 2607 } |
| 2608 |
| 2609 pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 2610 get { return Descriptor; } |
| 2611 } |
| 2612 |
| 2613 public TestMutualRecursionB() { |
| 2614 OnConstruction(); |
| 2615 } |
| 2616 |
| 2617 partial void OnConstruction(); |
| 2618 |
| 2619 public TestMutualRecursionB(TestMutualRecursionB other) : this() { |
| 2620 A = other.a_ != null ? other.A.Clone() : null; |
| 2621 optionalInt32_ = other.optionalInt32_; |
| 2622 } |
| 2623 |
| 2624 public TestMutualRecursionB Clone() { |
| 2625 return new TestMutualRecursionB(this); |
| 2626 } |
| 2627 |
| 2628 /// <summary>Field number for the "a" field.</summary> |
| 2629 public const int AFieldNumber = 1; |
| 2630 private global::Google.Protobuf.TestProtos.TestMutualRecursionA a_; |
| 2631 public global::Google.Protobuf.TestProtos.TestMutualRecursionA A { |
| 2632 get { return a_; } |
| 2633 set { |
| 2634 a_ = value; |
| 2635 } |
| 2636 } |
| 2637 |
| 2638 /// <summary>Field number for the "optional_int32" field.</summary> |
| 2639 public const int OptionalInt32FieldNumber = 2; |
| 2640 private int optionalInt32_; |
| 2641 public int OptionalInt32 { |
| 2642 get { return optionalInt32_; } |
| 2643 set { |
| 2644 optionalInt32_ = value; |
| 2645 } |
| 2646 } |
| 2647 |
| 2648 public override bool Equals(object other) { |
| 2649 return Equals(other as TestMutualRecursionB); |
| 2650 } |
| 2651 |
| 2652 public bool Equals(TestMutualRecursionB other) { |
| 2653 if (ReferenceEquals(other, null)) { |
| 2654 return false; |
| 2655 } |
| 2656 if (ReferenceEquals(other, this)) { |
| 2657 return true; |
| 2658 } |
| 2659 if (!object.Equals(A, other.A)) return false; |
| 2660 if (OptionalInt32 != other.OptionalInt32) return false; |
| 2661 return true; |
| 2662 } |
| 2663 |
| 2664 public override int GetHashCode() { |
| 2665 int hash = 1; |
| 2666 if (a_ != null) hash ^= A.GetHashCode(); |
| 2667 if (OptionalInt32 != 0) hash ^= OptionalInt32.GetHashCode(); |
| 2668 return hash; |
| 2669 } |
| 2670 |
| 2671 public override string ToString() { |
| 2672 return pb::JsonFormatter.ToDiagnosticString(this); |
| 2673 } |
| 2674 |
| 2675 public void WriteTo(pb::CodedOutputStream output) { |
| 2676 if (a_ != null) { |
| 2677 output.WriteRawTag(10); |
| 2678 output.WriteMessage(A); |
| 2679 } |
| 2680 if (OptionalInt32 != 0) { |
| 2681 output.WriteRawTag(16); |
| 2682 output.WriteInt32(OptionalInt32); |
| 2683 } |
| 2684 } |
| 2685 |
| 2686 public int CalculateSize() { |
| 2687 int size = 0; |
| 2688 if (a_ != null) { |
| 2689 size += 1 + pb::CodedOutputStream.ComputeMessageSize(A); |
| 2690 } |
| 2691 if (OptionalInt32 != 0) { |
| 2692 size += 1 + pb::CodedOutputStream.ComputeInt32Size(OptionalInt32); |
| 2693 } |
| 2694 return size; |
| 2695 } |
| 2696 |
| 2697 public void MergeFrom(TestMutualRecursionB other) { |
| 2698 if (other == null) { |
| 2699 return; |
| 2700 } |
| 2701 if (other.a_ != null) { |
| 2702 if (a_ == null) { |
| 2703 a_ = new global::Google.Protobuf.TestProtos.TestMutualRecursionA(); |
| 2704 } |
| 2705 A.MergeFrom(other.A); |
| 2706 } |
| 2707 if (other.OptionalInt32 != 0) { |
| 2708 OptionalInt32 = other.OptionalInt32; |
| 2709 } |
| 2710 } |
| 2711 |
| 2712 public void MergeFrom(pb::CodedInputStream input) { |
| 2713 uint tag; |
| 2714 while ((tag = input.ReadTag()) != 0) { |
| 2715 switch(tag) { |
| 2716 default: |
| 2717 input.SkipLastField(); |
| 2718 break; |
| 2719 case 10: { |
| 2720 if (a_ == null) { |
| 2721 a_ = new global::Google.Protobuf.TestProtos.TestMutualRecursionA()
; |
| 2722 } |
| 2723 input.ReadMessage(a_); |
| 2724 break; |
| 2725 } |
| 2726 case 16: { |
| 2727 OptionalInt32 = input.ReadInt32(); |
| 2728 break; |
| 2729 } |
| 2730 } |
| 2731 } |
| 2732 } |
| 2733 |
| 2734 } |
| 2735 |
| 2736 /// <summary> |
| 2737 /// Test message with CamelCase field names. This violates Protocol Buffer |
| 2738 /// standard style. |
| 2739 /// </summary> |
| 2740 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 2741 public sealed partial class TestCamelCaseFieldNames : pb::IMessage<TestCamelCa
seFieldNames> { |
| 2742 private static readonly pb::MessageParser<TestCamelCaseFieldNames> _parser =
new pb::MessageParser<TestCamelCaseFieldNames>(() => new TestCamelCaseFieldName
s()); |
| 2743 public static pb::MessageParser<TestCamelCaseFieldNames> Parser { get { retu
rn _parser; } } |
| 2744 |
| 2745 public static pbr::MessageDescriptor Descriptor { |
| 2746 get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.D
escriptor.MessageTypes[10]; } |
| 2747 } |
| 2748 |
| 2749 pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 2750 get { return Descriptor; } |
| 2751 } |
| 2752 |
| 2753 public TestCamelCaseFieldNames() { |
| 2754 OnConstruction(); |
| 2755 } |
| 2756 |
| 2757 partial void OnConstruction(); |
| 2758 |
| 2759 public TestCamelCaseFieldNames(TestCamelCaseFieldNames other) : this() { |
| 2760 primitiveField_ = other.primitiveField_; |
| 2761 stringField_ = other.stringField_; |
| 2762 enumField_ = other.enumField_; |
| 2763 MessageField = other.messageField_ != null ? other.MessageField.Clone() :
null; |
| 2764 repeatedPrimitiveField_ = other.repeatedPrimitiveField_.Clone(); |
| 2765 repeatedStringField_ = other.repeatedStringField_.Clone(); |
| 2766 repeatedEnumField_ = other.repeatedEnumField_.Clone(); |
| 2767 repeatedMessageField_ = other.repeatedMessageField_.Clone(); |
| 2768 } |
| 2769 |
| 2770 public TestCamelCaseFieldNames Clone() { |
| 2771 return new TestCamelCaseFieldNames(this); |
| 2772 } |
| 2773 |
| 2774 /// <summary>Field number for the "PrimitiveField" field.</summary> |
| 2775 public const int PrimitiveFieldFieldNumber = 1; |
| 2776 private int primitiveField_; |
| 2777 public int PrimitiveField { |
| 2778 get { return primitiveField_; } |
| 2779 set { |
| 2780 primitiveField_ = value; |
| 2781 } |
| 2782 } |
| 2783 |
| 2784 /// <summary>Field number for the "StringField" field.</summary> |
| 2785 public const int StringFieldFieldNumber = 2; |
| 2786 private string stringField_ = ""; |
| 2787 public string StringField { |
| 2788 get { return stringField_; } |
| 2789 set { |
| 2790 stringField_ = pb::Preconditions.CheckNotNull(value, "value"); |
| 2791 } |
| 2792 } |
| 2793 |
| 2794 /// <summary>Field number for the "EnumField" field.</summary> |
| 2795 public const int EnumFieldFieldNumber = 3; |
| 2796 private global::Google.Protobuf.TestProtos.ForeignEnum enumField_ = global::
Google.Protobuf.TestProtos.ForeignEnum.FOREIGN_UNSPECIFIED; |
| 2797 public global::Google.Protobuf.TestProtos.ForeignEnum EnumField { |
| 2798 get { return enumField_; } |
| 2799 set { |
| 2800 enumField_ = value; |
| 2801 } |
| 2802 } |
| 2803 |
| 2804 /// <summary>Field number for the "MessageField" field.</summary> |
| 2805 public const int MessageFieldFieldNumber = 4; |
| 2806 private global::Google.Protobuf.TestProtos.ForeignMessage messageField_; |
| 2807 public global::Google.Protobuf.TestProtos.ForeignMessage MessageField { |
| 2808 get { return messageField_; } |
| 2809 set { |
| 2810 messageField_ = value; |
| 2811 } |
| 2812 } |
| 2813 |
| 2814 /// <summary>Field number for the "RepeatedPrimitiveField" field.</summary> |
| 2815 public const int RepeatedPrimitiveFieldFieldNumber = 7; |
| 2816 private static readonly pb::FieldCodec<int> _repeated_repeatedPrimitiveField
_codec |
| 2817 = pb::FieldCodec.ForInt32(58); |
| 2818 private readonly pbc::RepeatedField<int> repeatedPrimitiveField_ = new pbc::
RepeatedField<int>(); |
| 2819 public pbc::RepeatedField<int> RepeatedPrimitiveField { |
| 2820 get { return repeatedPrimitiveField_; } |
| 2821 } |
| 2822 |
| 2823 /// <summary>Field number for the "RepeatedStringField" field.</summary> |
| 2824 public const int RepeatedStringFieldFieldNumber = 8; |
| 2825 private static readonly pb::FieldCodec<string> _repeated_repeatedStringField
_codec |
| 2826 = pb::FieldCodec.ForString(66); |
| 2827 private readonly pbc::RepeatedField<string> repeatedStringField_ = new pbc::
RepeatedField<string>(); |
| 2828 public pbc::RepeatedField<string> RepeatedStringField { |
| 2829 get { return repeatedStringField_; } |
| 2830 } |
| 2831 |
| 2832 /// <summary>Field number for the "RepeatedEnumField" field.</summary> |
| 2833 public const int RepeatedEnumFieldFieldNumber = 9; |
| 2834 private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.Fo
reignEnum> _repeated_repeatedEnumField_codec |
| 2835 = pb::FieldCodec.ForEnum(74, x => (int) x, x => (global::Google.Protobuf
.TestProtos.ForeignEnum) x); |
| 2836 private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.Forei
gnEnum> repeatedEnumField_ = new pbc::RepeatedField<global::Google.Protobuf.Test
Protos.ForeignEnum>(); |
| 2837 public pbc::RepeatedField<global::Google.Protobuf.TestProtos.ForeignEnum> Re
peatedEnumField { |
| 2838 get { return repeatedEnumField_; } |
| 2839 } |
| 2840 |
| 2841 /// <summary>Field number for the "RepeatedMessageField" field.</summary> |
| 2842 public const int RepeatedMessageFieldFieldNumber = 10; |
| 2843 private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.Fo
reignMessage> _repeated_repeatedMessageField_codec |
| 2844 = pb::FieldCodec.ForMessage(82, global::Google.Protobuf.TestProtos.Forei
gnMessage.Parser); |
| 2845 private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.Forei
gnMessage> repeatedMessageField_ = new pbc::RepeatedField<global::Google.Protobu
f.TestProtos.ForeignMessage>(); |
| 2846 public pbc::RepeatedField<global::Google.Protobuf.TestProtos.ForeignMessage>
RepeatedMessageField { |
| 2847 get { return repeatedMessageField_; } |
| 2848 } |
| 2849 |
| 2850 public override bool Equals(object other) { |
| 2851 return Equals(other as TestCamelCaseFieldNames); |
| 2852 } |
| 2853 |
| 2854 public bool Equals(TestCamelCaseFieldNames other) { |
| 2855 if (ReferenceEquals(other, null)) { |
| 2856 return false; |
| 2857 } |
| 2858 if (ReferenceEquals(other, this)) { |
| 2859 return true; |
| 2860 } |
| 2861 if (PrimitiveField != other.PrimitiveField) return false; |
| 2862 if (StringField != other.StringField) return false; |
| 2863 if (EnumField != other.EnumField) return false; |
| 2864 if (!object.Equals(MessageField, other.MessageField)) return false; |
| 2865 if(!repeatedPrimitiveField_.Equals(other.repeatedPrimitiveField_)) return
false; |
| 2866 if(!repeatedStringField_.Equals(other.repeatedStringField_)) return false; |
| 2867 if(!repeatedEnumField_.Equals(other.repeatedEnumField_)) return false; |
| 2868 if(!repeatedMessageField_.Equals(other.repeatedMessageField_)) return fals
e; |
| 2869 return true; |
| 2870 } |
| 2871 |
| 2872 public override int GetHashCode() { |
| 2873 int hash = 1; |
| 2874 if (PrimitiveField != 0) hash ^= PrimitiveField.GetHashCode(); |
| 2875 if (StringField.Length != 0) hash ^= StringField.GetHashCode(); |
| 2876 if (EnumField != global::Google.Protobuf.TestProtos.ForeignEnum.FOREIGN_UN
SPECIFIED) hash ^= EnumField.GetHashCode(); |
| 2877 if (messageField_ != null) hash ^= MessageField.GetHashCode(); |
| 2878 hash ^= repeatedPrimitiveField_.GetHashCode(); |
| 2879 hash ^= repeatedStringField_.GetHashCode(); |
| 2880 hash ^= repeatedEnumField_.GetHashCode(); |
| 2881 hash ^= repeatedMessageField_.GetHashCode(); |
| 2882 return hash; |
| 2883 } |
| 2884 |
| 2885 public override string ToString() { |
| 2886 return pb::JsonFormatter.ToDiagnosticString(this); |
| 2887 } |
| 2888 |
| 2889 public void WriteTo(pb::CodedOutputStream output) { |
| 2890 if (PrimitiveField != 0) { |
| 2891 output.WriteRawTag(8); |
| 2892 output.WriteInt32(PrimitiveField); |
| 2893 } |
| 2894 if (StringField.Length != 0) { |
| 2895 output.WriteRawTag(18); |
| 2896 output.WriteString(StringField); |
| 2897 } |
| 2898 if (EnumField != global::Google.Protobuf.TestProtos.ForeignEnum.FOREIGN_UN
SPECIFIED) { |
| 2899 output.WriteRawTag(24); |
| 2900 output.WriteEnum((int) EnumField); |
| 2901 } |
| 2902 if (messageField_ != null) { |
| 2903 output.WriteRawTag(34); |
| 2904 output.WriteMessage(MessageField); |
| 2905 } |
| 2906 repeatedPrimitiveField_.WriteTo(output, _repeated_repeatedPrimitiveField_c
odec); |
| 2907 repeatedStringField_.WriteTo(output, _repeated_repeatedStringField_codec); |
| 2908 repeatedEnumField_.WriteTo(output, _repeated_repeatedEnumField_codec); |
| 2909 repeatedMessageField_.WriteTo(output, _repeated_repeatedMessageField_codec
); |
| 2910 } |
| 2911 |
| 2912 public int CalculateSize() { |
| 2913 int size = 0; |
| 2914 if (PrimitiveField != 0) { |
| 2915 size += 1 + pb::CodedOutputStream.ComputeInt32Size(PrimitiveField); |
| 2916 } |
| 2917 if (StringField.Length != 0) { |
| 2918 size += 1 + pb::CodedOutputStream.ComputeStringSize(StringField); |
| 2919 } |
| 2920 if (EnumField != global::Google.Protobuf.TestProtos.ForeignEnum.FOREIGN_UN
SPECIFIED) { |
| 2921 size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) EnumField); |
| 2922 } |
| 2923 if (messageField_ != null) { |
| 2924 size += 1 + pb::CodedOutputStream.ComputeMessageSize(MessageField); |
| 2925 } |
| 2926 size += repeatedPrimitiveField_.CalculateSize(_repeated_repeatedPrimitiveF
ield_codec); |
| 2927 size += repeatedStringField_.CalculateSize(_repeated_repeatedStringField_c
odec); |
| 2928 size += repeatedEnumField_.CalculateSize(_repeated_repeatedEnumField_codec
); |
| 2929 size += repeatedMessageField_.CalculateSize(_repeated_repeatedMessageField
_codec); |
| 2930 return size; |
| 2931 } |
| 2932 |
| 2933 public void MergeFrom(TestCamelCaseFieldNames other) { |
| 2934 if (other == null) { |
| 2935 return; |
| 2936 } |
| 2937 if (other.PrimitiveField != 0) { |
| 2938 PrimitiveField = other.PrimitiveField; |
| 2939 } |
| 2940 if (other.StringField.Length != 0) { |
| 2941 StringField = other.StringField; |
| 2942 } |
| 2943 if (other.EnumField != global::Google.Protobuf.TestProtos.ForeignEnum.FORE
IGN_UNSPECIFIED) { |
| 2944 EnumField = other.EnumField; |
| 2945 } |
| 2946 if (other.messageField_ != null) { |
| 2947 if (messageField_ == null) { |
| 2948 messageField_ = new global::Google.Protobuf.TestProtos.ForeignMessage(
); |
| 2949 } |
| 2950 MessageField.MergeFrom(other.MessageField); |
| 2951 } |
| 2952 repeatedPrimitiveField_.Add(other.repeatedPrimitiveField_); |
| 2953 repeatedStringField_.Add(other.repeatedStringField_); |
| 2954 repeatedEnumField_.Add(other.repeatedEnumField_); |
| 2955 repeatedMessageField_.Add(other.repeatedMessageField_); |
| 2956 } |
| 2957 |
| 2958 public void MergeFrom(pb::CodedInputStream input) { |
| 2959 uint tag; |
| 2960 while ((tag = input.ReadTag()) != 0) { |
| 2961 switch(tag) { |
| 2962 default: |
| 2963 input.SkipLastField(); |
| 2964 break; |
| 2965 case 8: { |
| 2966 PrimitiveField = input.ReadInt32(); |
| 2967 break; |
| 2968 } |
| 2969 case 18: { |
| 2970 StringField = input.ReadString(); |
| 2971 break; |
| 2972 } |
| 2973 case 24: { |
| 2974 enumField_ = (global::Google.Protobuf.TestProtos.ForeignEnum) input.
ReadEnum(); |
| 2975 break; |
| 2976 } |
| 2977 case 34: { |
| 2978 if (messageField_ == null) { |
| 2979 messageField_ = new global::Google.Protobuf.TestProtos.ForeignMess
age(); |
| 2980 } |
| 2981 input.ReadMessage(messageField_); |
| 2982 break; |
| 2983 } |
| 2984 case 58: |
| 2985 case 56: { |
| 2986 repeatedPrimitiveField_.AddEntriesFrom(input, _repeated_repeatedPrim
itiveField_codec); |
| 2987 break; |
| 2988 } |
| 2989 case 66: { |
| 2990 repeatedStringField_.AddEntriesFrom(input, _repeated_repeatedStringF
ield_codec); |
| 2991 break; |
| 2992 } |
| 2993 case 74: |
| 2994 case 72: { |
| 2995 repeatedEnumField_.AddEntriesFrom(input, _repeated_repeatedEnumField
_codec); |
| 2996 break; |
| 2997 } |
| 2998 case 82: { |
| 2999 repeatedMessageField_.AddEntriesFrom(input, _repeated_repeatedMessag
eField_codec); |
| 3000 break; |
| 3001 } |
| 3002 } |
| 3003 } |
| 3004 } |
| 3005 |
| 3006 } |
| 3007 |
| 3008 /// <summary> |
| 3009 /// We list fields out of order, to ensure that we're using field number and
not |
| 3010 /// field index to determine serialization order. |
| 3011 /// </summary> |
| 3012 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 3013 public sealed partial class TestFieldOrderings : pb::IMessage<TestFieldOrderin
gs> { |
| 3014 private static readonly pb::MessageParser<TestFieldOrderings> _parser = new
pb::MessageParser<TestFieldOrderings>(() => new TestFieldOrderings()); |
| 3015 public static pb::MessageParser<TestFieldOrderings> Parser { get { return _p
arser; } } |
| 3016 |
| 3017 public static pbr::MessageDescriptor Descriptor { |
| 3018 get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.D
escriptor.MessageTypes[11]; } |
| 3019 } |
| 3020 |
| 3021 pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 3022 get { return Descriptor; } |
| 3023 } |
| 3024 |
| 3025 public TestFieldOrderings() { |
| 3026 OnConstruction(); |
| 3027 } |
| 3028 |
| 3029 partial void OnConstruction(); |
| 3030 |
| 3031 public TestFieldOrderings(TestFieldOrderings other) : this() { |
| 3032 myString_ = other.myString_; |
| 3033 myInt_ = other.myInt_; |
| 3034 myFloat_ = other.myFloat_; |
| 3035 SingleNestedMessage = other.singleNestedMessage_ != null ? other.SingleNes
tedMessage.Clone() : null; |
| 3036 } |
| 3037 |
| 3038 public TestFieldOrderings Clone() { |
| 3039 return new TestFieldOrderings(this); |
| 3040 } |
| 3041 |
| 3042 /// <summary>Field number for the "my_string" field.</summary> |
| 3043 public const int MyStringFieldNumber = 11; |
| 3044 private string myString_ = ""; |
| 3045 public string MyString { |
| 3046 get { return myString_; } |
| 3047 set { |
| 3048 myString_ = pb::Preconditions.CheckNotNull(value, "value"); |
| 3049 } |
| 3050 } |
| 3051 |
| 3052 /// <summary>Field number for the "my_int" field.</summary> |
| 3053 public const int MyIntFieldNumber = 1; |
| 3054 private long myInt_; |
| 3055 public long MyInt { |
| 3056 get { return myInt_; } |
| 3057 set { |
| 3058 myInt_ = value; |
| 3059 } |
| 3060 } |
| 3061 |
| 3062 /// <summary>Field number for the "my_float" field.</summary> |
| 3063 public const int MyFloatFieldNumber = 101; |
| 3064 private float myFloat_; |
| 3065 public float MyFloat { |
| 3066 get { return myFloat_; } |
| 3067 set { |
| 3068 myFloat_ = value; |
| 3069 } |
| 3070 } |
| 3071 |
| 3072 /// <summary>Field number for the "single_nested_message" field.</summary> |
| 3073 public const int SingleNestedMessageFieldNumber = 200; |
| 3074 private global::Google.Protobuf.TestProtos.TestFieldOrderings.Types.NestedMe
ssage singleNestedMessage_; |
| 3075 public global::Google.Protobuf.TestProtos.TestFieldOrderings.Types.NestedMes
sage SingleNestedMessage { |
| 3076 get { return singleNestedMessage_; } |
| 3077 set { |
| 3078 singleNestedMessage_ = value; |
| 3079 } |
| 3080 } |
| 3081 |
| 3082 public override bool Equals(object other) { |
| 3083 return Equals(other as TestFieldOrderings); |
| 3084 } |
| 3085 |
| 3086 public bool Equals(TestFieldOrderings other) { |
| 3087 if (ReferenceEquals(other, null)) { |
| 3088 return false; |
| 3089 } |
| 3090 if (ReferenceEquals(other, this)) { |
| 3091 return true; |
| 3092 } |
| 3093 if (MyString != other.MyString) return false; |
| 3094 if (MyInt != other.MyInt) return false; |
| 3095 if (MyFloat != other.MyFloat) return false; |
| 3096 if (!object.Equals(SingleNestedMessage, other.SingleNestedMessage)) return
false; |
| 3097 return true; |
| 3098 } |
| 3099 |
| 3100 public override int GetHashCode() { |
| 3101 int hash = 1; |
| 3102 if (MyString.Length != 0) hash ^= MyString.GetHashCode(); |
| 3103 if (MyInt != 0L) hash ^= MyInt.GetHashCode(); |
| 3104 if (MyFloat != 0F) hash ^= MyFloat.GetHashCode(); |
| 3105 if (singleNestedMessage_ != null) hash ^= SingleNestedMessage.GetHashCode(
); |
| 3106 return hash; |
| 3107 } |
| 3108 |
| 3109 public override string ToString() { |
| 3110 return pb::JsonFormatter.ToDiagnosticString(this); |
| 3111 } |
| 3112 |
| 3113 public void WriteTo(pb::CodedOutputStream output) { |
| 3114 if (MyInt != 0L) { |
| 3115 output.WriteRawTag(8); |
| 3116 output.WriteInt64(MyInt); |
| 3117 } |
| 3118 if (MyString.Length != 0) { |
| 3119 output.WriteRawTag(90); |
| 3120 output.WriteString(MyString); |
| 3121 } |
| 3122 if (MyFloat != 0F) { |
| 3123 output.WriteRawTag(173, 6); |
| 3124 output.WriteFloat(MyFloat); |
| 3125 } |
| 3126 if (singleNestedMessage_ != null) { |
| 3127 output.WriteRawTag(194, 12); |
| 3128 output.WriteMessage(SingleNestedMessage); |
| 3129 } |
| 3130 } |
| 3131 |
| 3132 public int CalculateSize() { |
| 3133 int size = 0; |
| 3134 if (MyString.Length != 0) { |
| 3135 size += 1 + pb::CodedOutputStream.ComputeStringSize(MyString); |
| 3136 } |
| 3137 if (MyInt != 0L) { |
| 3138 size += 1 + pb::CodedOutputStream.ComputeInt64Size(MyInt); |
| 3139 } |
| 3140 if (MyFloat != 0F) { |
| 3141 size += 2 + 4; |
| 3142 } |
| 3143 if (singleNestedMessage_ != null) { |
| 3144 size += 2 + pb::CodedOutputStream.ComputeMessageSize(SingleNestedMessage
); |
| 3145 } |
| 3146 return size; |
| 3147 } |
| 3148 |
| 3149 public void MergeFrom(TestFieldOrderings other) { |
| 3150 if (other == null) { |
| 3151 return; |
| 3152 } |
| 3153 if (other.MyString.Length != 0) { |
| 3154 MyString = other.MyString; |
| 3155 } |
| 3156 if (other.MyInt != 0L) { |
| 3157 MyInt = other.MyInt; |
| 3158 } |
| 3159 if (other.MyFloat != 0F) { |
| 3160 MyFloat = other.MyFloat; |
| 3161 } |
| 3162 if (other.singleNestedMessage_ != null) { |
| 3163 if (singleNestedMessage_ == null) { |
| 3164 singleNestedMessage_ = new global::Google.Protobuf.TestProtos.TestFiel
dOrderings.Types.NestedMessage(); |
| 3165 } |
| 3166 SingleNestedMessage.MergeFrom(other.SingleNestedMessage); |
| 3167 } |
| 3168 } |
| 3169 |
| 3170 public void MergeFrom(pb::CodedInputStream input) { |
| 3171 uint tag; |
| 3172 while ((tag = input.ReadTag()) != 0) { |
| 3173 switch(tag) { |
| 3174 default: |
| 3175 input.SkipLastField(); |
| 3176 break; |
| 3177 case 8: { |
| 3178 MyInt = input.ReadInt64(); |
| 3179 break; |
| 3180 } |
| 3181 case 90: { |
| 3182 MyString = input.ReadString(); |
| 3183 break; |
| 3184 } |
| 3185 case 813: { |
| 3186 MyFloat = input.ReadFloat(); |
| 3187 break; |
| 3188 } |
| 3189 case 1602: { |
| 3190 if (singleNestedMessage_ == null) { |
| 3191 singleNestedMessage_ = new global::Google.Protobuf.TestProtos.Test
FieldOrderings.Types.NestedMessage(); |
| 3192 } |
| 3193 input.ReadMessage(singleNestedMessage_); |
| 3194 break; |
| 3195 } |
| 3196 } |
| 3197 } |
| 3198 } |
| 3199 |
| 3200 #region Nested types |
| 3201 /// <summary>Container for nested types declared in the TestFieldOrderings m
essage type.</summary> |
| 3202 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 3203 public static partial class Types { |
| 3204 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 3205 public sealed partial class NestedMessage : pb::IMessage<NestedMessage> { |
| 3206 private static readonly pb::MessageParser<NestedMessage> _parser = new p
b::MessageParser<NestedMessage>(() => new NestedMessage()); |
| 3207 public static pb::MessageParser<NestedMessage> Parser { get { return _pa
rser; } } |
| 3208 |
| 3209 public static pbr::MessageDescriptor Descriptor { |
| 3210 get { return global::Google.Protobuf.TestProtos.TestFieldOrderings.Des
criptor.NestedTypes[0]; } |
| 3211 } |
| 3212 |
| 3213 pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 3214 get { return Descriptor; } |
| 3215 } |
| 3216 |
| 3217 public NestedMessage() { |
| 3218 OnConstruction(); |
| 3219 } |
| 3220 |
| 3221 partial void OnConstruction(); |
| 3222 |
| 3223 public NestedMessage(NestedMessage other) : this() { |
| 3224 oo_ = other.oo_; |
| 3225 bb_ = other.bb_; |
| 3226 } |
| 3227 |
| 3228 public NestedMessage Clone() { |
| 3229 return new NestedMessage(this); |
| 3230 } |
| 3231 |
| 3232 /// <summary>Field number for the "oo" field.</summary> |
| 3233 public const int OoFieldNumber = 2; |
| 3234 private long oo_; |
| 3235 public long Oo { |
| 3236 get { return oo_; } |
| 3237 set { |
| 3238 oo_ = value; |
| 3239 } |
| 3240 } |
| 3241 |
| 3242 /// <summary>Field number for the "bb" field.</summary> |
| 3243 public const int BbFieldNumber = 1; |
| 3244 private int bb_; |
| 3245 /// <summary> |
| 3246 /// The field name "b" fails to compile in proto1 because it conflicts
with |
| 3247 /// a local variable named "b" in one of the generated methods. Doh. |
| 3248 /// This file needs to compile in proto1 to test backwards-compatibilit
y. |
| 3249 /// </summary> |
| 3250 public int Bb { |
| 3251 get { return bb_; } |
| 3252 set { |
| 3253 bb_ = value; |
| 3254 } |
| 3255 } |
| 3256 |
| 3257 public override bool Equals(object other) { |
| 3258 return Equals(other as NestedMessage); |
| 3259 } |
| 3260 |
| 3261 public bool Equals(NestedMessage other) { |
| 3262 if (ReferenceEquals(other, null)) { |
| 3263 return false; |
| 3264 } |
| 3265 if (ReferenceEquals(other, this)) { |
| 3266 return true; |
| 3267 } |
| 3268 if (Oo != other.Oo) return false; |
| 3269 if (Bb != other.Bb) return false; |
| 3270 return true; |
| 3271 } |
| 3272 |
| 3273 public override int GetHashCode() { |
| 3274 int hash = 1; |
| 3275 if (Oo != 0L) hash ^= Oo.GetHashCode(); |
| 3276 if (Bb != 0) hash ^= Bb.GetHashCode(); |
| 3277 return hash; |
| 3278 } |
| 3279 |
| 3280 public override string ToString() { |
| 3281 return pb::JsonFormatter.ToDiagnosticString(this); |
| 3282 } |
| 3283 |
| 3284 public void WriteTo(pb::CodedOutputStream output) { |
| 3285 if (Bb != 0) { |
| 3286 output.WriteRawTag(8); |
| 3287 output.WriteInt32(Bb); |
| 3288 } |
| 3289 if (Oo != 0L) { |
| 3290 output.WriteRawTag(16); |
| 3291 output.WriteInt64(Oo); |
| 3292 } |
| 3293 } |
| 3294 |
| 3295 public int CalculateSize() { |
| 3296 int size = 0; |
| 3297 if (Oo != 0L) { |
| 3298 size += 1 + pb::CodedOutputStream.ComputeInt64Size(Oo); |
| 3299 } |
| 3300 if (Bb != 0) { |
| 3301 size += 1 + pb::CodedOutputStream.ComputeInt32Size(Bb); |
| 3302 } |
| 3303 return size; |
| 3304 } |
| 3305 |
| 3306 public void MergeFrom(NestedMessage other) { |
| 3307 if (other == null) { |
| 3308 return; |
| 3309 } |
| 3310 if (other.Oo != 0L) { |
| 3311 Oo = other.Oo; |
| 3312 } |
| 3313 if (other.Bb != 0) { |
| 3314 Bb = other.Bb; |
| 3315 } |
| 3316 } |
| 3317 |
| 3318 public void MergeFrom(pb::CodedInputStream input) { |
| 3319 uint tag; |
| 3320 while ((tag = input.ReadTag()) != 0) { |
| 3321 switch(tag) { |
| 3322 default: |
| 3323 input.SkipLastField(); |
| 3324 break; |
| 3325 case 8: { |
| 3326 Bb = input.ReadInt32(); |
| 3327 break; |
| 3328 } |
| 3329 case 16: { |
| 3330 Oo = input.ReadInt64(); |
| 3331 break; |
| 3332 } |
| 3333 } |
| 3334 } |
| 3335 } |
| 3336 |
| 3337 } |
| 3338 |
| 3339 } |
| 3340 #endregion |
| 3341 |
| 3342 } |
| 3343 |
| 3344 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 3345 public sealed partial class SparseEnumMessage : pb::IMessage<SparseEnumMessage
> { |
| 3346 private static readonly pb::MessageParser<SparseEnumMessage> _parser = new p
b::MessageParser<SparseEnumMessage>(() => new SparseEnumMessage()); |
| 3347 public static pb::MessageParser<SparseEnumMessage> Parser { get { return _pa
rser; } } |
| 3348 |
| 3349 public static pbr::MessageDescriptor Descriptor { |
| 3350 get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.D
escriptor.MessageTypes[12]; } |
| 3351 } |
| 3352 |
| 3353 pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 3354 get { return Descriptor; } |
| 3355 } |
| 3356 |
| 3357 public SparseEnumMessage() { |
| 3358 OnConstruction(); |
| 3359 } |
| 3360 |
| 3361 partial void OnConstruction(); |
| 3362 |
| 3363 public SparseEnumMessage(SparseEnumMessage other) : this() { |
| 3364 sparseEnum_ = other.sparseEnum_; |
| 3365 } |
| 3366 |
| 3367 public SparseEnumMessage Clone() { |
| 3368 return new SparseEnumMessage(this); |
| 3369 } |
| 3370 |
| 3371 /// <summary>Field number for the "sparse_enum" field.</summary> |
| 3372 public const int SparseEnumFieldNumber = 1; |
| 3373 private global::Google.Protobuf.TestProtos.TestSparseEnum sparseEnum_ = glob
al::Google.Protobuf.TestProtos.TestSparseEnum.TEST_SPARSE_ENUM_UNSPECIFIED; |
| 3374 public global::Google.Protobuf.TestProtos.TestSparseEnum SparseEnum { |
| 3375 get { return sparseEnum_; } |
| 3376 set { |
| 3377 sparseEnum_ = value; |
| 3378 } |
| 3379 } |
| 3380 |
| 3381 public override bool Equals(object other) { |
| 3382 return Equals(other as SparseEnumMessage); |
| 3383 } |
| 3384 |
| 3385 public bool Equals(SparseEnumMessage other) { |
| 3386 if (ReferenceEquals(other, null)) { |
| 3387 return false; |
| 3388 } |
| 3389 if (ReferenceEquals(other, this)) { |
| 3390 return true; |
| 3391 } |
| 3392 if (SparseEnum != other.SparseEnum) return false; |
| 3393 return true; |
| 3394 } |
| 3395 |
| 3396 public override int GetHashCode() { |
| 3397 int hash = 1; |
| 3398 if (SparseEnum != global::Google.Protobuf.TestProtos.TestSparseEnum.TEST_S
PARSE_ENUM_UNSPECIFIED) hash ^= SparseEnum.GetHashCode(); |
| 3399 return hash; |
| 3400 } |
| 3401 |
| 3402 public override string ToString() { |
| 3403 return pb::JsonFormatter.ToDiagnosticString(this); |
| 3404 } |
| 3405 |
| 3406 public void WriteTo(pb::CodedOutputStream output) { |
| 3407 if (SparseEnum != global::Google.Protobuf.TestProtos.TestSparseEnum.TEST_S
PARSE_ENUM_UNSPECIFIED) { |
| 3408 output.WriteRawTag(8); |
| 3409 output.WriteEnum((int) SparseEnum); |
| 3410 } |
| 3411 } |
| 3412 |
| 3413 public int CalculateSize() { |
| 3414 int size = 0; |
| 3415 if (SparseEnum != global::Google.Protobuf.TestProtos.TestSparseEnum.TEST_S
PARSE_ENUM_UNSPECIFIED) { |
| 3416 size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) SparseEnum); |
| 3417 } |
| 3418 return size; |
| 3419 } |
| 3420 |
| 3421 public void MergeFrom(SparseEnumMessage other) { |
| 3422 if (other == null) { |
| 3423 return; |
| 3424 } |
| 3425 if (other.SparseEnum != global::Google.Protobuf.TestProtos.TestSparseEnum.
TEST_SPARSE_ENUM_UNSPECIFIED) { |
| 3426 SparseEnum = other.SparseEnum; |
| 3427 } |
| 3428 } |
| 3429 |
| 3430 public void MergeFrom(pb::CodedInputStream input) { |
| 3431 uint tag; |
| 3432 while ((tag = input.ReadTag()) != 0) { |
| 3433 switch(tag) { |
| 3434 default: |
| 3435 input.SkipLastField(); |
| 3436 break; |
| 3437 case 8: { |
| 3438 sparseEnum_ = (global::Google.Protobuf.TestProtos.TestSparseEnum) in
put.ReadEnum(); |
| 3439 break; |
| 3440 } |
| 3441 } |
| 3442 } |
| 3443 } |
| 3444 |
| 3445 } |
| 3446 |
| 3447 /// <summary> |
| 3448 /// Test String and Bytes: string is for valid UTF-8 strings |
| 3449 /// </summary> |
| 3450 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 3451 public sealed partial class OneString : pb::IMessage<OneString> { |
| 3452 private static readonly pb::MessageParser<OneString> _parser = new pb::Messa
geParser<OneString>(() => new OneString()); |
| 3453 public static pb::MessageParser<OneString> Parser { get { return _parser; }
} |
| 3454 |
| 3455 public static pbr::MessageDescriptor Descriptor { |
| 3456 get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.D
escriptor.MessageTypes[13]; } |
| 3457 } |
| 3458 |
| 3459 pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 3460 get { return Descriptor; } |
| 3461 } |
| 3462 |
| 3463 public OneString() { |
| 3464 OnConstruction(); |
| 3465 } |
| 3466 |
| 3467 partial void OnConstruction(); |
| 3468 |
| 3469 public OneString(OneString other) : this() { |
| 3470 data_ = other.data_; |
| 3471 } |
| 3472 |
| 3473 public OneString Clone() { |
| 3474 return new OneString(this); |
| 3475 } |
| 3476 |
| 3477 /// <summary>Field number for the "data" field.</summary> |
| 3478 public const int DataFieldNumber = 1; |
| 3479 private string data_ = ""; |
| 3480 public string Data { |
| 3481 get { return data_; } |
| 3482 set { |
| 3483 data_ = pb::Preconditions.CheckNotNull(value, "value"); |
| 3484 } |
| 3485 } |
| 3486 |
| 3487 public override bool Equals(object other) { |
| 3488 return Equals(other as OneString); |
| 3489 } |
| 3490 |
| 3491 public bool Equals(OneString other) { |
| 3492 if (ReferenceEquals(other, null)) { |
| 3493 return false; |
| 3494 } |
| 3495 if (ReferenceEquals(other, this)) { |
| 3496 return true; |
| 3497 } |
| 3498 if (Data != other.Data) return false; |
| 3499 return true; |
| 3500 } |
| 3501 |
| 3502 public override int GetHashCode() { |
| 3503 int hash = 1; |
| 3504 if (Data.Length != 0) hash ^= Data.GetHashCode(); |
| 3505 return hash; |
| 3506 } |
| 3507 |
| 3508 public override string ToString() { |
| 3509 return pb::JsonFormatter.ToDiagnosticString(this); |
| 3510 } |
| 3511 |
| 3512 public void WriteTo(pb::CodedOutputStream output) { |
| 3513 if (Data.Length != 0) { |
| 3514 output.WriteRawTag(10); |
| 3515 output.WriteString(Data); |
| 3516 } |
| 3517 } |
| 3518 |
| 3519 public int CalculateSize() { |
| 3520 int size = 0; |
| 3521 if (Data.Length != 0) { |
| 3522 size += 1 + pb::CodedOutputStream.ComputeStringSize(Data); |
| 3523 } |
| 3524 return size; |
| 3525 } |
| 3526 |
| 3527 public void MergeFrom(OneString other) { |
| 3528 if (other == null) { |
| 3529 return; |
| 3530 } |
| 3531 if (other.Data.Length != 0) { |
| 3532 Data = other.Data; |
| 3533 } |
| 3534 } |
| 3535 |
| 3536 public void MergeFrom(pb::CodedInputStream input) { |
| 3537 uint tag; |
| 3538 while ((tag = input.ReadTag()) != 0) { |
| 3539 switch(tag) { |
| 3540 default: |
| 3541 input.SkipLastField(); |
| 3542 break; |
| 3543 case 10: { |
| 3544 Data = input.ReadString(); |
| 3545 break; |
| 3546 } |
| 3547 } |
| 3548 } |
| 3549 } |
| 3550 |
| 3551 } |
| 3552 |
| 3553 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 3554 public sealed partial class MoreString : pb::IMessage<MoreString> { |
| 3555 private static readonly pb::MessageParser<MoreString> _parser = new pb::Mess
ageParser<MoreString>(() => new MoreString()); |
| 3556 public static pb::MessageParser<MoreString> Parser { get { return _parser; }
} |
| 3557 |
| 3558 public static pbr::MessageDescriptor Descriptor { |
| 3559 get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.D
escriptor.MessageTypes[14]; } |
| 3560 } |
| 3561 |
| 3562 pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 3563 get { return Descriptor; } |
| 3564 } |
| 3565 |
| 3566 public MoreString() { |
| 3567 OnConstruction(); |
| 3568 } |
| 3569 |
| 3570 partial void OnConstruction(); |
| 3571 |
| 3572 public MoreString(MoreString other) : this() { |
| 3573 data_ = other.data_.Clone(); |
| 3574 } |
| 3575 |
| 3576 public MoreString Clone() { |
| 3577 return new MoreString(this); |
| 3578 } |
| 3579 |
| 3580 /// <summary>Field number for the "data" field.</summary> |
| 3581 public const int DataFieldNumber = 1; |
| 3582 private static readonly pb::FieldCodec<string> _repeated_data_codec |
| 3583 = pb::FieldCodec.ForString(10); |
| 3584 private readonly pbc::RepeatedField<string> data_ = new pbc::RepeatedField<s
tring>(); |
| 3585 public pbc::RepeatedField<string> Data { |
| 3586 get { return data_; } |
| 3587 } |
| 3588 |
| 3589 public override bool Equals(object other) { |
| 3590 return Equals(other as MoreString); |
| 3591 } |
| 3592 |
| 3593 public bool Equals(MoreString other) { |
| 3594 if (ReferenceEquals(other, null)) { |
| 3595 return false; |
| 3596 } |
| 3597 if (ReferenceEquals(other, this)) { |
| 3598 return true; |
| 3599 } |
| 3600 if(!data_.Equals(other.data_)) return false; |
| 3601 return true; |
| 3602 } |
| 3603 |
| 3604 public override int GetHashCode() { |
| 3605 int hash = 1; |
| 3606 hash ^= data_.GetHashCode(); |
| 3607 return hash; |
| 3608 } |
| 3609 |
| 3610 public override string ToString() { |
| 3611 return pb::JsonFormatter.ToDiagnosticString(this); |
| 3612 } |
| 3613 |
| 3614 public void WriteTo(pb::CodedOutputStream output) { |
| 3615 data_.WriteTo(output, _repeated_data_codec); |
| 3616 } |
| 3617 |
| 3618 public int CalculateSize() { |
| 3619 int size = 0; |
| 3620 size += data_.CalculateSize(_repeated_data_codec); |
| 3621 return size; |
| 3622 } |
| 3623 |
| 3624 public void MergeFrom(MoreString other) { |
| 3625 if (other == null) { |
| 3626 return; |
| 3627 } |
| 3628 data_.Add(other.data_); |
| 3629 } |
| 3630 |
| 3631 public void MergeFrom(pb::CodedInputStream input) { |
| 3632 uint tag; |
| 3633 while ((tag = input.ReadTag()) != 0) { |
| 3634 switch(tag) { |
| 3635 default: |
| 3636 input.SkipLastField(); |
| 3637 break; |
| 3638 case 10: { |
| 3639 data_.AddEntriesFrom(input, _repeated_data_codec); |
| 3640 break; |
| 3641 } |
| 3642 } |
| 3643 } |
| 3644 } |
| 3645 |
| 3646 } |
| 3647 |
| 3648 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 3649 public sealed partial class OneBytes : pb::IMessage<OneBytes> { |
| 3650 private static readonly pb::MessageParser<OneBytes> _parser = new pb::Messag
eParser<OneBytes>(() => new OneBytes()); |
| 3651 public static pb::MessageParser<OneBytes> Parser { get { return _parser; } } |
| 3652 |
| 3653 public static pbr::MessageDescriptor Descriptor { |
| 3654 get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.D
escriptor.MessageTypes[15]; } |
| 3655 } |
| 3656 |
| 3657 pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 3658 get { return Descriptor; } |
| 3659 } |
| 3660 |
| 3661 public OneBytes() { |
| 3662 OnConstruction(); |
| 3663 } |
| 3664 |
| 3665 partial void OnConstruction(); |
| 3666 |
| 3667 public OneBytes(OneBytes other) : this() { |
| 3668 data_ = other.data_; |
| 3669 } |
| 3670 |
| 3671 public OneBytes Clone() { |
| 3672 return new OneBytes(this); |
| 3673 } |
| 3674 |
| 3675 /// <summary>Field number for the "data" field.</summary> |
| 3676 public const int DataFieldNumber = 1; |
| 3677 private pb::ByteString data_ = pb::ByteString.Empty; |
| 3678 public pb::ByteString Data { |
| 3679 get { return data_; } |
| 3680 set { |
| 3681 data_ = pb::Preconditions.CheckNotNull(value, "value"); |
| 3682 } |
| 3683 } |
| 3684 |
| 3685 public override bool Equals(object other) { |
| 3686 return Equals(other as OneBytes); |
| 3687 } |
| 3688 |
| 3689 public bool Equals(OneBytes other) { |
| 3690 if (ReferenceEquals(other, null)) { |
| 3691 return false; |
| 3692 } |
| 3693 if (ReferenceEquals(other, this)) { |
| 3694 return true; |
| 3695 } |
| 3696 if (Data != other.Data) return false; |
| 3697 return true; |
| 3698 } |
| 3699 |
| 3700 public override int GetHashCode() { |
| 3701 int hash = 1; |
| 3702 if (Data.Length != 0) hash ^= Data.GetHashCode(); |
| 3703 return hash; |
| 3704 } |
| 3705 |
| 3706 public override string ToString() { |
| 3707 return pb::JsonFormatter.ToDiagnosticString(this); |
| 3708 } |
| 3709 |
| 3710 public void WriteTo(pb::CodedOutputStream output) { |
| 3711 if (Data.Length != 0) { |
| 3712 output.WriteRawTag(10); |
| 3713 output.WriteBytes(Data); |
| 3714 } |
| 3715 } |
| 3716 |
| 3717 public int CalculateSize() { |
| 3718 int size = 0; |
| 3719 if (Data.Length != 0) { |
| 3720 size += 1 + pb::CodedOutputStream.ComputeBytesSize(Data); |
| 3721 } |
| 3722 return size; |
| 3723 } |
| 3724 |
| 3725 public void MergeFrom(OneBytes other) { |
| 3726 if (other == null) { |
| 3727 return; |
| 3728 } |
| 3729 if (other.Data.Length != 0) { |
| 3730 Data = other.Data; |
| 3731 } |
| 3732 } |
| 3733 |
| 3734 public void MergeFrom(pb::CodedInputStream input) { |
| 3735 uint tag; |
| 3736 while ((tag = input.ReadTag()) != 0) { |
| 3737 switch(tag) { |
| 3738 default: |
| 3739 input.SkipLastField(); |
| 3740 break; |
| 3741 case 10: { |
| 3742 Data = input.ReadBytes(); |
| 3743 break; |
| 3744 } |
| 3745 } |
| 3746 } |
| 3747 } |
| 3748 |
| 3749 } |
| 3750 |
| 3751 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 3752 public sealed partial class MoreBytes : pb::IMessage<MoreBytes> { |
| 3753 private static readonly pb::MessageParser<MoreBytes> _parser = new pb::Messa
geParser<MoreBytes>(() => new MoreBytes()); |
| 3754 public static pb::MessageParser<MoreBytes> Parser { get { return _parser; }
} |
| 3755 |
| 3756 public static pbr::MessageDescriptor Descriptor { |
| 3757 get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.D
escriptor.MessageTypes[16]; } |
| 3758 } |
| 3759 |
| 3760 pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 3761 get { return Descriptor; } |
| 3762 } |
| 3763 |
| 3764 public MoreBytes() { |
| 3765 OnConstruction(); |
| 3766 } |
| 3767 |
| 3768 partial void OnConstruction(); |
| 3769 |
| 3770 public MoreBytes(MoreBytes other) : this() { |
| 3771 data_ = other.data_; |
| 3772 } |
| 3773 |
| 3774 public MoreBytes Clone() { |
| 3775 return new MoreBytes(this); |
| 3776 } |
| 3777 |
| 3778 /// <summary>Field number for the "data" field.</summary> |
| 3779 public const int DataFieldNumber = 1; |
| 3780 private pb::ByteString data_ = pb::ByteString.Empty; |
| 3781 public pb::ByteString Data { |
| 3782 get { return data_; } |
| 3783 set { |
| 3784 data_ = pb::Preconditions.CheckNotNull(value, "value"); |
| 3785 } |
| 3786 } |
| 3787 |
| 3788 public override bool Equals(object other) { |
| 3789 return Equals(other as MoreBytes); |
| 3790 } |
| 3791 |
| 3792 public bool Equals(MoreBytes other) { |
| 3793 if (ReferenceEquals(other, null)) { |
| 3794 return false; |
| 3795 } |
| 3796 if (ReferenceEquals(other, this)) { |
| 3797 return true; |
| 3798 } |
| 3799 if (Data != other.Data) return false; |
| 3800 return true; |
| 3801 } |
| 3802 |
| 3803 public override int GetHashCode() { |
| 3804 int hash = 1; |
| 3805 if (Data.Length != 0) hash ^= Data.GetHashCode(); |
| 3806 return hash; |
| 3807 } |
| 3808 |
| 3809 public override string ToString() { |
| 3810 return pb::JsonFormatter.ToDiagnosticString(this); |
| 3811 } |
| 3812 |
| 3813 public void WriteTo(pb::CodedOutputStream output) { |
| 3814 if (Data.Length != 0) { |
| 3815 output.WriteRawTag(10); |
| 3816 output.WriteBytes(Data); |
| 3817 } |
| 3818 } |
| 3819 |
| 3820 public int CalculateSize() { |
| 3821 int size = 0; |
| 3822 if (Data.Length != 0) { |
| 3823 size += 1 + pb::CodedOutputStream.ComputeBytesSize(Data); |
| 3824 } |
| 3825 return size; |
| 3826 } |
| 3827 |
| 3828 public void MergeFrom(MoreBytes other) { |
| 3829 if (other == null) { |
| 3830 return; |
| 3831 } |
| 3832 if (other.Data.Length != 0) { |
| 3833 Data = other.Data; |
| 3834 } |
| 3835 } |
| 3836 |
| 3837 public void MergeFrom(pb::CodedInputStream input) { |
| 3838 uint tag; |
| 3839 while ((tag = input.ReadTag()) != 0) { |
| 3840 switch(tag) { |
| 3841 default: |
| 3842 input.SkipLastField(); |
| 3843 break; |
| 3844 case 10: { |
| 3845 Data = input.ReadBytes(); |
| 3846 break; |
| 3847 } |
| 3848 } |
| 3849 } |
| 3850 } |
| 3851 |
| 3852 } |
| 3853 |
| 3854 /// <summary> |
| 3855 /// Test int32, uint32, int64, uint64, and bool are all compatible |
| 3856 /// </summary> |
| 3857 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 3858 public sealed partial class Int32Message : pb::IMessage<Int32Message> { |
| 3859 private static readonly pb::MessageParser<Int32Message> _parser = new pb::Me
ssageParser<Int32Message>(() => new Int32Message()); |
| 3860 public static pb::MessageParser<Int32Message> Parser { get { return _parser;
} } |
| 3861 |
| 3862 public static pbr::MessageDescriptor Descriptor { |
| 3863 get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.D
escriptor.MessageTypes[17]; } |
| 3864 } |
| 3865 |
| 3866 pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 3867 get { return Descriptor; } |
| 3868 } |
| 3869 |
| 3870 public Int32Message() { |
| 3871 OnConstruction(); |
| 3872 } |
| 3873 |
| 3874 partial void OnConstruction(); |
| 3875 |
| 3876 public Int32Message(Int32Message other) : this() { |
| 3877 data_ = other.data_; |
| 3878 } |
| 3879 |
| 3880 public Int32Message Clone() { |
| 3881 return new Int32Message(this); |
| 3882 } |
| 3883 |
| 3884 /// <summary>Field number for the "data" field.</summary> |
| 3885 public const int DataFieldNumber = 1; |
| 3886 private int data_; |
| 3887 public int Data { |
| 3888 get { return data_; } |
| 3889 set { |
| 3890 data_ = value; |
| 3891 } |
| 3892 } |
| 3893 |
| 3894 public override bool Equals(object other) { |
| 3895 return Equals(other as Int32Message); |
| 3896 } |
| 3897 |
| 3898 public bool Equals(Int32Message other) { |
| 3899 if (ReferenceEquals(other, null)) { |
| 3900 return false; |
| 3901 } |
| 3902 if (ReferenceEquals(other, this)) { |
| 3903 return true; |
| 3904 } |
| 3905 if (Data != other.Data) return false; |
| 3906 return true; |
| 3907 } |
| 3908 |
| 3909 public override int GetHashCode() { |
| 3910 int hash = 1; |
| 3911 if (Data != 0) hash ^= Data.GetHashCode(); |
| 3912 return hash; |
| 3913 } |
| 3914 |
| 3915 public override string ToString() { |
| 3916 return pb::JsonFormatter.ToDiagnosticString(this); |
| 3917 } |
| 3918 |
| 3919 public void WriteTo(pb::CodedOutputStream output) { |
| 3920 if (Data != 0) { |
| 3921 output.WriteRawTag(8); |
| 3922 output.WriteInt32(Data); |
| 3923 } |
| 3924 } |
| 3925 |
| 3926 public int CalculateSize() { |
| 3927 int size = 0; |
| 3928 if (Data != 0) { |
| 3929 size += 1 + pb::CodedOutputStream.ComputeInt32Size(Data); |
| 3930 } |
| 3931 return size; |
| 3932 } |
| 3933 |
| 3934 public void MergeFrom(Int32Message other) { |
| 3935 if (other == null) { |
| 3936 return; |
| 3937 } |
| 3938 if (other.Data != 0) { |
| 3939 Data = other.Data; |
| 3940 } |
| 3941 } |
| 3942 |
| 3943 public void MergeFrom(pb::CodedInputStream input) { |
| 3944 uint tag; |
| 3945 while ((tag = input.ReadTag()) != 0) { |
| 3946 switch(tag) { |
| 3947 default: |
| 3948 input.SkipLastField(); |
| 3949 break; |
| 3950 case 8: { |
| 3951 Data = input.ReadInt32(); |
| 3952 break; |
| 3953 } |
| 3954 } |
| 3955 } |
| 3956 } |
| 3957 |
| 3958 } |
| 3959 |
| 3960 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 3961 public sealed partial class Uint32Message : pb::IMessage<Uint32Message> { |
| 3962 private static readonly pb::MessageParser<Uint32Message> _parser = new pb::M
essageParser<Uint32Message>(() => new Uint32Message()); |
| 3963 public static pb::MessageParser<Uint32Message> Parser { get { return _parser
; } } |
| 3964 |
| 3965 public static pbr::MessageDescriptor Descriptor { |
| 3966 get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.D
escriptor.MessageTypes[18]; } |
| 3967 } |
| 3968 |
| 3969 pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 3970 get { return Descriptor; } |
| 3971 } |
| 3972 |
| 3973 public Uint32Message() { |
| 3974 OnConstruction(); |
| 3975 } |
| 3976 |
| 3977 partial void OnConstruction(); |
| 3978 |
| 3979 public Uint32Message(Uint32Message other) : this() { |
| 3980 data_ = other.data_; |
| 3981 } |
| 3982 |
| 3983 public Uint32Message Clone() { |
| 3984 return new Uint32Message(this); |
| 3985 } |
| 3986 |
| 3987 /// <summary>Field number for the "data" field.</summary> |
| 3988 public const int DataFieldNumber = 1; |
| 3989 private uint data_; |
| 3990 public uint Data { |
| 3991 get { return data_; } |
| 3992 set { |
| 3993 data_ = value; |
| 3994 } |
| 3995 } |
| 3996 |
| 3997 public override bool Equals(object other) { |
| 3998 return Equals(other as Uint32Message); |
| 3999 } |
| 4000 |
| 4001 public bool Equals(Uint32Message other) { |
| 4002 if (ReferenceEquals(other, null)) { |
| 4003 return false; |
| 4004 } |
| 4005 if (ReferenceEquals(other, this)) { |
| 4006 return true; |
| 4007 } |
| 4008 if (Data != other.Data) return false; |
| 4009 return true; |
| 4010 } |
| 4011 |
| 4012 public override int GetHashCode() { |
| 4013 int hash = 1; |
| 4014 if (Data != 0) hash ^= Data.GetHashCode(); |
| 4015 return hash; |
| 4016 } |
| 4017 |
| 4018 public override string ToString() { |
| 4019 return pb::JsonFormatter.ToDiagnosticString(this); |
| 4020 } |
| 4021 |
| 4022 public void WriteTo(pb::CodedOutputStream output) { |
| 4023 if (Data != 0) { |
| 4024 output.WriteRawTag(8); |
| 4025 output.WriteUInt32(Data); |
| 4026 } |
| 4027 } |
| 4028 |
| 4029 public int CalculateSize() { |
| 4030 int size = 0; |
| 4031 if (Data != 0) { |
| 4032 size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Data); |
| 4033 } |
| 4034 return size; |
| 4035 } |
| 4036 |
| 4037 public void MergeFrom(Uint32Message other) { |
| 4038 if (other == null) { |
| 4039 return; |
| 4040 } |
| 4041 if (other.Data != 0) { |
| 4042 Data = other.Data; |
| 4043 } |
| 4044 } |
| 4045 |
| 4046 public void MergeFrom(pb::CodedInputStream input) { |
| 4047 uint tag; |
| 4048 while ((tag = input.ReadTag()) != 0) { |
| 4049 switch(tag) { |
| 4050 default: |
| 4051 input.SkipLastField(); |
| 4052 break; |
| 4053 case 8: { |
| 4054 Data = input.ReadUInt32(); |
| 4055 break; |
| 4056 } |
| 4057 } |
| 4058 } |
| 4059 } |
| 4060 |
| 4061 } |
| 4062 |
| 4063 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 4064 public sealed partial class Int64Message : pb::IMessage<Int64Message> { |
| 4065 private static readonly pb::MessageParser<Int64Message> _parser = new pb::Me
ssageParser<Int64Message>(() => new Int64Message()); |
| 4066 public static pb::MessageParser<Int64Message> Parser { get { return _parser;
} } |
| 4067 |
| 4068 public static pbr::MessageDescriptor Descriptor { |
| 4069 get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.D
escriptor.MessageTypes[19]; } |
| 4070 } |
| 4071 |
| 4072 pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 4073 get { return Descriptor; } |
| 4074 } |
| 4075 |
| 4076 public Int64Message() { |
| 4077 OnConstruction(); |
| 4078 } |
| 4079 |
| 4080 partial void OnConstruction(); |
| 4081 |
| 4082 public Int64Message(Int64Message other) : this() { |
| 4083 data_ = other.data_; |
| 4084 } |
| 4085 |
| 4086 public Int64Message Clone() { |
| 4087 return new Int64Message(this); |
| 4088 } |
| 4089 |
| 4090 /// <summary>Field number for the "data" field.</summary> |
| 4091 public const int DataFieldNumber = 1; |
| 4092 private long data_; |
| 4093 public long Data { |
| 4094 get { return data_; } |
| 4095 set { |
| 4096 data_ = value; |
| 4097 } |
| 4098 } |
| 4099 |
| 4100 public override bool Equals(object other) { |
| 4101 return Equals(other as Int64Message); |
| 4102 } |
| 4103 |
| 4104 public bool Equals(Int64Message other) { |
| 4105 if (ReferenceEquals(other, null)) { |
| 4106 return false; |
| 4107 } |
| 4108 if (ReferenceEquals(other, this)) { |
| 4109 return true; |
| 4110 } |
| 4111 if (Data != other.Data) return false; |
| 4112 return true; |
| 4113 } |
| 4114 |
| 4115 public override int GetHashCode() { |
| 4116 int hash = 1; |
| 4117 if (Data != 0L) hash ^= Data.GetHashCode(); |
| 4118 return hash; |
| 4119 } |
| 4120 |
| 4121 public override string ToString() { |
| 4122 return pb::JsonFormatter.ToDiagnosticString(this); |
| 4123 } |
| 4124 |
| 4125 public void WriteTo(pb::CodedOutputStream output) { |
| 4126 if (Data != 0L) { |
| 4127 output.WriteRawTag(8); |
| 4128 output.WriteInt64(Data); |
| 4129 } |
| 4130 } |
| 4131 |
| 4132 public int CalculateSize() { |
| 4133 int size = 0; |
| 4134 if (Data != 0L) { |
| 4135 size += 1 + pb::CodedOutputStream.ComputeInt64Size(Data); |
| 4136 } |
| 4137 return size; |
| 4138 } |
| 4139 |
| 4140 public void MergeFrom(Int64Message other) { |
| 4141 if (other == null) { |
| 4142 return; |
| 4143 } |
| 4144 if (other.Data != 0L) { |
| 4145 Data = other.Data; |
| 4146 } |
| 4147 } |
| 4148 |
| 4149 public void MergeFrom(pb::CodedInputStream input) { |
| 4150 uint tag; |
| 4151 while ((tag = input.ReadTag()) != 0) { |
| 4152 switch(tag) { |
| 4153 default: |
| 4154 input.SkipLastField(); |
| 4155 break; |
| 4156 case 8: { |
| 4157 Data = input.ReadInt64(); |
| 4158 break; |
| 4159 } |
| 4160 } |
| 4161 } |
| 4162 } |
| 4163 |
| 4164 } |
| 4165 |
| 4166 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 4167 public sealed partial class Uint64Message : pb::IMessage<Uint64Message> { |
| 4168 private static readonly pb::MessageParser<Uint64Message> _parser = new pb::M
essageParser<Uint64Message>(() => new Uint64Message()); |
| 4169 public static pb::MessageParser<Uint64Message> Parser { get { return _parser
; } } |
| 4170 |
| 4171 public static pbr::MessageDescriptor Descriptor { |
| 4172 get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.D
escriptor.MessageTypes[20]; } |
| 4173 } |
| 4174 |
| 4175 pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 4176 get { return Descriptor; } |
| 4177 } |
| 4178 |
| 4179 public Uint64Message() { |
| 4180 OnConstruction(); |
| 4181 } |
| 4182 |
| 4183 partial void OnConstruction(); |
| 4184 |
| 4185 public Uint64Message(Uint64Message other) : this() { |
| 4186 data_ = other.data_; |
| 4187 } |
| 4188 |
| 4189 public Uint64Message Clone() { |
| 4190 return new Uint64Message(this); |
| 4191 } |
| 4192 |
| 4193 /// <summary>Field number for the "data" field.</summary> |
| 4194 public const int DataFieldNumber = 1; |
| 4195 private ulong data_; |
| 4196 public ulong Data { |
| 4197 get { return data_; } |
| 4198 set { |
| 4199 data_ = value; |
| 4200 } |
| 4201 } |
| 4202 |
| 4203 public override bool Equals(object other) { |
| 4204 return Equals(other as Uint64Message); |
| 4205 } |
| 4206 |
| 4207 public bool Equals(Uint64Message other) { |
| 4208 if (ReferenceEquals(other, null)) { |
| 4209 return false; |
| 4210 } |
| 4211 if (ReferenceEquals(other, this)) { |
| 4212 return true; |
| 4213 } |
| 4214 if (Data != other.Data) return false; |
| 4215 return true; |
| 4216 } |
| 4217 |
| 4218 public override int GetHashCode() { |
| 4219 int hash = 1; |
| 4220 if (Data != 0UL) hash ^= Data.GetHashCode(); |
| 4221 return hash; |
| 4222 } |
| 4223 |
| 4224 public override string ToString() { |
| 4225 return pb::JsonFormatter.ToDiagnosticString(this); |
| 4226 } |
| 4227 |
| 4228 public void WriteTo(pb::CodedOutputStream output) { |
| 4229 if (Data != 0UL) { |
| 4230 output.WriteRawTag(8); |
| 4231 output.WriteUInt64(Data); |
| 4232 } |
| 4233 } |
| 4234 |
| 4235 public int CalculateSize() { |
| 4236 int size = 0; |
| 4237 if (Data != 0UL) { |
| 4238 size += 1 + pb::CodedOutputStream.ComputeUInt64Size(Data); |
| 4239 } |
| 4240 return size; |
| 4241 } |
| 4242 |
| 4243 public void MergeFrom(Uint64Message other) { |
| 4244 if (other == null) { |
| 4245 return; |
| 4246 } |
| 4247 if (other.Data != 0UL) { |
| 4248 Data = other.Data; |
| 4249 } |
| 4250 } |
| 4251 |
| 4252 public void MergeFrom(pb::CodedInputStream input) { |
| 4253 uint tag; |
| 4254 while ((tag = input.ReadTag()) != 0) { |
| 4255 switch(tag) { |
| 4256 default: |
| 4257 input.SkipLastField(); |
| 4258 break; |
| 4259 case 8: { |
| 4260 Data = input.ReadUInt64(); |
| 4261 break; |
| 4262 } |
| 4263 } |
| 4264 } |
| 4265 } |
| 4266 |
| 4267 } |
| 4268 |
| 4269 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 4270 public sealed partial class BoolMessage : pb::IMessage<BoolMessage> { |
| 4271 private static readonly pb::MessageParser<BoolMessage> _parser = new pb::Mes
sageParser<BoolMessage>(() => new BoolMessage()); |
| 4272 public static pb::MessageParser<BoolMessage> Parser { get { return _parser;
} } |
| 4273 |
| 4274 public static pbr::MessageDescriptor Descriptor { |
| 4275 get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.D
escriptor.MessageTypes[21]; } |
| 4276 } |
| 4277 |
| 4278 pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 4279 get { return Descriptor; } |
| 4280 } |
| 4281 |
| 4282 public BoolMessage() { |
| 4283 OnConstruction(); |
| 4284 } |
| 4285 |
| 4286 partial void OnConstruction(); |
| 4287 |
| 4288 public BoolMessage(BoolMessage other) : this() { |
| 4289 data_ = other.data_; |
| 4290 } |
| 4291 |
| 4292 public BoolMessage Clone() { |
| 4293 return new BoolMessage(this); |
| 4294 } |
| 4295 |
| 4296 /// <summary>Field number for the "data" field.</summary> |
| 4297 public const int DataFieldNumber = 1; |
| 4298 private bool data_; |
| 4299 public bool Data { |
| 4300 get { return data_; } |
| 4301 set { |
| 4302 data_ = value; |
| 4303 } |
| 4304 } |
| 4305 |
| 4306 public override bool Equals(object other) { |
| 4307 return Equals(other as BoolMessage); |
| 4308 } |
| 4309 |
| 4310 public bool Equals(BoolMessage other) { |
| 4311 if (ReferenceEquals(other, null)) { |
| 4312 return false; |
| 4313 } |
| 4314 if (ReferenceEquals(other, this)) { |
| 4315 return true; |
| 4316 } |
| 4317 if (Data != other.Data) return false; |
| 4318 return true; |
| 4319 } |
| 4320 |
| 4321 public override int GetHashCode() { |
| 4322 int hash = 1; |
| 4323 if (Data != false) hash ^= Data.GetHashCode(); |
| 4324 return hash; |
| 4325 } |
| 4326 |
| 4327 public override string ToString() { |
| 4328 return pb::JsonFormatter.ToDiagnosticString(this); |
| 4329 } |
| 4330 |
| 4331 public void WriteTo(pb::CodedOutputStream output) { |
| 4332 if (Data != false) { |
| 4333 output.WriteRawTag(8); |
| 4334 output.WriteBool(Data); |
| 4335 } |
| 4336 } |
| 4337 |
| 4338 public int CalculateSize() { |
| 4339 int size = 0; |
| 4340 if (Data != false) { |
| 4341 size += 1 + 1; |
| 4342 } |
| 4343 return size; |
| 4344 } |
| 4345 |
| 4346 public void MergeFrom(BoolMessage other) { |
| 4347 if (other == null) { |
| 4348 return; |
| 4349 } |
| 4350 if (other.Data != false) { |
| 4351 Data = other.Data; |
| 4352 } |
| 4353 } |
| 4354 |
| 4355 public void MergeFrom(pb::CodedInputStream input) { |
| 4356 uint tag; |
| 4357 while ((tag = input.ReadTag()) != 0) { |
| 4358 switch(tag) { |
| 4359 default: |
| 4360 input.SkipLastField(); |
| 4361 break; |
| 4362 case 8: { |
| 4363 Data = input.ReadBool(); |
| 4364 break; |
| 4365 } |
| 4366 } |
| 4367 } |
| 4368 } |
| 4369 |
| 4370 } |
| 4371 |
| 4372 /// <summary> |
| 4373 /// Test oneofs. |
| 4374 /// </summary> |
| 4375 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 4376 public sealed partial class TestOneof : pb::IMessage<TestOneof> { |
| 4377 private static readonly pb::MessageParser<TestOneof> _parser = new pb::Messa
geParser<TestOneof>(() => new TestOneof()); |
| 4378 public static pb::MessageParser<TestOneof> Parser { get { return _parser; }
} |
| 4379 |
| 4380 public static pbr::MessageDescriptor Descriptor { |
| 4381 get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.D
escriptor.MessageTypes[22]; } |
| 4382 } |
| 4383 |
| 4384 pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 4385 get { return Descriptor; } |
| 4386 } |
| 4387 |
| 4388 public TestOneof() { |
| 4389 OnConstruction(); |
| 4390 } |
| 4391 |
| 4392 partial void OnConstruction(); |
| 4393 |
| 4394 public TestOneof(TestOneof other) : this() { |
| 4395 switch (other.FooCase) { |
| 4396 case FooOneofCase.FooInt: |
| 4397 FooInt = other.FooInt; |
| 4398 break; |
| 4399 case FooOneofCase.FooString: |
| 4400 FooString = other.FooString; |
| 4401 break; |
| 4402 case FooOneofCase.FooMessage: |
| 4403 FooMessage = other.FooMessage.Clone(); |
| 4404 break; |
| 4405 } |
| 4406 |
| 4407 } |
| 4408 |
| 4409 public TestOneof Clone() { |
| 4410 return new TestOneof(this); |
| 4411 } |
| 4412 |
| 4413 /// <summary>Field number for the "foo_int" field.</summary> |
| 4414 public const int FooIntFieldNumber = 1; |
| 4415 public int FooInt { |
| 4416 get { return fooCase_ == FooOneofCase.FooInt ? (int) foo_ : 0; } |
| 4417 set { |
| 4418 foo_ = value; |
| 4419 fooCase_ = FooOneofCase.FooInt; |
| 4420 } |
| 4421 } |
| 4422 |
| 4423 /// <summary>Field number for the "foo_string" field.</summary> |
| 4424 public const int FooStringFieldNumber = 2; |
| 4425 public string FooString { |
| 4426 get { return fooCase_ == FooOneofCase.FooString ? (string) foo_ : ""; } |
| 4427 set { |
| 4428 foo_ = pb::Preconditions.CheckNotNull(value, "value"); |
| 4429 fooCase_ = FooOneofCase.FooString; |
| 4430 } |
| 4431 } |
| 4432 |
| 4433 /// <summary>Field number for the "foo_message" field.</summary> |
| 4434 public const int FooMessageFieldNumber = 3; |
| 4435 public global::Google.Protobuf.TestProtos.TestAllTypes FooMessage { |
| 4436 get { return fooCase_ == FooOneofCase.FooMessage ? (global::Google.Protobu
f.TestProtos.TestAllTypes) foo_ : null; } |
| 4437 set { |
| 4438 foo_ = value; |
| 4439 fooCase_ = value == null ? FooOneofCase.None : FooOneofCase.FooMessage; |
| 4440 } |
| 4441 } |
| 4442 |
| 4443 private object foo_; |
| 4444 /// <summary>Enum of possible cases for the "foo" oneof.</summary> |
| 4445 public enum FooOneofCase { |
| 4446 None = 0, |
| 4447 FooInt = 1, |
| 4448 FooString = 2, |
| 4449 FooMessage = 3, |
| 4450 } |
| 4451 private FooOneofCase fooCase_ = FooOneofCase.None; |
| 4452 public FooOneofCase FooCase { |
| 4453 get { return fooCase_; } |
| 4454 } |
| 4455 |
| 4456 public void ClearFoo() { |
| 4457 fooCase_ = FooOneofCase.None; |
| 4458 foo_ = null; |
| 4459 } |
| 4460 |
| 4461 public override bool Equals(object other) { |
| 4462 return Equals(other as TestOneof); |
| 4463 } |
| 4464 |
| 4465 public bool Equals(TestOneof other) { |
| 4466 if (ReferenceEquals(other, null)) { |
| 4467 return false; |
| 4468 } |
| 4469 if (ReferenceEquals(other, this)) { |
| 4470 return true; |
| 4471 } |
| 4472 if (FooInt != other.FooInt) return false; |
| 4473 if (FooString != other.FooString) return false; |
| 4474 if (!object.Equals(FooMessage, other.FooMessage)) return false; |
| 4475 if (FooCase != other.FooCase) return false; |
| 4476 return true; |
| 4477 } |
| 4478 |
| 4479 public override int GetHashCode() { |
| 4480 int hash = 1; |
| 4481 if (fooCase_ == FooOneofCase.FooInt) hash ^= FooInt.GetHashCode(); |
| 4482 if (fooCase_ == FooOneofCase.FooString) hash ^= FooString.GetHashCode(); |
| 4483 if (fooCase_ == FooOneofCase.FooMessage) hash ^= FooMessage.GetHashCode(); |
| 4484 hash ^= (int) fooCase_; |
| 4485 return hash; |
| 4486 } |
| 4487 |
| 4488 public override string ToString() { |
| 4489 return pb::JsonFormatter.ToDiagnosticString(this); |
| 4490 } |
| 4491 |
| 4492 public void WriteTo(pb::CodedOutputStream output) { |
| 4493 if (fooCase_ == FooOneofCase.FooInt) { |
| 4494 output.WriteRawTag(8); |
| 4495 output.WriteInt32(FooInt); |
| 4496 } |
| 4497 if (fooCase_ == FooOneofCase.FooString) { |
| 4498 output.WriteRawTag(18); |
| 4499 output.WriteString(FooString); |
| 4500 } |
| 4501 if (fooCase_ == FooOneofCase.FooMessage) { |
| 4502 output.WriteRawTag(26); |
| 4503 output.WriteMessage(FooMessage); |
| 4504 } |
| 4505 } |
| 4506 |
| 4507 public int CalculateSize() { |
| 4508 int size = 0; |
| 4509 if (fooCase_ == FooOneofCase.FooInt) { |
| 4510 size += 1 + pb::CodedOutputStream.ComputeInt32Size(FooInt); |
| 4511 } |
| 4512 if (fooCase_ == FooOneofCase.FooString) { |
| 4513 size += 1 + pb::CodedOutputStream.ComputeStringSize(FooString); |
| 4514 } |
| 4515 if (fooCase_ == FooOneofCase.FooMessage) { |
| 4516 size += 1 + pb::CodedOutputStream.ComputeMessageSize(FooMessage); |
| 4517 } |
| 4518 return size; |
| 4519 } |
| 4520 |
| 4521 public void MergeFrom(TestOneof other) { |
| 4522 if (other == null) { |
| 4523 return; |
| 4524 } |
| 4525 switch (other.FooCase) { |
| 4526 case FooOneofCase.FooInt: |
| 4527 FooInt = other.FooInt; |
| 4528 break; |
| 4529 case FooOneofCase.FooString: |
| 4530 FooString = other.FooString; |
| 4531 break; |
| 4532 case FooOneofCase.FooMessage: |
| 4533 FooMessage = other.FooMessage; |
| 4534 break; |
| 4535 } |
| 4536 |
| 4537 } |
| 4538 |
| 4539 public void MergeFrom(pb::CodedInputStream input) { |
| 4540 uint tag; |
| 4541 while ((tag = input.ReadTag()) != 0) { |
| 4542 switch(tag) { |
| 4543 default: |
| 4544 input.SkipLastField(); |
| 4545 break; |
| 4546 case 8: { |
| 4547 FooInt = input.ReadInt32(); |
| 4548 break; |
| 4549 } |
| 4550 case 18: { |
| 4551 FooString = input.ReadString(); |
| 4552 break; |
| 4553 } |
| 4554 case 26: { |
| 4555 global::Google.Protobuf.TestProtos.TestAllTypes subBuilder = new glo
bal::Google.Protobuf.TestProtos.TestAllTypes(); |
| 4556 if (fooCase_ == FooOneofCase.FooMessage) { |
| 4557 subBuilder.MergeFrom(FooMessage); |
| 4558 } |
| 4559 input.ReadMessage(subBuilder); |
| 4560 FooMessage = subBuilder; |
| 4561 break; |
| 4562 } |
| 4563 } |
| 4564 } |
| 4565 } |
| 4566 |
| 4567 } |
| 4568 |
| 4569 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 4570 public sealed partial class TestPackedTypes : pb::IMessage<TestPackedTypes> { |
| 4571 private static readonly pb::MessageParser<TestPackedTypes> _parser = new pb:
:MessageParser<TestPackedTypes>(() => new TestPackedTypes()); |
| 4572 public static pb::MessageParser<TestPackedTypes> Parser { get { return _pars
er; } } |
| 4573 |
| 4574 public static pbr::MessageDescriptor Descriptor { |
| 4575 get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.D
escriptor.MessageTypes[23]; } |
| 4576 } |
| 4577 |
| 4578 pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 4579 get { return Descriptor; } |
| 4580 } |
| 4581 |
| 4582 public TestPackedTypes() { |
| 4583 OnConstruction(); |
| 4584 } |
| 4585 |
| 4586 partial void OnConstruction(); |
| 4587 |
| 4588 public TestPackedTypes(TestPackedTypes other) : this() { |
| 4589 packedInt32_ = other.packedInt32_.Clone(); |
| 4590 packedInt64_ = other.packedInt64_.Clone(); |
| 4591 packedUint32_ = other.packedUint32_.Clone(); |
| 4592 packedUint64_ = other.packedUint64_.Clone(); |
| 4593 packedSint32_ = other.packedSint32_.Clone(); |
| 4594 packedSint64_ = other.packedSint64_.Clone(); |
| 4595 packedFixed32_ = other.packedFixed32_.Clone(); |
| 4596 packedFixed64_ = other.packedFixed64_.Clone(); |
| 4597 packedSfixed32_ = other.packedSfixed32_.Clone(); |
| 4598 packedSfixed64_ = other.packedSfixed64_.Clone(); |
| 4599 packedFloat_ = other.packedFloat_.Clone(); |
| 4600 packedDouble_ = other.packedDouble_.Clone(); |
| 4601 packedBool_ = other.packedBool_.Clone(); |
| 4602 packedEnum_ = other.packedEnum_.Clone(); |
| 4603 } |
| 4604 |
| 4605 public TestPackedTypes Clone() { |
| 4606 return new TestPackedTypes(this); |
| 4607 } |
| 4608 |
| 4609 /// <summary>Field number for the "packed_int32" field.</summary> |
| 4610 public const int PackedInt32FieldNumber = 90; |
| 4611 private static readonly pb::FieldCodec<int> _repeated_packedInt32_codec |
| 4612 = pb::FieldCodec.ForInt32(722); |
| 4613 private readonly pbc::RepeatedField<int> packedInt32_ = new pbc::RepeatedFie
ld<int>(); |
| 4614 public pbc::RepeatedField<int> PackedInt32 { |
| 4615 get { return packedInt32_; } |
| 4616 } |
| 4617 |
| 4618 /// <summary>Field number for the "packed_int64" field.</summary> |
| 4619 public const int PackedInt64FieldNumber = 91; |
| 4620 private static readonly pb::FieldCodec<long> _repeated_packedInt64_codec |
| 4621 = pb::FieldCodec.ForInt64(730); |
| 4622 private readonly pbc::RepeatedField<long> packedInt64_ = new pbc::RepeatedFi
eld<long>(); |
| 4623 public pbc::RepeatedField<long> PackedInt64 { |
| 4624 get { return packedInt64_; } |
| 4625 } |
| 4626 |
| 4627 /// <summary>Field number for the "packed_uint32" field.</summary> |
| 4628 public const int PackedUint32FieldNumber = 92; |
| 4629 private static readonly pb::FieldCodec<uint> _repeated_packedUint32_codec |
| 4630 = pb::FieldCodec.ForUInt32(738); |
| 4631 private readonly pbc::RepeatedField<uint> packedUint32_ = new pbc::RepeatedF
ield<uint>(); |
| 4632 public pbc::RepeatedField<uint> PackedUint32 { |
| 4633 get { return packedUint32_; } |
| 4634 } |
| 4635 |
| 4636 /// <summary>Field number for the "packed_uint64" field.</summary> |
| 4637 public const int PackedUint64FieldNumber = 93; |
| 4638 private static readonly pb::FieldCodec<ulong> _repeated_packedUint64_codec |
| 4639 = pb::FieldCodec.ForUInt64(746); |
| 4640 private readonly pbc::RepeatedField<ulong> packedUint64_ = new pbc::Repeated
Field<ulong>(); |
| 4641 public pbc::RepeatedField<ulong> PackedUint64 { |
| 4642 get { return packedUint64_; } |
| 4643 } |
| 4644 |
| 4645 /// <summary>Field number for the "packed_sint32" field.</summary> |
| 4646 public const int PackedSint32FieldNumber = 94; |
| 4647 private static readonly pb::FieldCodec<int> _repeated_packedSint32_codec |
| 4648 = pb::FieldCodec.ForSInt32(754); |
| 4649 private readonly pbc::RepeatedField<int> packedSint32_ = new pbc::RepeatedFi
eld<int>(); |
| 4650 public pbc::RepeatedField<int> PackedSint32 { |
| 4651 get { return packedSint32_; } |
| 4652 } |
| 4653 |
| 4654 /// <summary>Field number for the "packed_sint64" field.</summary> |
| 4655 public const int PackedSint64FieldNumber = 95; |
| 4656 private static readonly pb::FieldCodec<long> _repeated_packedSint64_codec |
| 4657 = pb::FieldCodec.ForSInt64(762); |
| 4658 private readonly pbc::RepeatedField<long> packedSint64_ = new pbc::RepeatedF
ield<long>(); |
| 4659 public pbc::RepeatedField<long> PackedSint64 { |
| 4660 get { return packedSint64_; } |
| 4661 } |
| 4662 |
| 4663 /// <summary>Field number for the "packed_fixed32" field.</summary> |
| 4664 public const int PackedFixed32FieldNumber = 96; |
| 4665 private static readonly pb::FieldCodec<uint> _repeated_packedFixed32_codec |
| 4666 = pb::FieldCodec.ForFixed32(770); |
| 4667 private readonly pbc::RepeatedField<uint> packedFixed32_ = new pbc::Repeated
Field<uint>(); |
| 4668 public pbc::RepeatedField<uint> PackedFixed32 { |
| 4669 get { return packedFixed32_; } |
| 4670 } |
| 4671 |
| 4672 /// <summary>Field number for the "packed_fixed64" field.</summary> |
| 4673 public const int PackedFixed64FieldNumber = 97; |
| 4674 private static readonly pb::FieldCodec<ulong> _repeated_packedFixed64_codec |
| 4675 = pb::FieldCodec.ForFixed64(778); |
| 4676 private readonly pbc::RepeatedField<ulong> packedFixed64_ = new pbc::Repeate
dField<ulong>(); |
| 4677 public pbc::RepeatedField<ulong> PackedFixed64 { |
| 4678 get { return packedFixed64_; } |
| 4679 } |
| 4680 |
| 4681 /// <summary>Field number for the "packed_sfixed32" field.</summary> |
| 4682 public const int PackedSfixed32FieldNumber = 98; |
| 4683 private static readonly pb::FieldCodec<int> _repeated_packedSfixed32_codec |
| 4684 = pb::FieldCodec.ForSFixed32(786); |
| 4685 private readonly pbc::RepeatedField<int> packedSfixed32_ = new pbc::Repeated
Field<int>(); |
| 4686 public pbc::RepeatedField<int> PackedSfixed32 { |
| 4687 get { return packedSfixed32_; } |
| 4688 } |
| 4689 |
| 4690 /// <summary>Field number for the "packed_sfixed64" field.</summary> |
| 4691 public const int PackedSfixed64FieldNumber = 99; |
| 4692 private static readonly pb::FieldCodec<long> _repeated_packedSfixed64_codec |
| 4693 = pb::FieldCodec.ForSFixed64(794); |
| 4694 private readonly pbc::RepeatedField<long> packedSfixed64_ = new pbc::Repeate
dField<long>(); |
| 4695 public pbc::RepeatedField<long> PackedSfixed64 { |
| 4696 get { return packedSfixed64_; } |
| 4697 } |
| 4698 |
| 4699 /// <summary>Field number for the "packed_float" field.</summary> |
| 4700 public const int PackedFloatFieldNumber = 100; |
| 4701 private static readonly pb::FieldCodec<float> _repeated_packedFloat_codec |
| 4702 = pb::FieldCodec.ForFloat(802); |
| 4703 private readonly pbc::RepeatedField<float> packedFloat_ = new pbc::RepeatedF
ield<float>(); |
| 4704 public pbc::RepeatedField<float> PackedFloat { |
| 4705 get { return packedFloat_; } |
| 4706 } |
| 4707 |
| 4708 /// <summary>Field number for the "packed_double" field.</summary> |
| 4709 public const int PackedDoubleFieldNumber = 101; |
| 4710 private static readonly pb::FieldCodec<double> _repeated_packedDouble_codec |
| 4711 = pb::FieldCodec.ForDouble(810); |
| 4712 private readonly pbc::RepeatedField<double> packedDouble_ = new pbc::Repeate
dField<double>(); |
| 4713 public pbc::RepeatedField<double> PackedDouble { |
| 4714 get { return packedDouble_; } |
| 4715 } |
| 4716 |
| 4717 /// <summary>Field number for the "packed_bool" field.</summary> |
| 4718 public const int PackedBoolFieldNumber = 102; |
| 4719 private static readonly pb::FieldCodec<bool> _repeated_packedBool_codec |
| 4720 = pb::FieldCodec.ForBool(818); |
| 4721 private readonly pbc::RepeatedField<bool> packedBool_ = new pbc::RepeatedFie
ld<bool>(); |
| 4722 public pbc::RepeatedField<bool> PackedBool { |
| 4723 get { return packedBool_; } |
| 4724 } |
| 4725 |
| 4726 /// <summary>Field number for the "packed_enum" field.</summary> |
| 4727 public const int PackedEnumFieldNumber = 103; |
| 4728 private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.Fo
reignEnum> _repeated_packedEnum_codec |
| 4729 = pb::FieldCodec.ForEnum(826, x => (int) x, x => (global::Google.Protobu
f.TestProtos.ForeignEnum) x); |
| 4730 private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.Forei
gnEnum> packedEnum_ = new pbc::RepeatedField<global::Google.Protobuf.TestProtos.
ForeignEnum>(); |
| 4731 public pbc::RepeatedField<global::Google.Protobuf.TestProtos.ForeignEnum> Pa
ckedEnum { |
| 4732 get { return packedEnum_; } |
| 4733 } |
| 4734 |
| 4735 public override bool Equals(object other) { |
| 4736 return Equals(other as TestPackedTypes); |
| 4737 } |
| 4738 |
| 4739 public bool Equals(TestPackedTypes other) { |
| 4740 if (ReferenceEquals(other, null)) { |
| 4741 return false; |
| 4742 } |
| 4743 if (ReferenceEquals(other, this)) { |
| 4744 return true; |
| 4745 } |
| 4746 if(!packedInt32_.Equals(other.packedInt32_)) return false; |
| 4747 if(!packedInt64_.Equals(other.packedInt64_)) return false; |
| 4748 if(!packedUint32_.Equals(other.packedUint32_)) return false; |
| 4749 if(!packedUint64_.Equals(other.packedUint64_)) return false; |
| 4750 if(!packedSint32_.Equals(other.packedSint32_)) return false; |
| 4751 if(!packedSint64_.Equals(other.packedSint64_)) return false; |
| 4752 if(!packedFixed32_.Equals(other.packedFixed32_)) return false; |
| 4753 if(!packedFixed64_.Equals(other.packedFixed64_)) return false; |
| 4754 if(!packedSfixed32_.Equals(other.packedSfixed32_)) return false; |
| 4755 if(!packedSfixed64_.Equals(other.packedSfixed64_)) return false; |
| 4756 if(!packedFloat_.Equals(other.packedFloat_)) return false; |
| 4757 if(!packedDouble_.Equals(other.packedDouble_)) return false; |
| 4758 if(!packedBool_.Equals(other.packedBool_)) return false; |
| 4759 if(!packedEnum_.Equals(other.packedEnum_)) return false; |
| 4760 return true; |
| 4761 } |
| 4762 |
| 4763 public override int GetHashCode() { |
| 4764 int hash = 1; |
| 4765 hash ^= packedInt32_.GetHashCode(); |
| 4766 hash ^= packedInt64_.GetHashCode(); |
| 4767 hash ^= packedUint32_.GetHashCode(); |
| 4768 hash ^= packedUint64_.GetHashCode(); |
| 4769 hash ^= packedSint32_.GetHashCode(); |
| 4770 hash ^= packedSint64_.GetHashCode(); |
| 4771 hash ^= packedFixed32_.GetHashCode(); |
| 4772 hash ^= packedFixed64_.GetHashCode(); |
| 4773 hash ^= packedSfixed32_.GetHashCode(); |
| 4774 hash ^= packedSfixed64_.GetHashCode(); |
| 4775 hash ^= packedFloat_.GetHashCode(); |
| 4776 hash ^= packedDouble_.GetHashCode(); |
| 4777 hash ^= packedBool_.GetHashCode(); |
| 4778 hash ^= packedEnum_.GetHashCode(); |
| 4779 return hash; |
| 4780 } |
| 4781 |
| 4782 public override string ToString() { |
| 4783 return pb::JsonFormatter.ToDiagnosticString(this); |
| 4784 } |
| 4785 |
| 4786 public void WriteTo(pb::CodedOutputStream output) { |
| 4787 packedInt32_.WriteTo(output, _repeated_packedInt32_codec); |
| 4788 packedInt64_.WriteTo(output, _repeated_packedInt64_codec); |
| 4789 packedUint32_.WriteTo(output, _repeated_packedUint32_codec); |
| 4790 packedUint64_.WriteTo(output, _repeated_packedUint64_codec); |
| 4791 packedSint32_.WriteTo(output, _repeated_packedSint32_codec); |
| 4792 packedSint64_.WriteTo(output, _repeated_packedSint64_codec); |
| 4793 packedFixed32_.WriteTo(output, _repeated_packedFixed32_codec); |
| 4794 packedFixed64_.WriteTo(output, _repeated_packedFixed64_codec); |
| 4795 packedSfixed32_.WriteTo(output, _repeated_packedSfixed32_codec); |
| 4796 packedSfixed64_.WriteTo(output, _repeated_packedSfixed64_codec); |
| 4797 packedFloat_.WriteTo(output, _repeated_packedFloat_codec); |
| 4798 packedDouble_.WriteTo(output, _repeated_packedDouble_codec); |
| 4799 packedBool_.WriteTo(output, _repeated_packedBool_codec); |
| 4800 packedEnum_.WriteTo(output, _repeated_packedEnum_codec); |
| 4801 } |
| 4802 |
| 4803 public int CalculateSize() { |
| 4804 int size = 0; |
| 4805 size += packedInt32_.CalculateSize(_repeated_packedInt32_codec); |
| 4806 size += packedInt64_.CalculateSize(_repeated_packedInt64_codec); |
| 4807 size += packedUint32_.CalculateSize(_repeated_packedUint32_codec); |
| 4808 size += packedUint64_.CalculateSize(_repeated_packedUint64_codec); |
| 4809 size += packedSint32_.CalculateSize(_repeated_packedSint32_codec); |
| 4810 size += packedSint64_.CalculateSize(_repeated_packedSint64_codec); |
| 4811 size += packedFixed32_.CalculateSize(_repeated_packedFixed32_codec); |
| 4812 size += packedFixed64_.CalculateSize(_repeated_packedFixed64_codec); |
| 4813 size += packedSfixed32_.CalculateSize(_repeated_packedSfixed32_codec); |
| 4814 size += packedSfixed64_.CalculateSize(_repeated_packedSfixed64_codec); |
| 4815 size += packedFloat_.CalculateSize(_repeated_packedFloat_codec); |
| 4816 size += packedDouble_.CalculateSize(_repeated_packedDouble_codec); |
| 4817 size += packedBool_.CalculateSize(_repeated_packedBool_codec); |
| 4818 size += packedEnum_.CalculateSize(_repeated_packedEnum_codec); |
| 4819 return size; |
| 4820 } |
| 4821 |
| 4822 public void MergeFrom(TestPackedTypes other) { |
| 4823 if (other == null) { |
| 4824 return; |
| 4825 } |
| 4826 packedInt32_.Add(other.packedInt32_); |
| 4827 packedInt64_.Add(other.packedInt64_); |
| 4828 packedUint32_.Add(other.packedUint32_); |
| 4829 packedUint64_.Add(other.packedUint64_); |
| 4830 packedSint32_.Add(other.packedSint32_); |
| 4831 packedSint64_.Add(other.packedSint64_); |
| 4832 packedFixed32_.Add(other.packedFixed32_); |
| 4833 packedFixed64_.Add(other.packedFixed64_); |
| 4834 packedSfixed32_.Add(other.packedSfixed32_); |
| 4835 packedSfixed64_.Add(other.packedSfixed64_); |
| 4836 packedFloat_.Add(other.packedFloat_); |
| 4837 packedDouble_.Add(other.packedDouble_); |
| 4838 packedBool_.Add(other.packedBool_); |
| 4839 packedEnum_.Add(other.packedEnum_); |
| 4840 } |
| 4841 |
| 4842 public void MergeFrom(pb::CodedInputStream input) { |
| 4843 uint tag; |
| 4844 while ((tag = input.ReadTag()) != 0) { |
| 4845 switch(tag) { |
| 4846 default: |
| 4847 input.SkipLastField(); |
| 4848 break; |
| 4849 case 722: |
| 4850 case 720: { |
| 4851 packedInt32_.AddEntriesFrom(input, _repeated_packedInt32_codec); |
| 4852 break; |
| 4853 } |
| 4854 case 730: |
| 4855 case 728: { |
| 4856 packedInt64_.AddEntriesFrom(input, _repeated_packedInt64_codec); |
| 4857 break; |
| 4858 } |
| 4859 case 738: |
| 4860 case 736: { |
| 4861 packedUint32_.AddEntriesFrom(input, _repeated_packedUint32_codec); |
| 4862 break; |
| 4863 } |
| 4864 case 746: |
| 4865 case 744: { |
| 4866 packedUint64_.AddEntriesFrom(input, _repeated_packedUint64_codec); |
| 4867 break; |
| 4868 } |
| 4869 case 754: |
| 4870 case 752: { |
| 4871 packedSint32_.AddEntriesFrom(input, _repeated_packedSint32_codec); |
| 4872 break; |
| 4873 } |
| 4874 case 762: |
| 4875 case 760: { |
| 4876 packedSint64_.AddEntriesFrom(input, _repeated_packedSint64_codec); |
| 4877 break; |
| 4878 } |
| 4879 case 770: |
| 4880 case 773: { |
| 4881 packedFixed32_.AddEntriesFrom(input, _repeated_packedFixed32_codec); |
| 4882 break; |
| 4883 } |
| 4884 case 778: |
| 4885 case 777: { |
| 4886 packedFixed64_.AddEntriesFrom(input, _repeated_packedFixed64_codec); |
| 4887 break; |
| 4888 } |
| 4889 case 786: |
| 4890 case 789: { |
| 4891 packedSfixed32_.AddEntriesFrom(input, _repeated_packedSfixed32_codec
); |
| 4892 break; |
| 4893 } |
| 4894 case 794: |
| 4895 case 793: { |
| 4896 packedSfixed64_.AddEntriesFrom(input, _repeated_packedSfixed64_codec
); |
| 4897 break; |
| 4898 } |
| 4899 case 802: |
| 4900 case 805: { |
| 4901 packedFloat_.AddEntriesFrom(input, _repeated_packedFloat_codec); |
| 4902 break; |
| 4903 } |
| 4904 case 810: |
| 4905 case 809: { |
| 4906 packedDouble_.AddEntriesFrom(input, _repeated_packedDouble_codec); |
| 4907 break; |
| 4908 } |
| 4909 case 818: |
| 4910 case 816: { |
| 4911 packedBool_.AddEntriesFrom(input, _repeated_packedBool_codec); |
| 4912 break; |
| 4913 } |
| 4914 case 826: |
| 4915 case 824: { |
| 4916 packedEnum_.AddEntriesFrom(input, _repeated_packedEnum_codec); |
| 4917 break; |
| 4918 } |
| 4919 } |
| 4920 } |
| 4921 } |
| 4922 |
| 4923 } |
| 4924 |
| 4925 /// <summary> |
| 4926 /// A message with the same fields as TestPackedTypes, but without packing. U
sed |
| 4927 /// to test packed <-> unpacked wire compatibility. |
| 4928 /// </summary> |
| 4929 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 4930 public sealed partial class TestUnpackedTypes : pb::IMessage<TestUnpackedTypes
> { |
| 4931 private static readonly pb::MessageParser<TestUnpackedTypes> _parser = new p
b::MessageParser<TestUnpackedTypes>(() => new TestUnpackedTypes()); |
| 4932 public static pb::MessageParser<TestUnpackedTypes> Parser { get { return _pa
rser; } } |
| 4933 |
| 4934 public static pbr::MessageDescriptor Descriptor { |
| 4935 get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.D
escriptor.MessageTypes[24]; } |
| 4936 } |
| 4937 |
| 4938 pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 4939 get { return Descriptor; } |
| 4940 } |
| 4941 |
| 4942 public TestUnpackedTypes() { |
| 4943 OnConstruction(); |
| 4944 } |
| 4945 |
| 4946 partial void OnConstruction(); |
| 4947 |
| 4948 public TestUnpackedTypes(TestUnpackedTypes other) : this() { |
| 4949 unpackedInt32_ = other.unpackedInt32_.Clone(); |
| 4950 unpackedInt64_ = other.unpackedInt64_.Clone(); |
| 4951 unpackedUint32_ = other.unpackedUint32_.Clone(); |
| 4952 unpackedUint64_ = other.unpackedUint64_.Clone(); |
| 4953 unpackedSint32_ = other.unpackedSint32_.Clone(); |
| 4954 unpackedSint64_ = other.unpackedSint64_.Clone(); |
| 4955 unpackedFixed32_ = other.unpackedFixed32_.Clone(); |
| 4956 unpackedFixed64_ = other.unpackedFixed64_.Clone(); |
| 4957 unpackedSfixed32_ = other.unpackedSfixed32_.Clone(); |
| 4958 unpackedSfixed64_ = other.unpackedSfixed64_.Clone(); |
| 4959 unpackedFloat_ = other.unpackedFloat_.Clone(); |
| 4960 unpackedDouble_ = other.unpackedDouble_.Clone(); |
| 4961 unpackedBool_ = other.unpackedBool_.Clone(); |
| 4962 unpackedEnum_ = other.unpackedEnum_.Clone(); |
| 4963 } |
| 4964 |
| 4965 public TestUnpackedTypes Clone() { |
| 4966 return new TestUnpackedTypes(this); |
| 4967 } |
| 4968 |
| 4969 /// <summary>Field number for the "unpacked_int32" field.</summary> |
| 4970 public const int UnpackedInt32FieldNumber = 90; |
| 4971 private static readonly pb::FieldCodec<int> _repeated_unpackedInt32_codec |
| 4972 = pb::FieldCodec.ForInt32(720); |
| 4973 private readonly pbc::RepeatedField<int> unpackedInt32_ = new pbc::RepeatedF
ield<int>(); |
| 4974 public pbc::RepeatedField<int> UnpackedInt32 { |
| 4975 get { return unpackedInt32_; } |
| 4976 } |
| 4977 |
| 4978 /// <summary>Field number for the "unpacked_int64" field.</summary> |
| 4979 public const int UnpackedInt64FieldNumber = 91; |
| 4980 private static readonly pb::FieldCodec<long> _repeated_unpackedInt64_codec |
| 4981 = pb::FieldCodec.ForInt64(728); |
| 4982 private readonly pbc::RepeatedField<long> unpackedInt64_ = new pbc::Repeated
Field<long>(); |
| 4983 public pbc::RepeatedField<long> UnpackedInt64 { |
| 4984 get { return unpackedInt64_; } |
| 4985 } |
| 4986 |
| 4987 /// <summary>Field number for the "unpacked_uint32" field.</summary> |
| 4988 public const int UnpackedUint32FieldNumber = 92; |
| 4989 private static readonly pb::FieldCodec<uint> _repeated_unpackedUint32_codec |
| 4990 = pb::FieldCodec.ForUInt32(736); |
| 4991 private readonly pbc::RepeatedField<uint> unpackedUint32_ = new pbc::Repeate
dField<uint>(); |
| 4992 public pbc::RepeatedField<uint> UnpackedUint32 { |
| 4993 get { return unpackedUint32_; } |
| 4994 } |
| 4995 |
| 4996 /// <summary>Field number for the "unpacked_uint64" field.</summary> |
| 4997 public const int UnpackedUint64FieldNumber = 93; |
| 4998 private static readonly pb::FieldCodec<ulong> _repeated_unpackedUint64_codec |
| 4999 = pb::FieldCodec.ForUInt64(744); |
| 5000 private readonly pbc::RepeatedField<ulong> unpackedUint64_ = new pbc::Repeat
edField<ulong>(); |
| 5001 public pbc::RepeatedField<ulong> UnpackedUint64 { |
| 5002 get { return unpackedUint64_; } |
| 5003 } |
| 5004 |
| 5005 /// <summary>Field number for the "unpacked_sint32" field.</summary> |
| 5006 public const int UnpackedSint32FieldNumber = 94; |
| 5007 private static readonly pb::FieldCodec<int> _repeated_unpackedSint32_codec |
| 5008 = pb::FieldCodec.ForSInt32(752); |
| 5009 private readonly pbc::RepeatedField<int> unpackedSint32_ = new pbc::Repeated
Field<int>(); |
| 5010 public pbc::RepeatedField<int> UnpackedSint32 { |
| 5011 get { return unpackedSint32_; } |
| 5012 } |
| 5013 |
| 5014 /// <summary>Field number for the "unpacked_sint64" field.</summary> |
| 5015 public const int UnpackedSint64FieldNumber = 95; |
| 5016 private static readonly pb::FieldCodec<long> _repeated_unpackedSint64_codec |
| 5017 = pb::FieldCodec.ForSInt64(760); |
| 5018 private readonly pbc::RepeatedField<long> unpackedSint64_ = new pbc::Repeate
dField<long>(); |
| 5019 public pbc::RepeatedField<long> UnpackedSint64 { |
| 5020 get { return unpackedSint64_; } |
| 5021 } |
| 5022 |
| 5023 /// <summary>Field number for the "unpacked_fixed32" field.</summary> |
| 5024 public const int UnpackedFixed32FieldNumber = 96; |
| 5025 private static readonly pb::FieldCodec<uint> _repeated_unpackedFixed32_codec |
| 5026 = pb::FieldCodec.ForFixed32(773); |
| 5027 private readonly pbc::RepeatedField<uint> unpackedFixed32_ = new pbc::Repeat
edField<uint>(); |
| 5028 public pbc::RepeatedField<uint> UnpackedFixed32 { |
| 5029 get { return unpackedFixed32_; } |
| 5030 } |
| 5031 |
| 5032 /// <summary>Field number for the "unpacked_fixed64" field.</summary> |
| 5033 public const int UnpackedFixed64FieldNumber = 97; |
| 5034 private static readonly pb::FieldCodec<ulong> _repeated_unpackedFixed64_code
c |
| 5035 = pb::FieldCodec.ForFixed64(777); |
| 5036 private readonly pbc::RepeatedField<ulong> unpackedFixed64_ = new pbc::Repea
tedField<ulong>(); |
| 5037 public pbc::RepeatedField<ulong> UnpackedFixed64 { |
| 5038 get { return unpackedFixed64_; } |
| 5039 } |
| 5040 |
| 5041 /// <summary>Field number for the "unpacked_sfixed32" field.</summary> |
| 5042 public const int UnpackedSfixed32FieldNumber = 98; |
| 5043 private static readonly pb::FieldCodec<int> _repeated_unpackedSfixed32_codec |
| 5044 = pb::FieldCodec.ForSFixed32(789); |
| 5045 private readonly pbc::RepeatedField<int> unpackedSfixed32_ = new pbc::Repeat
edField<int>(); |
| 5046 public pbc::RepeatedField<int> UnpackedSfixed32 { |
| 5047 get { return unpackedSfixed32_; } |
| 5048 } |
| 5049 |
| 5050 /// <summary>Field number for the "unpacked_sfixed64" field.</summary> |
| 5051 public const int UnpackedSfixed64FieldNumber = 99; |
| 5052 private static readonly pb::FieldCodec<long> _repeated_unpackedSfixed64_code
c |
| 5053 = pb::FieldCodec.ForSFixed64(793); |
| 5054 private readonly pbc::RepeatedField<long> unpackedSfixed64_ = new pbc::Repea
tedField<long>(); |
| 5055 public pbc::RepeatedField<long> UnpackedSfixed64 { |
| 5056 get { return unpackedSfixed64_; } |
| 5057 } |
| 5058 |
| 5059 /// <summary>Field number for the "unpacked_float" field.</summary> |
| 5060 public const int UnpackedFloatFieldNumber = 100; |
| 5061 private static readonly pb::FieldCodec<float> _repeated_unpackedFloat_codec |
| 5062 = pb::FieldCodec.ForFloat(805); |
| 5063 private readonly pbc::RepeatedField<float> unpackedFloat_ = new pbc::Repeate
dField<float>(); |
| 5064 public pbc::RepeatedField<float> UnpackedFloat { |
| 5065 get { return unpackedFloat_; } |
| 5066 } |
| 5067 |
| 5068 /// <summary>Field number for the "unpacked_double" field.</summary> |
| 5069 public const int UnpackedDoubleFieldNumber = 101; |
| 5070 private static readonly pb::FieldCodec<double> _repeated_unpackedDouble_code
c |
| 5071 = pb::FieldCodec.ForDouble(809); |
| 5072 private readonly pbc::RepeatedField<double> unpackedDouble_ = new pbc::Repea
tedField<double>(); |
| 5073 public pbc::RepeatedField<double> UnpackedDouble { |
| 5074 get { return unpackedDouble_; } |
| 5075 } |
| 5076 |
| 5077 /// <summary>Field number for the "unpacked_bool" field.</summary> |
| 5078 public const int UnpackedBoolFieldNumber = 102; |
| 5079 private static readonly pb::FieldCodec<bool> _repeated_unpackedBool_codec |
| 5080 = pb::FieldCodec.ForBool(816); |
| 5081 private readonly pbc::RepeatedField<bool> unpackedBool_ = new pbc::RepeatedF
ield<bool>(); |
| 5082 public pbc::RepeatedField<bool> UnpackedBool { |
| 5083 get { return unpackedBool_; } |
| 5084 } |
| 5085 |
| 5086 /// <summary>Field number for the "unpacked_enum" field.</summary> |
| 5087 public const int UnpackedEnumFieldNumber = 103; |
| 5088 private static readonly pb::FieldCodec<global::Google.Protobuf.TestProtos.Fo
reignEnum> _repeated_unpackedEnum_codec |
| 5089 = pb::FieldCodec.ForEnum(824, x => (int) x, x => (global::Google.Protobu
f.TestProtos.ForeignEnum) x); |
| 5090 private readonly pbc::RepeatedField<global::Google.Protobuf.TestProtos.Forei
gnEnum> unpackedEnum_ = new pbc::RepeatedField<global::Google.Protobuf.TestProto
s.ForeignEnum>(); |
| 5091 public pbc::RepeatedField<global::Google.Protobuf.TestProtos.ForeignEnum> Un
packedEnum { |
| 5092 get { return unpackedEnum_; } |
| 5093 } |
| 5094 |
| 5095 public override bool Equals(object other) { |
| 5096 return Equals(other as TestUnpackedTypes); |
| 5097 } |
| 5098 |
| 5099 public bool Equals(TestUnpackedTypes other) { |
| 5100 if (ReferenceEquals(other, null)) { |
| 5101 return false; |
| 5102 } |
| 5103 if (ReferenceEquals(other, this)) { |
| 5104 return true; |
| 5105 } |
| 5106 if(!unpackedInt32_.Equals(other.unpackedInt32_)) return false; |
| 5107 if(!unpackedInt64_.Equals(other.unpackedInt64_)) return false; |
| 5108 if(!unpackedUint32_.Equals(other.unpackedUint32_)) return false; |
| 5109 if(!unpackedUint64_.Equals(other.unpackedUint64_)) return false; |
| 5110 if(!unpackedSint32_.Equals(other.unpackedSint32_)) return false; |
| 5111 if(!unpackedSint64_.Equals(other.unpackedSint64_)) return false; |
| 5112 if(!unpackedFixed32_.Equals(other.unpackedFixed32_)) return false; |
| 5113 if(!unpackedFixed64_.Equals(other.unpackedFixed64_)) return false; |
| 5114 if(!unpackedSfixed32_.Equals(other.unpackedSfixed32_)) return false; |
| 5115 if(!unpackedSfixed64_.Equals(other.unpackedSfixed64_)) return false; |
| 5116 if(!unpackedFloat_.Equals(other.unpackedFloat_)) return false; |
| 5117 if(!unpackedDouble_.Equals(other.unpackedDouble_)) return false; |
| 5118 if(!unpackedBool_.Equals(other.unpackedBool_)) return false; |
| 5119 if(!unpackedEnum_.Equals(other.unpackedEnum_)) return false; |
| 5120 return true; |
| 5121 } |
| 5122 |
| 5123 public override int GetHashCode() { |
| 5124 int hash = 1; |
| 5125 hash ^= unpackedInt32_.GetHashCode(); |
| 5126 hash ^= unpackedInt64_.GetHashCode(); |
| 5127 hash ^= unpackedUint32_.GetHashCode(); |
| 5128 hash ^= unpackedUint64_.GetHashCode(); |
| 5129 hash ^= unpackedSint32_.GetHashCode(); |
| 5130 hash ^= unpackedSint64_.GetHashCode(); |
| 5131 hash ^= unpackedFixed32_.GetHashCode(); |
| 5132 hash ^= unpackedFixed64_.GetHashCode(); |
| 5133 hash ^= unpackedSfixed32_.GetHashCode(); |
| 5134 hash ^= unpackedSfixed64_.GetHashCode(); |
| 5135 hash ^= unpackedFloat_.GetHashCode(); |
| 5136 hash ^= unpackedDouble_.GetHashCode(); |
| 5137 hash ^= unpackedBool_.GetHashCode(); |
| 5138 hash ^= unpackedEnum_.GetHashCode(); |
| 5139 return hash; |
| 5140 } |
| 5141 |
| 5142 public override string ToString() { |
| 5143 return pb::JsonFormatter.ToDiagnosticString(this); |
| 5144 } |
| 5145 |
| 5146 public void WriteTo(pb::CodedOutputStream output) { |
| 5147 unpackedInt32_.WriteTo(output, _repeated_unpackedInt32_codec); |
| 5148 unpackedInt64_.WriteTo(output, _repeated_unpackedInt64_codec); |
| 5149 unpackedUint32_.WriteTo(output, _repeated_unpackedUint32_codec); |
| 5150 unpackedUint64_.WriteTo(output, _repeated_unpackedUint64_codec); |
| 5151 unpackedSint32_.WriteTo(output, _repeated_unpackedSint32_codec); |
| 5152 unpackedSint64_.WriteTo(output, _repeated_unpackedSint64_codec); |
| 5153 unpackedFixed32_.WriteTo(output, _repeated_unpackedFixed32_codec); |
| 5154 unpackedFixed64_.WriteTo(output, _repeated_unpackedFixed64_codec); |
| 5155 unpackedSfixed32_.WriteTo(output, _repeated_unpackedSfixed32_codec); |
| 5156 unpackedSfixed64_.WriteTo(output, _repeated_unpackedSfixed64_codec); |
| 5157 unpackedFloat_.WriteTo(output, _repeated_unpackedFloat_codec); |
| 5158 unpackedDouble_.WriteTo(output, _repeated_unpackedDouble_codec); |
| 5159 unpackedBool_.WriteTo(output, _repeated_unpackedBool_codec); |
| 5160 unpackedEnum_.WriteTo(output, _repeated_unpackedEnum_codec); |
| 5161 } |
| 5162 |
| 5163 public int CalculateSize() { |
| 5164 int size = 0; |
| 5165 size += unpackedInt32_.CalculateSize(_repeated_unpackedInt32_codec); |
| 5166 size += unpackedInt64_.CalculateSize(_repeated_unpackedInt64_codec); |
| 5167 size += unpackedUint32_.CalculateSize(_repeated_unpackedUint32_codec); |
| 5168 size += unpackedUint64_.CalculateSize(_repeated_unpackedUint64_codec); |
| 5169 size += unpackedSint32_.CalculateSize(_repeated_unpackedSint32_codec); |
| 5170 size += unpackedSint64_.CalculateSize(_repeated_unpackedSint64_codec); |
| 5171 size += unpackedFixed32_.CalculateSize(_repeated_unpackedFixed32_codec); |
| 5172 size += unpackedFixed64_.CalculateSize(_repeated_unpackedFixed64_codec); |
| 5173 size += unpackedSfixed32_.CalculateSize(_repeated_unpackedSfixed32_codec); |
| 5174 size += unpackedSfixed64_.CalculateSize(_repeated_unpackedSfixed64_codec); |
| 5175 size += unpackedFloat_.CalculateSize(_repeated_unpackedFloat_codec); |
| 5176 size += unpackedDouble_.CalculateSize(_repeated_unpackedDouble_codec); |
| 5177 size += unpackedBool_.CalculateSize(_repeated_unpackedBool_codec); |
| 5178 size += unpackedEnum_.CalculateSize(_repeated_unpackedEnum_codec); |
| 5179 return size; |
| 5180 } |
| 5181 |
| 5182 public void MergeFrom(TestUnpackedTypes other) { |
| 5183 if (other == null) { |
| 5184 return; |
| 5185 } |
| 5186 unpackedInt32_.Add(other.unpackedInt32_); |
| 5187 unpackedInt64_.Add(other.unpackedInt64_); |
| 5188 unpackedUint32_.Add(other.unpackedUint32_); |
| 5189 unpackedUint64_.Add(other.unpackedUint64_); |
| 5190 unpackedSint32_.Add(other.unpackedSint32_); |
| 5191 unpackedSint64_.Add(other.unpackedSint64_); |
| 5192 unpackedFixed32_.Add(other.unpackedFixed32_); |
| 5193 unpackedFixed64_.Add(other.unpackedFixed64_); |
| 5194 unpackedSfixed32_.Add(other.unpackedSfixed32_); |
| 5195 unpackedSfixed64_.Add(other.unpackedSfixed64_); |
| 5196 unpackedFloat_.Add(other.unpackedFloat_); |
| 5197 unpackedDouble_.Add(other.unpackedDouble_); |
| 5198 unpackedBool_.Add(other.unpackedBool_); |
| 5199 unpackedEnum_.Add(other.unpackedEnum_); |
| 5200 } |
| 5201 |
| 5202 public void MergeFrom(pb::CodedInputStream input) { |
| 5203 uint tag; |
| 5204 while ((tag = input.ReadTag()) != 0) { |
| 5205 switch(tag) { |
| 5206 default: |
| 5207 input.SkipLastField(); |
| 5208 break; |
| 5209 case 722: |
| 5210 case 720: { |
| 5211 unpackedInt32_.AddEntriesFrom(input, _repeated_unpackedInt32_codec); |
| 5212 break; |
| 5213 } |
| 5214 case 730: |
| 5215 case 728: { |
| 5216 unpackedInt64_.AddEntriesFrom(input, _repeated_unpackedInt64_codec); |
| 5217 break; |
| 5218 } |
| 5219 case 738: |
| 5220 case 736: { |
| 5221 unpackedUint32_.AddEntriesFrom(input, _repeated_unpackedUint32_codec
); |
| 5222 break; |
| 5223 } |
| 5224 case 746: |
| 5225 case 744: { |
| 5226 unpackedUint64_.AddEntriesFrom(input, _repeated_unpackedUint64_codec
); |
| 5227 break; |
| 5228 } |
| 5229 case 754: |
| 5230 case 752: { |
| 5231 unpackedSint32_.AddEntriesFrom(input, _repeated_unpackedSint32_codec
); |
| 5232 break; |
| 5233 } |
| 5234 case 762: |
| 5235 case 760: { |
| 5236 unpackedSint64_.AddEntriesFrom(input, _repeated_unpackedSint64_codec
); |
| 5237 break; |
| 5238 } |
| 5239 case 770: |
| 5240 case 773: { |
| 5241 unpackedFixed32_.AddEntriesFrom(input, _repeated_unpackedFixed32_cod
ec); |
| 5242 break; |
| 5243 } |
| 5244 case 778: |
| 5245 case 777: { |
| 5246 unpackedFixed64_.AddEntriesFrom(input, _repeated_unpackedFixed64_cod
ec); |
| 5247 break; |
| 5248 } |
| 5249 case 786: |
| 5250 case 789: { |
| 5251 unpackedSfixed32_.AddEntriesFrom(input, _repeated_unpackedSfixed32_c
odec); |
| 5252 break; |
| 5253 } |
| 5254 case 794: |
| 5255 case 793: { |
| 5256 unpackedSfixed64_.AddEntriesFrom(input, _repeated_unpackedSfixed64_c
odec); |
| 5257 break; |
| 5258 } |
| 5259 case 802: |
| 5260 case 805: { |
| 5261 unpackedFloat_.AddEntriesFrom(input, _repeated_unpackedFloat_codec); |
| 5262 break; |
| 5263 } |
| 5264 case 810: |
| 5265 case 809: { |
| 5266 unpackedDouble_.AddEntriesFrom(input, _repeated_unpackedDouble_codec
); |
| 5267 break; |
| 5268 } |
| 5269 case 818: |
| 5270 case 816: { |
| 5271 unpackedBool_.AddEntriesFrom(input, _repeated_unpackedBool_codec); |
| 5272 break; |
| 5273 } |
| 5274 case 826: |
| 5275 case 824: { |
| 5276 unpackedEnum_.AddEntriesFrom(input, _repeated_unpackedEnum_codec); |
| 5277 break; |
| 5278 } |
| 5279 } |
| 5280 } |
| 5281 } |
| 5282 |
| 5283 } |
| 5284 |
| 5285 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 5286 public sealed partial class TestRepeatedScalarDifferentTagSizes : pb::IMessage
<TestRepeatedScalarDifferentTagSizes> { |
| 5287 private static readonly pb::MessageParser<TestRepeatedScalarDifferentTagSize
s> _parser = new pb::MessageParser<TestRepeatedScalarDifferentTagSizes>(() => ne
w TestRepeatedScalarDifferentTagSizes()); |
| 5288 public static pb::MessageParser<TestRepeatedScalarDifferentTagSizes> Parser
{ get { return _parser; } } |
| 5289 |
| 5290 public static pbr::MessageDescriptor Descriptor { |
| 5291 get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.D
escriptor.MessageTypes[25]; } |
| 5292 } |
| 5293 |
| 5294 pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 5295 get { return Descriptor; } |
| 5296 } |
| 5297 |
| 5298 public TestRepeatedScalarDifferentTagSizes() { |
| 5299 OnConstruction(); |
| 5300 } |
| 5301 |
| 5302 partial void OnConstruction(); |
| 5303 |
| 5304 public TestRepeatedScalarDifferentTagSizes(TestRepeatedScalarDifferentTagSiz
es other) : this() { |
| 5305 repeatedFixed32_ = other.repeatedFixed32_.Clone(); |
| 5306 repeatedInt32_ = other.repeatedInt32_.Clone(); |
| 5307 repeatedFixed64_ = other.repeatedFixed64_.Clone(); |
| 5308 repeatedInt64_ = other.repeatedInt64_.Clone(); |
| 5309 repeatedFloat_ = other.repeatedFloat_.Clone(); |
| 5310 repeatedUint64_ = other.repeatedUint64_.Clone(); |
| 5311 } |
| 5312 |
| 5313 public TestRepeatedScalarDifferentTagSizes Clone() { |
| 5314 return new TestRepeatedScalarDifferentTagSizes(this); |
| 5315 } |
| 5316 |
| 5317 /// <summary>Field number for the "repeated_fixed32" field.</summary> |
| 5318 public const int RepeatedFixed32FieldNumber = 12; |
| 5319 private static readonly pb::FieldCodec<uint> _repeated_repeatedFixed32_codec |
| 5320 = pb::FieldCodec.ForFixed32(98); |
| 5321 private readonly pbc::RepeatedField<uint> repeatedFixed32_ = new pbc::Repeat
edField<uint>(); |
| 5322 /// <summary> |
| 5323 /// Parsing repeated fixed size values used to fail. This message needs to
be |
| 5324 /// used in order to get a tag of the right size; all of the repeated field
s |
| 5325 /// in TestAllTypes didn't trigger the check. |
| 5326 /// </summary> |
| 5327 public pbc::RepeatedField<uint> RepeatedFixed32 { |
| 5328 get { return repeatedFixed32_; } |
| 5329 } |
| 5330 |
| 5331 /// <summary>Field number for the "repeated_int32" field.</summary> |
| 5332 public const int RepeatedInt32FieldNumber = 13; |
| 5333 private static readonly pb::FieldCodec<int> _repeated_repeatedInt32_codec |
| 5334 = pb::FieldCodec.ForInt32(106); |
| 5335 private readonly pbc::RepeatedField<int> repeatedInt32_ = new pbc::RepeatedF
ield<int>(); |
| 5336 /// <summary> |
| 5337 /// Check for a varint type, just for good measure. |
| 5338 /// </summary> |
| 5339 public pbc::RepeatedField<int> RepeatedInt32 { |
| 5340 get { return repeatedInt32_; } |
| 5341 } |
| 5342 |
| 5343 /// <summary>Field number for the "repeated_fixed64" field.</summary> |
| 5344 public const int RepeatedFixed64FieldNumber = 2046; |
| 5345 private static readonly pb::FieldCodec<ulong> _repeated_repeatedFixed64_code
c |
| 5346 = pb::FieldCodec.ForFixed64(16370); |
| 5347 private readonly pbc::RepeatedField<ulong> repeatedFixed64_ = new pbc::Repea
tedField<ulong>(); |
| 5348 /// <summary> |
| 5349 /// These have two-byte tags. |
| 5350 /// </summary> |
| 5351 public pbc::RepeatedField<ulong> RepeatedFixed64 { |
| 5352 get { return repeatedFixed64_; } |
| 5353 } |
| 5354 |
| 5355 /// <summary>Field number for the "repeated_int64" field.</summary> |
| 5356 public const int RepeatedInt64FieldNumber = 2047; |
| 5357 private static readonly pb::FieldCodec<long> _repeated_repeatedInt64_codec |
| 5358 = pb::FieldCodec.ForInt64(16378); |
| 5359 private readonly pbc::RepeatedField<long> repeatedInt64_ = new pbc::Repeated
Field<long>(); |
| 5360 public pbc::RepeatedField<long> RepeatedInt64 { |
| 5361 get { return repeatedInt64_; } |
| 5362 } |
| 5363 |
| 5364 /// <summary>Field number for the "repeated_float" field.</summary> |
| 5365 public const int RepeatedFloatFieldNumber = 262142; |
| 5366 private static readonly pb::FieldCodec<float> _repeated_repeatedFloat_codec |
| 5367 = pb::FieldCodec.ForFloat(2097138); |
| 5368 private readonly pbc::RepeatedField<float> repeatedFloat_ = new pbc::Repeate
dField<float>(); |
| 5369 /// <summary> |
| 5370 /// Three byte tags. |
| 5371 /// </summary> |
| 5372 public pbc::RepeatedField<float> RepeatedFloat { |
| 5373 get { return repeatedFloat_; } |
| 5374 } |
| 5375 |
| 5376 /// <summary>Field number for the "repeated_uint64" field.</summary> |
| 5377 public const int RepeatedUint64FieldNumber = 262143; |
| 5378 private static readonly pb::FieldCodec<ulong> _repeated_repeatedUint64_codec |
| 5379 = pb::FieldCodec.ForUInt64(2097146); |
| 5380 private readonly pbc::RepeatedField<ulong> repeatedUint64_ = new pbc::Repeat
edField<ulong>(); |
| 5381 public pbc::RepeatedField<ulong> RepeatedUint64 { |
| 5382 get { return repeatedUint64_; } |
| 5383 } |
| 5384 |
| 5385 public override bool Equals(object other) { |
| 5386 return Equals(other as TestRepeatedScalarDifferentTagSizes); |
| 5387 } |
| 5388 |
| 5389 public bool Equals(TestRepeatedScalarDifferentTagSizes other) { |
| 5390 if (ReferenceEquals(other, null)) { |
| 5391 return false; |
| 5392 } |
| 5393 if (ReferenceEquals(other, this)) { |
| 5394 return true; |
| 5395 } |
| 5396 if(!repeatedFixed32_.Equals(other.repeatedFixed32_)) return false; |
| 5397 if(!repeatedInt32_.Equals(other.repeatedInt32_)) return false; |
| 5398 if(!repeatedFixed64_.Equals(other.repeatedFixed64_)) return false; |
| 5399 if(!repeatedInt64_.Equals(other.repeatedInt64_)) return false; |
| 5400 if(!repeatedFloat_.Equals(other.repeatedFloat_)) return false; |
| 5401 if(!repeatedUint64_.Equals(other.repeatedUint64_)) return false; |
| 5402 return true; |
| 5403 } |
| 5404 |
| 5405 public override int GetHashCode() { |
| 5406 int hash = 1; |
| 5407 hash ^= repeatedFixed32_.GetHashCode(); |
| 5408 hash ^= repeatedInt32_.GetHashCode(); |
| 5409 hash ^= repeatedFixed64_.GetHashCode(); |
| 5410 hash ^= repeatedInt64_.GetHashCode(); |
| 5411 hash ^= repeatedFloat_.GetHashCode(); |
| 5412 hash ^= repeatedUint64_.GetHashCode(); |
| 5413 return hash; |
| 5414 } |
| 5415 |
| 5416 public override string ToString() { |
| 5417 return pb::JsonFormatter.ToDiagnosticString(this); |
| 5418 } |
| 5419 |
| 5420 public void WriteTo(pb::CodedOutputStream output) { |
| 5421 repeatedFixed32_.WriteTo(output, _repeated_repeatedFixed32_codec); |
| 5422 repeatedInt32_.WriteTo(output, _repeated_repeatedInt32_codec); |
| 5423 repeatedFixed64_.WriteTo(output, _repeated_repeatedFixed64_codec); |
| 5424 repeatedInt64_.WriteTo(output, _repeated_repeatedInt64_codec); |
| 5425 repeatedFloat_.WriteTo(output, _repeated_repeatedFloat_codec); |
| 5426 repeatedUint64_.WriteTo(output, _repeated_repeatedUint64_codec); |
| 5427 } |
| 5428 |
| 5429 public int CalculateSize() { |
| 5430 int size = 0; |
| 5431 size += repeatedFixed32_.CalculateSize(_repeated_repeatedFixed32_codec); |
| 5432 size += repeatedInt32_.CalculateSize(_repeated_repeatedInt32_codec); |
| 5433 size += repeatedFixed64_.CalculateSize(_repeated_repeatedFixed64_codec); |
| 5434 size += repeatedInt64_.CalculateSize(_repeated_repeatedInt64_codec); |
| 5435 size += repeatedFloat_.CalculateSize(_repeated_repeatedFloat_codec); |
| 5436 size += repeatedUint64_.CalculateSize(_repeated_repeatedUint64_codec); |
| 5437 return size; |
| 5438 } |
| 5439 |
| 5440 public void MergeFrom(TestRepeatedScalarDifferentTagSizes other) { |
| 5441 if (other == null) { |
| 5442 return; |
| 5443 } |
| 5444 repeatedFixed32_.Add(other.repeatedFixed32_); |
| 5445 repeatedInt32_.Add(other.repeatedInt32_); |
| 5446 repeatedFixed64_.Add(other.repeatedFixed64_); |
| 5447 repeatedInt64_.Add(other.repeatedInt64_); |
| 5448 repeatedFloat_.Add(other.repeatedFloat_); |
| 5449 repeatedUint64_.Add(other.repeatedUint64_); |
| 5450 } |
| 5451 |
| 5452 public void MergeFrom(pb::CodedInputStream input) { |
| 5453 uint tag; |
| 5454 while ((tag = input.ReadTag()) != 0) { |
| 5455 switch(tag) { |
| 5456 default: |
| 5457 input.SkipLastField(); |
| 5458 break; |
| 5459 case 98: |
| 5460 case 101: { |
| 5461 repeatedFixed32_.AddEntriesFrom(input, _repeated_repeatedFixed32_cod
ec); |
| 5462 break; |
| 5463 } |
| 5464 case 106: |
| 5465 case 104: { |
| 5466 repeatedInt32_.AddEntriesFrom(input, _repeated_repeatedInt32_codec); |
| 5467 break; |
| 5468 } |
| 5469 case 16370: |
| 5470 case 16369: { |
| 5471 repeatedFixed64_.AddEntriesFrom(input, _repeated_repeatedFixed64_cod
ec); |
| 5472 break; |
| 5473 } |
| 5474 case 16378: |
| 5475 case 16376: { |
| 5476 repeatedInt64_.AddEntriesFrom(input, _repeated_repeatedInt64_codec); |
| 5477 break; |
| 5478 } |
| 5479 case 2097138: |
| 5480 case 2097141: { |
| 5481 repeatedFloat_.AddEntriesFrom(input, _repeated_repeatedFloat_codec); |
| 5482 break; |
| 5483 } |
| 5484 case 2097146: |
| 5485 case 2097144: { |
| 5486 repeatedUint64_.AddEntriesFrom(input, _repeated_repeatedUint64_codec
); |
| 5487 break; |
| 5488 } |
| 5489 } |
| 5490 } |
| 5491 } |
| 5492 |
| 5493 } |
| 5494 |
| 5495 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 5496 public sealed partial class TestCommentInjectionMessage : pb::IMessage<TestCom
mentInjectionMessage> { |
| 5497 private static readonly pb::MessageParser<TestCommentInjectionMessage> _pars
er = new pb::MessageParser<TestCommentInjectionMessage>(() => new TestCommentInj
ectionMessage()); |
| 5498 public static pb::MessageParser<TestCommentInjectionMessage> Parser { get {
return _parser; } } |
| 5499 |
| 5500 public static pbr::MessageDescriptor Descriptor { |
| 5501 get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.D
escriptor.MessageTypes[26]; } |
| 5502 } |
| 5503 |
| 5504 pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 5505 get { return Descriptor; } |
| 5506 } |
| 5507 |
| 5508 public TestCommentInjectionMessage() { |
| 5509 OnConstruction(); |
| 5510 } |
| 5511 |
| 5512 partial void OnConstruction(); |
| 5513 |
| 5514 public TestCommentInjectionMessage(TestCommentInjectionMessage other) : this
() { |
| 5515 a_ = other.a_; |
| 5516 } |
| 5517 |
| 5518 public TestCommentInjectionMessage Clone() { |
| 5519 return new TestCommentInjectionMessage(this); |
| 5520 } |
| 5521 |
| 5522 /// <summary>Field number for the "a" field.</summary> |
| 5523 public const int AFieldNumber = 1; |
| 5524 private string a_ = ""; |
| 5525 /// <summary> |
| 5526 /// */ <- This should not close the generated doc comment |
| 5527 /// </summary> |
| 5528 public string A { |
| 5529 get { return a_; } |
| 5530 set { |
| 5531 a_ = pb::Preconditions.CheckNotNull(value, "value"); |
| 5532 } |
| 5533 } |
| 5534 |
| 5535 public override bool Equals(object other) { |
| 5536 return Equals(other as TestCommentInjectionMessage); |
| 5537 } |
| 5538 |
| 5539 public bool Equals(TestCommentInjectionMessage other) { |
| 5540 if (ReferenceEquals(other, null)) { |
| 5541 return false; |
| 5542 } |
| 5543 if (ReferenceEquals(other, this)) { |
| 5544 return true; |
| 5545 } |
| 5546 if (A != other.A) return false; |
| 5547 return true; |
| 5548 } |
| 5549 |
| 5550 public override int GetHashCode() { |
| 5551 int hash = 1; |
| 5552 if (A.Length != 0) hash ^= A.GetHashCode(); |
| 5553 return hash; |
| 5554 } |
| 5555 |
| 5556 public override string ToString() { |
| 5557 return pb::JsonFormatter.ToDiagnosticString(this); |
| 5558 } |
| 5559 |
| 5560 public void WriteTo(pb::CodedOutputStream output) { |
| 5561 if (A.Length != 0) { |
| 5562 output.WriteRawTag(10); |
| 5563 output.WriteString(A); |
| 5564 } |
| 5565 } |
| 5566 |
| 5567 public int CalculateSize() { |
| 5568 int size = 0; |
| 5569 if (A.Length != 0) { |
| 5570 size += 1 + pb::CodedOutputStream.ComputeStringSize(A); |
| 5571 } |
| 5572 return size; |
| 5573 } |
| 5574 |
| 5575 public void MergeFrom(TestCommentInjectionMessage other) { |
| 5576 if (other == null) { |
| 5577 return; |
| 5578 } |
| 5579 if (other.A.Length != 0) { |
| 5580 A = other.A; |
| 5581 } |
| 5582 } |
| 5583 |
| 5584 public void MergeFrom(pb::CodedInputStream input) { |
| 5585 uint tag; |
| 5586 while ((tag = input.ReadTag()) != 0) { |
| 5587 switch(tag) { |
| 5588 default: |
| 5589 input.SkipLastField(); |
| 5590 break; |
| 5591 case 10: { |
| 5592 A = input.ReadString(); |
| 5593 break; |
| 5594 } |
| 5595 } |
| 5596 } |
| 5597 } |
| 5598 |
| 5599 } |
| 5600 |
| 5601 /// <summary> |
| 5602 /// Test that RPC services work. |
| 5603 /// </summary> |
| 5604 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 5605 public sealed partial class FooRequest : pb::IMessage<FooRequest> { |
| 5606 private static readonly pb::MessageParser<FooRequest> _parser = new pb::Mess
ageParser<FooRequest>(() => new FooRequest()); |
| 5607 public static pb::MessageParser<FooRequest> Parser { get { return _parser; }
} |
| 5608 |
| 5609 public static pbr::MessageDescriptor Descriptor { |
| 5610 get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.D
escriptor.MessageTypes[27]; } |
| 5611 } |
| 5612 |
| 5613 pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 5614 get { return Descriptor; } |
| 5615 } |
| 5616 |
| 5617 public FooRequest() { |
| 5618 OnConstruction(); |
| 5619 } |
| 5620 |
| 5621 partial void OnConstruction(); |
| 5622 |
| 5623 public FooRequest(FooRequest other) : this() { |
| 5624 } |
| 5625 |
| 5626 public FooRequest Clone() { |
| 5627 return new FooRequest(this); |
| 5628 } |
| 5629 |
| 5630 public override bool Equals(object other) { |
| 5631 return Equals(other as FooRequest); |
| 5632 } |
| 5633 |
| 5634 public bool Equals(FooRequest other) { |
| 5635 if (ReferenceEquals(other, null)) { |
| 5636 return false; |
| 5637 } |
| 5638 if (ReferenceEquals(other, this)) { |
| 5639 return true; |
| 5640 } |
| 5641 return true; |
| 5642 } |
| 5643 |
| 5644 public override int GetHashCode() { |
| 5645 int hash = 1; |
| 5646 return hash; |
| 5647 } |
| 5648 |
| 5649 public override string ToString() { |
| 5650 return pb::JsonFormatter.ToDiagnosticString(this); |
| 5651 } |
| 5652 |
| 5653 public void WriteTo(pb::CodedOutputStream output) { |
| 5654 } |
| 5655 |
| 5656 public int CalculateSize() { |
| 5657 int size = 0; |
| 5658 return size; |
| 5659 } |
| 5660 |
| 5661 public void MergeFrom(FooRequest other) { |
| 5662 if (other == null) { |
| 5663 return; |
| 5664 } |
| 5665 } |
| 5666 |
| 5667 public void MergeFrom(pb::CodedInputStream input) { |
| 5668 uint tag; |
| 5669 while ((tag = input.ReadTag()) != 0) { |
| 5670 switch(tag) { |
| 5671 default: |
| 5672 input.SkipLastField(); |
| 5673 break; |
| 5674 } |
| 5675 } |
| 5676 } |
| 5677 |
| 5678 } |
| 5679 |
| 5680 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 5681 public sealed partial class FooResponse : pb::IMessage<FooResponse> { |
| 5682 private static readonly pb::MessageParser<FooResponse> _parser = new pb::Mes
sageParser<FooResponse>(() => new FooResponse()); |
| 5683 public static pb::MessageParser<FooResponse> Parser { get { return _parser;
} } |
| 5684 |
| 5685 public static pbr::MessageDescriptor Descriptor { |
| 5686 get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.D
escriptor.MessageTypes[28]; } |
| 5687 } |
| 5688 |
| 5689 pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 5690 get { return Descriptor; } |
| 5691 } |
| 5692 |
| 5693 public FooResponse() { |
| 5694 OnConstruction(); |
| 5695 } |
| 5696 |
| 5697 partial void OnConstruction(); |
| 5698 |
| 5699 public FooResponse(FooResponse other) : this() { |
| 5700 } |
| 5701 |
| 5702 public FooResponse Clone() { |
| 5703 return new FooResponse(this); |
| 5704 } |
| 5705 |
| 5706 public override bool Equals(object other) { |
| 5707 return Equals(other as FooResponse); |
| 5708 } |
| 5709 |
| 5710 public bool Equals(FooResponse other) { |
| 5711 if (ReferenceEquals(other, null)) { |
| 5712 return false; |
| 5713 } |
| 5714 if (ReferenceEquals(other, this)) { |
| 5715 return true; |
| 5716 } |
| 5717 return true; |
| 5718 } |
| 5719 |
| 5720 public override int GetHashCode() { |
| 5721 int hash = 1; |
| 5722 return hash; |
| 5723 } |
| 5724 |
| 5725 public override string ToString() { |
| 5726 return pb::JsonFormatter.ToDiagnosticString(this); |
| 5727 } |
| 5728 |
| 5729 public void WriteTo(pb::CodedOutputStream output) { |
| 5730 } |
| 5731 |
| 5732 public int CalculateSize() { |
| 5733 int size = 0; |
| 5734 return size; |
| 5735 } |
| 5736 |
| 5737 public void MergeFrom(FooResponse other) { |
| 5738 if (other == null) { |
| 5739 return; |
| 5740 } |
| 5741 } |
| 5742 |
| 5743 public void MergeFrom(pb::CodedInputStream input) { |
| 5744 uint tag; |
| 5745 while ((tag = input.ReadTag()) != 0) { |
| 5746 switch(tag) { |
| 5747 default: |
| 5748 input.SkipLastField(); |
| 5749 break; |
| 5750 } |
| 5751 } |
| 5752 } |
| 5753 |
| 5754 } |
| 5755 |
| 5756 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 5757 public sealed partial class FooClientMessage : pb::IMessage<FooClientMessage>
{ |
| 5758 private static readonly pb::MessageParser<FooClientMessage> _parser = new pb
::MessageParser<FooClientMessage>(() => new FooClientMessage()); |
| 5759 public static pb::MessageParser<FooClientMessage> Parser { get { return _par
ser; } } |
| 5760 |
| 5761 public static pbr::MessageDescriptor Descriptor { |
| 5762 get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.D
escriptor.MessageTypes[29]; } |
| 5763 } |
| 5764 |
| 5765 pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 5766 get { return Descriptor; } |
| 5767 } |
| 5768 |
| 5769 public FooClientMessage() { |
| 5770 OnConstruction(); |
| 5771 } |
| 5772 |
| 5773 partial void OnConstruction(); |
| 5774 |
| 5775 public FooClientMessage(FooClientMessage other) : this() { |
| 5776 } |
| 5777 |
| 5778 public FooClientMessage Clone() { |
| 5779 return new FooClientMessage(this); |
| 5780 } |
| 5781 |
| 5782 public override bool Equals(object other) { |
| 5783 return Equals(other as FooClientMessage); |
| 5784 } |
| 5785 |
| 5786 public bool Equals(FooClientMessage other) { |
| 5787 if (ReferenceEquals(other, null)) { |
| 5788 return false; |
| 5789 } |
| 5790 if (ReferenceEquals(other, this)) { |
| 5791 return true; |
| 5792 } |
| 5793 return true; |
| 5794 } |
| 5795 |
| 5796 public override int GetHashCode() { |
| 5797 int hash = 1; |
| 5798 return hash; |
| 5799 } |
| 5800 |
| 5801 public override string ToString() { |
| 5802 return pb::JsonFormatter.ToDiagnosticString(this); |
| 5803 } |
| 5804 |
| 5805 public void WriteTo(pb::CodedOutputStream output) { |
| 5806 } |
| 5807 |
| 5808 public int CalculateSize() { |
| 5809 int size = 0; |
| 5810 return size; |
| 5811 } |
| 5812 |
| 5813 public void MergeFrom(FooClientMessage other) { |
| 5814 if (other == null) { |
| 5815 return; |
| 5816 } |
| 5817 } |
| 5818 |
| 5819 public void MergeFrom(pb::CodedInputStream input) { |
| 5820 uint tag; |
| 5821 while ((tag = input.ReadTag()) != 0) { |
| 5822 switch(tag) { |
| 5823 default: |
| 5824 input.SkipLastField(); |
| 5825 break; |
| 5826 } |
| 5827 } |
| 5828 } |
| 5829 |
| 5830 } |
| 5831 |
| 5832 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 5833 public sealed partial class FooServerMessage : pb::IMessage<FooServerMessage>
{ |
| 5834 private static readonly pb::MessageParser<FooServerMessage> _parser = new pb
::MessageParser<FooServerMessage>(() => new FooServerMessage()); |
| 5835 public static pb::MessageParser<FooServerMessage> Parser { get { return _par
ser; } } |
| 5836 |
| 5837 public static pbr::MessageDescriptor Descriptor { |
| 5838 get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.D
escriptor.MessageTypes[30]; } |
| 5839 } |
| 5840 |
| 5841 pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 5842 get { return Descriptor; } |
| 5843 } |
| 5844 |
| 5845 public FooServerMessage() { |
| 5846 OnConstruction(); |
| 5847 } |
| 5848 |
| 5849 partial void OnConstruction(); |
| 5850 |
| 5851 public FooServerMessage(FooServerMessage other) : this() { |
| 5852 } |
| 5853 |
| 5854 public FooServerMessage Clone() { |
| 5855 return new FooServerMessage(this); |
| 5856 } |
| 5857 |
| 5858 public override bool Equals(object other) { |
| 5859 return Equals(other as FooServerMessage); |
| 5860 } |
| 5861 |
| 5862 public bool Equals(FooServerMessage other) { |
| 5863 if (ReferenceEquals(other, null)) { |
| 5864 return false; |
| 5865 } |
| 5866 if (ReferenceEquals(other, this)) { |
| 5867 return true; |
| 5868 } |
| 5869 return true; |
| 5870 } |
| 5871 |
| 5872 public override int GetHashCode() { |
| 5873 int hash = 1; |
| 5874 return hash; |
| 5875 } |
| 5876 |
| 5877 public override string ToString() { |
| 5878 return pb::JsonFormatter.ToDiagnosticString(this); |
| 5879 } |
| 5880 |
| 5881 public void WriteTo(pb::CodedOutputStream output) { |
| 5882 } |
| 5883 |
| 5884 public int CalculateSize() { |
| 5885 int size = 0; |
| 5886 return size; |
| 5887 } |
| 5888 |
| 5889 public void MergeFrom(FooServerMessage other) { |
| 5890 if (other == null) { |
| 5891 return; |
| 5892 } |
| 5893 } |
| 5894 |
| 5895 public void MergeFrom(pb::CodedInputStream input) { |
| 5896 uint tag; |
| 5897 while ((tag = input.ReadTag()) != 0) { |
| 5898 switch(tag) { |
| 5899 default: |
| 5900 input.SkipLastField(); |
| 5901 break; |
| 5902 } |
| 5903 } |
| 5904 } |
| 5905 |
| 5906 } |
| 5907 |
| 5908 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 5909 public sealed partial class BarRequest : pb::IMessage<BarRequest> { |
| 5910 private static readonly pb::MessageParser<BarRequest> _parser = new pb::Mess
ageParser<BarRequest>(() => new BarRequest()); |
| 5911 public static pb::MessageParser<BarRequest> Parser { get { return _parser; }
} |
| 5912 |
| 5913 public static pbr::MessageDescriptor Descriptor { |
| 5914 get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.D
escriptor.MessageTypes[31]; } |
| 5915 } |
| 5916 |
| 5917 pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 5918 get { return Descriptor; } |
| 5919 } |
| 5920 |
| 5921 public BarRequest() { |
| 5922 OnConstruction(); |
| 5923 } |
| 5924 |
| 5925 partial void OnConstruction(); |
| 5926 |
| 5927 public BarRequest(BarRequest other) : this() { |
| 5928 } |
| 5929 |
| 5930 public BarRequest Clone() { |
| 5931 return new BarRequest(this); |
| 5932 } |
| 5933 |
| 5934 public override bool Equals(object other) { |
| 5935 return Equals(other as BarRequest); |
| 5936 } |
| 5937 |
| 5938 public bool Equals(BarRequest other) { |
| 5939 if (ReferenceEquals(other, null)) { |
| 5940 return false; |
| 5941 } |
| 5942 if (ReferenceEquals(other, this)) { |
| 5943 return true; |
| 5944 } |
| 5945 return true; |
| 5946 } |
| 5947 |
| 5948 public override int GetHashCode() { |
| 5949 int hash = 1; |
| 5950 return hash; |
| 5951 } |
| 5952 |
| 5953 public override string ToString() { |
| 5954 return pb::JsonFormatter.ToDiagnosticString(this); |
| 5955 } |
| 5956 |
| 5957 public void WriteTo(pb::CodedOutputStream output) { |
| 5958 } |
| 5959 |
| 5960 public int CalculateSize() { |
| 5961 int size = 0; |
| 5962 return size; |
| 5963 } |
| 5964 |
| 5965 public void MergeFrom(BarRequest other) { |
| 5966 if (other == null) { |
| 5967 return; |
| 5968 } |
| 5969 } |
| 5970 |
| 5971 public void MergeFrom(pb::CodedInputStream input) { |
| 5972 uint tag; |
| 5973 while ((tag = input.ReadTag()) != 0) { |
| 5974 switch(tag) { |
| 5975 default: |
| 5976 input.SkipLastField(); |
| 5977 break; |
| 5978 } |
| 5979 } |
| 5980 } |
| 5981 |
| 5982 } |
| 5983 |
| 5984 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 5985 public sealed partial class BarResponse : pb::IMessage<BarResponse> { |
| 5986 private static readonly pb::MessageParser<BarResponse> _parser = new pb::Mes
sageParser<BarResponse>(() => new BarResponse()); |
| 5987 public static pb::MessageParser<BarResponse> Parser { get { return _parser;
} } |
| 5988 |
| 5989 public static pbr::MessageDescriptor Descriptor { |
| 5990 get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.D
escriptor.MessageTypes[32]; } |
| 5991 } |
| 5992 |
| 5993 pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 5994 get { return Descriptor; } |
| 5995 } |
| 5996 |
| 5997 public BarResponse() { |
| 5998 OnConstruction(); |
| 5999 } |
| 6000 |
| 6001 partial void OnConstruction(); |
| 6002 |
| 6003 public BarResponse(BarResponse other) : this() { |
| 6004 } |
| 6005 |
| 6006 public BarResponse Clone() { |
| 6007 return new BarResponse(this); |
| 6008 } |
| 6009 |
| 6010 public override bool Equals(object other) { |
| 6011 return Equals(other as BarResponse); |
| 6012 } |
| 6013 |
| 6014 public bool Equals(BarResponse other) { |
| 6015 if (ReferenceEquals(other, null)) { |
| 6016 return false; |
| 6017 } |
| 6018 if (ReferenceEquals(other, this)) { |
| 6019 return true; |
| 6020 } |
| 6021 return true; |
| 6022 } |
| 6023 |
| 6024 public override int GetHashCode() { |
| 6025 int hash = 1; |
| 6026 return hash; |
| 6027 } |
| 6028 |
| 6029 public override string ToString() { |
| 6030 return pb::JsonFormatter.ToDiagnosticString(this); |
| 6031 } |
| 6032 |
| 6033 public void WriteTo(pb::CodedOutputStream output) { |
| 6034 } |
| 6035 |
| 6036 public int CalculateSize() { |
| 6037 int size = 0; |
| 6038 return size; |
| 6039 } |
| 6040 |
| 6041 public void MergeFrom(BarResponse other) { |
| 6042 if (other == null) { |
| 6043 return; |
| 6044 } |
| 6045 } |
| 6046 |
| 6047 public void MergeFrom(pb::CodedInputStream input) { |
| 6048 uint tag; |
| 6049 while ((tag = input.ReadTag()) != 0) { |
| 6050 switch(tag) { |
| 6051 default: |
| 6052 input.SkipLastField(); |
| 6053 break; |
| 6054 } |
| 6055 } |
| 6056 } |
| 6057 |
| 6058 } |
| 6059 |
| 6060 #endregion |
| 6061 |
| 6062 } |
| 6063 |
| 6064 #endregion Designer generated code |
OLD | NEW |