Free cookie consent management tool by TermsFeed Policy Generator

source: branches/ParameterBinding/HeuristicLab.ExtLibs/HeuristicLab.ProtobufCS/0.9.1/ProtobufCS/src/ProtocolBuffers.Test/TestProtos/UnitTestMessageSetProtoFile.cs @ 13401

Last change on this file since 13401 was 3857, checked in by abeham, 15 years ago

#866

  • Added protobuf-csharp-port project source to ExtLibs
File size: 62.3 KB
Line 
1// Generated by the protocol buffer compiler.  DO NOT EDIT!
2
3using pb = global::Google.ProtocolBuffers;
4using pbc = global::Google.ProtocolBuffers.Collections;
5using pbd = global::Google.ProtocolBuffers.Descriptors;
6using scg = global::System.Collections.Generic;
7namespace Google.ProtocolBuffers.TestProtos {
8 
9  public static partial class UnitTestMessageSetProtoFile {
10 
11    #region Extension registration
12    public static void RegisterAllExtensions(pb::ExtensionRegistry registry) {
13      registry.Add(global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension1.MessageSetExtension);
14      registry.Add(global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension2.MessageSetExtension);
15    }
16    #endregion
17    #region Static variables
18    internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestMessageSet__Descriptor;
19    internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestMessageSet, global::Google.ProtocolBuffers.TestProtos.TestMessageSet.Builder> internal__static_protobuf_unittest_TestMessageSet__FieldAccessorTable;
20    internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestMessageSetContainer__Descriptor;
21    internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestMessageSetContainer, global::Google.ProtocolBuffers.TestProtos.TestMessageSetContainer.Builder> internal__static_protobuf_unittest_TestMessageSetContainer__FieldAccessorTable;
22    internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestMessageSetExtension1__Descriptor;
23    internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension1, global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension1.Builder> internal__static_protobuf_unittest_TestMessageSetExtension1__FieldAccessorTable;
24    internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestMessageSetExtension2__Descriptor;
25    internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension2, global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension2.Builder> internal__static_protobuf_unittest_TestMessageSetExtension2__FieldAccessorTable;
26    internal static pbd::MessageDescriptor internal__static_protobuf_unittest_RawMessageSet__Descriptor;
27    internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.RawMessageSet, global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Builder> internal__static_protobuf_unittest_RawMessageSet__FieldAccessorTable;
28    internal static pbd::MessageDescriptor internal__static_protobuf_unittest_RawMessageSet_Item__Descriptor;
29    internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item, global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item.Builder> internal__static_protobuf_unittest_RawMessageSet_Item__FieldAccessorTable;
30    #endregion
31    #region Descriptor
32    public static pbd::FileDescriptor Descriptor {
33      get { return descriptor; }
34    }
35    private static pbd::FileDescriptor descriptor;
36   
37    static UnitTestMessageSetProtoFile() {
38      byte[] descriptorData = global::System.Convert.FromBase64String(
39          "CiNnb29nbGUvcHJvdG9idWYvdW5pdHRlc3RfbXNldC5wcm90bxIRcHJvdG9i" +
40          "dWZfdW5pdHRlc3QaJGdvb2dsZS9wcm90b2J1Zi9jc2hhcnBfb3B0aW9ucy5w" +
41          "cm90byIeCg5UZXN0TWVzc2FnZVNldCoICAQQgICAgAI6AggBIlEKF1Rlc3RN" +
42          "ZXNzYWdlU2V0Q29udGFpbmVyEjYKC21lc3NhZ2Vfc2V0GAEgASgLMiEucHJv" +
43          "dG9idWZfdW5pdHRlc3QuVGVzdE1lc3NhZ2VTZXQilgEKGFRlc3RNZXNzYWdl" +
44          "U2V0RXh0ZW5zaW9uMRIJCgFpGA8gASgFMm8KFW1lc3NhZ2Vfc2V0X2V4dGVu" +
45          "c2lvbhIhLnByb3RvYnVmX3VuaXR0ZXN0LlRlc3RNZXNzYWdlU2V0GLCmXiAB" +
46          "KAsyKy5wcm90b2J1Zl91bml0dGVzdC5UZXN0TWVzc2FnZVNldEV4dGVuc2lv" +
47          "bjEimAEKGFRlc3RNZXNzYWdlU2V0RXh0ZW5zaW9uMhILCgNzdHIYGSABKAky" +
48          "bwoVbWVzc2FnZV9zZXRfZXh0ZW5zaW9uEiEucHJvdG9idWZfdW5pdHRlc3Qu" +
49          "VGVzdE1lc3NhZ2VTZXQY+bteIAEoCzIrLnByb3RvYnVmX3VuaXR0ZXN0LlRl" +
50          "c3RNZXNzYWdlU2V0RXh0ZW5zaW9uMiJuCg1SYXdNZXNzYWdlU2V0EjMKBGl0" +
51          "ZW0YASADKAoyJS5wcm90b2J1Zl91bml0dGVzdC5SYXdNZXNzYWdlU2V0Lkl0" +
52          "ZW0aKAoESXRlbRIPCgd0eXBlX2lkGAIgAigFEg8KB21lc3NhZ2UYAyACKAxC" +
53          "RUgBwj5ACiFHb29nbGUuUHJvdG9jb2xCdWZmZXJzLlRlc3RQcm90b3MSG1Vu" +
54          "aXRUZXN0TWVzc2FnZVNldFByb3RvRmlsZQ==");
55      pbd::FileDescriptor.InternalDescriptorAssigner assigner = delegate(pbd::FileDescriptor root) {
56        descriptor = root;
57        internal__static_protobuf_unittest_TestMessageSet__Descriptor = Descriptor.MessageTypes[0];
58        internal__static_protobuf_unittest_TestMessageSet__FieldAccessorTable =
59            new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestMessageSet, global::Google.ProtocolBuffers.TestProtos.TestMessageSet.Builder>(internal__static_protobuf_unittest_TestMessageSet__Descriptor,
60                new string[] { });
61        internal__static_protobuf_unittest_TestMessageSetContainer__Descriptor = Descriptor.MessageTypes[1];
62        internal__static_protobuf_unittest_TestMessageSetContainer__FieldAccessorTable =
63            new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestMessageSetContainer, global::Google.ProtocolBuffers.TestProtos.TestMessageSetContainer.Builder>(internal__static_protobuf_unittest_TestMessageSetContainer__Descriptor,
64                new string[] { "MessageSet", });
65        internal__static_protobuf_unittest_TestMessageSetExtension1__Descriptor = Descriptor.MessageTypes[2];
66        internal__static_protobuf_unittest_TestMessageSetExtension1__FieldAccessorTable =
67            new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension1, global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension1.Builder>(internal__static_protobuf_unittest_TestMessageSetExtension1__Descriptor,
68                new string[] { "I", });
69        global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension1.MessageSetExtension = pb::GeneratedSingleExtension<global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension1>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension1.Descriptor.Extensions[0]);
70        internal__static_protobuf_unittest_TestMessageSetExtension2__Descriptor = Descriptor.MessageTypes[3];
71        internal__static_protobuf_unittest_TestMessageSetExtension2__FieldAccessorTable =
72            new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension2, global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension2.Builder>(internal__static_protobuf_unittest_TestMessageSetExtension2__Descriptor,
73                new string[] { "Str", });
74        global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension2.MessageSetExtension = pb::GeneratedSingleExtension<global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension2>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension2.Descriptor.Extensions[0]);
75        internal__static_protobuf_unittest_RawMessageSet__Descriptor = Descriptor.MessageTypes[4];
76        internal__static_protobuf_unittest_RawMessageSet__FieldAccessorTable =
77            new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.RawMessageSet, global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Builder>(internal__static_protobuf_unittest_RawMessageSet__Descriptor,
78                new string[] { "Item", });
79        internal__static_protobuf_unittest_RawMessageSet_Item__Descriptor = internal__static_protobuf_unittest_RawMessageSet__Descriptor.NestedTypes[0];
80        internal__static_protobuf_unittest_RawMessageSet_Item__FieldAccessorTable =
81            new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item, global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item.Builder>(internal__static_protobuf_unittest_RawMessageSet_Item__Descriptor,
82                new string[] { "TypeId", "Message", });
83        pb::ExtensionRegistry registry = pb::ExtensionRegistry.CreateInstance();
84        RegisterAllExtensions(registry);
85        global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.RegisterAllExtensions(registry);
86        return registry;
87      };
88      pbd::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData,
89          new pbd::FileDescriptor[] {
90          global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.Descriptor,
91          }, assigner);
92    }
93    #endregion
94   
95  }
96  #region Messages
97  public sealed partial class TestMessageSet : pb::ExtendableMessage<TestMessageSet, TestMessageSet.Builder> {
98    private static readonly TestMessageSet defaultInstance = new Builder().BuildPartial();
99    public static TestMessageSet DefaultInstance {
100      get { return defaultInstance; }
101    }
102   
103    public override TestMessageSet DefaultInstanceForType {
104      get { return defaultInstance; }
105    }
106   
107    protected override TestMessageSet ThisMessage {
108      get { return this; }
109    }
110   
111    public static pbd::MessageDescriptor Descriptor {
112      get { return global::Google.ProtocolBuffers.TestProtos.UnitTestMessageSetProtoFile.internal__static_protobuf_unittest_TestMessageSet__Descriptor; }
113    }
114   
115    protected override pb::FieldAccess.FieldAccessorTable<TestMessageSet, TestMessageSet.Builder> InternalFieldAccessors {
116      get { return global::Google.ProtocolBuffers.TestProtos.UnitTestMessageSetProtoFile.internal__static_protobuf_unittest_TestMessageSet__FieldAccessorTable; }
117    }
118   
119    public override bool IsInitialized {
120      get {
121        if (!ExtensionsAreInitialized) return false;
122        return true;
123      }
124    }
125   
126    public override void WriteTo(pb::CodedOutputStream output) {
127      int size = SerializedSize;
128      pb::ExtendableMessage<TestMessageSet, TestMessageSet.Builder>.ExtensionWriter extensionWriter = CreateExtensionWriter(this);
129      extensionWriter.WriteUntil(536870912, output);
130      UnknownFields.WriteAsMessageSetTo(output);
131    }
132   
133    private int memoizedSerializedSize = -1;
134    public override int SerializedSize {
135      get {
136        int size = memoizedSerializedSize;
137        if (size != -1) return size;
138       
139        size = 0;
140        size += ExtensionsSerializedSize;
141        size += UnknownFields.SerializedSizeAsMessageSet;
142        memoizedSerializedSize = size;
143        return size;
144      }
145    }
146   
147    public static TestMessageSet ParseFrom(pb::ByteString data) {
148      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
149    }
150    public static TestMessageSet ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
151      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
152    }
153    public static TestMessageSet ParseFrom(byte[] data) {
154      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
155    }
156    public static TestMessageSet ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
157      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
158    }
159    public static TestMessageSet ParseFrom(global::System.IO.Stream input) {
160      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
161    }
162    public static TestMessageSet ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
163      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
164    }
165    public static TestMessageSet ParseDelimitedFrom(global::System.IO.Stream input) {
166      return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
167    }
168    public static TestMessageSet ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
169      return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
170    }
171    public static TestMessageSet ParseFrom(pb::CodedInputStream input) {
172      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
173    }
174    public static TestMessageSet ParseFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
175      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
176    }
177    public static Builder CreateBuilder() { return new Builder(); }
178    public override Builder ToBuilder() { return CreateBuilder(this); }
179    public override Builder CreateBuilderForType() { return new Builder(); }
180    public static Builder CreateBuilder(TestMessageSet prototype) {
181      return (Builder) new Builder().MergeFrom(prototype);
182    }
183   
184    public sealed partial class Builder : pb::ExtendableBuilder<TestMessageSet, Builder> {
185      protected override Builder ThisBuilder {
186        get { return this; }
187      }
188      public Builder() {}
189     
190      TestMessageSet result = new TestMessageSet();
191     
192      protected override TestMessageSet MessageBeingBuilt {
193        get { return result; }
194      }
195     
196      public override Builder Clear() {
197        result = new TestMessageSet();
198        return this;
199      }
200     
201      public override Builder Clone() {
202        return new Builder().MergeFrom(result);
203      }
204     
205      public override pbd::MessageDescriptor DescriptorForType {
206        get { return global::Google.ProtocolBuffers.TestProtos.TestMessageSet.Descriptor; }
207      }
208     
209      public override TestMessageSet DefaultInstanceForType {
210        get { return global::Google.ProtocolBuffers.TestProtos.TestMessageSet.DefaultInstance; }
211      }
212     
213      public override TestMessageSet BuildPartial() {
214        if (result == null) {
215          throw new global::System.InvalidOperationException("build() has already been called on this Builder");
216        }
217        TestMessageSet returnMe = result;
218        result = null;
219        return returnMe;
220      }
221     
222      public override Builder MergeFrom(pb::IMessage other) {
223        if (other is TestMessageSet) {
224          return MergeFrom((TestMessageSet) other);
225        } else {
226          base.MergeFrom(other);
227          return this;
228        }
229      }
230     
231      public override Builder MergeFrom(TestMessageSet other) {
232        if (other == global::Google.ProtocolBuffers.TestProtos.TestMessageSet.DefaultInstance) return this;
233          this.MergeExtensionFields(other);
234        this.MergeUnknownFields(other.UnknownFields);
235        return this;
236      }
237     
238      public override Builder MergeFrom(pb::CodedInputStream input) {
239        return MergeFrom(input, pb::ExtensionRegistry.Empty);
240      }
241     
242      public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
243        pb::UnknownFieldSet.Builder unknownFields = null;
244        while (true) {
245          uint tag = input.ReadTag();
246          switch (tag) {
247            case 0: {
248              if (unknownFields != null) {
249                this.UnknownFields = unknownFields.Build();
250              }
251              return this;
252            }
253            default: {
254              if (pb::WireFormat.IsEndGroupTag(tag)) {
255                if (unknownFields != null) {
256                  this.UnknownFields = unknownFields.Build();
257                }
258                return this;
259              }
260              if (unknownFields == null) {
261                unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
262              }
263              ParseUnknownField(input, unknownFields, extensionRegistry, tag);
264              break;
265            }
266          }
267        }
268      }
269     
270    }
271    static TestMessageSet() {
272      object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestMessageSetProtoFile.Descriptor, null);
273    }
274  }
275 
276  public sealed partial class TestMessageSetContainer : pb::GeneratedMessage<TestMessageSetContainer, TestMessageSetContainer.Builder> {
277    private static readonly TestMessageSetContainer defaultInstance = new Builder().BuildPartial();
278    public static TestMessageSetContainer DefaultInstance {
279      get { return defaultInstance; }
280    }
281   
282    public override TestMessageSetContainer DefaultInstanceForType {
283      get { return defaultInstance; }
284    }
285   
286    protected override TestMessageSetContainer ThisMessage {
287      get { return this; }
288    }
289   
290    public static pbd::MessageDescriptor Descriptor {
291      get { return global::Google.ProtocolBuffers.TestProtos.UnitTestMessageSetProtoFile.internal__static_protobuf_unittest_TestMessageSetContainer__Descriptor; }
292    }
293   
294    protected override pb::FieldAccess.FieldAccessorTable<TestMessageSetContainer, TestMessageSetContainer.Builder> InternalFieldAccessors {
295      get { return global::Google.ProtocolBuffers.TestProtos.UnitTestMessageSetProtoFile.internal__static_protobuf_unittest_TestMessageSetContainer__FieldAccessorTable; }
296    }
297   
298    public const int MessageSetFieldNumber = 1;
299    private bool hasMessageSet;
300    private global::Google.ProtocolBuffers.TestProtos.TestMessageSet messageSet_ = global::Google.ProtocolBuffers.TestProtos.TestMessageSet.DefaultInstance;
301    public bool HasMessageSet {
302      get { return hasMessageSet; }
303    }
304    public global::Google.ProtocolBuffers.TestProtos.TestMessageSet MessageSet {
305      get { return messageSet_; }
306    }
307   
308    public override bool IsInitialized {
309      get {
310        return true;
311      }
312    }
313   
314    public override void WriteTo(pb::CodedOutputStream output) {
315      int size = SerializedSize;
316      if (HasMessageSet) {
317        output.WriteMessage(1, MessageSet);
318      }
319      UnknownFields.WriteTo(output);
320    }
321   
322    private int memoizedSerializedSize = -1;
323    public override int SerializedSize {
324      get {
325        int size = memoizedSerializedSize;
326        if (size != -1) return size;
327       
328        size = 0;
329        if (HasMessageSet) {
330          size += pb::CodedOutputStream.ComputeMessageSize(1, MessageSet);
331        }
332        size += UnknownFields.SerializedSize;
333        memoizedSerializedSize = size;
334        return size;
335      }
336    }
337   
338    public static TestMessageSetContainer ParseFrom(pb::ByteString data) {
339      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
340    }
341    public static TestMessageSetContainer ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
342      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
343    }
344    public static TestMessageSetContainer ParseFrom(byte[] data) {
345      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
346    }
347    public static TestMessageSetContainer ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
348      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
349    }
350    public static TestMessageSetContainer ParseFrom(global::System.IO.Stream input) {
351      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
352    }
353    public static TestMessageSetContainer ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
354      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
355    }
356    public static TestMessageSetContainer ParseDelimitedFrom(global::System.IO.Stream input) {
357      return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
358    }
359    public static TestMessageSetContainer ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
360      return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
361    }
362    public static TestMessageSetContainer ParseFrom(pb::CodedInputStream input) {
363      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
364    }
365    public static TestMessageSetContainer ParseFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
366      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
367    }
368    public static Builder CreateBuilder() { return new Builder(); }
369    public override Builder ToBuilder() { return CreateBuilder(this); }
370    public override Builder CreateBuilderForType() { return new Builder(); }
371    public static Builder CreateBuilder(TestMessageSetContainer prototype) {
372      return (Builder) new Builder().MergeFrom(prototype);
373    }
374   
375    public sealed partial class Builder : pb::GeneratedBuilder<TestMessageSetContainer, Builder> {
376      protected override Builder ThisBuilder {
377        get { return this; }
378      }
379      public Builder() {}
380     
381      TestMessageSetContainer result = new TestMessageSetContainer();
382     
383      protected override TestMessageSetContainer MessageBeingBuilt {
384        get { return result; }
385      }
386     
387      public override Builder Clear() {
388        result = new TestMessageSetContainer();
389        return this;
390      }
391     
392      public override Builder Clone() {
393        return new Builder().MergeFrom(result);
394      }
395     
396      public override pbd::MessageDescriptor DescriptorForType {
397        get { return global::Google.ProtocolBuffers.TestProtos.TestMessageSetContainer.Descriptor; }
398      }
399     
400      public override TestMessageSetContainer DefaultInstanceForType {
401        get { return global::Google.ProtocolBuffers.TestProtos.TestMessageSetContainer.DefaultInstance; }
402      }
403     
404      public override TestMessageSetContainer BuildPartial() {
405        if (result == null) {
406          throw new global::System.InvalidOperationException("build() has already been called on this Builder");
407        }
408        TestMessageSetContainer returnMe = result;
409        result = null;
410        return returnMe;
411      }
412     
413      public override Builder MergeFrom(pb::IMessage other) {
414        if (other is TestMessageSetContainer) {
415          return MergeFrom((TestMessageSetContainer) other);
416        } else {
417          base.MergeFrom(other);
418          return this;
419        }
420      }
421     
422      public override Builder MergeFrom(TestMessageSetContainer other) {
423        if (other == global::Google.ProtocolBuffers.TestProtos.TestMessageSetContainer.DefaultInstance) return this;
424        if (other.HasMessageSet) {
425          MergeMessageSet(other.MessageSet);
426        }
427        this.MergeUnknownFields(other.UnknownFields);
428        return this;
429      }
430     
431      public override Builder MergeFrom(pb::CodedInputStream input) {
432        return MergeFrom(input, pb::ExtensionRegistry.Empty);
433      }
434     
435      public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
436        pb::UnknownFieldSet.Builder unknownFields = null;
437        while (true) {
438          uint tag = input.ReadTag();
439          switch (tag) {
440            case 0: {
441              if (unknownFields != null) {
442                this.UnknownFields = unknownFields.Build();
443              }
444              return this;
445            }
446            default: {
447              if (pb::WireFormat.IsEndGroupTag(tag)) {
448                if (unknownFields != null) {
449                  this.UnknownFields = unknownFields.Build();
450                }
451                return this;
452              }
453              if (unknownFields == null) {
454                unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
455              }
456              ParseUnknownField(input, unknownFields, extensionRegistry, tag);
457              break;
458            }
459            case 10: {
460              global::Google.ProtocolBuffers.TestProtos.TestMessageSet.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.TestMessageSet.CreateBuilder();
461              if (HasMessageSet) {
462                subBuilder.MergeFrom(MessageSet);
463              }
464              input.ReadMessage(subBuilder, extensionRegistry);
465              MessageSet = subBuilder.BuildPartial();
466              break;
467            }
468          }
469        }
470      }
471     
472     
473      public bool HasMessageSet {
474       get { return result.HasMessageSet; }
475      }
476      public global::Google.ProtocolBuffers.TestProtos.TestMessageSet MessageSet {
477        get { return result.MessageSet; }
478        set { SetMessageSet(value); }
479      }
480      public Builder SetMessageSet(global::Google.ProtocolBuffers.TestProtos.TestMessageSet value) {
481        pb::ThrowHelper.ThrowIfNull(value, "value");
482        result.hasMessageSet = true;
483        result.messageSet_ = value;
484        return this;
485      }
486      public Builder SetMessageSet(global::Google.ProtocolBuffers.TestProtos.TestMessageSet.Builder builderForValue) {
487        pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
488        result.hasMessageSet = true;
489        result.messageSet_ = builderForValue.Build();
490        return this;
491      }
492      public Builder MergeMessageSet(global::Google.ProtocolBuffers.TestProtos.TestMessageSet value) {
493        pb::ThrowHelper.ThrowIfNull(value, "value");
494        if (result.HasMessageSet &&
495            result.messageSet_ != global::Google.ProtocolBuffers.TestProtos.TestMessageSet.DefaultInstance) {
496            result.messageSet_ = global::Google.ProtocolBuffers.TestProtos.TestMessageSet.CreateBuilder(result.messageSet_).MergeFrom(value).BuildPartial();
497        } else {
498          result.messageSet_ = value;
499        }
500        result.hasMessageSet = true;
501        return this;
502      }
503      public Builder ClearMessageSet() {
504        result.hasMessageSet = false;
505        result.messageSet_ = global::Google.ProtocolBuffers.TestProtos.TestMessageSet.DefaultInstance;
506        return this;
507      }
508    }
509    static TestMessageSetContainer() {
510      object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestMessageSetProtoFile.Descriptor, null);
511    }
512  }
513 
514  public sealed partial class TestMessageSetExtension1 : pb::GeneratedMessage<TestMessageSetExtension1, TestMessageSetExtension1.Builder> {
515    private static readonly TestMessageSetExtension1 defaultInstance = new Builder().BuildPartial();
516    public static TestMessageSetExtension1 DefaultInstance {
517      get { return defaultInstance; }
518    }
519   
520    public override TestMessageSetExtension1 DefaultInstanceForType {
521      get { return defaultInstance; }
522    }
523   
524    protected override TestMessageSetExtension1 ThisMessage {
525      get { return this; }
526    }
527   
528    public static pbd::MessageDescriptor Descriptor {
529      get { return global::Google.ProtocolBuffers.TestProtos.UnitTestMessageSetProtoFile.internal__static_protobuf_unittest_TestMessageSetExtension1__Descriptor; }
530    }
531   
532    protected override pb::FieldAccess.FieldAccessorTable<TestMessageSetExtension1, TestMessageSetExtension1.Builder> InternalFieldAccessors {
533      get { return global::Google.ProtocolBuffers.TestProtos.UnitTestMessageSetProtoFile.internal__static_protobuf_unittest_TestMessageSetExtension1__FieldAccessorTable; }
534    }
535   
536    public const int MessageSetExtensionFieldNumber = 1545008;
537    public static pb::GeneratedExtensionBase<global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension1> MessageSetExtension;
538    public const int IFieldNumber = 15;
539    private bool hasI;
540    private int i_ = 0;
541    public bool HasI {
542      get { return hasI; }
543    }
544    public int I {
545      get { return i_; }
546    }
547   
548    public override bool IsInitialized {
549      get {
550        return true;
551      }
552    }
553   
554    public override void WriteTo(pb::CodedOutputStream output) {
555      int size = SerializedSize;
556      if (HasI) {
557        output.WriteInt32(15, I);
558      }
559      UnknownFields.WriteTo(output);
560    }
561   
562    private int memoizedSerializedSize = -1;
563    public override int SerializedSize {
564      get {
565        int size = memoizedSerializedSize;
566        if (size != -1) return size;
567       
568        size = 0;
569        if (HasI) {
570          size += pb::CodedOutputStream.ComputeInt32Size(15, I);
571        }
572        size += UnknownFields.SerializedSize;
573        memoizedSerializedSize = size;
574        return size;
575      }
576    }
577   
578    public static TestMessageSetExtension1 ParseFrom(pb::ByteString data) {
579      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
580    }
581    public static TestMessageSetExtension1 ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
582      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
583    }
584    public static TestMessageSetExtension1 ParseFrom(byte[] data) {
585      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
586    }
587    public static TestMessageSetExtension1 ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
588      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
589    }
590    public static TestMessageSetExtension1 ParseFrom(global::System.IO.Stream input) {
591      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
592    }
593    public static TestMessageSetExtension1 ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
594      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
595    }
596    public static TestMessageSetExtension1 ParseDelimitedFrom(global::System.IO.Stream input) {
597      return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
598    }
599    public static TestMessageSetExtension1 ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
600      return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
601    }
602    public static TestMessageSetExtension1 ParseFrom(pb::CodedInputStream input) {
603      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
604    }
605    public static TestMessageSetExtension1 ParseFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
606      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
607    }
608    public static Builder CreateBuilder() { return new Builder(); }
609    public override Builder ToBuilder() { return CreateBuilder(this); }
610    public override Builder CreateBuilderForType() { return new Builder(); }
611    public static Builder CreateBuilder(TestMessageSetExtension1 prototype) {
612      return (Builder) new Builder().MergeFrom(prototype);
613    }
614   
615    public sealed partial class Builder : pb::GeneratedBuilder<TestMessageSetExtension1, Builder> {
616      protected override Builder ThisBuilder {
617        get { return this; }
618      }
619      public Builder() {}
620     
621      TestMessageSetExtension1 result = new TestMessageSetExtension1();
622     
623      protected override TestMessageSetExtension1 MessageBeingBuilt {
624        get { return result; }
625      }
626     
627      public override Builder Clear() {
628        result = new TestMessageSetExtension1();
629        return this;
630      }
631     
632      public override Builder Clone() {
633        return new Builder().MergeFrom(result);
634      }
635     
636      public override pbd::MessageDescriptor DescriptorForType {
637        get { return global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension1.Descriptor; }
638      }
639     
640      public override TestMessageSetExtension1 DefaultInstanceForType {
641        get { return global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension1.DefaultInstance; }
642      }
643     
644      public override TestMessageSetExtension1 BuildPartial() {
645        if (result == null) {
646          throw new global::System.InvalidOperationException("build() has already been called on this Builder");
647        }
648        TestMessageSetExtension1 returnMe = result;
649        result = null;
650        return returnMe;
651      }
652     
653      public override Builder MergeFrom(pb::IMessage other) {
654        if (other is TestMessageSetExtension1) {
655          return MergeFrom((TestMessageSetExtension1) other);
656        } else {
657          base.MergeFrom(other);
658          return this;
659        }
660      }
661     
662      public override Builder MergeFrom(TestMessageSetExtension1 other) {
663        if (other == global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension1.DefaultInstance) return this;
664        if (other.HasI) {
665          I = other.I;
666        }
667        this.MergeUnknownFields(other.UnknownFields);
668        return this;
669      }
670     
671      public override Builder MergeFrom(pb::CodedInputStream input) {
672        return MergeFrom(input, pb::ExtensionRegistry.Empty);
673      }
674     
675      public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
676        pb::UnknownFieldSet.Builder unknownFields = null;
677        while (true) {
678          uint tag = input.ReadTag();
679          switch (tag) {
680            case 0: {
681              if (unknownFields != null) {
682                this.UnknownFields = unknownFields.Build();
683              }
684              return this;
685            }
686            default: {
687              if (pb::WireFormat.IsEndGroupTag(tag)) {
688                if (unknownFields != null) {
689                  this.UnknownFields = unknownFields.Build();
690                }
691                return this;
692              }
693              if (unknownFields == null) {
694                unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
695              }
696              ParseUnknownField(input, unknownFields, extensionRegistry, tag);
697              break;
698            }
699            case 120: {
700              I = input.ReadInt32();
701              break;
702            }
703          }
704        }
705      }
706     
707     
708      public bool HasI {
709        get { return result.HasI; }
710      }
711      public int I {
712        get { return result.I; }
713        set { SetI(value); }
714      }
715      public Builder SetI(int value) {
716        result.hasI = true;
717        result.i_ = value;
718        return this;
719      }
720      public Builder ClearI() {
721        result.hasI = false;
722        result.i_ = 0;
723        return this;
724      }
725    }
726    static TestMessageSetExtension1() {
727      object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestMessageSetProtoFile.Descriptor, null);
728    }
729  }
730 
731  public sealed partial class TestMessageSetExtension2 : pb::GeneratedMessage<TestMessageSetExtension2, TestMessageSetExtension2.Builder> {
732    private static readonly TestMessageSetExtension2 defaultInstance = new Builder().BuildPartial();
733    public static TestMessageSetExtension2 DefaultInstance {
734      get { return defaultInstance; }
735    }
736   
737    public override TestMessageSetExtension2 DefaultInstanceForType {
738      get { return defaultInstance; }
739    }
740   
741    protected override TestMessageSetExtension2 ThisMessage {
742      get { return this; }
743    }
744   
745    public static pbd::MessageDescriptor Descriptor {
746      get { return global::Google.ProtocolBuffers.TestProtos.UnitTestMessageSetProtoFile.internal__static_protobuf_unittest_TestMessageSetExtension2__Descriptor; }
747    }
748   
749    protected override pb::FieldAccess.FieldAccessorTable<TestMessageSetExtension2, TestMessageSetExtension2.Builder> InternalFieldAccessors {
750      get { return global::Google.ProtocolBuffers.TestProtos.UnitTestMessageSetProtoFile.internal__static_protobuf_unittest_TestMessageSetExtension2__FieldAccessorTable; }
751    }
752   
753    public const int MessageSetExtensionFieldNumber = 1547769;
754    public static pb::GeneratedExtensionBase<global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension2> MessageSetExtension;
755    public const int StrFieldNumber = 25;
756    private bool hasStr;
757    private string str_ = "";
758    public bool HasStr {
759      get { return hasStr; }
760    }
761    public string Str {
762      get { return str_; }
763    }
764   
765    public override bool IsInitialized {
766      get {
767        return true;
768      }
769    }
770   
771    public override void WriteTo(pb::CodedOutputStream output) {
772      int size = SerializedSize;
773      if (HasStr) {
774        output.WriteString(25, Str);
775      }
776      UnknownFields.WriteTo(output);
777    }
778   
779    private int memoizedSerializedSize = -1;
780    public override int SerializedSize {
781      get {
782        int size = memoizedSerializedSize;
783        if (size != -1) return size;
784       
785        size = 0;
786        if (HasStr) {
787          size += pb::CodedOutputStream.ComputeStringSize(25, Str);
788        }
789        size += UnknownFields.SerializedSize;
790        memoizedSerializedSize = size;
791        return size;
792      }
793    }
794   
795    public static TestMessageSetExtension2 ParseFrom(pb::ByteString data) {
796      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
797    }
798    public static TestMessageSetExtension2 ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
799      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
800    }
801    public static TestMessageSetExtension2 ParseFrom(byte[] data) {
802      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
803    }
804    public static TestMessageSetExtension2 ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
805      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
806    }
807    public static TestMessageSetExtension2 ParseFrom(global::System.IO.Stream input) {
808      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
809    }
810    public static TestMessageSetExtension2 ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
811      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
812    }
813    public static TestMessageSetExtension2 ParseDelimitedFrom(global::System.IO.Stream input) {
814      return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
815    }
816    public static TestMessageSetExtension2 ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
817      return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
818    }
819    public static TestMessageSetExtension2 ParseFrom(pb::CodedInputStream input) {
820      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
821    }
822    public static TestMessageSetExtension2 ParseFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
823      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
824    }
825    public static Builder CreateBuilder() { return new Builder(); }
826    public override Builder ToBuilder() { return CreateBuilder(this); }
827    public override Builder CreateBuilderForType() { return new Builder(); }
828    public static Builder CreateBuilder(TestMessageSetExtension2 prototype) {
829      return (Builder) new Builder().MergeFrom(prototype);
830    }
831   
832    public sealed partial class Builder : pb::GeneratedBuilder<TestMessageSetExtension2, Builder> {
833      protected override Builder ThisBuilder {
834        get { return this; }
835      }
836      public Builder() {}
837     
838      TestMessageSetExtension2 result = new TestMessageSetExtension2();
839     
840      protected override TestMessageSetExtension2 MessageBeingBuilt {
841        get { return result; }
842      }
843     
844      public override Builder Clear() {
845        result = new TestMessageSetExtension2();
846        return this;
847      }
848     
849      public override Builder Clone() {
850        return new Builder().MergeFrom(result);
851      }
852     
853      public override pbd::MessageDescriptor DescriptorForType {
854        get { return global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension2.Descriptor; }
855      }
856     
857      public override TestMessageSetExtension2 DefaultInstanceForType {
858        get { return global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension2.DefaultInstance; }
859      }
860     
861      public override TestMessageSetExtension2 BuildPartial() {
862        if (result == null) {
863          throw new global::System.InvalidOperationException("build() has already been called on this Builder");
864        }
865        TestMessageSetExtension2 returnMe = result;
866        result = null;
867        return returnMe;
868      }
869     
870      public override Builder MergeFrom(pb::IMessage other) {
871        if (other is TestMessageSetExtension2) {
872          return MergeFrom((TestMessageSetExtension2) other);
873        } else {
874          base.MergeFrom(other);
875          return this;
876        }
877      }
878     
879      public override Builder MergeFrom(TestMessageSetExtension2 other) {
880        if (other == global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension2.DefaultInstance) return this;
881        if (other.HasStr) {
882          Str = other.Str;
883        }
884        this.MergeUnknownFields(other.UnknownFields);
885        return this;
886      }
887     
888      public override Builder MergeFrom(pb::CodedInputStream input) {
889        return MergeFrom(input, pb::ExtensionRegistry.Empty);
890      }
891     
892      public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
893        pb::UnknownFieldSet.Builder unknownFields = null;
894        while (true) {
895          uint tag = input.ReadTag();
896          switch (tag) {
897            case 0: {
898              if (unknownFields != null) {
899                this.UnknownFields = unknownFields.Build();
900              }
901              return this;
902            }
903            default: {
904              if (pb::WireFormat.IsEndGroupTag(tag)) {
905                if (unknownFields != null) {
906                  this.UnknownFields = unknownFields.Build();
907                }
908                return this;
909              }
910              if (unknownFields == null) {
911                unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
912              }
913              ParseUnknownField(input, unknownFields, extensionRegistry, tag);
914              break;
915            }
916            case 202: {
917              Str = input.ReadString();
918              break;
919            }
920          }
921        }
922      }
923     
924     
925      public bool HasStr {
926        get { return result.HasStr; }
927      }
928      public string Str {
929        get { return result.Str; }
930        set { SetStr(value); }
931      }
932      public Builder SetStr(string value) {
933        pb::ThrowHelper.ThrowIfNull(value, "value");
934        result.hasStr = true;
935        result.str_ = value;
936        return this;
937      }
938      public Builder ClearStr() {
939        result.hasStr = false;
940        result.str_ = "";
941        return this;
942      }
943    }
944    static TestMessageSetExtension2() {
945      object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestMessageSetProtoFile.Descriptor, null);
946    }
947  }
948 
949  public sealed partial class RawMessageSet : pb::GeneratedMessage<RawMessageSet, RawMessageSet.Builder> {
950    private static readonly RawMessageSet defaultInstance = new Builder().BuildPartial();
951    public static RawMessageSet DefaultInstance {
952      get { return defaultInstance; }
953    }
954   
955    public override RawMessageSet DefaultInstanceForType {
956      get { return defaultInstance; }
957    }
958   
959    protected override RawMessageSet ThisMessage {
960      get { return this; }
961    }
962   
963    public static pbd::MessageDescriptor Descriptor {
964      get { return global::Google.ProtocolBuffers.TestProtos.UnitTestMessageSetProtoFile.internal__static_protobuf_unittest_RawMessageSet__Descriptor; }
965    }
966   
967    protected override pb::FieldAccess.FieldAccessorTable<RawMessageSet, RawMessageSet.Builder> InternalFieldAccessors {
968      get { return global::Google.ProtocolBuffers.TestProtos.UnitTestMessageSetProtoFile.internal__static_protobuf_unittest_RawMessageSet__FieldAccessorTable; }
969    }
970   
971    #region Nested types
972    public static class Types {
973      public sealed partial class Item : pb::GeneratedMessage<Item, Item.Builder> {
974        private static readonly Item defaultInstance = new Builder().BuildPartial();
975        public static Item DefaultInstance {
976          get { return defaultInstance; }
977        }
978       
979        public override Item DefaultInstanceForType {
980          get { return defaultInstance; }
981        }
982       
983        protected override Item ThisMessage {
984          get { return this; }
985        }
986       
987        public static pbd::MessageDescriptor Descriptor {
988          get { return global::Google.ProtocolBuffers.TestProtos.UnitTestMessageSetProtoFile.internal__static_protobuf_unittest_RawMessageSet_Item__Descriptor; }
989        }
990       
991        protected override pb::FieldAccess.FieldAccessorTable<Item, Item.Builder> InternalFieldAccessors {
992          get { return global::Google.ProtocolBuffers.TestProtos.UnitTestMessageSetProtoFile.internal__static_protobuf_unittest_RawMessageSet_Item__FieldAccessorTable; }
993        }
994       
995        public const int TypeIdFieldNumber = 2;
996        private bool hasTypeId;
997        private int typeId_ = 0;
998        public bool HasTypeId {
999          get { return hasTypeId; }
1000        }
1001        public int TypeId {
1002          get { return typeId_; }
1003        }
1004       
1005        public const int MessageFieldNumber = 3;
1006        private bool hasMessage;
1007        private pb::ByteString message_ = pb::ByteString.Empty;
1008        public bool HasMessage {
1009          get { return hasMessage; }
1010        }
1011        public pb::ByteString Message {
1012          get { return message_; }
1013        }
1014       
1015        public override bool IsInitialized {
1016          get {
1017            if (!hasTypeId) return false;
1018            if (!hasMessage) return false;
1019            return true;
1020          }
1021        }
1022       
1023        public override void WriteTo(pb::CodedOutputStream output) {
1024          int size = SerializedSize;
1025          if (HasTypeId) {
1026            output.WriteInt32(2, TypeId);
1027          }
1028          if (HasMessage) {
1029            output.WriteBytes(3, Message);
1030          }
1031          UnknownFields.WriteTo(output);
1032        }
1033       
1034        private int memoizedSerializedSize = -1;
1035        public override int SerializedSize {
1036          get {
1037            int size = memoizedSerializedSize;
1038            if (size != -1) return size;
1039           
1040            size = 0;
1041            if (HasTypeId) {
1042              size += pb::CodedOutputStream.ComputeInt32Size(2, TypeId);
1043            }
1044            if (HasMessage) {
1045              size += pb::CodedOutputStream.ComputeBytesSize(3, Message);
1046            }
1047            size += UnknownFields.SerializedSize;
1048            memoizedSerializedSize = size;
1049            return size;
1050          }
1051        }
1052       
1053        public static Item ParseFrom(pb::ByteString data) {
1054          return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
1055        }
1056        public static Item ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
1057          return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
1058        }
1059        public static Item ParseFrom(byte[] data) {
1060          return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
1061        }
1062        public static Item ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
1063          return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
1064        }
1065        public static Item ParseFrom(global::System.IO.Stream input) {
1066          return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
1067        }
1068        public static Item ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
1069          return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
1070        }
1071        public static Item ParseDelimitedFrom(global::System.IO.Stream input) {
1072          return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
1073        }
1074        public static Item ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
1075          return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
1076        }
1077        public static Item ParseFrom(pb::CodedInputStream input) {
1078          return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
1079        }
1080        public static Item ParseFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
1081          return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
1082        }
1083        public static Builder CreateBuilder() { return new Builder(); }
1084        public override Builder ToBuilder() { return CreateBuilder(this); }
1085        public override Builder CreateBuilderForType() { return new Builder(); }
1086        public static Builder CreateBuilder(Item prototype) {
1087          return (Builder) new Builder().MergeFrom(prototype);
1088        }
1089       
1090        public sealed partial class Builder : pb::GeneratedBuilder<Item, Builder> {
1091          protected override Builder ThisBuilder {
1092            get { return this; }
1093          }
1094          public Builder() {}
1095         
1096          Item result = new Item();
1097         
1098          protected override Item MessageBeingBuilt {
1099            get { return result; }
1100          }
1101         
1102          public override Builder Clear() {
1103            result = new Item();
1104            return this;
1105          }
1106         
1107          public override Builder Clone() {
1108            return new Builder().MergeFrom(result);
1109          }
1110         
1111          public override pbd::MessageDescriptor DescriptorForType {
1112            get { return global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item.Descriptor; }
1113          }
1114         
1115          public override Item DefaultInstanceForType {
1116            get { return global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item.DefaultInstance; }
1117          }
1118         
1119          public override Item BuildPartial() {
1120            if (result == null) {
1121              throw new global::System.InvalidOperationException("build() has already been called on this Builder");
1122            }
1123            Item returnMe = result;
1124            result = null;
1125            return returnMe;
1126          }
1127         
1128          public override Builder MergeFrom(pb::IMessage other) {
1129            if (other is Item) {
1130              return MergeFrom((Item) other);
1131            } else {
1132              base.MergeFrom(other);
1133              return this;
1134            }
1135          }
1136         
1137          public override Builder MergeFrom(Item other) {
1138            if (other == global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item.DefaultInstance) return this;
1139            if (other.HasTypeId) {
1140              TypeId = other.TypeId;
1141            }
1142            if (other.HasMessage) {
1143              Message = other.Message;
1144            }
1145            this.MergeUnknownFields(other.UnknownFields);
1146            return this;
1147          }
1148         
1149          public override Builder MergeFrom(pb::CodedInputStream input) {
1150            return MergeFrom(input, pb::ExtensionRegistry.Empty);
1151          }
1152         
1153          public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
1154            pb::UnknownFieldSet.Builder unknownFields = null;
1155            while (true) {
1156              uint tag = input.ReadTag();
1157              switch (tag) {
1158                case 0: {
1159                  if (unknownFields != null) {
1160                    this.UnknownFields = unknownFields.Build();
1161                  }
1162                  return this;
1163                }
1164                default: {
1165                  if (pb::WireFormat.IsEndGroupTag(tag)) {
1166                    if (unknownFields != null) {
1167                      this.UnknownFields = unknownFields.Build();
1168                    }
1169                    return this;
1170                  }
1171                  if (unknownFields == null) {
1172                    unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
1173                  }
1174                  ParseUnknownField(input, unknownFields, extensionRegistry, tag);
1175                  break;
1176                }
1177                case 16: {
1178                  TypeId = input.ReadInt32();
1179                  break;
1180                }
1181                case 26: {
1182                  Message = input.ReadBytes();
1183                  break;
1184                }
1185              }
1186            }
1187          }
1188         
1189         
1190          public bool HasTypeId {
1191            get { return result.HasTypeId; }
1192          }
1193          public int TypeId {
1194            get { return result.TypeId; }
1195            set { SetTypeId(value); }
1196          }
1197          public Builder SetTypeId(int value) {
1198            result.hasTypeId = true;
1199            result.typeId_ = value;
1200            return this;
1201          }
1202          public Builder ClearTypeId() {
1203            result.hasTypeId = false;
1204            result.typeId_ = 0;
1205            return this;
1206          }
1207         
1208          public bool HasMessage {
1209            get { return result.HasMessage; }
1210          }
1211          public pb::ByteString Message {
1212            get { return result.Message; }
1213            set { SetMessage(value); }
1214          }
1215          public Builder SetMessage(pb::ByteString value) {
1216            pb::ThrowHelper.ThrowIfNull(value, "value");
1217            result.hasMessage = true;
1218            result.message_ = value;
1219            return this;
1220          }
1221          public Builder ClearMessage() {
1222            result.hasMessage = false;
1223            result.message_ = pb::ByteString.Empty;
1224            return this;
1225          }
1226        }
1227        static Item() {
1228          object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestMessageSetProtoFile.Descriptor, null);
1229        }
1230      }
1231     
1232    }
1233    #endregion
1234   
1235    public const int ItemFieldNumber = 1;
1236    private pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item> item_ = new pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item>();
1237    public scg::IList<global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item> ItemList {
1238      get { return item_; }
1239    }
1240    public int ItemCount {
1241      get { return item_.Count; }
1242    }
1243    public global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item GetItem(int index) {
1244      return item_[index];
1245    }
1246   
1247    public override bool IsInitialized {
1248      get {
1249        return true;
1250      }
1251    }
1252   
1253    public override void WriteTo(pb::CodedOutputStream output) {
1254      int size = SerializedSize;
1255      foreach (global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item element in ItemList) {
1256        output.WriteGroup(1, element);
1257      }
1258      UnknownFields.WriteTo(output);
1259    }
1260   
1261    private int memoizedSerializedSize = -1;
1262    public override int SerializedSize {
1263      get {
1264        int size = memoizedSerializedSize;
1265        if (size != -1) return size;
1266       
1267        size = 0;
1268        foreach (global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item element in ItemList) {
1269          size += pb::CodedOutputStream.ComputeGroupSize(1, element);
1270        }
1271        size += UnknownFields.SerializedSize;
1272        memoizedSerializedSize = size;
1273        return size;
1274      }
1275    }
1276   
1277    public static RawMessageSet ParseFrom(pb::ByteString data) {
1278      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
1279    }
1280    public static RawMessageSet ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
1281      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
1282    }
1283    public static RawMessageSet ParseFrom(byte[] data) {
1284      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
1285    }
1286    public static RawMessageSet ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
1287      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
1288    }
1289    public static RawMessageSet ParseFrom(global::System.IO.Stream input) {
1290      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
1291    }
1292    public static RawMessageSet ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
1293      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
1294    }
1295    public static RawMessageSet ParseDelimitedFrom(global::System.IO.Stream input) {
1296      return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
1297    }
1298    public static RawMessageSet ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
1299      return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
1300    }
1301    public static RawMessageSet ParseFrom(pb::CodedInputStream input) {
1302      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
1303    }
1304    public static RawMessageSet ParseFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
1305      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
1306    }
1307    public static Builder CreateBuilder() { return new Builder(); }
1308    public override Builder ToBuilder() { return CreateBuilder(this); }
1309    public override Builder CreateBuilderForType() { return new Builder(); }
1310    public static Builder CreateBuilder(RawMessageSet prototype) {
1311      return (Builder) new Builder().MergeFrom(prototype);
1312    }
1313   
1314    public sealed partial class Builder : pb::GeneratedBuilder<RawMessageSet, Builder> {
1315      protected override Builder ThisBuilder {
1316        get { return this; }
1317      }
1318      public Builder() {}
1319     
1320      RawMessageSet result = new RawMessageSet();
1321     
1322      protected override RawMessageSet MessageBeingBuilt {
1323        get { return result; }
1324      }
1325     
1326      public override Builder Clear() {
1327        result = new RawMessageSet();
1328        return this;
1329      }
1330     
1331      public override Builder Clone() {
1332        return new Builder().MergeFrom(result);
1333      }
1334     
1335      public override pbd::MessageDescriptor DescriptorForType {
1336        get { return global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Descriptor; }
1337      }
1338     
1339      public override RawMessageSet DefaultInstanceForType {
1340        get { return global::Google.ProtocolBuffers.TestProtos.RawMessageSet.DefaultInstance; }
1341      }
1342     
1343      public override RawMessageSet BuildPartial() {
1344        if (result == null) {
1345          throw new global::System.InvalidOperationException("build() has already been called on this Builder");
1346        }
1347        result.item_.MakeReadOnly();
1348        RawMessageSet returnMe = result;
1349        result = null;
1350        return returnMe;
1351      }
1352     
1353      public override Builder MergeFrom(pb::IMessage other) {
1354        if (other is RawMessageSet) {
1355          return MergeFrom((RawMessageSet) other);
1356        } else {
1357          base.MergeFrom(other);
1358          return this;
1359        }
1360      }
1361     
1362      public override Builder MergeFrom(RawMessageSet other) {
1363        if (other == global::Google.ProtocolBuffers.TestProtos.RawMessageSet.DefaultInstance) return this;
1364        if (other.item_.Count != 0) {
1365          base.AddRange(other.item_, result.item_);
1366        }
1367        this.MergeUnknownFields(other.UnknownFields);
1368        return this;
1369      }
1370     
1371      public override Builder MergeFrom(pb::CodedInputStream input) {
1372        return MergeFrom(input, pb::ExtensionRegistry.Empty);
1373      }
1374     
1375      public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
1376        pb::UnknownFieldSet.Builder unknownFields = null;
1377        while (true) {
1378          uint tag = input.ReadTag();
1379          switch (tag) {
1380            case 0: {
1381              if (unknownFields != null) {
1382                this.UnknownFields = unknownFields.Build();
1383              }
1384              return this;
1385            }
1386            default: {
1387              if (pb::WireFormat.IsEndGroupTag(tag)) {
1388                if (unknownFields != null) {
1389                  this.UnknownFields = unknownFields.Build();
1390                }
1391                return this;
1392              }
1393              if (unknownFields == null) {
1394                unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
1395              }
1396              ParseUnknownField(input, unknownFields, extensionRegistry, tag);
1397              break;
1398            }
1399            case 11: {
1400              global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item.CreateBuilder();
1401              input.ReadGroup(1, subBuilder, extensionRegistry);
1402              AddItem(subBuilder.BuildPartial());
1403              break;
1404            }
1405          }
1406        }
1407      }
1408     
1409     
1410      public pbc::IPopsicleList<global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item> ItemList {
1411        get { return result.item_; }
1412      }
1413      public int ItemCount {
1414        get { return result.ItemCount; }
1415      }
1416      public global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item GetItem(int index) {
1417        return result.GetItem(index);
1418      }
1419      public Builder SetItem(int index, global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item value) {
1420        pb::ThrowHelper.ThrowIfNull(value, "value");
1421        result.item_[index] = value;
1422        return this;
1423      }
1424      public Builder SetItem(int index, global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item.Builder builderForValue) {
1425        pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
1426        result.item_[index] = builderForValue.Build();
1427        return this;
1428      }
1429      public Builder AddItem(global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item value) {
1430        pb::ThrowHelper.ThrowIfNull(value, "value");
1431        result.item_.Add(value);
1432        return this;
1433      }
1434      public Builder AddItem(global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item.Builder builderForValue) {
1435        pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
1436        result.item_.Add(builderForValue.Build());
1437        return this;
1438      }
1439      public Builder AddRangeItem(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item> values) {
1440        base.AddRange(values, result.item_);
1441        return this;
1442      }
1443      public Builder ClearItem() {
1444        result.item_.Clear();
1445        return this;
1446      }
1447    }
1448    static RawMessageSet() {
1449      object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestMessageSetProtoFile.Descriptor, null);
1450    }
1451  }
1452 
1453  #endregion
1454 
1455}
Note: See TracBrowser for help on using the repository browser.