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

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

Issue 2495533002: third_party/protobuf: Update to HEAD (83d681ee2c) (Closed)
Patch Set: Make chrome settings proto generated file a component Created 4 years 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 {
11 11
12 /// <summary>Holder for reflection information generated from addressbook.prot o</summary> 12 /// <summary>Holder for reflection information generated from addressbook.prot o</summary>
13 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
14 public static partial class AddressbookReflection { 13 public static partial class AddressbookReflection {
15 14
16 #region Descriptor 15 #region Descriptor
17 /// <summary>File descriptor for addressbook.proto</summary> 16 /// <summary>File descriptor for addressbook.proto</summary>
18 public static pbr::FileDescriptor Descriptor { 17 public static pbr::FileDescriptor Descriptor {
19 get { return descriptor; } 18 get { return descriptor; }
20 } 19 }
21 private static pbr::FileDescriptor descriptor; 20 private static pbr::FileDescriptor descriptor;
22 21
23 static AddressbookReflection() { 22 static AddressbookReflection() {
(...skipping 13 matching lines...) Expand all
37 new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { 36 new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
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)}), 37 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::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Example s.AddressBook.AddressBook), global::Google.Protobuf.Examples.AddressBook.Address Book.Parser, new[]{ "People" }, null, null, null) 38 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 })); 39 }));
41 } 40 }
42 #endregion 41 #endregion
43 42
44 } 43 }
45 #region Messages 44 #region Messages
46 /// <summary> 45 /// <summary>
47 /// [START messages] 46 /// [START messages]
48 /// </summary> 47 /// </summary>
49 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
50 public sealed partial class Person : pb::IMessage<Person> { 48 public sealed partial class Person : pb::IMessage<Person> {
51 private static readonly pb::MessageParser<Person> _parser = new pb::MessageP arser<Person>(() => new Person()); 49 private static readonly pb::MessageParser<Person> _parser = new pb::MessageP arser<Person>(() => new Person());
50 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
52 public static pb::MessageParser<Person> Parser { get { return _parser; } } 51 public static pb::MessageParser<Person> Parser { get { return _parser; } }
53 52
53 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
54 public static pbr::MessageDescriptor Descriptor { 54 public static pbr::MessageDescriptor Descriptor {
55 get { return global::Google.Protobuf.Examples.AddressBook.AddressbookRefle ction.Descriptor.MessageTypes[0]; } 55 get { return global::Google.Protobuf.Examples.AddressBook.AddressbookRefle ction.Descriptor.MessageTypes[0]; }
56 } 56 }
57 57
58 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
58 pbr::MessageDescriptor pb::IMessage.Descriptor { 59 pbr::MessageDescriptor pb::IMessage.Descriptor {
59 get { return Descriptor; } 60 get { return Descriptor; }
60 } 61 }
61 62
63 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
62 public Person() { 64 public Person() {
63 OnConstruction(); 65 OnConstruction();
64 } 66 }
65 67
66 partial void OnConstruction(); 68 partial void OnConstruction();
67 69
70 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
68 public Person(Person other) : this() { 71 public Person(Person other) : this() {
69 name_ = other.name_; 72 name_ = other.name_;
70 id_ = other.id_; 73 id_ = other.id_;
71 email_ = other.email_; 74 email_ = other.email_;
72 phones_ = other.phones_.Clone(); 75 phones_ = other.phones_.Clone();
73 } 76 }
74 77
78 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
75 public Person Clone() { 79 public Person Clone() {
76 return new Person(this); 80 return new Person(this);
77 } 81 }
78 82
79 /// <summary>Field number for the "name" field.</summary> 83 /// <summary>Field number for the "name" field.</summary>
80 public const int NameFieldNumber = 1; 84 public const int NameFieldNumber = 1;
81 private string name_ = ""; 85 private string name_ = "";
86 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
82 public string Name { 87 public string Name {
83 get { return name_; } 88 get { return name_; }
84 set { 89 set {
85 name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); 90 name_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
86 } 91 }
87 } 92 }
88 93
89 /// <summary>Field number for the "id" field.</summary> 94 /// <summary>Field number for the "id" field.</summary>
90 public const int IdFieldNumber = 2; 95 public const int IdFieldNumber = 2;
91 private int id_; 96 private int id_;
92 /// <summary> 97 /// <summary>
93 /// Unique ID number for this person. 98 /// Unique ID number for this person.
94 /// </summary> 99 /// </summary>
100 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
95 public int Id { 101 public int Id {
96 get { return id_; } 102 get { return id_; }
97 set { 103 set {
98 id_ = value; 104 id_ = value;
99 } 105 }
100 } 106 }
101 107
102 /// <summary>Field number for the "email" field.</summary> 108 /// <summary>Field number for the "email" field.</summary>
103 public const int EmailFieldNumber = 3; 109 public const int EmailFieldNumber = 3;
104 private string email_ = ""; 110 private string email_ = "";
111 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
105 public string Email { 112 public string Email {
106 get { return email_; } 113 get { return email_; }
107 set { 114 set {
108 email_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); 115 email_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
109 } 116 }
110 } 117 }
111 118
112 /// <summary>Field number for the "phones" field.</summary> 119 /// <summary>Field number for the "phones" field.</summary>
113 public const int PhonesFieldNumber = 4; 120 public const int PhonesFieldNumber = 4;
114 private static readonly pb::FieldCodec<global::Google.Protobuf.Examples.Addr essBook.Person.Types.PhoneNumber> _repeated_phones_codec 121 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); 122 = 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>(); 123 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>();
124 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
117 public pbc::RepeatedField<global::Google.Protobuf.Examples.AddressBook.Perso n.Types.PhoneNumber> Phones { 125 public pbc::RepeatedField<global::Google.Protobuf.Examples.AddressBook.Perso n.Types.PhoneNumber> Phones {
118 get { return phones_; } 126 get { return phones_; }
119 } 127 }
120 128
129 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
121 public override bool Equals(object other) { 130 public override bool Equals(object other) {
122 return Equals(other as Person); 131 return Equals(other as Person);
123 } 132 }
124 133
134 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
125 public bool Equals(Person other) { 135 public bool Equals(Person other) {
126 if (ReferenceEquals(other, null)) { 136 if (ReferenceEquals(other, null)) {
127 return false; 137 return false;
128 } 138 }
129 if (ReferenceEquals(other, this)) { 139 if (ReferenceEquals(other, this)) {
130 return true; 140 return true;
131 } 141 }
132 if (Name != other.Name) return false; 142 if (Name != other.Name) return false;
133 if (Id != other.Id) return false; 143 if (Id != other.Id) return false;
134 if (Email != other.Email) return false; 144 if (Email != other.Email) return false;
135 if(!phones_.Equals(other.phones_)) return false; 145 if(!phones_.Equals(other.phones_)) return false;
136 return true; 146 return true;
137 } 147 }
138 148
149 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
139 public override int GetHashCode() { 150 public override int GetHashCode() {
140 int hash = 1; 151 int hash = 1;
141 if (Name.Length != 0) hash ^= Name.GetHashCode(); 152 if (Name.Length != 0) hash ^= Name.GetHashCode();
142 if (Id != 0) hash ^= Id.GetHashCode(); 153 if (Id != 0) hash ^= Id.GetHashCode();
143 if (Email.Length != 0) hash ^= Email.GetHashCode(); 154 if (Email.Length != 0) hash ^= Email.GetHashCode();
144 hash ^= phones_.GetHashCode(); 155 hash ^= phones_.GetHashCode();
145 return hash; 156 return hash;
146 } 157 }
147 158
159 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
148 public override string ToString() { 160 public override string ToString() {
149 return pb::JsonFormatter.ToDiagnosticString(this); 161 return pb::JsonFormatter.ToDiagnosticString(this);
150 } 162 }
151 163
164 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
152 public void WriteTo(pb::CodedOutputStream output) { 165 public void WriteTo(pb::CodedOutputStream output) {
153 if (Name.Length != 0) { 166 if (Name.Length != 0) {
154 output.WriteRawTag(10); 167 output.WriteRawTag(10);
155 output.WriteString(Name); 168 output.WriteString(Name);
156 } 169 }
157 if (Id != 0) { 170 if (Id != 0) {
158 output.WriteRawTag(16); 171 output.WriteRawTag(16);
159 output.WriteInt32(Id); 172 output.WriteInt32(Id);
160 } 173 }
161 if (Email.Length != 0) { 174 if (Email.Length != 0) {
162 output.WriteRawTag(26); 175 output.WriteRawTag(26);
163 output.WriteString(Email); 176 output.WriteString(Email);
164 } 177 }
165 phones_.WriteTo(output, _repeated_phones_codec); 178 phones_.WriteTo(output, _repeated_phones_codec);
166 } 179 }
167 180
181 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
168 public int CalculateSize() { 182 public int CalculateSize() {
169 int size = 0; 183 int size = 0;
170 if (Name.Length != 0) { 184 if (Name.Length != 0) {
171 size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); 185 size += 1 + pb::CodedOutputStream.ComputeStringSize(Name);
172 } 186 }
173 if (Id != 0) { 187 if (Id != 0) {
174 size += 1 + pb::CodedOutputStream.ComputeInt32Size(Id); 188 size += 1 + pb::CodedOutputStream.ComputeInt32Size(Id);
175 } 189 }
176 if (Email.Length != 0) { 190 if (Email.Length != 0) {
177 size += 1 + pb::CodedOutputStream.ComputeStringSize(Email); 191 size += 1 + pb::CodedOutputStream.ComputeStringSize(Email);
178 } 192 }
179 size += phones_.CalculateSize(_repeated_phones_codec); 193 size += phones_.CalculateSize(_repeated_phones_codec);
180 return size; 194 return size;
181 } 195 }
182 196
197 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
183 public void MergeFrom(Person other) { 198 public void MergeFrom(Person other) {
184 if (other == null) { 199 if (other == null) {
185 return; 200 return;
186 } 201 }
187 if (other.Name.Length != 0) { 202 if (other.Name.Length != 0) {
188 Name = other.Name; 203 Name = other.Name;
189 } 204 }
190 if (other.Id != 0) { 205 if (other.Id != 0) {
191 Id = other.Id; 206 Id = other.Id;
192 } 207 }
193 if (other.Email.Length != 0) { 208 if (other.Email.Length != 0) {
194 Email = other.Email; 209 Email = other.Email;
195 } 210 }
196 phones_.Add(other.phones_); 211 phones_.Add(other.phones_);
197 } 212 }
198 213
214 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
199 public void MergeFrom(pb::CodedInputStream input) { 215 public void MergeFrom(pb::CodedInputStream input) {
200 uint tag; 216 uint tag;
201 while ((tag = input.ReadTag()) != 0) { 217 while ((tag = input.ReadTag()) != 0) {
202 switch(tag) { 218 switch(tag) {
203 default: 219 default:
204 input.SkipLastField(); 220 input.SkipLastField();
205 break; 221 break;
206 case 10: { 222 case 10: {
207 Name = input.ReadString(); 223 Name = input.ReadString();
208 break; 224 break;
209 } 225 }
210 case 16: { 226 case 16: {
211 Id = input.ReadInt32(); 227 Id = input.ReadInt32();
212 break; 228 break;
213 } 229 }
214 case 26: { 230 case 26: {
215 Email = input.ReadString(); 231 Email = input.ReadString();
216 break; 232 break;
217 } 233 }
218 case 34: { 234 case 34: {
219 phones_.AddEntriesFrom(input, _repeated_phones_codec); 235 phones_.AddEntriesFrom(input, _repeated_phones_codec);
220 break; 236 break;
221 } 237 }
222 } 238 }
223 } 239 }
224 } 240 }
225 241
226 #region Nested types 242 #region Nested types
227 /// <summary>Container for nested types declared in the Person message type. </summary> 243 /// <summary>Container for nested types declared in the Person message type. </summary>
228 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 244 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
229 public static partial class Types { 245 public static partial class Types {
230 public enum PhoneType { 246 public enum PhoneType {
231 [pbr::OriginalName("MOBILE")] Mobile = 0, 247 [pbr::OriginalName("MOBILE")] Mobile = 0,
232 [pbr::OriginalName("HOME")] Home = 1, 248 [pbr::OriginalName("HOME")] Home = 1,
233 [pbr::OriginalName("WORK")] Work = 2, 249 [pbr::OriginalName("WORK")] Work = 2,
234 } 250 }
235 251
236 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
237 public sealed partial class PhoneNumber : pb::IMessage<PhoneNumber> { 252 public sealed partial class PhoneNumber : pb::IMessage<PhoneNumber> {
238 private static readonly pb::MessageParser<PhoneNumber> _parser = new pb: :MessageParser<PhoneNumber>(() => new PhoneNumber()); 253 private static readonly pb::MessageParser<PhoneNumber> _parser = new pb: :MessageParser<PhoneNumber>(() => new PhoneNumber());
254 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
239 public static pb::MessageParser<PhoneNumber> Parser { get { return _pars er; } } 255 public static pb::MessageParser<PhoneNumber> Parser { get { return _pars er; } }
240 256
257 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
241 public static pbr::MessageDescriptor Descriptor { 258 public static pbr::MessageDescriptor Descriptor {
242 get { return global::Google.Protobuf.Examples.AddressBook.Person.Descr iptor.NestedTypes[0]; } 259 get { return global::Google.Protobuf.Examples.AddressBook.Person.Descr iptor.NestedTypes[0]; }
243 } 260 }
244 261
262 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
245 pbr::MessageDescriptor pb::IMessage.Descriptor { 263 pbr::MessageDescriptor pb::IMessage.Descriptor {
246 get { return Descriptor; } 264 get { return Descriptor; }
247 } 265 }
248 266
267 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
249 public PhoneNumber() { 268 public PhoneNumber() {
250 OnConstruction(); 269 OnConstruction();
251 } 270 }
252 271
253 partial void OnConstruction(); 272 partial void OnConstruction();
254 273
274 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
255 public PhoneNumber(PhoneNumber other) : this() { 275 public PhoneNumber(PhoneNumber other) : this() {
256 number_ = other.number_; 276 number_ = other.number_;
257 type_ = other.type_; 277 type_ = other.type_;
258 } 278 }
259 279
280 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
260 public PhoneNumber Clone() { 281 public PhoneNumber Clone() {
261 return new PhoneNumber(this); 282 return new PhoneNumber(this);
262 } 283 }
263 284
264 /// <summary>Field number for the "number" field.</summary> 285 /// <summary>Field number for the "number" field.</summary>
265 public const int NumberFieldNumber = 1; 286 public const int NumberFieldNumber = 1;
266 private string number_ = ""; 287 private string number_ = "";
288 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
267 public string Number { 289 public string Number {
268 get { return number_; } 290 get { return number_; }
269 set { 291 set {
270 number_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); 292 number_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
271 } 293 }
272 } 294 }
273 295
274 /// <summary>Field number for the "type" field.</summary> 296 /// <summary>Field number for the "type" field.</summary>
275 public const int TypeFieldNumber = 2; 297 public const int TypeFieldNumber = 2;
276 private global::Google.Protobuf.Examples.AddressBook.Person.Types.PhoneT ype type_ = 0; 298 private global::Google.Protobuf.Examples.AddressBook.Person.Types.PhoneT ype type_ = 0;
299 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
277 public global::Google.Protobuf.Examples.AddressBook.Person.Types.PhoneTy pe Type { 300 public global::Google.Protobuf.Examples.AddressBook.Person.Types.PhoneTy pe Type {
278 get { return type_; } 301 get { return type_; }
279 set { 302 set {
280 type_ = value; 303 type_ = value;
281 } 304 }
282 } 305 }
283 306
307 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
284 public override bool Equals(object other) { 308 public override bool Equals(object other) {
285 return Equals(other as PhoneNumber); 309 return Equals(other as PhoneNumber);
286 } 310 }
287 311
312 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
288 public bool Equals(PhoneNumber other) { 313 public bool Equals(PhoneNumber other) {
289 if (ReferenceEquals(other, null)) { 314 if (ReferenceEquals(other, null)) {
290 return false; 315 return false;
291 } 316 }
292 if (ReferenceEquals(other, this)) { 317 if (ReferenceEquals(other, this)) {
293 return true; 318 return true;
294 } 319 }
295 if (Number != other.Number) return false; 320 if (Number != other.Number) return false;
296 if (Type != other.Type) return false; 321 if (Type != other.Type) return false;
297 return true; 322 return true;
298 } 323 }
299 324
325 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
300 public override int GetHashCode() { 326 public override int GetHashCode() {
301 int hash = 1; 327 int hash = 1;
302 if (Number.Length != 0) hash ^= Number.GetHashCode(); 328 if (Number.Length != 0) hash ^= Number.GetHashCode();
303 if (Type != 0) hash ^= Type.GetHashCode(); 329 if (Type != 0) hash ^= Type.GetHashCode();
304 return hash; 330 return hash;
305 } 331 }
306 332
333 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
307 public override string ToString() { 334 public override string ToString() {
308 return pb::JsonFormatter.ToDiagnosticString(this); 335 return pb::JsonFormatter.ToDiagnosticString(this);
309 } 336 }
310 337
338 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
311 public void WriteTo(pb::CodedOutputStream output) { 339 public void WriteTo(pb::CodedOutputStream output) {
312 if (Number.Length != 0) { 340 if (Number.Length != 0) {
313 output.WriteRawTag(10); 341 output.WriteRawTag(10);
314 output.WriteString(Number); 342 output.WriteString(Number);
315 } 343 }
316 if (Type != 0) { 344 if (Type != 0) {
317 output.WriteRawTag(16); 345 output.WriteRawTag(16);
318 output.WriteEnum((int) Type); 346 output.WriteEnum((int) Type);
319 } 347 }
320 } 348 }
321 349
350 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
322 public int CalculateSize() { 351 public int CalculateSize() {
323 int size = 0; 352 int size = 0;
324 if (Number.Length != 0) { 353 if (Number.Length != 0) {
325 size += 1 + pb::CodedOutputStream.ComputeStringSize(Number); 354 size += 1 + pb::CodedOutputStream.ComputeStringSize(Number);
326 } 355 }
327 if (Type != 0) { 356 if (Type != 0) {
328 size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Type); 357 size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Type);
329 } 358 }
330 return size; 359 return size;
331 } 360 }
332 361
362 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
333 public void MergeFrom(PhoneNumber other) { 363 public void MergeFrom(PhoneNumber other) {
334 if (other == null) { 364 if (other == null) {
335 return; 365 return;
336 } 366 }
337 if (other.Number.Length != 0) { 367 if (other.Number.Length != 0) {
338 Number = other.Number; 368 Number = other.Number;
339 } 369 }
340 if (other.Type != 0) { 370 if (other.Type != 0) {
341 Type = other.Type; 371 Type = other.Type;
342 } 372 }
343 } 373 }
344 374
375 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
345 public void MergeFrom(pb::CodedInputStream input) { 376 public void MergeFrom(pb::CodedInputStream input) {
346 uint tag; 377 uint tag;
347 while ((tag = input.ReadTag()) != 0) { 378 while ((tag = input.ReadTag()) != 0) {
348 switch(tag) { 379 switch(tag) {
349 default: 380 default:
350 input.SkipLastField(); 381 input.SkipLastField();
351 break; 382 break;
352 case 10: { 383 case 10: {
353 Number = input.ReadString(); 384 Number = input.ReadString();
354 break; 385 break;
355 } 386 }
356 case 16: { 387 case 16: {
357 type_ = (global::Google.Protobuf.Examples.AddressBook.Person.Typ es.PhoneType) input.ReadEnum(); 388 type_ = (global::Google.Protobuf.Examples.AddressBook.Person.Typ es.PhoneType) input.ReadEnum();
358 break; 389 break;
359 } 390 }
360 } 391 }
361 } 392 }
362 } 393 }
363 394
364 } 395 }
365 396
366 } 397 }
367 #endregion 398 #endregion
368 399
369 } 400 }
370 401
371 /// <summary> 402 /// <summary>
372 /// Our address book file is just one of these. 403 /// Our address book file is just one of these.
373 /// </summary> 404 /// </summary>
374 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
375 public sealed partial class AddressBook : pb::IMessage<AddressBook> { 405 public sealed partial class AddressBook : pb::IMessage<AddressBook> {
376 private static readonly pb::MessageParser<AddressBook> _parser = new pb::Mes sageParser<AddressBook>(() => new AddressBook()); 406 private static readonly pb::MessageParser<AddressBook> _parser = new pb::Mes sageParser<AddressBook>(() => new AddressBook());
407 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
377 public static pb::MessageParser<AddressBook> Parser { get { return _parser; } } 408 public static pb::MessageParser<AddressBook> Parser { get { return _parser; } }
378 409
410 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
379 public static pbr::MessageDescriptor Descriptor { 411 public static pbr::MessageDescriptor Descriptor {
380 get { return global::Google.Protobuf.Examples.AddressBook.AddressbookRefle ction.Descriptor.MessageTypes[1]; } 412 get { return global::Google.Protobuf.Examples.AddressBook.AddressbookRefle ction.Descriptor.MessageTypes[1]; }
381 } 413 }
382 414
415 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
383 pbr::MessageDescriptor pb::IMessage.Descriptor { 416 pbr::MessageDescriptor pb::IMessage.Descriptor {
384 get { return Descriptor; } 417 get { return Descriptor; }
385 } 418 }
386 419
420 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
387 public AddressBook() { 421 public AddressBook() {
388 OnConstruction(); 422 OnConstruction();
389 } 423 }
390 424
391 partial void OnConstruction(); 425 partial void OnConstruction();
392 426
427 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
393 public AddressBook(AddressBook other) : this() { 428 public AddressBook(AddressBook other) : this() {
394 people_ = other.people_.Clone(); 429 people_ = other.people_.Clone();
395 } 430 }
396 431
432 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
397 public AddressBook Clone() { 433 public AddressBook Clone() {
398 return new AddressBook(this); 434 return new AddressBook(this);
399 } 435 }
400 436
401 /// <summary>Field number for the "people" field.</summary> 437 /// <summary>Field number for the "people" field.</summary>
402 public const int PeopleFieldNumber = 1; 438 public const int PeopleFieldNumber = 1;
403 private static readonly pb::FieldCodec<global::Google.Protobuf.Examples.Addr essBook.Person> _repeated_people_codec 439 private static readonly pb::FieldCodec<global::Google.Protobuf.Examples.Addr essBook.Person> _repeated_people_codec
404 = pb::FieldCodec.ForMessage(10, global::Google.Protobuf.Examples.Address Book.Person.Parser); 440 = pb::FieldCodec.ForMessage(10, global::Google.Protobuf.Examples.Address Book.Person.Parser);
405 private readonly pbc::RepeatedField<global::Google.Protobuf.Examples.Address Book.Person> people_ = new pbc::RepeatedField<global::Google.Protobuf.Examples.A ddressBook.Person>(); 441 private readonly pbc::RepeatedField<global::Google.Protobuf.Examples.Address Book.Person> people_ = new pbc::RepeatedField<global::Google.Protobuf.Examples.A ddressBook.Person>();
442 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
406 public pbc::RepeatedField<global::Google.Protobuf.Examples.AddressBook.Perso n> People { 443 public pbc::RepeatedField<global::Google.Protobuf.Examples.AddressBook.Perso n> People {
407 get { return people_; } 444 get { return people_; }
408 } 445 }
409 446
447 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
410 public override bool Equals(object other) { 448 public override bool Equals(object other) {
411 return Equals(other as AddressBook); 449 return Equals(other as AddressBook);
412 } 450 }
413 451
452 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
414 public bool Equals(AddressBook other) { 453 public bool Equals(AddressBook other) {
415 if (ReferenceEquals(other, null)) { 454 if (ReferenceEquals(other, null)) {
416 return false; 455 return false;
417 } 456 }
418 if (ReferenceEquals(other, this)) { 457 if (ReferenceEquals(other, this)) {
419 return true; 458 return true;
420 } 459 }
421 if(!people_.Equals(other.people_)) return false; 460 if(!people_.Equals(other.people_)) return false;
422 return true; 461 return true;
423 } 462 }
424 463
464 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
425 public override int GetHashCode() { 465 public override int GetHashCode() {
426 int hash = 1; 466 int hash = 1;
427 hash ^= people_.GetHashCode(); 467 hash ^= people_.GetHashCode();
428 return hash; 468 return hash;
429 } 469 }
430 470
471 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
431 public override string ToString() { 472 public override string ToString() {
432 return pb::JsonFormatter.ToDiagnosticString(this); 473 return pb::JsonFormatter.ToDiagnosticString(this);
433 } 474 }
434 475
476 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
435 public void WriteTo(pb::CodedOutputStream output) { 477 public void WriteTo(pb::CodedOutputStream output) {
436 people_.WriteTo(output, _repeated_people_codec); 478 people_.WriteTo(output, _repeated_people_codec);
437 } 479 }
438 480
481 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
439 public int CalculateSize() { 482 public int CalculateSize() {
440 int size = 0; 483 int size = 0;
441 size += people_.CalculateSize(_repeated_people_codec); 484 size += people_.CalculateSize(_repeated_people_codec);
442 return size; 485 return size;
443 } 486 }
444 487
488 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
445 public void MergeFrom(AddressBook other) { 489 public void MergeFrom(AddressBook other) {
446 if (other == null) { 490 if (other == null) {
447 return; 491 return;
448 } 492 }
449 people_.Add(other.people_); 493 people_.Add(other.people_);
450 } 494 }
451 495
496 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
452 public void MergeFrom(pb::CodedInputStream input) { 497 public void MergeFrom(pb::CodedInputStream input) {
453 uint tag; 498 uint tag;
454 while ((tag = input.ReadTag()) != 0) { 499 while ((tag = input.ReadTag()) != 0) {
455 switch(tag) { 500 switch(tag) {
456 default: 501 default:
457 input.SkipLastField(); 502 input.SkipLastField();
458 break; 503 break;
459 case 10: { 504 case 10: {
460 people_.AddEntriesFrom(input, _repeated_people_codec); 505 people_.AddEntriesFrom(input, _repeated_people_codec);
461 break; 506 break;
462 } 507 }
463 } 508 }
464 } 509 }
465 } 510 }
466 511
467 } 512 }
468 513
469 #endregion 514 #endregion
470 515
471 } 516 }
472 517
473 #endregion Designer generated code 518 #endregion Designer generated code
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698