Jon Skeet | 82bb0f1 | 2011-04-03 20:17:12 +0100 | [diff] [blame^] | 1 | // Generated by ProtoGen, Version=0.9.0.0, Culture=neutral, PublicKeyToken=8fd7408b07f8d2cd. DO NOT EDIT!
|
| 2 |
|
| 3 | using pb = global::Google.ProtocolBuffers;
|
| 4 | using pbc = global::Google.ProtocolBuffers.Collections;
|
| 5 | using pbd = global::Google.ProtocolBuffers.Descriptors;
|
| 6 | using scg = global::System.Collections.Generic;
|
| 7 | namespace Google.ProtocolBuffers.Examples.AddressBook {
|
| 8 |
|
| 9 | public static partial class AddressBookProtos {
|
| 10 |
|
| 11 | #region Extension registration
|
| 12 | public static void RegisterAllExtensions(pb::ExtensionRegistry registry) {
|
| 13 | }
|
| 14 | #endregion
|
| 15 | #region Static variables
|
| 16 | internal static pbd::MessageDescriptor internal__static_tutorial_Person__Descriptor;
|
| 17 | internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.Examples.AddressBook.Person, global::Google.ProtocolBuffers.Examples.AddressBook.Person.Builder> internal__static_tutorial_Person__FieldAccessorTable;
|
| 18 | internal static pbd::MessageDescriptor internal__static_tutorial_Person_PhoneNumber__Descriptor;
|
| 19 | internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.Examples.AddressBook.Person.Types.PhoneNumber, global::Google.ProtocolBuffers.Examples.AddressBook.Person.Types.PhoneNumber.Builder> internal__static_tutorial_Person_PhoneNumber__FieldAccessorTable;
|
| 20 | internal static pbd::MessageDescriptor internal__static_tutorial_AddressBook__Descriptor;
|
| 21 | internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.Examples.AddressBook.AddressBook, global::Google.ProtocolBuffers.Examples.AddressBook.AddressBook.Builder> internal__static_tutorial_AddressBook__FieldAccessorTable;
|
| 22 | #endregion
|
| 23 | #region Descriptor
|
| 24 | public static pbd::FileDescriptor Descriptor {
|
| 25 | get { return descriptor; }
|
| 26 | }
|
| 27 | private static pbd::FileDescriptor descriptor;
|
| 28 |
|
| 29 | static AddressBookProtos() {
|
| 30 | byte[] descriptorData = global::System.Convert.FromBase64String(
|
| 31 | "Chp0dXRvcmlhbC9hZGRyZXNzYm9vay5wcm90bxIIdHV0b3JpYWwaJGdvb2ds" +
|
| 32 | "ZS9wcm90b2J1Zi9jc2hhcnBfb3B0aW9ucy5wcm90byLaAQoGUGVyc29uEgwK" +
|
| 33 | "BG5hbWUYASACKAkSCgoCaWQYAiACKAUSDQoFZW1haWwYAyABKAkSKwoFcGhv" +
|
| 34 | "bmUYBCADKAsyHC50dXRvcmlhbC5QZXJzb24uUGhvbmVOdW1iZXIaTQoLUGhv" +
|
| 35 | "bmVOdW1iZXISDgoGbnVtYmVyGAEgAigJEi4KBHR5cGUYAiABKA4yGi50dXRv" +
|
| 36 | "cmlhbC5QZXJzb24uUGhvbmVUeXBlOgRIT01FIisKCVBob25lVHlwZRIKCgZN" +
|
| 37 | "T0JJTEUQABIICgRIT01FEAESCAoEV09SSxACIi8KC0FkZHJlc3NCb29rEiAK" +
|
| 38 | "BnBlcnNvbhgBIAMoCzIQLnR1dG9yaWFsLlBlcnNvbkJFSAHCPkAKK0dvb2ds" +
|
| 39 | "ZS5Qcm90b2NvbEJ1ZmZlcnMuRXhhbXBsZXMuQWRkcmVzc0Jvb2sSEUFkZHJl" +
|
| 40 | "c3NCb29rUHJvdG9z");
|
| 41 | pbd::FileDescriptor.InternalDescriptorAssigner assigner = delegate(pbd::FileDescriptor root) {
|
| 42 | descriptor = root;
|
| 43 | internal__static_tutorial_Person__Descriptor = Descriptor.MessageTypes[0];
|
| 44 | internal__static_tutorial_Person__FieldAccessorTable =
|
| 45 | new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.Examples.AddressBook.Person, global::Google.ProtocolBuffers.Examples.AddressBook.Person.Builder>(internal__static_tutorial_Person__Descriptor,
|
| 46 | new string[] { "Name", "Id", "Email", "Phone", });
|
| 47 | internal__static_tutorial_Person_PhoneNumber__Descriptor = internal__static_tutorial_Person__Descriptor.NestedTypes[0];
|
| 48 | internal__static_tutorial_Person_PhoneNumber__FieldAccessorTable =
|
| 49 | new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.Examples.AddressBook.Person.Types.PhoneNumber, global::Google.ProtocolBuffers.Examples.AddressBook.Person.Types.PhoneNumber.Builder>(internal__static_tutorial_Person_PhoneNumber__Descriptor,
|
| 50 | new string[] { "Number", "Type", });
|
| 51 | internal__static_tutorial_AddressBook__Descriptor = Descriptor.MessageTypes[1];
|
| 52 | internal__static_tutorial_AddressBook__FieldAccessorTable =
|
| 53 | new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.Examples.AddressBook.AddressBook, global::Google.ProtocolBuffers.Examples.AddressBook.AddressBook.Builder>(internal__static_tutorial_AddressBook__Descriptor,
|
| 54 | new string[] { "Person", });
|
| 55 | pb::ExtensionRegistry registry = pb::ExtensionRegistry.CreateInstance();
|
| 56 | RegisterAllExtensions(registry);
|
| 57 | global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.RegisterAllExtensions(registry);
|
| 58 | return registry;
|
| 59 | };
|
| 60 | pbd::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData,
|
| 61 | new pbd::FileDescriptor[] {
|
| 62 | global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.Descriptor,
|
| 63 | }, assigner);
|
| 64 | }
|
| 65 | #endregion
|
| 66 |
|
| 67 | }
|
| 68 | #region Messages
|
| 69 | public sealed partial class Person : pb::GeneratedMessage<Person, Person.Builder> {
|
| 70 | private static readonly Person defaultInstance = new Builder().BuildPartial();
|
| 71 | public static Person DefaultInstance {
|
| 72 | get { return defaultInstance; }
|
| 73 | }
|
| 74 |
|
| 75 | public override Person DefaultInstanceForType {
|
| 76 | get { return defaultInstance; }
|
| 77 | }
|
| 78 |
|
| 79 | protected override Person ThisMessage {
|
| 80 | get { return this; }
|
| 81 | }
|
| 82 |
|
| 83 | public static pbd::MessageDescriptor Descriptor {
|
| 84 | get { return global::Google.ProtocolBuffers.Examples.AddressBook.AddressBookProtos.internal__static_tutorial_Person__Descriptor; }
|
| 85 | }
|
| 86 |
|
| 87 | protected override pb::FieldAccess.FieldAccessorTable<Person, Person.Builder> InternalFieldAccessors {
|
| 88 | get { return global::Google.ProtocolBuffers.Examples.AddressBook.AddressBookProtos.internal__static_tutorial_Person__FieldAccessorTable; }
|
| 89 | }
|
| 90 |
|
| 91 | #region Nested types
|
| 92 | public static class Types {
|
| 93 | public enum PhoneType {
|
| 94 | MOBILE = 0,
|
| 95 | HOME = 1,
|
| 96 | WORK = 2,
|
| 97 | }
|
| 98 |
|
| 99 | public sealed partial class PhoneNumber : pb::GeneratedMessage<PhoneNumber, PhoneNumber.Builder> {
|
| 100 | private static readonly PhoneNumber defaultInstance = new Builder().BuildPartial();
|
| 101 | public static PhoneNumber DefaultInstance {
|
| 102 | get { return defaultInstance; }
|
| 103 | }
|
| 104 |
|
| 105 | public override PhoneNumber DefaultInstanceForType {
|
| 106 | get { return defaultInstance; }
|
| 107 | }
|
| 108 |
|
| 109 | protected override PhoneNumber ThisMessage {
|
| 110 | get { return this; }
|
| 111 | }
|
| 112 |
|
| 113 | public static pbd::MessageDescriptor Descriptor {
|
| 114 | get { return global::Google.ProtocolBuffers.Examples.AddressBook.AddressBookProtos.internal__static_tutorial_Person_PhoneNumber__Descriptor; }
|
| 115 | }
|
| 116 |
|
| 117 | protected override pb::FieldAccess.FieldAccessorTable<PhoneNumber, PhoneNumber.Builder> InternalFieldAccessors {
|
| 118 | get { return global::Google.ProtocolBuffers.Examples.AddressBook.AddressBookProtos.internal__static_tutorial_Person_PhoneNumber__FieldAccessorTable; }
|
| 119 | }
|
| 120 |
|
| 121 | public const int NumberFieldNumber = 1;
|
| 122 | private bool hasNumber;
|
| 123 | private string number_ = "";
|
| 124 | public bool HasNumber {
|
| 125 | get { return hasNumber; }
|
| 126 | }
|
| 127 | public string Number {
|
| 128 | get { return number_; }
|
| 129 | }
|
| 130 |
|
| 131 | public const int TypeFieldNumber = 2;
|
| 132 | private bool hasType;
|
| 133 | private global::Google.ProtocolBuffers.Examples.AddressBook.Person.Types.PhoneType type_ = global::Google.ProtocolBuffers.Examples.AddressBook.Person.Types.PhoneType.HOME;
|
| 134 | public bool HasType {
|
| 135 | get { return hasType; }
|
| 136 | }
|
| 137 | public global::Google.ProtocolBuffers.Examples.AddressBook.Person.Types.PhoneType Type {
|
| 138 | get { return type_; }
|
| 139 | }
|
| 140 |
|
| 141 | public override bool IsInitialized {
|
| 142 | get {
|
| 143 | if (!hasNumber) return false;
|
| 144 | return true;
|
| 145 | }
|
| 146 | }
|
| 147 |
|
| 148 | public override void WriteTo(pb::CodedOutputStream output) {
|
| 149 | int size = SerializedSize;
|
| 150 | if (HasNumber) {
|
| 151 | output.WriteString(1, Number);
|
| 152 | }
|
| 153 | if (HasType) {
|
| 154 | output.WriteEnum(2, (int) Type);
|
| 155 | }
|
| 156 | UnknownFields.WriteTo(output);
|
| 157 | }
|
| 158 |
|
| 159 | private int memoizedSerializedSize = -1;
|
| 160 | public override int SerializedSize {
|
| 161 | get {
|
| 162 | int size = memoizedSerializedSize;
|
| 163 | if (size != -1) return size;
|
| 164 |
|
| 165 | size = 0;
|
| 166 | if (HasNumber) {
|
| 167 | size += pb::CodedOutputStream.ComputeStringSize(1, Number);
|
| 168 | }
|
| 169 | if (HasType) {
|
| 170 | size += pb::CodedOutputStream.ComputeEnumSize(2, (int) Type);
|
| 171 | }
|
| 172 | size += UnknownFields.SerializedSize;
|
| 173 | memoizedSerializedSize = size;
|
| 174 | return size;
|
| 175 | }
|
| 176 | }
|
| 177 |
|
| 178 | public static PhoneNumber ParseFrom(pb::ByteString data) {
|
| 179 | return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
|
| 180 | }
|
| 181 | public static PhoneNumber ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
|
| 182 | return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
|
| 183 | }
|
| 184 | public static PhoneNumber ParseFrom(byte[] data) {
|
| 185 | return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
|
| 186 | }
|
| 187 | public static PhoneNumber ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
|
| 188 | return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
|
| 189 | }
|
| 190 | public static PhoneNumber ParseFrom(global::System.IO.Stream input) {
|
| 191 | return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
|
| 192 | }
|
| 193 | public static PhoneNumber ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
|
| 194 | return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
|
| 195 | }
|
| 196 | public static PhoneNumber ParseDelimitedFrom(global::System.IO.Stream input) {
|
| 197 | return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
|
| 198 | }
|
| 199 | public static PhoneNumber ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
|
| 200 | return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
|
| 201 | }
|
| 202 | public static PhoneNumber ParseFrom(pb::CodedInputStream input) {
|
| 203 | return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
|
| 204 | }
|
| 205 | public static PhoneNumber ParseFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
|
| 206 | return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
|
| 207 | }
|
| 208 | public static Builder CreateBuilder() { return new Builder(); }
|
| 209 | public override Builder ToBuilder() { return CreateBuilder(this); }
|
| 210 | public override Builder CreateBuilderForType() { return new Builder(); }
|
| 211 | public static Builder CreateBuilder(PhoneNumber prototype) {
|
| 212 | return (Builder) new Builder().MergeFrom(prototype);
|
| 213 | }
|
| 214 |
|
| 215 | public sealed partial class Builder : pb::GeneratedBuilder<PhoneNumber, Builder> {
|
| 216 | protected override Builder ThisBuilder {
|
| 217 | get { return this; }
|
| 218 | }
|
| 219 | public Builder() {}
|
| 220 |
|
| 221 | PhoneNumber result = new PhoneNumber();
|
| 222 |
|
| 223 | protected override PhoneNumber MessageBeingBuilt {
|
| 224 | get { return result; }
|
| 225 | }
|
| 226 |
|
| 227 | public override Builder Clear() {
|
| 228 | result = new PhoneNumber();
|
| 229 | return this;
|
| 230 | }
|
| 231 |
|
| 232 | public override Builder Clone() {
|
| 233 | return new Builder().MergeFrom(result);
|
| 234 | }
|
| 235 |
|
| 236 | public override pbd::MessageDescriptor DescriptorForType {
|
| 237 | get { return global::Google.ProtocolBuffers.Examples.AddressBook.Person.Types.PhoneNumber.Descriptor; }
|
| 238 | }
|
| 239 |
|
| 240 | public override PhoneNumber DefaultInstanceForType {
|
| 241 | get { return global::Google.ProtocolBuffers.Examples.AddressBook.Person.Types.PhoneNumber.DefaultInstance; }
|
| 242 | }
|
| 243 |
|
| 244 | public override PhoneNumber BuildPartial() {
|
| 245 | if (result == null) {
|
| 246 | throw new global::System.InvalidOperationException("build() has already been called on this Builder");
|
| 247 | }
|
| 248 | PhoneNumber returnMe = result;
|
| 249 | result = null;
|
| 250 | return returnMe;
|
| 251 | }
|
| 252 |
|
| 253 | public override Builder MergeFrom(pb::IMessage other) {
|
| 254 | if (other is PhoneNumber) {
|
| 255 | return MergeFrom((PhoneNumber) other);
|
| 256 | } else {
|
| 257 | base.MergeFrom(other);
|
| 258 | return this;
|
| 259 | }
|
| 260 | }
|
| 261 |
|
| 262 | public override Builder MergeFrom(PhoneNumber other) {
|
| 263 | if (other == global::Google.ProtocolBuffers.Examples.AddressBook.Person.Types.PhoneNumber.DefaultInstance) return this;
|
| 264 | if (other.HasNumber) {
|
| 265 | Number = other.Number;
|
| 266 | }
|
| 267 | if (other.HasType) {
|
| 268 | Type = other.Type;
|
| 269 | }
|
| 270 | this.MergeUnknownFields(other.UnknownFields);
|
| 271 | return this;
|
| 272 | }
|
| 273 |
|
| 274 | public override Builder MergeFrom(pb::CodedInputStream input) {
|
| 275 | return MergeFrom(input, pb::ExtensionRegistry.Empty);
|
| 276 | }
|
| 277 |
|
| 278 | public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
|
| 279 | pb::UnknownFieldSet.Builder unknownFields = null;
|
| 280 | while (true) {
|
| 281 | uint tag = input.ReadTag();
|
| 282 | switch (tag) {
|
| 283 | case 0: {
|
| 284 | if (unknownFields != null) {
|
| 285 | this.UnknownFields = unknownFields.Build();
|
| 286 | }
|
| 287 | return this;
|
| 288 | }
|
| 289 | default: {
|
| 290 | if (pb::WireFormat.IsEndGroupTag(tag)) {
|
| 291 | if (unknownFields != null) {
|
| 292 | this.UnknownFields = unknownFields.Build();
|
| 293 | }
|
| 294 | return this;
|
| 295 | }
|
| 296 | if (unknownFields == null) {
|
| 297 | unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
|
| 298 | }
|
| 299 | ParseUnknownField(input, unknownFields, extensionRegistry, tag);
|
| 300 | break;
|
| 301 | }
|
| 302 | case 10: {
|
| 303 | Number = input.ReadString();
|
| 304 | break;
|
| 305 | }
|
| 306 | case 16: {
|
| 307 | int rawValue = input.ReadEnum();
|
| 308 | if (!global::System.Enum.IsDefined(typeof(global::Google.ProtocolBuffers.Examples.AddressBook.Person.Types.PhoneType), rawValue)) {
|
| 309 | if (unknownFields == null) {
|
| 310 | unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
|
| 311 | }
|
| 312 | unknownFields.MergeVarintField(2, (ulong) rawValue);
|
| 313 | } else {
|
| 314 | Type = (global::Google.ProtocolBuffers.Examples.AddressBook.Person.Types.PhoneType) rawValue;
|
| 315 | }
|
| 316 | break;
|
| 317 | }
|
| 318 | }
|
| 319 | }
|
| 320 | }
|
| 321 |
|
| 322 |
|
| 323 | public bool HasNumber {
|
| 324 | get { return result.HasNumber; }
|
| 325 | }
|
| 326 | public string Number {
|
| 327 | get { return result.Number; }
|
| 328 | set { SetNumber(value); }
|
| 329 | }
|
| 330 | public Builder SetNumber(string value) {
|
| 331 | pb::ThrowHelper.ThrowIfNull(value, "value");
|
| 332 | result.hasNumber = true;
|
| 333 | result.number_ = value;
|
| 334 | return this;
|
| 335 | }
|
| 336 | public Builder ClearNumber() {
|
| 337 | result.hasNumber = false;
|
| 338 | result.number_ = "";
|
| 339 | return this;
|
| 340 | }
|
| 341 |
|
| 342 | public bool HasType {
|
| 343 | get { return result.HasType; }
|
| 344 | }
|
| 345 | public global::Google.ProtocolBuffers.Examples.AddressBook.Person.Types.PhoneType Type {
|
| 346 | get { return result.Type; }
|
| 347 | set { SetType(value); }
|
| 348 | }
|
| 349 | public Builder SetType(global::Google.ProtocolBuffers.Examples.AddressBook.Person.Types.PhoneType value) {
|
| 350 | result.hasType = true;
|
| 351 | result.type_ = value;
|
| 352 | return this;
|
| 353 | }
|
| 354 | public Builder ClearType() {
|
| 355 | result.hasType = false;
|
| 356 | result.type_ = global::Google.ProtocolBuffers.Examples.AddressBook.Person.Types.PhoneType.HOME;
|
| 357 | return this;
|
| 358 | }
|
| 359 | }
|
| 360 | static PhoneNumber() {
|
| 361 | object.ReferenceEquals(global::Google.ProtocolBuffers.Examples.AddressBook.AddressBookProtos.Descriptor, null);
|
| 362 | }
|
| 363 | }
|
| 364 |
|
| 365 | }
|
| 366 | #endregion
|
| 367 |
|
| 368 | public const int NameFieldNumber = 1;
|
| 369 | private bool hasName;
|
| 370 | private string name_ = "";
|
| 371 | public bool HasName {
|
| 372 | get { return hasName; }
|
| 373 | }
|
| 374 | public string Name {
|
| 375 | get { return name_; }
|
| 376 | }
|
| 377 |
|
| 378 | public const int IdFieldNumber = 2;
|
| 379 | private bool hasId;
|
| 380 | private int id_ = 0;
|
| 381 | public bool HasId {
|
| 382 | get { return hasId; }
|
| 383 | }
|
| 384 | public int Id {
|
| 385 | get { return id_; }
|
| 386 | }
|
| 387 |
|
| 388 | public const int EmailFieldNumber = 3;
|
| 389 | private bool hasEmail;
|
| 390 | private string email_ = "";
|
| 391 | public bool HasEmail {
|
| 392 | get { return hasEmail; }
|
| 393 | }
|
| 394 | public string Email {
|
| 395 | get { return email_; }
|
| 396 | }
|
| 397 |
|
| 398 | public const int PhoneFieldNumber = 4;
|
| 399 | private pbc::PopsicleList<global::Google.ProtocolBuffers.Examples.AddressBook.Person.Types.PhoneNumber> phone_ = new pbc::PopsicleList<global::Google.ProtocolBuffers.Examples.AddressBook.Person.Types.PhoneNumber>();
|
| 400 | public scg::IList<global::Google.ProtocolBuffers.Examples.AddressBook.Person.Types.PhoneNumber> PhoneList {
|
| 401 | get { return phone_; }
|
| 402 | }
|
| 403 | public int PhoneCount {
|
| 404 | get { return phone_.Count; }
|
| 405 | }
|
| 406 | public global::Google.ProtocolBuffers.Examples.AddressBook.Person.Types.PhoneNumber GetPhone(int index) {
|
| 407 | return phone_[index];
|
| 408 | }
|
| 409 |
|
| 410 | public override bool IsInitialized {
|
| 411 | get {
|
| 412 | if (!hasName) return false;
|
| 413 | if (!hasId) return false;
|
| 414 | foreach (global::Google.ProtocolBuffers.Examples.AddressBook.Person.Types.PhoneNumber element in PhoneList) {
|
| 415 | if (!element.IsInitialized) return false;
|
| 416 | }
|
| 417 | return true;
|
| 418 | }
|
| 419 | }
|
| 420 |
|
| 421 | public override void WriteTo(pb::CodedOutputStream output) {
|
| 422 | int size = SerializedSize;
|
| 423 | if (HasName) {
|
| 424 | output.WriteString(1, Name);
|
| 425 | }
|
| 426 | if (HasId) {
|
| 427 | output.WriteInt32(2, Id);
|
| 428 | }
|
| 429 | if (HasEmail) {
|
| 430 | output.WriteString(3, Email);
|
| 431 | }
|
| 432 | foreach (global::Google.ProtocolBuffers.Examples.AddressBook.Person.Types.PhoneNumber element in PhoneList) {
|
| 433 | output.WriteMessage(4, element);
|
| 434 | }
|
| 435 | UnknownFields.WriteTo(output);
|
| 436 | }
|
| 437 |
|
| 438 | private int memoizedSerializedSize = -1;
|
| 439 | public override int SerializedSize {
|
| 440 | get {
|
| 441 | int size = memoizedSerializedSize;
|
| 442 | if (size != -1) return size;
|
| 443 |
|
| 444 | size = 0;
|
| 445 | if (HasName) {
|
| 446 | size += pb::CodedOutputStream.ComputeStringSize(1, Name);
|
| 447 | }
|
| 448 | if (HasId) {
|
| 449 | size += pb::CodedOutputStream.ComputeInt32Size(2, Id);
|
| 450 | }
|
| 451 | if (HasEmail) {
|
| 452 | size += pb::CodedOutputStream.ComputeStringSize(3, Email);
|
| 453 | }
|
| 454 | foreach (global::Google.ProtocolBuffers.Examples.AddressBook.Person.Types.PhoneNumber element in PhoneList) {
|
| 455 | size += pb::CodedOutputStream.ComputeMessageSize(4, element);
|
| 456 | }
|
| 457 | size += UnknownFields.SerializedSize;
|
| 458 | memoizedSerializedSize = size;
|
| 459 | return size;
|
| 460 | }
|
| 461 | }
|
| 462 |
|
| 463 | public static Person ParseFrom(pb::ByteString data) {
|
| 464 | return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
|
| 465 | }
|
| 466 | public static Person ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
|
| 467 | return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
|
| 468 | }
|
| 469 | public static Person ParseFrom(byte[] data) {
|
| 470 | return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
|
| 471 | }
|
| 472 | public static Person ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
|
| 473 | return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
|
| 474 | }
|
| 475 | public static Person ParseFrom(global::System.IO.Stream input) {
|
| 476 | return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
|
| 477 | }
|
| 478 | public static Person ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
|
| 479 | return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
|
| 480 | }
|
| 481 | public static Person ParseDelimitedFrom(global::System.IO.Stream input) {
|
| 482 | return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
|
| 483 | }
|
| 484 | public static Person ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
|
| 485 | return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
|
| 486 | }
|
| 487 | public static Person ParseFrom(pb::CodedInputStream input) {
|
| 488 | return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
|
| 489 | }
|
| 490 | public static Person ParseFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
|
| 491 | return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
|
| 492 | }
|
| 493 | public static Builder CreateBuilder() { return new Builder(); }
|
| 494 | public override Builder ToBuilder() { return CreateBuilder(this); }
|
| 495 | public override Builder CreateBuilderForType() { return new Builder(); }
|
| 496 | public static Builder CreateBuilder(Person prototype) {
|
| 497 | return (Builder) new Builder().MergeFrom(prototype);
|
| 498 | }
|
| 499 |
|
| 500 | public sealed partial class Builder : pb::GeneratedBuilder<Person, Builder> {
|
| 501 | protected override Builder ThisBuilder {
|
| 502 | get { return this; }
|
| 503 | }
|
| 504 | public Builder() {}
|
| 505 |
|
| 506 | Person result = new Person();
|
| 507 |
|
| 508 | protected override Person MessageBeingBuilt {
|
| 509 | get { return result; }
|
| 510 | }
|
| 511 |
|
| 512 | public override Builder Clear() {
|
| 513 | result = new Person();
|
| 514 | return this;
|
| 515 | }
|
| 516 |
|
| 517 | public override Builder Clone() {
|
| 518 | return new Builder().MergeFrom(result);
|
| 519 | }
|
| 520 |
|
| 521 | public override pbd::MessageDescriptor DescriptorForType {
|
| 522 | get { return global::Google.ProtocolBuffers.Examples.AddressBook.Person.Descriptor; }
|
| 523 | }
|
| 524 |
|
| 525 | public override Person DefaultInstanceForType {
|
| 526 | get { return global::Google.ProtocolBuffers.Examples.AddressBook.Person.DefaultInstance; }
|
| 527 | }
|
| 528 |
|
| 529 | public override Person BuildPartial() {
|
| 530 | if (result == null) {
|
| 531 | throw new global::System.InvalidOperationException("build() has already been called on this Builder");
|
| 532 | }
|
| 533 | result.phone_.MakeReadOnly();
|
| 534 | Person returnMe = result;
|
| 535 | result = null;
|
| 536 | return returnMe;
|
| 537 | }
|
| 538 |
|
| 539 | public override Builder MergeFrom(pb::IMessage other) {
|
| 540 | if (other is Person) {
|
| 541 | return MergeFrom((Person) other);
|
| 542 | } else {
|
| 543 | base.MergeFrom(other);
|
| 544 | return this;
|
| 545 | }
|
| 546 | }
|
| 547 |
|
| 548 | public override Builder MergeFrom(Person other) {
|
| 549 | if (other == global::Google.ProtocolBuffers.Examples.AddressBook.Person.DefaultInstance) return this;
|
| 550 | if (other.HasName) {
|
| 551 | Name = other.Name;
|
| 552 | }
|
| 553 | if (other.HasId) {
|
| 554 | Id = other.Id;
|
| 555 | }
|
| 556 | if (other.HasEmail) {
|
| 557 | Email = other.Email;
|
| 558 | }
|
| 559 | if (other.phone_.Count != 0) {
|
| 560 | base.AddRange(other.phone_, result.phone_);
|
| 561 | }
|
| 562 | this.MergeUnknownFields(other.UnknownFields);
|
| 563 | return this;
|
| 564 | }
|
| 565 |
|
| 566 | public override Builder MergeFrom(pb::CodedInputStream input) {
|
| 567 | return MergeFrom(input, pb::ExtensionRegistry.Empty);
|
| 568 | }
|
| 569 |
|
| 570 | public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
|
| 571 | pb::UnknownFieldSet.Builder unknownFields = null;
|
| 572 | while (true) {
|
| 573 | uint tag = input.ReadTag();
|
| 574 | switch (tag) {
|
| 575 | case 0: {
|
| 576 | if (unknownFields != null) {
|
| 577 | this.UnknownFields = unknownFields.Build();
|
| 578 | }
|
| 579 | return this;
|
| 580 | }
|
| 581 | default: {
|
| 582 | if (pb::WireFormat.IsEndGroupTag(tag)) {
|
| 583 | if (unknownFields != null) {
|
| 584 | this.UnknownFields = unknownFields.Build();
|
| 585 | }
|
| 586 | return this;
|
| 587 | }
|
| 588 | if (unknownFields == null) {
|
| 589 | unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
|
| 590 | }
|
| 591 | ParseUnknownField(input, unknownFields, extensionRegistry, tag);
|
| 592 | break;
|
| 593 | }
|
| 594 | case 10: {
|
| 595 | Name = input.ReadString();
|
| 596 | break;
|
| 597 | }
|
| 598 | case 16: {
|
| 599 | Id = input.ReadInt32();
|
| 600 | break;
|
| 601 | }
|
| 602 | case 26: {
|
| 603 | Email = input.ReadString();
|
| 604 | break;
|
| 605 | }
|
| 606 | case 34: {
|
| 607 | global::Google.ProtocolBuffers.Examples.AddressBook.Person.Types.PhoneNumber.Builder subBuilder = global::Google.ProtocolBuffers.Examples.AddressBook.Person.Types.PhoneNumber.CreateBuilder();
|
| 608 | input.ReadMessage(subBuilder, extensionRegistry);
|
| 609 | AddPhone(subBuilder.BuildPartial());
|
| 610 | break;
|
| 611 | }
|
| 612 | }
|
| 613 | }
|
| 614 | }
|
| 615 |
|
| 616 |
|
| 617 | public bool HasName {
|
| 618 | get { return result.HasName; }
|
| 619 | }
|
| 620 | public string Name {
|
| 621 | get { return result.Name; }
|
| 622 | set { SetName(value); }
|
| 623 | }
|
| 624 | public Builder SetName(string value) {
|
| 625 | pb::ThrowHelper.ThrowIfNull(value, "value");
|
| 626 | result.hasName = true;
|
| 627 | result.name_ = value;
|
| 628 | return this;
|
| 629 | }
|
| 630 | public Builder ClearName() {
|
| 631 | result.hasName = false;
|
| 632 | result.name_ = "";
|
| 633 | return this;
|
| 634 | }
|
| 635 |
|
| 636 | public bool HasId {
|
| 637 | get { return result.HasId; }
|
| 638 | }
|
| 639 | public int Id {
|
| 640 | get { return result.Id; }
|
| 641 | set { SetId(value); }
|
| 642 | }
|
| 643 | public Builder SetId(int value) {
|
| 644 | result.hasId = true;
|
| 645 | result.id_ = value;
|
| 646 | return this;
|
| 647 | }
|
| 648 | public Builder ClearId() {
|
| 649 | result.hasId = false;
|
| 650 | result.id_ = 0;
|
| 651 | return this;
|
| 652 | }
|
| 653 |
|
| 654 | public bool HasEmail {
|
| 655 | get { return result.HasEmail; }
|
| 656 | }
|
| 657 | public string Email {
|
| 658 | get { return result.Email; }
|
| 659 | set { SetEmail(value); }
|
| 660 | }
|
| 661 | public Builder SetEmail(string value) {
|
| 662 | pb::ThrowHelper.ThrowIfNull(value, "value");
|
| 663 | result.hasEmail = true;
|
| 664 | result.email_ = value;
|
| 665 | return this;
|
| 666 | }
|
| 667 | public Builder ClearEmail() {
|
| 668 | result.hasEmail = false;
|
| 669 | result.email_ = "";
|
| 670 | return this;
|
| 671 | }
|
| 672 |
|
| 673 | public pbc::IPopsicleList<global::Google.ProtocolBuffers.Examples.AddressBook.Person.Types.PhoneNumber> PhoneList {
|
| 674 | get { return result.phone_; }
|
| 675 | }
|
| 676 | public int PhoneCount {
|
| 677 | get { return result.PhoneCount; }
|
| 678 | }
|
| 679 | public global::Google.ProtocolBuffers.Examples.AddressBook.Person.Types.PhoneNumber GetPhone(int index) {
|
| 680 | return result.GetPhone(index);
|
| 681 | }
|
| 682 | public Builder SetPhone(int index, global::Google.ProtocolBuffers.Examples.AddressBook.Person.Types.PhoneNumber value) {
|
| 683 | pb::ThrowHelper.ThrowIfNull(value, "value");
|
| 684 | result.phone_[index] = value;
|
| 685 | return this;
|
| 686 | }
|
| 687 | public Builder SetPhone(int index, global::Google.ProtocolBuffers.Examples.AddressBook.Person.Types.PhoneNumber.Builder builderForValue) {
|
| 688 | pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
|
| 689 | result.phone_[index] = builderForValue.Build();
|
| 690 | return this;
|
| 691 | }
|
| 692 | public Builder AddPhone(global::Google.ProtocolBuffers.Examples.AddressBook.Person.Types.PhoneNumber value) {
|
| 693 | pb::ThrowHelper.ThrowIfNull(value, "value");
|
| 694 | result.phone_.Add(value);
|
| 695 | return this;
|
| 696 | }
|
| 697 | public Builder AddPhone(global::Google.ProtocolBuffers.Examples.AddressBook.Person.Types.PhoneNumber.Builder builderForValue) {
|
| 698 | pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
|
| 699 | result.phone_.Add(builderForValue.Build());
|
| 700 | return this;
|
| 701 | }
|
| 702 | public Builder AddRangePhone(scg::IEnumerable<global::Google.ProtocolBuffers.Examples.AddressBook.Person.Types.PhoneNumber> values) {
|
| 703 | base.AddRange(values, result.phone_);
|
| 704 | return this;
|
| 705 | }
|
| 706 | public Builder ClearPhone() {
|
| 707 | result.phone_.Clear();
|
| 708 | return this;
|
| 709 | }
|
| 710 | }
|
| 711 | static Person() {
|
| 712 | object.ReferenceEquals(global::Google.ProtocolBuffers.Examples.AddressBook.AddressBookProtos.Descriptor, null);
|
| 713 | }
|
| 714 | }
|
| 715 |
|
| 716 | public sealed partial class AddressBook : pb::GeneratedMessage<AddressBook, AddressBook.Builder> {
|
| 717 | private static readonly AddressBook defaultInstance = new Builder().BuildPartial();
|
| 718 | public static AddressBook DefaultInstance {
|
| 719 | get { return defaultInstance; }
|
| 720 | }
|
| 721 |
|
| 722 | public override AddressBook DefaultInstanceForType {
|
| 723 | get { return defaultInstance; }
|
| 724 | }
|
| 725 |
|
| 726 | protected override AddressBook ThisMessage {
|
| 727 | get { return this; }
|
| 728 | }
|
| 729 |
|
| 730 | public static pbd::MessageDescriptor Descriptor {
|
| 731 | get { return global::Google.ProtocolBuffers.Examples.AddressBook.AddressBookProtos.internal__static_tutorial_AddressBook__Descriptor; }
|
| 732 | }
|
| 733 |
|
| 734 | protected override pb::FieldAccess.FieldAccessorTable<AddressBook, AddressBook.Builder> InternalFieldAccessors {
|
| 735 | get { return global::Google.ProtocolBuffers.Examples.AddressBook.AddressBookProtos.internal__static_tutorial_AddressBook__FieldAccessorTable; }
|
| 736 | }
|
| 737 |
|
| 738 | public const int PersonFieldNumber = 1;
|
| 739 | private pbc::PopsicleList<global::Google.ProtocolBuffers.Examples.AddressBook.Person> person_ = new pbc::PopsicleList<global::Google.ProtocolBuffers.Examples.AddressBook.Person>();
|
| 740 | public scg::IList<global::Google.ProtocolBuffers.Examples.AddressBook.Person> PersonList {
|
| 741 | get { return person_; }
|
| 742 | }
|
| 743 | public int PersonCount {
|
| 744 | get { return person_.Count; }
|
| 745 | }
|
| 746 | public global::Google.ProtocolBuffers.Examples.AddressBook.Person GetPerson(int index) {
|
| 747 | return person_[index];
|
| 748 | }
|
| 749 |
|
| 750 | public override bool IsInitialized {
|
| 751 | get {
|
| 752 | foreach (global::Google.ProtocolBuffers.Examples.AddressBook.Person element in PersonList) {
|
| 753 | if (!element.IsInitialized) return false;
|
| 754 | }
|
| 755 | return true;
|
| 756 | }
|
| 757 | }
|
| 758 |
|
| 759 | public override void WriteTo(pb::CodedOutputStream output) {
|
| 760 | int size = SerializedSize;
|
| 761 | foreach (global::Google.ProtocolBuffers.Examples.AddressBook.Person element in PersonList) {
|
| 762 | output.WriteMessage(1, element);
|
| 763 | }
|
| 764 | UnknownFields.WriteTo(output);
|
| 765 | }
|
| 766 |
|
| 767 | private int memoizedSerializedSize = -1;
|
| 768 | public override int SerializedSize {
|
| 769 | get {
|
| 770 | int size = memoizedSerializedSize;
|
| 771 | if (size != -1) return size;
|
| 772 |
|
| 773 | size = 0;
|
| 774 | foreach (global::Google.ProtocolBuffers.Examples.AddressBook.Person element in PersonList) {
|
| 775 | size += pb::CodedOutputStream.ComputeMessageSize(1, element);
|
| 776 | }
|
| 777 | size += UnknownFields.SerializedSize;
|
| 778 | memoizedSerializedSize = size;
|
| 779 | return size;
|
| 780 | }
|
| 781 | }
|
| 782 |
|
| 783 | public static AddressBook ParseFrom(pb::ByteString data) {
|
| 784 | return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
|
| 785 | }
|
| 786 | public static AddressBook ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
|
| 787 | return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
|
| 788 | }
|
| 789 | public static AddressBook ParseFrom(byte[] data) {
|
| 790 | return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
|
| 791 | }
|
| 792 | public static AddressBook ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
|
| 793 | return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
|
| 794 | }
|
| 795 | public static AddressBook ParseFrom(global::System.IO.Stream input) {
|
| 796 | return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
|
| 797 | }
|
| 798 | public static AddressBook ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
|
| 799 | return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
|
| 800 | }
|
| 801 | public static AddressBook ParseDelimitedFrom(global::System.IO.Stream input) {
|
| 802 | return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
|
| 803 | }
|
| 804 | public static AddressBook ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
|
| 805 | return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
|
| 806 | }
|
| 807 | public static AddressBook ParseFrom(pb::CodedInputStream input) {
|
| 808 | return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
|
| 809 | }
|
| 810 | public static AddressBook ParseFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
|
| 811 | return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
|
| 812 | }
|
| 813 | public static Builder CreateBuilder() { return new Builder(); }
|
| 814 | public override Builder ToBuilder() { return CreateBuilder(this); }
|
| 815 | public override Builder CreateBuilderForType() { return new Builder(); }
|
| 816 | public static Builder CreateBuilder(AddressBook prototype) {
|
| 817 | return (Builder) new Builder().MergeFrom(prototype);
|
| 818 | }
|
| 819 |
|
| 820 | public sealed partial class Builder : pb::GeneratedBuilder<AddressBook, Builder> {
|
| 821 | protected override Builder ThisBuilder {
|
| 822 | get { return this; }
|
| 823 | }
|
| 824 | public Builder() {}
|
| 825 |
|
| 826 | AddressBook result = new AddressBook();
|
| 827 |
|
| 828 | protected override AddressBook MessageBeingBuilt {
|
| 829 | get { return result; }
|
| 830 | }
|
| 831 |
|
| 832 | public override Builder Clear() {
|
| 833 | result = new AddressBook();
|
| 834 | return this;
|
| 835 | }
|
| 836 |
|
| 837 | public override Builder Clone() {
|
| 838 | return new Builder().MergeFrom(result);
|
| 839 | }
|
| 840 |
|
| 841 | public override pbd::MessageDescriptor DescriptorForType {
|
| 842 | get { return global::Google.ProtocolBuffers.Examples.AddressBook.AddressBook.Descriptor; }
|
| 843 | }
|
| 844 |
|
| 845 | public override AddressBook DefaultInstanceForType {
|
| 846 | get { return global::Google.ProtocolBuffers.Examples.AddressBook.AddressBook.DefaultInstance; }
|
| 847 | }
|
| 848 |
|
| 849 | public override AddressBook BuildPartial() {
|
| 850 | if (result == null) {
|
| 851 | throw new global::System.InvalidOperationException("build() has already been called on this Builder");
|
| 852 | }
|
| 853 | result.person_.MakeReadOnly();
|
| 854 | AddressBook returnMe = result;
|
| 855 | result = null;
|
| 856 | return returnMe;
|
| 857 | }
|
| 858 |
|
| 859 | public override Builder MergeFrom(pb::IMessage other) {
|
| 860 | if (other is AddressBook) {
|
| 861 | return MergeFrom((AddressBook) other);
|
| 862 | } else {
|
| 863 | base.MergeFrom(other);
|
| 864 | return this;
|
| 865 | }
|
| 866 | }
|
| 867 |
|
| 868 | public override Builder MergeFrom(AddressBook other) {
|
| 869 | if (other == global::Google.ProtocolBuffers.Examples.AddressBook.AddressBook.DefaultInstance) return this;
|
| 870 | if (other.person_.Count != 0) {
|
| 871 | base.AddRange(other.person_, result.person_);
|
| 872 | }
|
| 873 | this.MergeUnknownFields(other.UnknownFields);
|
| 874 | return this;
|
| 875 | }
|
| 876 |
|
| 877 | public override Builder MergeFrom(pb::CodedInputStream input) {
|
| 878 | return MergeFrom(input, pb::ExtensionRegistry.Empty);
|
| 879 | }
|
| 880 |
|
| 881 | public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
|
| 882 | pb::UnknownFieldSet.Builder unknownFields = null;
|
| 883 | while (true) {
|
| 884 | uint tag = input.ReadTag();
|
| 885 | switch (tag) {
|
| 886 | case 0: {
|
| 887 | if (unknownFields != null) {
|
| 888 | this.UnknownFields = unknownFields.Build();
|
| 889 | }
|
| 890 | return this;
|
| 891 | }
|
| 892 | default: {
|
| 893 | if (pb::WireFormat.IsEndGroupTag(tag)) {
|
| 894 | if (unknownFields != null) {
|
| 895 | this.UnknownFields = unknownFields.Build();
|
| 896 | }
|
| 897 | return this;
|
| 898 | }
|
| 899 | if (unknownFields == null) {
|
| 900 | unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
|
| 901 | }
|
| 902 | ParseUnknownField(input, unknownFields, extensionRegistry, tag);
|
| 903 | break;
|
| 904 | }
|
| 905 | case 10: {
|
| 906 | global::Google.ProtocolBuffers.Examples.AddressBook.Person.Builder subBuilder = global::Google.ProtocolBuffers.Examples.AddressBook.Person.CreateBuilder();
|
| 907 | input.ReadMessage(subBuilder, extensionRegistry);
|
| 908 | AddPerson(subBuilder.BuildPartial());
|
| 909 | break;
|
| 910 | }
|
| 911 | }
|
| 912 | }
|
| 913 | }
|
| 914 |
|
| 915 |
|
| 916 | public pbc::IPopsicleList<global::Google.ProtocolBuffers.Examples.AddressBook.Person> PersonList {
|
| 917 | get { return result.person_; }
|
| 918 | }
|
| 919 | public int PersonCount {
|
| 920 | get { return result.PersonCount; }
|
| 921 | }
|
| 922 | public global::Google.ProtocolBuffers.Examples.AddressBook.Person GetPerson(int index) {
|
| 923 | return result.GetPerson(index);
|
| 924 | }
|
| 925 | public Builder SetPerson(int index, global::Google.ProtocolBuffers.Examples.AddressBook.Person value) {
|
| 926 | pb::ThrowHelper.ThrowIfNull(value, "value");
|
| 927 | result.person_[index] = value;
|
| 928 | return this;
|
| 929 | }
|
| 930 | public Builder SetPerson(int index, global::Google.ProtocolBuffers.Examples.AddressBook.Person.Builder builderForValue) {
|
| 931 | pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
|
| 932 | result.person_[index] = builderForValue.Build();
|
| 933 | return this;
|
| 934 | }
|
| 935 | public Builder AddPerson(global::Google.ProtocolBuffers.Examples.AddressBook.Person value) {
|
| 936 | pb::ThrowHelper.ThrowIfNull(value, "value");
|
| 937 | result.person_.Add(value);
|
| 938 | return this;
|
| 939 | }
|
| 940 | public Builder AddPerson(global::Google.ProtocolBuffers.Examples.AddressBook.Person.Builder builderForValue) {
|
| 941 | pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
|
| 942 | result.person_.Add(builderForValue.Build());
|
| 943 | return this;
|
| 944 | }
|
| 945 | public Builder AddRangePerson(scg::IEnumerable<global::Google.ProtocolBuffers.Examples.AddressBook.Person> values) {
|
| 946 | base.AddRange(values, result.person_);
|
| 947 | return this;
|
| 948 | }
|
| 949 | public Builder ClearPerson() {
|
| 950 | result.person_.Clear();
|
| 951 | return this;
|
| 952 | }
|
| 953 | }
|
| 954 | static AddressBook() {
|
| 955 | object.ReferenceEquals(global::Google.ProtocolBuffers.Examples.AddressBook.AddressBookProtos.Descriptor, null);
|
| 956 | }
|
| 957 | }
|
| 958 |
|
| 959 | #endregion
|
| 960 |
|
| 961 | }
|