| OLD | NEW |
| (Empty) |
| 1 // Generated by the protocol buffer compiler. DO NOT EDIT! | |
| 2 // source: unittest_issues.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 UnitTest.Issues.TestProtos { | |
| 11 | |
| 12 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] | |
| 13 public static partial class UnittestIssues { | |
| 14 | |
| 15 #region Descriptor | |
| 16 public static pbr::FileDescriptor Descriptor { | |
| 17 get { return descriptor; } | |
| 18 } | |
| 19 private static pbr::FileDescriptor descriptor; | |
| 20 | |
| 21 static UnittestIssues() { | |
| 22 byte[] descriptorData = global::System.Convert.FromBase64String( | |
| 23 string.Concat( | |
| 24 "ChV1bml0dGVzdF9pc3N1ZXMucHJvdG8SD3VuaXR0ZXN0X2lzc3VlcyInCghJ", | |
| 25 "c3N1ZTMwNxobCgpOZXN0ZWRPbmNlGg0KC05lc3RlZFR3aWNlIrABChNOZWdh", | |
| 26 "dGl2ZUVudW1NZXNzYWdlEiwKBXZhbHVlGAEgASgOMh0udW5pdHRlc3RfaXNz", | |
| 27 "dWVzLk5lZ2F0aXZlRW51bRIxCgZ2YWx1ZXMYAiADKA4yHS51bml0dGVzdF9p", | |
| 28 "c3N1ZXMuTmVnYXRpdmVFbnVtQgIQABI4Cg1wYWNrZWRfdmFsdWVzGAMgAygO", | |
| 29 "Mh0udW5pdHRlc3RfaXNzdWVzLk5lZ2F0aXZlRW51bUICEAEiEQoPRGVwcmVj", | |
| 30 "YXRlZENoaWxkIrkCChdEZXByZWNhdGVkRmllbGRzTWVzc2FnZRIaCg5Qcmlt", | |
| 31 "aXRpdmVWYWx1ZRgBIAEoBUICGAESGgoOUHJpbWl0aXZlQXJyYXkYAiADKAVC", | |
| 32 "AhgBEjoKDE1lc3NhZ2VWYWx1ZRgDIAEoCzIgLnVuaXR0ZXN0X2lzc3Vlcy5E", | |
| 33 "ZXByZWNhdGVkQ2hpbGRCAhgBEjoKDE1lc3NhZ2VBcnJheRgEIAMoCzIgLnVu", | |
| 34 "aXR0ZXN0X2lzc3Vlcy5EZXByZWNhdGVkQ2hpbGRCAhgBEjYKCUVudW1WYWx1", | |
| 35 "ZRgFIAEoDjIfLnVuaXR0ZXN0X2lzc3Vlcy5EZXByZWNhdGVkRW51bUICGAES", | |
| 36 "NgoJRW51bUFycmF5GAYgAygOMh8udW5pdHRlc3RfaXNzdWVzLkRlcHJlY2F0", | |
| 37 "ZWRFbnVtQgIYASIZCglJdGVtRmllbGQSDAoEaXRlbRgBIAEoBSJECg1SZXNl", | |
| 38 "cnZlZE5hbWVzEg0KBXR5cGVzGAEgASgFEhIKCmRlc2NyaXB0b3IYAiABKAUa", | |
| 39 "EAoOU29tZU5lc3RlZFR5cGUioAEKFVRlc3RKc29uRmllbGRPcmRlcmluZxIT", | |
| 40 "CgtwbGFpbl9pbnQzMhgEIAEoBRITCglvMV9zdHJpbmcYAiABKAlIABISCghv", | |
| 41 "MV9pbnQzMhgFIAEoBUgAEhQKDHBsYWluX3N0cmluZxgBIAEoCRISCghvMl9p", | |
| 42 "bnQzMhgGIAEoBUgBEhMKCW8yX3N0cmluZxgDIAEoCUgBQgQKAm8xQgQKAm8y", | |
| 43 "KlUKDE5lZ2F0aXZlRW51bRIWChJORUdBVElWRV9FTlVNX1pFUk8QABIWCglG", | |
| 44 "aXZlQmVsb3cQ+///////////ARIVCghNaW51c09uZRD///////////8BKi4K", | |
| 45 "DkRlcHJlY2F0ZWRFbnVtEhMKD0RFUFJFQ0FURURfWkVSTxAAEgcKA29uZRAB", | |
| 46 "Qh9IAaoCGlVuaXRUZXN0Lklzc3Vlcy5UZXN0UHJvdG9zYgZwcm90bzM=")); | |
| 47 descriptor = pbr::FileDescriptor.InternalBuildGeneratedFileFrom(descriptor
Data, | |
| 48 new pbr::FileDescriptor[] { }, | |
| 49 new pbr::GeneratedCodeInfo(new[] {typeof(global::UnitTest.Issues.TestP
rotos.NegativeEnum), typeof(global::UnitTest.Issues.TestProtos.DeprecatedEnum),
}, new pbr::GeneratedCodeInfo[] { | |
| 50 new pbr::GeneratedCodeInfo(typeof(global::UnitTest.Issues.TestProtos
.Issue307), null, null, null, new pbr::GeneratedCodeInfo[] { new pbr::GeneratedC
odeInfo(typeof(global::UnitTest.Issues.TestProtos.Issue307.Types.NestedOnce), nu
ll, null, null, new pbr::GeneratedCodeInfo[] { new pbr::GeneratedCodeInfo(typeof
(global::UnitTest.Issues.TestProtos.Issue307.Types.NestedOnce.Types.NestedTwice)
, null, null, null, null)})}), | |
| 51 new pbr::GeneratedCodeInfo(typeof(global::UnitTest.Issues.TestProtos
.NegativeEnumMessage), new[]{ "Value", "Values", "PackedValues" }, null, null, n
ull), | |
| 52 new pbr::GeneratedCodeInfo(typeof(global::UnitTest.Issues.TestProtos
.DeprecatedChild), null, null, null, null), | |
| 53 new pbr::GeneratedCodeInfo(typeof(global::UnitTest.Issues.TestProtos
.DeprecatedFieldsMessage), new[]{ "PrimitiveValue", "PrimitiveArray", "MessageVa
lue", "MessageArray", "EnumValue", "EnumArray" }, null, null, null), | |
| 54 new pbr::GeneratedCodeInfo(typeof(global::UnitTest.Issues.TestProtos
.ItemField), new[]{ "Item" }, null, null, null), | |
| 55 new pbr::GeneratedCodeInfo(typeof(global::UnitTest.Issues.TestProtos
.ReservedNames), new[]{ "Types_", "Descriptor_" }, null, null, new pbr::Generate
dCodeInfo[] { new pbr::GeneratedCodeInfo(typeof(global::UnitTest.Issues.TestProt
os.ReservedNames.Types.SomeNestedType), null, null, null, null)}), | |
| 56 new pbr::GeneratedCodeInfo(typeof(global::UnitTest.Issues.TestProtos
.TestJsonFieldOrdering), new[]{ "PlainInt32", "O1String", "O1Int32", "PlainStrin
g", "O2Int32", "O2String" }, new[]{ "O1", "O2" }, null, null) | |
| 57 })); | |
| 58 } | |
| 59 #endregion | |
| 60 | |
| 61 } | |
| 62 #region Enums | |
| 63 public enum NegativeEnum { | |
| 64 NEGATIVE_ENUM_ZERO = 0, | |
| 65 FiveBelow = -5, | |
| 66 MinusOne = -1, | |
| 67 } | |
| 68 | |
| 69 public enum DeprecatedEnum { | |
| 70 DEPRECATED_ZERO = 0, | |
| 71 one = 1, | |
| 72 } | |
| 73 | |
| 74 #endregion | |
| 75 | |
| 76 #region Messages | |
| 77 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] | |
| 78 public sealed partial class Issue307 : pb::IMessage<Issue307> { | |
| 79 private static readonly pb::MessageParser<Issue307> _parser = new pb::Messag
eParser<Issue307>(() => new Issue307()); | |
| 80 public static pb::MessageParser<Issue307> Parser { get { return _parser; } } | |
| 81 | |
| 82 public static pbr::MessageDescriptor Descriptor { | |
| 83 get { return global::UnitTest.Issues.TestProtos.UnittestIssues.Descriptor.
MessageTypes[0]; } | |
| 84 } | |
| 85 | |
| 86 pbr::MessageDescriptor pb::IMessage.Descriptor { | |
| 87 get { return Descriptor; } | |
| 88 } | |
| 89 | |
| 90 public Issue307() { | |
| 91 OnConstruction(); | |
| 92 } | |
| 93 | |
| 94 partial void OnConstruction(); | |
| 95 | |
| 96 public Issue307(Issue307 other) : this() { | |
| 97 } | |
| 98 | |
| 99 public Issue307 Clone() { | |
| 100 return new Issue307(this); | |
| 101 } | |
| 102 | |
| 103 public override bool Equals(object other) { | |
| 104 return Equals(other as Issue307); | |
| 105 } | |
| 106 | |
| 107 public bool Equals(Issue307 other) { | |
| 108 if (ReferenceEquals(other, null)) { | |
| 109 return false; | |
| 110 } | |
| 111 if (ReferenceEquals(other, this)) { | |
| 112 return true; | |
| 113 } | |
| 114 return true; | |
| 115 } | |
| 116 | |
| 117 public override int GetHashCode() { | |
| 118 int hash = 1; | |
| 119 return hash; | |
| 120 } | |
| 121 | |
| 122 public override string ToString() { | |
| 123 return pb::JsonFormatter.Default.Format(this); | |
| 124 } | |
| 125 | |
| 126 public void WriteTo(pb::CodedOutputStream output) { | |
| 127 } | |
| 128 | |
| 129 public int CalculateSize() { | |
| 130 int size = 0; | |
| 131 return size; | |
| 132 } | |
| 133 | |
| 134 public void MergeFrom(Issue307 other) { | |
| 135 if (other == null) { | |
| 136 return; | |
| 137 } | |
| 138 } | |
| 139 | |
| 140 public void MergeFrom(pb::CodedInputStream input) { | |
| 141 uint tag; | |
| 142 while ((tag = input.ReadTag()) != 0) { | |
| 143 switch(tag) { | |
| 144 default: | |
| 145 input.SkipLastField(); | |
| 146 break; | |
| 147 } | |
| 148 } | |
| 149 } | |
| 150 | |
| 151 #region Nested types | |
| 152 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] | |
| 153 public static partial class Types { | |
| 154 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] | |
| 155 public sealed partial class NestedOnce : pb::IMessage<NestedOnce> { | |
| 156 private static readonly pb::MessageParser<NestedOnce> _parser = new pb::
MessageParser<NestedOnce>(() => new NestedOnce()); | |
| 157 public static pb::MessageParser<NestedOnce> Parser { get { return _parse
r; } } | |
| 158 | |
| 159 public static pbr::MessageDescriptor Descriptor { | |
| 160 get { return global::UnitTest.Issues.TestProtos.Issue307.Descriptor.Ne
stedTypes[0]; } | |
| 161 } | |
| 162 | |
| 163 pbr::MessageDescriptor pb::IMessage.Descriptor { | |
| 164 get { return Descriptor; } | |
| 165 } | |
| 166 | |
| 167 public NestedOnce() { | |
| 168 OnConstruction(); | |
| 169 } | |
| 170 | |
| 171 partial void OnConstruction(); | |
| 172 | |
| 173 public NestedOnce(NestedOnce other) : this() { | |
| 174 } | |
| 175 | |
| 176 public NestedOnce Clone() { | |
| 177 return new NestedOnce(this); | |
| 178 } | |
| 179 | |
| 180 public override bool Equals(object other) { | |
| 181 return Equals(other as NestedOnce); | |
| 182 } | |
| 183 | |
| 184 public bool Equals(NestedOnce other) { | |
| 185 if (ReferenceEquals(other, null)) { | |
| 186 return false; | |
| 187 } | |
| 188 if (ReferenceEquals(other, this)) { | |
| 189 return true; | |
| 190 } | |
| 191 return true; | |
| 192 } | |
| 193 | |
| 194 public override int GetHashCode() { | |
| 195 int hash = 1; | |
| 196 return hash; | |
| 197 } | |
| 198 | |
| 199 public override string ToString() { | |
| 200 return pb::JsonFormatter.Default.Format(this); | |
| 201 } | |
| 202 | |
| 203 public void WriteTo(pb::CodedOutputStream output) { | |
| 204 } | |
| 205 | |
| 206 public int CalculateSize() { | |
| 207 int size = 0; | |
| 208 return size; | |
| 209 } | |
| 210 | |
| 211 public void MergeFrom(NestedOnce other) { | |
| 212 if (other == null) { | |
| 213 return; | |
| 214 } | |
| 215 } | |
| 216 | |
| 217 public void MergeFrom(pb::CodedInputStream input) { | |
| 218 uint tag; | |
| 219 while ((tag = input.ReadTag()) != 0) { | |
| 220 switch(tag) { | |
| 221 default: | |
| 222 input.SkipLastField(); | |
| 223 break; | |
| 224 } | |
| 225 } | |
| 226 } | |
| 227 | |
| 228 #region Nested types | |
| 229 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] | |
| 230 public static partial class Types { | |
| 231 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] | |
| 232 public sealed partial class NestedTwice : pb::IMessage<NestedTwice> { | |
| 233 private static readonly pb::MessageParser<NestedTwice> _parser = new
pb::MessageParser<NestedTwice>(() => new NestedTwice()); | |
| 234 public static pb::MessageParser<NestedTwice> Parser { get { return _
parser; } } | |
| 235 | |
| 236 public static pbr::MessageDescriptor Descriptor { | |
| 237 get { return global::UnitTest.Issues.TestProtos.Issue307.Types.Nes
tedOnce.Descriptor.NestedTypes[0]; } | |
| 238 } | |
| 239 | |
| 240 pbr::MessageDescriptor pb::IMessage.Descriptor { | |
| 241 get { return Descriptor; } | |
| 242 } | |
| 243 | |
| 244 public NestedTwice() { | |
| 245 OnConstruction(); | |
| 246 } | |
| 247 | |
| 248 partial void OnConstruction(); | |
| 249 | |
| 250 public NestedTwice(NestedTwice other) : this() { | |
| 251 } | |
| 252 | |
| 253 public NestedTwice Clone() { | |
| 254 return new NestedTwice(this); | |
| 255 } | |
| 256 | |
| 257 public override bool Equals(object other) { | |
| 258 return Equals(other as NestedTwice); | |
| 259 } | |
| 260 | |
| 261 public bool Equals(NestedTwice other) { | |
| 262 if (ReferenceEquals(other, null)) { | |
| 263 return false; | |
| 264 } | |
| 265 if (ReferenceEquals(other, this)) { | |
| 266 return true; | |
| 267 } | |
| 268 return true; | |
| 269 } | |
| 270 | |
| 271 public override int GetHashCode() { | |
| 272 int hash = 1; | |
| 273 return hash; | |
| 274 } | |
| 275 | |
| 276 public override string ToString() { | |
| 277 return pb::JsonFormatter.Default.Format(this); | |
| 278 } | |
| 279 | |
| 280 public void WriteTo(pb::CodedOutputStream output) { | |
| 281 } | |
| 282 | |
| 283 public int CalculateSize() { | |
| 284 int size = 0; | |
| 285 return size; | |
| 286 } | |
| 287 | |
| 288 public void MergeFrom(NestedTwice other) { | |
| 289 if (other == null) { | |
| 290 return; | |
| 291 } | |
| 292 } | |
| 293 | |
| 294 public void MergeFrom(pb::CodedInputStream input) { | |
| 295 uint tag; | |
| 296 while ((tag = input.ReadTag()) != 0) { | |
| 297 switch(tag) { | |
| 298 default: | |
| 299 input.SkipLastField(); | |
| 300 break; | |
| 301 } | |
| 302 } | |
| 303 } | |
| 304 | |
| 305 } | |
| 306 | |
| 307 } | |
| 308 #endregion | |
| 309 | |
| 310 } | |
| 311 | |
| 312 } | |
| 313 #endregion | |
| 314 | |
| 315 } | |
| 316 | |
| 317 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] | |
| 318 public sealed partial class NegativeEnumMessage : pb::IMessage<NegativeEnumMes
sage> { | |
| 319 private static readonly pb::MessageParser<NegativeEnumMessage> _parser = new
pb::MessageParser<NegativeEnumMessage>(() => new NegativeEnumMessage()); | |
| 320 public static pb::MessageParser<NegativeEnumMessage> Parser { get { return _
parser; } } | |
| 321 | |
| 322 public static pbr::MessageDescriptor Descriptor { | |
| 323 get { return global::UnitTest.Issues.TestProtos.UnittestIssues.Descriptor.
MessageTypes[1]; } | |
| 324 } | |
| 325 | |
| 326 pbr::MessageDescriptor pb::IMessage.Descriptor { | |
| 327 get { return Descriptor; } | |
| 328 } | |
| 329 | |
| 330 public NegativeEnumMessage() { | |
| 331 OnConstruction(); | |
| 332 } | |
| 333 | |
| 334 partial void OnConstruction(); | |
| 335 | |
| 336 public NegativeEnumMessage(NegativeEnumMessage other) : this() { | |
| 337 value_ = other.value_; | |
| 338 values_ = other.values_.Clone(); | |
| 339 packedValues_ = other.packedValues_.Clone(); | |
| 340 } | |
| 341 | |
| 342 public NegativeEnumMessage Clone() { | |
| 343 return new NegativeEnumMessage(this); | |
| 344 } | |
| 345 | |
| 346 public const int ValueFieldNumber = 1; | |
| 347 private global::UnitTest.Issues.TestProtos.NegativeEnum value_ = global::Uni
tTest.Issues.TestProtos.NegativeEnum.NEGATIVE_ENUM_ZERO; | |
| 348 public global::UnitTest.Issues.TestProtos.NegativeEnum Value { | |
| 349 get { return value_; } | |
| 350 set { | |
| 351 value_ = value; | |
| 352 } | |
| 353 } | |
| 354 | |
| 355 public const int ValuesFieldNumber = 2; | |
| 356 private static readonly pb::FieldCodec<global::UnitTest.Issues.TestProtos.Ne
gativeEnum> _repeated_values_codec | |
| 357 = pb::FieldCodec.ForEnum(16, x => (int) x, x => (global::UnitTest.Issues
.TestProtos.NegativeEnum) x); | |
| 358 private readonly pbc::RepeatedField<global::UnitTest.Issues.TestProtos.Negat
iveEnum> values_ = new pbc::RepeatedField<global::UnitTest.Issues.TestProtos.Neg
ativeEnum>(); | |
| 359 public pbc::RepeatedField<global::UnitTest.Issues.TestProtos.NegativeEnum> V
alues { | |
| 360 get { return values_; } | |
| 361 } | |
| 362 | |
| 363 public const int PackedValuesFieldNumber = 3; | |
| 364 private static readonly pb::FieldCodec<global::UnitTest.Issues.TestProtos.Ne
gativeEnum> _repeated_packedValues_codec | |
| 365 = pb::FieldCodec.ForEnum(26, x => (int) x, x => (global::UnitTest.Issues
.TestProtos.NegativeEnum) x); | |
| 366 private readonly pbc::RepeatedField<global::UnitTest.Issues.TestProtos.Negat
iveEnum> packedValues_ = new pbc::RepeatedField<global::UnitTest.Issues.TestProt
os.NegativeEnum>(); | |
| 367 public pbc::RepeatedField<global::UnitTest.Issues.TestProtos.NegativeEnum> P
ackedValues { | |
| 368 get { return packedValues_; } | |
| 369 } | |
| 370 | |
| 371 public override bool Equals(object other) { | |
| 372 return Equals(other as NegativeEnumMessage); | |
| 373 } | |
| 374 | |
| 375 public bool Equals(NegativeEnumMessage other) { | |
| 376 if (ReferenceEquals(other, null)) { | |
| 377 return false; | |
| 378 } | |
| 379 if (ReferenceEquals(other, this)) { | |
| 380 return true; | |
| 381 } | |
| 382 if (Value != other.Value) return false; | |
| 383 if(!values_.Equals(other.values_)) return false; | |
| 384 if(!packedValues_.Equals(other.packedValues_)) return false; | |
| 385 return true; | |
| 386 } | |
| 387 | |
| 388 public override int GetHashCode() { | |
| 389 int hash = 1; | |
| 390 if (Value != global::UnitTest.Issues.TestProtos.NegativeEnum.NEGATIVE_ENUM
_ZERO) hash ^= Value.GetHashCode(); | |
| 391 hash ^= values_.GetHashCode(); | |
| 392 hash ^= packedValues_.GetHashCode(); | |
| 393 return hash; | |
| 394 } | |
| 395 | |
| 396 public override string ToString() { | |
| 397 return pb::JsonFormatter.Default.Format(this); | |
| 398 } | |
| 399 | |
| 400 public void WriteTo(pb::CodedOutputStream output) { | |
| 401 if (Value != global::UnitTest.Issues.TestProtos.NegativeEnum.NEGATIVE_ENUM
_ZERO) { | |
| 402 output.WriteRawTag(8); | |
| 403 output.WriteEnum((int) Value); | |
| 404 } | |
| 405 values_.WriteTo(output, _repeated_values_codec); | |
| 406 packedValues_.WriteTo(output, _repeated_packedValues_codec); | |
| 407 } | |
| 408 | |
| 409 public int CalculateSize() { | |
| 410 int size = 0; | |
| 411 if (Value != global::UnitTest.Issues.TestProtos.NegativeEnum.NEGATIVE_ENUM
_ZERO) { | |
| 412 size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Value); | |
| 413 } | |
| 414 size += values_.CalculateSize(_repeated_values_codec); | |
| 415 size += packedValues_.CalculateSize(_repeated_packedValues_codec); | |
| 416 return size; | |
| 417 } | |
| 418 | |
| 419 public void MergeFrom(NegativeEnumMessage other) { | |
| 420 if (other == null) { | |
| 421 return; | |
| 422 } | |
| 423 if (other.Value != global::UnitTest.Issues.TestProtos.NegativeEnum.NEGATIV
E_ENUM_ZERO) { | |
| 424 Value = other.Value; | |
| 425 } | |
| 426 values_.Add(other.values_); | |
| 427 packedValues_.Add(other.packedValues_); | |
| 428 } | |
| 429 | |
| 430 public void MergeFrom(pb::CodedInputStream input) { | |
| 431 uint tag; | |
| 432 while ((tag = input.ReadTag()) != 0) { | |
| 433 switch(tag) { | |
| 434 default: | |
| 435 input.SkipLastField(); | |
| 436 break; | |
| 437 case 8: { | |
| 438 value_ = (global::UnitTest.Issues.TestProtos.NegativeEnum) input.Rea
dEnum(); | |
| 439 break; | |
| 440 } | |
| 441 case 18: | |
| 442 case 16: { | |
| 443 values_.AddEntriesFrom(input, _repeated_values_codec); | |
| 444 break; | |
| 445 } | |
| 446 case 26: | |
| 447 case 24: { | |
| 448 packedValues_.AddEntriesFrom(input, _repeated_packedValues_codec); | |
| 449 break; | |
| 450 } | |
| 451 } | |
| 452 } | |
| 453 } | |
| 454 | |
| 455 } | |
| 456 | |
| 457 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] | |
| 458 public sealed partial class DeprecatedChild : pb::IMessage<DeprecatedChild> { | |
| 459 private static readonly pb::MessageParser<DeprecatedChild> _parser = new pb:
:MessageParser<DeprecatedChild>(() => new DeprecatedChild()); | |
| 460 public static pb::MessageParser<DeprecatedChild> Parser { get { return _pars
er; } } | |
| 461 | |
| 462 public static pbr::MessageDescriptor Descriptor { | |
| 463 get { return global::UnitTest.Issues.TestProtos.UnittestIssues.Descriptor.
MessageTypes[2]; } | |
| 464 } | |
| 465 | |
| 466 pbr::MessageDescriptor pb::IMessage.Descriptor { | |
| 467 get { return Descriptor; } | |
| 468 } | |
| 469 | |
| 470 public DeprecatedChild() { | |
| 471 OnConstruction(); | |
| 472 } | |
| 473 | |
| 474 partial void OnConstruction(); | |
| 475 | |
| 476 public DeprecatedChild(DeprecatedChild other) : this() { | |
| 477 } | |
| 478 | |
| 479 public DeprecatedChild Clone() { | |
| 480 return new DeprecatedChild(this); | |
| 481 } | |
| 482 | |
| 483 public override bool Equals(object other) { | |
| 484 return Equals(other as DeprecatedChild); | |
| 485 } | |
| 486 | |
| 487 public bool Equals(DeprecatedChild other) { | |
| 488 if (ReferenceEquals(other, null)) { | |
| 489 return false; | |
| 490 } | |
| 491 if (ReferenceEquals(other, this)) { | |
| 492 return true; | |
| 493 } | |
| 494 return true; | |
| 495 } | |
| 496 | |
| 497 public override int GetHashCode() { | |
| 498 int hash = 1; | |
| 499 return hash; | |
| 500 } | |
| 501 | |
| 502 public override string ToString() { | |
| 503 return pb::JsonFormatter.Default.Format(this); | |
| 504 } | |
| 505 | |
| 506 public void WriteTo(pb::CodedOutputStream output) { | |
| 507 } | |
| 508 | |
| 509 public int CalculateSize() { | |
| 510 int size = 0; | |
| 511 return size; | |
| 512 } | |
| 513 | |
| 514 public void MergeFrom(DeprecatedChild other) { | |
| 515 if (other == null) { | |
| 516 return; | |
| 517 } | |
| 518 } | |
| 519 | |
| 520 public void MergeFrom(pb::CodedInputStream input) { | |
| 521 uint tag; | |
| 522 while ((tag = input.ReadTag()) != 0) { | |
| 523 switch(tag) { | |
| 524 default: | |
| 525 input.SkipLastField(); | |
| 526 break; | |
| 527 } | |
| 528 } | |
| 529 } | |
| 530 | |
| 531 } | |
| 532 | |
| 533 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] | |
| 534 public sealed partial class DeprecatedFieldsMessage : pb::IMessage<DeprecatedF
ieldsMessage> { | |
| 535 private static readonly pb::MessageParser<DeprecatedFieldsMessage> _parser =
new pb::MessageParser<DeprecatedFieldsMessage>(() => new DeprecatedFieldsMessag
e()); | |
| 536 public static pb::MessageParser<DeprecatedFieldsMessage> Parser { get { retu
rn _parser; } } | |
| 537 | |
| 538 public static pbr::MessageDescriptor Descriptor { | |
| 539 get { return global::UnitTest.Issues.TestProtos.UnittestIssues.Descriptor.
MessageTypes[3]; } | |
| 540 } | |
| 541 | |
| 542 pbr::MessageDescriptor pb::IMessage.Descriptor { | |
| 543 get { return Descriptor; } | |
| 544 } | |
| 545 | |
| 546 public DeprecatedFieldsMessage() { | |
| 547 OnConstruction(); | |
| 548 } | |
| 549 | |
| 550 partial void OnConstruction(); | |
| 551 | |
| 552 public DeprecatedFieldsMessage(DeprecatedFieldsMessage other) : this() { | |
| 553 primitiveValue_ = other.primitiveValue_; | |
| 554 primitiveArray_ = other.primitiveArray_.Clone(); | |
| 555 MessageValue = other.messageValue_ != null ? other.MessageValue.Clone() :
null; | |
| 556 messageArray_ = other.messageArray_.Clone(); | |
| 557 enumValue_ = other.enumValue_; | |
| 558 enumArray_ = other.enumArray_.Clone(); | |
| 559 } | |
| 560 | |
| 561 public DeprecatedFieldsMessage Clone() { | |
| 562 return new DeprecatedFieldsMessage(this); | |
| 563 } | |
| 564 | |
| 565 public const int PrimitiveValueFieldNumber = 1; | |
| 566 private int primitiveValue_; | |
| 567 [global::System.ObsoleteAttribute()] | |
| 568 public int PrimitiveValue { | |
| 569 get { return primitiveValue_; } | |
| 570 set { | |
| 571 primitiveValue_ = value; | |
| 572 } | |
| 573 } | |
| 574 | |
| 575 public const int PrimitiveArrayFieldNumber = 2; | |
| 576 private static readonly pb::FieldCodec<int> _repeated_primitiveArray_codec | |
| 577 = pb::FieldCodec.ForInt32(18); | |
| 578 private readonly pbc::RepeatedField<int> primitiveArray_ = new pbc::Repeated
Field<int>(); | |
| 579 [global::System.ObsoleteAttribute()] | |
| 580 public pbc::RepeatedField<int> PrimitiveArray { | |
| 581 get { return primitiveArray_; } | |
| 582 } | |
| 583 | |
| 584 public const int MessageValueFieldNumber = 3; | |
| 585 private global::UnitTest.Issues.TestProtos.DeprecatedChild messageValue_; | |
| 586 [global::System.ObsoleteAttribute()] | |
| 587 public global::UnitTest.Issues.TestProtos.DeprecatedChild MessageValue { | |
| 588 get { return messageValue_; } | |
| 589 set { | |
| 590 messageValue_ = value; | |
| 591 } | |
| 592 } | |
| 593 | |
| 594 public const int MessageArrayFieldNumber = 4; | |
| 595 private static readonly pb::FieldCodec<global::UnitTest.Issues.TestProtos.De
precatedChild> _repeated_messageArray_codec | |
| 596 = pb::FieldCodec.ForMessage(34, global::UnitTest.Issues.TestProtos.Depre
catedChild.Parser); | |
| 597 private readonly pbc::RepeatedField<global::UnitTest.Issues.TestProtos.Depre
catedChild> messageArray_ = new pbc::RepeatedField<global::UnitTest.Issues.TestP
rotos.DeprecatedChild>(); | |
| 598 [global::System.ObsoleteAttribute()] | |
| 599 public pbc::RepeatedField<global::UnitTest.Issues.TestProtos.DeprecatedChild
> MessageArray { | |
| 600 get { return messageArray_; } | |
| 601 } | |
| 602 | |
| 603 public const int EnumValueFieldNumber = 5; | |
| 604 private global::UnitTest.Issues.TestProtos.DeprecatedEnum enumValue_ = globa
l::UnitTest.Issues.TestProtos.DeprecatedEnum.DEPRECATED_ZERO; | |
| 605 [global::System.ObsoleteAttribute()] | |
| 606 public global::UnitTest.Issues.TestProtos.DeprecatedEnum EnumValue { | |
| 607 get { return enumValue_; } | |
| 608 set { | |
| 609 enumValue_ = value; | |
| 610 } | |
| 611 } | |
| 612 | |
| 613 public const int EnumArrayFieldNumber = 6; | |
| 614 private static readonly pb::FieldCodec<global::UnitTest.Issues.TestProtos.De
precatedEnum> _repeated_enumArray_codec | |
| 615 = pb::FieldCodec.ForEnum(50, x => (int) x, x => (global::UnitTest.Issues
.TestProtos.DeprecatedEnum) x); | |
| 616 private readonly pbc::RepeatedField<global::UnitTest.Issues.TestProtos.Depre
catedEnum> enumArray_ = new pbc::RepeatedField<global::UnitTest.Issues.TestProto
s.DeprecatedEnum>(); | |
| 617 [global::System.ObsoleteAttribute()] | |
| 618 public pbc::RepeatedField<global::UnitTest.Issues.TestProtos.DeprecatedEnum>
EnumArray { | |
| 619 get { return enumArray_; } | |
| 620 } | |
| 621 | |
| 622 public override bool Equals(object other) { | |
| 623 return Equals(other as DeprecatedFieldsMessage); | |
| 624 } | |
| 625 | |
| 626 public bool Equals(DeprecatedFieldsMessage other) { | |
| 627 if (ReferenceEquals(other, null)) { | |
| 628 return false; | |
| 629 } | |
| 630 if (ReferenceEquals(other, this)) { | |
| 631 return true; | |
| 632 } | |
| 633 if (PrimitiveValue != other.PrimitiveValue) return false; | |
| 634 if(!primitiveArray_.Equals(other.primitiveArray_)) return false; | |
| 635 if (!object.Equals(MessageValue, other.MessageValue)) return false; | |
| 636 if(!messageArray_.Equals(other.messageArray_)) return false; | |
| 637 if (EnumValue != other.EnumValue) return false; | |
| 638 if(!enumArray_.Equals(other.enumArray_)) return false; | |
| 639 return true; | |
| 640 } | |
| 641 | |
| 642 public override int GetHashCode() { | |
| 643 int hash = 1; | |
| 644 if (PrimitiveValue != 0) hash ^= PrimitiveValue.GetHashCode(); | |
| 645 hash ^= primitiveArray_.GetHashCode(); | |
| 646 if (messageValue_ != null) hash ^= MessageValue.GetHashCode(); | |
| 647 hash ^= messageArray_.GetHashCode(); | |
| 648 if (EnumValue != global::UnitTest.Issues.TestProtos.DeprecatedEnum.DEPRECA
TED_ZERO) hash ^= EnumValue.GetHashCode(); | |
| 649 hash ^= enumArray_.GetHashCode(); | |
| 650 return hash; | |
| 651 } | |
| 652 | |
| 653 public override string ToString() { | |
| 654 return pb::JsonFormatter.Default.Format(this); | |
| 655 } | |
| 656 | |
| 657 public void WriteTo(pb::CodedOutputStream output) { | |
| 658 if (PrimitiveValue != 0) { | |
| 659 output.WriteRawTag(8); | |
| 660 output.WriteInt32(PrimitiveValue); | |
| 661 } | |
| 662 primitiveArray_.WriteTo(output, _repeated_primitiveArray_codec); | |
| 663 if (messageValue_ != null) { | |
| 664 output.WriteRawTag(26); | |
| 665 output.WriteMessage(MessageValue); | |
| 666 } | |
| 667 messageArray_.WriteTo(output, _repeated_messageArray_codec); | |
| 668 if (EnumValue != global::UnitTest.Issues.TestProtos.DeprecatedEnum.DEPRECA
TED_ZERO) { | |
| 669 output.WriteRawTag(40); | |
| 670 output.WriteEnum((int) EnumValue); | |
| 671 } | |
| 672 enumArray_.WriteTo(output, _repeated_enumArray_codec); | |
| 673 } | |
| 674 | |
| 675 public int CalculateSize() { | |
| 676 int size = 0; | |
| 677 if (PrimitiveValue != 0) { | |
| 678 size += 1 + pb::CodedOutputStream.ComputeInt32Size(PrimitiveValue); | |
| 679 } | |
| 680 size += primitiveArray_.CalculateSize(_repeated_primitiveArray_codec); | |
| 681 if (messageValue_ != null) { | |
| 682 size += 1 + pb::CodedOutputStream.ComputeMessageSize(MessageValue); | |
| 683 } | |
| 684 size += messageArray_.CalculateSize(_repeated_messageArray_codec); | |
| 685 if (EnumValue != global::UnitTest.Issues.TestProtos.DeprecatedEnum.DEPRECA
TED_ZERO) { | |
| 686 size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) EnumValue); | |
| 687 } | |
| 688 size += enumArray_.CalculateSize(_repeated_enumArray_codec); | |
| 689 return size; | |
| 690 } | |
| 691 | |
| 692 public void MergeFrom(DeprecatedFieldsMessage other) { | |
| 693 if (other == null) { | |
| 694 return; | |
| 695 } | |
| 696 if (other.PrimitiveValue != 0) { | |
| 697 PrimitiveValue = other.PrimitiveValue; | |
| 698 } | |
| 699 primitiveArray_.Add(other.primitiveArray_); | |
| 700 if (other.messageValue_ != null) { | |
| 701 if (messageValue_ == null) { | |
| 702 messageValue_ = new global::UnitTest.Issues.TestProtos.DeprecatedChild
(); | |
| 703 } | |
| 704 MessageValue.MergeFrom(other.MessageValue); | |
| 705 } | |
| 706 messageArray_.Add(other.messageArray_); | |
| 707 if (other.EnumValue != global::UnitTest.Issues.TestProtos.DeprecatedEnum.D
EPRECATED_ZERO) { | |
| 708 EnumValue = other.EnumValue; | |
| 709 } | |
| 710 enumArray_.Add(other.enumArray_); | |
| 711 } | |
| 712 | |
| 713 public void MergeFrom(pb::CodedInputStream input) { | |
| 714 uint tag; | |
| 715 while ((tag = input.ReadTag()) != 0) { | |
| 716 switch(tag) { | |
| 717 default: | |
| 718 input.SkipLastField(); | |
| 719 break; | |
| 720 case 8: { | |
| 721 PrimitiveValue = input.ReadInt32(); | |
| 722 break; | |
| 723 } | |
| 724 case 18: | |
| 725 case 16: { | |
| 726 primitiveArray_.AddEntriesFrom(input, _repeated_primitiveArray_codec
); | |
| 727 break; | |
| 728 } | |
| 729 case 26: { | |
| 730 if (messageValue_ == null) { | |
| 731 messageValue_ = new global::UnitTest.Issues.TestProtos.DeprecatedC
hild(); | |
| 732 } | |
| 733 input.ReadMessage(messageValue_); | |
| 734 break; | |
| 735 } | |
| 736 case 34: { | |
| 737 messageArray_.AddEntriesFrom(input, _repeated_messageArray_codec); | |
| 738 break; | |
| 739 } | |
| 740 case 40: { | |
| 741 enumValue_ = (global::UnitTest.Issues.TestProtos.DeprecatedEnum) inp
ut.ReadEnum(); | |
| 742 break; | |
| 743 } | |
| 744 case 50: | |
| 745 case 48: { | |
| 746 enumArray_.AddEntriesFrom(input, _repeated_enumArray_codec); | |
| 747 break; | |
| 748 } | |
| 749 } | |
| 750 } | |
| 751 } | |
| 752 | |
| 753 } | |
| 754 | |
| 755 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] | |
| 756 public sealed partial class ItemField : pb::IMessage<ItemField> { | |
| 757 private static readonly pb::MessageParser<ItemField> _parser = new pb::Messa
geParser<ItemField>(() => new ItemField()); | |
| 758 public static pb::MessageParser<ItemField> Parser { get { return _parser; }
} | |
| 759 | |
| 760 public static pbr::MessageDescriptor Descriptor { | |
| 761 get { return global::UnitTest.Issues.TestProtos.UnittestIssues.Descriptor.
MessageTypes[4]; } | |
| 762 } | |
| 763 | |
| 764 pbr::MessageDescriptor pb::IMessage.Descriptor { | |
| 765 get { return Descriptor; } | |
| 766 } | |
| 767 | |
| 768 public ItemField() { | |
| 769 OnConstruction(); | |
| 770 } | |
| 771 | |
| 772 partial void OnConstruction(); | |
| 773 | |
| 774 public ItemField(ItemField other) : this() { | |
| 775 item_ = other.item_; | |
| 776 } | |
| 777 | |
| 778 public ItemField Clone() { | |
| 779 return new ItemField(this); | |
| 780 } | |
| 781 | |
| 782 public const int ItemFieldNumber = 1; | |
| 783 private int item_; | |
| 784 public int Item { | |
| 785 get { return item_; } | |
| 786 set { | |
| 787 item_ = value; | |
| 788 } | |
| 789 } | |
| 790 | |
| 791 public override bool Equals(object other) { | |
| 792 return Equals(other as ItemField); | |
| 793 } | |
| 794 | |
| 795 public bool Equals(ItemField other) { | |
| 796 if (ReferenceEquals(other, null)) { | |
| 797 return false; | |
| 798 } | |
| 799 if (ReferenceEquals(other, this)) { | |
| 800 return true; | |
| 801 } | |
| 802 if (Item != other.Item) return false; | |
| 803 return true; | |
| 804 } | |
| 805 | |
| 806 public override int GetHashCode() { | |
| 807 int hash = 1; | |
| 808 if (Item != 0) hash ^= Item.GetHashCode(); | |
| 809 return hash; | |
| 810 } | |
| 811 | |
| 812 public override string ToString() { | |
| 813 return pb::JsonFormatter.Default.Format(this); | |
| 814 } | |
| 815 | |
| 816 public void WriteTo(pb::CodedOutputStream output) { | |
| 817 if (Item != 0) { | |
| 818 output.WriteRawTag(8); | |
| 819 output.WriteInt32(Item); | |
| 820 } | |
| 821 } | |
| 822 | |
| 823 public int CalculateSize() { | |
| 824 int size = 0; | |
| 825 if (Item != 0) { | |
| 826 size += 1 + pb::CodedOutputStream.ComputeInt32Size(Item); | |
| 827 } | |
| 828 return size; | |
| 829 } | |
| 830 | |
| 831 public void MergeFrom(ItemField other) { | |
| 832 if (other == null) { | |
| 833 return; | |
| 834 } | |
| 835 if (other.Item != 0) { | |
| 836 Item = other.Item; | |
| 837 } | |
| 838 } | |
| 839 | |
| 840 public void MergeFrom(pb::CodedInputStream input) { | |
| 841 uint tag; | |
| 842 while ((tag = input.ReadTag()) != 0) { | |
| 843 switch(tag) { | |
| 844 default: | |
| 845 input.SkipLastField(); | |
| 846 break; | |
| 847 case 8: { | |
| 848 Item = input.ReadInt32(); | |
| 849 break; | |
| 850 } | |
| 851 } | |
| 852 } | |
| 853 } | |
| 854 | |
| 855 } | |
| 856 | |
| 857 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] | |
| 858 public sealed partial class ReservedNames : pb::IMessage<ReservedNames> { | |
| 859 private static readonly pb::MessageParser<ReservedNames> _parser = new pb::M
essageParser<ReservedNames>(() => new ReservedNames()); | |
| 860 public static pb::MessageParser<ReservedNames> Parser { get { return _parser
; } } | |
| 861 | |
| 862 public static pbr::MessageDescriptor Descriptor { | |
| 863 get { return global::UnitTest.Issues.TestProtos.UnittestIssues.Descriptor.
MessageTypes[5]; } | |
| 864 } | |
| 865 | |
| 866 pbr::MessageDescriptor pb::IMessage.Descriptor { | |
| 867 get { return Descriptor; } | |
| 868 } | |
| 869 | |
| 870 public ReservedNames() { | |
| 871 OnConstruction(); | |
| 872 } | |
| 873 | |
| 874 partial void OnConstruction(); | |
| 875 | |
| 876 public ReservedNames(ReservedNames other) : this() { | |
| 877 types_ = other.types_; | |
| 878 descriptor_ = other.descriptor_; | |
| 879 } | |
| 880 | |
| 881 public ReservedNames Clone() { | |
| 882 return new ReservedNames(this); | |
| 883 } | |
| 884 | |
| 885 public const int Types_FieldNumber = 1; | |
| 886 private int types_; | |
| 887 public int Types_ { | |
| 888 get { return types_; } | |
| 889 set { | |
| 890 types_ = value; | |
| 891 } | |
| 892 } | |
| 893 | |
| 894 public const int Descriptor_FieldNumber = 2; | |
| 895 private int descriptor_; | |
| 896 public int Descriptor_ { | |
| 897 get { return descriptor_; } | |
| 898 set { | |
| 899 descriptor_ = value; | |
| 900 } | |
| 901 } | |
| 902 | |
| 903 public override bool Equals(object other) { | |
| 904 return Equals(other as ReservedNames); | |
| 905 } | |
| 906 | |
| 907 public bool Equals(ReservedNames other) { | |
| 908 if (ReferenceEquals(other, null)) { | |
| 909 return false; | |
| 910 } | |
| 911 if (ReferenceEquals(other, this)) { | |
| 912 return true; | |
| 913 } | |
| 914 if (Types_ != other.Types_) return false; | |
| 915 if (Descriptor_ != other.Descriptor_) return false; | |
| 916 return true; | |
| 917 } | |
| 918 | |
| 919 public override int GetHashCode() { | |
| 920 int hash = 1; | |
| 921 if (Types_ != 0) hash ^= Types_.GetHashCode(); | |
| 922 if (Descriptor_ != 0) hash ^= Descriptor_.GetHashCode(); | |
| 923 return hash; | |
| 924 } | |
| 925 | |
| 926 public override string ToString() { | |
| 927 return pb::JsonFormatter.Default.Format(this); | |
| 928 } | |
| 929 | |
| 930 public void WriteTo(pb::CodedOutputStream output) { | |
| 931 if (Types_ != 0) { | |
| 932 output.WriteRawTag(8); | |
| 933 output.WriteInt32(Types_); | |
| 934 } | |
| 935 if (Descriptor_ != 0) { | |
| 936 output.WriteRawTag(16); | |
| 937 output.WriteInt32(Descriptor_); | |
| 938 } | |
| 939 } | |
| 940 | |
| 941 public int CalculateSize() { | |
| 942 int size = 0; | |
| 943 if (Types_ != 0) { | |
| 944 size += 1 + pb::CodedOutputStream.ComputeInt32Size(Types_); | |
| 945 } | |
| 946 if (Descriptor_ != 0) { | |
| 947 size += 1 + pb::CodedOutputStream.ComputeInt32Size(Descriptor_); | |
| 948 } | |
| 949 return size; | |
| 950 } | |
| 951 | |
| 952 public void MergeFrom(ReservedNames other) { | |
| 953 if (other == null) { | |
| 954 return; | |
| 955 } | |
| 956 if (other.Types_ != 0) { | |
| 957 Types_ = other.Types_; | |
| 958 } | |
| 959 if (other.Descriptor_ != 0) { | |
| 960 Descriptor_ = other.Descriptor_; | |
| 961 } | |
| 962 } | |
| 963 | |
| 964 public void MergeFrom(pb::CodedInputStream input) { | |
| 965 uint tag; | |
| 966 while ((tag = input.ReadTag()) != 0) { | |
| 967 switch(tag) { | |
| 968 default: | |
| 969 input.SkipLastField(); | |
| 970 break; | |
| 971 case 8: { | |
| 972 Types_ = input.ReadInt32(); | |
| 973 break; | |
| 974 } | |
| 975 case 16: { | |
| 976 Descriptor_ = input.ReadInt32(); | |
| 977 break; | |
| 978 } | |
| 979 } | |
| 980 } | |
| 981 } | |
| 982 | |
| 983 #region Nested types | |
| 984 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] | |
| 985 public static partial class Types { | |
| 986 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] | |
| 987 public sealed partial class SomeNestedType : pb::IMessage<SomeNestedType>
{ | |
| 988 private static readonly pb::MessageParser<SomeNestedType> _parser = new
pb::MessageParser<SomeNestedType>(() => new SomeNestedType()); | |
| 989 public static pb::MessageParser<SomeNestedType> Parser { get { return _p
arser; } } | |
| 990 | |
| 991 public static pbr::MessageDescriptor Descriptor { | |
| 992 get { return global::UnitTest.Issues.TestProtos.ReservedNames.Descript
or.NestedTypes[0]; } | |
| 993 } | |
| 994 | |
| 995 pbr::MessageDescriptor pb::IMessage.Descriptor { | |
| 996 get { return Descriptor; } | |
| 997 } | |
| 998 | |
| 999 public SomeNestedType() { | |
| 1000 OnConstruction(); | |
| 1001 } | |
| 1002 | |
| 1003 partial void OnConstruction(); | |
| 1004 | |
| 1005 public SomeNestedType(SomeNestedType other) : this() { | |
| 1006 } | |
| 1007 | |
| 1008 public SomeNestedType Clone() { | |
| 1009 return new SomeNestedType(this); | |
| 1010 } | |
| 1011 | |
| 1012 public override bool Equals(object other) { | |
| 1013 return Equals(other as SomeNestedType); | |
| 1014 } | |
| 1015 | |
| 1016 public bool Equals(SomeNestedType other) { | |
| 1017 if (ReferenceEquals(other, null)) { | |
| 1018 return false; | |
| 1019 } | |
| 1020 if (ReferenceEquals(other, this)) { | |
| 1021 return true; | |
| 1022 } | |
| 1023 return true; | |
| 1024 } | |
| 1025 | |
| 1026 public override int GetHashCode() { | |
| 1027 int hash = 1; | |
| 1028 return hash; | |
| 1029 } | |
| 1030 | |
| 1031 public override string ToString() { | |
| 1032 return pb::JsonFormatter.Default.Format(this); | |
| 1033 } | |
| 1034 | |
| 1035 public void WriteTo(pb::CodedOutputStream output) { | |
| 1036 } | |
| 1037 | |
| 1038 public int CalculateSize() { | |
| 1039 int size = 0; | |
| 1040 return size; | |
| 1041 } | |
| 1042 | |
| 1043 public void MergeFrom(SomeNestedType other) { | |
| 1044 if (other == null) { | |
| 1045 return; | |
| 1046 } | |
| 1047 } | |
| 1048 | |
| 1049 public void MergeFrom(pb::CodedInputStream input) { | |
| 1050 uint tag; | |
| 1051 while ((tag = input.ReadTag()) != 0) { | |
| 1052 switch(tag) { | |
| 1053 default: | |
| 1054 input.SkipLastField(); | |
| 1055 break; | |
| 1056 } | |
| 1057 } | |
| 1058 } | |
| 1059 | |
| 1060 } | |
| 1061 | |
| 1062 } | |
| 1063 #endregion | |
| 1064 | |
| 1065 } | |
| 1066 | |
| 1067 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] | |
| 1068 public sealed partial class TestJsonFieldOrdering : pb::IMessage<TestJsonField
Ordering> { | |
| 1069 private static readonly pb::MessageParser<TestJsonFieldOrdering> _parser = n
ew pb::MessageParser<TestJsonFieldOrdering>(() => new TestJsonFieldOrdering()); | |
| 1070 public static pb::MessageParser<TestJsonFieldOrdering> Parser { get { return
_parser; } } | |
| 1071 | |
| 1072 public static pbr::MessageDescriptor Descriptor { | |
| 1073 get { return global::UnitTest.Issues.TestProtos.UnittestIssues.Descriptor.
MessageTypes[6]; } | |
| 1074 } | |
| 1075 | |
| 1076 pbr::MessageDescriptor pb::IMessage.Descriptor { | |
| 1077 get { return Descriptor; } | |
| 1078 } | |
| 1079 | |
| 1080 public TestJsonFieldOrdering() { | |
| 1081 OnConstruction(); | |
| 1082 } | |
| 1083 | |
| 1084 partial void OnConstruction(); | |
| 1085 | |
| 1086 public TestJsonFieldOrdering(TestJsonFieldOrdering other) : this() { | |
| 1087 plainInt32_ = other.plainInt32_; | |
| 1088 plainString_ = other.plainString_; | |
| 1089 switch (other.O1Case) { | |
| 1090 case O1OneofCase.O1String: | |
| 1091 O1String = other.O1String; | |
| 1092 break; | |
| 1093 case O1OneofCase.O1Int32: | |
| 1094 O1Int32 = other.O1Int32; | |
| 1095 break; | |
| 1096 } | |
| 1097 | |
| 1098 switch (other.O2Case) { | |
| 1099 case O2OneofCase.O2Int32: | |
| 1100 O2Int32 = other.O2Int32; | |
| 1101 break; | |
| 1102 case O2OneofCase.O2String: | |
| 1103 O2String = other.O2String; | |
| 1104 break; | |
| 1105 } | |
| 1106 | |
| 1107 } | |
| 1108 | |
| 1109 public TestJsonFieldOrdering Clone() { | |
| 1110 return new TestJsonFieldOrdering(this); | |
| 1111 } | |
| 1112 | |
| 1113 public const int PlainInt32FieldNumber = 4; | |
| 1114 private int plainInt32_; | |
| 1115 public int PlainInt32 { | |
| 1116 get { return plainInt32_; } | |
| 1117 set { | |
| 1118 plainInt32_ = value; | |
| 1119 } | |
| 1120 } | |
| 1121 | |
| 1122 public const int O1StringFieldNumber = 2; | |
| 1123 public string O1String { | |
| 1124 get { return o1Case_ == O1OneofCase.O1String ? (string) o1_ : ""; } | |
| 1125 set { | |
| 1126 o1_ = pb::Preconditions.CheckNotNull(value, "value"); | |
| 1127 o1Case_ = O1OneofCase.O1String; | |
| 1128 } | |
| 1129 } | |
| 1130 | |
| 1131 public const int O1Int32FieldNumber = 5; | |
| 1132 public int O1Int32 { | |
| 1133 get { return o1Case_ == O1OneofCase.O1Int32 ? (int) o1_ : 0; } | |
| 1134 set { | |
| 1135 o1_ = value; | |
| 1136 o1Case_ = O1OneofCase.O1Int32; | |
| 1137 } | |
| 1138 } | |
| 1139 | |
| 1140 public const int PlainStringFieldNumber = 1; | |
| 1141 private string plainString_ = ""; | |
| 1142 public string PlainString { | |
| 1143 get { return plainString_; } | |
| 1144 set { | |
| 1145 plainString_ = pb::Preconditions.CheckNotNull(value, "value"); | |
| 1146 } | |
| 1147 } | |
| 1148 | |
| 1149 public const int O2Int32FieldNumber = 6; | |
| 1150 public int O2Int32 { | |
| 1151 get { return o2Case_ == O2OneofCase.O2Int32 ? (int) o2_ : 0; } | |
| 1152 set { | |
| 1153 o2_ = value; | |
| 1154 o2Case_ = O2OneofCase.O2Int32; | |
| 1155 } | |
| 1156 } | |
| 1157 | |
| 1158 public const int O2StringFieldNumber = 3; | |
| 1159 public string O2String { | |
| 1160 get { return o2Case_ == O2OneofCase.O2String ? (string) o2_ : ""; } | |
| 1161 set { | |
| 1162 o2_ = pb::Preconditions.CheckNotNull(value, "value"); | |
| 1163 o2Case_ = O2OneofCase.O2String; | |
| 1164 } | |
| 1165 } | |
| 1166 | |
| 1167 private object o1_; | |
| 1168 public enum O1OneofCase { | |
| 1169 None = 0, | |
| 1170 O1String = 2, | |
| 1171 O1Int32 = 5, | |
| 1172 } | |
| 1173 private O1OneofCase o1Case_ = O1OneofCase.None; | |
| 1174 public O1OneofCase O1Case { | |
| 1175 get { return o1Case_; } | |
| 1176 } | |
| 1177 | |
| 1178 public void ClearO1() { | |
| 1179 o1Case_ = O1OneofCase.None; | |
| 1180 o1_ = null; | |
| 1181 } | |
| 1182 | |
| 1183 private object o2_; | |
| 1184 public enum O2OneofCase { | |
| 1185 None = 0, | |
| 1186 O2Int32 = 6, | |
| 1187 O2String = 3, | |
| 1188 } | |
| 1189 private O2OneofCase o2Case_ = O2OneofCase.None; | |
| 1190 public O2OneofCase O2Case { | |
| 1191 get { return o2Case_; } | |
| 1192 } | |
| 1193 | |
| 1194 public void ClearO2() { | |
| 1195 o2Case_ = O2OneofCase.None; | |
| 1196 o2_ = null; | |
| 1197 } | |
| 1198 | |
| 1199 public override bool Equals(object other) { | |
| 1200 return Equals(other as TestJsonFieldOrdering); | |
| 1201 } | |
| 1202 | |
| 1203 public bool Equals(TestJsonFieldOrdering other) { | |
| 1204 if (ReferenceEquals(other, null)) { | |
| 1205 return false; | |
| 1206 } | |
| 1207 if (ReferenceEquals(other, this)) { | |
| 1208 return true; | |
| 1209 } | |
| 1210 if (PlainInt32 != other.PlainInt32) return false; | |
| 1211 if (O1String != other.O1String) return false; | |
| 1212 if (O1Int32 != other.O1Int32) return false; | |
| 1213 if (PlainString != other.PlainString) return false; | |
| 1214 if (O2Int32 != other.O2Int32) return false; | |
| 1215 if (O2String != other.O2String) return false; | |
| 1216 return true; | |
| 1217 } | |
| 1218 | |
| 1219 public override int GetHashCode() { | |
| 1220 int hash = 1; | |
| 1221 if (PlainInt32 != 0) hash ^= PlainInt32.GetHashCode(); | |
| 1222 if (o1Case_ == O1OneofCase.O1String) hash ^= O1String.GetHashCode(); | |
| 1223 if (o1Case_ == O1OneofCase.O1Int32) hash ^= O1Int32.GetHashCode(); | |
| 1224 if (PlainString.Length != 0) hash ^= PlainString.GetHashCode(); | |
| 1225 if (o2Case_ == O2OneofCase.O2Int32) hash ^= O2Int32.GetHashCode(); | |
| 1226 if (o2Case_ == O2OneofCase.O2String) hash ^= O2String.GetHashCode(); | |
| 1227 return hash; | |
| 1228 } | |
| 1229 | |
| 1230 public override string ToString() { | |
| 1231 return pb::JsonFormatter.Default.Format(this); | |
| 1232 } | |
| 1233 | |
| 1234 public void WriteTo(pb::CodedOutputStream output) { | |
| 1235 if (PlainString.Length != 0) { | |
| 1236 output.WriteRawTag(10); | |
| 1237 output.WriteString(PlainString); | |
| 1238 } | |
| 1239 if (o1Case_ == O1OneofCase.O1String) { | |
| 1240 output.WriteRawTag(18); | |
| 1241 output.WriteString(O1String); | |
| 1242 } | |
| 1243 if (o2Case_ == O2OneofCase.O2String) { | |
| 1244 output.WriteRawTag(26); | |
| 1245 output.WriteString(O2String); | |
| 1246 } | |
| 1247 if (PlainInt32 != 0) { | |
| 1248 output.WriteRawTag(32); | |
| 1249 output.WriteInt32(PlainInt32); | |
| 1250 } | |
| 1251 if (o1Case_ == O1OneofCase.O1Int32) { | |
| 1252 output.WriteRawTag(40); | |
| 1253 output.WriteInt32(O1Int32); | |
| 1254 } | |
| 1255 if (o2Case_ == O2OneofCase.O2Int32) { | |
| 1256 output.WriteRawTag(48); | |
| 1257 output.WriteInt32(O2Int32); | |
| 1258 } | |
| 1259 } | |
| 1260 | |
| 1261 public int CalculateSize() { | |
| 1262 int size = 0; | |
| 1263 if (PlainInt32 != 0) { | |
| 1264 size += 1 + pb::CodedOutputStream.ComputeInt32Size(PlainInt32); | |
| 1265 } | |
| 1266 if (o1Case_ == O1OneofCase.O1String) { | |
| 1267 size += 1 + pb::CodedOutputStream.ComputeStringSize(O1String); | |
| 1268 } | |
| 1269 if (o1Case_ == O1OneofCase.O1Int32) { | |
| 1270 size += 1 + pb::CodedOutputStream.ComputeInt32Size(O1Int32); | |
| 1271 } | |
| 1272 if (PlainString.Length != 0) { | |
| 1273 size += 1 + pb::CodedOutputStream.ComputeStringSize(PlainString); | |
| 1274 } | |
| 1275 if (o2Case_ == O2OneofCase.O2Int32) { | |
| 1276 size += 1 + pb::CodedOutputStream.ComputeInt32Size(O2Int32); | |
| 1277 } | |
| 1278 if (o2Case_ == O2OneofCase.O2String) { | |
| 1279 size += 1 + pb::CodedOutputStream.ComputeStringSize(O2String); | |
| 1280 } | |
| 1281 return size; | |
| 1282 } | |
| 1283 | |
| 1284 public void MergeFrom(TestJsonFieldOrdering other) { | |
| 1285 if (other == null) { | |
| 1286 return; | |
| 1287 } | |
| 1288 if (other.PlainInt32 != 0) { | |
| 1289 PlainInt32 = other.PlainInt32; | |
| 1290 } | |
| 1291 if (other.PlainString.Length != 0) { | |
| 1292 PlainString = other.PlainString; | |
| 1293 } | |
| 1294 switch (other.O1Case) { | |
| 1295 case O1OneofCase.O1String: | |
| 1296 O1String = other.O1String; | |
| 1297 break; | |
| 1298 case O1OneofCase.O1Int32: | |
| 1299 O1Int32 = other.O1Int32; | |
| 1300 break; | |
| 1301 } | |
| 1302 | |
| 1303 switch (other.O2Case) { | |
| 1304 case O2OneofCase.O2Int32: | |
| 1305 O2Int32 = other.O2Int32; | |
| 1306 break; | |
| 1307 case O2OneofCase.O2String: | |
| 1308 O2String = other.O2String; | |
| 1309 break; | |
| 1310 } | |
| 1311 | |
| 1312 } | |
| 1313 | |
| 1314 public void MergeFrom(pb::CodedInputStream input) { | |
| 1315 uint tag; | |
| 1316 while ((tag = input.ReadTag()) != 0) { | |
| 1317 switch(tag) { | |
| 1318 default: | |
| 1319 input.SkipLastField(); | |
| 1320 break; | |
| 1321 case 10: { | |
| 1322 PlainString = input.ReadString(); | |
| 1323 break; | |
| 1324 } | |
| 1325 case 18: { | |
| 1326 O1String = input.ReadString(); | |
| 1327 break; | |
| 1328 } | |
| 1329 case 26: { | |
| 1330 O2String = input.ReadString(); | |
| 1331 break; | |
| 1332 } | |
| 1333 case 32: { | |
| 1334 PlainInt32 = input.ReadInt32(); | |
| 1335 break; | |
| 1336 } | |
| 1337 case 40: { | |
| 1338 O1Int32 = input.ReadInt32(); | |
| 1339 break; | |
| 1340 } | |
| 1341 case 48: { | |
| 1342 O2Int32 = input.ReadInt32(); | |
| 1343 break; | |
| 1344 } | |
| 1345 } | |
| 1346 } | |
| 1347 } | |
| 1348 | |
| 1349 } | |
| 1350 | |
| 1351 #endregion | |
| 1352 | |
| 1353 } | |
| 1354 | |
| 1355 #endregion Designer generated code | |
| OLD | NEW |