| // Generated by ProtoGen, Version=2.4.1.555, Culture=neutral, PublicKeyToken=55f7125234beb589. DO NOT EDIT! | |
| #pragma warning disable 1591, 0612, 3021 | |
| #region Designer generated code | |
| using pb = global::Google.ProtocolBuffers; | |
| using pbc = global::Google.ProtocolBuffers.Collections; | |
| using pbd = global::Google.ProtocolBuffers.Descriptors; | |
| using scg = global::System.Collections.Generic; | |
| namespace Google.ProtocolBuffers.TestProtos { | |
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] | |
| public static partial class UnitTestXmlSerializerTestProtoFile { | |
| #region Extension registration | |
| public static void RegisterAllExtensions(pb::ExtensionRegistry registry) { | |
| registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestXmlSerializerTestProtoFile.ExtensionEnum); | |
| registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestXmlSerializerTestProtoFile.ExtensionText); | |
| registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestXmlSerializerTestProtoFile.ExtensionNumber); | |
| registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestXmlSerializerTestProtoFile.ExtensionMessage); | |
| } | |
| #endregion | |
| #region Extensions | |
| public const int ExtensionEnumFieldNumber = 101; | |
| public static pb::GeneratedExtensionBase<global::Google.ProtocolBuffers.TestProtos.EnumOptions> ExtensionEnum; | |
| public const int ExtensionTextFieldNumber = 102; | |
| public static pb::GeneratedExtensionBase<string> ExtensionText; | |
| public const int ExtensionNumberFieldNumber = 103; | |
| public static pb::GeneratedExtensionBase<scg::IList<int>> ExtensionNumber; | |
| public const int ExtensionMessageFieldNumber = 199; | |
| public static pb::GeneratedExtensionBase<global::Google.ProtocolBuffers.TestProtos.TestXmlExtension> ExtensionMessage; | |
| #endregion | |
| #region Static variables | |
| internal static pbd::MessageDescriptor internal__static_protobuf_unittest_extra_TestXmlChild__Descriptor; | |
| internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestXmlChild, global::Google.ProtocolBuffers.TestProtos.TestXmlChild.Builder> internal__static_protobuf_unittest_extra_TestXmlChild__FieldAccessorTable; | |
| internal static pbd::MessageDescriptor internal__static_protobuf_unittest_extra_TestXmlNoFields__Descriptor; | |
| internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestXmlNoFields, global::Google.ProtocolBuffers.TestProtos.TestXmlNoFields.Builder> internal__static_protobuf_unittest_extra_TestXmlNoFields__FieldAccessorTable; | |
| internal static pbd::MessageDescriptor internal__static_protobuf_unittest_extra_TestXmlRescursive__Descriptor; | |
| internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestXmlRescursive, global::Google.ProtocolBuffers.TestProtos.TestXmlRescursive.Builder> internal__static_protobuf_unittest_extra_TestXmlRescursive__FieldAccessorTable; | |
| internal static pbd::MessageDescriptor internal__static_protobuf_unittest_extra_TestXmlMessage__Descriptor; | |
| internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestXmlMessage, global::Google.ProtocolBuffers.TestProtos.TestXmlMessage.Builder> internal__static_protobuf_unittest_extra_TestXmlMessage__FieldAccessorTable; | |
| internal static pbd::MessageDescriptor internal__static_protobuf_unittest_extra_TestXmlMessage_Children__Descriptor; | |
| internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestXmlMessage.Types.Children, global::Google.ProtocolBuffers.TestProtos.TestXmlMessage.Types.Children.Builder> internal__static_protobuf_unittest_extra_TestXmlMessage_Children__FieldAccessorTable; | |
| internal static pbd::MessageDescriptor internal__static_protobuf_unittest_extra_TestXmlExtension__Descriptor; | |
| internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestXmlExtension, global::Google.ProtocolBuffers.TestProtos.TestXmlExtension.Builder> internal__static_protobuf_unittest_extra_TestXmlExtension__FieldAccessorTable; | |
| #endregion | |
| #region Descriptor | |
| public static pbd::FileDescriptor Descriptor { | |
| get { return descriptor; } | |
| } | |
| private static pbd::FileDescriptor descriptor; | |
| static UnitTestXmlSerializerTestProtoFile() { | |
| byte[] descriptorData = global::System.Convert.FromBase64String( | |
| string.Concat( | |
| "CiRleHRlc3QvdW5pdHRlc3RfZXh0cmFzX3htbHRlc3QucHJvdG8SF3Byb3Rv", | |
| "YnVmX3VuaXR0ZXN0X2V4dHJhGiRnb29nbGUvcHJvdG9idWYvY3NoYXJwX29w", | |
| "dGlvbnMucHJvdG8iVQoMVGVzdFhtbENoaWxkEjUKB29wdGlvbnMYAyADKA4y", | |
| "JC5wcm90b2J1Zl91bml0dGVzdF9leHRyYS5FbnVtT3B0aW9ucxIOCgZiaW5h", | |
| "cnkYBCABKAwiEQoPVGVzdFhtbE5vRmllbGRzIk4KEVRlc3RYbWxSZXNjdXJz", | |
| "aXZlEjkKBWNoaWxkGAEgASgLMioucHJvdG9idWZfdW5pdHRlc3RfZXh0cmEu", | |
| "VGVzdFhtbFJlc2N1cnNpdmUitwIKDlRlc3RYbWxNZXNzYWdlEg4KBm51bWJl", | |
| "chgGIAEoAxIPCgdudW1iZXJzGAIgAygFEgwKBHRleHQYAyABKAkSEgoJdGV4", | |
| "dGxpbmVzGLwFIAMoCRINCgV2YWxpZBgFIAEoCBI0CgVjaGlsZBgBIAEoCzIl", | |
| "LnByb3RvYnVmX3VuaXR0ZXN0X2V4dHJhLlRlc3RYbWxDaGlsZBJDCghjaGls", | |
| "ZHJlbhiRAyADKAoyMC5wcm90b2J1Zl91bml0dGVzdF9leHRyYS5UZXN0WG1s", | |
| "TWVzc2FnZS5DaGlsZHJlbhpRCghDaGlsZHJlbhI1CgdvcHRpb25zGAMgAygO", | |
| "MiQucHJvdG9idWZfdW5pdHRlc3RfZXh0cmEuRW51bU9wdGlvbnMSDgoGYmlu", | |
| "YXJ5GAQgASgMKgUIZBDIASIiChBUZXN0WG1sRXh0ZW5zaW9uEg4KBm51bWJl", | |
| "chgBIAIoBSoqCgtFbnVtT3B0aW9ucxIHCgNPTkUQABIHCgNUV08QARIJCgVU", | |
| "SFJFRRACOmUKDmV4dGVuc2lvbl9lbnVtEicucHJvdG9idWZfdW5pdHRlc3Rf", | |
| "ZXh0cmEuVGVzdFhtbE1lc3NhZ2UYZSABKA4yJC5wcm90b2J1Zl91bml0dGVz", | |
| "dF9leHRyYS5FbnVtT3B0aW9uczo/Cg5leHRlbnNpb25fdGV4dBInLnByb3Rv", | |
| "YnVmX3VuaXR0ZXN0X2V4dHJhLlRlc3RYbWxNZXNzYWdlGGYgASgJOkUKEGV4", | |
| "dGVuc2lvbl9udW1iZXISJy5wcm90b2J1Zl91bml0dGVzdF9leHRyYS5UZXN0", | |
| "WG1sTWVzc2FnZRhnIAMoBUICEAE6bgoRZXh0ZW5zaW9uX21lc3NhZ2USJy5w", | |
| "cm90b2J1Zl91bml0dGVzdF9leHRyYS5UZXN0WG1sTWVzc2FnZRjHASABKAsy", | |
| "KS5wcm90b2J1Zl91bml0dGVzdF9leHRyYS5UZXN0WG1sRXh0ZW5zaW9uQk5I", | |
| "AcI+SQohR29vZ2xlLlByb3RvY29sQnVmZmVycy5UZXN0UHJvdG9zEiJVbml0", | |
| "VGVzdFhtbFNlcmlhbGl6ZXJUZXN0UHJvdG9GaWxlSAE=")); | |
| pbd::FileDescriptor.InternalDescriptorAssigner assigner = delegate(pbd::FileDescriptor root) { | |
| descriptor = root; | |
| internal__static_protobuf_unittest_extra_TestXmlChild__Descriptor = Descriptor.MessageTypes[0]; | |
| internal__static_protobuf_unittest_extra_TestXmlChild__FieldAccessorTable = | |
| new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestXmlChild, global::Google.ProtocolBuffers.TestProtos.TestXmlChild.Builder>(internal__static_protobuf_unittest_extra_TestXmlChild__Descriptor, | |
| new string[] { "Options", "Binary", }); | |
| internal__static_protobuf_unittest_extra_TestXmlNoFields__Descriptor = Descriptor.MessageTypes[1]; | |
| internal__static_protobuf_unittest_extra_TestXmlNoFields__FieldAccessorTable = | |
| new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestXmlNoFields, global::Google.ProtocolBuffers.TestProtos.TestXmlNoFields.Builder>(internal__static_protobuf_unittest_extra_TestXmlNoFields__Descriptor, | |
| new string[] { }); | |
| internal__static_protobuf_unittest_extra_TestXmlRescursive__Descriptor = Descriptor.MessageTypes[2]; | |
| internal__static_protobuf_unittest_extra_TestXmlRescursive__FieldAccessorTable = | |
| new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestXmlRescursive, global::Google.ProtocolBuffers.TestProtos.TestXmlRescursive.Builder>(internal__static_protobuf_unittest_extra_TestXmlRescursive__Descriptor, | |
| new string[] { "Child", }); | |
| internal__static_protobuf_unittest_extra_TestXmlMessage__Descriptor = Descriptor.MessageTypes[3]; | |
| internal__static_protobuf_unittest_extra_TestXmlMessage__FieldAccessorTable = | |
| new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestXmlMessage, global::Google.ProtocolBuffers.TestProtos.TestXmlMessage.Builder>(internal__static_protobuf_unittest_extra_TestXmlMessage__Descriptor, | |
| new string[] { "Number", "Numbers", "Text", "Textlines", "Valid", "Child", "Children", }); | |
| internal__static_protobuf_unittest_extra_TestXmlMessage_Children__Descriptor = internal__static_protobuf_unittest_extra_TestXmlMessage__Descriptor.NestedTypes[0]; | |
| internal__static_protobuf_unittest_extra_TestXmlMessage_Children__FieldAccessorTable = | |
| new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestXmlMessage.Types.Children, global::Google.ProtocolBuffers.TestProtos.TestXmlMessage.Types.Children.Builder>(internal__static_protobuf_unittest_extra_TestXmlMessage_Children__Descriptor, | |
| new string[] { "Options", "Binary", }); | |
| internal__static_protobuf_unittest_extra_TestXmlExtension__Descriptor = Descriptor.MessageTypes[4]; | |
| internal__static_protobuf_unittest_extra_TestXmlExtension__FieldAccessorTable = | |
| new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestXmlExtension, global::Google.ProtocolBuffers.TestProtos.TestXmlExtension.Builder>(internal__static_protobuf_unittest_extra_TestXmlExtension__Descriptor, | |
| new string[] { "Number", }); | |
| global::Google.ProtocolBuffers.TestProtos.UnitTestXmlSerializerTestProtoFile.ExtensionEnum = pb::GeneratedSingleExtension<global::Google.ProtocolBuffers.TestProtos.EnumOptions>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestXmlSerializerTestProtoFile.Descriptor.Extensions[0]); | |
| global::Google.ProtocolBuffers.TestProtos.UnitTestXmlSerializerTestProtoFile.ExtensionText = pb::GeneratedSingleExtension<string>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestXmlSerializerTestProtoFile.Descriptor.Extensions[1]); | |
| global::Google.ProtocolBuffers.TestProtos.UnitTestXmlSerializerTestProtoFile.ExtensionNumber = pb::GeneratedRepeatExtension<int>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestXmlSerializerTestProtoFile.Descriptor.Extensions[2]); | |
| global::Google.ProtocolBuffers.TestProtos.UnitTestXmlSerializerTestProtoFile.ExtensionMessage = pb::GeneratedSingleExtension<global::Google.ProtocolBuffers.TestProtos.TestXmlExtension>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestXmlSerializerTestProtoFile.Descriptor.Extensions[3]); | |
| pb::ExtensionRegistry registry = pb::ExtensionRegistry.CreateInstance(); | |
| RegisterAllExtensions(registry); | |
| global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.RegisterAllExtensions(registry); | |
| return registry; | |
| }; | |
| pbd::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData, | |
| new pbd::FileDescriptor[] { | |
| global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.Descriptor, | |
| }, assigner); | |
| } | |
| #endregion | |
| } | |
| #region Enums | |
| public enum EnumOptions { | |
| ONE = 0, | |
| TWO = 1, | |
| THREE = 2, | |
| } | |
| #endregion | |
| #region Messages | |
| [global::System.SerializableAttribute()] | |
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] | |
| public sealed partial class TestXmlChild : pb::GeneratedMessage<TestXmlChild, TestXmlChild.Builder> { | |
| private TestXmlChild() { } | |
| private static readonly TestXmlChild defaultInstance = new TestXmlChild().MakeReadOnly(); | |
| private static readonly string[] _testXmlChildFieldNames = new string[] { "binary", "options" }; | |
| private static readonly uint[] _testXmlChildFieldTags = new uint[] { 34, 24 }; | |
| public static TestXmlChild DefaultInstance { | |
| get { return defaultInstance; } | |
| } | |
| public override TestXmlChild DefaultInstanceForType { | |
| get { return DefaultInstance; } | |
| } | |
| protected override TestXmlChild ThisMessage { | |
| get { return this; } | |
| } | |
| public static pbd::MessageDescriptor Descriptor { | |
| get { return global::Google.ProtocolBuffers.TestProtos.UnitTestXmlSerializerTestProtoFile.internal__static_protobuf_unittest_extra_TestXmlChild__Descriptor; } | |
| } | |
| protected override pb::FieldAccess.FieldAccessorTable<TestXmlChild, TestXmlChild.Builder> InternalFieldAccessors { | |
| get { return global::Google.ProtocolBuffers.TestProtos.UnitTestXmlSerializerTestProtoFile.internal__static_protobuf_unittest_extra_TestXmlChild__FieldAccessorTable; } | |
| } | |
| public const int OptionsFieldNumber = 3; | |
| private pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.EnumOptions> options_ = new pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.EnumOptions>(); | |
| public scg::IList<global::Google.ProtocolBuffers.TestProtos.EnumOptions> OptionsList { | |
| get { return pbc::Lists.AsReadOnly(options_); } | |
| } | |
| public int OptionsCount { | |
| get { return options_.Count; } | |
| } | |
| public global::Google.ProtocolBuffers.TestProtos.EnumOptions GetOptions(int index) { | |
| return options_[index]; | |
| } | |
| public const int BinaryFieldNumber = 4; | |
| private bool hasBinary; | |
| private pb::ByteString binary_ = pb::ByteString.Empty; | |
| public bool HasBinary { | |
| get { return hasBinary; } | |
| } | |
| public pb::ByteString Binary { | |
| get { return binary_; } | |
| } | |
| public override bool IsInitialized { | |
| get { | |
| return true; | |
| } | |
| } | |
| public override void WriteTo(pb::ICodedOutputStream output) { | |
| CalcSerializedSize(); | |
| string[] field_names = _testXmlChildFieldNames; | |
| if (options_.Count > 0) { | |
| output.WriteEnumArray(3, field_names[1], options_); | |
| } | |
| if (hasBinary) { | |
| output.WriteBytes(4, field_names[0], Binary); | |
| } | |
| UnknownFields.WriteTo(output); | |
| } | |
| private int memoizedSerializedSize = -1; | |
| public override int SerializedSize { | |
| get { | |
| int size = memoizedSerializedSize; | |
| if (size != -1) return size; | |
| return CalcSerializedSize(); | |
| } | |
| } | |
| private int CalcSerializedSize() { | |
| int size = memoizedSerializedSize; | |
| if (size != -1) return size; | |
| size = 0; | |
| { | |
| int dataSize = 0; | |
| if (options_.Count > 0) { | |
| foreach (global::Google.ProtocolBuffers.TestProtos.EnumOptions element in options_) { | |
| dataSize += pb::CodedOutputStream.ComputeEnumSizeNoTag((int) element); | |
| } | |
| size += dataSize; | |
| size += 1 * options_.Count; | |
| } | |
| } | |
| if (hasBinary) { | |
| size += pb::CodedOutputStream.ComputeBytesSize(4, Binary); | |
| } | |
| size += UnknownFields.SerializedSize; | |
| memoizedSerializedSize = size; | |
| return size; | |
| } | |
| public static TestXmlChild ParseFrom(pb::ByteString data) { | |
| return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); | |
| } | |
| public static TestXmlChild ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) { | |
| return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); | |
| } | |
| public static TestXmlChild ParseFrom(byte[] data) { | |
| return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); | |
| } | |
| public static TestXmlChild ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) { | |
| return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); | |
| } | |
| public static TestXmlChild ParseFrom(global::System.IO.Stream input) { | |
| return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); | |
| } | |
| public static TestXmlChild ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { | |
| return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); | |
| } | |
| public static TestXmlChild ParseDelimitedFrom(global::System.IO.Stream input) { | |
| return CreateBuilder().MergeDelimitedFrom(input).BuildParsed(); | |
| } | |
| public static TestXmlChild ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { | |
| return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed(); | |
| } | |
| public static TestXmlChild ParseFrom(pb::ICodedInputStream input) { | |
| return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); | |
| } | |
| public static TestXmlChild ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) { | |
| return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); | |
| } | |
| private TestXmlChild MakeReadOnly() { | |
| options_.MakeReadOnly(); | |
| return this; | |
| } | |
| public static Builder CreateBuilder() { return new Builder(); } | |
| public override Builder ToBuilder() { return CreateBuilder(this); } | |
| public override Builder CreateBuilderForType() { return new Builder(); } | |
| public static Builder CreateBuilder(TestXmlChild prototype) { | |
| return new Builder(prototype); | |
| } | |
| [global::System.SerializableAttribute()] | |
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] | |
| public sealed partial class Builder : pb::GeneratedBuilder<TestXmlChild, Builder> { | |
| protected override Builder ThisBuilder { | |
| get { return this; } | |
| } | |
| public Builder() { | |
| result = DefaultInstance; | |
| resultIsReadOnly = true; | |
| } | |
| internal Builder(TestXmlChild cloneFrom) { | |
| result = cloneFrom; | |
| resultIsReadOnly = true; | |
| } | |
| private bool resultIsReadOnly; | |
| private TestXmlChild result; | |
| private TestXmlChild PrepareBuilder() { | |
| if (resultIsReadOnly) { | |
| TestXmlChild original = result; | |
| result = new TestXmlChild(); | |
| resultIsReadOnly = false; | |
| MergeFrom(original); | |
| } | |
| return result; | |
| } | |
| public override bool IsInitialized { | |
| get { return result.IsInitialized; } | |
| } | |
| protected override TestXmlChild MessageBeingBuilt { | |
| get { return PrepareBuilder(); } | |
| } | |
| public override Builder Clear() { | |
| result = DefaultInstance; | |
| resultIsReadOnly = true; | |
| return this; | |
| } | |
| public override Builder Clone() { | |
| if (resultIsReadOnly) { | |
| return new Builder(result); | |
| } else { | |
| return new Builder().MergeFrom(result); | |
| } | |
| } | |
| public override pbd::MessageDescriptor DescriptorForType { | |
| get { return global::Google.ProtocolBuffers.TestProtos.TestXmlChild.Descriptor; } | |
| } | |
| public override TestXmlChild DefaultInstanceForType { | |
| get { return global::Google.ProtocolBuffers.TestProtos.TestXmlChild.DefaultInstance; } | |
| } | |
| public override TestXmlChild BuildPartial() { | |
| if (resultIsReadOnly) { | |
| return result; | |
| } | |
| resultIsReadOnly = true; | |
| return result.MakeReadOnly(); | |
| } | |
| public override Builder MergeFrom(pb::IMessage other) { | |
| if (other is TestXmlChild) { | |
| return MergeFrom((TestXmlChild) other); | |
| } else { | |
| base.MergeFrom(other); | |
| return this; | |
| } | |
| } | |
| public override Builder MergeFrom(TestXmlChild other) { | |
| if (other == global::Google.ProtocolBuffers.TestProtos.TestXmlChild.DefaultInstance) return this; | |
| PrepareBuilder(); | |
| if (other.options_.Count != 0) { | |
| result.options_.Add(other.options_); | |
| } | |
| if (other.HasBinary) { | |
| Binary = other.Binary; | |
| } | |
| this.MergeUnknownFields(other.UnknownFields); | |
| return this; | |
| } | |
| public override Builder MergeFrom(pb::ICodedInputStream input) { | |
| return MergeFrom(input, pb::ExtensionRegistry.Empty); | |
| } | |
| public override Builder MergeFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) { | |
| PrepareBuilder(); | |
| pb::UnknownFieldSet.Builder unknownFields = null; | |
| uint tag; | |
| string field_name; | |
| while (input.ReadTag(out tag, out field_name)) { | |
| if(tag == 0 && field_name != null) { | |
| int field_ordinal = global::System.Array.BinarySearch(_testXmlChildFieldNames, field_name, global::System.StringComparer.Ordinal); | |
| if(field_ordinal >= 0) | |
| tag = _testXmlChildFieldTags[field_ordinal]; | |
| else { | |
| if (unknownFields == null) { | |
| unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields); | |
| } | |
| ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name); | |
| continue; | |
| } | |
| } | |
| switch (tag) { | |
| case 0: { | |
| throw pb::InvalidProtocolBufferException.InvalidTag(); | |
| } | |
| default: { | |
| if (pb::WireFormat.IsEndGroupTag(tag)) { | |
| if (unknownFields != null) { | |
| this.UnknownFields = unknownFields.Build(); | |
| } | |
| return this; | |
| } | |
| if (unknownFields == null) { | |
| unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields); | |
| } | |
| ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name); | |
| break; | |
| } | |
| case 26: | |
| case 24: { | |
| scg::ICollection<object> unknownItems; | |
| input.ReadEnumArray<global::Google.ProtocolBuffers.TestProtos.EnumOptions>(tag, field_name, result.options_, out unknownItems); | |
| if (unknownItems != null) { | |
| if (unknownFields == null) { | |
| unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields); | |
| } | |
| foreach (object rawValue in unknownItems) | |
| if (rawValue is int) | |
| unknownFields.MergeVarintField(3, (ulong)(int)rawValue); | |
| } | |
| break; | |
| } | |
| case 34: { | |
| result.hasBinary = input.ReadBytes(ref result.binary_); | |
| break; | |
| } | |
| } | |
| } | |
| if (unknownFields != null) { | |
| this.UnknownFields = unknownFields.Build(); | |
| } | |
| return this; | |
| } | |
| public pbc::IPopsicleList<global::Google.ProtocolBuffers.TestProtos.EnumOptions> OptionsList { | |
| get { return PrepareBuilder().options_; } | |
| } | |
| public int OptionsCount { | |
| get { return result.OptionsCount; } | |
| } | |
| public global::Google.ProtocolBuffers.TestProtos.EnumOptions GetOptions(int index) { | |
| return result.GetOptions(index); | |
| } | |
| public Builder SetOptions(int index, global::Google.ProtocolBuffers.TestProtos.EnumOptions value) { | |
| PrepareBuilder(); | |
| result.options_[index] = value; | |
| return this; | |
| } | |
| public Builder AddOptions(global::Google.ProtocolBuffers.TestProtos.EnumOptions value) { | |
| PrepareBuilder(); | |
| result.options_.Add(value); | |
| return this; | |
| } | |
| public Builder AddRangeOptions(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.EnumOptions> values) { | |
| PrepareBuilder(); | |
| result.options_.Add(values); | |
| return this; | |
| } | |
| public Builder ClearOptions() { | |
| PrepareBuilder(); | |
| result.options_.Clear(); | |
| return this; | |
| } | |
| public bool HasBinary { | |
| get { return result.hasBinary; } | |
| } | |
| public pb::ByteString Binary { | |
| get { return result.Binary; } | |
| set { SetBinary(value); } | |
| } | |
| public Builder SetBinary(pb::ByteString value) { | |
| pb::ThrowHelper.ThrowIfNull(value, "value"); | |
| PrepareBuilder(); | |
| result.hasBinary = true; | |
| result.binary_ = value; | |
| return this; | |
| } | |
| public Builder ClearBinary() { | |
| PrepareBuilder(); | |
| result.hasBinary = false; | |
| result.binary_ = pb::ByteString.Empty; | |
| return this; | |
| } | |
| } | |
| static TestXmlChild() { | |
| object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestXmlSerializerTestProtoFile.Descriptor, null); | |
| } | |
| } | |
| [global::System.SerializableAttribute()] | |
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] | |
| public sealed partial class TestXmlNoFields : pb::GeneratedMessage<TestXmlNoFields, TestXmlNoFields.Builder> { | |
| private TestXmlNoFields() { } | |
| private static readonly TestXmlNoFields defaultInstance = new TestXmlNoFields().MakeReadOnly(); | |
| private static readonly string[] _testXmlNoFieldsFieldNames = new string[] { }; | |
| private static readonly uint[] _testXmlNoFieldsFieldTags = new uint[] { }; | |
| public static TestXmlNoFields DefaultInstance { | |
| get { return defaultInstance; } | |
| } | |
| public override TestXmlNoFields DefaultInstanceForType { | |
| get { return DefaultInstance; } | |
| } | |
| protected override TestXmlNoFields ThisMessage { | |
| get { return this; } | |
| } | |
| public static pbd::MessageDescriptor Descriptor { | |
| get { return global::Google.ProtocolBuffers.TestProtos.UnitTestXmlSerializerTestProtoFile.internal__static_protobuf_unittest_extra_TestXmlNoFields__Descriptor; } | |
| } | |
| protected override pb::FieldAccess.FieldAccessorTable<TestXmlNoFields, TestXmlNoFields.Builder> InternalFieldAccessors { | |
| get { return global::Google.ProtocolBuffers.TestProtos.UnitTestXmlSerializerTestProtoFile.internal__static_protobuf_unittest_extra_TestXmlNoFields__FieldAccessorTable; } | |
| } | |
| public override bool IsInitialized { | |
| get { | |
| return true; | |
| } | |
| } | |
| public override void WriteTo(pb::ICodedOutputStream output) { | |
| CalcSerializedSize(); | |
| string[] field_names = _testXmlNoFieldsFieldNames; | |
| UnknownFields.WriteTo(output); | |
| } | |
| private int memoizedSerializedSize = -1; | |
| public override int SerializedSize { | |
| get { | |
| int size = memoizedSerializedSize; | |
| if (size != -1) return size; | |
| return CalcSerializedSize(); | |
| } | |
| } | |
| private int CalcSerializedSize() { | |
| int size = memoizedSerializedSize; | |
| if (size != -1) return size; | |
| size = 0; | |
| size += UnknownFields.SerializedSize; | |
| memoizedSerializedSize = size; | |
| return size; | |
| } | |
| public static TestXmlNoFields ParseFrom(pb::ByteString data) { | |
| return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); | |
| } | |
| public static TestXmlNoFields ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) { | |
| return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); | |
| } | |
| public static TestXmlNoFields ParseFrom(byte[] data) { | |
| return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); | |
| } | |
| public static TestXmlNoFields ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) { | |
| return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); | |
| } | |
| public static TestXmlNoFields ParseFrom(global::System.IO.Stream input) { | |
| return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); | |
| } | |
| public static TestXmlNoFields ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { | |
| return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); | |
| } | |
| public static TestXmlNoFields ParseDelimitedFrom(global::System.IO.Stream input) { | |
| return CreateBuilder().MergeDelimitedFrom(input).BuildParsed(); | |
| } | |
| public static TestXmlNoFields ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { | |
| return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed(); | |
| } | |
| public static TestXmlNoFields ParseFrom(pb::ICodedInputStream input) { | |
| return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); | |
| } | |
| public static TestXmlNoFields ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) { | |
| return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); | |
| } | |
| private TestXmlNoFields MakeReadOnly() { | |
| return this; | |
| } | |
| public static Builder CreateBuilder() { return new Builder(); } | |
| public override Builder ToBuilder() { return CreateBuilder(this); } | |
| public override Builder CreateBuilderForType() { return new Builder(); } | |
| public static Builder CreateBuilder(TestXmlNoFields prototype) { | |
| return new Builder(prototype); | |
| } | |
| [global::System.SerializableAttribute()] | |
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] | |
| public sealed partial class Builder : pb::GeneratedBuilder<TestXmlNoFields, Builder> { | |
| protected override Builder ThisBuilder { | |
| get { return this; } | |
| } | |
| public Builder() { | |
| result = DefaultInstance; | |
| resultIsReadOnly = true; | |
| } | |
| internal Builder(TestXmlNoFields cloneFrom) { | |
| result = cloneFrom; | |
| resultIsReadOnly = true; | |
| } | |
| private bool resultIsReadOnly; | |
| private TestXmlNoFields result; | |
| private TestXmlNoFields PrepareBuilder() { | |
| if (resultIsReadOnly) { | |
| TestXmlNoFields original = result; | |
| result = new TestXmlNoFields(); | |
| resultIsReadOnly = false; | |
| MergeFrom(original); | |
| } | |
| return result; | |
| } | |
| public override bool IsInitialized { | |
| get { return result.IsInitialized; } | |
| } | |
| protected override TestXmlNoFields MessageBeingBuilt { | |
| get { return PrepareBuilder(); } | |
| } | |
| public override Builder Clear() { | |
| result = DefaultInstance; | |
| resultIsReadOnly = true; | |
| return this; | |
| } | |
| public override Builder Clone() { | |
| if (resultIsReadOnly) { | |
| return new Builder(result); | |
| } else { | |
| return new Builder().MergeFrom(result); | |
| } | |
| } | |
| public override pbd::MessageDescriptor DescriptorForType { | |
| get { return global::Google.ProtocolBuffers.TestProtos.TestXmlNoFields.Descriptor; } | |
| } | |
| public override TestXmlNoFields DefaultInstanceForType { | |
| get { return global::Google.ProtocolBuffers.TestProtos.TestXmlNoFields.DefaultInstance; } | |
| } | |
| public override TestXmlNoFields BuildPartial() { | |
| if (resultIsReadOnly) { | |
| return result; | |
| } | |
| resultIsReadOnly = true; | |
| return result.MakeReadOnly(); | |
| } | |
| public override Builder MergeFrom(pb::IMessage other) { | |
| if (other is TestXmlNoFields) { | |
| return MergeFrom((TestXmlNoFields) other); | |
| } else { | |
| base.MergeFrom(other); | |
| return this; | |
| } | |
| } | |
| public override Builder MergeFrom(TestXmlNoFields other) { | |
| if (other == global::Google.ProtocolBuffers.TestProtos.TestXmlNoFields.DefaultInstance) return this; | |
| PrepareBuilder(); | |
| this.MergeUnknownFields(other.UnknownFields); | |
| return this; | |
| } | |
| public override Builder MergeFrom(pb::ICodedInputStream input) { | |
| return MergeFrom(input, pb::ExtensionRegistry.Empty); | |
| } | |
| public override Builder MergeFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) { | |
| PrepareBuilder(); | |
| pb::UnknownFieldSet.Builder unknownFields = null; | |
| uint tag; | |
| string field_name; | |
| while (input.ReadTag(out tag, out field_name)) { | |
| if(tag == 0 && field_name != null) { | |
| int field_ordinal = global::System.Array.BinarySearch(_testXmlNoFieldsFieldNames, field_name, global::System.StringComparer.Ordinal); | |
| if(field_ordinal >= 0) | |
| tag = _testXmlNoFieldsFieldTags[field_ordinal]; | |
| else { | |
| if (unknownFields == null) { | |
| unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields); | |
| } | |
| ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name); | |
| continue; | |
| } | |
| } | |
| switch (tag) { | |
| case 0: { | |
| throw pb::InvalidProtocolBufferException.InvalidTag(); | |
| } | |
| default: { | |
| if (pb::WireFormat.IsEndGroupTag(tag)) { | |
| if (unknownFields != null) { | |
| this.UnknownFields = unknownFields.Build(); | |
| } | |
| return this; | |
| } | |
| if (unknownFields == null) { | |
| unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields); | |
| } | |
| ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name); | |
| break; | |
| } | |
| } | |
| } | |
| if (unknownFields != null) { | |
| this.UnknownFields = unknownFields.Build(); | |
| } | |
| return this; | |
| } | |
| } | |
| static TestXmlNoFields() { | |
| object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestXmlSerializerTestProtoFile.Descriptor, null); | |
| } | |
| } | |
| [global::System.SerializableAttribute()] | |
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] | |
| public sealed partial class TestXmlRescursive : pb::GeneratedMessage<TestXmlRescursive, TestXmlRescursive.Builder> { | |
| private TestXmlRescursive() { } | |
| private static readonly TestXmlRescursive defaultInstance = new TestXmlRescursive().MakeReadOnly(); | |
| private static readonly string[] _testXmlRescursiveFieldNames = new string[] { "child" }; | |
| private static readonly uint[] _testXmlRescursiveFieldTags = new uint[] { 10 }; | |
| public static TestXmlRescursive DefaultInstance { | |
| get { return defaultInstance; } | |
| } | |
| public override TestXmlRescursive DefaultInstanceForType { | |
| get { return DefaultInstance; } | |
| } | |
| protected override TestXmlRescursive ThisMessage { | |
| get { return this; } | |
| } | |
| public static pbd::MessageDescriptor Descriptor { | |
| get { return global::Google.ProtocolBuffers.TestProtos.UnitTestXmlSerializerTestProtoFile.internal__static_protobuf_unittest_extra_TestXmlRescursive__Descriptor; } | |
| } | |
| protected override pb::FieldAccess.FieldAccessorTable<TestXmlRescursive, TestXmlRescursive.Builder> InternalFieldAccessors { | |
| get { return global::Google.ProtocolBuffers.TestProtos.UnitTestXmlSerializerTestProtoFile.internal__static_protobuf_unittest_extra_TestXmlRescursive__FieldAccessorTable; } | |
| } | |
| public const int ChildFieldNumber = 1; | |
| private bool hasChild; | |
| private global::Google.ProtocolBuffers.TestProtos.TestXmlRescursive child_; | |
| public bool HasChild { | |
| get { return hasChild; } | |
| } | |
| public global::Google.ProtocolBuffers.TestProtos.TestXmlRescursive Child { | |
| get { return child_ ?? global::Google.ProtocolBuffers.TestProtos.TestXmlRescursive.DefaultInstance; } | |
| } | |
| public override bool IsInitialized { | |
| get { | |
| return true; | |
| } | |
| } | |
| public override void WriteTo(pb::ICodedOutputStream output) { | |
| CalcSerializedSize(); | |
| string[] field_names = _testXmlRescursiveFieldNames; | |
| if (hasChild) { | |
| output.WriteMessage(1, field_names[0], Child); | |
| } | |
| UnknownFields.WriteTo(output); | |
| } | |
| private int memoizedSerializedSize = -1; | |
| public override int SerializedSize { | |
| get { | |
| int size = memoizedSerializedSize; | |
| if (size != -1) return size; | |
| return CalcSerializedSize(); | |
| } | |
| } | |
| private int CalcSerializedSize() { | |
| int size = memoizedSerializedSize; | |
| if (size != -1) return size; | |
| size = 0; | |
| if (hasChild) { | |
| size += pb::CodedOutputStream.ComputeMessageSize(1, Child); | |
| } | |
| size += UnknownFields.SerializedSize; | |
| memoizedSerializedSize = size; | |
| return size; | |
| } | |
| public static TestXmlRescursive ParseFrom(pb::ByteString data) { | |
| return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); | |
| } | |
| public static TestXmlRescursive ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) { | |
| return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); | |
| } | |
| public static TestXmlRescursive ParseFrom(byte[] data) { | |
| return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); | |
| } | |
| public static TestXmlRescursive ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) { | |
| return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); | |
| } | |
| public static TestXmlRescursive ParseFrom(global::System.IO.Stream input) { | |
| return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); | |
| } | |
| public static TestXmlRescursive ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { | |
| return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); | |
| } | |
| public static TestXmlRescursive ParseDelimitedFrom(global::System.IO.Stream input) { | |
| return CreateBuilder().MergeDelimitedFrom(input).BuildParsed(); | |
| } | |
| public static TestXmlRescursive ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { | |
| return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed(); | |
| } | |
| public static TestXmlRescursive ParseFrom(pb::ICodedInputStream input) { | |
| return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); | |
| } | |
| public static TestXmlRescursive ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) { | |
| return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); | |
| } | |
| private TestXmlRescursive MakeReadOnly() { | |
| return this; | |
| } | |
| public static Builder CreateBuilder() { return new Builder(); } | |
| public override Builder ToBuilder() { return CreateBuilder(this); } | |
| public override Builder CreateBuilderForType() { return new Builder(); } | |
| public static Builder CreateBuilder(TestXmlRescursive prototype) { | |
| return new Builder(prototype); | |
| } | |
| [global::System.SerializableAttribute()] | |
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] | |
| public sealed partial class Builder : pb::GeneratedBuilder<TestXmlRescursive, Builder> { | |
| protected override Builder ThisBuilder { | |
| get { return this; } | |
| } | |
| public Builder() { | |
| result = DefaultInstance; | |
| resultIsReadOnly = true; | |
| } | |
| internal Builder(TestXmlRescursive cloneFrom) { | |
| result = cloneFrom; | |
| resultIsReadOnly = true; | |
| } | |
| private bool resultIsReadOnly; | |
| private TestXmlRescursive result; | |
| private TestXmlRescursive PrepareBuilder() { | |
| if (resultIsReadOnly) { | |
| TestXmlRescursive original = result; | |
| result = new TestXmlRescursive(); | |
| resultIsReadOnly = false; | |
| MergeFrom(original); | |
| } | |
| return result; | |
| } | |
| public override bool IsInitialized { | |
| get { return result.IsInitialized; } | |
| } | |
| protected override TestXmlRescursive MessageBeingBuilt { | |
| get { return PrepareBuilder(); } | |
| } | |
| public override Builder Clear() { | |
| result = DefaultInstance; | |
| resultIsReadOnly = true; | |
| return this; | |
| } | |
| public override Builder Clone() { | |
| if (resultIsReadOnly) { | |
| return new Builder(result); | |
| } else { | |
| return new Builder().MergeFrom(result); | |
| } | |
| } | |
| public override pbd::MessageDescriptor DescriptorForType { | |
| get { return global::Google.ProtocolBuffers.TestProtos.TestXmlRescursive.Descriptor; } | |
| } | |
| public override TestXmlRescursive DefaultInstanceForType { | |
| get { return global::Google.ProtocolBuffers.TestProtos.TestXmlRescursive.DefaultInstance; } | |
| } | |
| public override TestXmlRescursive BuildPartial() { | |
| if (resultIsReadOnly) { | |
| return result; | |
| } | |
| resultIsReadOnly = true; | |
| return result.MakeReadOnly(); | |
| } | |
| public override Builder MergeFrom(pb::IMessage other) { | |
| if (other is TestXmlRescursive) { | |
| return MergeFrom((TestXmlRescursive) other); | |
| } else { | |
| base.MergeFrom(other); | |
| return this; | |
| } | |
| } | |
| public override Builder MergeFrom(TestXmlRescursive other) { | |
| if (other == global::Google.ProtocolBuffers.TestProtos.TestXmlRescursive.DefaultInstance) return this; | |
| PrepareBuilder(); | |
| if (other.HasChild) { | |
| MergeChild(other.Child); | |
| } | |
| this.MergeUnknownFields(other.UnknownFields); | |
| return this; | |
| } | |
| public override Builder MergeFrom(pb::ICodedInputStream input) { | |
| return MergeFrom(input, pb::ExtensionRegistry.Empty); | |
| } | |
| public override Builder MergeFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) { | |
| PrepareBuilder(); | |
| pb::UnknownFieldSet.Builder unknownFields = null; | |
| uint tag; | |
| string field_name; | |
| while (input.ReadTag(out tag, out field_name)) { | |
| if(tag == 0 && field_name != null) { | |
| int field_ordinal = global::System.Array.BinarySearch(_testXmlRescursiveFieldNames, field_name, global::System.StringComparer.Ordinal); | |
| if(field_ordinal >= 0) | |
| tag = _testXmlRescursiveFieldTags[field_ordinal]; | |
| else { | |
| if (unknownFields == null) { | |
| unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields); | |
| } | |
| ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name); | |
| continue; | |
| } | |
| } | |
| switch (tag) { | |
| case 0: { | |
| throw pb::InvalidProtocolBufferException.InvalidTag(); | |
| } | |
| default: { | |
| if (pb::WireFormat.IsEndGroupTag(tag)) { | |
| if (unknownFields != null) { | |
| this.UnknownFields = unknownFields.Build(); | |
| } | |
| return this; | |
| } | |
| if (unknownFields == null) { | |
| unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields); | |
| } | |
| ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name); | |
| break; | |
| } | |
| case 10: { | |
| global::Google.ProtocolBuffers.TestProtos.TestXmlRescursive.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.TestXmlRescursive.CreateBuilder(); | |
| if (result.hasChild) { | |
| subBuilder.MergeFrom(Child); | |
| } | |
| input.ReadMessage(subBuilder, extensionRegistry); | |
| Child = subBuilder.BuildPartial(); | |
| break; | |
| } | |
| } | |
| } | |
| if (unknownFields != null) { | |
| this.UnknownFields = unknownFields.Build(); | |
| } | |
| return this; | |
| } | |
| public bool HasChild { | |
| get { return result.hasChild; } | |
| } | |
| public global::Google.ProtocolBuffers.TestProtos.TestXmlRescursive Child { | |
| get { return result.Child; } | |
| set { SetChild(value); } | |
| } | |
| public Builder SetChild(global::Google.ProtocolBuffers.TestProtos.TestXmlRescursive value) { | |
| pb::ThrowHelper.ThrowIfNull(value, "value"); | |
| PrepareBuilder(); | |
| result.hasChild = true; | |
| result.child_ = value; | |
| return this; | |
| } | |
| public Builder SetChild(global::Google.ProtocolBuffers.TestProtos.TestXmlRescursive.Builder builderForValue) { | |
| pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue"); | |
| PrepareBuilder(); | |
| result.hasChild = true; | |
| result.child_ = builderForValue.Build(); | |
| return this; | |
| } | |
| public Builder MergeChild(global::Google.ProtocolBuffers.TestProtos.TestXmlRescursive value) { | |
| pb::ThrowHelper.ThrowIfNull(value, "value"); | |
| PrepareBuilder(); | |
| if (result.hasChild && | |
| result.child_ != global::Google.ProtocolBuffers.TestProtos.TestXmlRescursive.DefaultInstance) { | |
| result.child_ = global::Google.ProtocolBuffers.TestProtos.TestXmlRescursive.CreateBuilder(result.child_).MergeFrom(value).BuildPartial(); | |
| } else { | |
| result.child_ = value; | |
| } | |
| result.hasChild = true; | |
| return this; | |
| } | |
| public Builder ClearChild() { | |
| PrepareBuilder(); | |
| result.hasChild = false; | |
| result.child_ = null; | |
| return this; | |
| } | |
| } | |
| static TestXmlRescursive() { | |
| object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestXmlSerializerTestProtoFile.Descriptor, null); | |
| } | |
| } | |
| [global::System.SerializableAttribute()] | |
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] | |
| public sealed partial class TestXmlMessage : pb::ExtendableMessage<TestXmlMessage, TestXmlMessage.Builder> { | |
| private TestXmlMessage() { } | |
| private static readonly TestXmlMessage defaultInstance = new TestXmlMessage().MakeReadOnly(); | |
| private static readonly string[] _testXmlMessageFieldNames = new string[] { "child", "children", "number", "numbers", "text", "textlines", "valid" }; | |
| private static readonly uint[] _testXmlMessageFieldTags = new uint[] { 10, 3211, 48, 16, 26, 5602, 40 }; | |
| public static TestXmlMessage DefaultInstance { | |
| get { return defaultInstance; } | |
| } | |
| public override TestXmlMessage DefaultInstanceForType { | |
| get { return DefaultInstance; } | |
| } | |
| protected override TestXmlMessage ThisMessage { | |
| get { return this; } | |
| } | |
| public static pbd::MessageDescriptor Descriptor { | |
| get { return global::Google.ProtocolBuffers.TestProtos.UnitTestXmlSerializerTestProtoFile.internal__static_protobuf_unittest_extra_TestXmlMessage__Descriptor; } | |
| } | |
| protected override pb::FieldAccess.FieldAccessorTable<TestXmlMessage, TestXmlMessage.Builder> InternalFieldAccessors { | |
| get { return global::Google.ProtocolBuffers.TestProtos.UnitTestXmlSerializerTestProtoFile.internal__static_protobuf_unittest_extra_TestXmlMessage__FieldAccessorTable; } | |
| } | |
| #region Nested types | |
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] | |
| public static partial class Types { | |
| [global::System.SerializableAttribute()] | |
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] | |
| public sealed partial class Children : pb::GeneratedMessage<Children, Children.Builder> { | |
| private Children() { } | |
| private static readonly Children defaultInstance = new Children().MakeReadOnly(); | |
| private static readonly string[] _childrenFieldNames = new string[] { "binary", "options" }; | |
| private static readonly uint[] _childrenFieldTags = new uint[] { 34, 24 }; | |
| public static Children DefaultInstance { | |
| get { return defaultInstance; } | |
| } | |
| public override Children DefaultInstanceForType { | |
| get { return DefaultInstance; } | |
| } | |
| protected override Children ThisMessage { | |
| get { return this; } | |
| } | |
| public static pbd::MessageDescriptor Descriptor { | |
| get { return global::Google.ProtocolBuffers.TestProtos.UnitTestXmlSerializerTestProtoFile.internal__static_protobuf_unittest_extra_TestXmlMessage_Children__Descriptor; } | |
| } | |
| protected override pb::FieldAccess.FieldAccessorTable<Children, Children.Builder> InternalFieldAccessors { | |
| get { return global::Google.ProtocolBuffers.TestProtos.UnitTestXmlSerializerTestProtoFile.internal__static_protobuf_unittest_extra_TestXmlMessage_Children__FieldAccessorTable; } | |
| } | |
| public const int OptionsFieldNumber = 3; | |
| private pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.EnumOptions> options_ = new pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.EnumOptions>(); | |
| public scg::IList<global::Google.ProtocolBuffers.TestProtos.EnumOptions> OptionsList { | |
| get { return pbc::Lists.AsReadOnly(options_); } | |
| } | |
| public int OptionsCount { | |
| get { return options_.Count; } | |
| } | |
| public global::Google.ProtocolBuffers.TestProtos.EnumOptions GetOptions(int index) { | |
| return options_[index]; | |
| } | |
| public const int BinaryFieldNumber = 4; | |
| private bool hasBinary; | |
| private pb::ByteString binary_ = pb::ByteString.Empty; | |
| public bool HasBinary { | |
| get { return hasBinary; } | |
| } | |
| public pb::ByteString Binary { | |
| get { return binary_; } | |
| } | |
| public override bool IsInitialized { | |
| get { | |
| return true; | |
| } | |
| } | |
| public override void WriteTo(pb::ICodedOutputStream output) { | |
| CalcSerializedSize(); | |
| string[] field_names = _childrenFieldNames; | |
| if (options_.Count > 0) { | |
| output.WriteEnumArray(3, field_names[1], options_); | |
| } | |
| if (hasBinary) { | |
| output.WriteBytes(4, field_names[0], Binary); | |
| } | |
| UnknownFields.WriteTo(output); | |
| } | |
| private int memoizedSerializedSize = -1; | |
| public override int SerializedSize { | |
| get { | |
| int size = memoizedSerializedSize; | |
| if (size != -1) return size; | |
| return CalcSerializedSize(); | |
| } | |
| } | |
| private int CalcSerializedSize() { | |
| int size = memoizedSerializedSize; | |
| if (size != -1) return size; | |
| size = 0; | |
| { | |
| int dataSize = 0; | |
| if (options_.Count > 0) { | |
| foreach (global::Google.ProtocolBuffers.TestProtos.EnumOptions element in options_) { | |
| dataSize += pb::CodedOutputStream.ComputeEnumSizeNoTag((int) element); | |
| } | |
| size += dataSize; | |
| size += 1 * options_.Count; | |
| } | |
| } | |
| if (hasBinary) { | |
| size += pb::CodedOutputStream.ComputeBytesSize(4, Binary); | |
| } | |
| size += UnknownFields.SerializedSize; | |
| memoizedSerializedSize = size; | |
| return size; | |
| } | |
| public static Children ParseFrom(pb::ByteString data) { | |
| return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); | |
| } | |
| public static Children ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) { | |
| return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); | |
| } | |
| public static Children ParseFrom(byte[] data) { | |
| return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); | |
| } | |
| public static Children ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) { | |
| return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); | |
| } | |
| public static Children ParseFrom(global::System.IO.Stream input) { | |
| return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); | |
| } | |
| public static Children ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { | |
| return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); | |
| } | |
| public static Children ParseDelimitedFrom(global::System.IO.Stream input) { | |
| return CreateBuilder().MergeDelimitedFrom(input).BuildParsed(); | |
| } | |
| public static Children ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { | |
| return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed(); | |
| } | |
| public static Children ParseFrom(pb::ICodedInputStream input) { | |
| return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); | |
| } | |
| public static Children ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) { | |
| return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); | |
| } | |
| private Children MakeReadOnly() { | |
| options_.MakeReadOnly(); | |
| return this; | |
| } | |
| public static Builder CreateBuilder() { return new Builder(); } | |
| public override Builder ToBuilder() { return CreateBuilder(this); } | |
| public override Builder CreateBuilderForType() { return new Builder(); } | |
| public static Builder CreateBuilder(Children prototype) { | |
| return new Builder(prototype); | |
| } | |
| [global::System.SerializableAttribute()] | |
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] | |
| public sealed partial class Builder : pb::GeneratedBuilder<Children, Builder> { | |
| protected override Builder ThisBuilder { | |
| get { return this; } | |
| } | |
| public Builder() { | |
| result = DefaultInstance; | |
| resultIsReadOnly = true; | |
| } | |
| internal Builder(Children cloneFrom) { | |
| result = cloneFrom; | |
| resultIsReadOnly = true; | |
| } | |
| private bool resultIsReadOnly; | |
| private Children result; | |
| private Children PrepareBuilder() { | |
| if (resultIsReadOnly) { | |
| Children original = result; | |
| result = new Children(); | |
| resultIsReadOnly = false; | |
| MergeFrom(original); | |
| } | |
| return result; | |
| } | |
| public override bool IsInitialized { | |
| get { return result.IsInitialized; } | |
| } | |
| protected override Children MessageBeingBuilt { | |
| get { return PrepareBuilder(); } | |
| } | |
| public override Builder Clear() { | |
| result = DefaultInstance; | |
| resultIsReadOnly = true; | |
| return this; | |
| } | |
| public override Builder Clone() { | |
| if (resultIsReadOnly) { | |
| return new Builder(result); | |
| } else { | |
| return new Builder().MergeFrom(result); | |
| } | |
| } | |
| public override pbd::MessageDescriptor DescriptorForType { | |
| get { return global::Google.ProtocolBuffers.TestProtos.TestXmlMessage.Types.Children.Descriptor; } | |
| } | |
| public override Children DefaultInstanceForType { | |
| get { return global::Google.ProtocolBuffers.TestProtos.TestXmlMessage.Types.Children.DefaultInstance; } | |
| } | |
| public override Children BuildPartial() { | |
| if (resultIsReadOnly) { | |
| return result; | |
| } | |
| resultIsReadOnly = true; | |
| return result.MakeReadOnly(); | |
| } | |
| public override Builder MergeFrom(pb::IMessage other) { | |
| if (other is Children) { | |
| return MergeFrom((Children) other); | |
| } else { | |
| base.MergeFrom(other); | |
| return this; | |
| } | |
| } | |
| public override Builder MergeFrom(Children other) { | |
| if (other == global::Google.ProtocolBuffers.TestProtos.TestXmlMessage.Types.Children.DefaultInstance) return this; | |
| PrepareBuilder(); | |
| if (other.options_.Count != 0) { | |
| result.options_.Add(other.options_); | |
| } | |
| if (other.HasBinary) { | |
| Binary = other.Binary; | |
| } | |
| this.MergeUnknownFields(other.UnknownFields); | |
| return this; | |
| } | |
| public override Builder MergeFrom(pb::ICodedInputStream input) { | |
| return MergeFrom(input, pb::ExtensionRegistry.Empty); | |
| } | |
| public override Builder MergeFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) { | |
| PrepareBuilder(); | |
| pb::UnknownFieldSet.Builder unknownFields = null; | |
| uint tag; | |
| string field_name; | |
| while (input.ReadTag(out tag, out field_name)) { | |
| if(tag == 0 && field_name != null) { | |
| int field_ordinal = global::System.Array.BinarySearch(_childrenFieldNames, field_name, global::System.StringComparer.Ordinal); | |
| if(field_ordinal >= 0) | |
| tag = _childrenFieldTags[field_ordinal]; | |
| else { | |
| if (unknownFields == null) { | |
| unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields); | |
| } | |
| ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name); | |
| continue; | |
| } | |
| } | |
| switch (tag) { | |
| case 0: { | |
| throw pb::InvalidProtocolBufferException.InvalidTag(); | |
| } | |
| default: { | |
| if (pb::WireFormat.IsEndGroupTag(tag)) { | |
| if (unknownFields != null) { | |
| this.UnknownFields = unknownFields.Build(); | |
| } | |
| return this; | |
| } | |
| if (unknownFields == null) { | |
| unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields); | |
| } | |
| ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name); | |
| break; | |
| } | |
| case 26: | |
| case 24: { | |
| scg::ICollection<object> unknownItems; | |
| input.ReadEnumArray<global::Google.ProtocolBuffers.TestProtos.EnumOptions>(tag, field_name, result.options_, out unknownItems); | |
| if (unknownItems != null) { | |
| if (unknownFields == null) { | |
| unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields); | |
| } | |
| foreach (object rawValue in unknownItems) | |
| if (rawValue is int) | |
| unknownFields.MergeVarintField(3, (ulong)(int)rawValue); | |
| } | |
| break; | |
| } | |
| case 34: { | |
| result.hasBinary = input.ReadBytes(ref result.binary_); | |
| break; | |
| } | |
| } | |
| } | |
| if (unknownFields != null) { | |
| this.UnknownFields = unknownFields.Build(); | |
| } | |
| return this; | |
| } | |
| public pbc::IPopsicleList<global::Google.ProtocolBuffers.TestProtos.EnumOptions> OptionsList { | |
| get { return PrepareBuilder().options_; } | |
| } | |
| public int OptionsCount { | |
| get { return result.OptionsCount; } | |
| } | |
| public global::Google.ProtocolBuffers.TestProtos.EnumOptions GetOptions(int index) { | |
| return result.GetOptions(index); | |
| } | |
| public Builder SetOptions(int index, global::Google.ProtocolBuffers.TestProtos.EnumOptions value) { | |
| PrepareBuilder(); | |
| result.options_[index] = value; | |
| return this; | |
| } | |
| public Builder AddOptions(global::Google.ProtocolBuffers.TestProtos.EnumOptions value) { | |
| PrepareBuilder(); | |
| result.options_.Add(value); | |
| return this; | |
| } | |
| public Builder AddRangeOptions(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.EnumOptions> values) { | |
| PrepareBuilder(); | |
| result.options_.Add(values); | |
| return this; | |
| } | |
| public Builder ClearOptions() { | |
| PrepareBuilder(); | |
| result.options_.Clear(); | |
| return this; | |
| } | |
| public bool HasBinary { | |
| get { return result.hasBinary; } | |
| } | |
| public pb::ByteString Binary { | |
| get { return result.Binary; } | |
| set { SetBinary(value); } | |
| } | |
| public Builder SetBinary(pb::ByteString value) { | |
| pb::ThrowHelper.ThrowIfNull(value, "value"); | |
| PrepareBuilder(); | |
| result.hasBinary = true; | |
| result.binary_ = value; | |
| return this; | |
| } | |
| public Builder ClearBinary() { | |
| PrepareBuilder(); | |
| result.hasBinary = false; | |
| result.binary_ = pb::ByteString.Empty; | |
| return this; | |
| } | |
| } | |
| static Children() { | |
| object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestXmlSerializerTestProtoFile.Descriptor, null); | |
| } | |
| } | |
| } | |
| #endregion | |
| public const int NumberFieldNumber = 6; | |
| private bool hasNumber; | |
| private long number_; | |
| public bool HasNumber { | |
| get { return hasNumber; } | |
| } | |
| public long Number { | |
| get { return number_; } | |
| } | |
| public const int NumbersFieldNumber = 2; | |
| private pbc::PopsicleList<int> numbers_ = new pbc::PopsicleList<int>(); | |
| public scg::IList<int> NumbersList { | |
| get { return pbc::Lists.AsReadOnly(numbers_); } | |
| } | |
| public int NumbersCount { | |
| get { return numbers_.Count; } | |
| } | |
| public int GetNumbers(int index) { | |
| return numbers_[index]; | |
| } | |
| public const int TextFieldNumber = 3; | |
| private bool hasText; | |
| private string text_ = ""; | |
| public bool HasText { | |
| get { return hasText; } | |
| } | |
| public string Text { | |
| get { return text_; } | |
| } | |
| public const int TextlinesFieldNumber = 700; | |
| private pbc::PopsicleList<string> textlines_ = new pbc::PopsicleList<string>(); | |
| public scg::IList<string> TextlinesList { | |
| get { return pbc::Lists.AsReadOnly(textlines_); } | |
| } | |
| public int TextlinesCount { | |
| get { return textlines_.Count; } | |
| } | |
| public string GetTextlines(int index) { | |
| return textlines_[index]; | |
| } | |
| public const int ValidFieldNumber = 5; | |
| private bool hasValid; | |
| private bool valid_; | |
| public bool HasValid { | |
| get { return hasValid; } | |
| } | |
| public bool Valid { | |
| get { return valid_; } | |
| } | |
| public const int ChildFieldNumber = 1; | |
| private bool hasChild; | |
| private global::Google.ProtocolBuffers.TestProtos.TestXmlChild child_; | |
| public bool HasChild { | |
| get { return hasChild; } | |
| } | |
| public global::Google.ProtocolBuffers.TestProtos.TestXmlChild Child { | |
| get { return child_ ?? global::Google.ProtocolBuffers.TestProtos.TestXmlChild.DefaultInstance; } | |
| } | |
| public const int ChildrenFieldNumber = 401; | |
| private pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.TestXmlMessage.Types.Children> children_ = new pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.TestXmlMessage.Types.Children>(); | |
| public scg::IList<global::Google.ProtocolBuffers.TestProtos.TestXmlMessage.Types.Children> ChildrenList { | |
| get { return children_; } | |
| } | |
| public int ChildrenCount { | |
| get { return children_.Count; } | |
| } | |
| public global::Google.ProtocolBuffers.TestProtos.TestXmlMessage.Types.Children GetChildren(int index) { | |
| return children_[index]; | |
| } | |
| public override bool IsInitialized { | |
| get { | |
| if (!ExtensionsAreInitialized) return false; | |
| return true; | |
| } | |
| } | |
| public override void WriteTo(pb::ICodedOutputStream output) { | |
| CalcSerializedSize(); | |
| string[] field_names = _testXmlMessageFieldNames; | |
| pb::ExtendableMessage<TestXmlMessage, TestXmlMessage.Builder>.ExtensionWriter extensionWriter = CreateExtensionWriter(this); | |
| if (hasChild) { | |
| output.WriteMessage(1, field_names[0], Child); | |
| } | |
| if (numbers_.Count > 0) { | |
| output.WriteInt32Array(2, field_names[3], numbers_); | |
| } | |
| if (hasText) { | |
| output.WriteString(3, field_names[4], Text); | |
| } | |
| if (hasValid) { | |
| output.WriteBool(5, field_names[6], Valid); | |
| } | |
| if (hasNumber) { | |
| output.WriteInt64(6, field_names[2], Number); | |
| } | |
| extensionWriter.WriteUntil(200, output); | |
| if (children_.Count > 0) { | |
| output.WriteGroupArray(401, field_names[1], children_); | |
| } | |
| if (textlines_.Count > 0) { | |
| output.WriteStringArray(700, field_names[5], textlines_); | |
| } | |
| UnknownFields.WriteTo(output); | |
| } | |
| private int memoizedSerializedSize = -1; | |
| public override int SerializedSize { | |
| get { | |
| int size = memoizedSerializedSize; | |
| if (size != -1) return size; | |
| return CalcSerializedSize(); | |
| } | |
| } | |
| private int CalcSerializedSize() { | |
| int size = memoizedSerializedSize; | |
| if (size != -1) return size; | |
| size = 0; | |
| if (hasNumber) { | |
| size += pb::CodedOutputStream.ComputeInt64Size(6, Number); | |
| } | |
| { | |
| int dataSize = 0; | |
| foreach (int element in NumbersList) { | |
| dataSize += pb::CodedOutputStream.ComputeInt32SizeNoTag(element); | |
| } | |
| size += dataSize; | |
| size += 1 * numbers_.Count; | |
| } | |
| if (hasText) { | |
| size += pb::CodedOutputStream.ComputeStringSize(3, Text); | |
| } | |
| { | |
| int dataSize = 0; | |
| foreach (string element in TextlinesList) { | |
| dataSize += pb::CodedOutputStream.ComputeStringSizeNoTag(element); | |
| } | |
| size += dataSize; | |
| size += 2 * textlines_.Count; | |
| } | |
| if (hasValid) { | |
| size += pb::CodedOutputStream.ComputeBoolSize(5, Valid); | |
| } | |
| if (hasChild) { | |
| size += pb::CodedOutputStream.ComputeMessageSize(1, Child); | |
| } | |
| foreach (global::Google.ProtocolBuffers.TestProtos.TestXmlMessage.Types.Children element in ChildrenList) { | |
| size += pb::CodedOutputStream.ComputeGroupSize(401, element); | |
| } | |
| size += ExtensionsSerializedSize; | |
| size += UnknownFields.SerializedSize; | |
| memoizedSerializedSize = size; | |
| return size; | |
| } | |
| public static TestXmlMessage ParseFrom(pb::ByteString data) { | |
| return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); | |
| } | |
| public static TestXmlMessage ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) { | |
| return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); | |
| } | |
| public static TestXmlMessage ParseFrom(byte[] data) { | |
| return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); | |
| } | |
| public static TestXmlMessage ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) { | |
| return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); | |
| } | |
| public static TestXmlMessage ParseFrom(global::System.IO.Stream input) { | |
| return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); | |
| } | |
| public static TestXmlMessage ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { | |
| return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); | |
| } | |
| public static TestXmlMessage ParseDelimitedFrom(global::System.IO.Stream input) { | |
| return CreateBuilder().MergeDelimitedFrom(input).BuildParsed(); | |
| } | |
| public static TestXmlMessage ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { | |
| return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed(); | |
| } | |
| public static TestXmlMessage ParseFrom(pb::ICodedInputStream input) { | |
| return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); | |
| } | |
| public static TestXmlMessage ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) { | |
| return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); | |
| } | |
| private TestXmlMessage MakeReadOnly() { | |
| numbers_.MakeReadOnly(); | |
| textlines_.MakeReadOnly(); | |
| children_.MakeReadOnly(); | |
| return this; | |
| } | |
| public static Builder CreateBuilder() { return new Builder(); } | |
| public override Builder ToBuilder() { return CreateBuilder(this); } | |
| public override Builder CreateBuilderForType() { return new Builder(); } | |
| public static Builder CreateBuilder(TestXmlMessage prototype) { | |
| return new Builder(prototype); | |
| } | |
| [global::System.SerializableAttribute()] | |
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] | |
| public sealed partial class Builder : pb::ExtendableBuilder<TestXmlMessage, Builder> { | |
| protected override Builder ThisBuilder { | |
| get { return this; } | |
| } | |
| public Builder() { | |
| result = DefaultInstance; | |
| resultIsReadOnly = true; | |
| } | |
| internal Builder(TestXmlMessage cloneFrom) { | |
| result = cloneFrom; | |
| resultIsReadOnly = true; | |
| } | |
| private bool resultIsReadOnly; | |
| private TestXmlMessage result; | |
| private TestXmlMessage PrepareBuilder() { | |
| if (resultIsReadOnly) { | |
| TestXmlMessage original = result; | |
| result = new TestXmlMessage(); | |
| resultIsReadOnly = false; | |
| MergeFrom(original); | |
| } | |
| return result; | |
| } | |
| public override bool IsInitialized { | |
| get { return result.IsInitialized; } | |
| } | |
| protected override TestXmlMessage MessageBeingBuilt { | |
| get { return PrepareBuilder(); } | |
| } | |
| public override Builder Clear() { | |
| result = DefaultInstance; | |
| resultIsReadOnly = true; | |
| return this; | |
| } | |
| public override Builder Clone() { | |
| if (resultIsReadOnly) { | |
| return new Builder(result); | |
| } else { | |
| return new Builder().MergeFrom(result); | |
| } | |
| } | |
| public override pbd::MessageDescriptor DescriptorForType { | |
| get { return global::Google.ProtocolBuffers.TestProtos.TestXmlMessage.Descriptor; } | |
| } | |
| public override TestXmlMessage DefaultInstanceForType { | |
| get { return global::Google.ProtocolBuffers.TestProtos.TestXmlMessage.DefaultInstance; } | |
| } | |
| public override TestXmlMessage BuildPartial() { | |
| if (resultIsReadOnly) { | |
| return result; | |
| } | |
| resultIsReadOnly = true; | |
| return result.MakeReadOnly(); | |
| } | |
| public override Builder MergeFrom(pb::IMessage other) { | |
| if (other is TestXmlMessage) { | |
| return MergeFrom((TestXmlMessage) other); | |
| } else { | |
| base.MergeFrom(other); | |
| return this; | |
| } | |
| } | |
| public override Builder MergeFrom(TestXmlMessage other) { | |
| if (other == global::Google.ProtocolBuffers.TestProtos.TestXmlMessage.DefaultInstance) return this; | |
| PrepareBuilder(); | |
| if (other.HasNumber) { | |
| Number = other.Number; | |
| } | |
| if (other.numbers_.Count != 0) { | |
| result.numbers_.Add(other.numbers_); | |
| } | |
| if (other.HasText) { | |
| Text = other.Text; | |
| } | |
| if (other.textlines_.Count != 0) { | |
| result.textlines_.Add(other.textlines_); | |
| } | |
| if (other.HasValid) { | |
| Valid = other.Valid; | |
| } | |
| if (other.HasChild) { | |
| MergeChild(other.Child); | |
| } | |
| if (other.children_.Count != 0) { | |
| result.children_.Add(other.children_); | |
| } | |
| this.MergeExtensionFields(other); | |
| this.MergeUnknownFields(other.UnknownFields); | |
| return this; | |
| } | |
| public override Builder MergeFrom(pb::ICodedInputStream input) { | |
| return MergeFrom(input, pb::ExtensionRegistry.Empty); | |
| } | |
| public override Builder MergeFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) { | |
| PrepareBuilder(); | |
| pb::UnknownFieldSet.Builder unknownFields = null; | |
| uint tag; | |
| string field_name; | |
| while (input.ReadTag(out tag, out field_name)) { | |
| if(tag == 0 && field_name != null) { | |
| int field_ordinal = global::System.Array.BinarySearch(_testXmlMessageFieldNames, field_name, global::System.StringComparer.Ordinal); | |
| if(field_ordinal >= 0) | |
| tag = _testXmlMessageFieldTags[field_ordinal]; | |
| else { | |
| if (unknownFields == null) { | |
| unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields); | |
| } | |
| ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name); | |
| continue; | |
| } | |
| } | |
| switch (tag) { | |
| case 0: { | |
| throw pb::InvalidProtocolBufferException.InvalidTag(); | |
| } | |
| default: { | |
| if (pb::WireFormat.IsEndGroupTag(tag)) { | |
| if (unknownFields != null) { | |
| this.UnknownFields = unknownFields.Build(); | |
| } | |
| return this; | |
| } | |
| if (unknownFields == null) { | |
| unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields); | |
| } | |
| ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name); | |
| break; | |
| } | |
| case 10: { | |
| global::Google.ProtocolBuffers.TestProtos.TestXmlChild.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.TestXmlChild.CreateBuilder(); | |
| if (result.hasChild) { | |
| subBuilder.MergeFrom(Child); | |
| } | |
| input.ReadMessage(subBuilder, extensionRegistry); | |
| Child = subBuilder.BuildPartial(); | |
| break; | |
| } | |
| case 18: | |
| case 16: { | |
| input.ReadInt32Array(tag, field_name, result.numbers_); | |
| break; | |
| } | |
| case 26: { | |
| result.hasText = input.ReadString(ref result.text_); | |
| break; | |
| } | |
| case 40: { | |
| result.hasValid = input.ReadBool(ref result.valid_); | |
| break; | |
| } | |
| case 48: { | |
| result.hasNumber = input.ReadInt64(ref result.number_); | |
| break; | |
| } | |
| case 3211: { | |
| input.ReadGroupArray(tag, field_name, result.children_, global::Google.ProtocolBuffers.TestProtos.TestXmlMessage.Types.Children.DefaultInstance, extensionRegistry); | |
| break; | |
| } | |
| case 5602: { | |
| input.ReadStringArray(tag, field_name, result.textlines_); | |
| break; | |
| } | |
| } | |
| } | |
| if (unknownFields != null) { | |
| this.UnknownFields = unknownFields.Build(); | |
| } | |
| return this; | |
| } | |
| public bool HasNumber { | |
| get { return result.hasNumber; } | |
| } | |
| public long Number { | |
| get { return result.Number; } | |
| set { SetNumber(value); } | |
| } | |
| public Builder SetNumber(long value) { | |
| PrepareBuilder(); | |
| result.hasNumber = true; | |
| result.number_ = value; | |
| return this; | |
| } | |
| public Builder ClearNumber() { | |
| PrepareBuilder(); | |
| result.hasNumber = false; | |
| result.number_ = 0L; | |
| return this; | |
| } | |
| public pbc::IPopsicleList<int> NumbersList { | |
| get { return PrepareBuilder().numbers_; } | |
| } | |
| public int NumbersCount { | |
| get { return result.NumbersCount; } | |
| } | |
| public int GetNumbers(int index) { | |
| return result.GetNumbers(index); | |
| } | |
| public Builder SetNumbers(int index, int value) { | |
| PrepareBuilder(); | |
| result.numbers_[index] = value; | |
| return this; | |
| } | |
| public Builder AddNumbers(int value) { | |
| PrepareBuilder(); | |
| result.numbers_.Add(value); | |
| return this; | |
| } | |
| public Builder AddRangeNumbers(scg::IEnumerable<int> values) { | |
| PrepareBuilder(); | |
| result.numbers_.Add(values); | |
| return this; | |
| } | |
| public Builder ClearNumbers() { | |
| PrepareBuilder(); | |
| result.numbers_.Clear(); | |
| return this; | |
| } | |
| public bool HasText { | |
| get { return result.hasText; } | |
| } | |
| public string Text { | |
| get { return result.Text; } | |
| set { SetText(value); } | |
| } | |
| public Builder SetText(string value) { | |
| pb::ThrowHelper.ThrowIfNull(value, "value"); | |
| PrepareBuilder(); | |
| result.hasText = true; | |
| result.text_ = value; | |
| return this; | |
| } | |
| public Builder ClearText() { | |
| PrepareBuilder(); | |
| result.hasText = false; | |
| result.text_ = ""; | |
| return this; | |
| } | |
| public pbc::IPopsicleList<string> TextlinesList { | |
| get { return PrepareBuilder().textlines_; } | |
| } | |
| public int TextlinesCount { | |
| get { return result.TextlinesCount; } | |
| } | |
| public string GetTextlines(int index) { | |
| return result.GetTextlines(index); | |
| } | |
| public Builder SetTextlines(int index, string value) { | |
| pb::ThrowHelper.ThrowIfNull(value, "value"); | |
| PrepareBuilder(); | |
| result.textlines_[index] = value; | |
| return this; | |
| } | |
| public Builder AddTextlines(string value) { | |
| pb::ThrowHelper.ThrowIfNull(value, "value"); | |
| PrepareBuilder(); | |
| result.textlines_.Add(value); | |
| return this; | |
| } | |
| public Builder AddRangeTextlines(scg::IEnumerable<string> values) { | |
| PrepareBuilder(); | |
| result.textlines_.Add(values); | |
| return this; | |
| } | |
| public Builder ClearTextlines() { | |
| PrepareBuilder(); | |
| result.textlines_.Clear(); | |
| return this; | |
| } | |
| public bool HasValid { | |
| get { return result.hasValid; } | |
| } | |
| public bool Valid { | |
| get { return result.Valid; } | |
| set { SetValid(value); } | |
| } | |
| public Builder SetValid(bool value) { | |
| PrepareBuilder(); | |
| result.hasValid = true; | |
| result.valid_ = value; | |
| return this; | |
| } | |
| public Builder ClearValid() { | |
| PrepareBuilder(); | |
| result.hasValid = false; | |
| result.valid_ = false; | |
| return this; | |
| } | |
| public bool HasChild { | |
| get { return result.hasChild; } | |
| } | |
| public global::Google.ProtocolBuffers.TestProtos.TestXmlChild Child { | |
| get { return result.Child; } | |
| set { SetChild(value); } | |
| } | |
| public Builder SetChild(global::Google.ProtocolBuffers.TestProtos.TestXmlChild value) { | |
| pb::ThrowHelper.ThrowIfNull(value, "value"); | |
| PrepareBuilder(); | |
| result.hasChild = true; | |
| result.child_ = value; | |
| return this; | |
| } | |
| public Builder SetChild(global::Google.ProtocolBuffers.TestProtos.TestXmlChild.Builder builderForValue) { | |
| pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue"); | |
| PrepareBuilder(); | |
| result.hasChild = true; | |
| result.child_ = builderForValue.Build(); | |
| return this; | |
| } | |
| public Builder MergeChild(global::Google.ProtocolBuffers.TestProtos.TestXmlChild value) { | |
| pb::ThrowHelper.ThrowIfNull(value, "value"); | |
| PrepareBuilder(); | |
| if (result.hasChild && | |
| result.child_ != global::Google.ProtocolBuffers.TestProtos.TestXmlChild.DefaultInstance) { | |
| result.child_ = global::Google.ProtocolBuffers.TestProtos.TestXmlChild.CreateBuilder(result.child_).MergeFrom(value).BuildPartial(); | |
| } else { | |
| result.child_ = value; | |
| } | |
| result.hasChild = true; | |
| return this; | |
| } | |
| public Builder ClearChild() { | |
| PrepareBuilder(); | |
| result.hasChild = false; | |
| result.child_ = null; | |
| return this; | |
| } | |
| public pbc::IPopsicleList<global::Google.ProtocolBuffers.TestProtos.TestXmlMessage.Types.Children> ChildrenList { | |
| get { return PrepareBuilder().children_; } | |
| } | |
| public int ChildrenCount { | |
| get { return result.ChildrenCount; } | |
| } | |
| public global::Google.ProtocolBuffers.TestProtos.TestXmlMessage.Types.Children GetChildren(int index) { | |
| return result.GetChildren(index); | |
| } | |
| public Builder SetChildren(int index, global::Google.ProtocolBuffers.TestProtos.TestXmlMessage.Types.Children value) { | |
| pb::ThrowHelper.ThrowIfNull(value, "value"); | |
| PrepareBuilder(); | |
| result.children_[index] = value; | |
| return this; | |
| } | |
| public Builder SetChildren(int index, global::Google.ProtocolBuffers.TestProtos.TestXmlMessage.Types.Children.Builder builderForValue) { | |
| pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue"); | |
| PrepareBuilder(); | |
| result.children_[index] = builderForValue.Build(); | |
| return this; | |
| } | |
| public Builder AddChildren(global::Google.ProtocolBuffers.TestProtos.TestXmlMessage.Types.Children value) { | |
| pb::ThrowHelper.ThrowIfNull(value, "value"); | |
| PrepareBuilder(); | |
| result.children_.Add(value); | |
| return this; | |
| } | |
| public Builder AddChildren(global::Google.ProtocolBuffers.TestProtos.TestXmlMessage.Types.Children.Builder builderForValue) { | |
| pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue"); | |
| PrepareBuilder(); | |
| result.children_.Add(builderForValue.Build()); | |
| return this; | |
| } | |
| public Builder AddRangeChildren(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.TestXmlMessage.Types.Children> values) { | |
| PrepareBuilder(); | |
| result.children_.Add(values); | |
| return this; | |
| } | |
| public Builder ClearChildren() { | |
| PrepareBuilder(); | |
| result.children_.Clear(); | |
| return this; | |
| } | |
| } | |
| static TestXmlMessage() { | |
| object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestXmlSerializerTestProtoFile.Descriptor, null); | |
| } | |
| } | |
| [global::System.SerializableAttribute()] | |
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] | |
| public sealed partial class TestXmlExtension : pb::GeneratedMessage<TestXmlExtension, TestXmlExtension.Builder> { | |
| private TestXmlExtension() { } | |
| private static readonly TestXmlExtension defaultInstance = new TestXmlExtension().MakeReadOnly(); | |
| private static readonly string[] _testXmlExtensionFieldNames = new string[] { "number" }; | |
| private static readonly uint[] _testXmlExtensionFieldTags = new uint[] { 8 }; | |
| public static TestXmlExtension DefaultInstance { | |
| get { return defaultInstance; } | |
| } | |
| public override TestXmlExtension DefaultInstanceForType { | |
| get { return DefaultInstance; } | |
| } | |
| protected override TestXmlExtension ThisMessage { | |
| get { return this; } | |
| } | |
| public static pbd::MessageDescriptor Descriptor { | |
| get { return global::Google.ProtocolBuffers.TestProtos.UnitTestXmlSerializerTestProtoFile.internal__static_protobuf_unittest_extra_TestXmlExtension__Descriptor; } | |
| } | |
| protected override pb::FieldAccess.FieldAccessorTable<TestXmlExtension, TestXmlExtension.Builder> InternalFieldAccessors { | |
| get { return global::Google.ProtocolBuffers.TestProtos.UnitTestXmlSerializerTestProtoFile.internal__static_protobuf_unittest_extra_TestXmlExtension__FieldAccessorTable; } | |
| } | |
| public const int NumberFieldNumber = 1; | |
| private bool hasNumber; | |
| private int number_; | |
| public bool HasNumber { | |
| get { return hasNumber; } | |
| } | |
| public int Number { | |
| get { return number_; } | |
| } | |
| public override bool IsInitialized { | |
| get { | |
| if (!hasNumber) return false; | |
| return true; | |
| } | |
| } | |
| public override void WriteTo(pb::ICodedOutputStream output) { | |
| CalcSerializedSize(); | |
| string[] field_names = _testXmlExtensionFieldNames; | |
| if (hasNumber) { | |
| output.WriteInt32(1, field_names[0], Number); | |
| } | |
| UnknownFields.WriteTo(output); | |
| } | |
| private int memoizedSerializedSize = -1; | |
| public override int SerializedSize { | |
| get { | |
| int size = memoizedSerializedSize; | |
| if (size != -1) return size; | |
| return CalcSerializedSize(); | |
| } | |
| } | |
| private int CalcSerializedSize() { | |
| int size = memoizedSerializedSize; | |
| if (size != -1) return size; | |
| size = 0; | |
| if (hasNumber) { | |
| size += pb::CodedOutputStream.ComputeInt32Size(1, Number); | |
| } | |
| size += UnknownFields.SerializedSize; | |
| memoizedSerializedSize = size; | |
| return size; | |
| } | |
| public static TestXmlExtension ParseFrom(pb::ByteString data) { | |
| return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); | |
| } | |
| public static TestXmlExtension ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) { | |
| return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); | |
| } | |
| public static TestXmlExtension ParseFrom(byte[] data) { | |
| return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); | |
| } | |
| public static TestXmlExtension ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) { | |
| return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); | |
| } | |
| public static TestXmlExtension ParseFrom(global::System.IO.Stream input) { | |
| return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); | |
| } | |
| public static TestXmlExtension ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { | |
| return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); | |
| } | |
| public static TestXmlExtension ParseDelimitedFrom(global::System.IO.Stream input) { | |
| return CreateBuilder().MergeDelimitedFrom(input).BuildParsed(); | |
| } | |
| public static TestXmlExtension ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { | |
| return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed(); | |
| } | |
| public static TestXmlExtension ParseFrom(pb::ICodedInputStream input) { | |
| return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); | |
| } | |
| public static TestXmlExtension ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) { | |
| return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); | |
| } | |
| private TestXmlExtension MakeReadOnly() { | |
| return this; | |
| } | |
| public static Builder CreateBuilder() { return new Builder(); } | |
| public override Builder ToBuilder() { return CreateBuilder(this); } | |
| public override Builder CreateBuilderForType() { return new Builder(); } | |
| public static Builder CreateBuilder(TestXmlExtension prototype) { | |
| return new Builder(prototype); | |
| } | |
| [global::System.SerializableAttribute()] | |
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] | |
| public sealed partial class Builder : pb::GeneratedBuilder<TestXmlExtension, Builder> { | |
| protected override Builder ThisBuilder { | |
| get { return this; } | |
| } | |
| public Builder() { | |
| result = DefaultInstance; | |
| resultIsReadOnly = true; | |
| } | |
| internal Builder(TestXmlExtension cloneFrom) { | |
| result = cloneFrom; | |
| resultIsReadOnly = true; | |
| } | |
| private bool resultIsReadOnly; | |
| private TestXmlExtension result; | |
| private TestXmlExtension PrepareBuilder() { | |
| if (resultIsReadOnly) { | |
| TestXmlExtension original = result; | |
| result = new TestXmlExtension(); | |
| resultIsReadOnly = false; | |
| MergeFrom(original); | |
| } | |
| return result; | |
| } | |
| public override bool IsInitialized { | |
| get { return result.IsInitialized; } | |
| } | |
| protected override TestXmlExtension MessageBeingBuilt { | |
| get { return PrepareBuilder(); } | |
| } | |
| public override Builder Clear() { | |
| result = DefaultInstance; | |
| resultIsReadOnly = true; | |
| return this; | |
| } | |
| public override Builder Clone() { | |
| if (resultIsReadOnly) { | |
| return new Builder(result); | |
| } else { | |
| return new Builder().MergeFrom(result); | |
| } | |
| } | |
| public override pbd::MessageDescriptor DescriptorForType { | |
| get { return global::Google.ProtocolBuffers.TestProtos.TestXmlExtension.Descriptor; } | |
| } | |
| public override TestXmlExtension DefaultInstanceForType { | |
| get { return global::Google.ProtocolBuffers.TestProtos.TestXmlExtension.DefaultInstance; } | |
| } | |
| public override TestXmlExtension BuildPartial() { | |
| if (resultIsReadOnly) { | |
| return result; | |
| } | |
| resultIsReadOnly = true; | |
| return result.MakeReadOnly(); | |
| } | |
| public override Builder MergeFrom(pb::IMessage other) { | |
| if (other is TestXmlExtension) { | |
| return MergeFrom((TestXmlExtension) other); | |
| } else { | |
| base.MergeFrom(other); | |
| return this; | |
| } | |
| } | |
| public override Builder MergeFrom(TestXmlExtension other) { | |
| if (other == global::Google.ProtocolBuffers.TestProtos.TestXmlExtension.DefaultInstance) return this; | |
| PrepareBuilder(); | |
| if (other.HasNumber) { | |
| Number = other.Number; | |
| } | |
| this.MergeUnknownFields(other.UnknownFields); | |
| return this; | |
| } | |
| public override Builder MergeFrom(pb::ICodedInputStream input) { | |
| return MergeFrom(input, pb::ExtensionRegistry.Empty); | |
| } | |
| public override Builder MergeFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) { | |
| PrepareBuilder(); | |
| pb::UnknownFieldSet.Builder unknownFields = null; | |
| uint tag; | |
| string field_name; | |
| while (input.ReadTag(out tag, out field_name)) { | |
| if(tag == 0 && field_name != null) { | |
| int field_ordinal = global::System.Array.BinarySearch(_testXmlExtensionFieldNames, field_name, global::System.StringComparer.Ordinal); | |
| if(field_ordinal >= 0) | |
| tag = _testXmlExtensionFieldTags[field_ordinal]; | |
| else { | |
| if (unknownFields == null) { | |
| unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields); | |
| } | |
| ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name); | |
| continue; | |
| } | |
| } | |
| switch (tag) { | |
| case 0: { | |
| throw pb::InvalidProtocolBufferException.InvalidTag(); | |
| } | |
| default: { | |
| if (pb::WireFormat.IsEndGroupTag(tag)) { | |
| if (unknownFields != null) { | |
| this.UnknownFields = unknownFields.Build(); | |
| } | |
| return this; | |
| } | |
| if (unknownFields == null) { | |
| unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields); | |
| } | |
| ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name); | |
| break; | |
| } | |
| case 8: { | |
| result.hasNumber = input.ReadInt32(ref result.number_); | |
| break; | |
| } | |
| } | |
| } | |
| if (unknownFields != null) { | |
| this.UnknownFields = unknownFields.Build(); | |
| } | |
| return this; | |
| } | |
| public bool HasNumber { | |
| get { return result.hasNumber; } | |
| } | |
| public int Number { | |
| get { return result.Number; } | |
| set { SetNumber(value); } | |
| } | |
| public Builder SetNumber(int value) { | |
| PrepareBuilder(); | |
| result.hasNumber = true; | |
| result.number_ = value; | |
| return this; | |
| } | |
| public Builder ClearNumber() { | |
| PrepareBuilder(); | |
| result.hasNumber = false; | |
| result.number_ = 0; | |
| return this; | |
| } | |
| } | |
| static TestXmlExtension() { | |
| object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestXmlSerializerTestProtoFile.Descriptor, null); | |
| } | |
| } | |
| #endregion | |
| } | |
| #endregion Designer generated code |