csharptest | 27bfcc5 | 2011-06-02 12:04:06 -0500 | [diff] [blame] | 1 | // Generated by ProtoGen, Version=2.3.0.277, Culture=neutral, PublicKeyToken=17b3b1f090c3ea48. 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.TestProtos {
|
| 8 |
|
| 9 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
| 10 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
| 11 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
|
| 12 | public static partial class UnitTestXmlSerializerTestProtoFile {
|
| 13 |
|
| 14 | #region Extension registration
|
| 15 | public static void RegisterAllExtensions(pb::ExtensionRegistry registry) {
|
| 16 | registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestXmlSerializerTestProtoFile.ExtensionEnum);
|
| 17 | registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestXmlSerializerTestProtoFile.ExtensionText);
|
| 18 | registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestXmlSerializerTestProtoFile.ExtensionNumber);
|
| 19 | registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestXmlSerializerTestProtoFile.ExtensionMessage);
|
| 20 | }
|
| 21 | #endregion
|
| 22 | #region Extensions
|
| 23 | public const int ExtensionEnumFieldNumber = 101;
|
| 24 | public static pb::GeneratedExtensionBase<global::Google.ProtocolBuffers.TestProtos.EnumOptions> ExtensionEnum;
|
| 25 | public const int ExtensionTextFieldNumber = 102;
|
| 26 | public static pb::GeneratedExtensionBase<string> ExtensionText;
|
| 27 | public const int ExtensionNumberFieldNumber = 103;
|
| 28 | public static pb::GeneratedExtensionBase<scg::IList<int>> ExtensionNumber;
|
| 29 | public const int ExtensionMessageFieldNumber = 199;
|
| 30 | public static pb::GeneratedExtensionBase<global::Google.ProtocolBuffers.TestProtos.TestXmlExtension> ExtensionMessage;
|
| 31 | #endregion
|
| 32 |
|
| 33 | #region Static variables
|
| 34 | internal static pbd::MessageDescriptor internal__static_protobuf_unittest_extra_TestXmlChild__Descriptor;
|
| 35 | internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestXmlChild, global::Google.ProtocolBuffers.TestProtos.TestXmlChild.Builder> internal__static_protobuf_unittest_extra_TestXmlChild__FieldAccessorTable;
|
| 36 | internal static pbd::MessageDescriptor internal__static_protobuf_unittest_extra_TestXmlNoFields__Descriptor;
|
| 37 | internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestXmlNoFields, global::Google.ProtocolBuffers.TestProtos.TestXmlNoFields.Builder> internal__static_protobuf_unittest_extra_TestXmlNoFields__FieldAccessorTable;
|
| 38 | internal static pbd::MessageDescriptor internal__static_protobuf_unittest_extra_TestXmlMessage__Descriptor;
|
| 39 | internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestXmlMessage, global::Google.ProtocolBuffers.TestProtos.TestXmlMessage.Builder> internal__static_protobuf_unittest_extra_TestXmlMessage__FieldAccessorTable;
|
| 40 | internal static pbd::MessageDescriptor internal__static_protobuf_unittest_extra_TestXmlMessage_Children__Descriptor;
|
| 41 | 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;
|
| 42 | internal static pbd::MessageDescriptor internal__static_protobuf_unittest_extra_TestXmlExtension__Descriptor;
|
| 43 | internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestXmlExtension, global::Google.ProtocolBuffers.TestProtos.TestXmlExtension.Builder> internal__static_protobuf_unittest_extra_TestXmlExtension__FieldAccessorTable;
|
| 44 | #endregion
|
| 45 | #region Descriptor
|
| 46 | public static pbd::FileDescriptor Descriptor {
|
| 47 | get { return descriptor; }
|
| 48 | }
|
| 49 | private static pbd::FileDescriptor descriptor;
|
| 50 |
|
| 51 | static UnitTestXmlSerializerTestProtoFile() {
|
| 52 | byte[] descriptorData = global::System.Convert.FromBase64String(
|
| 53 | "CiRleHRlc3QvdW5pdHRlc3RfZXh0cmFzX3htbHRlc3QucHJvdG8SF3Byb3Rv" +
|
| 54 | "YnVmX3VuaXR0ZXN0X2V4dHJhGiRnb29nbGUvcHJvdG9idWYvY3NoYXJwX29w" +
|
| 55 | "dGlvbnMucHJvdG8iVQoMVGVzdFhtbENoaWxkEjUKB29wdGlvbnMYAyADKA4y" +
|
| 56 | "JC5wcm90b2J1Zl91bml0dGVzdF9leHRyYS5FbnVtT3B0aW9ucxIOCgZiaW5h" +
|
| 57 | "cnkYBCABKAwiEQoPVGVzdFhtbE5vRmllbGRzIrcCCg5UZXN0WG1sTWVzc2Fn" +
|
| 58 | "ZRIOCgZudW1iZXIYBiABKAMSDwoHbnVtYmVycxgCIAMoBRIMCgR0ZXh0GAMg" +
|
| 59 | "ASgJEhIKCXRleHRsaW5lcxi8BSADKAkSDQoFdmFsaWQYBSABKAgSNAoFY2hp" +
|
| 60 | "bGQYASABKAsyJS5wcm90b2J1Zl91bml0dGVzdF9leHRyYS5UZXN0WG1sQ2hp" +
|
| 61 | "bGQSQwoIY2hpbGRyZW4YkQMgAygKMjAucHJvdG9idWZfdW5pdHRlc3RfZXh0" +
|
| 62 | "cmEuVGVzdFhtbE1lc3NhZ2UuQ2hpbGRyZW4aUQoIQ2hpbGRyZW4SNQoHb3B0" +
|
| 63 | "aW9ucxgDIAMoDjIkLnByb3RvYnVmX3VuaXR0ZXN0X2V4dHJhLkVudW1PcHRp" +
|
| 64 | "b25zEg4KBmJpbmFyeRgEIAEoDCoFCGQQyAEiIgoQVGVzdFhtbEV4dGVuc2lv" +
|
| 65 | "bhIOCgZudW1iZXIYASACKAUqKgoLRW51bU9wdGlvbnMSBwoDT05FEAASBwoD" +
|
| 66 | "VFdPEAESCQoFVEhSRUUQAjplCg5leHRlbnNpb25fZW51bRInLnByb3RvYnVm" +
|
| 67 | "X3VuaXR0ZXN0X2V4dHJhLlRlc3RYbWxNZXNzYWdlGGUgASgOMiQucHJvdG9i" +
|
| 68 | "dWZfdW5pdHRlc3RfZXh0cmEuRW51bU9wdGlvbnM6PwoOZXh0ZW5zaW9uX3Rl" +
|
| 69 | "eHQSJy5wcm90b2J1Zl91bml0dGVzdF9leHRyYS5UZXN0WG1sTWVzc2FnZRhm" +
|
| 70 | "IAEoCTpFChBleHRlbnNpb25fbnVtYmVyEicucHJvdG9idWZfdW5pdHRlc3Rf" +
|
| 71 | "ZXh0cmEuVGVzdFhtbE1lc3NhZ2UYZyADKAVCAhABOm4KEWV4dGVuc2lvbl9t" +
|
| 72 | "ZXNzYWdlEicucHJvdG9idWZfdW5pdHRlc3RfZXh0cmEuVGVzdFhtbE1lc3Nh" +
|
| 73 | "Z2UYxwEgASgLMikucHJvdG9idWZfdW5pdHRlc3RfZXh0cmEuVGVzdFhtbEV4" +
|
| 74 | "dGVuc2lvbkJMSAHCPkcKIUdvb2dsZS5Qcm90b2NvbEJ1ZmZlcnMuVGVzdFBy" +
|
| 75 | "b3RvcxIiVW5pdFRlc3RYbWxTZXJpYWxpemVyVGVzdFByb3RvRmlsZQ==");
|
| 76 | pbd::FileDescriptor.InternalDescriptorAssigner assigner = delegate(pbd::FileDescriptor root) {
|
| 77 | descriptor = root;
|
| 78 | internal__static_protobuf_unittest_extra_TestXmlChild__Descriptor = Descriptor.MessageTypes[0];
|
| 79 | internal__static_protobuf_unittest_extra_TestXmlChild__FieldAccessorTable =
|
| 80 | new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestXmlChild, global::Google.ProtocolBuffers.TestProtos.TestXmlChild.Builder>(internal__static_protobuf_unittest_extra_TestXmlChild__Descriptor,
|
| 81 | new string[] { "Options", "Binary", });
|
| 82 | internal__static_protobuf_unittest_extra_TestXmlNoFields__Descriptor = Descriptor.MessageTypes[1];
|
| 83 | internal__static_protobuf_unittest_extra_TestXmlNoFields__FieldAccessorTable =
|
| 84 | new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestXmlNoFields, global::Google.ProtocolBuffers.TestProtos.TestXmlNoFields.Builder>(internal__static_protobuf_unittest_extra_TestXmlNoFields__Descriptor,
|
| 85 | new string[] { });
|
| 86 | internal__static_protobuf_unittest_extra_TestXmlMessage__Descriptor = Descriptor.MessageTypes[2];
|
| 87 | internal__static_protobuf_unittest_extra_TestXmlMessage__FieldAccessorTable =
|
| 88 | new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestXmlMessage, global::Google.ProtocolBuffers.TestProtos.TestXmlMessage.Builder>(internal__static_protobuf_unittest_extra_TestXmlMessage__Descriptor,
|
| 89 | new string[] { "Number", "Numbers", "Text", "Textlines", "Valid", "Child", "Children", });
|
| 90 | internal__static_protobuf_unittest_extra_TestXmlMessage_Children__Descriptor = internal__static_protobuf_unittest_extra_TestXmlMessage__Descriptor.NestedTypes[0];
|
| 91 | internal__static_protobuf_unittest_extra_TestXmlMessage_Children__FieldAccessorTable =
|
| 92 | 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,
|
| 93 | new string[] { "Options", "Binary", });
|
| 94 | internal__static_protobuf_unittest_extra_TestXmlExtension__Descriptor = Descriptor.MessageTypes[3];
|
| 95 | internal__static_protobuf_unittest_extra_TestXmlExtension__FieldAccessorTable =
|
| 96 | new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestXmlExtension, global::Google.ProtocolBuffers.TestProtos.TestXmlExtension.Builder>(internal__static_protobuf_unittest_extra_TestXmlExtension__Descriptor,
|
| 97 | new string[] { "Number", });
|
| 98 | global::Google.ProtocolBuffers.TestProtos.UnitTestXmlSerializerTestProtoFile.ExtensionEnum = pb::GeneratedSingleExtension<global::Google.ProtocolBuffers.TestProtos.EnumOptions>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestXmlSerializerTestProtoFile.Descriptor.Extensions[0]);
|
| 99 | global::Google.ProtocolBuffers.TestProtos.UnitTestXmlSerializerTestProtoFile.ExtensionText = pb::GeneratedSingleExtension<string>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestXmlSerializerTestProtoFile.Descriptor.Extensions[1]);
|
| 100 | global::Google.ProtocolBuffers.TestProtos.UnitTestXmlSerializerTestProtoFile.ExtensionNumber = pb::GeneratedRepeatExtension<int>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestXmlSerializerTestProtoFile.Descriptor.Extensions[2]);
|
| 101 | global::Google.ProtocolBuffers.TestProtos.UnitTestXmlSerializerTestProtoFile.ExtensionMessage = pb::GeneratedSingleExtension<global::Google.ProtocolBuffers.TestProtos.TestXmlExtension>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestXmlSerializerTestProtoFile.Descriptor.Extensions[3]);
|
| 102 | pb::ExtensionRegistry registry = pb::ExtensionRegistry.CreateInstance();
|
| 103 | RegisterAllExtensions(registry);
|
| 104 | global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.RegisterAllExtensions(registry);
|
| 105 | return registry;
|
| 106 | };
|
| 107 | pbd::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData,
|
| 108 | new pbd::FileDescriptor[] {
|
| 109 | global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.Descriptor,
|
| 110 | }, assigner);
|
| 111 | }
|
| 112 | #endregion
|
| 113 |
|
| 114 | }
|
| 115 | #region Enums
|
| 116 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
| 117 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
|
| 118 | public enum EnumOptions {
|
| 119 | ONE = 0,
|
| 120 | TWO = 1,
|
| 121 | THREE = 2,
|
| 122 | }
|
| 123 |
|
| 124 | #endregion
|
| 125 |
|
| 126 | #region Messages
|
| 127 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
| 128 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
| 129 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
|
| 130 | public sealed partial class TestXmlChild : pb::GeneratedMessage<TestXmlChild, TestXmlChild.Builder> {
|
| 131 | private static readonly TestXmlChild defaultInstance = new Builder().BuildPartial();
|
| 132 | public static TestXmlChild DefaultInstance {
|
| 133 | get { return defaultInstance; }
|
| 134 | }
|
| 135 |
|
| 136 | public override TestXmlChild DefaultInstanceForType {
|
| 137 | get { return defaultInstance; }
|
| 138 | }
|
| 139 |
|
| 140 | protected override TestXmlChild ThisMessage {
|
| 141 | get { return this; }
|
| 142 | }
|
| 143 |
|
| 144 | public static pbd::MessageDescriptor Descriptor {
|
| 145 | get { return global::Google.ProtocolBuffers.TestProtos.UnitTestXmlSerializerTestProtoFile.internal__static_protobuf_unittest_extra_TestXmlChild__Descriptor; }
|
| 146 | }
|
| 147 |
|
| 148 | protected override pb::FieldAccess.FieldAccessorTable<TestXmlChild, TestXmlChild.Builder> InternalFieldAccessors {
|
| 149 | get { return global::Google.ProtocolBuffers.TestProtos.UnitTestXmlSerializerTestProtoFile.internal__static_protobuf_unittest_extra_TestXmlChild__FieldAccessorTable; }
|
| 150 | }
|
| 151 |
|
| 152 | public const int OptionsFieldNumber = 3;
|
| 153 | private pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.EnumOptions> options_ = new pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.EnumOptions>();
|
| 154 | public scg::IList<global::Google.ProtocolBuffers.TestProtos.EnumOptions> OptionsList {
|
| 155 | get { return pbc::Lists.AsReadOnly(options_); }
|
| 156 | }
|
| 157 | public int OptionsCount {
|
| 158 | get { return options_.Count; }
|
| 159 | }
|
| 160 | public global::Google.ProtocolBuffers.TestProtos.EnumOptions GetOptions(int index) {
|
| 161 | return options_[index];
|
| 162 | }
|
| 163 |
|
| 164 | public const int BinaryFieldNumber = 4;
|
| 165 | private bool hasBinary;
|
| 166 | private pb::ByteString binary_ = pb::ByteString.Empty;
|
| 167 | public bool HasBinary {
|
| 168 | get { return hasBinary; }
|
| 169 | }
|
| 170 | public pb::ByteString Binary {
|
| 171 | get { return binary_; }
|
| 172 | }
|
| 173 |
|
| 174 | public override bool IsInitialized {
|
| 175 | get {
|
| 176 | return true;
|
| 177 | }
|
| 178 | }
|
| 179 |
|
| 180 | public override void WriteTo(pb::CodedOutputStream output) {
|
| 181 | int size = SerializedSize;
|
| 182 | if (options_.Count > 0) {
|
| 183 | foreach (int element in options_) {
|
| 184 | output.WriteEnum(3, element);
|
| 185 | }
|
| 186 | }
|
| 187 | if (HasBinary) {
|
| 188 | output.WriteBytes(4, Binary);
|
| 189 | }
|
| 190 | UnknownFields.WriteTo(output);
|
| 191 | }
|
| 192 |
|
| 193 | private int memoizedSerializedSize = -1;
|
| 194 | public override int SerializedSize {
|
| 195 | get {
|
| 196 | int size = memoizedSerializedSize;
|
| 197 | if (size != -1) return size;
|
| 198 |
|
| 199 | size = 0;
|
| 200 | {
|
| 201 | int dataSize = 0;
|
| 202 | if (options_.Count > 0) {
|
| 203 | foreach (global::Google.ProtocolBuffers.TestProtos.EnumOptions element in options_) {
|
| 204 | dataSize += pb::CodedOutputStream.ComputeEnumSizeNoTag((int) element);
|
| 205 | }
|
| 206 | size += dataSize;
|
| 207 | size += 1 * options_.Count;
|
| 208 | }
|
| 209 | }
|
| 210 | if (HasBinary) {
|
| 211 | size += pb::CodedOutputStream.ComputeBytesSize(4, Binary);
|
| 212 | }
|
| 213 | size += UnknownFields.SerializedSize;
|
| 214 | memoizedSerializedSize = size;
|
| 215 | return size;
|
| 216 | }
|
| 217 | }
|
| 218 |
|
| 219 | public static TestXmlChild ParseFrom(pb::ByteString data) {
|
| 220 | return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
|
| 221 | }
|
| 222 | public static TestXmlChild ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
|
| 223 | return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
|
| 224 | }
|
| 225 | public static TestXmlChild ParseFrom(byte[] data) {
|
| 226 | return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
|
| 227 | }
|
| 228 | public static TestXmlChild ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
|
| 229 | return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
|
| 230 | }
|
| 231 | public static TestXmlChild ParseFrom(global::System.IO.Stream input) {
|
| 232 | return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
|
| 233 | }
|
| 234 | public static TestXmlChild ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
|
| 235 | return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
|
| 236 | }
|
| 237 | public static TestXmlChild ParseDelimitedFrom(global::System.IO.Stream input) {
|
| 238 | return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
|
| 239 | }
|
| 240 | public static TestXmlChild ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
|
| 241 | return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
|
| 242 | }
|
| 243 | public static TestXmlChild ParseFrom(pb::CodedInputStream input) {
|
| 244 | return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
|
| 245 | }
|
| 246 | public static TestXmlChild ParseFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
|
| 247 | return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
|
| 248 | }
|
| 249 | public static Builder CreateBuilder() { return new Builder(); }
|
| 250 | public override Builder ToBuilder() { return CreateBuilder(this); }
|
| 251 | public override Builder CreateBuilderForType() { return new Builder(); }
|
| 252 | public static Builder CreateBuilder(TestXmlChild prototype) {
|
| 253 | return (Builder) new Builder().MergeFrom(prototype);
|
| 254 | }
|
| 255 |
|
| 256 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
| 257 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
| 258 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
|
| 259 | public sealed partial class Builder : pb::GeneratedBuilder<TestXmlChild, Builder> {
|
| 260 | protected override Builder ThisBuilder {
|
| 261 | get { return this; }
|
| 262 | }
|
| 263 | public Builder() {}
|
| 264 |
|
| 265 | TestXmlChild result = new TestXmlChild();
|
| 266 |
|
| 267 | protected override TestXmlChild MessageBeingBuilt {
|
| 268 | get { return result; }
|
| 269 | }
|
| 270 |
|
| 271 | public override Builder Clear() {
|
| 272 | result = new TestXmlChild();
|
| 273 | return this;
|
| 274 | }
|
| 275 |
|
| 276 | public override Builder Clone() {
|
| 277 | return new Builder().MergeFrom(result);
|
| 278 | }
|
| 279 |
|
| 280 | public override pbd::MessageDescriptor DescriptorForType {
|
| 281 | get { return global::Google.ProtocolBuffers.TestProtos.TestXmlChild.Descriptor; }
|
| 282 | }
|
| 283 |
|
| 284 | public override TestXmlChild DefaultInstanceForType {
|
| 285 | get { return global::Google.ProtocolBuffers.TestProtos.TestXmlChild.DefaultInstance; }
|
| 286 | }
|
| 287 |
|
| 288 | public override TestXmlChild BuildPartial() {
|
| 289 | if (result == null) {
|
| 290 | throw new global::System.InvalidOperationException("build() has already been called on this Builder");
|
| 291 | }
|
| 292 | result.options_.MakeReadOnly();
|
| 293 | TestXmlChild returnMe = result;
|
| 294 | result = null;
|
| 295 | return returnMe;
|
| 296 | }
|
| 297 |
|
| 298 | public override Builder MergeFrom(pb::IMessage other) {
|
| 299 | if (other is TestXmlChild) {
|
| 300 | return MergeFrom((TestXmlChild) other);
|
| 301 | } else {
|
| 302 | base.MergeFrom(other);
|
| 303 | return this;
|
| 304 | }
|
| 305 | }
|
| 306 |
|
| 307 | public override Builder MergeFrom(TestXmlChild other) {
|
| 308 | if (other == global::Google.ProtocolBuffers.TestProtos.TestXmlChild.DefaultInstance) return this;
|
| 309 | if (other.options_.Count != 0) {
|
| 310 | base.AddRange(other.options_, result.options_);
|
| 311 | }
|
| 312 | if (other.HasBinary) {
|
| 313 | Binary = other.Binary;
|
| 314 | }
|
| 315 | this.MergeUnknownFields(other.UnknownFields);
|
| 316 | return this;
|
| 317 | }
|
| 318 |
|
| 319 | public override Builder MergeFrom(pb::CodedInputStream input) {
|
| 320 | return MergeFrom(input, pb::ExtensionRegistry.Empty);
|
| 321 | }
|
| 322 |
|
| 323 | public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
|
| 324 | pb::UnknownFieldSet.Builder unknownFields = null;
|
| 325 | while (true) {
|
| 326 | uint tag = input.ReadTag();
|
| 327 | switch (tag) {
|
| 328 | case 0: {
|
| 329 | if (unknownFields != null) {
|
| 330 | this.UnknownFields = unknownFields.Build();
|
| 331 | }
|
| 332 | return this;
|
| 333 | }
|
| 334 | default: {
|
| 335 | if (pb::WireFormat.IsEndGroupTag(tag)) {
|
| 336 | if (unknownFields != null) {
|
| 337 | this.UnknownFields = unknownFields.Build();
|
| 338 | }
|
| 339 | return this;
|
| 340 | }
|
| 341 | if (unknownFields == null) {
|
| 342 | unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
|
| 343 | }
|
| 344 | ParseUnknownField(input, unknownFields, extensionRegistry, tag);
|
| 345 | break;
|
| 346 | }
|
| 347 | case 24: {
|
| 348 | int rawValue = input.ReadEnum();
|
| 349 | if (!global::System.Enum.IsDefined(typeof(global::Google.ProtocolBuffers.TestProtos.EnumOptions), rawValue)) {
|
| 350 | if (unknownFields == null) {
|
| 351 | unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
|
| 352 | }
|
| 353 | unknownFields.MergeVarintField(3, (ulong) rawValue);
|
| 354 | } else {
|
| 355 | AddOptions((global::Google.ProtocolBuffers.TestProtos.EnumOptions) rawValue);
|
| 356 | }
|
| 357 | break;
|
| 358 | }
|
| 359 | case 34: {
|
| 360 | Binary = input.ReadBytes();
|
| 361 | break;
|
| 362 | }
|
| 363 | }
|
| 364 | }
|
| 365 | }
|
| 366 |
|
| 367 |
|
| 368 | public pbc::IPopsicleList<global::Google.ProtocolBuffers.TestProtos.EnumOptions> OptionsList {
|
| 369 | get { return result.options_; }
|
| 370 | }
|
| 371 | public int OptionsCount {
|
| 372 | get { return result.OptionsCount; }
|
| 373 | }
|
| 374 | public global::Google.ProtocolBuffers.TestProtos.EnumOptions GetOptions(int index) {
|
| 375 | return result.GetOptions(index);
|
| 376 | }
|
| 377 | public Builder SetOptions(int index, global::Google.ProtocolBuffers.TestProtos.EnumOptions value) {
|
| 378 | result.options_[index] = value;
|
| 379 | return this;
|
| 380 | }
|
| 381 | public Builder AddOptions(global::Google.ProtocolBuffers.TestProtos.EnumOptions value) {
|
| 382 | result.options_.Add(value);
|
| 383 | return this;
|
| 384 | }
|
| 385 | public Builder AddRangeOptions(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.EnumOptions> values) {
|
| 386 | base.AddRange(values, result.options_);
|
| 387 | return this;
|
| 388 | }
|
| 389 | public Builder ClearOptions() {
|
| 390 | result.options_.Clear();
|
| 391 | return this;
|
| 392 | }
|
| 393 |
|
| 394 | public bool HasBinary {
|
| 395 | get { return result.HasBinary; }
|
| 396 | }
|
| 397 | public pb::ByteString Binary {
|
| 398 | get { return result.Binary; }
|
| 399 | set { SetBinary(value); }
|
| 400 | }
|
| 401 | public Builder SetBinary(pb::ByteString value) {
|
| 402 | pb::ThrowHelper.ThrowIfNull(value, "value");
|
| 403 | result.hasBinary = true;
|
| 404 | result.binary_ = value;
|
| 405 | return this;
|
| 406 | }
|
| 407 | public Builder ClearBinary() {
|
| 408 | result.hasBinary = false;
|
| 409 | result.binary_ = pb::ByteString.Empty;
|
| 410 | return this;
|
| 411 | }
|
| 412 | }
|
| 413 | static TestXmlChild() {
|
| 414 | object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestXmlSerializerTestProtoFile.Descriptor, null);
|
| 415 | }
|
| 416 | }
|
| 417 |
|
| 418 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
| 419 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
| 420 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
|
| 421 | public sealed partial class TestXmlNoFields : pb::GeneratedMessage<TestXmlNoFields, TestXmlNoFields.Builder> {
|
| 422 | private static readonly TestXmlNoFields defaultInstance = new Builder().BuildPartial();
|
| 423 | public static TestXmlNoFields DefaultInstance {
|
| 424 | get { return defaultInstance; }
|
| 425 | }
|
| 426 |
|
| 427 | public override TestXmlNoFields DefaultInstanceForType {
|
| 428 | get { return defaultInstance; }
|
| 429 | }
|
| 430 |
|
| 431 | protected override TestXmlNoFields ThisMessage {
|
| 432 | get { return this; }
|
| 433 | }
|
| 434 |
|
| 435 | public static pbd::MessageDescriptor Descriptor {
|
| 436 | get { return global::Google.ProtocolBuffers.TestProtos.UnitTestXmlSerializerTestProtoFile.internal__static_protobuf_unittest_extra_TestXmlNoFields__Descriptor; }
|
| 437 | }
|
| 438 |
|
| 439 | protected override pb::FieldAccess.FieldAccessorTable<TestXmlNoFields, TestXmlNoFields.Builder> InternalFieldAccessors {
|
| 440 | get { return global::Google.ProtocolBuffers.TestProtos.UnitTestXmlSerializerTestProtoFile.internal__static_protobuf_unittest_extra_TestXmlNoFields__FieldAccessorTable; }
|
| 441 | }
|
| 442 |
|
| 443 | public override bool IsInitialized {
|
| 444 | get {
|
| 445 | return true;
|
| 446 | }
|
| 447 | }
|
| 448 |
|
| 449 | public override void WriteTo(pb::CodedOutputStream output) {
|
| 450 | int size = SerializedSize;
|
| 451 | UnknownFields.WriteTo(output);
|
| 452 | }
|
| 453 |
|
| 454 | private int memoizedSerializedSize = -1;
|
| 455 | public override int SerializedSize {
|
| 456 | get {
|
| 457 | int size = memoizedSerializedSize;
|
| 458 | if (size != -1) return size;
|
| 459 |
|
| 460 | size = 0;
|
| 461 | size += UnknownFields.SerializedSize;
|
| 462 | memoizedSerializedSize = size;
|
| 463 | return size;
|
| 464 | }
|
| 465 | }
|
| 466 |
|
| 467 | public static TestXmlNoFields ParseFrom(pb::ByteString data) {
|
| 468 | return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
|
| 469 | }
|
| 470 | public static TestXmlNoFields ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
|
| 471 | return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
|
| 472 | }
|
| 473 | public static TestXmlNoFields ParseFrom(byte[] data) {
|
| 474 | return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
|
| 475 | }
|
| 476 | public static TestXmlNoFields ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
|
| 477 | return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
|
| 478 | }
|
| 479 | public static TestXmlNoFields ParseFrom(global::System.IO.Stream input) {
|
| 480 | return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
|
| 481 | }
|
| 482 | public static TestXmlNoFields ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
|
| 483 | return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
|
| 484 | }
|
| 485 | public static TestXmlNoFields ParseDelimitedFrom(global::System.IO.Stream input) {
|
| 486 | return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
|
| 487 | }
|
| 488 | public static TestXmlNoFields ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
|
| 489 | return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
|
| 490 | }
|
| 491 | public static TestXmlNoFields ParseFrom(pb::CodedInputStream input) {
|
| 492 | return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
|
| 493 | }
|
| 494 | public static TestXmlNoFields ParseFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
|
| 495 | return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
|
| 496 | }
|
| 497 | public static Builder CreateBuilder() { return new Builder(); }
|
| 498 | public override Builder ToBuilder() { return CreateBuilder(this); }
|
| 499 | public override Builder CreateBuilderForType() { return new Builder(); }
|
| 500 | public static Builder CreateBuilder(TestXmlNoFields prototype) {
|
| 501 | return (Builder) new Builder().MergeFrom(prototype);
|
| 502 | }
|
| 503 |
|
| 504 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
| 505 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
| 506 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
|
| 507 | public sealed partial class Builder : pb::GeneratedBuilder<TestXmlNoFields, Builder> {
|
| 508 | protected override Builder ThisBuilder {
|
| 509 | get { return this; }
|
| 510 | }
|
| 511 | public Builder() {}
|
| 512 |
|
| 513 | TestXmlNoFields result = new TestXmlNoFields();
|
| 514 |
|
| 515 | protected override TestXmlNoFields MessageBeingBuilt {
|
| 516 | get { return result; }
|
| 517 | }
|
| 518 |
|
| 519 | public override Builder Clear() {
|
| 520 | result = new TestXmlNoFields();
|
| 521 | return this;
|
| 522 | }
|
| 523 |
|
| 524 | public override Builder Clone() {
|
| 525 | return new Builder().MergeFrom(result);
|
| 526 | }
|
| 527 |
|
| 528 | public override pbd::MessageDescriptor DescriptorForType {
|
| 529 | get { return global::Google.ProtocolBuffers.TestProtos.TestXmlNoFields.Descriptor; }
|
| 530 | }
|
| 531 |
|
| 532 | public override TestXmlNoFields DefaultInstanceForType {
|
| 533 | get { return global::Google.ProtocolBuffers.TestProtos.TestXmlNoFields.DefaultInstance; }
|
| 534 | }
|
| 535 |
|
| 536 | public override TestXmlNoFields BuildPartial() {
|
| 537 | if (result == null) {
|
| 538 | throw new global::System.InvalidOperationException("build() has already been called on this Builder");
|
| 539 | }
|
| 540 | TestXmlNoFields returnMe = result;
|
| 541 | result = null;
|
| 542 | return returnMe;
|
| 543 | }
|
| 544 |
|
| 545 | public override Builder MergeFrom(pb::IMessage other) {
|
| 546 | if (other is TestXmlNoFields) {
|
| 547 | return MergeFrom((TestXmlNoFields) other);
|
| 548 | } else {
|
| 549 | base.MergeFrom(other);
|
| 550 | return this;
|
| 551 | }
|
| 552 | }
|
| 553 |
|
| 554 | public override Builder MergeFrom(TestXmlNoFields other) {
|
| 555 | if (other == global::Google.ProtocolBuffers.TestProtos.TestXmlNoFields.DefaultInstance) return this;
|
| 556 | this.MergeUnknownFields(other.UnknownFields);
|
| 557 | return this;
|
| 558 | }
|
| 559 |
|
| 560 | public override Builder MergeFrom(pb::CodedInputStream input) {
|
| 561 | return MergeFrom(input, pb::ExtensionRegistry.Empty);
|
| 562 | }
|
| 563 |
|
| 564 | public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
|
| 565 | pb::UnknownFieldSet.Builder unknownFields = null;
|
| 566 | while (true) {
|
| 567 | uint tag = input.ReadTag();
|
| 568 | switch (tag) {
|
| 569 | case 0: {
|
| 570 | if (unknownFields != null) {
|
| 571 | this.UnknownFields = unknownFields.Build();
|
| 572 | }
|
| 573 | return this;
|
| 574 | }
|
| 575 | default: {
|
| 576 | if (pb::WireFormat.IsEndGroupTag(tag)) {
|
| 577 | if (unknownFields != null) {
|
| 578 | this.UnknownFields = unknownFields.Build();
|
| 579 | }
|
| 580 | return this;
|
| 581 | }
|
| 582 | if (unknownFields == null) {
|
| 583 | unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
|
| 584 | }
|
| 585 | ParseUnknownField(input, unknownFields, extensionRegistry, tag);
|
| 586 | break;
|
| 587 | }
|
| 588 | }
|
| 589 | }
|
| 590 | }
|
| 591 |
|
| 592 | }
|
| 593 | static TestXmlNoFields() {
|
| 594 | object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestXmlSerializerTestProtoFile.Descriptor, null);
|
| 595 | }
|
| 596 | }
|
| 597 |
|
| 598 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
| 599 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
| 600 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
|
| 601 | public sealed partial class TestXmlMessage : pb::ExtendableMessage<TestXmlMessage, TestXmlMessage.Builder> {
|
| 602 | private static readonly TestXmlMessage defaultInstance = new Builder().BuildPartial();
|
| 603 | public static TestXmlMessage DefaultInstance {
|
| 604 | get { return defaultInstance; }
|
| 605 | }
|
| 606 |
|
| 607 | public override TestXmlMessage DefaultInstanceForType {
|
| 608 | get { return defaultInstance; }
|
| 609 | }
|
| 610 |
|
| 611 | protected override TestXmlMessage ThisMessage {
|
| 612 | get { return this; }
|
| 613 | }
|
| 614 |
|
| 615 | public static pbd::MessageDescriptor Descriptor {
|
| 616 | get { return global::Google.ProtocolBuffers.TestProtos.UnitTestXmlSerializerTestProtoFile.internal__static_protobuf_unittest_extra_TestXmlMessage__Descriptor; }
|
| 617 | }
|
| 618 |
|
| 619 | protected override pb::FieldAccess.FieldAccessorTable<TestXmlMessage, TestXmlMessage.Builder> InternalFieldAccessors {
|
| 620 | get { return global::Google.ProtocolBuffers.TestProtos.UnitTestXmlSerializerTestProtoFile.internal__static_protobuf_unittest_extra_TestXmlMessage__FieldAccessorTable; }
|
| 621 | }
|
| 622 |
|
| 623 | #region Nested types
|
| 624 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
| 625 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
| 626 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
|
| 627 | public static class Types {
|
| 628 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
| 629 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
| 630 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
|
| 631 | public sealed partial class Children : pb::GeneratedMessage<Children, Children.Builder> {
|
| 632 | private static readonly Children defaultInstance = new Builder().BuildPartial();
|
| 633 | public static Children DefaultInstance {
|
| 634 | get { return defaultInstance; }
|
| 635 | }
|
| 636 |
|
| 637 | public override Children DefaultInstanceForType {
|
| 638 | get { return defaultInstance; }
|
| 639 | }
|
| 640 |
|
| 641 | protected override Children ThisMessage {
|
| 642 | get { return this; }
|
| 643 | }
|
| 644 |
|
| 645 | public static pbd::MessageDescriptor Descriptor {
|
| 646 | get { return global::Google.ProtocolBuffers.TestProtos.UnitTestXmlSerializerTestProtoFile.internal__static_protobuf_unittest_extra_TestXmlMessage_Children__Descriptor; }
|
| 647 | }
|
| 648 |
|
| 649 | protected override pb::FieldAccess.FieldAccessorTable<Children, Children.Builder> InternalFieldAccessors {
|
| 650 | get { return global::Google.ProtocolBuffers.TestProtos.UnitTestXmlSerializerTestProtoFile.internal__static_protobuf_unittest_extra_TestXmlMessage_Children__FieldAccessorTable; }
|
| 651 | }
|
| 652 |
|
| 653 | public const int OptionsFieldNumber = 3;
|
| 654 | private pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.EnumOptions> options_ = new pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.EnumOptions>();
|
| 655 | public scg::IList<global::Google.ProtocolBuffers.TestProtos.EnumOptions> OptionsList {
|
| 656 | get { return pbc::Lists.AsReadOnly(options_); }
|
| 657 | }
|
| 658 | public int OptionsCount {
|
| 659 | get { return options_.Count; }
|
| 660 | }
|
| 661 | public global::Google.ProtocolBuffers.TestProtos.EnumOptions GetOptions(int index) {
|
| 662 | return options_[index];
|
| 663 | }
|
| 664 |
|
| 665 | public const int BinaryFieldNumber = 4;
|
| 666 | private bool hasBinary;
|
| 667 | private pb::ByteString binary_ = pb::ByteString.Empty;
|
| 668 | public bool HasBinary {
|
| 669 | get { return hasBinary; }
|
| 670 | }
|
| 671 | public pb::ByteString Binary {
|
| 672 | get { return binary_; }
|
| 673 | }
|
| 674 |
|
| 675 | public override bool IsInitialized {
|
| 676 | get {
|
| 677 | return true;
|
| 678 | }
|
| 679 | }
|
| 680 |
|
| 681 | public override void WriteTo(pb::CodedOutputStream output) {
|
| 682 | int size = SerializedSize;
|
| 683 | if (options_.Count > 0) {
|
| 684 | foreach (int element in options_) {
|
| 685 | output.WriteEnum(3, element);
|
| 686 | }
|
| 687 | }
|
| 688 | if (HasBinary) {
|
| 689 | output.WriteBytes(4, Binary);
|
| 690 | }
|
| 691 | UnknownFields.WriteTo(output);
|
| 692 | }
|
| 693 |
|
| 694 | private int memoizedSerializedSize = -1;
|
| 695 | public override int SerializedSize {
|
| 696 | get {
|
| 697 | int size = memoizedSerializedSize;
|
| 698 | if (size != -1) return size;
|
| 699 |
|
| 700 | size = 0;
|
| 701 | {
|
| 702 | int dataSize = 0;
|
| 703 | if (options_.Count > 0) {
|
| 704 | foreach (global::Google.ProtocolBuffers.TestProtos.EnumOptions element in options_) {
|
| 705 | dataSize += pb::CodedOutputStream.ComputeEnumSizeNoTag((int) element);
|
| 706 | }
|
| 707 | size += dataSize;
|
| 708 | size += 1 * options_.Count;
|
| 709 | }
|
| 710 | }
|
| 711 | if (HasBinary) {
|
| 712 | size += pb::CodedOutputStream.ComputeBytesSize(4, Binary);
|
| 713 | }
|
| 714 | size += UnknownFields.SerializedSize;
|
| 715 | memoizedSerializedSize = size;
|
| 716 | return size;
|
| 717 | }
|
| 718 | }
|
| 719 |
|
| 720 | public static Children ParseFrom(pb::ByteString data) {
|
| 721 | return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
|
| 722 | }
|
| 723 | public static Children ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
|
| 724 | return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
|
| 725 | }
|
| 726 | public static Children ParseFrom(byte[] data) {
|
| 727 | return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
|
| 728 | }
|
| 729 | public static Children ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
|
| 730 | return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
|
| 731 | }
|
| 732 | public static Children ParseFrom(global::System.IO.Stream input) {
|
| 733 | return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
|
| 734 | }
|
| 735 | public static Children ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
|
| 736 | return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
|
| 737 | }
|
| 738 | public static Children ParseDelimitedFrom(global::System.IO.Stream input) {
|
| 739 | return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
|
| 740 | }
|
| 741 | public static Children ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
|
| 742 | return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
|
| 743 | }
|
| 744 | public static Children ParseFrom(pb::CodedInputStream input) {
|
| 745 | return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
|
| 746 | }
|
| 747 | public static Children ParseFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
|
| 748 | return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
|
| 749 | }
|
| 750 | public static Builder CreateBuilder() { return new Builder(); }
|
| 751 | public override Builder ToBuilder() { return CreateBuilder(this); }
|
| 752 | public override Builder CreateBuilderForType() { return new Builder(); }
|
| 753 | public static Builder CreateBuilder(Children prototype) {
|
| 754 | return (Builder) new Builder().MergeFrom(prototype);
|
| 755 | }
|
| 756 |
|
| 757 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
| 758 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
| 759 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
|
| 760 | public sealed partial class Builder : pb::GeneratedBuilder<Children, Builder> {
|
| 761 | protected override Builder ThisBuilder {
|
| 762 | get { return this; }
|
| 763 | }
|
| 764 | public Builder() {}
|
| 765 |
|
| 766 | Children result = new Children();
|
| 767 |
|
| 768 | protected override Children MessageBeingBuilt {
|
| 769 | get { return result; }
|
| 770 | }
|
| 771 |
|
| 772 | public override Builder Clear() {
|
| 773 | result = new Children();
|
| 774 | return this;
|
| 775 | }
|
| 776 |
|
| 777 | public override Builder Clone() {
|
| 778 | return new Builder().MergeFrom(result);
|
| 779 | }
|
| 780 |
|
| 781 | public override pbd::MessageDescriptor DescriptorForType {
|
| 782 | get { return global::Google.ProtocolBuffers.TestProtos.TestXmlMessage.Types.Children.Descriptor; }
|
| 783 | }
|
| 784 |
|
| 785 | public override Children DefaultInstanceForType {
|
| 786 | get { return global::Google.ProtocolBuffers.TestProtos.TestXmlMessage.Types.Children.DefaultInstance; }
|
| 787 | }
|
| 788 |
|
| 789 | public override Children BuildPartial() {
|
| 790 | if (result == null) {
|
| 791 | throw new global::System.InvalidOperationException("build() has already been called on this Builder");
|
| 792 | }
|
| 793 | result.options_.MakeReadOnly();
|
| 794 | Children returnMe = result;
|
| 795 | result = null;
|
| 796 | return returnMe;
|
| 797 | }
|
| 798 |
|
| 799 | public override Builder MergeFrom(pb::IMessage other) {
|
| 800 | if (other is Children) {
|
| 801 | return MergeFrom((Children) other);
|
| 802 | } else {
|
| 803 | base.MergeFrom(other);
|
| 804 | return this;
|
| 805 | }
|
| 806 | }
|
| 807 |
|
| 808 | public override Builder MergeFrom(Children other) {
|
| 809 | if (other == global::Google.ProtocolBuffers.TestProtos.TestXmlMessage.Types.Children.DefaultInstance) return this;
|
| 810 | if (other.options_.Count != 0) {
|
| 811 | base.AddRange(other.options_, result.options_);
|
| 812 | }
|
| 813 | if (other.HasBinary) {
|
| 814 | Binary = other.Binary;
|
| 815 | }
|
| 816 | this.MergeUnknownFields(other.UnknownFields);
|
| 817 | return this;
|
| 818 | }
|
| 819 |
|
| 820 | public override Builder MergeFrom(pb::CodedInputStream input) {
|
| 821 | return MergeFrom(input, pb::ExtensionRegistry.Empty);
|
| 822 | }
|
| 823 |
|
| 824 | public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
|
| 825 | pb::UnknownFieldSet.Builder unknownFields = null;
|
| 826 | while (true) {
|
| 827 | uint tag = input.ReadTag();
|
| 828 | switch (tag) {
|
| 829 | case 0: {
|
| 830 | if (unknownFields != null) {
|
| 831 | this.UnknownFields = unknownFields.Build();
|
| 832 | }
|
| 833 | return this;
|
| 834 | }
|
| 835 | default: {
|
| 836 | if (pb::WireFormat.IsEndGroupTag(tag)) {
|
| 837 | if (unknownFields != null) {
|
| 838 | this.UnknownFields = unknownFields.Build();
|
| 839 | }
|
| 840 | return this;
|
| 841 | }
|
| 842 | if (unknownFields == null) {
|
| 843 | unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
|
| 844 | }
|
| 845 | ParseUnknownField(input, unknownFields, extensionRegistry, tag);
|
| 846 | break;
|
| 847 | }
|
| 848 | case 24: {
|
| 849 | int rawValue = input.ReadEnum();
|
| 850 | if (!global::System.Enum.IsDefined(typeof(global::Google.ProtocolBuffers.TestProtos.EnumOptions), rawValue)) {
|
| 851 | if (unknownFields == null) {
|
| 852 | unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
|
| 853 | }
|
| 854 | unknownFields.MergeVarintField(3, (ulong) rawValue);
|
| 855 | } else {
|
| 856 | AddOptions((global::Google.ProtocolBuffers.TestProtos.EnumOptions) rawValue);
|
| 857 | }
|
| 858 | break;
|
| 859 | }
|
| 860 | case 34: {
|
| 861 | Binary = input.ReadBytes();
|
| 862 | break;
|
| 863 | }
|
| 864 | }
|
| 865 | }
|
| 866 | }
|
| 867 |
|
| 868 |
|
| 869 | public pbc::IPopsicleList<global::Google.ProtocolBuffers.TestProtos.EnumOptions> OptionsList {
|
| 870 | get { return result.options_; }
|
| 871 | }
|
| 872 | public int OptionsCount {
|
| 873 | get { return result.OptionsCount; }
|
| 874 | }
|
| 875 | public global::Google.ProtocolBuffers.TestProtos.EnumOptions GetOptions(int index) {
|
| 876 | return result.GetOptions(index);
|
| 877 | }
|
| 878 | public Builder SetOptions(int index, global::Google.ProtocolBuffers.TestProtos.EnumOptions value) {
|
| 879 | result.options_[index] = value;
|
| 880 | return this;
|
| 881 | }
|
| 882 | public Builder AddOptions(global::Google.ProtocolBuffers.TestProtos.EnumOptions value) {
|
| 883 | result.options_.Add(value);
|
| 884 | return this;
|
| 885 | }
|
| 886 | public Builder AddRangeOptions(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.EnumOptions> values) {
|
| 887 | base.AddRange(values, result.options_);
|
| 888 | return this;
|
| 889 | }
|
| 890 | public Builder ClearOptions() {
|
| 891 | result.options_.Clear();
|
| 892 | return this;
|
| 893 | }
|
| 894 |
|
| 895 | public bool HasBinary {
|
| 896 | get { return result.HasBinary; }
|
| 897 | }
|
| 898 | public pb::ByteString Binary {
|
| 899 | get { return result.Binary; }
|
| 900 | set { SetBinary(value); }
|
| 901 | }
|
| 902 | public Builder SetBinary(pb::ByteString value) {
|
| 903 | pb::ThrowHelper.ThrowIfNull(value, "value");
|
| 904 | result.hasBinary = true;
|
| 905 | result.binary_ = value;
|
| 906 | return this;
|
| 907 | }
|
| 908 | public Builder ClearBinary() {
|
| 909 | result.hasBinary = false;
|
| 910 | result.binary_ = pb::ByteString.Empty;
|
| 911 | return this;
|
| 912 | }
|
| 913 | }
|
| 914 | static Children() {
|
| 915 | object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestXmlSerializerTestProtoFile.Descriptor, null);
|
| 916 | }
|
| 917 | }
|
| 918 |
|
| 919 | }
|
| 920 | #endregion
|
| 921 |
|
| 922 | public const int NumberFieldNumber = 6;
|
| 923 | private bool hasNumber;
|
| 924 | private long number_ = 0L;
|
| 925 | public bool HasNumber {
|
| 926 | get { return hasNumber; }
|
| 927 | }
|
| 928 | public long Number {
|
| 929 | get { return number_; }
|
| 930 | }
|
| 931 |
|
| 932 | public const int NumbersFieldNumber = 2;
|
| 933 | private pbc::PopsicleList<int> numbers_ = new pbc::PopsicleList<int>();
|
| 934 | public scg::IList<int> NumbersList {
|
| 935 | get { return pbc::Lists.AsReadOnly(numbers_); }
|
| 936 | }
|
| 937 | public int NumbersCount {
|
| 938 | get { return numbers_.Count; }
|
| 939 | }
|
| 940 | public int GetNumbers(int index) {
|
| 941 | return numbers_[index];
|
| 942 | }
|
| 943 |
|
| 944 | public const int TextFieldNumber = 3;
|
| 945 | private bool hasText;
|
| 946 | private string text_ = "";
|
| 947 | public bool HasText {
|
| 948 | get { return hasText; }
|
| 949 | }
|
| 950 | public string Text {
|
| 951 | get { return text_; }
|
| 952 | }
|
| 953 |
|
| 954 | public const int TextlinesFieldNumber = 700;
|
| 955 | private pbc::PopsicleList<string> textlines_ = new pbc::PopsicleList<string>();
|
| 956 | public scg::IList<string> TextlinesList {
|
| 957 | get { return pbc::Lists.AsReadOnly(textlines_); }
|
| 958 | }
|
| 959 | public int TextlinesCount {
|
| 960 | get { return textlines_.Count; }
|
| 961 | }
|
| 962 | public string GetTextlines(int index) {
|
| 963 | return textlines_[index];
|
| 964 | }
|
| 965 |
|
| 966 | public const int ValidFieldNumber = 5;
|
| 967 | private bool hasValid;
|
| 968 | private bool valid_ = false;
|
| 969 | public bool HasValid {
|
| 970 | get { return hasValid; }
|
| 971 | }
|
| 972 | public bool Valid {
|
| 973 | get { return valid_; }
|
| 974 | }
|
| 975 |
|
| 976 | public const int ChildFieldNumber = 1;
|
| 977 | private bool hasChild;
|
| 978 | private global::Google.ProtocolBuffers.TestProtos.TestXmlChild child_ = global::Google.ProtocolBuffers.TestProtos.TestXmlChild.DefaultInstance;
|
| 979 | public bool HasChild {
|
| 980 | get { return hasChild; }
|
| 981 | }
|
| 982 | public global::Google.ProtocolBuffers.TestProtos.TestXmlChild Child {
|
| 983 | get { return child_; }
|
| 984 | }
|
| 985 |
|
| 986 | public const int ChildrenFieldNumber = 401;
|
| 987 | private pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.TestXmlMessage.Types.Children> children_ = new pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.TestXmlMessage.Types.Children>();
|
| 988 | public scg::IList<global::Google.ProtocolBuffers.TestProtos.TestXmlMessage.Types.Children> ChildrenList {
|
| 989 | get { return children_; }
|
| 990 | }
|
| 991 | public int ChildrenCount {
|
| 992 | get { return children_.Count; }
|
| 993 | }
|
| 994 | public global::Google.ProtocolBuffers.TestProtos.TestXmlMessage.Types.Children GetChildren(int index) {
|
| 995 | return children_[index];
|
| 996 | }
|
| 997 |
|
| 998 | public override bool IsInitialized {
|
| 999 | get {
|
| 1000 | if (!ExtensionsAreInitialized) return false;
|
| 1001 | return true;
|
| 1002 | }
|
| 1003 | }
|
| 1004 |
|
| 1005 | public override void WriteTo(pb::CodedOutputStream output) {
|
| 1006 | int size = SerializedSize;
|
| 1007 | pb::ExtendableMessage<TestXmlMessage, TestXmlMessage.Builder>.ExtensionWriter extensionWriter = CreateExtensionWriter(this);
|
| 1008 | if (HasChild) {
|
| 1009 | output.WriteMessage(1, Child);
|
| 1010 | }
|
| 1011 | if (numbers_.Count > 0) {
|
| 1012 | foreach (int element in numbers_) {
|
| 1013 | output.WriteInt32(2, element);
|
| 1014 | }
|
| 1015 | }
|
| 1016 | if (HasText) {
|
| 1017 | output.WriteString(3, Text);
|
| 1018 | }
|
| 1019 | if (HasValid) {
|
| 1020 | output.WriteBool(5, Valid);
|
| 1021 | }
|
| 1022 | if (HasNumber) {
|
| 1023 | output.WriteInt64(6, Number);
|
| 1024 | }
|
| 1025 | extensionWriter.WriteUntil(200, output);
|
| 1026 | foreach (global::Google.ProtocolBuffers.TestProtos.TestXmlMessage.Types.Children element in ChildrenList) {
|
| 1027 | output.WriteGroup(401, element);
|
| 1028 | }
|
| 1029 | if (textlines_.Count > 0) {
|
| 1030 | foreach (string element in textlines_) {
|
| 1031 | output.WriteString(700, element);
|
| 1032 | }
|
| 1033 | }
|
| 1034 | UnknownFields.WriteTo(output);
|
| 1035 | }
|
| 1036 |
|
| 1037 | private int memoizedSerializedSize = -1;
|
| 1038 | public override int SerializedSize {
|
| 1039 | get {
|
| 1040 | int size = memoizedSerializedSize;
|
| 1041 | if (size != -1) return size;
|
| 1042 |
|
| 1043 | size = 0;
|
| 1044 | if (HasNumber) {
|
| 1045 | size += pb::CodedOutputStream.ComputeInt64Size(6, Number);
|
| 1046 | }
|
| 1047 | {
|
| 1048 | int dataSize = 0;
|
| 1049 | foreach (int element in NumbersList) {
|
| 1050 | dataSize += pb::CodedOutputStream.ComputeInt32SizeNoTag(element);
|
| 1051 | }
|
| 1052 | size += dataSize;
|
| 1053 | size += 1 * numbers_.Count;
|
| 1054 | }
|
| 1055 | if (HasText) {
|
| 1056 | size += pb::CodedOutputStream.ComputeStringSize(3, Text);
|
| 1057 | }
|
| 1058 | {
|
| 1059 | int dataSize = 0;
|
| 1060 | foreach (string element in TextlinesList) {
|
| 1061 | dataSize += pb::CodedOutputStream.ComputeStringSizeNoTag(element);
|
| 1062 | }
|
| 1063 | size += dataSize;
|
| 1064 | size += 2 * textlines_.Count;
|
| 1065 | }
|
| 1066 | if (HasValid) {
|
| 1067 | size += pb::CodedOutputStream.ComputeBoolSize(5, Valid);
|
| 1068 | }
|
| 1069 | if (HasChild) {
|
| 1070 | size += pb::CodedOutputStream.ComputeMessageSize(1, Child);
|
| 1071 | }
|
| 1072 | foreach (global::Google.ProtocolBuffers.TestProtos.TestXmlMessage.Types.Children element in ChildrenList) {
|
| 1073 | size += pb::CodedOutputStream.ComputeGroupSize(401, element);
|
| 1074 | }
|
| 1075 | size += ExtensionsSerializedSize;
|
| 1076 | size += UnknownFields.SerializedSize;
|
| 1077 | memoizedSerializedSize = size;
|
| 1078 | return size;
|
| 1079 | }
|
| 1080 | }
|
| 1081 |
|
| 1082 | public static TestXmlMessage ParseFrom(pb::ByteString data) {
|
| 1083 | return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
|
| 1084 | }
|
| 1085 | public static TestXmlMessage ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
|
| 1086 | return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
|
| 1087 | }
|
| 1088 | public static TestXmlMessage ParseFrom(byte[] data) {
|
| 1089 | return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
|
| 1090 | }
|
| 1091 | public static TestXmlMessage ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
|
| 1092 | return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
|
| 1093 | }
|
| 1094 | public static TestXmlMessage ParseFrom(global::System.IO.Stream input) {
|
| 1095 | return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
|
| 1096 | }
|
| 1097 | public static TestXmlMessage ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
|
| 1098 | return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
|
| 1099 | }
|
| 1100 | public static TestXmlMessage ParseDelimitedFrom(global::System.IO.Stream input) {
|
| 1101 | return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
|
| 1102 | }
|
| 1103 | public static TestXmlMessage ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
|
| 1104 | return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
|
| 1105 | }
|
| 1106 | public static TestXmlMessage ParseFrom(pb::CodedInputStream input) {
|
| 1107 | return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
|
| 1108 | }
|
| 1109 | public static TestXmlMessage ParseFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
|
| 1110 | return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
|
| 1111 | }
|
| 1112 | public static Builder CreateBuilder() { return new Builder(); }
|
| 1113 | public override Builder ToBuilder() { return CreateBuilder(this); }
|
| 1114 | public override Builder CreateBuilderForType() { return new Builder(); }
|
| 1115 | public static Builder CreateBuilder(TestXmlMessage prototype) {
|
| 1116 | return (Builder) new Builder().MergeFrom(prototype);
|
| 1117 | }
|
| 1118 |
|
| 1119 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
| 1120 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
| 1121 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
|
| 1122 | public sealed partial class Builder : pb::ExtendableBuilder<TestXmlMessage, Builder> {
|
| 1123 | protected override Builder ThisBuilder {
|
| 1124 | get { return this; }
|
| 1125 | }
|
| 1126 | public Builder() {}
|
| 1127 |
|
| 1128 | TestXmlMessage result = new TestXmlMessage();
|
| 1129 |
|
| 1130 | protected override TestXmlMessage MessageBeingBuilt {
|
| 1131 | get { return result; }
|
| 1132 | }
|
| 1133 |
|
| 1134 | public override Builder Clear() {
|
| 1135 | result = new TestXmlMessage();
|
| 1136 | return this;
|
| 1137 | }
|
| 1138 |
|
| 1139 | public override Builder Clone() {
|
| 1140 | return new Builder().MergeFrom(result);
|
| 1141 | }
|
| 1142 |
|
| 1143 | public override pbd::MessageDescriptor DescriptorForType {
|
| 1144 | get { return global::Google.ProtocolBuffers.TestProtos.TestXmlMessage.Descriptor; }
|
| 1145 | }
|
| 1146 |
|
| 1147 | public override TestXmlMessage DefaultInstanceForType {
|
| 1148 | get { return global::Google.ProtocolBuffers.TestProtos.TestXmlMessage.DefaultInstance; }
|
| 1149 | }
|
| 1150 |
|
| 1151 | public override TestXmlMessage BuildPartial() {
|
| 1152 | if (result == null) {
|
| 1153 | throw new global::System.InvalidOperationException("build() has already been called on this Builder");
|
| 1154 | }
|
| 1155 | result.numbers_.MakeReadOnly();
|
| 1156 | result.textlines_.MakeReadOnly();
|
| 1157 | result.children_.MakeReadOnly();
|
| 1158 | TestXmlMessage returnMe = result;
|
| 1159 | result = null;
|
| 1160 | return returnMe;
|
| 1161 | }
|
| 1162 |
|
| 1163 | public override Builder MergeFrom(pb::IMessage other) {
|
| 1164 | if (other is TestXmlMessage) {
|
| 1165 | return MergeFrom((TestXmlMessage) other);
|
| 1166 | } else {
|
| 1167 | base.MergeFrom(other);
|
| 1168 | return this;
|
| 1169 | }
|
| 1170 | }
|
| 1171 |
|
| 1172 | public override Builder MergeFrom(TestXmlMessage other) {
|
| 1173 | if (other == global::Google.ProtocolBuffers.TestProtos.TestXmlMessage.DefaultInstance) return this;
|
| 1174 | if (other.HasNumber) {
|
| 1175 | Number = other.Number;
|
| 1176 | }
|
| 1177 | if (other.numbers_.Count != 0) {
|
| 1178 | base.AddRange(other.numbers_, result.numbers_);
|
| 1179 | }
|
| 1180 | if (other.HasText) {
|
| 1181 | Text = other.Text;
|
| 1182 | }
|
| 1183 | if (other.textlines_.Count != 0) {
|
| 1184 | base.AddRange(other.textlines_, result.textlines_);
|
| 1185 | }
|
| 1186 | if (other.HasValid) {
|
| 1187 | Valid = other.Valid;
|
| 1188 | }
|
| 1189 | if (other.HasChild) {
|
| 1190 | MergeChild(other.Child);
|
| 1191 | }
|
| 1192 | if (other.children_.Count != 0) {
|
| 1193 | base.AddRange(other.children_, result.children_);
|
| 1194 | }
|
| 1195 | this.MergeExtensionFields(other);
|
| 1196 | this.MergeUnknownFields(other.UnknownFields);
|
| 1197 | return this;
|
| 1198 | }
|
| 1199 |
|
| 1200 | public override Builder MergeFrom(pb::CodedInputStream input) {
|
| 1201 | return MergeFrom(input, pb::ExtensionRegistry.Empty);
|
| 1202 | }
|
| 1203 |
|
| 1204 | public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
|
| 1205 | pb::UnknownFieldSet.Builder unknownFields = null;
|
| 1206 | while (true) {
|
| 1207 | uint tag = input.ReadTag();
|
| 1208 | switch (tag) {
|
| 1209 | case 0: {
|
| 1210 | if (unknownFields != null) {
|
| 1211 | this.UnknownFields = unknownFields.Build();
|
| 1212 | }
|
| 1213 | return this;
|
| 1214 | }
|
| 1215 | default: {
|
| 1216 | if (pb::WireFormat.IsEndGroupTag(tag)) {
|
| 1217 | if (unknownFields != null) {
|
| 1218 | this.UnknownFields = unknownFields.Build();
|
| 1219 | }
|
| 1220 | return this;
|
| 1221 | }
|
| 1222 | if (unknownFields == null) {
|
| 1223 | unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
|
| 1224 | }
|
| 1225 | ParseUnknownField(input, unknownFields, extensionRegistry, tag);
|
| 1226 | break;
|
| 1227 | }
|
| 1228 | case 10: {
|
| 1229 | global::Google.ProtocolBuffers.TestProtos.TestXmlChild.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.TestXmlChild.CreateBuilder();
|
| 1230 | if (HasChild) {
|
| 1231 | subBuilder.MergeFrom(Child);
|
| 1232 | }
|
| 1233 | input.ReadMessage(subBuilder, extensionRegistry);
|
| 1234 | Child = subBuilder.BuildPartial();
|
| 1235 | break;
|
| 1236 | }
|
| 1237 | case 16: {
|
| 1238 | AddNumbers(input.ReadInt32());
|
| 1239 | break;
|
| 1240 | }
|
| 1241 | case 26: {
|
| 1242 | Text = input.ReadString();
|
| 1243 | break;
|
| 1244 | }
|
| 1245 | case 40: {
|
| 1246 | Valid = input.ReadBool();
|
| 1247 | break;
|
| 1248 | }
|
| 1249 | case 48: {
|
| 1250 | Number = input.ReadInt64();
|
| 1251 | break;
|
| 1252 | }
|
| 1253 | case 3211: {
|
| 1254 | global::Google.ProtocolBuffers.TestProtos.TestXmlMessage.Types.Children.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.TestXmlMessage.Types.Children.CreateBuilder();
|
| 1255 | input.ReadGroup(401, subBuilder, extensionRegistry);
|
| 1256 | AddChildren(subBuilder.BuildPartial());
|
| 1257 | break;
|
| 1258 | }
|
| 1259 | case 5602: {
|
| 1260 | AddTextlines(input.ReadString());
|
| 1261 | break;
|
| 1262 | }
|
| 1263 | }
|
| 1264 | }
|
| 1265 | }
|
| 1266 |
|
| 1267 |
|
| 1268 | public bool HasNumber {
|
| 1269 | get { return result.HasNumber; }
|
| 1270 | }
|
| 1271 | public long Number {
|
| 1272 | get { return result.Number; }
|
| 1273 | set { SetNumber(value); }
|
| 1274 | }
|
| 1275 | public Builder SetNumber(long value) {
|
| 1276 | result.hasNumber = true;
|
| 1277 | result.number_ = value;
|
| 1278 | return this;
|
| 1279 | }
|
| 1280 | public Builder ClearNumber() {
|
| 1281 | result.hasNumber = false;
|
| 1282 | result.number_ = 0L;
|
| 1283 | return this;
|
| 1284 | }
|
| 1285 |
|
| 1286 | public pbc::IPopsicleList<int> NumbersList {
|
| 1287 | get { return result.numbers_; }
|
| 1288 | }
|
| 1289 | public int NumbersCount {
|
| 1290 | get { return result.NumbersCount; }
|
| 1291 | }
|
| 1292 | public int GetNumbers(int index) {
|
| 1293 | return result.GetNumbers(index);
|
| 1294 | }
|
| 1295 | public Builder SetNumbers(int index, int value) {
|
| 1296 | result.numbers_[index] = value;
|
| 1297 | return this;
|
| 1298 | }
|
| 1299 | public Builder AddNumbers(int value) {
|
| 1300 | result.numbers_.Add(value);
|
| 1301 | return this;
|
| 1302 | }
|
| 1303 | public Builder AddRangeNumbers(scg::IEnumerable<int> values) {
|
| 1304 | base.AddRange(values, result.numbers_);
|
| 1305 | return this;
|
| 1306 | }
|
| 1307 | public Builder ClearNumbers() {
|
| 1308 | result.numbers_.Clear();
|
| 1309 | return this;
|
| 1310 | }
|
| 1311 |
|
| 1312 | public bool HasText {
|
| 1313 | get { return result.HasText; }
|
| 1314 | }
|
| 1315 | public string Text {
|
| 1316 | get { return result.Text; }
|
| 1317 | set { SetText(value); }
|
| 1318 | }
|
| 1319 | public Builder SetText(string value) {
|
| 1320 | pb::ThrowHelper.ThrowIfNull(value, "value");
|
| 1321 | result.hasText = true;
|
| 1322 | result.text_ = value;
|
| 1323 | return this;
|
| 1324 | }
|
| 1325 | public Builder ClearText() {
|
| 1326 | result.hasText = false;
|
| 1327 | result.text_ = "";
|
| 1328 | return this;
|
| 1329 | }
|
| 1330 |
|
| 1331 | public pbc::IPopsicleList<string> TextlinesList {
|
| 1332 | get { return result.textlines_; }
|
| 1333 | }
|
| 1334 | public int TextlinesCount {
|
| 1335 | get { return result.TextlinesCount; }
|
| 1336 | }
|
| 1337 | public string GetTextlines(int index) {
|
| 1338 | return result.GetTextlines(index);
|
| 1339 | }
|
| 1340 | public Builder SetTextlines(int index, string value) {
|
| 1341 | pb::ThrowHelper.ThrowIfNull(value, "value");
|
| 1342 | result.textlines_[index] = value;
|
| 1343 | return this;
|
| 1344 | }
|
| 1345 | public Builder AddTextlines(string value) {
|
| 1346 | pb::ThrowHelper.ThrowIfNull(value, "value");
|
| 1347 | result.textlines_.Add(value);
|
| 1348 | return this;
|
| 1349 | }
|
| 1350 | public Builder AddRangeTextlines(scg::IEnumerable<string> values) {
|
| 1351 | base.AddRange(values, result.textlines_);
|
| 1352 | return this;
|
| 1353 | }
|
| 1354 | public Builder ClearTextlines() {
|
| 1355 | result.textlines_.Clear();
|
| 1356 | return this;
|
| 1357 | }
|
| 1358 |
|
| 1359 | public bool HasValid {
|
| 1360 | get { return result.HasValid; }
|
| 1361 | }
|
| 1362 | public bool Valid {
|
| 1363 | get { return result.Valid; }
|
| 1364 | set { SetValid(value); }
|
| 1365 | }
|
| 1366 | public Builder SetValid(bool value) {
|
| 1367 | result.hasValid = true;
|
| 1368 | result.valid_ = value;
|
| 1369 | return this;
|
| 1370 | }
|
| 1371 | public Builder ClearValid() {
|
| 1372 | result.hasValid = false;
|
| 1373 | result.valid_ = false;
|
| 1374 | return this;
|
| 1375 | }
|
| 1376 |
|
| 1377 | public bool HasChild {
|
| 1378 | get { return result.HasChild; }
|
| 1379 | }
|
| 1380 | public global::Google.ProtocolBuffers.TestProtos.TestXmlChild Child {
|
| 1381 | get { return result.Child; }
|
| 1382 | set { SetChild(value); }
|
| 1383 | }
|
| 1384 | public Builder SetChild(global::Google.ProtocolBuffers.TestProtos.TestXmlChild value) {
|
| 1385 | pb::ThrowHelper.ThrowIfNull(value, "value");
|
| 1386 | result.hasChild = true;
|
| 1387 | result.child_ = value;
|
| 1388 | return this;
|
| 1389 | }
|
| 1390 | public Builder SetChild(global::Google.ProtocolBuffers.TestProtos.TestXmlChild.Builder builderForValue) {
|
| 1391 | pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
|
| 1392 | result.hasChild = true;
|
| 1393 | result.child_ = builderForValue.Build();
|
| 1394 | return this;
|
| 1395 | }
|
| 1396 | public Builder MergeChild(global::Google.ProtocolBuffers.TestProtos.TestXmlChild value) {
|
| 1397 | pb::ThrowHelper.ThrowIfNull(value, "value");
|
| 1398 | if (result.HasChild &&
|
| 1399 | result.child_ != global::Google.ProtocolBuffers.TestProtos.TestXmlChild.DefaultInstance) {
|
| 1400 | result.child_ = global::Google.ProtocolBuffers.TestProtos.TestXmlChild.CreateBuilder(result.child_).MergeFrom(value).BuildPartial();
|
| 1401 | } else {
|
| 1402 | result.child_ = value;
|
| 1403 | }
|
| 1404 | result.hasChild = true;
|
| 1405 | return this;
|
| 1406 | }
|
| 1407 | public Builder ClearChild() {
|
| 1408 | result.hasChild = false;
|
| 1409 | result.child_ = global::Google.ProtocolBuffers.TestProtos.TestXmlChild.DefaultInstance;
|
| 1410 | return this;
|
| 1411 | }
|
| 1412 |
|
| 1413 | public pbc::IPopsicleList<global::Google.ProtocolBuffers.TestProtos.TestXmlMessage.Types.Children> ChildrenList {
|
| 1414 | get { return result.children_; }
|
| 1415 | }
|
| 1416 | public int ChildrenCount {
|
| 1417 | get { return result.ChildrenCount; }
|
| 1418 | }
|
| 1419 | public global::Google.ProtocolBuffers.TestProtos.TestXmlMessage.Types.Children GetChildren(int index) {
|
| 1420 | return result.GetChildren(index);
|
| 1421 | }
|
| 1422 | public Builder SetChildren(int index, global::Google.ProtocolBuffers.TestProtos.TestXmlMessage.Types.Children value) {
|
| 1423 | pb::ThrowHelper.ThrowIfNull(value, "value");
|
| 1424 | result.children_[index] = value;
|
| 1425 | return this;
|
| 1426 | }
|
| 1427 | public Builder SetChildren(int index, global::Google.ProtocolBuffers.TestProtos.TestXmlMessage.Types.Children.Builder builderForValue) {
|
| 1428 | pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
|
| 1429 | result.children_[index] = builderForValue.Build();
|
| 1430 | return this;
|
| 1431 | }
|
| 1432 | public Builder AddChildren(global::Google.ProtocolBuffers.TestProtos.TestXmlMessage.Types.Children value) {
|
| 1433 | pb::ThrowHelper.ThrowIfNull(value, "value");
|
| 1434 | result.children_.Add(value);
|
| 1435 | return this;
|
| 1436 | }
|
| 1437 | public Builder AddChildren(global::Google.ProtocolBuffers.TestProtos.TestXmlMessage.Types.Children.Builder builderForValue) {
|
| 1438 | pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
|
| 1439 | result.children_.Add(builderForValue.Build());
|
| 1440 | return this;
|
| 1441 | }
|
| 1442 | public Builder AddRangeChildren(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.TestXmlMessage.Types.Children> values) {
|
| 1443 | base.AddRange(values, result.children_);
|
| 1444 | return this;
|
| 1445 | }
|
| 1446 | public Builder ClearChildren() {
|
| 1447 | result.children_.Clear();
|
| 1448 | return this;
|
| 1449 | }
|
| 1450 | }
|
| 1451 | static TestXmlMessage() {
|
| 1452 | object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestXmlSerializerTestProtoFile.Descriptor, null);
|
| 1453 | }
|
| 1454 | }
|
| 1455 |
|
| 1456 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
| 1457 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
| 1458 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
|
| 1459 | public sealed partial class TestXmlExtension : pb::GeneratedMessage<TestXmlExtension, TestXmlExtension.Builder> {
|
| 1460 | private static readonly TestXmlExtension defaultInstance = new Builder().BuildPartial();
|
| 1461 | public static TestXmlExtension DefaultInstance {
|
| 1462 | get { return defaultInstance; }
|
| 1463 | }
|
| 1464 |
|
| 1465 | public override TestXmlExtension DefaultInstanceForType {
|
| 1466 | get { return defaultInstance; }
|
| 1467 | }
|
| 1468 |
|
| 1469 | protected override TestXmlExtension ThisMessage {
|
| 1470 | get { return this; }
|
| 1471 | }
|
| 1472 |
|
| 1473 | public static pbd::MessageDescriptor Descriptor {
|
| 1474 | get { return global::Google.ProtocolBuffers.TestProtos.UnitTestXmlSerializerTestProtoFile.internal__static_protobuf_unittest_extra_TestXmlExtension__Descriptor; }
|
| 1475 | }
|
| 1476 |
|
| 1477 | protected override pb::FieldAccess.FieldAccessorTable<TestXmlExtension, TestXmlExtension.Builder> InternalFieldAccessors {
|
| 1478 | get { return global::Google.ProtocolBuffers.TestProtos.UnitTestXmlSerializerTestProtoFile.internal__static_protobuf_unittest_extra_TestXmlExtension__FieldAccessorTable; }
|
| 1479 | }
|
| 1480 |
|
| 1481 | public const int NumberFieldNumber = 1;
|
| 1482 | private bool hasNumber;
|
| 1483 | private int number_ = 0;
|
| 1484 | public bool HasNumber {
|
| 1485 | get { return hasNumber; }
|
| 1486 | }
|
| 1487 | public int Number {
|
| 1488 | get { return number_; }
|
| 1489 | }
|
| 1490 |
|
| 1491 | public override bool IsInitialized {
|
| 1492 | get {
|
| 1493 | if (!hasNumber) return false;
|
| 1494 | return true;
|
| 1495 | }
|
| 1496 | }
|
| 1497 |
|
| 1498 | public override void WriteTo(pb::CodedOutputStream output) {
|
| 1499 | int size = SerializedSize;
|
| 1500 | if (HasNumber) {
|
| 1501 | output.WriteInt32(1, Number);
|
| 1502 | }
|
| 1503 | UnknownFields.WriteTo(output);
|
| 1504 | }
|
| 1505 |
|
| 1506 | private int memoizedSerializedSize = -1;
|
| 1507 | public override int SerializedSize {
|
| 1508 | get {
|
| 1509 | int size = memoizedSerializedSize;
|
| 1510 | if (size != -1) return size;
|
| 1511 |
|
| 1512 | size = 0;
|
| 1513 | if (HasNumber) {
|
| 1514 | size += pb::CodedOutputStream.ComputeInt32Size(1, Number);
|
| 1515 | }
|
| 1516 | size += UnknownFields.SerializedSize;
|
| 1517 | memoizedSerializedSize = size;
|
| 1518 | return size;
|
| 1519 | }
|
| 1520 | }
|
| 1521 |
|
| 1522 | public static TestXmlExtension ParseFrom(pb::ByteString data) {
|
| 1523 | return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
|
| 1524 | }
|
| 1525 | public static TestXmlExtension ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
|
| 1526 | return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
|
| 1527 | }
|
| 1528 | public static TestXmlExtension ParseFrom(byte[] data) {
|
| 1529 | return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
|
| 1530 | }
|
| 1531 | public static TestXmlExtension ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
|
| 1532 | return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
|
| 1533 | }
|
| 1534 | public static TestXmlExtension ParseFrom(global::System.IO.Stream input) {
|
| 1535 | return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
|
| 1536 | }
|
| 1537 | public static TestXmlExtension ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
|
| 1538 | return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
|
| 1539 | }
|
| 1540 | public static TestXmlExtension ParseDelimitedFrom(global::System.IO.Stream input) {
|
| 1541 | return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
|
| 1542 | }
|
| 1543 | public static TestXmlExtension ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
|
| 1544 | return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
|
| 1545 | }
|
| 1546 | public static TestXmlExtension ParseFrom(pb::CodedInputStream input) {
|
| 1547 | return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
|
| 1548 | }
|
| 1549 | public static TestXmlExtension ParseFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
|
| 1550 | return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
|
| 1551 | }
|
| 1552 | public static Builder CreateBuilder() { return new Builder(); }
|
| 1553 | public override Builder ToBuilder() { return CreateBuilder(this); }
|
| 1554 | public override Builder CreateBuilderForType() { return new Builder(); }
|
| 1555 | public static Builder CreateBuilder(TestXmlExtension prototype) {
|
| 1556 | return (Builder) new Builder().MergeFrom(prototype);
|
| 1557 | }
|
| 1558 |
|
| 1559 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
| 1560 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
| 1561 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
|
| 1562 | public sealed partial class Builder : pb::GeneratedBuilder<TestXmlExtension, Builder> {
|
| 1563 | protected override Builder ThisBuilder {
|
| 1564 | get { return this; }
|
| 1565 | }
|
| 1566 | public Builder() {}
|
| 1567 |
|
| 1568 | TestXmlExtension result = new TestXmlExtension();
|
| 1569 |
|
| 1570 | protected override TestXmlExtension MessageBeingBuilt {
|
| 1571 | get { return result; }
|
| 1572 | }
|
| 1573 |
|
| 1574 | public override Builder Clear() {
|
| 1575 | result = new TestXmlExtension();
|
| 1576 | return this;
|
| 1577 | }
|
| 1578 |
|
| 1579 | public override Builder Clone() {
|
| 1580 | return new Builder().MergeFrom(result);
|
| 1581 | }
|
| 1582 |
|
| 1583 | public override pbd::MessageDescriptor DescriptorForType {
|
| 1584 | get { return global::Google.ProtocolBuffers.TestProtos.TestXmlExtension.Descriptor; }
|
| 1585 | }
|
| 1586 |
|
| 1587 | public override TestXmlExtension DefaultInstanceForType {
|
| 1588 | get { return global::Google.ProtocolBuffers.TestProtos.TestXmlExtension.DefaultInstance; }
|
| 1589 | }
|
| 1590 |
|
| 1591 | public override TestXmlExtension BuildPartial() {
|
| 1592 | if (result == null) {
|
| 1593 | throw new global::System.InvalidOperationException("build() has already been called on this Builder");
|
| 1594 | }
|
| 1595 | TestXmlExtension returnMe = result;
|
| 1596 | result = null;
|
| 1597 | return returnMe;
|
| 1598 | }
|
| 1599 |
|
| 1600 | public override Builder MergeFrom(pb::IMessage other) {
|
| 1601 | if (other is TestXmlExtension) {
|
| 1602 | return MergeFrom((TestXmlExtension) other);
|
| 1603 | } else {
|
| 1604 | base.MergeFrom(other);
|
| 1605 | return this;
|
| 1606 | }
|
| 1607 | }
|
| 1608 |
|
| 1609 | public override Builder MergeFrom(TestXmlExtension other) {
|
| 1610 | if (other == global::Google.ProtocolBuffers.TestProtos.TestXmlExtension.DefaultInstance) return this;
|
| 1611 | if (other.HasNumber) {
|
| 1612 | Number = other.Number;
|
| 1613 | }
|
| 1614 | this.MergeUnknownFields(other.UnknownFields);
|
| 1615 | return this;
|
| 1616 | }
|
| 1617 |
|
| 1618 | public override Builder MergeFrom(pb::CodedInputStream input) {
|
| 1619 | return MergeFrom(input, pb::ExtensionRegistry.Empty);
|
| 1620 | }
|
| 1621 |
|
| 1622 | public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
|
| 1623 | pb::UnknownFieldSet.Builder unknownFields = null;
|
| 1624 | while (true) {
|
| 1625 | uint tag = input.ReadTag();
|
| 1626 | switch (tag) {
|
| 1627 | case 0: {
|
| 1628 | if (unknownFields != null) {
|
| 1629 | this.UnknownFields = unknownFields.Build();
|
| 1630 | }
|
| 1631 | return this;
|
| 1632 | }
|
| 1633 | default: {
|
| 1634 | if (pb::WireFormat.IsEndGroupTag(tag)) {
|
| 1635 | if (unknownFields != null) {
|
| 1636 | this.UnknownFields = unknownFields.Build();
|
| 1637 | }
|
| 1638 | return this;
|
| 1639 | }
|
| 1640 | if (unknownFields == null) {
|
| 1641 | unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
|
| 1642 | }
|
| 1643 | ParseUnknownField(input, unknownFields, extensionRegistry, tag);
|
| 1644 | break;
|
| 1645 | }
|
| 1646 | case 8: {
|
| 1647 | Number = input.ReadInt32();
|
| 1648 | break;
|
| 1649 | }
|
| 1650 | }
|
| 1651 | }
|
| 1652 | }
|
| 1653 |
|
| 1654 |
|
| 1655 | public bool HasNumber {
|
| 1656 | get { return result.HasNumber; }
|
| 1657 | }
|
| 1658 | public int Number {
|
| 1659 | get { return result.Number; }
|
| 1660 | set { SetNumber(value); }
|
| 1661 | }
|
| 1662 | public Builder SetNumber(int value) {
|
| 1663 | result.hasNumber = true;
|
| 1664 | result.number_ = value;
|
| 1665 | return this;
|
| 1666 | }
|
| 1667 | public Builder ClearNumber() {
|
| 1668 | result.hasNumber = false;
|
| 1669 | result.number_ = 0;
|
| 1670 | return this;
|
| 1671 | }
|
| 1672 | }
|
| 1673 | static TestXmlExtension() {
|
| 1674 | object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestXmlSerializerTestProtoFile.Descriptor, null);
|
| 1675 | }
|
| 1676 | }
|
| 1677 |
|
| 1678 | #endregion
|
| 1679 |
|
| 1680 | }
|