| OLD | NEW |
| 1 // Generated by the protocol buffer compiler. DO NOT EDIT! | 1 // Generated by the protocol buffer compiler. DO NOT EDIT! |
| 2 // source: unittest_issues.proto | 2 // source: unittest_issues.proto |
| 3 #pragma warning disable 1591, 0612, 3021 | 3 #pragma warning disable 1591, 0612, 3021 |
| 4 #region Designer generated code | 4 #region Designer generated code |
| 5 | 5 |
| 6 using pb = global::Google.Protobuf; | 6 using pb = global::Google.Protobuf; |
| 7 using pbc = global::Google.Protobuf.Collections; | 7 using pbc = global::Google.Protobuf.Collections; |
| 8 using pbr = global::Google.Protobuf.Reflection; | 8 using pbr = global::Google.Protobuf.Reflection; |
| 9 using scg = global::System.Collections.Generic; | 9 using scg = global::System.Collections.Generic; |
| 10 namespace UnitTest.Issues.TestProtos { | 10 namespace UnitTest.Issues.TestProtos { |
| 11 | 11 |
| 12 /// <summary>Holder for reflection information generated from unittest_issues.
proto</summary> | 12 /// <summary>Holder for reflection information generated from unittest_issues.
proto</summary> |
| 13 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 13 public static partial class UnittestIssuesReflection { | 14 public static partial class UnittestIssuesReflection { |
| 14 | 15 |
| 15 #region Descriptor | 16 #region Descriptor |
| 16 /// <summary>File descriptor for unittest_issues.proto</summary> | 17 /// <summary>File descriptor for unittest_issues.proto</summary> |
| 17 public static pbr::FileDescriptor Descriptor { | 18 public static pbr::FileDescriptor Descriptor { |
| 18 get { return descriptor; } | 19 get { return descriptor; } |
| 19 } | 20 } |
| 20 private static pbr::FileDescriptor descriptor; | 21 private static pbr::FileDescriptor descriptor; |
| 21 | 22 |
| 22 static UnittestIssuesReflection() { | 23 static UnittestIssuesReflection() { |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 | 73 |
| 73 public enum DeprecatedEnum { | 74 public enum DeprecatedEnum { |
| 74 [pbr::OriginalName("DEPRECATED_ZERO")] DeprecatedZero = 0, | 75 [pbr::OriginalName("DEPRECATED_ZERO")] DeprecatedZero = 0, |
| 75 [pbr::OriginalName("one")] One = 1, | 76 [pbr::OriginalName("one")] One = 1, |
| 76 } | 77 } |
| 77 | 78 |
| 78 #endregion | 79 #endregion |
| 79 | 80 |
| 80 #region Messages | 81 #region Messages |
| 81 /// <summary> | 82 /// <summary> |
| 82 /// Issue 307: when generating doubly-nested types, any references | 83 /// Issue 307: when generating doubly-nested types, any references |
| 83 /// should be of the form A.Types.B.Types.C. | 84 /// should be of the form A.Types.B.Types.C. |
| 84 /// </summary> | 85 /// </summary> |
| 86 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 85 public sealed partial class Issue307 : pb::IMessage<Issue307> { | 87 public sealed partial class Issue307 : pb::IMessage<Issue307> { |
| 86 private static readonly pb::MessageParser<Issue307> _parser = new pb::Messag
eParser<Issue307>(() => new Issue307()); | 88 private static readonly pb::MessageParser<Issue307> _parser = new pb::Messag
eParser<Issue307>(() => new Issue307()); |
| 87 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 88 public static pb::MessageParser<Issue307> Parser { get { return _parser; } } | 89 public static pb::MessageParser<Issue307> Parser { get { return _parser; } } |
| 89 | 90 |
| 90 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 91 public static pbr::MessageDescriptor Descriptor { | 91 public static pbr::MessageDescriptor Descriptor { |
| 92 get { return global::UnitTest.Issues.TestProtos.UnittestIssuesReflection.D
escriptor.MessageTypes[0]; } | 92 get { return global::UnitTest.Issues.TestProtos.UnittestIssuesReflection.D
escriptor.MessageTypes[0]; } |
| 93 } | 93 } |
| 94 | 94 |
| 95 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 96 pbr::MessageDescriptor pb::IMessage.Descriptor { | 95 pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 97 get { return Descriptor; } | 96 get { return Descriptor; } |
| 98 } | 97 } |
| 99 | 98 |
| 100 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 101 public Issue307() { | 99 public Issue307() { |
| 102 OnConstruction(); | 100 OnConstruction(); |
| 103 } | 101 } |
| 104 | 102 |
| 105 partial void OnConstruction(); | 103 partial void OnConstruction(); |
| 106 | 104 |
| 107 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 108 public Issue307(Issue307 other) : this() { | 105 public Issue307(Issue307 other) : this() { |
| 109 } | 106 } |
| 110 | 107 |
| 111 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 112 public Issue307 Clone() { | 108 public Issue307 Clone() { |
| 113 return new Issue307(this); | 109 return new Issue307(this); |
| 114 } | 110 } |
| 115 | 111 |
| 116 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 117 public override bool Equals(object other) { | 112 public override bool Equals(object other) { |
| 118 return Equals(other as Issue307); | 113 return Equals(other as Issue307); |
| 119 } | 114 } |
| 120 | 115 |
| 121 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 122 public bool Equals(Issue307 other) { | 116 public bool Equals(Issue307 other) { |
| 123 if (ReferenceEquals(other, null)) { | 117 if (ReferenceEquals(other, null)) { |
| 124 return false; | 118 return false; |
| 125 } | 119 } |
| 126 if (ReferenceEquals(other, this)) { | 120 if (ReferenceEquals(other, this)) { |
| 127 return true; | 121 return true; |
| 128 } | 122 } |
| 129 return true; | 123 return true; |
| 130 } | 124 } |
| 131 | 125 |
| 132 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 133 public override int GetHashCode() { | 126 public override int GetHashCode() { |
| 134 int hash = 1; | 127 int hash = 1; |
| 135 return hash; | 128 return hash; |
| 136 } | 129 } |
| 137 | 130 |
| 138 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 139 public override string ToString() { | 131 public override string ToString() { |
| 140 return pb::JsonFormatter.ToDiagnosticString(this); | 132 return pb::JsonFormatter.ToDiagnosticString(this); |
| 141 } | 133 } |
| 142 | 134 |
| 143 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 144 public void WriteTo(pb::CodedOutputStream output) { | 135 public void WriteTo(pb::CodedOutputStream output) { |
| 145 } | 136 } |
| 146 | 137 |
| 147 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 148 public int CalculateSize() { | 138 public int CalculateSize() { |
| 149 int size = 0; | 139 int size = 0; |
| 150 return size; | 140 return size; |
| 151 } | 141 } |
| 152 | 142 |
| 153 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 154 public void MergeFrom(Issue307 other) { | 143 public void MergeFrom(Issue307 other) { |
| 155 if (other == null) { | 144 if (other == null) { |
| 156 return; | 145 return; |
| 157 } | 146 } |
| 158 } | 147 } |
| 159 | 148 |
| 160 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 161 public void MergeFrom(pb::CodedInputStream input) { | 149 public void MergeFrom(pb::CodedInputStream input) { |
| 162 uint tag; | 150 uint tag; |
| 163 while ((tag = input.ReadTag()) != 0) { | 151 while ((tag = input.ReadTag()) != 0) { |
| 164 switch(tag) { | 152 switch(tag) { |
| 165 default: | 153 default: |
| 166 input.SkipLastField(); | 154 input.SkipLastField(); |
| 167 break; | 155 break; |
| 168 } | 156 } |
| 169 } | 157 } |
| 170 } | 158 } |
| 171 | 159 |
| 172 #region Nested types | 160 #region Nested types |
| 173 /// <summary>Container for nested types declared in the Issue307 message typ
e.</summary> | 161 /// <summary>Container for nested types declared in the Issue307 message typ
e.</summary> |
| 174 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | 162 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 175 public static partial class Types { | 163 public static partial class Types { |
| 164 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 176 public sealed partial class NestedOnce : pb::IMessage<NestedOnce> { | 165 public sealed partial class NestedOnce : pb::IMessage<NestedOnce> { |
| 177 private static readonly pb::MessageParser<NestedOnce> _parser = new pb::
MessageParser<NestedOnce>(() => new NestedOnce()); | 166 private static readonly pb::MessageParser<NestedOnce> _parser = new pb::
MessageParser<NestedOnce>(() => new NestedOnce()); |
| 178 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 179 public static pb::MessageParser<NestedOnce> Parser { get { return _parse
r; } } | 167 public static pb::MessageParser<NestedOnce> Parser { get { return _parse
r; } } |
| 180 | 168 |
| 181 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 182 public static pbr::MessageDescriptor Descriptor { | 169 public static pbr::MessageDescriptor Descriptor { |
| 183 get { return global::UnitTest.Issues.TestProtos.Issue307.Descriptor.Ne
stedTypes[0]; } | 170 get { return global::UnitTest.Issues.TestProtos.Issue307.Descriptor.Ne
stedTypes[0]; } |
| 184 } | 171 } |
| 185 | 172 |
| 186 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 187 pbr::MessageDescriptor pb::IMessage.Descriptor { | 173 pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 188 get { return Descriptor; } | 174 get { return Descriptor; } |
| 189 } | 175 } |
| 190 | 176 |
| 191 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 192 public NestedOnce() { | 177 public NestedOnce() { |
| 193 OnConstruction(); | 178 OnConstruction(); |
| 194 } | 179 } |
| 195 | 180 |
| 196 partial void OnConstruction(); | 181 partial void OnConstruction(); |
| 197 | 182 |
| 198 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 199 public NestedOnce(NestedOnce other) : this() { | 183 public NestedOnce(NestedOnce other) : this() { |
| 200 } | 184 } |
| 201 | 185 |
| 202 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 203 public NestedOnce Clone() { | 186 public NestedOnce Clone() { |
| 204 return new NestedOnce(this); | 187 return new NestedOnce(this); |
| 205 } | 188 } |
| 206 | 189 |
| 207 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 208 public override bool Equals(object other) { | 190 public override bool Equals(object other) { |
| 209 return Equals(other as NestedOnce); | 191 return Equals(other as NestedOnce); |
| 210 } | 192 } |
| 211 | 193 |
| 212 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 213 public bool Equals(NestedOnce other) { | 194 public bool Equals(NestedOnce other) { |
| 214 if (ReferenceEquals(other, null)) { | 195 if (ReferenceEquals(other, null)) { |
| 215 return false; | 196 return false; |
| 216 } | 197 } |
| 217 if (ReferenceEquals(other, this)) { | 198 if (ReferenceEquals(other, this)) { |
| 218 return true; | 199 return true; |
| 219 } | 200 } |
| 220 return true; | 201 return true; |
| 221 } | 202 } |
| 222 | 203 |
| 223 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 224 public override int GetHashCode() { | 204 public override int GetHashCode() { |
| 225 int hash = 1; | 205 int hash = 1; |
| 226 return hash; | 206 return hash; |
| 227 } | 207 } |
| 228 | 208 |
| 229 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 230 public override string ToString() { | 209 public override string ToString() { |
| 231 return pb::JsonFormatter.ToDiagnosticString(this); | 210 return pb::JsonFormatter.ToDiagnosticString(this); |
| 232 } | 211 } |
| 233 | 212 |
| 234 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 235 public void WriteTo(pb::CodedOutputStream output) { | 213 public void WriteTo(pb::CodedOutputStream output) { |
| 236 } | 214 } |
| 237 | 215 |
| 238 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 239 public int CalculateSize() { | 216 public int CalculateSize() { |
| 240 int size = 0; | 217 int size = 0; |
| 241 return size; | 218 return size; |
| 242 } | 219 } |
| 243 | 220 |
| 244 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 245 public void MergeFrom(NestedOnce other) { | 221 public void MergeFrom(NestedOnce other) { |
| 246 if (other == null) { | 222 if (other == null) { |
| 247 return; | 223 return; |
| 248 } | 224 } |
| 249 } | 225 } |
| 250 | 226 |
| 251 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 252 public void MergeFrom(pb::CodedInputStream input) { | 227 public void MergeFrom(pb::CodedInputStream input) { |
| 253 uint tag; | 228 uint tag; |
| 254 while ((tag = input.ReadTag()) != 0) { | 229 while ((tag = input.ReadTag()) != 0) { |
| 255 switch(tag) { | 230 switch(tag) { |
| 256 default: | 231 default: |
| 257 input.SkipLastField(); | 232 input.SkipLastField(); |
| 258 break; | 233 break; |
| 259 } | 234 } |
| 260 } | 235 } |
| 261 } | 236 } |
| 262 | 237 |
| 263 #region Nested types | 238 #region Nested types |
| 264 /// <summary>Container for nested types declared in the NestedOnce messa
ge type.</summary> | 239 /// <summary>Container for nested types declared in the NestedOnce messa
ge type.</summary> |
| 265 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | 240 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 266 public static partial class Types { | 241 public static partial class Types { |
| 242 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 267 public sealed partial class NestedTwice : pb::IMessage<NestedTwice> { | 243 public sealed partial class NestedTwice : pb::IMessage<NestedTwice> { |
| 268 private static readonly pb::MessageParser<NestedTwice> _parser = new
pb::MessageParser<NestedTwice>(() => new NestedTwice()); | 244 private static readonly pb::MessageParser<NestedTwice> _parser = new
pb::MessageParser<NestedTwice>(() => new NestedTwice()); |
| 269 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 270 public static pb::MessageParser<NestedTwice> Parser { get { return _
parser; } } | 245 public static pb::MessageParser<NestedTwice> Parser { get { return _
parser; } } |
| 271 | 246 |
| 272 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 273 public static pbr::MessageDescriptor Descriptor { | 247 public static pbr::MessageDescriptor Descriptor { |
| 274 get { return global::UnitTest.Issues.TestProtos.Issue307.Types.Nes
tedOnce.Descriptor.NestedTypes[0]; } | 248 get { return global::UnitTest.Issues.TestProtos.Issue307.Types.Nes
tedOnce.Descriptor.NestedTypes[0]; } |
| 275 } | 249 } |
| 276 | 250 |
| 277 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 278 pbr::MessageDescriptor pb::IMessage.Descriptor { | 251 pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 279 get { return Descriptor; } | 252 get { return Descriptor; } |
| 280 } | 253 } |
| 281 | 254 |
| 282 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 283 public NestedTwice() { | 255 public NestedTwice() { |
| 284 OnConstruction(); | 256 OnConstruction(); |
| 285 } | 257 } |
| 286 | 258 |
| 287 partial void OnConstruction(); | 259 partial void OnConstruction(); |
| 288 | 260 |
| 289 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 290 public NestedTwice(NestedTwice other) : this() { | 261 public NestedTwice(NestedTwice other) : this() { |
| 291 } | 262 } |
| 292 | 263 |
| 293 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 294 public NestedTwice Clone() { | 264 public NestedTwice Clone() { |
| 295 return new NestedTwice(this); | 265 return new NestedTwice(this); |
| 296 } | 266 } |
| 297 | 267 |
| 298 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 299 public override bool Equals(object other) { | 268 public override bool Equals(object other) { |
| 300 return Equals(other as NestedTwice); | 269 return Equals(other as NestedTwice); |
| 301 } | 270 } |
| 302 | 271 |
| 303 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 304 public bool Equals(NestedTwice other) { | 272 public bool Equals(NestedTwice other) { |
| 305 if (ReferenceEquals(other, null)) { | 273 if (ReferenceEquals(other, null)) { |
| 306 return false; | 274 return false; |
| 307 } | 275 } |
| 308 if (ReferenceEquals(other, this)) { | 276 if (ReferenceEquals(other, this)) { |
| 309 return true; | 277 return true; |
| 310 } | 278 } |
| 311 return true; | 279 return true; |
| 312 } | 280 } |
| 313 | 281 |
| 314 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 315 public override int GetHashCode() { | 282 public override int GetHashCode() { |
| 316 int hash = 1; | 283 int hash = 1; |
| 317 return hash; | 284 return hash; |
| 318 } | 285 } |
| 319 | 286 |
| 320 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 321 public override string ToString() { | 287 public override string ToString() { |
| 322 return pb::JsonFormatter.ToDiagnosticString(this); | 288 return pb::JsonFormatter.ToDiagnosticString(this); |
| 323 } | 289 } |
| 324 | 290 |
| 325 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 326 public void WriteTo(pb::CodedOutputStream output) { | 291 public void WriteTo(pb::CodedOutputStream output) { |
| 327 } | 292 } |
| 328 | 293 |
| 329 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 330 public int CalculateSize() { | 294 public int CalculateSize() { |
| 331 int size = 0; | 295 int size = 0; |
| 332 return size; | 296 return size; |
| 333 } | 297 } |
| 334 | 298 |
| 335 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 336 public void MergeFrom(NestedTwice other) { | 299 public void MergeFrom(NestedTwice other) { |
| 337 if (other == null) { | 300 if (other == null) { |
| 338 return; | 301 return; |
| 339 } | 302 } |
| 340 } | 303 } |
| 341 | 304 |
| 342 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 343 public void MergeFrom(pb::CodedInputStream input) { | 305 public void MergeFrom(pb::CodedInputStream input) { |
| 344 uint tag; | 306 uint tag; |
| 345 while ((tag = input.ReadTag()) != 0) { | 307 while ((tag = input.ReadTag()) != 0) { |
| 346 switch(tag) { | 308 switch(tag) { |
| 347 default: | 309 default: |
| 348 input.SkipLastField(); | 310 input.SkipLastField(); |
| 349 break; | 311 break; |
| 350 } | 312 } |
| 351 } | 313 } |
| 352 } | 314 } |
| 353 | 315 |
| 354 } | 316 } |
| 355 | 317 |
| 356 } | 318 } |
| 357 #endregion | 319 #endregion |
| 358 | 320 |
| 359 } | 321 } |
| 360 | 322 |
| 361 } | 323 } |
| 362 #endregion | 324 #endregion |
| 363 | 325 |
| 364 } | 326 } |
| 365 | 327 |
| 328 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 366 public sealed partial class NegativeEnumMessage : pb::IMessage<NegativeEnumMes
sage> { | 329 public sealed partial class NegativeEnumMessage : pb::IMessage<NegativeEnumMes
sage> { |
| 367 private static readonly pb::MessageParser<NegativeEnumMessage> _parser = new
pb::MessageParser<NegativeEnumMessage>(() => new NegativeEnumMessage()); | 330 private static readonly pb::MessageParser<NegativeEnumMessage> _parser = new
pb::MessageParser<NegativeEnumMessage>(() => new NegativeEnumMessage()); |
| 368 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 369 public static pb::MessageParser<NegativeEnumMessage> Parser { get { return _
parser; } } | 331 public static pb::MessageParser<NegativeEnumMessage> Parser { get { return _
parser; } } |
| 370 | 332 |
| 371 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 372 public static pbr::MessageDescriptor Descriptor { | 333 public static pbr::MessageDescriptor Descriptor { |
| 373 get { return global::UnitTest.Issues.TestProtos.UnittestIssuesReflection.D
escriptor.MessageTypes[1]; } | 334 get { return global::UnitTest.Issues.TestProtos.UnittestIssuesReflection.D
escriptor.MessageTypes[1]; } |
| 374 } | 335 } |
| 375 | 336 |
| 376 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 377 pbr::MessageDescriptor pb::IMessage.Descriptor { | 337 pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 378 get { return Descriptor; } | 338 get { return Descriptor; } |
| 379 } | 339 } |
| 380 | 340 |
| 381 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 382 public NegativeEnumMessage() { | 341 public NegativeEnumMessage() { |
| 383 OnConstruction(); | 342 OnConstruction(); |
| 384 } | 343 } |
| 385 | 344 |
| 386 partial void OnConstruction(); | 345 partial void OnConstruction(); |
| 387 | 346 |
| 388 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 389 public NegativeEnumMessage(NegativeEnumMessage other) : this() { | 347 public NegativeEnumMessage(NegativeEnumMessage other) : this() { |
| 390 value_ = other.value_; | 348 value_ = other.value_; |
| 391 values_ = other.values_.Clone(); | 349 values_ = other.values_.Clone(); |
| 392 packedValues_ = other.packedValues_.Clone(); | 350 packedValues_ = other.packedValues_.Clone(); |
| 393 } | 351 } |
| 394 | 352 |
| 395 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 396 public NegativeEnumMessage Clone() { | 353 public NegativeEnumMessage Clone() { |
| 397 return new NegativeEnumMessage(this); | 354 return new NegativeEnumMessage(this); |
| 398 } | 355 } |
| 399 | 356 |
| 400 /// <summary>Field number for the "value" field.</summary> | 357 /// <summary>Field number for the "value" field.</summary> |
| 401 public const int ValueFieldNumber = 1; | 358 public const int ValueFieldNumber = 1; |
| 402 private global::UnitTest.Issues.TestProtos.NegativeEnum value_ = 0; | 359 private global::UnitTest.Issues.TestProtos.NegativeEnum value_ = 0; |
| 403 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 404 public global::UnitTest.Issues.TestProtos.NegativeEnum Value { | 360 public global::UnitTest.Issues.TestProtos.NegativeEnum Value { |
| 405 get { return value_; } | 361 get { return value_; } |
| 406 set { | 362 set { |
| 407 value_ = value; | 363 value_ = value; |
| 408 } | 364 } |
| 409 } | 365 } |
| 410 | 366 |
| 411 /// <summary>Field number for the "values" field.</summary> | 367 /// <summary>Field number for the "values" field.</summary> |
| 412 public const int ValuesFieldNumber = 2; | 368 public const int ValuesFieldNumber = 2; |
| 413 private static readonly pb::FieldCodec<global::UnitTest.Issues.TestProtos.Ne
gativeEnum> _repeated_values_codec | 369 private static readonly pb::FieldCodec<global::UnitTest.Issues.TestProtos.Ne
gativeEnum> _repeated_values_codec |
| 414 = pb::FieldCodec.ForEnum(16, x => (int) x, x => (global::UnitTest.Issues
.TestProtos.NegativeEnum) x); | 370 = pb::FieldCodec.ForEnum(16, x => (int) x, x => (global::UnitTest.Issues
.TestProtos.NegativeEnum) x); |
| 415 private readonly pbc::RepeatedField<global::UnitTest.Issues.TestProtos.Negat
iveEnum> values_ = new pbc::RepeatedField<global::UnitTest.Issues.TestProtos.Neg
ativeEnum>(); | 371 private readonly pbc::RepeatedField<global::UnitTest.Issues.TestProtos.Negat
iveEnum> values_ = new pbc::RepeatedField<global::UnitTest.Issues.TestProtos.Neg
ativeEnum>(); |
| 416 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 417 public pbc::RepeatedField<global::UnitTest.Issues.TestProtos.NegativeEnum> V
alues { | 372 public pbc::RepeatedField<global::UnitTest.Issues.TestProtos.NegativeEnum> V
alues { |
| 418 get { return values_; } | 373 get { return values_; } |
| 419 } | 374 } |
| 420 | 375 |
| 421 /// <summary>Field number for the "packed_values" field.</summary> | 376 /// <summary>Field number for the "packed_values" field.</summary> |
| 422 public const int PackedValuesFieldNumber = 3; | 377 public const int PackedValuesFieldNumber = 3; |
| 423 private static readonly pb::FieldCodec<global::UnitTest.Issues.TestProtos.Ne
gativeEnum> _repeated_packedValues_codec | 378 private static readonly pb::FieldCodec<global::UnitTest.Issues.TestProtos.Ne
gativeEnum> _repeated_packedValues_codec |
| 424 = pb::FieldCodec.ForEnum(26, x => (int) x, x => (global::UnitTest.Issues
.TestProtos.NegativeEnum) x); | 379 = pb::FieldCodec.ForEnum(26, x => (int) x, x => (global::UnitTest.Issues
.TestProtos.NegativeEnum) x); |
| 425 private readonly pbc::RepeatedField<global::UnitTest.Issues.TestProtos.Negat
iveEnum> packedValues_ = new pbc::RepeatedField<global::UnitTest.Issues.TestProt
os.NegativeEnum>(); | 380 private readonly pbc::RepeatedField<global::UnitTest.Issues.TestProtos.Negat
iveEnum> packedValues_ = new pbc::RepeatedField<global::UnitTest.Issues.TestProt
os.NegativeEnum>(); |
| 426 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 427 public pbc::RepeatedField<global::UnitTest.Issues.TestProtos.NegativeEnum> P
ackedValues { | 381 public pbc::RepeatedField<global::UnitTest.Issues.TestProtos.NegativeEnum> P
ackedValues { |
| 428 get { return packedValues_; } | 382 get { return packedValues_; } |
| 429 } | 383 } |
| 430 | 384 |
| 431 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 432 public override bool Equals(object other) { | 385 public override bool Equals(object other) { |
| 433 return Equals(other as NegativeEnumMessage); | 386 return Equals(other as NegativeEnumMessage); |
| 434 } | 387 } |
| 435 | 388 |
| 436 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 437 public bool Equals(NegativeEnumMessage other) { | 389 public bool Equals(NegativeEnumMessage other) { |
| 438 if (ReferenceEquals(other, null)) { | 390 if (ReferenceEquals(other, null)) { |
| 439 return false; | 391 return false; |
| 440 } | 392 } |
| 441 if (ReferenceEquals(other, this)) { | 393 if (ReferenceEquals(other, this)) { |
| 442 return true; | 394 return true; |
| 443 } | 395 } |
| 444 if (Value != other.Value) return false; | 396 if (Value != other.Value) return false; |
| 445 if(!values_.Equals(other.values_)) return false; | 397 if(!values_.Equals(other.values_)) return false; |
| 446 if(!packedValues_.Equals(other.packedValues_)) return false; | 398 if(!packedValues_.Equals(other.packedValues_)) return false; |
| 447 return true; | 399 return true; |
| 448 } | 400 } |
| 449 | 401 |
| 450 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 451 public override int GetHashCode() { | 402 public override int GetHashCode() { |
| 452 int hash = 1; | 403 int hash = 1; |
| 453 if (Value != 0) hash ^= Value.GetHashCode(); | 404 if (Value != 0) hash ^= Value.GetHashCode(); |
| 454 hash ^= values_.GetHashCode(); | 405 hash ^= values_.GetHashCode(); |
| 455 hash ^= packedValues_.GetHashCode(); | 406 hash ^= packedValues_.GetHashCode(); |
| 456 return hash; | 407 return hash; |
| 457 } | 408 } |
| 458 | 409 |
| 459 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 460 public override string ToString() { | 410 public override string ToString() { |
| 461 return pb::JsonFormatter.ToDiagnosticString(this); | 411 return pb::JsonFormatter.ToDiagnosticString(this); |
| 462 } | 412 } |
| 463 | 413 |
| 464 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 465 public void WriteTo(pb::CodedOutputStream output) { | 414 public void WriteTo(pb::CodedOutputStream output) { |
| 466 if (Value != 0) { | 415 if (Value != 0) { |
| 467 output.WriteRawTag(8); | 416 output.WriteRawTag(8); |
| 468 output.WriteEnum((int) Value); | 417 output.WriteEnum((int) Value); |
| 469 } | 418 } |
| 470 values_.WriteTo(output, _repeated_values_codec); | 419 values_.WriteTo(output, _repeated_values_codec); |
| 471 packedValues_.WriteTo(output, _repeated_packedValues_codec); | 420 packedValues_.WriteTo(output, _repeated_packedValues_codec); |
| 472 } | 421 } |
| 473 | 422 |
| 474 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 475 public int CalculateSize() { | 423 public int CalculateSize() { |
| 476 int size = 0; | 424 int size = 0; |
| 477 if (Value != 0) { | 425 if (Value != 0) { |
| 478 size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Value); | 426 size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Value); |
| 479 } | 427 } |
| 480 size += values_.CalculateSize(_repeated_values_codec); | 428 size += values_.CalculateSize(_repeated_values_codec); |
| 481 size += packedValues_.CalculateSize(_repeated_packedValues_codec); | 429 size += packedValues_.CalculateSize(_repeated_packedValues_codec); |
| 482 return size; | 430 return size; |
| 483 } | 431 } |
| 484 | 432 |
| 485 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 486 public void MergeFrom(NegativeEnumMessage other) { | 433 public void MergeFrom(NegativeEnumMessage other) { |
| 487 if (other == null) { | 434 if (other == null) { |
| 488 return; | 435 return; |
| 489 } | 436 } |
| 490 if (other.Value != 0) { | 437 if (other.Value != 0) { |
| 491 Value = other.Value; | 438 Value = other.Value; |
| 492 } | 439 } |
| 493 values_.Add(other.values_); | 440 values_.Add(other.values_); |
| 494 packedValues_.Add(other.packedValues_); | 441 packedValues_.Add(other.packedValues_); |
| 495 } | 442 } |
| 496 | 443 |
| 497 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 498 public void MergeFrom(pb::CodedInputStream input) { | 444 public void MergeFrom(pb::CodedInputStream input) { |
| 499 uint tag; | 445 uint tag; |
| 500 while ((tag = input.ReadTag()) != 0) { | 446 while ((tag = input.ReadTag()) != 0) { |
| 501 switch(tag) { | 447 switch(tag) { |
| 502 default: | 448 default: |
| 503 input.SkipLastField(); | 449 input.SkipLastField(); |
| 504 break; | 450 break; |
| 505 case 8: { | 451 case 8: { |
| 506 value_ = (global::UnitTest.Issues.TestProtos.NegativeEnum) input.Rea
dEnum(); | 452 value_ = (global::UnitTest.Issues.TestProtos.NegativeEnum) input.Rea
dEnum(); |
| 507 break; | 453 break; |
| 508 } | 454 } |
| 509 case 18: | 455 case 18: |
| 510 case 16: { | 456 case 16: { |
| 511 values_.AddEntriesFrom(input, _repeated_values_codec); | 457 values_.AddEntriesFrom(input, _repeated_values_codec); |
| 512 break; | 458 break; |
| 513 } | 459 } |
| 514 case 26: | 460 case 26: |
| 515 case 24: { | 461 case 24: { |
| 516 packedValues_.AddEntriesFrom(input, _repeated_packedValues_codec); | 462 packedValues_.AddEntriesFrom(input, _repeated_packedValues_codec); |
| 517 break; | 463 break; |
| 518 } | 464 } |
| 519 } | 465 } |
| 520 } | 466 } |
| 521 } | 467 } |
| 522 | 468 |
| 523 } | 469 } |
| 524 | 470 |
| 471 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 525 public sealed partial class DeprecatedChild : pb::IMessage<DeprecatedChild> { | 472 public sealed partial class DeprecatedChild : pb::IMessage<DeprecatedChild> { |
| 526 private static readonly pb::MessageParser<DeprecatedChild> _parser = new pb:
:MessageParser<DeprecatedChild>(() => new DeprecatedChild()); | 473 private static readonly pb::MessageParser<DeprecatedChild> _parser = new pb:
:MessageParser<DeprecatedChild>(() => new DeprecatedChild()); |
| 527 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 528 public static pb::MessageParser<DeprecatedChild> Parser { get { return _pars
er; } } | 474 public static pb::MessageParser<DeprecatedChild> Parser { get { return _pars
er; } } |
| 529 | 475 |
| 530 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 531 public static pbr::MessageDescriptor Descriptor { | 476 public static pbr::MessageDescriptor Descriptor { |
| 532 get { return global::UnitTest.Issues.TestProtos.UnittestIssuesReflection.D
escriptor.MessageTypes[2]; } | 477 get { return global::UnitTest.Issues.TestProtos.UnittestIssuesReflection.D
escriptor.MessageTypes[2]; } |
| 533 } | 478 } |
| 534 | 479 |
| 535 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 536 pbr::MessageDescriptor pb::IMessage.Descriptor { | 480 pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 537 get { return Descriptor; } | 481 get { return Descriptor; } |
| 538 } | 482 } |
| 539 | 483 |
| 540 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 541 public DeprecatedChild() { | 484 public DeprecatedChild() { |
| 542 OnConstruction(); | 485 OnConstruction(); |
| 543 } | 486 } |
| 544 | 487 |
| 545 partial void OnConstruction(); | 488 partial void OnConstruction(); |
| 546 | 489 |
| 547 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 548 public DeprecatedChild(DeprecatedChild other) : this() { | 490 public DeprecatedChild(DeprecatedChild other) : this() { |
| 549 } | 491 } |
| 550 | 492 |
| 551 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 552 public DeprecatedChild Clone() { | 493 public DeprecatedChild Clone() { |
| 553 return new DeprecatedChild(this); | 494 return new DeprecatedChild(this); |
| 554 } | 495 } |
| 555 | 496 |
| 556 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 557 public override bool Equals(object other) { | 497 public override bool Equals(object other) { |
| 558 return Equals(other as DeprecatedChild); | 498 return Equals(other as DeprecatedChild); |
| 559 } | 499 } |
| 560 | 500 |
| 561 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 562 public bool Equals(DeprecatedChild other) { | 501 public bool Equals(DeprecatedChild other) { |
| 563 if (ReferenceEquals(other, null)) { | 502 if (ReferenceEquals(other, null)) { |
| 564 return false; | 503 return false; |
| 565 } | 504 } |
| 566 if (ReferenceEquals(other, this)) { | 505 if (ReferenceEquals(other, this)) { |
| 567 return true; | 506 return true; |
| 568 } | 507 } |
| 569 return true; | 508 return true; |
| 570 } | 509 } |
| 571 | 510 |
| 572 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 573 public override int GetHashCode() { | 511 public override int GetHashCode() { |
| 574 int hash = 1; | 512 int hash = 1; |
| 575 return hash; | 513 return hash; |
| 576 } | 514 } |
| 577 | 515 |
| 578 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 579 public override string ToString() { | 516 public override string ToString() { |
| 580 return pb::JsonFormatter.ToDiagnosticString(this); | 517 return pb::JsonFormatter.ToDiagnosticString(this); |
| 581 } | 518 } |
| 582 | 519 |
| 583 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 584 public void WriteTo(pb::CodedOutputStream output) { | 520 public void WriteTo(pb::CodedOutputStream output) { |
| 585 } | 521 } |
| 586 | 522 |
| 587 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 588 public int CalculateSize() { | 523 public int CalculateSize() { |
| 589 int size = 0; | 524 int size = 0; |
| 590 return size; | 525 return size; |
| 591 } | 526 } |
| 592 | 527 |
| 593 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 594 public void MergeFrom(DeprecatedChild other) { | 528 public void MergeFrom(DeprecatedChild other) { |
| 595 if (other == null) { | 529 if (other == null) { |
| 596 return; | 530 return; |
| 597 } | 531 } |
| 598 } | 532 } |
| 599 | 533 |
| 600 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 601 public void MergeFrom(pb::CodedInputStream input) { | 534 public void MergeFrom(pb::CodedInputStream input) { |
| 602 uint tag; | 535 uint tag; |
| 603 while ((tag = input.ReadTag()) != 0) { | 536 while ((tag = input.ReadTag()) != 0) { |
| 604 switch(tag) { | 537 switch(tag) { |
| 605 default: | 538 default: |
| 606 input.SkipLastField(); | 539 input.SkipLastField(); |
| 607 break; | 540 break; |
| 608 } | 541 } |
| 609 } | 542 } |
| 610 } | 543 } |
| 611 | 544 |
| 612 } | 545 } |
| 613 | 546 |
| 547 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 614 public sealed partial class DeprecatedFieldsMessage : pb::IMessage<DeprecatedF
ieldsMessage> { | 548 public sealed partial class DeprecatedFieldsMessage : pb::IMessage<DeprecatedF
ieldsMessage> { |
| 615 private static readonly pb::MessageParser<DeprecatedFieldsMessage> _parser =
new pb::MessageParser<DeprecatedFieldsMessage>(() => new DeprecatedFieldsMessag
e()); | 549 private static readonly pb::MessageParser<DeprecatedFieldsMessage> _parser =
new pb::MessageParser<DeprecatedFieldsMessage>(() => new DeprecatedFieldsMessag
e()); |
| 616 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 617 public static pb::MessageParser<DeprecatedFieldsMessage> Parser { get { retu
rn _parser; } } | 550 public static pb::MessageParser<DeprecatedFieldsMessage> Parser { get { retu
rn _parser; } } |
| 618 | 551 |
| 619 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 620 public static pbr::MessageDescriptor Descriptor { | 552 public static pbr::MessageDescriptor Descriptor { |
| 621 get { return global::UnitTest.Issues.TestProtos.UnittestIssuesReflection.D
escriptor.MessageTypes[3]; } | 553 get { return global::UnitTest.Issues.TestProtos.UnittestIssuesReflection.D
escriptor.MessageTypes[3]; } |
| 622 } | 554 } |
| 623 | 555 |
| 624 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 625 pbr::MessageDescriptor pb::IMessage.Descriptor { | 556 pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 626 get { return Descriptor; } | 557 get { return Descriptor; } |
| 627 } | 558 } |
| 628 | 559 |
| 629 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 630 public DeprecatedFieldsMessage() { | 560 public DeprecatedFieldsMessage() { |
| 631 OnConstruction(); | 561 OnConstruction(); |
| 632 } | 562 } |
| 633 | 563 |
| 634 partial void OnConstruction(); | 564 partial void OnConstruction(); |
| 635 | 565 |
| 636 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 637 public DeprecatedFieldsMessage(DeprecatedFieldsMessage other) : this() { | 566 public DeprecatedFieldsMessage(DeprecatedFieldsMessage other) : this() { |
| 638 primitiveValue_ = other.primitiveValue_; | 567 primitiveValue_ = other.primitiveValue_; |
| 639 primitiveArray_ = other.primitiveArray_.Clone(); | 568 primitiveArray_ = other.primitiveArray_.Clone(); |
| 640 MessageValue = other.messageValue_ != null ? other.MessageValue.Clone() :
null; | 569 MessageValue = other.messageValue_ != null ? other.MessageValue.Clone() :
null; |
| 641 messageArray_ = other.messageArray_.Clone(); | 570 messageArray_ = other.messageArray_.Clone(); |
| 642 enumValue_ = other.enumValue_; | 571 enumValue_ = other.enumValue_; |
| 643 enumArray_ = other.enumArray_.Clone(); | 572 enumArray_ = other.enumArray_.Clone(); |
| 644 } | 573 } |
| 645 | 574 |
| 646 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 647 public DeprecatedFieldsMessage Clone() { | 575 public DeprecatedFieldsMessage Clone() { |
| 648 return new DeprecatedFieldsMessage(this); | 576 return new DeprecatedFieldsMessage(this); |
| 649 } | 577 } |
| 650 | 578 |
| 651 /// <summary>Field number for the "PrimitiveValue" field.</summary> | 579 /// <summary>Field number for the "PrimitiveValue" field.</summary> |
| 652 public const int PrimitiveValueFieldNumber = 1; | 580 public const int PrimitiveValueFieldNumber = 1; |
| 653 private int primitiveValue_; | 581 private int primitiveValue_; |
| 654 [global::System.ObsoleteAttribute] | 582 [global::System.ObsoleteAttribute()] |
| 655 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 656 public int PrimitiveValue { | 583 public int PrimitiveValue { |
| 657 get { return primitiveValue_; } | 584 get { return primitiveValue_; } |
| 658 set { | 585 set { |
| 659 primitiveValue_ = value; | 586 primitiveValue_ = value; |
| 660 } | 587 } |
| 661 } | 588 } |
| 662 | 589 |
| 663 /// <summary>Field number for the "PrimitiveArray" field.</summary> | 590 /// <summary>Field number for the "PrimitiveArray" field.</summary> |
| 664 public const int PrimitiveArrayFieldNumber = 2; | 591 public const int PrimitiveArrayFieldNumber = 2; |
| 665 private static readonly pb::FieldCodec<int> _repeated_primitiveArray_codec | 592 private static readonly pb::FieldCodec<int> _repeated_primitiveArray_codec |
| 666 = pb::FieldCodec.ForInt32(18); | 593 = pb::FieldCodec.ForInt32(18); |
| 667 private readonly pbc::RepeatedField<int> primitiveArray_ = new pbc::Repeated
Field<int>(); | 594 private readonly pbc::RepeatedField<int> primitiveArray_ = new pbc::Repeated
Field<int>(); |
| 668 [global::System.ObsoleteAttribute] | 595 [global::System.ObsoleteAttribute()] |
| 669 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 670 public pbc::RepeatedField<int> PrimitiveArray { | 596 public pbc::RepeatedField<int> PrimitiveArray { |
| 671 get { return primitiveArray_; } | 597 get { return primitiveArray_; } |
| 672 } | 598 } |
| 673 | 599 |
| 674 /// <summary>Field number for the "MessageValue" field.</summary> | 600 /// <summary>Field number for the "MessageValue" field.</summary> |
| 675 public const int MessageValueFieldNumber = 3; | 601 public const int MessageValueFieldNumber = 3; |
| 676 private global::UnitTest.Issues.TestProtos.DeprecatedChild messageValue_; | 602 private global::UnitTest.Issues.TestProtos.DeprecatedChild messageValue_; |
| 677 [global::System.ObsoleteAttribute] | 603 [global::System.ObsoleteAttribute()] |
| 678 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 679 public global::UnitTest.Issues.TestProtos.DeprecatedChild MessageValue { | 604 public global::UnitTest.Issues.TestProtos.DeprecatedChild MessageValue { |
| 680 get { return messageValue_; } | 605 get { return messageValue_; } |
| 681 set { | 606 set { |
| 682 messageValue_ = value; | 607 messageValue_ = value; |
| 683 } | 608 } |
| 684 } | 609 } |
| 685 | 610 |
| 686 /// <summary>Field number for the "MessageArray" field.</summary> | 611 /// <summary>Field number for the "MessageArray" field.</summary> |
| 687 public const int MessageArrayFieldNumber = 4; | 612 public const int MessageArrayFieldNumber = 4; |
| 688 private static readonly pb::FieldCodec<global::UnitTest.Issues.TestProtos.De
precatedChild> _repeated_messageArray_codec | 613 private static readonly pb::FieldCodec<global::UnitTest.Issues.TestProtos.De
precatedChild> _repeated_messageArray_codec |
| 689 = pb::FieldCodec.ForMessage(34, global::UnitTest.Issues.TestProtos.Depre
catedChild.Parser); | 614 = pb::FieldCodec.ForMessage(34, global::UnitTest.Issues.TestProtos.Depre
catedChild.Parser); |
| 690 private readonly pbc::RepeatedField<global::UnitTest.Issues.TestProtos.Depre
catedChild> messageArray_ = new pbc::RepeatedField<global::UnitTest.Issues.TestP
rotos.DeprecatedChild>(); | 615 private readonly pbc::RepeatedField<global::UnitTest.Issues.TestProtos.Depre
catedChild> messageArray_ = new pbc::RepeatedField<global::UnitTest.Issues.TestP
rotos.DeprecatedChild>(); |
| 691 [global::System.ObsoleteAttribute] | 616 [global::System.ObsoleteAttribute()] |
| 692 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 693 public pbc::RepeatedField<global::UnitTest.Issues.TestProtos.DeprecatedChild
> MessageArray { | 617 public pbc::RepeatedField<global::UnitTest.Issues.TestProtos.DeprecatedChild
> MessageArray { |
| 694 get { return messageArray_; } | 618 get { return messageArray_; } |
| 695 } | 619 } |
| 696 | 620 |
| 697 /// <summary>Field number for the "EnumValue" field.</summary> | 621 /// <summary>Field number for the "EnumValue" field.</summary> |
| 698 public const int EnumValueFieldNumber = 5; | 622 public const int EnumValueFieldNumber = 5; |
| 699 private global::UnitTest.Issues.TestProtos.DeprecatedEnum enumValue_ = 0; | 623 private global::UnitTest.Issues.TestProtos.DeprecatedEnum enumValue_ = 0; |
| 700 [global::System.ObsoleteAttribute] | 624 [global::System.ObsoleteAttribute()] |
| 701 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 702 public global::UnitTest.Issues.TestProtos.DeprecatedEnum EnumValue { | 625 public global::UnitTest.Issues.TestProtos.DeprecatedEnum EnumValue { |
| 703 get { return enumValue_; } | 626 get { return enumValue_; } |
| 704 set { | 627 set { |
| 705 enumValue_ = value; | 628 enumValue_ = value; |
| 706 } | 629 } |
| 707 } | 630 } |
| 708 | 631 |
| 709 /// <summary>Field number for the "EnumArray" field.</summary> | 632 /// <summary>Field number for the "EnumArray" field.</summary> |
| 710 public const int EnumArrayFieldNumber = 6; | 633 public const int EnumArrayFieldNumber = 6; |
| 711 private static readonly pb::FieldCodec<global::UnitTest.Issues.TestProtos.De
precatedEnum> _repeated_enumArray_codec | 634 private static readonly pb::FieldCodec<global::UnitTest.Issues.TestProtos.De
precatedEnum> _repeated_enumArray_codec |
| 712 = pb::FieldCodec.ForEnum(50, x => (int) x, x => (global::UnitTest.Issues
.TestProtos.DeprecatedEnum) x); | 635 = pb::FieldCodec.ForEnum(50, x => (int) x, x => (global::UnitTest.Issues
.TestProtos.DeprecatedEnum) x); |
| 713 private readonly pbc::RepeatedField<global::UnitTest.Issues.TestProtos.Depre
catedEnum> enumArray_ = new pbc::RepeatedField<global::UnitTest.Issues.TestProto
s.DeprecatedEnum>(); | 636 private readonly pbc::RepeatedField<global::UnitTest.Issues.TestProtos.Depre
catedEnum> enumArray_ = new pbc::RepeatedField<global::UnitTest.Issues.TestProto
s.DeprecatedEnum>(); |
| 714 [global::System.ObsoleteAttribute] | 637 [global::System.ObsoleteAttribute()] |
| 715 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 716 public pbc::RepeatedField<global::UnitTest.Issues.TestProtos.DeprecatedEnum>
EnumArray { | 638 public pbc::RepeatedField<global::UnitTest.Issues.TestProtos.DeprecatedEnum>
EnumArray { |
| 717 get { return enumArray_; } | 639 get { return enumArray_; } |
| 718 } | 640 } |
| 719 | 641 |
| 720 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 721 public override bool Equals(object other) { | 642 public override bool Equals(object other) { |
| 722 return Equals(other as DeprecatedFieldsMessage); | 643 return Equals(other as DeprecatedFieldsMessage); |
| 723 } | 644 } |
| 724 | 645 |
| 725 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 726 public bool Equals(DeprecatedFieldsMessage other) { | 646 public bool Equals(DeprecatedFieldsMessage other) { |
| 727 if (ReferenceEquals(other, null)) { | 647 if (ReferenceEquals(other, null)) { |
| 728 return false; | 648 return false; |
| 729 } | 649 } |
| 730 if (ReferenceEquals(other, this)) { | 650 if (ReferenceEquals(other, this)) { |
| 731 return true; | 651 return true; |
| 732 } | 652 } |
| 733 if (PrimitiveValue != other.PrimitiveValue) return false; | 653 if (PrimitiveValue != other.PrimitiveValue) return false; |
| 734 if(!primitiveArray_.Equals(other.primitiveArray_)) return false; | 654 if(!primitiveArray_.Equals(other.primitiveArray_)) return false; |
| 735 if (!object.Equals(MessageValue, other.MessageValue)) return false; | 655 if (!object.Equals(MessageValue, other.MessageValue)) return false; |
| 736 if(!messageArray_.Equals(other.messageArray_)) return false; | 656 if(!messageArray_.Equals(other.messageArray_)) return false; |
| 737 if (EnumValue != other.EnumValue) return false; | 657 if (EnumValue != other.EnumValue) return false; |
| 738 if(!enumArray_.Equals(other.enumArray_)) return false; | 658 if(!enumArray_.Equals(other.enumArray_)) return false; |
| 739 return true; | 659 return true; |
| 740 } | 660 } |
| 741 | 661 |
| 742 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 743 public override int GetHashCode() { | 662 public override int GetHashCode() { |
| 744 int hash = 1; | 663 int hash = 1; |
| 745 if (PrimitiveValue != 0) hash ^= PrimitiveValue.GetHashCode(); | 664 if (PrimitiveValue != 0) hash ^= PrimitiveValue.GetHashCode(); |
| 746 hash ^= primitiveArray_.GetHashCode(); | 665 hash ^= primitiveArray_.GetHashCode(); |
| 747 if (messageValue_ != null) hash ^= MessageValue.GetHashCode(); | 666 if (messageValue_ != null) hash ^= MessageValue.GetHashCode(); |
| 748 hash ^= messageArray_.GetHashCode(); | 667 hash ^= messageArray_.GetHashCode(); |
| 749 if (EnumValue != 0) hash ^= EnumValue.GetHashCode(); | 668 if (EnumValue != 0) hash ^= EnumValue.GetHashCode(); |
| 750 hash ^= enumArray_.GetHashCode(); | 669 hash ^= enumArray_.GetHashCode(); |
| 751 return hash; | 670 return hash; |
| 752 } | 671 } |
| 753 | 672 |
| 754 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 755 public override string ToString() { | 673 public override string ToString() { |
| 756 return pb::JsonFormatter.ToDiagnosticString(this); | 674 return pb::JsonFormatter.ToDiagnosticString(this); |
| 757 } | 675 } |
| 758 | 676 |
| 759 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 760 public void WriteTo(pb::CodedOutputStream output) { | 677 public void WriteTo(pb::CodedOutputStream output) { |
| 761 if (PrimitiveValue != 0) { | 678 if (PrimitiveValue != 0) { |
| 762 output.WriteRawTag(8); | 679 output.WriteRawTag(8); |
| 763 output.WriteInt32(PrimitiveValue); | 680 output.WriteInt32(PrimitiveValue); |
| 764 } | 681 } |
| 765 primitiveArray_.WriteTo(output, _repeated_primitiveArray_codec); | 682 primitiveArray_.WriteTo(output, _repeated_primitiveArray_codec); |
| 766 if (messageValue_ != null) { | 683 if (messageValue_ != null) { |
| 767 output.WriteRawTag(26); | 684 output.WriteRawTag(26); |
| 768 output.WriteMessage(MessageValue); | 685 output.WriteMessage(MessageValue); |
| 769 } | 686 } |
| 770 messageArray_.WriteTo(output, _repeated_messageArray_codec); | 687 messageArray_.WriteTo(output, _repeated_messageArray_codec); |
| 771 if (EnumValue != 0) { | 688 if (EnumValue != 0) { |
| 772 output.WriteRawTag(40); | 689 output.WriteRawTag(40); |
| 773 output.WriteEnum((int) EnumValue); | 690 output.WriteEnum((int) EnumValue); |
| 774 } | 691 } |
| 775 enumArray_.WriteTo(output, _repeated_enumArray_codec); | 692 enumArray_.WriteTo(output, _repeated_enumArray_codec); |
| 776 } | 693 } |
| 777 | 694 |
| 778 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 779 public int CalculateSize() { | 695 public int CalculateSize() { |
| 780 int size = 0; | 696 int size = 0; |
| 781 if (PrimitiveValue != 0) { | 697 if (PrimitiveValue != 0) { |
| 782 size += 1 + pb::CodedOutputStream.ComputeInt32Size(PrimitiveValue); | 698 size += 1 + pb::CodedOutputStream.ComputeInt32Size(PrimitiveValue); |
| 783 } | 699 } |
| 784 size += primitiveArray_.CalculateSize(_repeated_primitiveArray_codec); | 700 size += primitiveArray_.CalculateSize(_repeated_primitiveArray_codec); |
| 785 if (messageValue_ != null) { | 701 if (messageValue_ != null) { |
| 786 size += 1 + pb::CodedOutputStream.ComputeMessageSize(MessageValue); | 702 size += 1 + pb::CodedOutputStream.ComputeMessageSize(MessageValue); |
| 787 } | 703 } |
| 788 size += messageArray_.CalculateSize(_repeated_messageArray_codec); | 704 size += messageArray_.CalculateSize(_repeated_messageArray_codec); |
| 789 if (EnumValue != 0) { | 705 if (EnumValue != 0) { |
| 790 size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) EnumValue); | 706 size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) EnumValue); |
| 791 } | 707 } |
| 792 size += enumArray_.CalculateSize(_repeated_enumArray_codec); | 708 size += enumArray_.CalculateSize(_repeated_enumArray_codec); |
| 793 return size; | 709 return size; |
| 794 } | 710 } |
| 795 | 711 |
| 796 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 797 public void MergeFrom(DeprecatedFieldsMessage other) { | 712 public void MergeFrom(DeprecatedFieldsMessage other) { |
| 798 if (other == null) { | 713 if (other == null) { |
| 799 return; | 714 return; |
| 800 } | 715 } |
| 801 if (other.PrimitiveValue != 0) { | 716 if (other.PrimitiveValue != 0) { |
| 802 PrimitiveValue = other.PrimitiveValue; | 717 PrimitiveValue = other.PrimitiveValue; |
| 803 } | 718 } |
| 804 primitiveArray_.Add(other.primitiveArray_); | 719 primitiveArray_.Add(other.primitiveArray_); |
| 805 if (other.messageValue_ != null) { | 720 if (other.messageValue_ != null) { |
| 806 if (messageValue_ == null) { | 721 if (messageValue_ == null) { |
| 807 messageValue_ = new global::UnitTest.Issues.TestProtos.DeprecatedChild
(); | 722 messageValue_ = new global::UnitTest.Issues.TestProtos.DeprecatedChild
(); |
| 808 } | 723 } |
| 809 MessageValue.MergeFrom(other.MessageValue); | 724 MessageValue.MergeFrom(other.MessageValue); |
| 810 } | 725 } |
| 811 messageArray_.Add(other.messageArray_); | 726 messageArray_.Add(other.messageArray_); |
| 812 if (other.EnumValue != 0) { | 727 if (other.EnumValue != 0) { |
| 813 EnumValue = other.EnumValue; | 728 EnumValue = other.EnumValue; |
| 814 } | 729 } |
| 815 enumArray_.Add(other.enumArray_); | 730 enumArray_.Add(other.enumArray_); |
| 816 } | 731 } |
| 817 | 732 |
| 818 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 819 public void MergeFrom(pb::CodedInputStream input) { | 733 public void MergeFrom(pb::CodedInputStream input) { |
| 820 uint tag; | 734 uint tag; |
| 821 while ((tag = input.ReadTag()) != 0) { | 735 while ((tag = input.ReadTag()) != 0) { |
| 822 switch(tag) { | 736 switch(tag) { |
| 823 default: | 737 default: |
| 824 input.SkipLastField(); | 738 input.SkipLastField(); |
| 825 break; | 739 break; |
| 826 case 8: { | 740 case 8: { |
| 827 PrimitiveValue = input.ReadInt32(); | 741 PrimitiveValue = input.ReadInt32(); |
| 828 break; | 742 break; |
| (...skipping 23 matching lines...) Expand all Loading... |
| 852 enumArray_.AddEntriesFrom(input, _repeated_enumArray_codec); | 766 enumArray_.AddEntriesFrom(input, _repeated_enumArray_codec); |
| 853 break; | 767 break; |
| 854 } | 768 } |
| 855 } | 769 } |
| 856 } | 770 } |
| 857 } | 771 } |
| 858 | 772 |
| 859 } | 773 } |
| 860 | 774 |
| 861 /// <summary> | 775 /// <summary> |
| 862 /// Issue 45: http://code.google.com/p/protobuf-csharp-port/issues/detail?id=4
5 | 776 /// Issue 45: http://code.google.com/p/protobuf-csharp-port/issues/detail?id=
45 |
| 863 /// </summary> | 777 /// </summary> |
| 778 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 864 public sealed partial class ItemField : pb::IMessage<ItemField> { | 779 public sealed partial class ItemField : pb::IMessage<ItemField> { |
| 865 private static readonly pb::MessageParser<ItemField> _parser = new pb::Messa
geParser<ItemField>(() => new ItemField()); | 780 private static readonly pb::MessageParser<ItemField> _parser = new pb::Messa
geParser<ItemField>(() => new ItemField()); |
| 866 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 867 public static pb::MessageParser<ItemField> Parser { get { return _parser; }
} | 781 public static pb::MessageParser<ItemField> Parser { get { return _parser; }
} |
| 868 | 782 |
| 869 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 870 public static pbr::MessageDescriptor Descriptor { | 783 public static pbr::MessageDescriptor Descriptor { |
| 871 get { return global::UnitTest.Issues.TestProtos.UnittestIssuesReflection.D
escriptor.MessageTypes[4]; } | 784 get { return global::UnitTest.Issues.TestProtos.UnittestIssuesReflection.D
escriptor.MessageTypes[4]; } |
| 872 } | 785 } |
| 873 | 786 |
| 874 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 875 pbr::MessageDescriptor pb::IMessage.Descriptor { | 787 pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 876 get { return Descriptor; } | 788 get { return Descriptor; } |
| 877 } | 789 } |
| 878 | 790 |
| 879 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 880 public ItemField() { | 791 public ItemField() { |
| 881 OnConstruction(); | 792 OnConstruction(); |
| 882 } | 793 } |
| 883 | 794 |
| 884 partial void OnConstruction(); | 795 partial void OnConstruction(); |
| 885 | 796 |
| 886 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 887 public ItemField(ItemField other) : this() { | 797 public ItemField(ItemField other) : this() { |
| 888 item_ = other.item_; | 798 item_ = other.item_; |
| 889 } | 799 } |
| 890 | 800 |
| 891 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 892 public ItemField Clone() { | 801 public ItemField Clone() { |
| 893 return new ItemField(this); | 802 return new ItemField(this); |
| 894 } | 803 } |
| 895 | 804 |
| 896 /// <summary>Field number for the "item" field.</summary> | 805 /// <summary>Field number for the "item" field.</summary> |
| 897 public const int ItemFieldNumber = 1; | 806 public const int ItemFieldNumber = 1; |
| 898 private int item_; | 807 private int item_; |
| 899 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 900 public int Item { | 808 public int Item { |
| 901 get { return item_; } | 809 get { return item_; } |
| 902 set { | 810 set { |
| 903 item_ = value; | 811 item_ = value; |
| 904 } | 812 } |
| 905 } | 813 } |
| 906 | 814 |
| 907 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 908 public override bool Equals(object other) { | 815 public override bool Equals(object other) { |
| 909 return Equals(other as ItemField); | 816 return Equals(other as ItemField); |
| 910 } | 817 } |
| 911 | 818 |
| 912 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 913 public bool Equals(ItemField other) { | 819 public bool Equals(ItemField other) { |
| 914 if (ReferenceEquals(other, null)) { | 820 if (ReferenceEquals(other, null)) { |
| 915 return false; | 821 return false; |
| 916 } | 822 } |
| 917 if (ReferenceEquals(other, this)) { | 823 if (ReferenceEquals(other, this)) { |
| 918 return true; | 824 return true; |
| 919 } | 825 } |
| 920 if (Item != other.Item) return false; | 826 if (Item != other.Item) return false; |
| 921 return true; | 827 return true; |
| 922 } | 828 } |
| 923 | 829 |
| 924 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 925 public override int GetHashCode() { | 830 public override int GetHashCode() { |
| 926 int hash = 1; | 831 int hash = 1; |
| 927 if (Item != 0) hash ^= Item.GetHashCode(); | 832 if (Item != 0) hash ^= Item.GetHashCode(); |
| 928 return hash; | 833 return hash; |
| 929 } | 834 } |
| 930 | 835 |
| 931 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 932 public override string ToString() { | 836 public override string ToString() { |
| 933 return pb::JsonFormatter.ToDiagnosticString(this); | 837 return pb::JsonFormatter.ToDiagnosticString(this); |
| 934 } | 838 } |
| 935 | 839 |
| 936 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 937 public void WriteTo(pb::CodedOutputStream output) { | 840 public void WriteTo(pb::CodedOutputStream output) { |
| 938 if (Item != 0) { | 841 if (Item != 0) { |
| 939 output.WriteRawTag(8); | 842 output.WriteRawTag(8); |
| 940 output.WriteInt32(Item); | 843 output.WriteInt32(Item); |
| 941 } | 844 } |
| 942 } | 845 } |
| 943 | 846 |
| 944 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 945 public int CalculateSize() { | 847 public int CalculateSize() { |
| 946 int size = 0; | 848 int size = 0; |
| 947 if (Item != 0) { | 849 if (Item != 0) { |
| 948 size += 1 + pb::CodedOutputStream.ComputeInt32Size(Item); | 850 size += 1 + pb::CodedOutputStream.ComputeInt32Size(Item); |
| 949 } | 851 } |
| 950 return size; | 852 return size; |
| 951 } | 853 } |
| 952 | 854 |
| 953 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 954 public void MergeFrom(ItemField other) { | 855 public void MergeFrom(ItemField other) { |
| 955 if (other == null) { | 856 if (other == null) { |
| 956 return; | 857 return; |
| 957 } | 858 } |
| 958 if (other.Item != 0) { | 859 if (other.Item != 0) { |
| 959 Item = other.Item; | 860 Item = other.Item; |
| 960 } | 861 } |
| 961 } | 862 } |
| 962 | 863 |
| 963 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 964 public void MergeFrom(pb::CodedInputStream input) { | 864 public void MergeFrom(pb::CodedInputStream input) { |
| 965 uint tag; | 865 uint tag; |
| 966 while ((tag = input.ReadTag()) != 0) { | 866 while ((tag = input.ReadTag()) != 0) { |
| 967 switch(tag) { | 867 switch(tag) { |
| 968 default: | 868 default: |
| 969 input.SkipLastField(); | 869 input.SkipLastField(); |
| 970 break; | 870 break; |
| 971 case 8: { | 871 case 8: { |
| 972 Item = input.ReadInt32(); | 872 Item = input.ReadInt32(); |
| 973 break; | 873 break; |
| 974 } | 874 } |
| 975 } | 875 } |
| 976 } | 876 } |
| 977 } | 877 } |
| 978 | 878 |
| 979 } | 879 } |
| 980 | 880 |
| 881 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 981 public sealed partial class ReservedNames : pb::IMessage<ReservedNames> { | 882 public sealed partial class ReservedNames : pb::IMessage<ReservedNames> { |
| 982 private static readonly pb::MessageParser<ReservedNames> _parser = new pb::M
essageParser<ReservedNames>(() => new ReservedNames()); | 883 private static readonly pb::MessageParser<ReservedNames> _parser = new pb::M
essageParser<ReservedNames>(() => new ReservedNames()); |
| 983 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 984 public static pb::MessageParser<ReservedNames> Parser { get { return _parser
; } } | 884 public static pb::MessageParser<ReservedNames> Parser { get { return _parser
; } } |
| 985 | 885 |
| 986 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 987 public static pbr::MessageDescriptor Descriptor { | 886 public static pbr::MessageDescriptor Descriptor { |
| 988 get { return global::UnitTest.Issues.TestProtos.UnittestIssuesReflection.D
escriptor.MessageTypes[5]; } | 887 get { return global::UnitTest.Issues.TestProtos.UnittestIssuesReflection.D
escriptor.MessageTypes[5]; } |
| 989 } | 888 } |
| 990 | 889 |
| 991 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 992 pbr::MessageDescriptor pb::IMessage.Descriptor { | 890 pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 993 get { return Descriptor; } | 891 get { return Descriptor; } |
| 994 } | 892 } |
| 995 | 893 |
| 996 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 997 public ReservedNames() { | 894 public ReservedNames() { |
| 998 OnConstruction(); | 895 OnConstruction(); |
| 999 } | 896 } |
| 1000 | 897 |
| 1001 partial void OnConstruction(); | 898 partial void OnConstruction(); |
| 1002 | 899 |
| 1003 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 1004 public ReservedNames(ReservedNames other) : this() { | 900 public ReservedNames(ReservedNames other) : this() { |
| 1005 types_ = other.types_; | 901 types_ = other.types_; |
| 1006 descriptor_ = other.descriptor_; | 902 descriptor_ = other.descriptor_; |
| 1007 } | 903 } |
| 1008 | 904 |
| 1009 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 1010 public ReservedNames Clone() { | 905 public ReservedNames Clone() { |
| 1011 return new ReservedNames(this); | 906 return new ReservedNames(this); |
| 1012 } | 907 } |
| 1013 | 908 |
| 1014 /// <summary>Field number for the "types" field.</summary> | 909 /// <summary>Field number for the "types" field.</summary> |
| 1015 public const int Types_FieldNumber = 1; | 910 public const int Types_FieldNumber = 1; |
| 1016 private int types_; | 911 private int types_; |
| 1017 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 1018 public int Types_ { | 912 public int Types_ { |
| 1019 get { return types_; } | 913 get { return types_; } |
| 1020 set { | 914 set { |
| 1021 types_ = value; | 915 types_ = value; |
| 1022 } | 916 } |
| 1023 } | 917 } |
| 1024 | 918 |
| 1025 /// <summary>Field number for the "descriptor" field.</summary> | 919 /// <summary>Field number for the "descriptor" field.</summary> |
| 1026 public const int Descriptor_FieldNumber = 2; | 920 public const int Descriptor_FieldNumber = 2; |
| 1027 private int descriptor_; | 921 private int descriptor_; |
| 1028 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 1029 public int Descriptor_ { | 922 public int Descriptor_ { |
| 1030 get { return descriptor_; } | 923 get { return descriptor_; } |
| 1031 set { | 924 set { |
| 1032 descriptor_ = value; | 925 descriptor_ = value; |
| 1033 } | 926 } |
| 1034 } | 927 } |
| 1035 | 928 |
| 1036 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 1037 public override bool Equals(object other) { | 929 public override bool Equals(object other) { |
| 1038 return Equals(other as ReservedNames); | 930 return Equals(other as ReservedNames); |
| 1039 } | 931 } |
| 1040 | 932 |
| 1041 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 1042 public bool Equals(ReservedNames other) { | 933 public bool Equals(ReservedNames other) { |
| 1043 if (ReferenceEquals(other, null)) { | 934 if (ReferenceEquals(other, null)) { |
| 1044 return false; | 935 return false; |
| 1045 } | 936 } |
| 1046 if (ReferenceEquals(other, this)) { | 937 if (ReferenceEquals(other, this)) { |
| 1047 return true; | 938 return true; |
| 1048 } | 939 } |
| 1049 if (Types_ != other.Types_) return false; | 940 if (Types_ != other.Types_) return false; |
| 1050 if (Descriptor_ != other.Descriptor_) return false; | 941 if (Descriptor_ != other.Descriptor_) return false; |
| 1051 return true; | 942 return true; |
| 1052 } | 943 } |
| 1053 | 944 |
| 1054 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 1055 public override int GetHashCode() { | 945 public override int GetHashCode() { |
| 1056 int hash = 1; | 946 int hash = 1; |
| 1057 if (Types_ != 0) hash ^= Types_.GetHashCode(); | 947 if (Types_ != 0) hash ^= Types_.GetHashCode(); |
| 1058 if (Descriptor_ != 0) hash ^= Descriptor_.GetHashCode(); | 948 if (Descriptor_ != 0) hash ^= Descriptor_.GetHashCode(); |
| 1059 return hash; | 949 return hash; |
| 1060 } | 950 } |
| 1061 | 951 |
| 1062 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 1063 public override string ToString() { | 952 public override string ToString() { |
| 1064 return pb::JsonFormatter.ToDiagnosticString(this); | 953 return pb::JsonFormatter.ToDiagnosticString(this); |
| 1065 } | 954 } |
| 1066 | 955 |
| 1067 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 1068 public void WriteTo(pb::CodedOutputStream output) { | 956 public void WriteTo(pb::CodedOutputStream output) { |
| 1069 if (Types_ != 0) { | 957 if (Types_ != 0) { |
| 1070 output.WriteRawTag(8); | 958 output.WriteRawTag(8); |
| 1071 output.WriteInt32(Types_); | 959 output.WriteInt32(Types_); |
| 1072 } | 960 } |
| 1073 if (Descriptor_ != 0) { | 961 if (Descriptor_ != 0) { |
| 1074 output.WriteRawTag(16); | 962 output.WriteRawTag(16); |
| 1075 output.WriteInt32(Descriptor_); | 963 output.WriteInt32(Descriptor_); |
| 1076 } | 964 } |
| 1077 } | 965 } |
| 1078 | 966 |
| 1079 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 1080 public int CalculateSize() { | 967 public int CalculateSize() { |
| 1081 int size = 0; | 968 int size = 0; |
| 1082 if (Types_ != 0) { | 969 if (Types_ != 0) { |
| 1083 size += 1 + pb::CodedOutputStream.ComputeInt32Size(Types_); | 970 size += 1 + pb::CodedOutputStream.ComputeInt32Size(Types_); |
| 1084 } | 971 } |
| 1085 if (Descriptor_ != 0) { | 972 if (Descriptor_ != 0) { |
| 1086 size += 1 + pb::CodedOutputStream.ComputeInt32Size(Descriptor_); | 973 size += 1 + pb::CodedOutputStream.ComputeInt32Size(Descriptor_); |
| 1087 } | 974 } |
| 1088 return size; | 975 return size; |
| 1089 } | 976 } |
| 1090 | 977 |
| 1091 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 1092 public void MergeFrom(ReservedNames other) { | 978 public void MergeFrom(ReservedNames other) { |
| 1093 if (other == null) { | 979 if (other == null) { |
| 1094 return; | 980 return; |
| 1095 } | 981 } |
| 1096 if (other.Types_ != 0) { | 982 if (other.Types_ != 0) { |
| 1097 Types_ = other.Types_; | 983 Types_ = other.Types_; |
| 1098 } | 984 } |
| 1099 if (other.Descriptor_ != 0) { | 985 if (other.Descriptor_ != 0) { |
| 1100 Descriptor_ = other.Descriptor_; | 986 Descriptor_ = other.Descriptor_; |
| 1101 } | 987 } |
| 1102 } | 988 } |
| 1103 | 989 |
| 1104 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 1105 public void MergeFrom(pb::CodedInputStream input) { | 990 public void MergeFrom(pb::CodedInputStream input) { |
| 1106 uint tag; | 991 uint tag; |
| 1107 while ((tag = input.ReadTag()) != 0) { | 992 while ((tag = input.ReadTag()) != 0) { |
| 1108 switch(tag) { | 993 switch(tag) { |
| 1109 default: | 994 default: |
| 1110 input.SkipLastField(); | 995 input.SkipLastField(); |
| 1111 break; | 996 break; |
| 1112 case 8: { | 997 case 8: { |
| 1113 Types_ = input.ReadInt32(); | 998 Types_ = input.ReadInt32(); |
| 1114 break; | 999 break; |
| 1115 } | 1000 } |
| 1116 case 16: { | 1001 case 16: { |
| 1117 Descriptor_ = input.ReadInt32(); | 1002 Descriptor_ = input.ReadInt32(); |
| 1118 break; | 1003 break; |
| 1119 } | 1004 } |
| 1120 } | 1005 } |
| 1121 } | 1006 } |
| 1122 } | 1007 } |
| 1123 | 1008 |
| 1124 #region Nested types | 1009 #region Nested types |
| 1125 /// <summary>Container for nested types declared in the ReservedNames messag
e type.</summary> | 1010 /// <summary>Container for nested types declared in the ReservedNames messag
e type.</summary> |
| 1126 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | 1011 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 1127 public static partial class Types { | 1012 public static partial class Types { |
| 1128 /// <summary> | 1013 /// <summary> |
| 1129 /// Force a nested type called Types | 1014 /// Force a nested type called Types |
| 1130 /// </summary> | 1015 /// </summary> |
| 1016 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 1131 public sealed partial class SomeNestedType : pb::IMessage<SomeNestedType>
{ | 1017 public sealed partial class SomeNestedType : pb::IMessage<SomeNestedType>
{ |
| 1132 private static readonly pb::MessageParser<SomeNestedType> _parser = new
pb::MessageParser<SomeNestedType>(() => new SomeNestedType()); | 1018 private static readonly pb::MessageParser<SomeNestedType> _parser = new
pb::MessageParser<SomeNestedType>(() => new SomeNestedType()); |
| 1133 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 1134 public static pb::MessageParser<SomeNestedType> Parser { get { return _p
arser; } } | 1019 public static pb::MessageParser<SomeNestedType> Parser { get { return _p
arser; } } |
| 1135 | 1020 |
| 1136 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 1137 public static pbr::MessageDescriptor Descriptor { | 1021 public static pbr::MessageDescriptor Descriptor { |
| 1138 get { return global::UnitTest.Issues.TestProtos.ReservedNames.Descript
or.NestedTypes[0]; } | 1022 get { return global::UnitTest.Issues.TestProtos.ReservedNames.Descript
or.NestedTypes[0]; } |
| 1139 } | 1023 } |
| 1140 | 1024 |
| 1141 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 1142 pbr::MessageDescriptor pb::IMessage.Descriptor { | 1025 pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 1143 get { return Descriptor; } | 1026 get { return Descriptor; } |
| 1144 } | 1027 } |
| 1145 | 1028 |
| 1146 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 1147 public SomeNestedType() { | 1029 public SomeNestedType() { |
| 1148 OnConstruction(); | 1030 OnConstruction(); |
| 1149 } | 1031 } |
| 1150 | 1032 |
| 1151 partial void OnConstruction(); | 1033 partial void OnConstruction(); |
| 1152 | 1034 |
| 1153 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 1154 public SomeNestedType(SomeNestedType other) : this() { | 1035 public SomeNestedType(SomeNestedType other) : this() { |
| 1155 } | 1036 } |
| 1156 | 1037 |
| 1157 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 1158 public SomeNestedType Clone() { | 1038 public SomeNestedType Clone() { |
| 1159 return new SomeNestedType(this); | 1039 return new SomeNestedType(this); |
| 1160 } | 1040 } |
| 1161 | 1041 |
| 1162 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 1163 public override bool Equals(object other) { | 1042 public override bool Equals(object other) { |
| 1164 return Equals(other as SomeNestedType); | 1043 return Equals(other as SomeNestedType); |
| 1165 } | 1044 } |
| 1166 | 1045 |
| 1167 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 1168 public bool Equals(SomeNestedType other) { | 1046 public bool Equals(SomeNestedType other) { |
| 1169 if (ReferenceEquals(other, null)) { | 1047 if (ReferenceEquals(other, null)) { |
| 1170 return false; | 1048 return false; |
| 1171 } | 1049 } |
| 1172 if (ReferenceEquals(other, this)) { | 1050 if (ReferenceEquals(other, this)) { |
| 1173 return true; | 1051 return true; |
| 1174 } | 1052 } |
| 1175 return true; | 1053 return true; |
| 1176 } | 1054 } |
| 1177 | 1055 |
| 1178 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 1179 public override int GetHashCode() { | 1056 public override int GetHashCode() { |
| 1180 int hash = 1; | 1057 int hash = 1; |
| 1181 return hash; | 1058 return hash; |
| 1182 } | 1059 } |
| 1183 | 1060 |
| 1184 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 1185 public override string ToString() { | 1061 public override string ToString() { |
| 1186 return pb::JsonFormatter.ToDiagnosticString(this); | 1062 return pb::JsonFormatter.ToDiagnosticString(this); |
| 1187 } | 1063 } |
| 1188 | 1064 |
| 1189 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 1190 public void WriteTo(pb::CodedOutputStream output) { | 1065 public void WriteTo(pb::CodedOutputStream output) { |
| 1191 } | 1066 } |
| 1192 | 1067 |
| 1193 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 1194 public int CalculateSize() { | 1068 public int CalculateSize() { |
| 1195 int size = 0; | 1069 int size = 0; |
| 1196 return size; | 1070 return size; |
| 1197 } | 1071 } |
| 1198 | 1072 |
| 1199 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 1200 public void MergeFrom(SomeNestedType other) { | 1073 public void MergeFrom(SomeNestedType other) { |
| 1201 if (other == null) { | 1074 if (other == null) { |
| 1202 return; | 1075 return; |
| 1203 } | 1076 } |
| 1204 } | 1077 } |
| 1205 | 1078 |
| 1206 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 1207 public void MergeFrom(pb::CodedInputStream input) { | 1079 public void MergeFrom(pb::CodedInputStream input) { |
| 1208 uint tag; | 1080 uint tag; |
| 1209 while ((tag = input.ReadTag()) != 0) { | 1081 while ((tag = input.ReadTag()) != 0) { |
| 1210 switch(tag) { | 1082 switch(tag) { |
| 1211 default: | 1083 default: |
| 1212 input.SkipLastField(); | 1084 input.SkipLastField(); |
| 1213 break; | 1085 break; |
| 1214 } | 1086 } |
| 1215 } | 1087 } |
| 1216 } | 1088 } |
| 1217 | 1089 |
| 1218 } | 1090 } |
| 1219 | 1091 |
| 1220 } | 1092 } |
| 1221 #endregion | 1093 #endregion |
| 1222 | 1094 |
| 1223 } | 1095 } |
| 1224 | 1096 |
| 1225 /// <summary> | 1097 /// <summary> |
| 1226 /// These fields are deliberately not declared in numeric | 1098 /// These fields are deliberately not declared in numeric |
| 1227 /// order, and the oneof fields aren't contiguous either. | 1099 /// order, and the oneof fields aren't contiguous either. |
| 1228 /// This allows for reasonably robust tests of JSON output | 1100 /// This allows for reasonably robust tests of JSON output |
| 1229 /// ordering. | 1101 /// ordering. |
| 1230 /// TestFieldOrderings in unittest_proto3.proto is similar, | 1102 /// TestFieldOrderings in unittest_proto3.proto is similar, |
| 1231 /// but doesn't include oneofs. | 1103 /// but doesn't include oneofs. |
| 1232 /// TODO: Consider adding oneofs to TestFieldOrderings, although | 1104 /// TODO: Consider adding oneofs to TestFieldOrderings, although |
| 1233 /// that will require fixing other tests in multiple platforms. | 1105 /// that will require fixing other tests in multiple platforms. |
| 1234 /// Alternatively, consider just adding this to | 1106 /// Alternatively, consider just adding this to |
| 1235 /// unittest_proto3.proto if multiple platforms want it. | 1107 /// unittest_proto3.proto if multiple platforms want it. |
| 1236 /// </summary> | 1108 /// </summary> |
| 1109 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 1237 public sealed partial class TestJsonFieldOrdering : pb::IMessage<TestJsonField
Ordering> { | 1110 public sealed partial class TestJsonFieldOrdering : pb::IMessage<TestJsonField
Ordering> { |
| 1238 private static readonly pb::MessageParser<TestJsonFieldOrdering> _parser = n
ew pb::MessageParser<TestJsonFieldOrdering>(() => new TestJsonFieldOrdering()); | 1111 private static readonly pb::MessageParser<TestJsonFieldOrdering> _parser = n
ew pb::MessageParser<TestJsonFieldOrdering>(() => new TestJsonFieldOrdering()); |
| 1239 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 1240 public static pb::MessageParser<TestJsonFieldOrdering> Parser { get { return
_parser; } } | 1112 public static pb::MessageParser<TestJsonFieldOrdering> Parser { get { return
_parser; } } |
| 1241 | 1113 |
| 1242 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 1243 public static pbr::MessageDescriptor Descriptor { | 1114 public static pbr::MessageDescriptor Descriptor { |
| 1244 get { return global::UnitTest.Issues.TestProtos.UnittestIssuesReflection.D
escriptor.MessageTypes[6]; } | 1115 get { return global::UnitTest.Issues.TestProtos.UnittestIssuesReflection.D
escriptor.MessageTypes[6]; } |
| 1245 } | 1116 } |
| 1246 | 1117 |
| 1247 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 1248 pbr::MessageDescriptor pb::IMessage.Descriptor { | 1118 pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 1249 get { return Descriptor; } | 1119 get { return Descriptor; } |
| 1250 } | 1120 } |
| 1251 | 1121 |
| 1252 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 1253 public TestJsonFieldOrdering() { | 1122 public TestJsonFieldOrdering() { |
| 1254 OnConstruction(); | 1123 OnConstruction(); |
| 1255 } | 1124 } |
| 1256 | 1125 |
| 1257 partial void OnConstruction(); | 1126 partial void OnConstruction(); |
| 1258 | 1127 |
| 1259 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 1260 public TestJsonFieldOrdering(TestJsonFieldOrdering other) : this() { | 1128 public TestJsonFieldOrdering(TestJsonFieldOrdering other) : this() { |
| 1261 plainInt32_ = other.plainInt32_; | 1129 plainInt32_ = other.plainInt32_; |
| 1262 plainString_ = other.plainString_; | 1130 plainString_ = other.plainString_; |
| 1263 switch (other.O1Case) { | 1131 switch (other.O1Case) { |
| 1264 case O1OneofCase.O1String: | 1132 case O1OneofCase.O1String: |
| 1265 O1String = other.O1String; | 1133 O1String = other.O1String; |
| 1266 break; | 1134 break; |
| 1267 case O1OneofCase.O1Int32: | 1135 case O1OneofCase.O1Int32: |
| 1268 O1Int32 = other.O1Int32; | 1136 O1Int32 = other.O1Int32; |
| 1269 break; | 1137 break; |
| 1270 } | 1138 } |
| 1271 | 1139 |
| 1272 switch (other.O2Case) { | 1140 switch (other.O2Case) { |
| 1273 case O2OneofCase.O2Int32: | 1141 case O2OneofCase.O2Int32: |
| 1274 O2Int32 = other.O2Int32; | 1142 O2Int32 = other.O2Int32; |
| 1275 break; | 1143 break; |
| 1276 case O2OneofCase.O2String: | 1144 case O2OneofCase.O2String: |
| 1277 O2String = other.O2String; | 1145 O2String = other.O2String; |
| 1278 break; | 1146 break; |
| 1279 } | 1147 } |
| 1280 | 1148 |
| 1281 } | 1149 } |
| 1282 | 1150 |
| 1283 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 1284 public TestJsonFieldOrdering Clone() { | 1151 public TestJsonFieldOrdering Clone() { |
| 1285 return new TestJsonFieldOrdering(this); | 1152 return new TestJsonFieldOrdering(this); |
| 1286 } | 1153 } |
| 1287 | 1154 |
| 1288 /// <summary>Field number for the "plain_int32" field.</summary> | 1155 /// <summary>Field number for the "plain_int32" field.</summary> |
| 1289 public const int PlainInt32FieldNumber = 4; | 1156 public const int PlainInt32FieldNumber = 4; |
| 1290 private int plainInt32_; | 1157 private int plainInt32_; |
| 1291 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 1292 public int PlainInt32 { | 1158 public int PlainInt32 { |
| 1293 get { return plainInt32_; } | 1159 get { return plainInt32_; } |
| 1294 set { | 1160 set { |
| 1295 plainInt32_ = value; | 1161 plainInt32_ = value; |
| 1296 } | 1162 } |
| 1297 } | 1163 } |
| 1298 | 1164 |
| 1299 /// <summary>Field number for the "o1_string" field.</summary> | 1165 /// <summary>Field number for the "o1_string" field.</summary> |
| 1300 public const int O1StringFieldNumber = 2; | 1166 public const int O1StringFieldNumber = 2; |
| 1301 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 1302 public string O1String { | 1167 public string O1String { |
| 1303 get { return o1Case_ == O1OneofCase.O1String ? (string) o1_ : ""; } | 1168 get { return o1Case_ == O1OneofCase.O1String ? (string) o1_ : ""; } |
| 1304 set { | 1169 set { |
| 1305 o1_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); | 1170 o1_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); |
| 1306 o1Case_ = O1OneofCase.O1String; | 1171 o1Case_ = O1OneofCase.O1String; |
| 1307 } | 1172 } |
| 1308 } | 1173 } |
| 1309 | 1174 |
| 1310 /// <summary>Field number for the "o1_int32" field.</summary> | 1175 /// <summary>Field number for the "o1_int32" field.</summary> |
| 1311 public const int O1Int32FieldNumber = 5; | 1176 public const int O1Int32FieldNumber = 5; |
| 1312 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 1313 public int O1Int32 { | 1177 public int O1Int32 { |
| 1314 get { return o1Case_ == O1OneofCase.O1Int32 ? (int) o1_ : 0; } | 1178 get { return o1Case_ == O1OneofCase.O1Int32 ? (int) o1_ : 0; } |
| 1315 set { | 1179 set { |
| 1316 o1_ = value; | 1180 o1_ = value; |
| 1317 o1Case_ = O1OneofCase.O1Int32; | 1181 o1Case_ = O1OneofCase.O1Int32; |
| 1318 } | 1182 } |
| 1319 } | 1183 } |
| 1320 | 1184 |
| 1321 /// <summary>Field number for the "plain_string" field.</summary> | 1185 /// <summary>Field number for the "plain_string" field.</summary> |
| 1322 public const int PlainStringFieldNumber = 1; | 1186 public const int PlainStringFieldNumber = 1; |
| 1323 private string plainString_ = ""; | 1187 private string plainString_ = ""; |
| 1324 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 1325 public string PlainString { | 1188 public string PlainString { |
| 1326 get { return plainString_; } | 1189 get { return plainString_; } |
| 1327 set { | 1190 set { |
| 1328 plainString_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); | 1191 plainString_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); |
| 1329 } | 1192 } |
| 1330 } | 1193 } |
| 1331 | 1194 |
| 1332 /// <summary>Field number for the "o2_int32" field.</summary> | 1195 /// <summary>Field number for the "o2_int32" field.</summary> |
| 1333 public const int O2Int32FieldNumber = 6; | 1196 public const int O2Int32FieldNumber = 6; |
| 1334 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 1335 public int O2Int32 { | 1197 public int O2Int32 { |
| 1336 get { return o2Case_ == O2OneofCase.O2Int32 ? (int) o2_ : 0; } | 1198 get { return o2Case_ == O2OneofCase.O2Int32 ? (int) o2_ : 0; } |
| 1337 set { | 1199 set { |
| 1338 o2_ = value; | 1200 o2_ = value; |
| 1339 o2Case_ = O2OneofCase.O2Int32; | 1201 o2Case_ = O2OneofCase.O2Int32; |
| 1340 } | 1202 } |
| 1341 } | 1203 } |
| 1342 | 1204 |
| 1343 /// <summary>Field number for the "o2_string" field.</summary> | 1205 /// <summary>Field number for the "o2_string" field.</summary> |
| 1344 public const int O2StringFieldNumber = 3; | 1206 public const int O2StringFieldNumber = 3; |
| 1345 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 1346 public string O2String { | 1207 public string O2String { |
| 1347 get { return o2Case_ == O2OneofCase.O2String ? (string) o2_ : ""; } | 1208 get { return o2Case_ == O2OneofCase.O2String ? (string) o2_ : ""; } |
| 1348 set { | 1209 set { |
| 1349 o2_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); | 1210 o2_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); |
| 1350 o2Case_ = O2OneofCase.O2String; | 1211 o2Case_ = O2OneofCase.O2String; |
| 1351 } | 1212 } |
| 1352 } | 1213 } |
| 1353 | 1214 |
| 1354 private object o1_; | 1215 private object o1_; |
| 1355 /// <summary>Enum of possible cases for the "o1" oneof.</summary> | 1216 /// <summary>Enum of possible cases for the "o1" oneof.</summary> |
| 1356 public enum O1OneofCase { | 1217 public enum O1OneofCase { |
| 1357 None = 0, | 1218 None = 0, |
| 1358 O1String = 2, | 1219 O1String = 2, |
| 1359 O1Int32 = 5, | 1220 O1Int32 = 5, |
| 1360 } | 1221 } |
| 1361 private O1OneofCase o1Case_ = O1OneofCase.None; | 1222 private O1OneofCase o1Case_ = O1OneofCase.None; |
| 1362 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 1363 public O1OneofCase O1Case { | 1223 public O1OneofCase O1Case { |
| 1364 get { return o1Case_; } | 1224 get { return o1Case_; } |
| 1365 } | 1225 } |
| 1366 | 1226 |
| 1367 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 1368 public void ClearO1() { | 1227 public void ClearO1() { |
| 1369 o1Case_ = O1OneofCase.None; | 1228 o1Case_ = O1OneofCase.None; |
| 1370 o1_ = null; | 1229 o1_ = null; |
| 1371 } | 1230 } |
| 1372 | 1231 |
| 1373 private object o2_; | 1232 private object o2_; |
| 1374 /// <summary>Enum of possible cases for the "o2" oneof.</summary> | 1233 /// <summary>Enum of possible cases for the "o2" oneof.</summary> |
| 1375 public enum O2OneofCase { | 1234 public enum O2OneofCase { |
| 1376 None = 0, | 1235 None = 0, |
| 1377 O2Int32 = 6, | 1236 O2Int32 = 6, |
| 1378 O2String = 3, | 1237 O2String = 3, |
| 1379 } | 1238 } |
| 1380 private O2OneofCase o2Case_ = O2OneofCase.None; | 1239 private O2OneofCase o2Case_ = O2OneofCase.None; |
| 1381 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 1382 public O2OneofCase O2Case { | 1240 public O2OneofCase O2Case { |
| 1383 get { return o2Case_; } | 1241 get { return o2Case_; } |
| 1384 } | 1242 } |
| 1385 | 1243 |
| 1386 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 1387 public void ClearO2() { | 1244 public void ClearO2() { |
| 1388 o2Case_ = O2OneofCase.None; | 1245 o2Case_ = O2OneofCase.None; |
| 1389 o2_ = null; | 1246 o2_ = null; |
| 1390 } | 1247 } |
| 1391 | 1248 |
| 1392 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 1393 public override bool Equals(object other) { | 1249 public override bool Equals(object other) { |
| 1394 return Equals(other as TestJsonFieldOrdering); | 1250 return Equals(other as TestJsonFieldOrdering); |
| 1395 } | 1251 } |
| 1396 | 1252 |
| 1397 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 1398 public bool Equals(TestJsonFieldOrdering other) { | 1253 public bool Equals(TestJsonFieldOrdering other) { |
| 1399 if (ReferenceEquals(other, null)) { | 1254 if (ReferenceEquals(other, null)) { |
| 1400 return false; | 1255 return false; |
| 1401 } | 1256 } |
| 1402 if (ReferenceEquals(other, this)) { | 1257 if (ReferenceEquals(other, this)) { |
| 1403 return true; | 1258 return true; |
| 1404 } | 1259 } |
| 1405 if (PlainInt32 != other.PlainInt32) return false; | 1260 if (PlainInt32 != other.PlainInt32) return false; |
| 1406 if (O1String != other.O1String) return false; | 1261 if (O1String != other.O1String) return false; |
| 1407 if (O1Int32 != other.O1Int32) return false; | 1262 if (O1Int32 != other.O1Int32) return false; |
| 1408 if (PlainString != other.PlainString) return false; | 1263 if (PlainString != other.PlainString) return false; |
| 1409 if (O2Int32 != other.O2Int32) return false; | 1264 if (O2Int32 != other.O2Int32) return false; |
| 1410 if (O2String != other.O2String) return false; | 1265 if (O2String != other.O2String) return false; |
| 1411 if (O1Case != other.O1Case) return false; | 1266 if (O1Case != other.O1Case) return false; |
| 1412 if (O2Case != other.O2Case) return false; | 1267 if (O2Case != other.O2Case) return false; |
| 1413 return true; | 1268 return true; |
| 1414 } | 1269 } |
| 1415 | 1270 |
| 1416 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 1417 public override int GetHashCode() { | 1271 public override int GetHashCode() { |
| 1418 int hash = 1; | 1272 int hash = 1; |
| 1419 if (PlainInt32 != 0) hash ^= PlainInt32.GetHashCode(); | 1273 if (PlainInt32 != 0) hash ^= PlainInt32.GetHashCode(); |
| 1420 if (o1Case_ == O1OneofCase.O1String) hash ^= O1String.GetHashCode(); | 1274 if (o1Case_ == O1OneofCase.O1String) hash ^= O1String.GetHashCode(); |
| 1421 if (o1Case_ == O1OneofCase.O1Int32) hash ^= O1Int32.GetHashCode(); | 1275 if (o1Case_ == O1OneofCase.O1Int32) hash ^= O1Int32.GetHashCode(); |
| 1422 if (PlainString.Length != 0) hash ^= PlainString.GetHashCode(); | 1276 if (PlainString.Length != 0) hash ^= PlainString.GetHashCode(); |
| 1423 if (o2Case_ == O2OneofCase.O2Int32) hash ^= O2Int32.GetHashCode(); | 1277 if (o2Case_ == O2OneofCase.O2Int32) hash ^= O2Int32.GetHashCode(); |
| 1424 if (o2Case_ == O2OneofCase.O2String) hash ^= O2String.GetHashCode(); | 1278 if (o2Case_ == O2OneofCase.O2String) hash ^= O2String.GetHashCode(); |
| 1425 hash ^= (int) o1Case_; | 1279 hash ^= (int) o1Case_; |
| 1426 hash ^= (int) o2Case_; | 1280 hash ^= (int) o2Case_; |
| 1427 return hash; | 1281 return hash; |
| 1428 } | 1282 } |
| 1429 | 1283 |
| 1430 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 1431 public override string ToString() { | 1284 public override string ToString() { |
| 1432 return pb::JsonFormatter.ToDiagnosticString(this); | 1285 return pb::JsonFormatter.ToDiagnosticString(this); |
| 1433 } | 1286 } |
| 1434 | 1287 |
| 1435 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 1436 public void WriteTo(pb::CodedOutputStream output) { | 1288 public void WriteTo(pb::CodedOutputStream output) { |
| 1437 if (PlainString.Length != 0) { | 1289 if (PlainString.Length != 0) { |
| 1438 output.WriteRawTag(10); | 1290 output.WriteRawTag(10); |
| 1439 output.WriteString(PlainString); | 1291 output.WriteString(PlainString); |
| 1440 } | 1292 } |
| 1441 if (o1Case_ == O1OneofCase.O1String) { | 1293 if (o1Case_ == O1OneofCase.O1String) { |
| 1442 output.WriteRawTag(18); | 1294 output.WriteRawTag(18); |
| 1443 output.WriteString(O1String); | 1295 output.WriteString(O1String); |
| 1444 } | 1296 } |
| 1445 if (o2Case_ == O2OneofCase.O2String) { | 1297 if (o2Case_ == O2OneofCase.O2String) { |
| 1446 output.WriteRawTag(26); | 1298 output.WriteRawTag(26); |
| 1447 output.WriteString(O2String); | 1299 output.WriteString(O2String); |
| 1448 } | 1300 } |
| 1449 if (PlainInt32 != 0) { | 1301 if (PlainInt32 != 0) { |
| 1450 output.WriteRawTag(32); | 1302 output.WriteRawTag(32); |
| 1451 output.WriteInt32(PlainInt32); | 1303 output.WriteInt32(PlainInt32); |
| 1452 } | 1304 } |
| 1453 if (o1Case_ == O1OneofCase.O1Int32) { | 1305 if (o1Case_ == O1OneofCase.O1Int32) { |
| 1454 output.WriteRawTag(40); | 1306 output.WriteRawTag(40); |
| 1455 output.WriteInt32(O1Int32); | 1307 output.WriteInt32(O1Int32); |
| 1456 } | 1308 } |
| 1457 if (o2Case_ == O2OneofCase.O2Int32) { | 1309 if (o2Case_ == O2OneofCase.O2Int32) { |
| 1458 output.WriteRawTag(48); | 1310 output.WriteRawTag(48); |
| 1459 output.WriteInt32(O2Int32); | 1311 output.WriteInt32(O2Int32); |
| 1460 } | 1312 } |
| 1461 } | 1313 } |
| 1462 | 1314 |
| 1463 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 1464 public int CalculateSize() { | 1315 public int CalculateSize() { |
| 1465 int size = 0; | 1316 int size = 0; |
| 1466 if (PlainInt32 != 0) { | 1317 if (PlainInt32 != 0) { |
| 1467 size += 1 + pb::CodedOutputStream.ComputeInt32Size(PlainInt32); | 1318 size += 1 + pb::CodedOutputStream.ComputeInt32Size(PlainInt32); |
| 1468 } | 1319 } |
| 1469 if (o1Case_ == O1OneofCase.O1String) { | 1320 if (o1Case_ == O1OneofCase.O1String) { |
| 1470 size += 1 + pb::CodedOutputStream.ComputeStringSize(O1String); | 1321 size += 1 + pb::CodedOutputStream.ComputeStringSize(O1String); |
| 1471 } | 1322 } |
| 1472 if (o1Case_ == O1OneofCase.O1Int32) { | 1323 if (o1Case_ == O1OneofCase.O1Int32) { |
| 1473 size += 1 + pb::CodedOutputStream.ComputeInt32Size(O1Int32); | 1324 size += 1 + pb::CodedOutputStream.ComputeInt32Size(O1Int32); |
| 1474 } | 1325 } |
| 1475 if (PlainString.Length != 0) { | 1326 if (PlainString.Length != 0) { |
| 1476 size += 1 + pb::CodedOutputStream.ComputeStringSize(PlainString); | 1327 size += 1 + pb::CodedOutputStream.ComputeStringSize(PlainString); |
| 1477 } | 1328 } |
| 1478 if (o2Case_ == O2OneofCase.O2Int32) { | 1329 if (o2Case_ == O2OneofCase.O2Int32) { |
| 1479 size += 1 + pb::CodedOutputStream.ComputeInt32Size(O2Int32); | 1330 size += 1 + pb::CodedOutputStream.ComputeInt32Size(O2Int32); |
| 1480 } | 1331 } |
| 1481 if (o2Case_ == O2OneofCase.O2String) { | 1332 if (o2Case_ == O2OneofCase.O2String) { |
| 1482 size += 1 + pb::CodedOutputStream.ComputeStringSize(O2String); | 1333 size += 1 + pb::CodedOutputStream.ComputeStringSize(O2String); |
| 1483 } | 1334 } |
| 1484 return size; | 1335 return size; |
| 1485 } | 1336 } |
| 1486 | 1337 |
| 1487 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 1488 public void MergeFrom(TestJsonFieldOrdering other) { | 1338 public void MergeFrom(TestJsonFieldOrdering other) { |
| 1489 if (other == null) { | 1339 if (other == null) { |
| 1490 return; | 1340 return; |
| 1491 } | 1341 } |
| 1492 if (other.PlainInt32 != 0) { | 1342 if (other.PlainInt32 != 0) { |
| 1493 PlainInt32 = other.PlainInt32; | 1343 PlainInt32 = other.PlainInt32; |
| 1494 } | 1344 } |
| 1495 if (other.PlainString.Length != 0) { | 1345 if (other.PlainString.Length != 0) { |
| 1496 PlainString = other.PlainString; | 1346 PlainString = other.PlainString; |
| 1497 } | 1347 } |
| (...skipping 10 matching lines...) Expand all Loading... |
| 1508 case O2OneofCase.O2Int32: | 1358 case O2OneofCase.O2Int32: |
| 1509 O2Int32 = other.O2Int32; | 1359 O2Int32 = other.O2Int32; |
| 1510 break; | 1360 break; |
| 1511 case O2OneofCase.O2String: | 1361 case O2OneofCase.O2String: |
| 1512 O2String = other.O2String; | 1362 O2String = other.O2String; |
| 1513 break; | 1363 break; |
| 1514 } | 1364 } |
| 1515 | 1365 |
| 1516 } | 1366 } |
| 1517 | 1367 |
| 1518 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 1519 public void MergeFrom(pb::CodedInputStream input) { | 1368 public void MergeFrom(pb::CodedInputStream input) { |
| 1520 uint tag; | 1369 uint tag; |
| 1521 while ((tag = input.ReadTag()) != 0) { | 1370 while ((tag = input.ReadTag()) != 0) { |
| 1522 switch(tag) { | 1371 switch(tag) { |
| 1523 default: | 1372 default: |
| 1524 input.SkipLastField(); | 1373 input.SkipLastField(); |
| 1525 break; | 1374 break; |
| 1526 case 10: { | 1375 case 10: { |
| 1527 PlainString = input.ReadString(); | 1376 PlainString = input.ReadString(); |
| 1528 break; | 1377 break; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 1546 case 48: { | 1395 case 48: { |
| 1547 O2Int32 = input.ReadInt32(); | 1396 O2Int32 = input.ReadInt32(); |
| 1548 break; | 1397 break; |
| 1549 } | 1398 } |
| 1550 } | 1399 } |
| 1551 } | 1400 } |
| 1552 } | 1401 } |
| 1553 | 1402 |
| 1554 } | 1403 } |
| 1555 | 1404 |
| 1405 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 1556 public sealed partial class TestJsonName : pb::IMessage<TestJsonName> { | 1406 public sealed partial class TestJsonName : pb::IMessage<TestJsonName> { |
| 1557 private static readonly pb::MessageParser<TestJsonName> _parser = new pb::Me
ssageParser<TestJsonName>(() => new TestJsonName()); | 1407 private static readonly pb::MessageParser<TestJsonName> _parser = new pb::Me
ssageParser<TestJsonName>(() => new TestJsonName()); |
| 1558 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 1559 public static pb::MessageParser<TestJsonName> Parser { get { return _parser;
} } | 1408 public static pb::MessageParser<TestJsonName> Parser { get { return _parser;
} } |
| 1560 | 1409 |
| 1561 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 1562 public static pbr::MessageDescriptor Descriptor { | 1410 public static pbr::MessageDescriptor Descriptor { |
| 1563 get { return global::UnitTest.Issues.TestProtos.UnittestIssuesReflection.D
escriptor.MessageTypes[7]; } | 1411 get { return global::UnitTest.Issues.TestProtos.UnittestIssuesReflection.D
escriptor.MessageTypes[7]; } |
| 1564 } | 1412 } |
| 1565 | 1413 |
| 1566 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 1567 pbr::MessageDescriptor pb::IMessage.Descriptor { | 1414 pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 1568 get { return Descriptor; } | 1415 get { return Descriptor; } |
| 1569 } | 1416 } |
| 1570 | 1417 |
| 1571 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 1572 public TestJsonName() { | 1418 public TestJsonName() { |
| 1573 OnConstruction(); | 1419 OnConstruction(); |
| 1574 } | 1420 } |
| 1575 | 1421 |
| 1576 partial void OnConstruction(); | 1422 partial void OnConstruction(); |
| 1577 | 1423 |
| 1578 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 1579 public TestJsonName(TestJsonName other) : this() { | 1424 public TestJsonName(TestJsonName other) : this() { |
| 1580 name_ = other.name_; | 1425 name_ = other.name_; |
| 1581 description_ = other.description_; | 1426 description_ = other.description_; |
| 1582 guid_ = other.guid_; | 1427 guid_ = other.guid_; |
| 1583 } | 1428 } |
| 1584 | 1429 |
| 1585 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 1586 public TestJsonName Clone() { | 1430 public TestJsonName Clone() { |
| 1587 return new TestJsonName(this); | 1431 return new TestJsonName(this); |
| 1588 } | 1432 } |
| 1589 | 1433 |
| 1590 /// <summary>Field number for the "name" field.</summary> | 1434 /// <summary>Field number for the "name" field.</summary> |
| 1591 public const int NameFieldNumber = 1; | 1435 public const int NameFieldNumber = 1; |
| 1592 private string name_ = ""; | 1436 private string name_ = ""; |
| 1593 /// <summary> | 1437 /// <summary> |
| 1594 /// Message for testing the effects for of the json_name option | 1438 /// Message for testing the effects for of the json_name option |
| 1595 /// </summary> | 1439 /// </summary> |
| 1596 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 1597 public string Name { | 1440 public string Name { |
| 1598 get { return name_; } | 1441 get { return name_; } |
| 1599 set { | 1442 set { |
| 1600 name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); | 1443 name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); |
| 1601 } | 1444 } |
| 1602 } | 1445 } |
| 1603 | 1446 |
| 1604 /// <summary>Field number for the "description" field.</summary> | 1447 /// <summary>Field number for the "description" field.</summary> |
| 1605 public const int DescriptionFieldNumber = 2; | 1448 public const int DescriptionFieldNumber = 2; |
| 1606 private string description_ = ""; | 1449 private string description_ = ""; |
| 1607 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 1608 public string Description { | 1450 public string Description { |
| 1609 get { return description_; } | 1451 get { return description_; } |
| 1610 set { | 1452 set { |
| 1611 description_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); | 1453 description_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); |
| 1612 } | 1454 } |
| 1613 } | 1455 } |
| 1614 | 1456 |
| 1615 /// <summary>Field number for the "guid" field.</summary> | 1457 /// <summary>Field number for the "guid" field.</summary> |
| 1616 public const int GuidFieldNumber = 3; | 1458 public const int GuidFieldNumber = 3; |
| 1617 private string guid_ = ""; | 1459 private string guid_ = ""; |
| 1618 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 1619 public string Guid { | 1460 public string Guid { |
| 1620 get { return guid_; } | 1461 get { return guid_; } |
| 1621 set { | 1462 set { |
| 1622 guid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); | 1463 guid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); |
| 1623 } | 1464 } |
| 1624 } | 1465 } |
| 1625 | 1466 |
| 1626 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 1627 public override bool Equals(object other) { | 1467 public override bool Equals(object other) { |
| 1628 return Equals(other as TestJsonName); | 1468 return Equals(other as TestJsonName); |
| 1629 } | 1469 } |
| 1630 | 1470 |
| 1631 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 1632 public bool Equals(TestJsonName other) { | 1471 public bool Equals(TestJsonName other) { |
| 1633 if (ReferenceEquals(other, null)) { | 1472 if (ReferenceEquals(other, null)) { |
| 1634 return false; | 1473 return false; |
| 1635 } | 1474 } |
| 1636 if (ReferenceEquals(other, this)) { | 1475 if (ReferenceEquals(other, this)) { |
| 1637 return true; | 1476 return true; |
| 1638 } | 1477 } |
| 1639 if (Name != other.Name) return false; | 1478 if (Name != other.Name) return false; |
| 1640 if (Description != other.Description) return false; | 1479 if (Description != other.Description) return false; |
| 1641 if (Guid != other.Guid) return false; | 1480 if (Guid != other.Guid) return false; |
| 1642 return true; | 1481 return true; |
| 1643 } | 1482 } |
| 1644 | 1483 |
| 1645 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 1646 public override int GetHashCode() { | 1484 public override int GetHashCode() { |
| 1647 int hash = 1; | 1485 int hash = 1; |
| 1648 if (Name.Length != 0) hash ^= Name.GetHashCode(); | 1486 if (Name.Length != 0) hash ^= Name.GetHashCode(); |
| 1649 if (Description.Length != 0) hash ^= Description.GetHashCode(); | 1487 if (Description.Length != 0) hash ^= Description.GetHashCode(); |
| 1650 if (Guid.Length != 0) hash ^= Guid.GetHashCode(); | 1488 if (Guid.Length != 0) hash ^= Guid.GetHashCode(); |
| 1651 return hash; | 1489 return hash; |
| 1652 } | 1490 } |
| 1653 | 1491 |
| 1654 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 1655 public override string ToString() { | 1492 public override string ToString() { |
| 1656 return pb::JsonFormatter.ToDiagnosticString(this); | 1493 return pb::JsonFormatter.ToDiagnosticString(this); |
| 1657 } | 1494 } |
| 1658 | 1495 |
| 1659 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 1660 public void WriteTo(pb::CodedOutputStream output) { | 1496 public void WriteTo(pb::CodedOutputStream output) { |
| 1661 if (Name.Length != 0) { | 1497 if (Name.Length != 0) { |
| 1662 output.WriteRawTag(10); | 1498 output.WriteRawTag(10); |
| 1663 output.WriteString(Name); | 1499 output.WriteString(Name); |
| 1664 } | 1500 } |
| 1665 if (Description.Length != 0) { | 1501 if (Description.Length != 0) { |
| 1666 output.WriteRawTag(18); | 1502 output.WriteRawTag(18); |
| 1667 output.WriteString(Description); | 1503 output.WriteString(Description); |
| 1668 } | 1504 } |
| 1669 if (Guid.Length != 0) { | 1505 if (Guid.Length != 0) { |
| 1670 output.WriteRawTag(26); | 1506 output.WriteRawTag(26); |
| 1671 output.WriteString(Guid); | 1507 output.WriteString(Guid); |
| 1672 } | 1508 } |
| 1673 } | 1509 } |
| 1674 | 1510 |
| 1675 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 1676 public int CalculateSize() { | 1511 public int CalculateSize() { |
| 1677 int size = 0; | 1512 int size = 0; |
| 1678 if (Name.Length != 0) { | 1513 if (Name.Length != 0) { |
| 1679 size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); | 1514 size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); |
| 1680 } | 1515 } |
| 1681 if (Description.Length != 0) { | 1516 if (Description.Length != 0) { |
| 1682 size += 1 + pb::CodedOutputStream.ComputeStringSize(Description); | 1517 size += 1 + pb::CodedOutputStream.ComputeStringSize(Description); |
| 1683 } | 1518 } |
| 1684 if (Guid.Length != 0) { | 1519 if (Guid.Length != 0) { |
| 1685 size += 1 + pb::CodedOutputStream.ComputeStringSize(Guid); | 1520 size += 1 + pb::CodedOutputStream.ComputeStringSize(Guid); |
| 1686 } | 1521 } |
| 1687 return size; | 1522 return size; |
| 1688 } | 1523 } |
| 1689 | 1524 |
| 1690 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 1691 public void MergeFrom(TestJsonName other) { | 1525 public void MergeFrom(TestJsonName other) { |
| 1692 if (other == null) { | 1526 if (other == null) { |
| 1693 return; | 1527 return; |
| 1694 } | 1528 } |
| 1695 if (other.Name.Length != 0) { | 1529 if (other.Name.Length != 0) { |
| 1696 Name = other.Name; | 1530 Name = other.Name; |
| 1697 } | 1531 } |
| 1698 if (other.Description.Length != 0) { | 1532 if (other.Description.Length != 0) { |
| 1699 Description = other.Description; | 1533 Description = other.Description; |
| 1700 } | 1534 } |
| 1701 if (other.Guid.Length != 0) { | 1535 if (other.Guid.Length != 0) { |
| 1702 Guid = other.Guid; | 1536 Guid = other.Guid; |
| 1703 } | 1537 } |
| 1704 } | 1538 } |
| 1705 | 1539 |
| 1706 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |
| 1707 public void MergeFrom(pb::CodedInputStream input) { | 1540 public void MergeFrom(pb::CodedInputStream input) { |
| 1708 uint tag; | 1541 uint tag; |
| 1709 while ((tag = input.ReadTag()) != 0) { | 1542 while ((tag = input.ReadTag()) != 0) { |
| 1710 switch(tag) { | 1543 switch(tag) { |
| 1711 default: | 1544 default: |
| 1712 input.SkipLastField(); | 1545 input.SkipLastField(); |
| 1713 break; | 1546 break; |
| 1714 case 10: { | 1547 case 10: { |
| 1715 Name = input.ReadString(); | 1548 Name = input.ReadString(); |
| 1716 break; | 1549 break; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 1727 } | 1560 } |
| 1728 } | 1561 } |
| 1729 | 1562 |
| 1730 } | 1563 } |
| 1731 | 1564 |
| 1732 #endregion | 1565 #endregion |
| 1733 | 1566 |
| 1734 } | 1567 } |
| 1735 | 1568 |
| 1736 #endregion Designer generated code | 1569 #endregion Designer generated code |
| OLD | NEW |