Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(229)

Side by Side Diff: third_party/protobuf/csharp/src/AddressBook/Addressbook.cs

Issue 1983203003: Update third_party/protobuf to protobuf-v3.0.0-beta-3 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: owners Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Generated by the protocol buffer compiler. DO NOT EDIT! 1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: addressbook.proto 2 // source: addressbook.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 Google.Protobuf.Examples.AddressBook { 10 namespace Google.Protobuf.Examples.AddressBook {
(...skipping 16 matching lines...) Expand all
27 "YW1lGAEgASgJEgoKAmlkGAIgASgFEg0KBWVtYWlsGAMgASgJEiwKBnBob25l", 27 "YW1lGAEgASgJEgoKAmlkGAIgASgFEg0KBWVtYWlsGAMgASgJEiwKBnBob25l",
28 "cxgEIAMoCzIcLnR1dG9yaWFsLlBlcnNvbi5QaG9uZU51bWJlchpHCgtQaG9u", 28 "cxgEIAMoCzIcLnR1dG9yaWFsLlBlcnNvbi5QaG9uZU51bWJlchpHCgtQaG9u",
29 "ZU51bWJlchIOCgZudW1iZXIYASABKAkSKAoEdHlwZRgCIAEoDjIaLnR1dG9y", 29 "ZU51bWJlchIOCgZudW1iZXIYASABKAkSKAoEdHlwZRgCIAEoDjIaLnR1dG9y",
30 "aWFsLlBlcnNvbi5QaG9uZVR5cGUiKwoJUGhvbmVUeXBlEgoKBk1PQklMRRAA", 30 "aWFsLlBlcnNvbi5QaG9uZVR5cGUiKwoJUGhvbmVUeXBlEgoKBk1PQklMRRAA",
31 "EggKBEhPTUUQARIICgRXT1JLEAIiLwoLQWRkcmVzc0Jvb2sSIAoGcGVvcGxl", 31 "EggKBEhPTUUQARIICgRXT1JLEAIiLwoLQWRkcmVzc0Jvb2sSIAoGcGVvcGxl",
32 "GAEgAygLMhAudHV0b3JpYWwuUGVyc29uQlAKFGNvbS5leGFtcGxlLnR1dG9y", 32 "GAEgAygLMhAudHV0b3JpYWwuUGVyc29uQlAKFGNvbS5leGFtcGxlLnR1dG9y",
33 "aWFsQhFBZGRyZXNzQm9va1Byb3Rvc6oCJEdvb2dsZS5Qcm90b2J1Zi5FeGFt", 33 "aWFsQhFBZGRyZXNzQm9va1Byb3Rvc6oCJEdvb2dsZS5Qcm90b2J1Zi5FeGFt",
34 "cGxlcy5BZGRyZXNzQm9va2IGcHJvdG8z")); 34 "cGxlcy5BZGRyZXNzQm9va2IGcHJvdG8z"));
35 descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, 35 descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
36 new pbr::FileDescriptor[] { }, 36 new pbr::FileDescriptor[] { },
37 new pbr::GeneratedCodeInfo(null, new pbr::GeneratedCodeInfo[] { 37 new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
38 new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.Examples.A ddressBook.Person), global::Google.Protobuf.Examples.AddressBook.Person.Parser, new[]{ "Name", "Id", "Email", "Phones" }, null, new[]{ typeof(global::Google.Pro tobuf.Examples.AddressBook.Person.Types.PhoneType) }, new pbr::GeneratedCodeInfo [] { new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.Examples.AddressB ook.Person.Types.PhoneNumber), global::Google.Protobuf.Examples.AddressBook.Pers on.Types.PhoneNumber.Parser, new[]{ "Number", "Type" }, null, null, null)}), 38 new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Example s.AddressBook.Person), global::Google.Protobuf.Examples.AddressBook.Person.Parse r, new[]{ "Name", "Id", "Email", "Phones" }, null, new[]{ typeof(global::Google. Protobuf.Examples.AddressBook.Person.Types.PhoneType) }, new pbr::GeneratedClrTy peInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Examples .AddressBook.Person.Types.PhoneNumber), global::Google.Protobuf.Examples.Address Book.Person.Types.PhoneNumber.Parser, new[]{ "Number", "Type" }, null, null, nul l)}),
39 new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.Examples.A ddressBook.AddressBook), global::Google.Protobuf.Examples.AddressBook.AddressBoo k.Parser, new[]{ "People" }, null, null, null) 39 new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Example s.AddressBook.AddressBook), global::Google.Protobuf.Examples.AddressBook.Address Book.Parser, new[]{ "People" }, null, null, null)
40 })); 40 }));
41 } 41 }
42 #endregion 42 #endregion
43 43
44 } 44 }
45 #region Messages 45 #region Messages
46 /// <summary> 46 /// <summary>
47 /// [START messages] 47 /// [START messages]
48 /// </summary> 48 /// </summary>
49 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 49 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
(...skipping 25 matching lines...) Expand all
75 public Person Clone() { 75 public Person Clone() {
76 return new Person(this); 76 return new Person(this);
77 } 77 }
78 78
79 /// <summary>Field number for the "name" field.</summary> 79 /// <summary>Field number for the "name" field.</summary>
80 public const int NameFieldNumber = 1; 80 public const int NameFieldNumber = 1;
81 private string name_ = ""; 81 private string name_ = "";
82 public string Name { 82 public string Name {
83 get { return name_; } 83 get { return name_; }
84 set { 84 set {
85 name_ = pb::Preconditions.CheckNotNull(value, "value"); 85 name_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
86 } 86 }
87 } 87 }
88 88
89 /// <summary>Field number for the "id" field.</summary> 89 /// <summary>Field number for the "id" field.</summary>
90 public const int IdFieldNumber = 2; 90 public const int IdFieldNumber = 2;
91 private int id_; 91 private int id_;
92 /// <summary> 92 /// <summary>
93 /// Unique ID number for this person. 93 /// Unique ID number for this person.
94 /// </summary> 94 /// </summary>
95 public int Id { 95 public int Id {
96 get { return id_; } 96 get { return id_; }
97 set { 97 set {
98 id_ = value; 98 id_ = value;
99 } 99 }
100 } 100 }
101 101
102 /// <summary>Field number for the "email" field.</summary> 102 /// <summary>Field number for the "email" field.</summary>
103 public const int EmailFieldNumber = 3; 103 public const int EmailFieldNumber = 3;
104 private string email_ = ""; 104 private string email_ = "";
105 public string Email { 105 public string Email {
106 get { return email_; } 106 get { return email_; }
107 set { 107 set {
108 email_ = pb::Preconditions.CheckNotNull(value, "value"); 108 email_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
109 } 109 }
110 } 110 }
111 111
112 /// <summary>Field number for the "phones" field.</summary> 112 /// <summary>Field number for the "phones" field.</summary>
113 public const int PhonesFieldNumber = 4; 113 public const int PhonesFieldNumber = 4;
114 private static readonly pb::FieldCodec<global::Google.Protobuf.Examples.Addr essBook.Person.Types.PhoneNumber> _repeated_phones_codec 114 private static readonly pb::FieldCodec<global::Google.Protobuf.Examples.Addr essBook.Person.Types.PhoneNumber> _repeated_phones_codec
115 = pb::FieldCodec.ForMessage(34, global::Google.Protobuf.Examples.Address Book.Person.Types.PhoneNumber.Parser); 115 = pb::FieldCodec.ForMessage(34, global::Google.Protobuf.Examples.Address Book.Person.Types.PhoneNumber.Parser);
116 private readonly pbc::RepeatedField<global::Google.Protobuf.Examples.Address Book.Person.Types.PhoneNumber> phones_ = new pbc::RepeatedField<global::Google.P rotobuf.Examples.AddressBook.Person.Types.PhoneNumber>(); 116 private readonly pbc::RepeatedField<global::Google.Protobuf.Examples.Address Book.Person.Types.PhoneNumber> phones_ = new pbc::RepeatedField<global::Google.P rotobuf.Examples.AddressBook.Person.Types.PhoneNumber>();
117 public pbc::RepeatedField<global::Google.Protobuf.Examples.AddressBook.Perso n.Types.PhoneNumber> Phones { 117 public pbc::RepeatedField<global::Google.Protobuf.Examples.AddressBook.Perso n.Types.PhoneNumber> Phones {
118 get { return phones_; } 118 get { return phones_; }
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 } 221 }
222 } 222 }
223 } 223 }
224 } 224 }
225 225
226 #region Nested types 226 #region Nested types
227 /// <summary>Container for nested types declared in the Person message type. </summary> 227 /// <summary>Container for nested types declared in the Person message type. </summary>
228 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 228 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
229 public static partial class Types { 229 public static partial class Types {
230 public enum PhoneType { 230 public enum PhoneType {
231 MOBILE = 0, 231 [pbr::OriginalName("MOBILE")] Mobile = 0,
232 HOME = 1, 232 [pbr::OriginalName("HOME")] Home = 1,
233 WORK = 2, 233 [pbr::OriginalName("WORK")] Work = 2,
234 } 234 }
235 235
236 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 236 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
237 public sealed partial class PhoneNumber : pb::IMessage<PhoneNumber> { 237 public sealed partial class PhoneNumber : pb::IMessage<PhoneNumber> {
238 private static readonly pb::MessageParser<PhoneNumber> _parser = new pb: :MessageParser<PhoneNumber>(() => new PhoneNumber()); 238 private static readonly pb::MessageParser<PhoneNumber> _parser = new pb: :MessageParser<PhoneNumber>(() => new PhoneNumber());
239 public static pb::MessageParser<PhoneNumber> Parser { get { return _pars er; } } 239 public static pb::MessageParser<PhoneNumber> Parser { get { return _pars er; } }
240 240
241 public static pbr::MessageDescriptor Descriptor { 241 public static pbr::MessageDescriptor Descriptor {
242 get { return global::Google.Protobuf.Examples.AddressBook.Person.Descr iptor.NestedTypes[0]; } 242 get { return global::Google.Protobuf.Examples.AddressBook.Person.Descr iptor.NestedTypes[0]; }
243 } 243 }
(...skipping 16 matching lines...) Expand all
260 public PhoneNumber Clone() { 260 public PhoneNumber Clone() {
261 return new PhoneNumber(this); 261 return new PhoneNumber(this);
262 } 262 }
263 263
264 /// <summary>Field number for the "number" field.</summary> 264 /// <summary>Field number for the "number" field.</summary>
265 public const int NumberFieldNumber = 1; 265 public const int NumberFieldNumber = 1;
266 private string number_ = ""; 266 private string number_ = "";
267 public string Number { 267 public string Number {
268 get { return number_; } 268 get { return number_; }
269 set { 269 set {
270 number_ = pb::Preconditions.CheckNotNull(value, "value"); 270 number_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
271 } 271 }
272 } 272 }
273 273
274 /// <summary>Field number for the "type" field.</summary> 274 /// <summary>Field number for the "type" field.</summary>
275 public const int TypeFieldNumber = 2; 275 public const int TypeFieldNumber = 2;
276 private global::Google.Protobuf.Examples.AddressBook.Person.Types.PhoneT ype type_ = global::Google.Protobuf.Examples.AddressBook.Person.Types.PhoneType. MOBILE; 276 private global::Google.Protobuf.Examples.AddressBook.Person.Types.PhoneT ype type_ = 0;
277 public global::Google.Protobuf.Examples.AddressBook.Person.Types.PhoneTy pe Type { 277 public global::Google.Protobuf.Examples.AddressBook.Person.Types.PhoneTy pe Type {
278 get { return type_; } 278 get { return type_; }
279 set { 279 set {
280 type_ = value; 280 type_ = value;
281 } 281 }
282 } 282 }
283 283
284 public override bool Equals(object other) { 284 public override bool Equals(object other) {
285 return Equals(other as PhoneNumber); 285 return Equals(other as PhoneNumber);
286 } 286 }
287 287
288 public bool Equals(PhoneNumber other) { 288 public bool Equals(PhoneNumber other) {
289 if (ReferenceEquals(other, null)) { 289 if (ReferenceEquals(other, null)) {
290 return false; 290 return false;
291 } 291 }
292 if (ReferenceEquals(other, this)) { 292 if (ReferenceEquals(other, this)) {
293 return true; 293 return true;
294 } 294 }
295 if (Number != other.Number) return false; 295 if (Number != other.Number) return false;
296 if (Type != other.Type) return false; 296 if (Type != other.Type) return false;
297 return true; 297 return true;
298 } 298 }
299 299
300 public override int GetHashCode() { 300 public override int GetHashCode() {
301 int hash = 1; 301 int hash = 1;
302 if (Number.Length != 0) hash ^= Number.GetHashCode(); 302 if (Number.Length != 0) hash ^= Number.GetHashCode();
303 if (Type != global::Google.Protobuf.Examples.AddressBook.Person.Types. PhoneType.MOBILE) hash ^= Type.GetHashCode(); 303 if (Type != 0) hash ^= Type.GetHashCode();
304 return hash; 304 return hash;
305 } 305 }
306 306
307 public override string ToString() { 307 public override string ToString() {
308 return pb::JsonFormatter.ToDiagnosticString(this); 308 return pb::JsonFormatter.ToDiagnosticString(this);
309 } 309 }
310 310
311 public void WriteTo(pb::CodedOutputStream output) { 311 public void WriteTo(pb::CodedOutputStream output) {
312 if (Number.Length != 0) { 312 if (Number.Length != 0) {
313 output.WriteRawTag(10); 313 output.WriteRawTag(10);
314 output.WriteString(Number); 314 output.WriteString(Number);
315 } 315 }
316 if (Type != global::Google.Protobuf.Examples.AddressBook.Person.Types. PhoneType.MOBILE) { 316 if (Type != 0) {
317 output.WriteRawTag(16); 317 output.WriteRawTag(16);
318 output.WriteEnum((int) Type); 318 output.WriteEnum((int) Type);
319 } 319 }
320 } 320 }
321 321
322 public int CalculateSize() { 322 public int CalculateSize() {
323 int size = 0; 323 int size = 0;
324 if (Number.Length != 0) { 324 if (Number.Length != 0) {
325 size += 1 + pb::CodedOutputStream.ComputeStringSize(Number); 325 size += 1 + pb::CodedOutputStream.ComputeStringSize(Number);
326 } 326 }
327 if (Type != global::Google.Protobuf.Examples.AddressBook.Person.Types. PhoneType.MOBILE) { 327 if (Type != 0) {
328 size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Type); 328 size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Type);
329 } 329 }
330 return size; 330 return size;
331 } 331 }
332 332
333 public void MergeFrom(PhoneNumber other) { 333 public void MergeFrom(PhoneNumber other) {
334 if (other == null) { 334 if (other == null) {
335 return; 335 return;
336 } 336 }
337 if (other.Number.Length != 0) { 337 if (other.Number.Length != 0) {
338 Number = other.Number; 338 Number = other.Number;
339 } 339 }
340 if (other.Type != global::Google.Protobuf.Examples.AddressBook.Person. Types.PhoneType.MOBILE) { 340 if (other.Type != 0) {
341 Type = other.Type; 341 Type = other.Type;
342 } 342 }
343 } 343 }
344 344
345 public void MergeFrom(pb::CodedInputStream input) { 345 public void MergeFrom(pb::CodedInputStream input) {
346 uint tag; 346 uint tag;
347 while ((tag = input.ReadTag()) != 0) { 347 while ((tag = input.ReadTag()) != 0) {
348 switch(tag) { 348 switch(tag) {
349 default: 349 default:
350 input.SkipLastField(); 350 input.SkipLastField();
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 } 464 }
465 } 465 }
466 466
467 } 467 }
468 468
469 #endregion 469 #endregion
470 470
471 } 471 }
472 472
473 #endregion Designer generated code 473 #endregion Designer generated code
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698