Browse Source

Autogeneration now hopefully close to correct. Library builds! (Not finished though...)

Jon Skeet 17 years ago
parent
commit
2b61cbf408
42 changed files with 11952 additions and 699 deletions
  1. 2 1
      csharp/Makefile.am
  2. 18 21
      csharp/ProtocolBuffers/AbstractBuilder.cs
  3. 5 75
      csharp/ProtocolBuffers/AbstractMessage.cs
  4. 4 2
      csharp/ProtocolBuffers/DescriptorProtos/Autogenerated.cs
  5. 5715 0
      csharp/ProtocolBuffers/DescriptorProtos/Descriptor.cs
  6. 5436 0
      csharp/ProtocolBuffers/DescriptorProtos/DescriptorProtoFile.cs
  7. 0 4
      csharp/ProtocolBuffers/DescriptorProtos/IDescriptorProto.cs
  8. 2 1
      csharp/ProtocolBuffers/Descriptors/DescriptorBase.cs
  9. 22 0
      csharp/ProtocolBuffers/Descriptors/DescriptorPool.cs
  10. 19 0
      csharp/ProtocolBuffers/Descriptors/EnumDescriptorIndexAttribute.cs
  11. 69 1
      csharp/ProtocolBuffers/Descriptors/FileDescriptor.cs
  12. 7 0
      csharp/ProtocolBuffers/Descriptors/MessageDescriptor.cs
  13. 1 1
      csharp/ProtocolBuffers/ExtensionRegistry.cs
  14. 3 5
      csharp/ProtocolBuffers/FieldAccess/FieldAccessorTable.cs
  15. 10 12
      csharp/ProtocolBuffers/FieldAccess/IFieldAccessor.cs
  16. 3 3
      csharp/ProtocolBuffers/FieldSet.cs
  17. 78 45
      csharp/ProtocolBuffers/GeneratedBuilder.cs
  18. 4 8
      csharp/ProtocolBuffers/GeneratedMessage.cs
  19. 1 2
      csharp/ProtocolBuffers/IBuilder.cs
  20. 1 2
      csharp/ProtocolBuffers/IMessage.cs
  21. 1 1
      csharp/ProtocolBuffers/InvalidProtocolBufferException.cs
  22. 0 1
      csharp/ProtocolBuffers/Properties/AssemblyInfo.cs
  23. 8 0
      csharp/ProtocolBuffers/ProtocolBuffers.csproj
  24. 7 0
      csharp/ProtocolBuffers/UninitializedMessageException.cs
  25. 1 1
      src/google/protobuf/compiler/csharp/csharp_enum.cc
  26. 62 67
      src/google/protobuf/compiler/csharp/csharp_enum_field.cc
  27. 0 2
      src/google/protobuf/compiler/csharp/csharp_enum_field.h
  28. 5 5
      src/google/protobuf/compiler/csharp/csharp_extension.cc
  29. 6 6
      src/google/protobuf/compiler/csharp/csharp_field.cc
  30. 0 2
      src/google/protobuf/compiler/csharp/csharp_field.h
  31. 89 39
      src/google/protobuf/compiler/csharp/csharp_file.cc
  32. 1 2
      src/google/protobuf/compiler/csharp/csharp_file.h
  33. 6 11
      src/google/protobuf/compiler/csharp/csharp_generator.cc
  34. 43 36
      src/google/protobuf/compiler/csharp/csharp_helpers.cc
  35. 29 25
      src/google/protobuf/compiler/csharp/csharp_helpers.h
  36. 114 121
      src/google/protobuf/compiler/csharp/csharp_message.cc
  37. 74 81
      src/google/protobuf/compiler/csharp/csharp_message_field.cc
  38. 0 2
      src/google/protobuf/compiler/csharp/csharp_message_field.h
  39. 55 87
      src/google/protobuf/compiler/csharp/csharp_primitive_field.cc
  40. 0 4
      src/google/protobuf/compiler/csharp/csharp_primitive_field.h
  41. 18 18
      src/google/protobuf/compiler/csharp/csharp_service.cc
  42. 33 5
      src/google/protobuf/descriptor.proto

+ 2 - 1
csharp/Makefile.am

@@ -43,7 +43,8 @@ Google.ProtocolBuffers.dll_sources = \
 
 
 Google.ProtocolBuffers.dll: $(Google.ProtocolBuffers.dll_sources)
 Google.ProtocolBuffers.dll: $(Google.ProtocolBuffers.dll_sources)
 	cp $(srcdir)/ProtocolBuffers/Properties/Google.ProtocolBuffers.snk .
 	cp $(srcdir)/ProtocolBuffers/Properties/Google.ProtocolBuffers.snk .
-	gmcs -codepage:utf8 -debug -target:library -out:Google.ProtocolBuffers.dll $(Google.ProtocolBuffers.dll_sources) 
+	gmcs -codepage:utf8 -debug -target:library -out:Google.ProtocolBuffers.dll \
+        $(Google.ProtocolBuffers.dll_sources) -keyfile Google.ProtocolBuffers.snk
 
 
 install-data-local: Google.ProtocolBuffers.dll
 install-data-local: Google.ProtocolBuffers.dll
 	gacutil -i Google.ProtocolBuffers.dll -package google
 	gacutil -i Google.ProtocolBuffers.dll -package google

+ 18 - 21
csharp/ProtocolBuffers/AbstractBuilder.cs

@@ -25,7 +25,6 @@ namespace Google.ProtocolBuffers {
     protected abstract IMessage BuildPartialImpl();
     protected abstract IMessage BuildPartialImpl();
     protected abstract IBuilder CloneImpl();
     protected abstract IBuilder CloneImpl();
     protected abstract IMessage DefaultInstanceForTypeImpl { get; }
     protected abstract IMessage DefaultInstanceForTypeImpl { get; }
-    protected abstract IBuilder CreateBuilderForFieldImpl(FieldDescriptor field);
     protected abstract IBuilder ClearFieldImpl(FieldDescriptor field);
     protected abstract IBuilder ClearFieldImpl(FieldDescriptor field);
     protected abstract IBuilder AddRepeatedFieldImpl(FieldDescriptor field, object value);
     protected abstract IBuilder AddRepeatedFieldImpl(FieldDescriptor field, object value);
     #endregion
     #endregion
@@ -47,9 +46,7 @@ namespace Google.ProtocolBuffers {
       get { return DefaultInstanceForTypeImpl; }
       get { return DefaultInstanceForTypeImpl; }
     }
     }
 
 
-    IBuilder IBuilder.CreateBuilderForField(FieldDescriptor field) {
-      return CreateBuilderForFieldImpl(field);
-    }
+    public abstract IBuilder CreateBuilderForField(FieldDescriptor field);
 
 
     IBuilder IBuilder.ClearField(FieldDescriptor field) {
     IBuilder IBuilder.ClearField(FieldDescriptor field) {
       return ClearFieldImpl(field);
       return ClearFieldImpl(field);
@@ -67,7 +64,7 @@ namespace Google.ProtocolBuffers {
       return this;
       return this;
     }
     }
 
 
-    public IBuilder MergeFrom(IMessage other) {
+    public virtual IBuilder MergeFrom(IMessage other) {
       if (other.DescriptorForType != DescriptorForType) {
       if (other.DescriptorForType != DescriptorForType) {
         throw new ArgumentException("MergeFrom(Message) can only merge messages of the same type.");
         throw new ArgumentException("MergeFrom(Message) can only merge messages of the same type.");
       }
       }
@@ -106,18 +103,18 @@ namespace Google.ProtocolBuffers {
       return this;
       return this;
     }
     }
 
 
-    public IBuilder MergeFrom(CodedInputStream input) {
-      return MergeFrom(input, ExtensionRegistry.Empty);
+    IBuilder IBuilder.MergeFrom(CodedInputStream input) {
+      return ((IBuilder)this).MergeFrom(input, ExtensionRegistry.Empty);
     }
     }
 
 
-    public IBuilder MergeFrom(CodedInputStream input, ExtensionRegistry extensionRegistry) {
+    IBuilder IBuilder.MergeFrom(CodedInputStream input, ExtensionRegistry extensionRegistry) {
       UnknownFieldSet.Builder unknownFields = UnknownFieldSet.CreateBuilder(UnknownFields);
       UnknownFieldSet.Builder unknownFields = UnknownFieldSet.CreateBuilder(UnknownFields);
       FieldSet.MergeFrom(input, unknownFields, extensionRegistry, this);
       FieldSet.MergeFrom(input, unknownFields, extensionRegistry, this);
       UnknownFields = unknownFields.Build();
       UnknownFields = unknownFields.Build();
       return this;
       return this;
     }
     }
 
 
-    public IBuilder MergeUnknownFields(UnknownFieldSet unknownFields) {
+    IBuilder IBuilder.MergeUnknownFields(UnknownFieldSet unknownFields) {
       UnknownFields = UnknownFieldSet.CreateBuilder(UnknownFields)
       UnknownFields = UnknownFieldSet.CreateBuilder(UnknownFields)
           .MergeFrom(unknownFields)
           .MergeFrom(unknownFields)
           .Build();
           .Build();
@@ -126,44 +123,44 @@ namespace Google.ProtocolBuffers {
 
 
     public UnknownFieldSet UnknownFields { get; set; }
     public UnknownFieldSet UnknownFields { get; set; }
 
 
-    public IBuilder MergeFrom(ByteString data) {
+    IBuilder IBuilder.MergeFrom(ByteString data) {
       CodedInputStream input = data.CreateCodedInput();
       CodedInputStream input = data.CreateCodedInput();
-      MergeFrom(input);
+      ((IBuilder)this).MergeFrom(input);
       input.CheckLastTagWas(0);
       input.CheckLastTagWas(0);
       return this;
       return this;
     }
     }
 
 
-    public IBuilder MergeFrom(ByteString data, ExtensionRegistry extensionRegistry) {
+    IBuilder IBuilder.MergeFrom(ByteString data, ExtensionRegistry extensionRegistry) {
       CodedInputStream input = data.CreateCodedInput();
       CodedInputStream input = data.CreateCodedInput();
-      MergeFrom(input, extensionRegistry);
+      ((IBuilder)this).MergeFrom(input, extensionRegistry);
       input.CheckLastTagWas(0);
       input.CheckLastTagWas(0);
       return this;
       return this;
     }
     }
 
 
-    public IBuilder MergeFrom(byte[] data) {
+    IBuilder IBuilder.MergeFrom(byte[] data) {
       CodedInputStream input = CodedInputStream.CreateInstance(data);
       CodedInputStream input = CodedInputStream.CreateInstance(data);
-      MergeFrom(input);
+      ((IBuilder)this).MergeFrom(input);
       input.CheckLastTagWas(0);
       input.CheckLastTagWas(0);
       return this;
       return this;
     }
     }
 
 
-    public IBuilder MergeFrom(byte[] data, ExtensionRegistry extensionRegistry) {
+    IBuilder IBuilder.MergeFrom(byte[] data, ExtensionRegistry extensionRegistry) {
       CodedInputStream input = CodedInputStream.CreateInstance(data);
       CodedInputStream input = CodedInputStream.CreateInstance(data);
-      MergeFrom(input, extensionRegistry);
+      ((IBuilder)this).MergeFrom(input, extensionRegistry);
       input.CheckLastTagWas(0);
       input.CheckLastTagWas(0);
       return this;
       return this;
     }
     }
 
 
-    public IBuilder MergeFrom(Stream input) {
+    IBuilder IBuilder.MergeFrom(Stream input) {
       CodedInputStream codedInput = CodedInputStream.CreateInstance(input);
       CodedInputStream codedInput = CodedInputStream.CreateInstance(input);
-      MergeFrom(codedInput);
+      ((IBuilder)this).MergeFrom(codedInput);
       codedInput.CheckLastTagWas(0);
       codedInput.CheckLastTagWas(0);
       return this;
       return this;
     }
     }
 
 
-    public IBuilder MergeFrom(Stream input, ExtensionRegistry extensionRegistry) {
+    IBuilder IBuilder.MergeFrom(Stream input, ExtensionRegistry extensionRegistry) {
       CodedInputStream codedInput = CodedInputStream.CreateInstance(input);
       CodedInputStream codedInput = CodedInputStream.CreateInstance(input);
-      MergeFrom(codedInput, extensionRegistry);
+      ((IBuilder) this).MergeFrom(codedInput, extensionRegistry);
       codedInput.CheckLastTagWas(0);
       codedInput.CheckLastTagWas(0);
       return this;
       return this;
     }
     }

+ 5 - 75
csharp/ProtocolBuffers/AbstractMessage.cs

@@ -13,11 +13,9 @@
 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 // See the License for the specific language governing permissions and
 // See the License for the specific language governing permissions and
 // limitations under the License.
 // limitations under the License.
-using System;
 using System.Collections;
 using System.Collections;
 using System.Collections.Generic;
 using System.Collections.Generic;
 using System.IO;
 using System.IO;
-using System.Text;
 using Google.ProtocolBuffers.Descriptors;
 using Google.ProtocolBuffers.Descriptors;
 
 
 namespace Google.ProtocolBuffers {
 namespace Google.ProtocolBuffers {
@@ -56,7 +54,7 @@ namespace Google.ProtocolBuffers {
     }
     }
     #endregion
     #endregion
 
 
-    public bool IsInitialized {
+    public virtual bool IsInitialized {
       get {
       get {
         // Check that all required fields are present.
         // Check that all required fields are present.
         foreach (FieldDescriptor field in DescriptorForType.Fields) {
         foreach (FieldDescriptor field in DescriptorForType.Fields) {
@@ -92,7 +90,7 @@ namespace Google.ProtocolBuffers {
       return TextFormat.PrintToString(this);
       return TextFormat.PrintToString(this);
     }
     }
 
 
-    public void WriteTo(CodedOutputStream output) {
+    public virtual void WriteTo(CodedOutputStream output) {
       foreach (KeyValuePair<FieldDescriptor, object> entry in AllFields) {
       foreach (KeyValuePair<FieldDescriptor, object> entry in AllFields) {
         FieldDescriptor field = entry.Key;
         FieldDescriptor field = entry.Key;
         if (field.IsRepeated) {
         if (field.IsRepeated) {
@@ -107,14 +105,14 @@ namespace Google.ProtocolBuffers {
       }
       }
 
 
       UnknownFieldSet unknownFields = UnknownFields;
       UnknownFieldSet unknownFields = UnknownFields;
-      if (DescriptorForType.Options.IsMessageSetWireFormat) {
+      if (DescriptorForType.Options.MessageSetWireFormat) {
         unknownFields.WriteAsMessageSetTo(output);
         unknownFields.WriteAsMessageSetTo(output);
       } else {
       } else {
         unknownFields.WriteTo(output);
         unknownFields.WriteTo(output);
       }
       }
     }
     }
 
 
-    public int SerializedSize {
+    public virtual int SerializedSize {
       get {
       get {
         int size = memoizedSize;
         int size = memoizedSize;
         if (size != -1) {
         if (size != -1) {
@@ -134,7 +132,7 @@ namespace Google.ProtocolBuffers {
         }
         }
 
 
         UnknownFieldSet unknownFields = UnknownFields;
         UnknownFieldSet unknownFields = UnknownFields;
-        if (DescriptorForType.Options.IsMessageSetWireFormat) {
+        if (DescriptorForType.Options.MessageSetWireFormat) {
           size += unknownFields.SerializedSizeAsMessageSet;
           size += unknownFields.SerializedSizeAsMessageSet;
         } else {
         } else {
           size += unknownFields.SerializedSize;
           size += unknownFields.SerializedSize;
@@ -184,73 +182,5 @@ namespace Google.ProtocolBuffers {
       hash = (53 * hash) + AllFields.GetHashCode();
       hash = (53 * hash) + AllFields.GetHashCode();
       return hash;
       return hash;
     }
     }
-
-    #region IMessage Members
-
-    MessageDescriptor IMessage.DescriptorForType {
-      get { throw new NotImplementedException(); }
-    }
-
-    IDictionary<FieldDescriptor, object> IMessage.AllFields {
-      get { throw new NotImplementedException(); }
-    }
-
-    bool IMessage.HasField(FieldDescriptor field) {
-      throw new NotImplementedException();
-    }
-
-    object IMessage.this[FieldDescriptor field] {
-      get { throw new NotImplementedException(); }
-    }
-
-    int IMessage.GetRepeatedFieldCount(FieldDescriptor field) {
-      throw new NotImplementedException();
-    }
-
-    object IMessage.this[FieldDescriptor field, int index] {
-      get { throw new NotImplementedException(); }
-    }
-
-    UnknownFieldSet IMessage.UnknownFields {
-      get { throw new NotImplementedException(); }
-    }
-
-    bool IMessage.IsInitialized {
-      get { throw new NotImplementedException(); }
-    }
-
-    void IMessage.WriteTo(CodedOutputStream output) {
-      throw new NotImplementedException();
-    }
-
-    int IMessage.SerializedSize {
-      get { throw new NotImplementedException(); }
-    }
-
-    bool IMessage.Equals(object other) {
-      throw new NotImplementedException();
-    }
-
-    int IMessage.GetHashCode() {
-      throw new NotImplementedException();
-    }
-
-    string IMessage.ToString() {
-      throw new NotImplementedException();
-    }
-
-    ByteString IMessage.ToByteString() {
-      throw new NotImplementedException();
-    }
-
-    byte[] IMessage.ToByteArray() {
-      throw new NotImplementedException();
-    }
-
-    void IMessage.WriteTo(Stream output) {
-      throw new NotImplementedException();
-    }
-
-    #endregion
   }
   }
 }
 }

+ 4 - 2
csharp/ProtocolBuffers/DescriptorProtos/Autogenerated.cs

@@ -5,6 +5,7 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
   /// <summary>
   /// <summary>
   /// This only exists until we've got the real code...
   /// This only exists until we've got the real code...
   /// </summary>
   /// </summary>
+  /*
   public abstract class TemporaryMessage<T> : IMessage<T> where T : IMessage<T> {
   public abstract class TemporaryMessage<T> : IMessage<T> where T : IMessage<T> {
     #region IMessage<T> Members
     #region IMessage<T> Members
 
 
@@ -84,7 +85,7 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
   }
   }
 
 
   public partial class MessageOptions : TemporaryMessage<MessageOptions> {
   public partial class MessageOptions : TemporaryMessage<MessageOptions> {
-    public bool IsMessageSetWireFormat;
+    public bool MessageSetWireFormat;
   }
   }
 
 
   public partial class DescriptorProto : TemporaryMessage<DescriptorProto> {
   public partial class DescriptorProto : TemporaryMessage<DescriptorProto> {
@@ -123,6 +124,7 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
     public string FullName { get; set; }
     public string FullName { get; set; }
     public FileOptions Options { get; set; }
     public FileOptions Options { get; set; }
 
 
+    public string Package { get; set; }
   }
   }
 
 
   public partial class FileOptions : TemporaryMessage<FileOptions> { }
   public partial class FileOptions : TemporaryMessage<FileOptions> { }
@@ -143,5 +145,5 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
 
 
   }
   }
 
 
-  public partial class ServiceOptions : TemporaryMessage<ServiceOptions> { }
+  public partial class ServiceOptions : TemporaryMessage<ServiceOptions> { } */
 }
 }

+ 5715 - 0
csharp/ProtocolBuffers/DescriptorProtos/Descriptor.cs

@@ -0,0 +1,5715 @@
+// Generated by the protocol buffer compiler.  DO NOT EDIT!
+
+using pb = global::Google.ProtocolBuffers;
+
+namespace Google.ProtocolBuffers.DescriptorProtos {
+
+  public sealed class Descriptor {
+    private Descriptor() {}
+    public static pb::Descriptors.FileDescriptor Descriptor {
+        get { return descriptor; }
+    }
+    private static readonly pb::Descriptors.FileDescriptor descriptor = pb::Descriptors.FileDescriptor.InternalBuildGeneratedFileFrom (
+        new byte[] {
+            0x0a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 
+            0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x67, 0x6f, 0x6f, 0x67, 
+            0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x22, 0xdc, 0x02, 0x0a, 0x13, 0x46, 0x69, 0x6c, 0x65, 
+            0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x0a, 0x04, 0x6e, 
+            0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x12, 0x0f, 0x0a, 0x07, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 
+            0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x12, 0x12, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 
+            0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x12, 0x36, 0x0a, 0x0c, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x79, 
+            0x70, 0x65, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 
+            0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 
+            0x74, 0x6f, 0x12, 0x37, 0x0a, 0x09, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x03, 0x28, 
+            0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 
+            0x45, 0x6e, 0x75, 0x6d, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 
+            0x38, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x67, 
+            0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 
+            0x63, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x38, 0x0a, 
+            0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 
+            0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 
+            0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2d, 0x0a, 0x07, 0x6f, 
+            0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 
+            0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 
+            0x6e, 0x73, 0x22, 0xa9, 0x03, 0x0a, 0x0f, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 
+            0x74, 0x6f, 0x12, 0x0c, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x12, 0x34, 0x0a, 0x05, 
+            0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 
+            0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 
+            0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x38, 0x0a, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 
+            0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 
+            0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 
+            0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x35, 0x0a, 0x0b, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x74, 
+            0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 
+            0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 
+            0x6f, 0x74, 0x6f, 0x12, 0x37, 0x0a, 0x09, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x03, 
+            0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 
+            0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 
+            0x12, 0x48, 0x0a, 0x0f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 
+            0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 
+            0x62, 0x75, 0x66, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 
+            0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x30, 0x0a, 0x07, 0x6f, 0x70, 
+            0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 
+            0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 
+            0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x2c, 0x0a, 0x0e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x6e, 
+            0x67, 0x65, 0x12, 0x0d, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x12, 0x0b, 0x0a, 
+            0x03, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x22, 0x94, 0x05, 0x0a, 0x14, 0x46, 0x69, 0x65, 0x6c, 0x64, 
+            0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x0a, 0x04, 0x6e, 
+            0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x12, 0x0e, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 
+            0x03, 0x20, 0x01, 0x28, 0x05, 0x12, 0x3a, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 
+            0x32, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 
+            0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 
+            0x4c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x38, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 
+            0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 
+            0x65, 0x6c, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 
+            0x79, 0x70, 0x65, 0x12, 0x11, 0x0a, 0x09, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 
+            0x28, 0x09, 0x12, 0x10, 0x0a, 0x08, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 
+            0x12, 0x15, 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x07, 0x20, 
+            0x01, 0x28, 0x09, 0x12, 0x2e, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 
+            0x32, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 
+            0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xb6, 0x02, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 
+            0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x44, 0x4f, 0x55, 0x42, 0x4c, 0x45, 0x10, 0x01, 0x12, 0x0e, 0x0a, 
+            0x0a, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x4c, 0x4f, 0x41, 0x54, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x59, 0x50, 
+            0x45, 0x5f, 0x49, 0x4e, 0x54, 0x36, 0x34, 0x10, 0x03, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x49, 
+            0x4e, 0x54, 0x36, 0x34, 0x10, 0x04, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x49, 0x4e, 0x54, 0x33, 0x32, 
+            0x10, 0x05, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x49, 0x58, 0x45, 0x44, 0x36, 0x34, 0x10, 0x06, 
+            0x12, 0x10, 0x0a, 0x0c, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x49, 0x58, 0x45, 0x44, 0x33, 0x32, 0x10, 0x07, 0x12, 0x0d, 
+            0x0a, 0x09, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x42, 0x4f, 0x4f, 0x4c, 0x10, 0x08, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 
+            0x45, 0x5f, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x09, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x47, 
+            0x52, 0x4f, 0x55, 0x50, 0x10, 0x0a, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 
+            0x47, 0x45, 0x10, 0x0b, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x42, 0x59, 0x54, 0x45, 0x53, 0x10, 0x0c, 
+            0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x49, 0x4e, 0x54, 0x33, 0x32, 0x10, 0x0d, 0x12, 0x0d, 0x0a, 
+            0x09, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x10, 0x0e, 0x12, 0x11, 0x0a, 0x0d, 0x54, 0x59, 0x50, 0x45, 
+            0x5f, 0x53, 0x46, 0x49, 0x58, 0x45, 0x44, 0x33, 0x32, 0x10, 0x0f, 0x12, 0x11, 0x0a, 0x0d, 0x54, 0x59, 0x50, 0x45, 0x5f, 
+            0x53, 0x46, 0x49, 0x58, 0x45, 0x44, 0x36, 0x34, 0x10, 0x10, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 
+            0x49, 0x4e, 0x54, 0x33, 0x32, 0x10, 0x11, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x49, 0x4e, 0x54, 
+            0x36, 0x34, 0x10, 0x12, 0x22, 0x43, 0x0a, 0x05, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x12, 0x0a, 0x0e, 0x4c, 0x41, 0x42, 
+            0x45, 0x4c, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x41, 0x4c, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x4c, 0x41, 0x42, 
+            0x45, 0x4c, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x49, 0x52, 0x45, 0x44, 0x10, 0x02, 0x12, 0x12, 0x0a, 0x0e, 0x4c, 0x41, 0x42, 
+            0x45, 0x4c, 0x5f, 0x52, 0x45, 0x50, 0x45, 0x41, 0x54, 0x45, 0x44, 0x10, 0x03, 0x22, 0x8c, 0x01, 0x0a, 0x13, 0x45, 0x6e, 
+            0x75, 0x6d, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x0a, 
+            0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x12, 0x38, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 
+            0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 
+            0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 
+            0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2d, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 
+            0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 
+            0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x6c, 0x0a, 0x18, 
+            0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 
+            0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x12, 0x0e, 
+            0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x12, 0x32, 0x0a, 0x07, 0x6f, 0x70, 
+            0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 
+            0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 
+            0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x90, 0x01, 0x0a, 0x16, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 
+            0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 
+            0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x12, 0x36, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x02, 0x20, 
+            0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 
+            0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 
+            0x6f, 0x74, 0x6f, 0x12, 0x30, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 
+            0x32, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 
+            0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x7f, 0x0a, 0x15, 0x4d, 0x65, 0x74, 
+            0x68, 0x6f, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 
+            0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x12, 0x12, 0x0a, 0x0a, 0x69, 0x6e, 0x70, 0x75, 
+            0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x12, 0x13, 0x0a, 0x0b, 0x6f, 0x75, 0x74, 0x70, 
+            0x75, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x12, 0x2f, 0x0a, 0x07, 0x6f, 0x70, 0x74, 
+            0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 
+            0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 
+            0x6e, 0x73, 0x22, 0x88, 0x03, 0x0a, 0x0b, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x14, 
+            0x0a, 0x0c, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 
+            0x12, 0x1c, 0x0a, 0x14, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 
+            0x6e, 0x61, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x12, 0x22, 0x0a, 0x13, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x6d, 
+            0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x3a, 
+            0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x12, 0x4a, 0x0a, 0x0c, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x65, 0x5f, 0x66, 
+            0x6f, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 
+            0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4f, 
+            0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x3a, 0x09, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x53, 0x49, 
+            0x5a, 0x45, 0x12, 0x19, 0x0a, 0x10, 0x63, 0x73, 0x68, 0x61, 0x72, 0x70, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 
+            0x63, 0x65, 0x18, 0xe8, 0x07, 0x20, 0x01, 0x28, 0x09, 0x12, 0x1e, 0x0a, 0x15, 0x63, 0x73, 0x68, 0x61, 0x72, 0x70, 0x5f, 
+            0x66, 0x69, 0x6c, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0xe9, 0x07, 0x20, 0x01, 0x28, 
+            0x09, 0x12, 0x25, 0x0a, 0x15, 0x63, 0x73, 0x68, 0x61, 0x72, 0x70, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 
+            0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0xea, 0x07, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 
+            0x12, 0x23, 0x0a, 0x13, 0x63, 0x73, 0x68, 0x61, 0x72, 0x70, 0x5f, 0x6e, 0x65, 0x73, 0x74, 0x5f, 0x63, 0x6c, 0x61, 0x73, 
+            0x73, 0x65, 0x73, 0x18, 0xeb, 0x07, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x12, 0x24, 0x0a, 
+            0x15, 0x63, 0x73, 0x68, 0x61, 0x72, 0x70, 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 
+            0x65, 0x73, 0x18, 0xec, 0x07, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x04, 0x74, 0x72, 0x75, 0x65, 0x22, 0x28, 0x0a, 0x0c, 0x4f, 
+            0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x53, 0x50, 0x45, 0x45, 0x44, 
+            0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x53, 0x49, 0x5a, 0x45, 0x10, 0x02, 0x22, 0x38, 0x0a, 
+            0x0e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x26, 0x0a, 0x17, 0x6d, 
+            0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x65, 0x74, 0x5f, 0x77, 0x69, 0x72, 0x65, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 
+            0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x22, 0x85, 0x01, 0x0a, 0x0c, 
+            0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x32, 0x0a, 0x05, 0x63, 0x74, 0x79, 0x70, 
+            0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 
+            0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x43, 
+            0x54, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x14, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x6c, 
+            0x5f, 0x6d, 0x61, 0x70, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x22, 0x23, 0x0a, 0x05, 0x43, 0x54, 
+            0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x43, 0x4f, 0x52, 0x44, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x54, 0x52, 
+            0x49, 0x4e, 0x47, 0x5f, 0x50, 0x49, 0x45, 0x43, 0x45, 0x10, 0x02, 0x22, 0x0d, 0x0a, 0x0b, 0x45, 0x6e, 0x75, 0x6d, 0x4f, 
+            0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x12, 0x0a, 0x10, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 
+            0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x10, 0x0a, 0x0e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, 
+            0x69, 0x6f, 0x6e, 0x73, 0x22, 0x0f, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 
+            0x73, 0x42, 0x59, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 
+            0x6f, 0x62, 0x75, 0x66, 0x42, 0x10, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 
+            0x6f, 0x73, 0x48, 0x01, 0xc2, 0x3e, 0x27, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 
+            0x6f, 0x6c, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x73, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 
+            0x50, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0xd0, 0x3e, 0x00, 0xd8, 0x3e, 0x00, 
+        }, new pb::Descriptors.FileDescriptor[] {
+        });
+    
+    public sealed class FileDescriptorProto : pb::GeneratedMessage {
+      // Use FileDescriptorProto.newBuilder() to construct.
+      private FileDescriptorProto() {}
+      
+      private static readonly FileDescriptorProto defaultInstance = new FileDescriptorProto();
+      public static FileDescriptorProto DefaultInstance {
+        get { return defaultInstance; }
+      }
+      
+      public FileDescriptorProto DefaultInstanceForType {
+        get { return defaultInstance; }
+      }
+      
+      public static pb::Descriptors.Descriptor Descriptor {
+        get { return Google.ProtocolBuffers.DescriptorProtos.Descriptor.internal_static_google_protobuf_FileDescriptorProto_descriptor; }
+      }
+      
+      protected pb::GeneratedMessage.FieldAccessorTable InternalGetFieldAccessorTable {
+        get { return Google.ProtocolBuffers.DescriptorProtos.Descriptor.internal_static_google_protobuf_FileDescriptorProto_fieldAccessorTable; }
+      }
+      
+      // optional string name = 1;
+      private bool hasName;
+      private string name_ = "";
+      public boolean HasName {
+        get { return hasName; }
+      }
+      public string Name {
+        get { return name_; }
+      }
+      
+      // optional string package = 2;
+      private bool hasPackage;
+      private string package_ = "";
+      public boolean HasPackage {
+        get { return hasPackage; }
+      }
+      public string Package {
+        get { return package_; }
+      }
+      
+      // repeated string dependency = 3;
+      private java.util.List<string> dependency_ =
+        java.util.Collections.emptyList();
+      public java.util.List<string> getDependencyList() {
+        return dependency_;
+      }
+      public int getDependencyCount() { return dependency_.size(); }
+      public string getDependency(int index) {
+        return dependency_.get(index);
+      }
+      
+      // repeated .google.protobuf.DescriptorProto message_type = 4;
+      internal System.Collections.Generic.IList<Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto> EmptyMessageType =
+        new System.Collections.ReadOnlyCollection<Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto> ();
+      internal System.Collections.Generic.IList<Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto> messageType_ = EmptyMessageType;
+      public System.Collections.Generic.IList<Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto> MessageTypeList {
+        get { return messageType_; } 
+      }
+      public int MessageTypeCount { get { return messageType_.Count; }  }
+      public Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto MessageType(int index) {
+        return messageType_ [index];
+      }
+      
+      // repeated .google.protobuf.EnumDescriptorProto enum_type = 5;
+      internal System.Collections.Generic.IList<Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto> EmptyEnumType =
+        new System.Collections.ReadOnlyCollection<Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto> ();
+      internal System.Collections.Generic.IList<Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto> enumType_ = EmptyEnumType;
+      public System.Collections.Generic.IList<Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto> EnumTypeList {
+        get { return enumType_; } 
+      }
+      public int EnumTypeCount { get { return enumType_.Count; }  }
+      public Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto EnumType(int index) {
+        return enumType_ [index];
+      }
+      
+      // repeated .google.protobuf.ServiceDescriptorProto service = 6;
+      internal System.Collections.Generic.IList<Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceDescriptorProto> EmptyService =
+        new System.Collections.ReadOnlyCollection<Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceDescriptorProto> ();
+      internal System.Collections.Generic.IList<Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceDescriptorProto> service_ = EmptyService;
+      public System.Collections.Generic.IList<Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceDescriptorProto> ServiceList {
+        get { return service_; } 
+      }
+      public int ServiceCount { get { return service_.Count; }  }
+      public Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceDescriptorProto Service(int index) {
+        return service_ [index];
+      }
+      
+      // repeated .google.protobuf.FieldDescriptorProto extension = 7;
+      internal System.Collections.Generic.IList<Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto> EmptyExtension =
+        new System.Collections.ReadOnlyCollection<Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto> ();
+      internal System.Collections.Generic.IList<Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto> extension_ = EmptyExtension;
+      public System.Collections.Generic.IList<Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto> ExtensionList {
+        get { return extension_; } 
+      }
+      public int ExtensionCount { get { return extension_.Count; }  }
+      public Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto Extension(int index) {
+        return extension_ [index];
+      }
+      
+      // optional .google.protobuf.FileOptions options = 8;
+      private boolean hasOptions;
+      private Google.ProtocolBuffers.DescriptorProtos.Descriptor.FileOptions options_ = Google.ProtocolBuffers.DescriptorProtos.Descriptor.FileOptions.getDefaultInstance();
+      public boolean hasOptions() { return hasOptions; }
+      public Google.ProtocolBuffers.DescriptorProtos.Descriptor.FileOptions getOptions() { return options_; }
+      
+      public final boolean isInitialized() {
+        return true;
+      }
+      
+      public void writeTo(pb::CodedOutputStream output) {
+        if (hasName()) {
+          output.writeString(1, getName());
+        }
+        if (hasPackage()) {
+          output.writeString(2, getPackage());
+        }
+        for (string element : getDependencyList()) {
+          output.writeString(3, element);
+        }
+        foreach (Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto element in GetMessageTypeList()) {
+          output.writeMessage(4, element);
+        }
+        foreach (Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto element in GetEnumTypeList()) {
+          output.writeMessage(5, element);
+        }
+        foreach (Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceDescriptorProto element in GetServiceList()) {
+          output.writeMessage(6, element);
+        }
+        foreach (Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto element in GetExtensionList()) {
+          output.writeMessage(7, element);
+        }
+        if (hasOptions()) {
+          output.writeMessage(8, getOptions());
+        }
+        UnknownFields.WriteTo(output);
+      }
+      
+      private int memoizedSerializedSize = -1;
+      public int SerializedSize {
+        get {
+          int size = memoizedSerializedSize;
+          if (size != -1) return size;
+          
+          size = 0;
+          if (hasName()) {
+            size += pb::CodedOutputStream
+              .computeStringSize(1, getName());
+          }
+          if (hasPackage()) {
+            size += pb::CodedOutputStream
+              .computeStringSize(2, getPackage());
+          }
+          for (string element : getDependencyList()) {
+            size += pb::CodedOutputStream
+              .computeStringSize(3, element);
+          }
+          foreach (Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto element in GetMessageTypeList()) {
+            size += pb::CodedOutputStream
+              .computeMessageSize(4, element);
+          }
+          foreach (Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto element in GetEnumTypeList()) {
+            size += pb::CodedOutputStream
+              .computeMessageSize(5, element);
+          }
+          foreach (Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceDescriptorProto element in GetServiceList()) {
+            size += pb::CodedOutputStream
+              .computeMessageSize(6, element);
+          }
+          foreach (Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto element in GetExtensionList()) {
+            size += pb::CodedOutputStream
+              .computeMessageSize(7, element);
+          }
+          if (hasOptions()) {
+            size += pb::CodedOutputStream
+              .computeMessageSize(8, getOptions());
+          }
+          size += UnknownFieldsSerializedSize;
+          memoizedSerializedSize = size;
+          return size;
+        }
+      }
+      
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.FileDescriptorProto parseFrom(pb::ByteString data) {
+        return newBuilder().mergeFrom(data).buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.FileDescriptorProto parseFrom(pb::ByteString data,
+          pb::ExtensionRegistry extensionRegistry) {
+        return newBuilder().mergeFrom(data, extensionRegistry)
+                 .buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.FileDescriptorProto parseFrom(byte[] data) {
+        return newBuilder().mergeFrom(data).buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.FileDescriptorProto parseFrom(byte[] data,
+          pb::ExtensionRegistry extensionRegistry) {
+        return newBuilder().mergeFrom(data, extensionRegistry)
+                 .buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.FileDescriptorProto parseFrom(global::System.IO.Stream input) {
+        return newBuilder().mergeFrom(input).buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.FileDescriptorProto parseFrom(
+          global::System.IO.Stream input,
+          pb::ExtensionRegistry extensionRegistry) {
+        return newBuilder().mergeFrom(input, extensionRegistry)
+                 .buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.FileDescriptorProto parseFrom(pb::CodedInputStream input) {
+        return newBuilder().mergeFrom(input).buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.FileDescriptorProto parseFrom(pb::CodedInputStream input,
+          pb::ExtensionRegistry extensionRegistry) {
+        return newBuilder().mergeFrom(input, extensionRegistry)
+                 .buildParsed();
+      }
+      
+      public static Builder newBuilder() { return new Builder(); }
+      public Builder newBuilderForType() { return new Builder(); }
+      public static Builder newBuilder(Google.ProtocolBuffers.DescriptorProtos.Descriptor.FileDescriptorProto prototype) {
+        return new Builder().mergeFrom(prototype);
+      }
+      
+      public sealed class Builder : pb::GeneratedMessage.Builder<Builder> {
+        // Construct using Google.ProtocolBuffers.DescriptorProtos.Descriptor.FileDescriptorProto.newBuilder()
+        private Builder() {}
+        
+        Google.ProtocolBuffers.DescriptorProtos.Descriptor.FileDescriptorProto result = new Google.ProtocolBuffers.DescriptorProtos.Descriptor.FileDescriptorProto();
+        
+        protected Google.ProtocolBuffers.DescriptorProtos.Descriptor.FileDescriptorProto internalGetResult() {
+          return result;
+        }
+        
+        public Builder clear() {
+          result = new Google.ProtocolBuffers.DescriptorProtos.Descriptor.FileDescriptorProto();
+          return this;
+        }
+        
+        public Builder clone() {
+          return new Builder().mergeFrom(result);
+        }
+        
+        public pb::Descriptors.Descriptor
+            getDescriptorForType() {
+          return Google.ProtocolBuffers.DescriptorProtos.Descriptor.FileDescriptorProto.getDescriptor();
+        }
+        
+        public Google.ProtocolBuffers.DescriptorProtos.Descriptor.FileDescriptorProto getDefaultInstanceForType() {
+          return Google.ProtocolBuffers.DescriptorProtos.Descriptor.FileDescriptorProto.getDefaultInstance();
+        }
+        
+        public Google.ProtocolBuffers.DescriptorProtos.Descriptor.FileDescriptorProto build() {
+          if (!isInitialized()) {
+            throw new pb::UninitializedMessageException(
+              result);
+          }
+          return buildPartial();
+        }
+        
+        private Google.ProtocolBuffers.DescriptorProtos.Descriptor.FileDescriptorProto buildParsed() {
+          if (!isInitialized()) {
+            throw new pb::UninitializedMessageException(
+              result).asInvalidProtocolBufferException();
+          }
+          return buildPartial();
+        }
+        
+        public Google.ProtocolBuffers.DescriptorProtos.Descriptor.FileDescriptorProto buildPartial() {
+          if (result.dependency_ != java.util.Collections.EMPTY_LIST) {
+            result.dependency_ =
+              java.util.Collections.unmodifiableList(result.dependency_);
+          }
+          if (result.messageType_ != Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.EmptyMessageType) {
+            result.messageType_ =
+              result.messageType_.AsReadOnly ();
+          }
+          if (result.enumType_ != Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto.EmptyEnumType) {
+            result.enumType_ =
+              result.enumType_.AsReadOnly ();
+          }
+          if (result.service_ != Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceDescriptorProto.EmptyService) {
+            result.service_ =
+              result.service_.AsReadOnly ();
+          }
+          if (result.extension_ != Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto.EmptyExtension) {
+            result.extension_ =
+              result.extension_.AsReadOnly ();
+          }
+          Google.ProtocolBuffers.DescriptorProtos.Descriptor.FileDescriptorProto returnMe = result;
+          result = null;
+          return returnMe;
+        }
+        
+        public Builder mergeFrom(pb::Message other) {
+          if (other instanceof Google.ProtocolBuffers.DescriptorProtos.Descriptor.FileDescriptorProto) {
+            return mergeFrom((Google.ProtocolBuffers.DescriptorProtos.Descriptor.FileDescriptorProto)other);
+          } else {
+            super.mergeFrom(other);
+            return this;
+          }
+        }
+        
+        public Builder mergeFrom(Google.ProtocolBuffers.DescriptorProtos.Descriptor.FileDescriptorProto other) {
+          if (other == Google.ProtocolBuffers.DescriptorProtos.Descriptor.FileDescriptorProto.getDefaultInstance()) return this;
+          if (other.hasName()) {
+            setName(other.getName());
+          }
+          if (other.hasPackage()) {
+            setPackage(other.getPackage());
+          }
+          if (!other.dependency_.isEmpty()) {
+            if (result.dependency_.isEmpty()) {
+              result.dependency_ = new java.util.ArrayList<string>();
+            }
+            result.dependency_.addAll(other.dependency_);
+          }
+          if (!other.messageType_ != Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.EmptyMessageType) {
+            if (result.messageType_ == Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.EmptyMessageType) {
+              result.messageType_ = new System.Collections.Generic.List<Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto>();
+            }
+            result.messageType_.AddCollection(other.messageType_);
+          }
+          if (!other.enumType_ != Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto.EmptyEnumType) {
+            if (result.enumType_ == Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto.EmptyEnumType) {
+              result.enumType_ = new System.Collections.Generic.List<Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto>();
+            }
+            result.enumType_.AddCollection(other.enumType_);
+          }
+          if (!other.service_ != Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceDescriptorProto.EmptyService) {
+            if (result.service_ == Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceDescriptorProto.EmptyService) {
+              result.service_ = new System.Collections.Generic.List<Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceDescriptorProto>();
+            }
+            result.service_.AddCollection(other.service_);
+          }
+          if (!other.extension_ != Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto.EmptyExtension) {
+            if (result.extension_ == Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto.EmptyExtension) {
+              result.extension_ = new System.Collections.Generic.List<Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto>();
+            }
+            result.extension_.AddCollection(other.extension_);
+          }
+          if (other.hasOptions()) {
+            mergeOptions(other.getOptions());
+          }
+          this.mergeUnknownFields(other.getUnknownFields());
+          return this;
+        }
+        
+        public Builder mergeFrom(
+            pb::CodedInputStream input) {
+          return mergeFrom(input,
+            pb::ExtensionRegistry.getEmptyRegistry());
+        }
+        
+        public Builder mergeFrom(
+            pb::CodedInputStream input,
+            pb::ExtensionRegistry extensionRegistry) {
+          pb::UnknownFieldSet.Builder unknownFields =
+            pb::UnknownFieldSet.newBuilder(
+              this.getUnknownFields());
+          while (true) {
+            int tag = input.readTag();
+            switch (tag) {
+              case 0:
+                this.setUnknownFields(unknownFields.build());
+                return this;
+              default: {
+                if (!parseUnknownField(input, unknownFields,
+                                       extensionRegistry, tag)) {
+                  this.setUnknownFields(unknownFields.build());
+                  return this;
+                }
+                break;
+              }
+              case 10: {
+                setName(input.readString());
+                break;
+              }
+              case 18: {
+                setPackage(input.readString());
+                break;
+              }
+              case 26: {
+                addDependency(input.readString());
+                break;
+              }
+              case 34: {
+                Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.Builder subBuilder = Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.newBuilder();
+                input.readMessage(subBuilder, extensionRegistry);
+                AddMessageType(subBuilder.buildPartial());
+                break;
+              }
+              case 42: {
+                Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto.Builder subBuilder = Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto.newBuilder();
+                input.readMessage(subBuilder, extensionRegistry);
+                AddEnumType(subBuilder.buildPartial());
+                break;
+              }
+              case 50: {
+                Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceDescriptorProto.Builder subBuilder = Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceDescriptorProto.newBuilder();
+                input.readMessage(subBuilder, extensionRegistry);
+                AddService(subBuilder.buildPartial());
+                break;
+              }
+              case 58: {
+                Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto.Builder subBuilder = Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto.newBuilder();
+                input.readMessage(subBuilder, extensionRegistry);
+                AddExtension(subBuilder.buildPartial());
+                break;
+              }
+              case 66: {
+                Google.ProtocolBuffers.DescriptorProtos.Descriptor.FileOptions.Builder subBuilder = Google.ProtocolBuffers.DescriptorProtos.Descriptor.FileOptions.newBuilder();
+                if (hasOptions()) {
+                  subBuilder.mergeFrom(getOptions());
+                }
+                input.readMessage(subBuilder, extensionRegistry);
+                setOptions(subBuilder.buildPartial());
+                break;
+              }
+            }
+          }
+        }
+        
+        
+        // optional string name = 1;
+        public boolean HasName {
+          get { return result.HasName; }
+        }
+        public string Name {
+          get { return result.Name; }
+          set {
+            result.hasName = true;
+            result.name_ = value;
+          }
+        }
+        public Builder ClearName() {
+          result.hasName = false;
+          result.name_ = "";
+          return this;
+        }
+        
+        // optional string package = 2;
+        public boolean HasPackage {
+          get { return result.HasPackage; }
+        }
+        public string Package {
+          get { return result.Package; }
+          set {
+            result.hasPackage = true;
+            result.package_ = value;
+          }
+        }
+        public Builder ClearPackage() {
+          result.hasPackage = false;
+          result.package_ = "";
+          return this;
+        }
+        
+        // repeated string dependency = 3;
+        public java.util.List<string> getDependencyList() {
+          return java.util.Collections.unmodifiableList(result.dependency_);
+        }
+        public int getDependencyCount() {
+          return result.getDependencyCount();
+        }
+        public string getDependency(int index) {
+          return result.getDependency(index);
+        }
+        public Builder setDependency(int index, string value) {
+          result.dependency_.set(index, value);
+          return this;
+        }
+        public Builder addDependency(string value) {
+          if (result.dependency_.isEmpty()) {
+            result.dependency_ = new java.util.ArrayList<string>();
+          }
+          result.dependency_.add(value);
+          return this;
+        }
+        public Builder addAllDependency(
+            java.lang.Iterable<? extends string> values) {
+          if (result.dependency_.isEmpty()) {
+            result.dependency_ = new java.util.ArrayList<string>();
+          }
+          super.addAll(values, result.dependency_);
+          return this;
+        }
+        public Builder clearDependency() {
+          result.dependency_ = java.util.Collections.emptyList();
+          return this;
+        }
+        
+        // repeated .google.protobuf.DescriptorProto message_type = 4;
+        public System.Collections.Generic.IList<Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto> GetMessageTypeList() {
+          if (result.messageType_ == Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.EmptyMessageType)
+            return result.messageType;
+          return result.messageType_.AsReadOnly ();
+        }
+        public int GetMessageTypeCount() {
+          return result.GetMessageTypeCount();
+        }
+        public Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto GetMessageType(int index) {
+          return result.GetMessageType(index);
+        }
+        public Builder SetMessageType(int index, Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto value) {
+          result.messageType_ [index] = value;
+          return this;
+        }
+        public Builder SetMessageType(int index, Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.Builder builderForValue) {
+          result.messageType_ [index] = builderForValue.build();
+          return this;
+        }
+        public Builder AddMessageType(Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto value) {
+          if (result.messageType == Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.EmptyMessageType)
+            result.messageType = new System.Collections.Generic.List<Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto>();
+          result.messageType_.Add(value);
+          return this;
+        }
+        public Builder AddMessageType(Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.Builder builderForValue) {
+          if (result.messageType == Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.EmptyMessageType)
+            result.messageType = new System.Collections.Generic.List<Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto>();
+          result.messageType_.Add(builderForValue.build());
+          return this;
+        }
+        public Builder AddAllMessageType<T>(
+            global::System.Collections.Generic.IEnumerable<T> values) where T : Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto {
+          if (result.messageType == Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.EmptyMessageType)
+            result.messageType = new System.Collections.Generic.List<Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto>();
+          result.messageType_.AddEnumerable (values);
+          return this;
+        }
+        public Builder ClearMessageType() {
+          result.messageType_ = Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.EmptyMessageType;
+          return this;
+        }
+        
+        // repeated .google.protobuf.EnumDescriptorProto enum_type = 5;
+        public System.Collections.Generic.IList<Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto> GetEnumTypeList() {
+          if (result.enumType_ == Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto.EmptyEnumType)
+            return result.enumType;
+          return result.enumType_.AsReadOnly ();
+        }
+        public int GetEnumTypeCount() {
+          return result.GetEnumTypeCount();
+        }
+        public Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto GetEnumType(int index) {
+          return result.GetEnumType(index);
+        }
+        public Builder SetEnumType(int index, Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto value) {
+          result.enumType_ [index] = value;
+          return this;
+        }
+        public Builder SetEnumType(int index, Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto.Builder builderForValue) {
+          result.enumType_ [index] = builderForValue.build();
+          return this;
+        }
+        public Builder AddEnumType(Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto value) {
+          if (result.enumType == Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto.EmptyEnumType)
+            result.enumType = new System.Collections.Generic.List<Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto>();
+          result.enumType_.Add(value);
+          return this;
+        }
+        public Builder AddEnumType(Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto.Builder builderForValue) {
+          if (result.enumType == Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto.EmptyEnumType)
+            result.enumType = new System.Collections.Generic.List<Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto>();
+          result.enumType_.Add(builderForValue.build());
+          return this;
+        }
+        public Builder AddAllEnumType<T>(
+            global::System.Collections.Generic.IEnumerable<T> values) where T : Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto {
+          if (result.enumType == Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto.EmptyEnumType)
+            result.enumType = new System.Collections.Generic.List<Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto>();
+          result.enumType_.AddEnumerable (values);
+          return this;
+        }
+        public Builder ClearEnumType() {
+          result.enumType_ = Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto.EmptyEnumType;
+          return this;
+        }
+        
+        // repeated .google.protobuf.ServiceDescriptorProto service = 6;
+        public System.Collections.Generic.IList<Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceDescriptorProto> GetServiceList() {
+          if (result.service_ == Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceDescriptorProto.EmptyService)
+            return result.service;
+          return result.service_.AsReadOnly ();
+        }
+        public int GetServiceCount() {
+          return result.GetServiceCount();
+        }
+        public Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceDescriptorProto GetService(int index) {
+          return result.GetService(index);
+        }
+        public Builder SetService(int index, Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceDescriptorProto value) {
+          result.service_ [index] = value;
+          return this;
+        }
+        public Builder SetService(int index, Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceDescriptorProto.Builder builderForValue) {
+          result.service_ [index] = builderForValue.build();
+          return this;
+        }
+        public Builder AddService(Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceDescriptorProto value) {
+          if (result.service == Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceDescriptorProto.EmptyService)
+            result.service = new System.Collections.Generic.List<Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceDescriptorProto>();
+          result.service_.Add(value);
+          return this;
+        }
+        public Builder AddService(Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceDescriptorProto.Builder builderForValue) {
+          if (result.service == Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceDescriptorProto.EmptyService)
+            result.service = new System.Collections.Generic.List<Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceDescriptorProto>();
+          result.service_.Add(builderForValue.build());
+          return this;
+        }
+        public Builder AddAllService<T>(
+            global::System.Collections.Generic.IEnumerable<T> values) where T : Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceDescriptorProto {
+          if (result.service == Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceDescriptorProto.EmptyService)
+            result.service = new System.Collections.Generic.List<Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceDescriptorProto>();
+          result.service_.AddEnumerable (values);
+          return this;
+        }
+        public Builder ClearService() {
+          result.service_ = Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceDescriptorProto.EmptyService;
+          return this;
+        }
+        
+        // repeated .google.protobuf.FieldDescriptorProto extension = 7;
+        public System.Collections.Generic.IList<Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto> GetExtensionList() {
+          if (result.extension_ == Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto.EmptyExtension)
+            return result.extension;
+          return result.extension_.AsReadOnly ();
+        }
+        public int GetExtensionCount() {
+          return result.GetExtensionCount();
+        }
+        public Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto GetExtension(int index) {
+          return result.GetExtension(index);
+        }
+        public Builder SetExtension(int index, Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto value) {
+          result.extension_ [index] = value;
+          return this;
+        }
+        public Builder SetExtension(int index, Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto.Builder builderForValue) {
+          result.extension_ [index] = builderForValue.build();
+          return this;
+        }
+        public Builder AddExtension(Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto value) {
+          if (result.extension == Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto.EmptyExtension)
+            result.extension = new System.Collections.Generic.List<Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto>();
+          result.extension_.Add(value);
+          return this;
+        }
+        public Builder AddExtension(Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto.Builder builderForValue) {
+          if (result.extension == Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto.EmptyExtension)
+            result.extension = new System.Collections.Generic.List<Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto>();
+          result.extension_.Add(builderForValue.build());
+          return this;
+        }
+        public Builder AddAllExtension<T>(
+            global::System.Collections.Generic.IEnumerable<T> values) where T : Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto {
+          if (result.extension == Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto.EmptyExtension)
+            result.extension = new System.Collections.Generic.List<Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto>();
+          result.extension_.AddEnumerable (values);
+          return this;
+        }
+        public Builder ClearExtension() {
+          result.extension_ = Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto.EmptyExtension;
+          return this;
+        }
+        
+        // optional .google.protobuf.FileOptions options = 8;
+        public boolean hasOptions() {
+          return result.hasOptions();
+        }
+        public Google.ProtocolBuffers.DescriptorProtos.Descriptor.FileOptions getOptions() {
+          return result.getOptions();
+        }
+        public Builder setOptions(Google.ProtocolBuffers.DescriptorProtos.Descriptor.FileOptions value) {
+          result.hasOptions = true;
+          result.options_ = value;
+          return this;
+        }
+        public Builder setOptions(Google.ProtocolBuffers.DescriptorProtos.Descriptor.FileOptions.Builder builderForValue) {
+          result.hasOptions = true;
+          result.options_ = builderForValue.build();
+          return this;
+        }
+        public Builder mergeOptions(Google.ProtocolBuffers.DescriptorProtos.Descriptor.FileOptions value) {
+          if (result.hasOptions() &&
+              result.options_ != Google.ProtocolBuffers.DescriptorProtos.Descriptor.FileOptions.getDefaultInstance()) {
+            result.options_ =
+              Google.ProtocolBuffers.DescriptorProtos.Descriptor.FileOptions.newBuilder(result.options_).mergeFrom(value).buildPartial();
+          } else {
+            result.options_ = value;
+          }
+          result.hasOptions = true;
+          return this;
+        }
+        public Builder clearOptions() {
+          result.hasOptions = false;
+          result.options_ = Google.ProtocolBuffers.DescriptorProtos.Descriptor.FileOptions.getDefaultInstance();
+          return this;
+        }
+      }
+    }
+    
+    public sealed class DescriptorProto : pb::GeneratedMessage {
+      // Use DescriptorProto.newBuilder() to construct.
+      private DescriptorProto() {}
+      
+      private static readonly DescriptorProto defaultInstance = new DescriptorProto();
+      public static DescriptorProto DefaultInstance {
+        get { return defaultInstance; }
+      }
+      
+      public DescriptorProto DefaultInstanceForType {
+        get { return defaultInstance; }
+      }
+      
+      public static pb::Descriptors.Descriptor Descriptor {
+        get { return Google.ProtocolBuffers.DescriptorProtos.Descriptor.internal_static_google_protobuf_DescriptorProto_descriptor; }
+      }
+      
+      protected pb::GeneratedMessage.FieldAccessorTable InternalGetFieldAccessorTable {
+        get { return Google.ProtocolBuffers.DescriptorProtos.Descriptor.internal_static_google_protobuf_DescriptorProto_fieldAccessorTable; }
+      }
+      
+      public sealed class ExtensionRange : pb::GeneratedMessage {
+        // Use ExtensionRange.newBuilder() to construct.
+        private ExtensionRange() {}
+        
+        private static readonly ExtensionRange defaultInstance = new ExtensionRange();
+        public static ExtensionRange DefaultInstance {
+          get { return defaultInstance; }
+        }
+        
+        public ExtensionRange DefaultInstanceForType {
+          get { return defaultInstance; }
+        }
+        
+        public static pb::Descriptors.Descriptor Descriptor {
+          get { return Google.ProtocolBuffers.DescriptorProtos.Descriptor.internal_static_google_protobuf_DescriptorProto_ExtensionRange_descriptor; }
+        }
+        
+        protected pb::GeneratedMessage.FieldAccessorTable InternalGetFieldAccessorTable {
+          get { return Google.ProtocolBuffers.DescriptorProtos.Descriptor.internal_static_google_protobuf_DescriptorProto_ExtensionRange_fieldAccessorTable; }
+        }
+        
+        // optional int32 start = 1;
+        private bool hasStart;
+        private int start_ = 0;
+        public boolean HasStart {
+          get { return hasStart; }
+        }
+        public int Start {
+          get { return start_; }
+        }
+        
+        // optional int32 end = 2;
+        private bool hasEnd;
+        private int end_ = 0;
+        public boolean HasEnd {
+          get { return hasEnd; }
+        }
+        public int End {
+          get { return end_; }
+        }
+        
+        public final boolean isInitialized() {
+          return true;
+        }
+        
+        public void writeTo(pb::CodedOutputStream output) {
+          if (hasStart()) {
+            output.writeInt32(1, getStart());
+          }
+          if (hasEnd()) {
+            output.writeInt32(2, getEnd());
+          }
+          UnknownFields.WriteTo(output);
+        }
+        
+        private int memoizedSerializedSize = -1;
+        public int SerializedSize {
+          get {
+            int size = memoizedSerializedSize;
+            if (size != -1) return size;
+            
+            size = 0;
+            if (hasStart()) {
+              size += pb::CodedOutputStream
+                .computeInt32Size(1, getStart());
+            }
+            if (hasEnd()) {
+              size += pb::CodedOutputStream
+                .computeInt32Size(2, getEnd());
+            }
+            size += UnknownFieldsSerializedSize;
+            memoizedSerializedSize = size;
+            return size;
+          }
+        }
+        
+        public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.ExtensionRange parseFrom(pb::ByteString data) {
+          return newBuilder().mergeFrom(data).buildParsed();
+        }
+        public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.ExtensionRange parseFrom(pb::ByteString data,
+            pb::ExtensionRegistry extensionRegistry) {
+          return newBuilder().mergeFrom(data, extensionRegistry)
+                   .buildParsed();
+        }
+        public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.ExtensionRange parseFrom(byte[] data) {
+          return newBuilder().mergeFrom(data).buildParsed();
+        }
+        public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.ExtensionRange parseFrom(byte[] data,
+            pb::ExtensionRegistry extensionRegistry) {
+          return newBuilder().mergeFrom(data, extensionRegistry)
+                   .buildParsed();
+        }
+        public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.ExtensionRange parseFrom(global::System.IO.Stream input) {
+          return newBuilder().mergeFrom(input).buildParsed();
+        }
+        public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.ExtensionRange parseFrom(
+            global::System.IO.Stream input,
+            pb::ExtensionRegistry extensionRegistry) {
+          return newBuilder().mergeFrom(input, extensionRegistry)
+                   .buildParsed();
+        }
+        public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.ExtensionRange parseFrom(pb::CodedInputStream input) {
+          return newBuilder().mergeFrom(input).buildParsed();
+        }
+        public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.ExtensionRange parseFrom(pb::CodedInputStream input,
+            pb::ExtensionRegistry extensionRegistry) {
+          return newBuilder().mergeFrom(input, extensionRegistry)
+                   .buildParsed();
+        }
+        
+        public static Builder newBuilder() { return new Builder(); }
+        public Builder newBuilderForType() { return new Builder(); }
+        public static Builder newBuilder(Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.ExtensionRange prototype) {
+          return new Builder().mergeFrom(prototype);
+        }
+        
+        public sealed class Builder : pb::GeneratedMessage.Builder<Builder> {
+          // Construct using Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.ExtensionRange.newBuilder()
+          private Builder() {}
+          
+          Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.ExtensionRange result = new Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.ExtensionRange();
+          
+          protected Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.ExtensionRange internalGetResult() {
+            return result;
+          }
+          
+          public Builder clear() {
+            result = new Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.ExtensionRange();
+            return this;
+          }
+          
+          public Builder clone() {
+            return new Builder().mergeFrom(result);
+          }
+          
+          public pb::Descriptors.Descriptor
+              getDescriptorForType() {
+            return Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.ExtensionRange.getDescriptor();
+          }
+          
+          public Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.ExtensionRange getDefaultInstanceForType() {
+            return Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.ExtensionRange.getDefaultInstance();
+          }
+          
+          public Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.ExtensionRange build() {
+            if (!isInitialized()) {
+              throw new pb::UninitializedMessageException(
+                result);
+            }
+            return buildPartial();
+          }
+          
+          private Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.ExtensionRange buildParsed() {
+            if (!isInitialized()) {
+              throw new pb::UninitializedMessageException(
+                result).asInvalidProtocolBufferException();
+            }
+            return buildPartial();
+          }
+          
+          public Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.ExtensionRange buildPartial() {
+            Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.ExtensionRange returnMe = result;
+            result = null;
+            return returnMe;
+          }
+          
+          public Builder mergeFrom(pb::Message other) {
+            if (other instanceof Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.ExtensionRange) {
+              return mergeFrom((Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.ExtensionRange)other);
+            } else {
+              super.mergeFrom(other);
+              return this;
+            }
+          }
+          
+          public Builder mergeFrom(Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.ExtensionRange other) {
+            if (other == Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.ExtensionRange.getDefaultInstance()) return this;
+            if (other.hasStart()) {
+              setStart(other.getStart());
+            }
+            if (other.hasEnd()) {
+              setEnd(other.getEnd());
+            }
+            this.mergeUnknownFields(other.getUnknownFields());
+            return this;
+          }
+          
+          public Builder mergeFrom(
+              pb::CodedInputStream input) {
+            return mergeFrom(input,
+              pb::ExtensionRegistry.getEmptyRegistry());
+          }
+          
+          public Builder mergeFrom(
+              pb::CodedInputStream input,
+              pb::ExtensionRegistry extensionRegistry) {
+            pb::UnknownFieldSet.Builder unknownFields =
+              pb::UnknownFieldSet.newBuilder(
+                this.getUnknownFields());
+            while (true) {
+              int tag = input.readTag();
+              switch (tag) {
+                case 0:
+                  this.setUnknownFields(unknownFields.build());
+                  return this;
+                default: {
+                  if (!parseUnknownField(input, unknownFields,
+                                         extensionRegistry, tag)) {
+                    this.setUnknownFields(unknownFields.build());
+                    return this;
+                  }
+                  break;
+                }
+                case 8: {
+                  setStart(input.readInt32());
+                  break;
+                }
+                case 16: {
+                  setEnd(input.readInt32());
+                  break;
+                }
+              }
+            }
+          }
+          
+          
+          // optional int32 start = 1;
+          public boolean HasStart {
+            get { return result.HasStart; }
+          }
+          public int Start {
+            get { return result.Start; }
+            set {
+              result.hasStart = true;
+              result.start_ = value;
+            }
+          }
+          public Builder ClearStart() {
+            result.hasStart = false;
+            result.start_ = 0;
+            return this;
+          }
+          
+          // optional int32 end = 2;
+          public boolean HasEnd {
+            get { return result.HasEnd; }
+          }
+          public int End {
+            get { return result.End; }
+            set {
+              result.hasEnd = true;
+              result.end_ = value;
+            }
+          }
+          public Builder ClearEnd() {
+            result.hasEnd = false;
+            result.end_ = 0;
+            return this;
+          }
+        }
+      }
+      
+      // optional string name = 1;
+      private bool hasName;
+      private string name_ = "";
+      public boolean HasName {
+        get { return hasName; }
+      }
+      public string Name {
+        get { return name_; }
+      }
+      
+      // repeated .google.protobuf.FieldDescriptorProto field = 2;
+      internal System.Collections.Generic.IList<Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto> EmptyField =
+        new System.Collections.ReadOnlyCollection<Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto> ();
+      internal System.Collections.Generic.IList<Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto> field_ = EmptyField;
+      public System.Collections.Generic.IList<Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto> FieldList {
+        get { return field_; } 
+      }
+      public int FieldCount { get { return field_.Count; }  }
+      public Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto Field(int index) {
+        return field_ [index];
+      }
+      
+      // repeated .google.protobuf.FieldDescriptorProto extension = 6;
+      internal System.Collections.Generic.IList<Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto> EmptyExtension =
+        new System.Collections.ReadOnlyCollection<Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto> ();
+      internal System.Collections.Generic.IList<Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto> extension_ = EmptyExtension;
+      public System.Collections.Generic.IList<Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto> ExtensionList {
+        get { return extension_; } 
+      }
+      public int ExtensionCount { get { return extension_.Count; }  }
+      public Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto Extension(int index) {
+        return extension_ [index];
+      }
+      
+      // repeated .google.protobuf.DescriptorProto nested_type = 3;
+      internal System.Collections.Generic.IList<Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto> EmptyNestedType =
+        new System.Collections.ReadOnlyCollection<Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto> ();
+      internal System.Collections.Generic.IList<Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto> nestedType_ = EmptyNestedType;
+      public System.Collections.Generic.IList<Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto> NestedTypeList {
+        get { return nestedType_; } 
+      }
+      public int NestedTypeCount { get { return nestedType_.Count; }  }
+      public Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto NestedType(int index) {
+        return nestedType_ [index];
+      }
+      
+      // repeated .google.protobuf.EnumDescriptorProto enum_type = 4;
+      internal System.Collections.Generic.IList<Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto> EmptyEnumType =
+        new System.Collections.ReadOnlyCollection<Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto> ();
+      internal System.Collections.Generic.IList<Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto> enumType_ = EmptyEnumType;
+      public System.Collections.Generic.IList<Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto> EnumTypeList {
+        get { return enumType_; } 
+      }
+      public int EnumTypeCount { get { return enumType_.Count; }  }
+      public Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto EnumType(int index) {
+        return enumType_ [index];
+      }
+      
+      // repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5;
+      internal System.Collections.Generic.IList<Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.ExtensionRange> EmptyExtensionRange =
+        new System.Collections.ReadOnlyCollection<Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.ExtensionRange> ();
+      internal System.Collections.Generic.IList<Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.ExtensionRange> extensionRange_ = EmptyExtensionRange;
+      public System.Collections.Generic.IList<Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.ExtensionRange> ExtensionRangeList {
+        get { return extensionRange_; } 
+      }
+      public int ExtensionRangeCount { get { return extensionRange_.Count; }  }
+      public Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.ExtensionRange ExtensionRange(int index) {
+        return extensionRange_ [index];
+      }
+      
+      // optional .google.protobuf.MessageOptions options = 7;
+      private boolean hasOptions;
+      private Google.ProtocolBuffers.DescriptorProtos.Descriptor.MessageOptions options_ = Google.ProtocolBuffers.DescriptorProtos.Descriptor.MessageOptions.getDefaultInstance();
+      public boolean hasOptions() { return hasOptions; }
+      public Google.ProtocolBuffers.DescriptorProtos.Descriptor.MessageOptions getOptions() { return options_; }
+      
+      public final boolean isInitialized() {
+        return true;
+      }
+      
+      public void writeTo(pb::CodedOutputStream output) {
+        if (hasName()) {
+          output.writeString(1, getName());
+        }
+        foreach (Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto element in GetFieldList()) {
+          output.writeMessage(2, element);
+        }
+        foreach (Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto element in GetNestedTypeList()) {
+          output.writeMessage(3, element);
+        }
+        foreach (Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto element in GetEnumTypeList()) {
+          output.writeMessage(4, element);
+        }
+        foreach (Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.ExtensionRange element in GetExtensionRangeList()) {
+          output.writeMessage(5, element);
+        }
+        foreach (Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto element in GetExtensionList()) {
+          output.writeMessage(6, element);
+        }
+        if (hasOptions()) {
+          output.writeMessage(7, getOptions());
+        }
+        UnknownFields.WriteTo(output);
+      }
+      
+      private int memoizedSerializedSize = -1;
+      public int SerializedSize {
+        get {
+          int size = memoizedSerializedSize;
+          if (size != -1) return size;
+          
+          size = 0;
+          if (hasName()) {
+            size += pb::CodedOutputStream
+              .computeStringSize(1, getName());
+          }
+          foreach (Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto element in GetFieldList()) {
+            size += pb::CodedOutputStream
+              .computeMessageSize(2, element);
+          }
+          foreach (Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto element in GetNestedTypeList()) {
+            size += pb::CodedOutputStream
+              .computeMessageSize(3, element);
+          }
+          foreach (Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto element in GetEnumTypeList()) {
+            size += pb::CodedOutputStream
+              .computeMessageSize(4, element);
+          }
+          foreach (Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.ExtensionRange element in GetExtensionRangeList()) {
+            size += pb::CodedOutputStream
+              .computeMessageSize(5, element);
+          }
+          foreach (Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto element in GetExtensionList()) {
+            size += pb::CodedOutputStream
+              .computeMessageSize(6, element);
+          }
+          if (hasOptions()) {
+            size += pb::CodedOutputStream
+              .computeMessageSize(7, getOptions());
+          }
+          size += UnknownFieldsSerializedSize;
+          memoizedSerializedSize = size;
+          return size;
+        }
+      }
+      
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto parseFrom(pb::ByteString data) {
+        return newBuilder().mergeFrom(data).buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto parseFrom(pb::ByteString data,
+          pb::ExtensionRegistry extensionRegistry) {
+        return newBuilder().mergeFrom(data, extensionRegistry)
+                 .buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto parseFrom(byte[] data) {
+        return newBuilder().mergeFrom(data).buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto parseFrom(byte[] data,
+          pb::ExtensionRegistry extensionRegistry) {
+        return newBuilder().mergeFrom(data, extensionRegistry)
+                 .buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto parseFrom(global::System.IO.Stream input) {
+        return newBuilder().mergeFrom(input).buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto parseFrom(
+          global::System.IO.Stream input,
+          pb::ExtensionRegistry extensionRegistry) {
+        return newBuilder().mergeFrom(input, extensionRegistry)
+                 .buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto parseFrom(pb::CodedInputStream input) {
+        return newBuilder().mergeFrom(input).buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto parseFrom(pb::CodedInputStream input,
+          pb::ExtensionRegistry extensionRegistry) {
+        return newBuilder().mergeFrom(input, extensionRegistry)
+                 .buildParsed();
+      }
+      
+      public static Builder newBuilder() { return new Builder(); }
+      public Builder newBuilderForType() { return new Builder(); }
+      public static Builder newBuilder(Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto prototype) {
+        return new Builder().mergeFrom(prototype);
+      }
+      
+      public sealed class Builder : pb::GeneratedMessage.Builder<Builder> {
+        // Construct using Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.newBuilder()
+        private Builder() {}
+        
+        Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto result = new Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto();
+        
+        protected Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto internalGetResult() {
+          return result;
+        }
+        
+        public Builder clear() {
+          result = new Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto();
+          return this;
+        }
+        
+        public Builder clone() {
+          return new Builder().mergeFrom(result);
+        }
+        
+        public pb::Descriptors.Descriptor
+            getDescriptorForType() {
+          return Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.getDescriptor();
+        }
+        
+        public Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto getDefaultInstanceForType() {
+          return Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.getDefaultInstance();
+        }
+        
+        public Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto build() {
+          if (!isInitialized()) {
+            throw new pb::UninitializedMessageException(
+              result);
+          }
+          return buildPartial();
+        }
+        
+        private Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto buildParsed() {
+          if (!isInitialized()) {
+            throw new pb::UninitializedMessageException(
+              result).asInvalidProtocolBufferException();
+          }
+          return buildPartial();
+        }
+        
+        public Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto buildPartial() {
+          if (result.field_ != Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto.EmptyField) {
+            result.field_ =
+              result.field_.AsReadOnly ();
+          }
+          if (result.extension_ != Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto.EmptyExtension) {
+            result.extension_ =
+              result.extension_.AsReadOnly ();
+          }
+          if (result.nestedType_ != Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.EmptyNestedType) {
+            result.nestedType_ =
+              result.nestedType_.AsReadOnly ();
+          }
+          if (result.enumType_ != Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto.EmptyEnumType) {
+            result.enumType_ =
+              result.enumType_.AsReadOnly ();
+          }
+          if (result.extensionRange_ != Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.ExtensionRange.EmptyExtensionRange) {
+            result.extensionRange_ =
+              result.extensionRange_.AsReadOnly ();
+          }
+          Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto returnMe = result;
+          result = null;
+          return returnMe;
+        }
+        
+        public Builder mergeFrom(pb::Message other) {
+          if (other instanceof Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto) {
+            return mergeFrom((Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto)other);
+          } else {
+            super.mergeFrom(other);
+            return this;
+          }
+        }
+        
+        public Builder mergeFrom(Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto other) {
+          if (other == Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.getDefaultInstance()) return this;
+          if (other.hasName()) {
+            setName(other.getName());
+          }
+          if (!other.field_ != Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto.EmptyField) {
+            if (result.field_ == Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto.EmptyField) {
+              result.field_ = new System.Collections.Generic.List<Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto>();
+            }
+            result.field_.AddCollection(other.field_);
+          }
+          if (!other.extension_ != Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto.EmptyExtension) {
+            if (result.extension_ == Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto.EmptyExtension) {
+              result.extension_ = new System.Collections.Generic.List<Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto>();
+            }
+            result.extension_.AddCollection(other.extension_);
+          }
+          if (!other.nestedType_ != Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.EmptyNestedType) {
+            if (result.nestedType_ == Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.EmptyNestedType) {
+              result.nestedType_ = new System.Collections.Generic.List<Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto>();
+            }
+            result.nestedType_.AddCollection(other.nestedType_);
+          }
+          if (!other.enumType_ != Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto.EmptyEnumType) {
+            if (result.enumType_ == Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto.EmptyEnumType) {
+              result.enumType_ = new System.Collections.Generic.List<Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto>();
+            }
+            result.enumType_.AddCollection(other.enumType_);
+          }
+          if (!other.extensionRange_ != Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.ExtensionRange.EmptyExtensionRange) {
+            if (result.extensionRange_ == Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.ExtensionRange.EmptyExtensionRange) {
+              result.extensionRange_ = new System.Collections.Generic.List<Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.ExtensionRange>();
+            }
+            result.extensionRange_.AddCollection(other.extensionRange_);
+          }
+          if (other.hasOptions()) {
+            mergeOptions(other.getOptions());
+          }
+          this.mergeUnknownFields(other.getUnknownFields());
+          return this;
+        }
+        
+        public Builder mergeFrom(
+            pb::CodedInputStream input) {
+          return mergeFrom(input,
+            pb::ExtensionRegistry.getEmptyRegistry());
+        }
+        
+        public Builder mergeFrom(
+            pb::CodedInputStream input,
+            pb::ExtensionRegistry extensionRegistry) {
+          pb::UnknownFieldSet.Builder unknownFields =
+            pb::UnknownFieldSet.newBuilder(
+              this.getUnknownFields());
+          while (true) {
+            int tag = input.readTag();
+            switch (tag) {
+              case 0:
+                this.setUnknownFields(unknownFields.build());
+                return this;
+              default: {
+                if (!parseUnknownField(input, unknownFields,
+                                       extensionRegistry, tag)) {
+                  this.setUnknownFields(unknownFields.build());
+                  return this;
+                }
+                break;
+              }
+              case 10: {
+                setName(input.readString());
+                break;
+              }
+              case 18: {
+                Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto.Builder subBuilder = Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto.newBuilder();
+                input.readMessage(subBuilder, extensionRegistry);
+                AddField(subBuilder.buildPartial());
+                break;
+              }
+              case 26: {
+                Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.Builder subBuilder = Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.newBuilder();
+                input.readMessage(subBuilder, extensionRegistry);
+                AddNestedType(subBuilder.buildPartial());
+                break;
+              }
+              case 34: {
+                Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto.Builder subBuilder = Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto.newBuilder();
+                input.readMessage(subBuilder, extensionRegistry);
+                AddEnumType(subBuilder.buildPartial());
+                break;
+              }
+              case 42: {
+                Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.ExtensionRange.Builder subBuilder = Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.ExtensionRange.newBuilder();
+                input.readMessage(subBuilder, extensionRegistry);
+                AddExtensionRange(subBuilder.buildPartial());
+                break;
+              }
+              case 50: {
+                Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto.Builder subBuilder = Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto.newBuilder();
+                input.readMessage(subBuilder, extensionRegistry);
+                AddExtension(subBuilder.buildPartial());
+                break;
+              }
+              case 58: {
+                Google.ProtocolBuffers.DescriptorProtos.Descriptor.MessageOptions.Builder subBuilder = Google.ProtocolBuffers.DescriptorProtos.Descriptor.MessageOptions.newBuilder();
+                if (hasOptions()) {
+                  subBuilder.mergeFrom(getOptions());
+                }
+                input.readMessage(subBuilder, extensionRegistry);
+                setOptions(subBuilder.buildPartial());
+                break;
+              }
+            }
+          }
+        }
+        
+        
+        // optional string name = 1;
+        public boolean HasName {
+          get { return result.HasName; }
+        }
+        public string Name {
+          get { return result.Name; }
+          set {
+            result.hasName = true;
+            result.name_ = value;
+          }
+        }
+        public Builder ClearName() {
+          result.hasName = false;
+          result.name_ = "";
+          return this;
+        }
+        
+        // repeated .google.protobuf.FieldDescriptorProto field = 2;
+        public System.Collections.Generic.IList<Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto> GetFieldList() {
+          if (result.field_ == Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto.EmptyField)
+            return result.field;
+          return result.field_.AsReadOnly ();
+        }
+        public int GetFieldCount() {
+          return result.GetFieldCount();
+        }
+        public Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto GetField(int index) {
+          return result.GetField(index);
+        }
+        public Builder SetField(int index, Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto value) {
+          result.field_ [index] = value;
+          return this;
+        }
+        public Builder SetField(int index, Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto.Builder builderForValue) {
+          result.field_ [index] = builderForValue.build();
+          return this;
+        }
+        public Builder AddField(Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto value) {
+          if (result.field == Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto.EmptyField)
+            result.field = new System.Collections.Generic.List<Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto>();
+          result.field_.Add(value);
+          return this;
+        }
+        public Builder AddField(Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto.Builder builderForValue) {
+          if (result.field == Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto.EmptyField)
+            result.field = new System.Collections.Generic.List<Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto>();
+          result.field_.Add(builderForValue.build());
+          return this;
+        }
+        public Builder AddAllField<T>(
+            global::System.Collections.Generic.IEnumerable<T> values) where T : Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto {
+          if (result.field == Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto.EmptyField)
+            result.field = new System.Collections.Generic.List<Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto>();
+          result.field_.AddEnumerable (values);
+          return this;
+        }
+        public Builder ClearField() {
+          result.field_ = Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto.EmptyField;
+          return this;
+        }
+        
+        // repeated .google.protobuf.FieldDescriptorProto extension = 6;
+        public System.Collections.Generic.IList<Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto> GetExtensionList() {
+          if (result.extension_ == Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto.EmptyExtension)
+            return result.extension;
+          return result.extension_.AsReadOnly ();
+        }
+        public int GetExtensionCount() {
+          return result.GetExtensionCount();
+        }
+        public Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto GetExtension(int index) {
+          return result.GetExtension(index);
+        }
+        public Builder SetExtension(int index, Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto value) {
+          result.extension_ [index] = value;
+          return this;
+        }
+        public Builder SetExtension(int index, Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto.Builder builderForValue) {
+          result.extension_ [index] = builderForValue.build();
+          return this;
+        }
+        public Builder AddExtension(Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto value) {
+          if (result.extension == Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto.EmptyExtension)
+            result.extension = new System.Collections.Generic.List<Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto>();
+          result.extension_.Add(value);
+          return this;
+        }
+        public Builder AddExtension(Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto.Builder builderForValue) {
+          if (result.extension == Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto.EmptyExtension)
+            result.extension = new System.Collections.Generic.List<Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto>();
+          result.extension_.Add(builderForValue.build());
+          return this;
+        }
+        public Builder AddAllExtension<T>(
+            global::System.Collections.Generic.IEnumerable<T> values) where T : Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto {
+          if (result.extension == Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto.EmptyExtension)
+            result.extension = new System.Collections.Generic.List<Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto>();
+          result.extension_.AddEnumerable (values);
+          return this;
+        }
+        public Builder ClearExtension() {
+          result.extension_ = Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto.EmptyExtension;
+          return this;
+        }
+        
+        // repeated .google.protobuf.DescriptorProto nested_type = 3;
+        public System.Collections.Generic.IList<Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto> GetNestedTypeList() {
+          if (result.nestedType_ == Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.EmptyNestedType)
+            return result.nestedType;
+          return result.nestedType_.AsReadOnly ();
+        }
+        public int GetNestedTypeCount() {
+          return result.GetNestedTypeCount();
+        }
+        public Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto GetNestedType(int index) {
+          return result.GetNestedType(index);
+        }
+        public Builder SetNestedType(int index, Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto value) {
+          result.nestedType_ [index] = value;
+          return this;
+        }
+        public Builder SetNestedType(int index, Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.Builder builderForValue) {
+          result.nestedType_ [index] = builderForValue.build();
+          return this;
+        }
+        public Builder AddNestedType(Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto value) {
+          if (result.nestedType == Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.EmptyNestedType)
+            result.nestedType = new System.Collections.Generic.List<Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto>();
+          result.nestedType_.Add(value);
+          return this;
+        }
+        public Builder AddNestedType(Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.Builder builderForValue) {
+          if (result.nestedType == Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.EmptyNestedType)
+            result.nestedType = new System.Collections.Generic.List<Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto>();
+          result.nestedType_.Add(builderForValue.build());
+          return this;
+        }
+        public Builder AddAllNestedType<T>(
+            global::System.Collections.Generic.IEnumerable<T> values) where T : Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto {
+          if (result.nestedType == Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.EmptyNestedType)
+            result.nestedType = new System.Collections.Generic.List<Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto>();
+          result.nestedType_.AddEnumerable (values);
+          return this;
+        }
+        public Builder ClearNestedType() {
+          result.nestedType_ = Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.EmptyNestedType;
+          return this;
+        }
+        
+        // repeated .google.protobuf.EnumDescriptorProto enum_type = 4;
+        public System.Collections.Generic.IList<Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto> GetEnumTypeList() {
+          if (result.enumType_ == Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto.EmptyEnumType)
+            return result.enumType;
+          return result.enumType_.AsReadOnly ();
+        }
+        public int GetEnumTypeCount() {
+          return result.GetEnumTypeCount();
+        }
+        public Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto GetEnumType(int index) {
+          return result.GetEnumType(index);
+        }
+        public Builder SetEnumType(int index, Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto value) {
+          result.enumType_ [index] = value;
+          return this;
+        }
+        public Builder SetEnumType(int index, Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto.Builder builderForValue) {
+          result.enumType_ [index] = builderForValue.build();
+          return this;
+        }
+        public Builder AddEnumType(Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto value) {
+          if (result.enumType == Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto.EmptyEnumType)
+            result.enumType = new System.Collections.Generic.List<Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto>();
+          result.enumType_.Add(value);
+          return this;
+        }
+        public Builder AddEnumType(Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto.Builder builderForValue) {
+          if (result.enumType == Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto.EmptyEnumType)
+            result.enumType = new System.Collections.Generic.List<Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto>();
+          result.enumType_.Add(builderForValue.build());
+          return this;
+        }
+        public Builder AddAllEnumType<T>(
+            global::System.Collections.Generic.IEnumerable<T> values) where T : Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto {
+          if (result.enumType == Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto.EmptyEnumType)
+            result.enumType = new System.Collections.Generic.List<Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto>();
+          result.enumType_.AddEnumerable (values);
+          return this;
+        }
+        public Builder ClearEnumType() {
+          result.enumType_ = Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto.EmptyEnumType;
+          return this;
+        }
+        
+        // repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5;
+        public System.Collections.Generic.IList<Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.ExtensionRange> GetExtensionRangeList() {
+          if (result.extensionRange_ == Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.ExtensionRange.EmptyExtensionRange)
+            return result.extensionRange;
+          return result.extensionRange_.AsReadOnly ();
+        }
+        public int GetExtensionRangeCount() {
+          return result.GetExtensionRangeCount();
+        }
+        public Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.ExtensionRange GetExtensionRange(int index) {
+          return result.GetExtensionRange(index);
+        }
+        public Builder SetExtensionRange(int index, Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.ExtensionRange value) {
+          result.extensionRange_ [index] = value;
+          return this;
+        }
+        public Builder SetExtensionRange(int index, Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.ExtensionRange.Builder builderForValue) {
+          result.extensionRange_ [index] = builderForValue.build();
+          return this;
+        }
+        public Builder AddExtensionRange(Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.ExtensionRange value) {
+          if (result.extensionRange == Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.ExtensionRange.EmptyExtensionRange)
+            result.extensionRange = new System.Collections.Generic.List<Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.ExtensionRange>();
+          result.extensionRange_.Add(value);
+          return this;
+        }
+        public Builder AddExtensionRange(Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.ExtensionRange.Builder builderForValue) {
+          if (result.extensionRange == Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.ExtensionRange.EmptyExtensionRange)
+            result.extensionRange = new System.Collections.Generic.List<Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.ExtensionRange>();
+          result.extensionRange_.Add(builderForValue.build());
+          return this;
+        }
+        public Builder AddAllExtensionRange<T>(
+            global::System.Collections.Generic.IEnumerable<T> values) where T : Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.ExtensionRange {
+          if (result.extensionRange == Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.ExtensionRange.EmptyExtensionRange)
+            result.extensionRange = new System.Collections.Generic.List<Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.ExtensionRange>();
+          result.extensionRange_.AddEnumerable (values);
+          return this;
+        }
+        public Builder ClearExtensionRange() {
+          result.extensionRange_ = Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.ExtensionRange.EmptyExtensionRange;
+          return this;
+        }
+        
+        // optional .google.protobuf.MessageOptions options = 7;
+        public boolean hasOptions() {
+          return result.hasOptions();
+        }
+        public Google.ProtocolBuffers.DescriptorProtos.Descriptor.MessageOptions getOptions() {
+          return result.getOptions();
+        }
+        public Builder setOptions(Google.ProtocolBuffers.DescriptorProtos.Descriptor.MessageOptions value) {
+          result.hasOptions = true;
+          result.options_ = value;
+          return this;
+        }
+        public Builder setOptions(Google.ProtocolBuffers.DescriptorProtos.Descriptor.MessageOptions.Builder builderForValue) {
+          result.hasOptions = true;
+          result.options_ = builderForValue.build();
+          return this;
+        }
+        public Builder mergeOptions(Google.ProtocolBuffers.DescriptorProtos.Descriptor.MessageOptions value) {
+          if (result.hasOptions() &&
+              result.options_ != Google.ProtocolBuffers.DescriptorProtos.Descriptor.MessageOptions.getDefaultInstance()) {
+            result.options_ =
+              Google.ProtocolBuffers.DescriptorProtos.Descriptor.MessageOptions.newBuilder(result.options_).mergeFrom(value).buildPartial();
+          } else {
+            result.options_ = value;
+          }
+          result.hasOptions = true;
+          return this;
+        }
+        public Builder clearOptions() {
+          result.hasOptions = false;
+          result.options_ = Google.ProtocolBuffers.DescriptorProtos.Descriptor.MessageOptions.getDefaultInstance();
+          return this;
+        }
+      }
+    }
+    
+    public sealed class FieldDescriptorProto : pb::GeneratedMessage {
+      // Use FieldDescriptorProto.newBuilder() to construct.
+      private FieldDescriptorProto() {}
+      
+      private static readonly FieldDescriptorProto defaultInstance = new FieldDescriptorProto();
+      public static FieldDescriptorProto DefaultInstance {
+        get { return defaultInstance; }
+      }
+      
+      public FieldDescriptorProto DefaultInstanceForType {
+        get { return defaultInstance; }
+      }
+      
+      public static pb::Descriptors.Descriptor Descriptor {
+        get { return Google.ProtocolBuffers.DescriptorProtos.Descriptor.internal_static_google_protobuf_FieldDescriptorProto_descriptor; }
+      }
+      
+      protected pb::GeneratedMessage.FieldAccessorTable InternalGetFieldAccessorTable {
+        get { return Google.ProtocolBuffers.DescriptorProtos.Descriptor.internal_static_google_protobuf_FieldDescriptorProto_fieldAccessorTable; }
+      }
+      
+      public enum Type {
+        [pb::DescriptorIndex(0)]
+        TYPE_DOUBLE = 1,
+        [pb::DescriptorIndex(1)]
+        TYPE_FLOAT = 2,
+        [pb::DescriptorIndex(2)]
+        TYPE_INT64 = 3,
+        [pb::DescriptorIndex(3)]
+        TYPE_UINT64 = 4,
+        [pb::DescriptorIndex(4)]
+        TYPE_INT32 = 5,
+        [pb::DescriptorIndex(5)]
+        TYPE_FIXED64 = 6,
+        [pb::DescriptorIndex(6)]
+        TYPE_FIXED32 = 7,
+        [pb::DescriptorIndex(7)]
+        TYPE_BOOL = 8,
+        [pb::DescriptorIndex(8)]
+        TYPE_STRING = 9,
+        [pb::DescriptorIndex(9)]
+        TYPE_GROUP = 10,
+        [pb::DescriptorIndex(10)]
+        TYPE_MESSAGE = 11,
+        [pb::DescriptorIndex(11)]
+        TYPE_BYTES = 12,
+        [pb::DescriptorIndex(12)]
+        TYPE_UINT32 = 13,
+        [pb::DescriptorIndex(13)]
+        TYPE_ENUM = 14,
+        [pb::DescriptorIndex(14)]
+        TYPE_SFIXED32 = 15,
+        [pb::DescriptorIndex(15)]
+        TYPE_SFIXED64 = 16,
+        [pb::DescriptorIndex(16)]
+        TYPE_SINT32 = 17,
+        [pb::DescriptorIndex(17)]
+        TYPE_SINT64 = 18,
+      }
+      
+      public enum Label {
+        [pb::DescriptorIndex(0)]
+        LABEL_OPTIONAL = 1,
+        [pb::DescriptorIndex(1)]
+        LABEL_REQUIRED = 2,
+        [pb::DescriptorIndex(2)]
+        LABEL_REPEATED = 3,
+      }
+      
+      // optional string name = 1;
+      private bool hasName;
+      private string name_ = "";
+      public boolean HasName {
+        get { return hasName; }
+      }
+      public string Name {
+        get { return name_; }
+      }
+      
+      // optional int32 number = 3;
+      private bool hasNumber;
+      private int number_ = 0;
+      public boolean HasNumber {
+        get { return hasNumber; }
+      }
+      public int Number {
+        get { return number_; }
+      }
+      
+      // optional .google.protobuf.FieldDescriptorProto.Label label = 4;
+      private boolean hasLabel;
+      private Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto.Label label_ = Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto.Label.LABEL_OPTIONAL;
+      public boolean HasLabel() { return hasLabel; }
+      public Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto.Label GetLabel() { return label_; }
+      
+      // optional .google.protobuf.FieldDescriptorProto.Type type = 5;
+      private boolean hasType;
+      private Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto.Type type_ = Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto.Type.TYPE_DOUBLE;
+      public boolean HasType() { return hasType; }
+      public Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto.Type GetType() { return type_; }
+      
+      // optional string type_name = 6;
+      private bool hasTypeName;
+      private string typeName_ = "";
+      public boolean HasTypeName {
+        get { return hasTypeName; }
+      }
+      public string TypeName {
+        get { return typeName_; }
+      }
+      
+      // optional string extendee = 2;
+      private bool hasExtendee;
+      private string extendee_ = "";
+      public boolean HasExtendee {
+        get { return hasExtendee; }
+      }
+      public string Extendee {
+        get { return extendee_; }
+      }
+      
+      // optional string default_value = 7;
+      private bool hasDefaultValue;
+      private string defaultValue_ = "";
+      public boolean HasDefaultValue {
+        get { return hasDefaultValue; }
+      }
+      public string DefaultValue {
+        get { return defaultValue_; }
+      }
+      
+      // optional .google.protobuf.FieldOptions options = 8;
+      private boolean hasOptions;
+      private Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldOptions options_ = Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldOptions.getDefaultInstance();
+      public boolean hasOptions() { return hasOptions; }
+      public Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldOptions getOptions() { return options_; }
+      
+      public final boolean isInitialized() {
+        return true;
+      }
+      
+      public void writeTo(pb::CodedOutputStream output) {
+        if (hasName()) {
+          output.writeString(1, getName());
+        }
+        if (hasExtendee()) {
+          output.writeString(2, getExtendee());
+        }
+        if (hasNumber()) {
+          output.writeInt32(3, getNumber());
+        }
+        if (hasLabel()) {
+          output.writeEnum(4, getLabel().getNumber());
+        }
+        if (hasType()) {
+          output.writeEnum(5, getType().getNumber());
+        }
+        if (hasTypeName()) {
+          output.writeString(6, getTypeName());
+        }
+        if (hasDefaultValue()) {
+          output.writeString(7, getDefaultValue());
+        }
+        if (hasOptions()) {
+          output.writeMessage(8, getOptions());
+        }
+        UnknownFields.WriteTo(output);
+      }
+      
+      private int memoizedSerializedSize = -1;
+      public int SerializedSize {
+        get {
+          int size = memoizedSerializedSize;
+          if (size != -1) return size;
+          
+          size = 0;
+          if (hasName()) {
+            size += pb::CodedOutputStream
+              .computeStringSize(1, getName());
+          }
+          if (hasExtendee()) {
+            size += pb::CodedOutputStream
+              .computeStringSize(2, getExtendee());
+          }
+          if (hasNumber()) {
+            size += pb::CodedOutputStream
+              .computeInt32Size(3, getNumber());
+          }
+          if (hasLabel()) {
+            size += pb::CodedOutputStream
+              .computeEnumSize(4, getLabel().getNumber());
+          }
+          if (hasType()) {
+            size += pb::CodedOutputStream
+              .computeEnumSize(5, getType().getNumber());
+          }
+          if (hasTypeName()) {
+            size += pb::CodedOutputStream
+              .computeStringSize(6, getTypeName());
+          }
+          if (hasDefaultValue()) {
+            size += pb::CodedOutputStream
+              .computeStringSize(7, getDefaultValue());
+          }
+          if (hasOptions()) {
+            size += pb::CodedOutputStream
+              .computeMessageSize(8, getOptions());
+          }
+          size += UnknownFieldsSerializedSize;
+          memoizedSerializedSize = size;
+          return size;
+        }
+      }
+      
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto parseFrom(pb::ByteString data) {
+        return newBuilder().mergeFrom(data).buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto parseFrom(pb::ByteString data,
+          pb::ExtensionRegistry extensionRegistry) {
+        return newBuilder().mergeFrom(data, extensionRegistry)
+                 .buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto parseFrom(byte[] data) {
+        return newBuilder().mergeFrom(data).buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto parseFrom(byte[] data,
+          pb::ExtensionRegistry extensionRegistry) {
+        return newBuilder().mergeFrom(data, extensionRegistry)
+                 .buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto parseFrom(global::System.IO.Stream input) {
+        return newBuilder().mergeFrom(input).buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto parseFrom(
+          global::System.IO.Stream input,
+          pb::ExtensionRegistry extensionRegistry) {
+        return newBuilder().mergeFrom(input, extensionRegistry)
+                 .buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto parseFrom(pb::CodedInputStream input) {
+        return newBuilder().mergeFrom(input).buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto parseFrom(pb::CodedInputStream input,
+          pb::ExtensionRegistry extensionRegistry) {
+        return newBuilder().mergeFrom(input, extensionRegistry)
+                 .buildParsed();
+      }
+      
+      public static Builder newBuilder() { return new Builder(); }
+      public Builder newBuilderForType() { return new Builder(); }
+      public static Builder newBuilder(Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto prototype) {
+        return new Builder().mergeFrom(prototype);
+      }
+      
+      public sealed class Builder : pb::GeneratedMessage.Builder<Builder> {
+        // Construct using Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto.newBuilder()
+        private Builder() {}
+        
+        Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto result = new Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto();
+        
+        protected Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto internalGetResult() {
+          return result;
+        }
+        
+        public Builder clear() {
+          result = new Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto();
+          return this;
+        }
+        
+        public Builder clone() {
+          return new Builder().mergeFrom(result);
+        }
+        
+        public pb::Descriptors.Descriptor
+            getDescriptorForType() {
+          return Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto.getDescriptor();
+        }
+        
+        public Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto getDefaultInstanceForType() {
+          return Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto.getDefaultInstance();
+        }
+        
+        public Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto build() {
+          if (!isInitialized()) {
+            throw new pb::UninitializedMessageException(
+              result);
+          }
+          return buildPartial();
+        }
+        
+        private Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto buildParsed() {
+          if (!isInitialized()) {
+            throw new pb::UninitializedMessageException(
+              result).asInvalidProtocolBufferException();
+          }
+          return buildPartial();
+        }
+        
+        public Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto buildPartial() {
+          Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto returnMe = result;
+          result = null;
+          return returnMe;
+        }
+        
+        public Builder mergeFrom(pb::Message other) {
+          if (other instanceof Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto) {
+            return mergeFrom((Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto)other);
+          } else {
+            super.mergeFrom(other);
+            return this;
+          }
+        }
+        
+        public Builder mergeFrom(Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto other) {
+          if (other == Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto.getDefaultInstance()) return this;
+          if (other.hasName()) {
+            setName(other.getName());
+          }
+          if (other.hasNumber()) {
+            setNumber(other.getNumber());
+          }
+          if (other.hasLabel()) {
+            setLabel(other.getLabel());
+          }
+          if (other.hasType()) {
+            setType(other.getType());
+          }
+          if (other.hasTypeName()) {
+            setTypeName(other.getTypeName());
+          }
+          if (other.hasExtendee()) {
+            setExtendee(other.getExtendee());
+          }
+          if (other.hasDefaultValue()) {
+            setDefaultValue(other.getDefaultValue());
+          }
+          if (other.hasOptions()) {
+            mergeOptions(other.getOptions());
+          }
+          this.mergeUnknownFields(other.getUnknownFields());
+          return this;
+        }
+        
+        public Builder mergeFrom(
+            pb::CodedInputStream input) {
+          return mergeFrom(input,
+            pb::ExtensionRegistry.getEmptyRegistry());
+        }
+        
+        public Builder mergeFrom(
+            pb::CodedInputStream input,
+            pb::ExtensionRegistry extensionRegistry) {
+          pb::UnknownFieldSet.Builder unknownFields =
+            pb::UnknownFieldSet.newBuilder(
+              this.getUnknownFields());
+          while (true) {
+            int tag = input.readTag();
+            switch (tag) {
+              case 0:
+                this.setUnknownFields(unknownFields.build());
+                return this;
+              default: {
+                if (!parseUnknownField(input, unknownFields,
+                                       extensionRegistry, tag)) {
+                  this.setUnknownFields(unknownFields.build());
+                  return this;
+                }
+                break;
+              }
+              case 10: {
+                setName(input.readString());
+                break;
+              }
+              case 18: {
+                setExtendee(input.readString());
+                break;
+              }
+              case 24: {
+                setNumber(input.readInt32());
+                break;
+              }
+              case 32: {
+                int rawValue = input.readEnum();
+                Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto.Label value = Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto.Label.valueOf(rawValue);
+                if (value == null) {
+                  unknownFields.mergeVarintField(4, rawValue);
+                } else {
+                  setLabel(value);
+                }
+                break;
+              }
+              case 40: {
+                int rawValue = input.readEnum();
+                Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto.Type value = Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto.Type.valueOf(rawValue);
+                if (value == null) {
+                  unknownFields.mergeVarintField(5, rawValue);
+                } else {
+                  setType(value);
+                }
+                break;
+              }
+              case 50: {
+                setTypeName(input.readString());
+                break;
+              }
+              case 58: {
+                setDefaultValue(input.readString());
+                break;
+              }
+              case 66: {
+                Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldOptions.Builder subBuilder = Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldOptions.newBuilder();
+                if (hasOptions()) {
+                  subBuilder.mergeFrom(getOptions());
+                }
+                input.readMessage(subBuilder, extensionRegistry);
+                setOptions(subBuilder.buildPartial());
+                break;
+              }
+            }
+          }
+        }
+        
+        
+        // optional string name = 1;
+        public boolean HasName {
+          get { return result.HasName; }
+        }
+        public string Name {
+          get { return result.Name; }
+          set {
+            result.hasName = true;
+            result.name_ = value;
+          }
+        }
+        public Builder ClearName() {
+          result.hasName = false;
+          result.name_ = "";
+          return this;
+        }
+        
+        // optional int32 number = 3;
+        public boolean HasNumber {
+          get { return result.HasNumber; }
+        }
+        public int Number {
+          get { return result.Number; }
+          set {
+            result.hasNumber = true;
+            result.number_ = value;
+          }
+        }
+        public Builder ClearNumber() {
+          result.hasNumber = false;
+          result.number_ = 0;
+          return this;
+        }
+        
+        // optional .google.protobuf.FieldDescriptorProto.Label label = 4;
+        public boolean HasLabel() {
+          return result.HasLabel();
+        }
+        public Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto.Label GetLabel() {
+          return result.GetLabel();
+        }
+        public Builder SetLabel(Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto.Label value) {
+          result.hasLabel = true;
+          result.label_ = value;
+          return this;
+        }
+        public Builder ClearLabel() {
+          result.hasLabel = false;
+          result.label_ = Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto.Label.LABEL_OPTIONAL;
+          return this;
+        }
+        
+        // optional .google.protobuf.FieldDescriptorProto.Type type = 5;
+        public boolean HasType() {
+          return result.HasType();
+        }
+        public Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto.Type GetType() {
+          return result.GetType();
+        }
+        public Builder SetType(Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto.Type value) {
+          result.hasType = true;
+          result.type_ = value;
+          return this;
+        }
+        public Builder ClearType() {
+          result.hasType = false;
+          result.type_ = Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto.Type.TYPE_DOUBLE;
+          return this;
+        }
+        
+        // optional string type_name = 6;
+        public boolean HasTypeName {
+          get { return result.HasTypeName; }
+        }
+        public string TypeName {
+          get { return result.TypeName; }
+          set {
+            result.hasTypeName = true;
+            result.typeName_ = value;
+          }
+        }
+        public Builder ClearTypeName() {
+          result.hasTypeName = false;
+          result.typeName_ = "";
+          return this;
+        }
+        
+        // optional string extendee = 2;
+        public boolean HasExtendee {
+          get { return result.HasExtendee; }
+        }
+        public string Extendee {
+          get { return result.Extendee; }
+          set {
+            result.hasExtendee = true;
+            result.extendee_ = value;
+          }
+        }
+        public Builder ClearExtendee() {
+          result.hasExtendee = false;
+          result.extendee_ = "";
+          return this;
+        }
+        
+        // optional string default_value = 7;
+        public boolean HasDefaultValue {
+          get { return result.HasDefaultValue; }
+        }
+        public string DefaultValue {
+          get { return result.DefaultValue; }
+          set {
+            result.hasDefaultValue = true;
+            result.defaultValue_ = value;
+          }
+        }
+        public Builder ClearDefaultValue() {
+          result.hasDefaultValue = false;
+          result.defaultValue_ = "";
+          return this;
+        }
+        
+        // optional .google.protobuf.FieldOptions options = 8;
+        public boolean hasOptions() {
+          return result.hasOptions();
+        }
+        public Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldOptions getOptions() {
+          return result.getOptions();
+        }
+        public Builder setOptions(Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldOptions value) {
+          result.hasOptions = true;
+          result.options_ = value;
+          return this;
+        }
+        public Builder setOptions(Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldOptions.Builder builderForValue) {
+          result.hasOptions = true;
+          result.options_ = builderForValue.build();
+          return this;
+        }
+        public Builder mergeOptions(Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldOptions value) {
+          if (result.hasOptions() &&
+              result.options_ != Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldOptions.getDefaultInstance()) {
+            result.options_ =
+              Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldOptions.newBuilder(result.options_).mergeFrom(value).buildPartial();
+          } else {
+            result.options_ = value;
+          }
+          result.hasOptions = true;
+          return this;
+        }
+        public Builder clearOptions() {
+          result.hasOptions = false;
+          result.options_ = Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldOptions.getDefaultInstance();
+          return this;
+        }
+      }
+    }
+    
+    public sealed class EnumDescriptorProto : pb::GeneratedMessage {
+      // Use EnumDescriptorProto.newBuilder() to construct.
+      private EnumDescriptorProto() {}
+      
+      private static readonly EnumDescriptorProto defaultInstance = new EnumDescriptorProto();
+      public static EnumDescriptorProto DefaultInstance {
+        get { return defaultInstance; }
+      }
+      
+      public EnumDescriptorProto DefaultInstanceForType {
+        get { return defaultInstance; }
+      }
+      
+      public static pb::Descriptors.Descriptor Descriptor {
+        get { return Google.ProtocolBuffers.DescriptorProtos.Descriptor.internal_static_google_protobuf_EnumDescriptorProto_descriptor; }
+      }
+      
+      protected pb::GeneratedMessage.FieldAccessorTable InternalGetFieldAccessorTable {
+        get { return Google.ProtocolBuffers.DescriptorProtos.Descriptor.internal_static_google_protobuf_EnumDescriptorProto_fieldAccessorTable; }
+      }
+      
+      // optional string name = 1;
+      private bool hasName;
+      private string name_ = "";
+      public boolean HasName {
+        get { return hasName; }
+      }
+      public string Name {
+        get { return name_; }
+      }
+      
+      // repeated .google.protobuf.EnumValueDescriptorProto value = 2;
+      internal System.Collections.Generic.IList<Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueDescriptorProto> EmptyValue =
+        new System.Collections.ReadOnlyCollection<Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueDescriptorProto> ();
+      internal System.Collections.Generic.IList<Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueDescriptorProto> value_ = EmptyValue;
+      public System.Collections.Generic.IList<Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueDescriptorProto> ValueList {
+        get { return value_; } 
+      }
+      public int ValueCount { get { return value_.Count; }  }
+      public Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueDescriptorProto Value(int index) {
+        return value_ [index];
+      }
+      
+      // optional .google.protobuf.EnumOptions options = 3;
+      private boolean hasOptions;
+      private Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumOptions options_ = Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumOptions.getDefaultInstance();
+      public boolean hasOptions() { return hasOptions; }
+      public Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumOptions getOptions() { return options_; }
+      
+      public final boolean isInitialized() {
+        return true;
+      }
+      
+      public void writeTo(pb::CodedOutputStream output) {
+        if (hasName()) {
+          output.writeString(1, getName());
+        }
+        foreach (Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueDescriptorProto element in GetValueList()) {
+          output.writeMessage(2, element);
+        }
+        if (hasOptions()) {
+          output.writeMessage(3, getOptions());
+        }
+        UnknownFields.WriteTo(output);
+      }
+      
+      private int memoizedSerializedSize = -1;
+      public int SerializedSize {
+        get {
+          int size = memoizedSerializedSize;
+          if (size != -1) return size;
+          
+          size = 0;
+          if (hasName()) {
+            size += pb::CodedOutputStream
+              .computeStringSize(1, getName());
+          }
+          foreach (Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueDescriptorProto element in GetValueList()) {
+            size += pb::CodedOutputStream
+              .computeMessageSize(2, element);
+          }
+          if (hasOptions()) {
+            size += pb::CodedOutputStream
+              .computeMessageSize(3, getOptions());
+          }
+          size += UnknownFieldsSerializedSize;
+          memoizedSerializedSize = size;
+          return size;
+        }
+      }
+      
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto parseFrom(pb::ByteString data) {
+        return newBuilder().mergeFrom(data).buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto parseFrom(pb::ByteString data,
+          pb::ExtensionRegistry extensionRegistry) {
+        return newBuilder().mergeFrom(data, extensionRegistry)
+                 .buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto parseFrom(byte[] data) {
+        return newBuilder().mergeFrom(data).buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto parseFrom(byte[] data,
+          pb::ExtensionRegistry extensionRegistry) {
+        return newBuilder().mergeFrom(data, extensionRegistry)
+                 .buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto parseFrom(global::System.IO.Stream input) {
+        return newBuilder().mergeFrom(input).buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto parseFrom(
+          global::System.IO.Stream input,
+          pb::ExtensionRegistry extensionRegistry) {
+        return newBuilder().mergeFrom(input, extensionRegistry)
+                 .buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto parseFrom(pb::CodedInputStream input) {
+        return newBuilder().mergeFrom(input).buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto parseFrom(pb::CodedInputStream input,
+          pb::ExtensionRegistry extensionRegistry) {
+        return newBuilder().mergeFrom(input, extensionRegistry)
+                 .buildParsed();
+      }
+      
+      public static Builder newBuilder() { return new Builder(); }
+      public Builder newBuilderForType() { return new Builder(); }
+      public static Builder newBuilder(Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto prototype) {
+        return new Builder().mergeFrom(prototype);
+      }
+      
+      public sealed class Builder : pb::GeneratedMessage.Builder<Builder> {
+        // Construct using Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto.newBuilder()
+        private Builder() {}
+        
+        Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto result = new Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto();
+        
+        protected Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto internalGetResult() {
+          return result;
+        }
+        
+        public Builder clear() {
+          result = new Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto();
+          return this;
+        }
+        
+        public Builder clone() {
+          return new Builder().mergeFrom(result);
+        }
+        
+        public pb::Descriptors.Descriptor
+            getDescriptorForType() {
+          return Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto.getDescriptor();
+        }
+        
+        public Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto getDefaultInstanceForType() {
+          return Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto.getDefaultInstance();
+        }
+        
+        public Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto build() {
+          if (!isInitialized()) {
+            throw new pb::UninitializedMessageException(
+              result);
+          }
+          return buildPartial();
+        }
+        
+        private Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto buildParsed() {
+          if (!isInitialized()) {
+            throw new pb::UninitializedMessageException(
+              result).asInvalidProtocolBufferException();
+          }
+          return buildPartial();
+        }
+        
+        public Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto buildPartial() {
+          if (result.value_ != Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueDescriptorProto.EmptyValue) {
+            result.value_ =
+              result.value_.AsReadOnly ();
+          }
+          Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto returnMe = result;
+          result = null;
+          return returnMe;
+        }
+        
+        public Builder mergeFrom(pb::Message other) {
+          if (other instanceof Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto) {
+            return mergeFrom((Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto)other);
+          } else {
+            super.mergeFrom(other);
+            return this;
+          }
+        }
+        
+        public Builder mergeFrom(Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto other) {
+          if (other == Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto.getDefaultInstance()) return this;
+          if (other.hasName()) {
+            setName(other.getName());
+          }
+          if (!other.value_ != Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueDescriptorProto.EmptyValue) {
+            if (result.value_ == Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueDescriptorProto.EmptyValue) {
+              result.value_ = new System.Collections.Generic.List<Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueDescriptorProto>();
+            }
+            result.value_.AddCollection(other.value_);
+          }
+          if (other.hasOptions()) {
+            mergeOptions(other.getOptions());
+          }
+          this.mergeUnknownFields(other.getUnknownFields());
+          return this;
+        }
+        
+        public Builder mergeFrom(
+            pb::CodedInputStream input) {
+          return mergeFrom(input,
+            pb::ExtensionRegistry.getEmptyRegistry());
+        }
+        
+        public Builder mergeFrom(
+            pb::CodedInputStream input,
+            pb::ExtensionRegistry extensionRegistry) {
+          pb::UnknownFieldSet.Builder unknownFields =
+            pb::UnknownFieldSet.newBuilder(
+              this.getUnknownFields());
+          while (true) {
+            int tag = input.readTag();
+            switch (tag) {
+              case 0:
+                this.setUnknownFields(unknownFields.build());
+                return this;
+              default: {
+                if (!parseUnknownField(input, unknownFields,
+                                       extensionRegistry, tag)) {
+                  this.setUnknownFields(unknownFields.build());
+                  return this;
+                }
+                break;
+              }
+              case 10: {
+                setName(input.readString());
+                break;
+              }
+              case 18: {
+                Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueDescriptorProto.Builder subBuilder = Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueDescriptorProto.newBuilder();
+                input.readMessage(subBuilder, extensionRegistry);
+                AddValue(subBuilder.buildPartial());
+                break;
+              }
+              case 26: {
+                Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumOptions.Builder subBuilder = Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumOptions.newBuilder();
+                if (hasOptions()) {
+                  subBuilder.mergeFrom(getOptions());
+                }
+                input.readMessage(subBuilder, extensionRegistry);
+                setOptions(subBuilder.buildPartial());
+                break;
+              }
+            }
+          }
+        }
+        
+        
+        // optional string name = 1;
+        public boolean HasName {
+          get { return result.HasName; }
+        }
+        public string Name {
+          get { return result.Name; }
+          set {
+            result.hasName = true;
+            result.name_ = value;
+          }
+        }
+        public Builder ClearName() {
+          result.hasName = false;
+          result.name_ = "";
+          return this;
+        }
+        
+        // repeated .google.protobuf.EnumValueDescriptorProto value = 2;
+        public System.Collections.Generic.IList<Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueDescriptorProto> GetValueList() {
+          if (result.value_ == Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueDescriptorProto.EmptyValue)
+            return result.value;
+          return result.value_.AsReadOnly ();
+        }
+        public int GetValueCount() {
+          return result.GetValueCount();
+        }
+        public Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueDescriptorProto GetValue(int index) {
+          return result.GetValue(index);
+        }
+        public Builder SetValue(int index, Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueDescriptorProto value) {
+          result.value_ [index] = value;
+          return this;
+        }
+        public Builder SetValue(int index, Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueDescriptorProto.Builder builderForValue) {
+          result.value_ [index] = builderForValue.build();
+          return this;
+        }
+        public Builder AddValue(Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueDescriptorProto value) {
+          if (result.value == Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueDescriptorProto.EmptyValue)
+            result.value = new System.Collections.Generic.List<Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueDescriptorProto>();
+          result.value_.Add(value);
+          return this;
+        }
+        public Builder AddValue(Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueDescriptorProto.Builder builderForValue) {
+          if (result.value == Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueDescriptorProto.EmptyValue)
+            result.value = new System.Collections.Generic.List<Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueDescriptorProto>();
+          result.value_.Add(builderForValue.build());
+          return this;
+        }
+        public Builder AddAllValue<T>(
+            global::System.Collections.Generic.IEnumerable<T> values) where T : Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueDescriptorProto {
+          if (result.value == Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueDescriptorProto.EmptyValue)
+            result.value = new System.Collections.Generic.List<Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueDescriptorProto>();
+          result.value_.AddEnumerable (values);
+          return this;
+        }
+        public Builder ClearValue() {
+          result.value_ = Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueDescriptorProto.EmptyValue;
+          return this;
+        }
+        
+        // optional .google.protobuf.EnumOptions options = 3;
+        public boolean hasOptions() {
+          return result.hasOptions();
+        }
+        public Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumOptions getOptions() {
+          return result.getOptions();
+        }
+        public Builder setOptions(Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumOptions value) {
+          result.hasOptions = true;
+          result.options_ = value;
+          return this;
+        }
+        public Builder setOptions(Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumOptions.Builder builderForValue) {
+          result.hasOptions = true;
+          result.options_ = builderForValue.build();
+          return this;
+        }
+        public Builder mergeOptions(Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumOptions value) {
+          if (result.hasOptions() &&
+              result.options_ != Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumOptions.getDefaultInstance()) {
+            result.options_ =
+              Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumOptions.newBuilder(result.options_).mergeFrom(value).buildPartial();
+          } else {
+            result.options_ = value;
+          }
+          result.hasOptions = true;
+          return this;
+        }
+        public Builder clearOptions() {
+          result.hasOptions = false;
+          result.options_ = Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumOptions.getDefaultInstance();
+          return this;
+        }
+      }
+    }
+    
+    public sealed class EnumValueDescriptorProto : pb::GeneratedMessage {
+      // Use EnumValueDescriptorProto.newBuilder() to construct.
+      private EnumValueDescriptorProto() {}
+      
+      private static readonly EnumValueDescriptorProto defaultInstance = new EnumValueDescriptorProto();
+      public static EnumValueDescriptorProto DefaultInstance {
+        get { return defaultInstance; }
+      }
+      
+      public EnumValueDescriptorProto DefaultInstanceForType {
+        get { return defaultInstance; }
+      }
+      
+      public static pb::Descriptors.Descriptor Descriptor {
+        get { return Google.ProtocolBuffers.DescriptorProtos.Descriptor.internal_static_google_protobuf_EnumValueDescriptorProto_descriptor; }
+      }
+      
+      protected pb::GeneratedMessage.FieldAccessorTable InternalGetFieldAccessorTable {
+        get { return Google.ProtocolBuffers.DescriptorProtos.Descriptor.internal_static_google_protobuf_EnumValueDescriptorProto_fieldAccessorTable; }
+      }
+      
+      // optional string name = 1;
+      private bool hasName;
+      private string name_ = "";
+      public boolean HasName {
+        get { return hasName; }
+      }
+      public string Name {
+        get { return name_; }
+      }
+      
+      // optional int32 number = 2;
+      private bool hasNumber;
+      private int number_ = 0;
+      public boolean HasNumber {
+        get { return hasNumber; }
+      }
+      public int Number {
+        get { return number_; }
+      }
+      
+      // optional .google.protobuf.EnumValueOptions options = 3;
+      private boolean hasOptions;
+      private Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueOptions options_ = Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueOptions.getDefaultInstance();
+      public boolean hasOptions() { return hasOptions; }
+      public Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueOptions getOptions() { return options_; }
+      
+      public final boolean isInitialized() {
+        return true;
+      }
+      
+      public void writeTo(pb::CodedOutputStream output) {
+        if (hasName()) {
+          output.writeString(1, getName());
+        }
+        if (hasNumber()) {
+          output.writeInt32(2, getNumber());
+        }
+        if (hasOptions()) {
+          output.writeMessage(3, getOptions());
+        }
+        UnknownFields.WriteTo(output);
+      }
+      
+      private int memoizedSerializedSize = -1;
+      public int SerializedSize {
+        get {
+          int size = memoizedSerializedSize;
+          if (size != -1) return size;
+          
+          size = 0;
+          if (hasName()) {
+            size += pb::CodedOutputStream
+              .computeStringSize(1, getName());
+          }
+          if (hasNumber()) {
+            size += pb::CodedOutputStream
+              .computeInt32Size(2, getNumber());
+          }
+          if (hasOptions()) {
+            size += pb::CodedOutputStream
+              .computeMessageSize(3, getOptions());
+          }
+          size += UnknownFieldsSerializedSize;
+          memoizedSerializedSize = size;
+          return size;
+        }
+      }
+      
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueDescriptorProto parseFrom(pb::ByteString data) {
+        return newBuilder().mergeFrom(data).buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueDescriptorProto parseFrom(pb::ByteString data,
+          pb::ExtensionRegistry extensionRegistry) {
+        return newBuilder().mergeFrom(data, extensionRegistry)
+                 .buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueDescriptorProto parseFrom(byte[] data) {
+        return newBuilder().mergeFrom(data).buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueDescriptorProto parseFrom(byte[] data,
+          pb::ExtensionRegistry extensionRegistry) {
+        return newBuilder().mergeFrom(data, extensionRegistry)
+                 .buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueDescriptorProto parseFrom(global::System.IO.Stream input) {
+        return newBuilder().mergeFrom(input).buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueDescriptorProto parseFrom(
+          global::System.IO.Stream input,
+          pb::ExtensionRegistry extensionRegistry) {
+        return newBuilder().mergeFrom(input, extensionRegistry)
+                 .buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueDescriptorProto parseFrom(pb::CodedInputStream input) {
+        return newBuilder().mergeFrom(input).buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueDescriptorProto parseFrom(pb::CodedInputStream input,
+          pb::ExtensionRegistry extensionRegistry) {
+        return newBuilder().mergeFrom(input, extensionRegistry)
+                 .buildParsed();
+      }
+      
+      public static Builder newBuilder() { return new Builder(); }
+      public Builder newBuilderForType() { return new Builder(); }
+      public static Builder newBuilder(Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueDescriptorProto prototype) {
+        return new Builder().mergeFrom(prototype);
+      }
+      
+      public sealed class Builder : pb::GeneratedMessage.Builder<Builder> {
+        // Construct using Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueDescriptorProto.newBuilder()
+        private Builder() {}
+        
+        Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueDescriptorProto result = new Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueDescriptorProto();
+        
+        protected Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueDescriptorProto internalGetResult() {
+          return result;
+        }
+        
+        public Builder clear() {
+          result = new Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueDescriptorProto();
+          return this;
+        }
+        
+        public Builder clone() {
+          return new Builder().mergeFrom(result);
+        }
+        
+        public pb::Descriptors.Descriptor
+            getDescriptorForType() {
+          return Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueDescriptorProto.getDescriptor();
+        }
+        
+        public Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueDescriptorProto getDefaultInstanceForType() {
+          return Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueDescriptorProto.getDefaultInstance();
+        }
+        
+        public Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueDescriptorProto build() {
+          if (!isInitialized()) {
+            throw new pb::UninitializedMessageException(
+              result);
+          }
+          return buildPartial();
+        }
+        
+        private Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueDescriptorProto buildParsed() {
+          if (!isInitialized()) {
+            throw new pb::UninitializedMessageException(
+              result).asInvalidProtocolBufferException();
+          }
+          return buildPartial();
+        }
+        
+        public Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueDescriptorProto buildPartial() {
+          Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueDescriptorProto returnMe = result;
+          result = null;
+          return returnMe;
+        }
+        
+        public Builder mergeFrom(pb::Message other) {
+          if (other instanceof Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueDescriptorProto) {
+            return mergeFrom((Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueDescriptorProto)other);
+          } else {
+            super.mergeFrom(other);
+            return this;
+          }
+        }
+        
+        public Builder mergeFrom(Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueDescriptorProto other) {
+          if (other == Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueDescriptorProto.getDefaultInstance()) return this;
+          if (other.hasName()) {
+            setName(other.getName());
+          }
+          if (other.hasNumber()) {
+            setNumber(other.getNumber());
+          }
+          if (other.hasOptions()) {
+            mergeOptions(other.getOptions());
+          }
+          this.mergeUnknownFields(other.getUnknownFields());
+          return this;
+        }
+        
+        public Builder mergeFrom(
+            pb::CodedInputStream input) {
+          return mergeFrom(input,
+            pb::ExtensionRegistry.getEmptyRegistry());
+        }
+        
+        public Builder mergeFrom(
+            pb::CodedInputStream input,
+            pb::ExtensionRegistry extensionRegistry) {
+          pb::UnknownFieldSet.Builder unknownFields =
+            pb::UnknownFieldSet.newBuilder(
+              this.getUnknownFields());
+          while (true) {
+            int tag = input.readTag();
+            switch (tag) {
+              case 0:
+                this.setUnknownFields(unknownFields.build());
+                return this;
+              default: {
+                if (!parseUnknownField(input, unknownFields,
+                                       extensionRegistry, tag)) {
+                  this.setUnknownFields(unknownFields.build());
+                  return this;
+                }
+                break;
+              }
+              case 10: {
+                setName(input.readString());
+                break;
+              }
+              case 16: {
+                setNumber(input.readInt32());
+                break;
+              }
+              case 26: {
+                Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueOptions.Builder subBuilder = Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueOptions.newBuilder();
+                if (hasOptions()) {
+                  subBuilder.mergeFrom(getOptions());
+                }
+                input.readMessage(subBuilder, extensionRegistry);
+                setOptions(subBuilder.buildPartial());
+                break;
+              }
+            }
+          }
+        }
+        
+        
+        // optional string name = 1;
+        public boolean HasName {
+          get { return result.HasName; }
+        }
+        public string Name {
+          get { return result.Name; }
+          set {
+            result.hasName = true;
+            result.name_ = value;
+          }
+        }
+        public Builder ClearName() {
+          result.hasName = false;
+          result.name_ = "";
+          return this;
+        }
+        
+        // optional int32 number = 2;
+        public boolean HasNumber {
+          get { return result.HasNumber; }
+        }
+        public int Number {
+          get { return result.Number; }
+          set {
+            result.hasNumber = true;
+            result.number_ = value;
+          }
+        }
+        public Builder ClearNumber() {
+          result.hasNumber = false;
+          result.number_ = 0;
+          return this;
+        }
+        
+        // optional .google.protobuf.EnumValueOptions options = 3;
+        public boolean hasOptions() {
+          return result.hasOptions();
+        }
+        public Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueOptions getOptions() {
+          return result.getOptions();
+        }
+        public Builder setOptions(Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueOptions value) {
+          result.hasOptions = true;
+          result.options_ = value;
+          return this;
+        }
+        public Builder setOptions(Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueOptions.Builder builderForValue) {
+          result.hasOptions = true;
+          result.options_ = builderForValue.build();
+          return this;
+        }
+        public Builder mergeOptions(Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueOptions value) {
+          if (result.hasOptions() &&
+              result.options_ != Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueOptions.getDefaultInstance()) {
+            result.options_ =
+              Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueOptions.newBuilder(result.options_).mergeFrom(value).buildPartial();
+          } else {
+            result.options_ = value;
+          }
+          result.hasOptions = true;
+          return this;
+        }
+        public Builder clearOptions() {
+          result.hasOptions = false;
+          result.options_ = Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueOptions.getDefaultInstance();
+          return this;
+        }
+      }
+    }
+    
+    public sealed class ServiceDescriptorProto : pb::GeneratedMessage {
+      // Use ServiceDescriptorProto.newBuilder() to construct.
+      private ServiceDescriptorProto() {}
+      
+      private static readonly ServiceDescriptorProto defaultInstance = new ServiceDescriptorProto();
+      public static ServiceDescriptorProto DefaultInstance {
+        get { return defaultInstance; }
+      }
+      
+      public ServiceDescriptorProto DefaultInstanceForType {
+        get { return defaultInstance; }
+      }
+      
+      public static pb::Descriptors.Descriptor Descriptor {
+        get { return Google.ProtocolBuffers.DescriptorProtos.Descriptor.internal_static_google_protobuf_ServiceDescriptorProto_descriptor; }
+      }
+      
+      protected pb::GeneratedMessage.FieldAccessorTable InternalGetFieldAccessorTable {
+        get { return Google.ProtocolBuffers.DescriptorProtos.Descriptor.internal_static_google_protobuf_ServiceDescriptorProto_fieldAccessorTable; }
+      }
+      
+      // optional string name = 1;
+      private bool hasName;
+      private string name_ = "";
+      public boolean HasName {
+        get { return hasName; }
+      }
+      public string Name {
+        get { return name_; }
+      }
+      
+      // repeated .google.protobuf.MethodDescriptorProto method = 2;
+      internal System.Collections.Generic.IList<Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodDescriptorProto> EmptyMethod =
+        new System.Collections.ReadOnlyCollection<Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodDescriptorProto> ();
+      internal System.Collections.Generic.IList<Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodDescriptorProto> method_ = EmptyMethod;
+      public System.Collections.Generic.IList<Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodDescriptorProto> MethodList {
+        get { return method_; } 
+      }
+      public int MethodCount { get { return method_.Count; }  }
+      public Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodDescriptorProto Method(int index) {
+        return method_ [index];
+      }
+      
+      // optional .google.protobuf.ServiceOptions options = 3;
+      private boolean hasOptions;
+      private Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceOptions options_ = Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceOptions.getDefaultInstance();
+      public boolean hasOptions() { return hasOptions; }
+      public Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceOptions getOptions() { return options_; }
+      
+      public final boolean isInitialized() {
+        return true;
+      }
+      
+      public void writeTo(pb::CodedOutputStream output) {
+        if (hasName()) {
+          output.writeString(1, getName());
+        }
+        foreach (Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodDescriptorProto element in GetMethodList()) {
+          output.writeMessage(2, element);
+        }
+        if (hasOptions()) {
+          output.writeMessage(3, getOptions());
+        }
+        UnknownFields.WriteTo(output);
+      }
+      
+      private int memoizedSerializedSize = -1;
+      public int SerializedSize {
+        get {
+          int size = memoizedSerializedSize;
+          if (size != -1) return size;
+          
+          size = 0;
+          if (hasName()) {
+            size += pb::CodedOutputStream
+              .computeStringSize(1, getName());
+          }
+          foreach (Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodDescriptorProto element in GetMethodList()) {
+            size += pb::CodedOutputStream
+              .computeMessageSize(2, element);
+          }
+          if (hasOptions()) {
+            size += pb::CodedOutputStream
+              .computeMessageSize(3, getOptions());
+          }
+          size += UnknownFieldsSerializedSize;
+          memoizedSerializedSize = size;
+          return size;
+        }
+      }
+      
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceDescriptorProto parseFrom(pb::ByteString data) {
+        return newBuilder().mergeFrom(data).buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceDescriptorProto parseFrom(pb::ByteString data,
+          pb::ExtensionRegistry extensionRegistry) {
+        return newBuilder().mergeFrom(data, extensionRegistry)
+                 .buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceDescriptorProto parseFrom(byte[] data) {
+        return newBuilder().mergeFrom(data).buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceDescriptorProto parseFrom(byte[] data,
+          pb::ExtensionRegistry extensionRegistry) {
+        return newBuilder().mergeFrom(data, extensionRegistry)
+                 .buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceDescriptorProto parseFrom(global::System.IO.Stream input) {
+        return newBuilder().mergeFrom(input).buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceDescriptorProto parseFrom(
+          global::System.IO.Stream input,
+          pb::ExtensionRegistry extensionRegistry) {
+        return newBuilder().mergeFrom(input, extensionRegistry)
+                 .buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceDescriptorProto parseFrom(pb::CodedInputStream input) {
+        return newBuilder().mergeFrom(input).buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceDescriptorProto parseFrom(pb::CodedInputStream input,
+          pb::ExtensionRegistry extensionRegistry) {
+        return newBuilder().mergeFrom(input, extensionRegistry)
+                 .buildParsed();
+      }
+      
+      public static Builder newBuilder() { return new Builder(); }
+      public Builder newBuilderForType() { return new Builder(); }
+      public static Builder newBuilder(Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceDescriptorProto prototype) {
+        return new Builder().mergeFrom(prototype);
+      }
+      
+      public sealed class Builder : pb::GeneratedMessage.Builder<Builder> {
+        // Construct using Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceDescriptorProto.newBuilder()
+        private Builder() {}
+        
+        Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceDescriptorProto result = new Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceDescriptorProto();
+        
+        protected Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceDescriptorProto internalGetResult() {
+          return result;
+        }
+        
+        public Builder clear() {
+          result = new Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceDescriptorProto();
+          return this;
+        }
+        
+        public Builder clone() {
+          return new Builder().mergeFrom(result);
+        }
+        
+        public pb::Descriptors.Descriptor
+            getDescriptorForType() {
+          return Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceDescriptorProto.getDescriptor();
+        }
+        
+        public Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceDescriptorProto getDefaultInstanceForType() {
+          return Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceDescriptorProto.getDefaultInstance();
+        }
+        
+        public Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceDescriptorProto build() {
+          if (!isInitialized()) {
+            throw new pb::UninitializedMessageException(
+              result);
+          }
+          return buildPartial();
+        }
+        
+        private Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceDescriptorProto buildParsed() {
+          if (!isInitialized()) {
+            throw new pb::UninitializedMessageException(
+              result).asInvalidProtocolBufferException();
+          }
+          return buildPartial();
+        }
+        
+        public Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceDescriptorProto buildPartial() {
+          if (result.method_ != Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodDescriptorProto.EmptyMethod) {
+            result.method_ =
+              result.method_.AsReadOnly ();
+          }
+          Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceDescriptorProto returnMe = result;
+          result = null;
+          return returnMe;
+        }
+        
+        public Builder mergeFrom(pb::Message other) {
+          if (other instanceof Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceDescriptorProto) {
+            return mergeFrom((Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceDescriptorProto)other);
+          } else {
+            super.mergeFrom(other);
+            return this;
+          }
+        }
+        
+        public Builder mergeFrom(Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceDescriptorProto other) {
+          if (other == Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceDescriptorProto.getDefaultInstance()) return this;
+          if (other.hasName()) {
+            setName(other.getName());
+          }
+          if (!other.method_ != Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodDescriptorProto.EmptyMethod) {
+            if (result.method_ == Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodDescriptorProto.EmptyMethod) {
+              result.method_ = new System.Collections.Generic.List<Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodDescriptorProto>();
+            }
+            result.method_.AddCollection(other.method_);
+          }
+          if (other.hasOptions()) {
+            mergeOptions(other.getOptions());
+          }
+          this.mergeUnknownFields(other.getUnknownFields());
+          return this;
+        }
+        
+        public Builder mergeFrom(
+            pb::CodedInputStream input) {
+          return mergeFrom(input,
+            pb::ExtensionRegistry.getEmptyRegistry());
+        }
+        
+        public Builder mergeFrom(
+            pb::CodedInputStream input,
+            pb::ExtensionRegistry extensionRegistry) {
+          pb::UnknownFieldSet.Builder unknownFields =
+            pb::UnknownFieldSet.newBuilder(
+              this.getUnknownFields());
+          while (true) {
+            int tag = input.readTag();
+            switch (tag) {
+              case 0:
+                this.setUnknownFields(unknownFields.build());
+                return this;
+              default: {
+                if (!parseUnknownField(input, unknownFields,
+                                       extensionRegistry, tag)) {
+                  this.setUnknownFields(unknownFields.build());
+                  return this;
+                }
+                break;
+              }
+              case 10: {
+                setName(input.readString());
+                break;
+              }
+              case 18: {
+                Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodDescriptorProto.Builder subBuilder = Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodDescriptorProto.newBuilder();
+                input.readMessage(subBuilder, extensionRegistry);
+                AddMethod(subBuilder.buildPartial());
+                break;
+              }
+              case 26: {
+                Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceOptions.Builder subBuilder = Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceOptions.newBuilder();
+                if (hasOptions()) {
+                  subBuilder.mergeFrom(getOptions());
+                }
+                input.readMessage(subBuilder, extensionRegistry);
+                setOptions(subBuilder.buildPartial());
+                break;
+              }
+            }
+          }
+        }
+        
+        
+        // optional string name = 1;
+        public boolean HasName {
+          get { return result.HasName; }
+        }
+        public string Name {
+          get { return result.Name; }
+          set {
+            result.hasName = true;
+            result.name_ = value;
+          }
+        }
+        public Builder ClearName() {
+          result.hasName = false;
+          result.name_ = "";
+          return this;
+        }
+        
+        // repeated .google.protobuf.MethodDescriptorProto method = 2;
+        public System.Collections.Generic.IList<Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodDescriptorProto> GetMethodList() {
+          if (result.method_ == Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodDescriptorProto.EmptyMethod)
+            return result.method;
+          return result.method_.AsReadOnly ();
+        }
+        public int GetMethodCount() {
+          return result.GetMethodCount();
+        }
+        public Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodDescriptorProto GetMethod(int index) {
+          return result.GetMethod(index);
+        }
+        public Builder SetMethod(int index, Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodDescriptorProto value) {
+          result.method_ [index] = value;
+          return this;
+        }
+        public Builder SetMethod(int index, Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodDescriptorProto.Builder builderForValue) {
+          result.method_ [index] = builderForValue.build();
+          return this;
+        }
+        public Builder AddMethod(Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodDescriptorProto value) {
+          if (result.method == Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodDescriptorProto.EmptyMethod)
+            result.method = new System.Collections.Generic.List<Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodDescriptorProto>();
+          result.method_.Add(value);
+          return this;
+        }
+        public Builder AddMethod(Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodDescriptorProto.Builder builderForValue) {
+          if (result.method == Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodDescriptorProto.EmptyMethod)
+            result.method = new System.Collections.Generic.List<Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodDescriptorProto>();
+          result.method_.Add(builderForValue.build());
+          return this;
+        }
+        public Builder AddAllMethod<T>(
+            global::System.Collections.Generic.IEnumerable<T> values) where T : Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodDescriptorProto {
+          if (result.method == Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodDescriptorProto.EmptyMethod)
+            result.method = new System.Collections.Generic.List<Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodDescriptorProto>();
+          result.method_.AddEnumerable (values);
+          return this;
+        }
+        public Builder ClearMethod() {
+          result.method_ = Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodDescriptorProto.EmptyMethod;
+          return this;
+        }
+        
+        // optional .google.protobuf.ServiceOptions options = 3;
+        public boolean hasOptions() {
+          return result.hasOptions();
+        }
+        public Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceOptions getOptions() {
+          return result.getOptions();
+        }
+        public Builder setOptions(Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceOptions value) {
+          result.hasOptions = true;
+          result.options_ = value;
+          return this;
+        }
+        public Builder setOptions(Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceOptions.Builder builderForValue) {
+          result.hasOptions = true;
+          result.options_ = builderForValue.build();
+          return this;
+        }
+        public Builder mergeOptions(Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceOptions value) {
+          if (result.hasOptions() &&
+              result.options_ != Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceOptions.getDefaultInstance()) {
+            result.options_ =
+              Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceOptions.newBuilder(result.options_).mergeFrom(value).buildPartial();
+          } else {
+            result.options_ = value;
+          }
+          result.hasOptions = true;
+          return this;
+        }
+        public Builder clearOptions() {
+          result.hasOptions = false;
+          result.options_ = Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceOptions.getDefaultInstance();
+          return this;
+        }
+      }
+    }
+    
+    public sealed class MethodDescriptorProto : pb::GeneratedMessage {
+      // Use MethodDescriptorProto.newBuilder() to construct.
+      private MethodDescriptorProto() {}
+      
+      private static readonly MethodDescriptorProto defaultInstance = new MethodDescriptorProto();
+      public static MethodDescriptorProto DefaultInstance {
+        get { return defaultInstance; }
+      }
+      
+      public MethodDescriptorProto DefaultInstanceForType {
+        get { return defaultInstance; }
+      }
+      
+      public static pb::Descriptors.Descriptor Descriptor {
+        get { return Google.ProtocolBuffers.DescriptorProtos.Descriptor.internal_static_google_protobuf_MethodDescriptorProto_descriptor; }
+      }
+      
+      protected pb::GeneratedMessage.FieldAccessorTable InternalGetFieldAccessorTable {
+        get { return Google.ProtocolBuffers.DescriptorProtos.Descriptor.internal_static_google_protobuf_MethodDescriptorProto_fieldAccessorTable; }
+      }
+      
+      // optional string name = 1;
+      private bool hasName;
+      private string name_ = "";
+      public boolean HasName {
+        get { return hasName; }
+      }
+      public string Name {
+        get { return name_; }
+      }
+      
+      // optional string input_type = 2;
+      private bool hasInputType;
+      private string inputType_ = "";
+      public boolean HasInputType {
+        get { return hasInputType; }
+      }
+      public string InputType {
+        get { return inputType_; }
+      }
+      
+      // optional string output_type = 3;
+      private bool hasOutputType;
+      private string outputType_ = "";
+      public boolean HasOutputType {
+        get { return hasOutputType; }
+      }
+      public string OutputType {
+        get { return outputType_; }
+      }
+      
+      // optional .google.protobuf.MethodOptions options = 4;
+      private boolean hasOptions;
+      private Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodOptions options_ = Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodOptions.getDefaultInstance();
+      public boolean hasOptions() { return hasOptions; }
+      public Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodOptions getOptions() { return options_; }
+      
+      public final boolean isInitialized() {
+        return true;
+      }
+      
+      public void writeTo(pb::CodedOutputStream output) {
+        if (hasName()) {
+          output.writeString(1, getName());
+        }
+        if (hasInputType()) {
+          output.writeString(2, getInputType());
+        }
+        if (hasOutputType()) {
+          output.writeString(3, getOutputType());
+        }
+        if (hasOptions()) {
+          output.writeMessage(4, getOptions());
+        }
+        UnknownFields.WriteTo(output);
+      }
+      
+      private int memoizedSerializedSize = -1;
+      public int SerializedSize {
+        get {
+          int size = memoizedSerializedSize;
+          if (size != -1) return size;
+          
+          size = 0;
+          if (hasName()) {
+            size += pb::CodedOutputStream
+              .computeStringSize(1, getName());
+          }
+          if (hasInputType()) {
+            size += pb::CodedOutputStream
+              .computeStringSize(2, getInputType());
+          }
+          if (hasOutputType()) {
+            size += pb::CodedOutputStream
+              .computeStringSize(3, getOutputType());
+          }
+          if (hasOptions()) {
+            size += pb::CodedOutputStream
+              .computeMessageSize(4, getOptions());
+          }
+          size += UnknownFieldsSerializedSize;
+          memoizedSerializedSize = size;
+          return size;
+        }
+      }
+      
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodDescriptorProto parseFrom(pb::ByteString data) {
+        return newBuilder().mergeFrom(data).buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodDescriptorProto parseFrom(pb::ByteString data,
+          pb::ExtensionRegistry extensionRegistry) {
+        return newBuilder().mergeFrom(data, extensionRegistry)
+                 .buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodDescriptorProto parseFrom(byte[] data) {
+        return newBuilder().mergeFrom(data).buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodDescriptorProto parseFrom(byte[] data,
+          pb::ExtensionRegistry extensionRegistry) {
+        return newBuilder().mergeFrom(data, extensionRegistry)
+                 .buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodDescriptorProto parseFrom(global::System.IO.Stream input) {
+        return newBuilder().mergeFrom(input).buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodDescriptorProto parseFrom(
+          global::System.IO.Stream input,
+          pb::ExtensionRegistry extensionRegistry) {
+        return newBuilder().mergeFrom(input, extensionRegistry)
+                 .buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodDescriptorProto parseFrom(pb::CodedInputStream input) {
+        return newBuilder().mergeFrom(input).buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodDescriptorProto parseFrom(pb::CodedInputStream input,
+          pb::ExtensionRegistry extensionRegistry) {
+        return newBuilder().mergeFrom(input, extensionRegistry)
+                 .buildParsed();
+      }
+      
+      public static Builder newBuilder() { return new Builder(); }
+      public Builder newBuilderForType() { return new Builder(); }
+      public static Builder newBuilder(Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodDescriptorProto prototype) {
+        return new Builder().mergeFrom(prototype);
+      }
+      
+      public sealed class Builder : pb::GeneratedMessage.Builder<Builder> {
+        // Construct using Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodDescriptorProto.newBuilder()
+        private Builder() {}
+        
+        Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodDescriptorProto result = new Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodDescriptorProto();
+        
+        protected Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodDescriptorProto internalGetResult() {
+          return result;
+        }
+        
+        public Builder clear() {
+          result = new Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodDescriptorProto();
+          return this;
+        }
+        
+        public Builder clone() {
+          return new Builder().mergeFrom(result);
+        }
+        
+        public pb::Descriptors.Descriptor
+            getDescriptorForType() {
+          return Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodDescriptorProto.getDescriptor();
+        }
+        
+        public Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodDescriptorProto getDefaultInstanceForType() {
+          return Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodDescriptorProto.getDefaultInstance();
+        }
+        
+        public Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodDescriptorProto build() {
+          if (!isInitialized()) {
+            throw new pb::UninitializedMessageException(
+              result);
+          }
+          return buildPartial();
+        }
+        
+        private Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodDescriptorProto buildParsed() {
+          if (!isInitialized()) {
+            throw new pb::UninitializedMessageException(
+              result).asInvalidProtocolBufferException();
+          }
+          return buildPartial();
+        }
+        
+        public Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodDescriptorProto buildPartial() {
+          Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodDescriptorProto returnMe = result;
+          result = null;
+          return returnMe;
+        }
+        
+        public Builder mergeFrom(pb::Message other) {
+          if (other instanceof Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodDescriptorProto) {
+            return mergeFrom((Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodDescriptorProto)other);
+          } else {
+            super.mergeFrom(other);
+            return this;
+          }
+        }
+        
+        public Builder mergeFrom(Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodDescriptorProto other) {
+          if (other == Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodDescriptorProto.getDefaultInstance()) return this;
+          if (other.hasName()) {
+            setName(other.getName());
+          }
+          if (other.hasInputType()) {
+            setInputType(other.getInputType());
+          }
+          if (other.hasOutputType()) {
+            setOutputType(other.getOutputType());
+          }
+          if (other.hasOptions()) {
+            mergeOptions(other.getOptions());
+          }
+          this.mergeUnknownFields(other.getUnknownFields());
+          return this;
+        }
+        
+        public Builder mergeFrom(
+            pb::CodedInputStream input) {
+          return mergeFrom(input,
+            pb::ExtensionRegistry.getEmptyRegistry());
+        }
+        
+        public Builder mergeFrom(
+            pb::CodedInputStream input,
+            pb::ExtensionRegistry extensionRegistry) {
+          pb::UnknownFieldSet.Builder unknownFields =
+            pb::UnknownFieldSet.newBuilder(
+              this.getUnknownFields());
+          while (true) {
+            int tag = input.readTag();
+            switch (tag) {
+              case 0:
+                this.setUnknownFields(unknownFields.build());
+                return this;
+              default: {
+                if (!parseUnknownField(input, unknownFields,
+                                       extensionRegistry, tag)) {
+                  this.setUnknownFields(unknownFields.build());
+                  return this;
+                }
+                break;
+              }
+              case 10: {
+                setName(input.readString());
+                break;
+              }
+              case 18: {
+                setInputType(input.readString());
+                break;
+              }
+              case 26: {
+                setOutputType(input.readString());
+                break;
+              }
+              case 34: {
+                Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodOptions.Builder subBuilder = Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodOptions.newBuilder();
+                if (hasOptions()) {
+                  subBuilder.mergeFrom(getOptions());
+                }
+                input.readMessage(subBuilder, extensionRegistry);
+                setOptions(subBuilder.buildPartial());
+                break;
+              }
+            }
+          }
+        }
+        
+        
+        // optional string name = 1;
+        public boolean HasName {
+          get { return result.HasName; }
+        }
+        public string Name {
+          get { return result.Name; }
+          set {
+            result.hasName = true;
+            result.name_ = value;
+          }
+        }
+        public Builder ClearName() {
+          result.hasName = false;
+          result.name_ = "";
+          return this;
+        }
+        
+        // optional string input_type = 2;
+        public boolean HasInputType {
+          get { return result.HasInputType; }
+        }
+        public string InputType {
+          get { return result.InputType; }
+          set {
+            result.hasInputType = true;
+            result.inputType_ = value;
+          }
+        }
+        public Builder ClearInputType() {
+          result.hasInputType = false;
+          result.inputType_ = "";
+          return this;
+        }
+        
+        // optional string output_type = 3;
+        public boolean HasOutputType {
+          get { return result.HasOutputType; }
+        }
+        public string OutputType {
+          get { return result.OutputType; }
+          set {
+            result.hasOutputType = true;
+            result.outputType_ = value;
+          }
+        }
+        public Builder ClearOutputType() {
+          result.hasOutputType = false;
+          result.outputType_ = "";
+          return this;
+        }
+        
+        // optional .google.protobuf.MethodOptions options = 4;
+        public boolean hasOptions() {
+          return result.hasOptions();
+        }
+        public Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodOptions getOptions() {
+          return result.getOptions();
+        }
+        public Builder setOptions(Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodOptions value) {
+          result.hasOptions = true;
+          result.options_ = value;
+          return this;
+        }
+        public Builder setOptions(Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodOptions.Builder builderForValue) {
+          result.hasOptions = true;
+          result.options_ = builderForValue.build();
+          return this;
+        }
+        public Builder mergeOptions(Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodOptions value) {
+          if (result.hasOptions() &&
+              result.options_ != Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodOptions.getDefaultInstance()) {
+            result.options_ =
+              Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodOptions.newBuilder(result.options_).mergeFrom(value).buildPartial();
+          } else {
+            result.options_ = value;
+          }
+          result.hasOptions = true;
+          return this;
+        }
+        public Builder clearOptions() {
+          result.hasOptions = false;
+          result.options_ = Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodOptions.getDefaultInstance();
+          return this;
+        }
+      }
+    }
+    
+    public sealed class FileOptions : pb::GeneratedMessage {
+      // Use FileOptions.newBuilder() to construct.
+      private FileOptions() {}
+      
+      private static readonly FileOptions defaultInstance = new FileOptions();
+      public static FileOptions DefaultInstance {
+        get { return defaultInstance; }
+      }
+      
+      public FileOptions DefaultInstanceForType {
+        get { return defaultInstance; }
+      }
+      
+      public static pb::Descriptors.Descriptor Descriptor {
+        get { return Google.ProtocolBuffers.DescriptorProtos.Descriptor.internal_static_google_protobuf_FileOptions_descriptor; }
+      }
+      
+      protected pb::GeneratedMessage.FieldAccessorTable InternalGetFieldAccessorTable {
+        get { return Google.ProtocolBuffers.DescriptorProtos.Descriptor.internal_static_google_protobuf_FileOptions_fieldAccessorTable; }
+      }
+      
+      public enum OptimizeMode {
+        [pb::DescriptorIndex(0)]
+        SPEED = 1,
+        [pb::DescriptorIndex(1)]
+        CODE_SIZE = 2,
+      }
+      
+      // optional string java_package = 1;
+      private bool hasJavaPackage;
+      private string javaPackage_ = "";
+      public boolean HasJavaPackage {
+        get { return hasJavaPackage; }
+      }
+      public string JavaPackage {
+        get { return javaPackage_; }
+      }
+      
+      // optional string java_outer_classname = 8;
+      private bool hasJavaOuterClassname;
+      private string javaOuterClassname_ = "";
+      public boolean HasJavaOuterClassname {
+        get { return hasJavaOuterClassname; }
+      }
+      public string JavaOuterClassname {
+        get { return javaOuterClassname_; }
+      }
+      
+      // optional bool java_multiple_files = 10 [default = false];
+      private bool hasJavaMultipleFiles;
+      private boolean javaMultipleFiles_ = false;
+      public boolean HasJavaMultipleFiles {
+        get { return hasJavaMultipleFiles; }
+      }
+      public boolean JavaMultipleFiles {
+        get { return javaMultipleFiles_; }
+      }
+      
+      // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = CODE_SIZE];
+      private boolean hasOptimizeFor;
+      private Google.ProtocolBuffers.DescriptorProtos.Descriptor.FileOptions.OptimizeMode optimizeFor_ = Google.ProtocolBuffers.DescriptorProtos.Descriptor.FileOptions.OptimizeMode.CODE_SIZE;
+      public boolean HasOptimizeFor() { return hasOptimizeFor; }
+      public Google.ProtocolBuffers.DescriptorProtos.Descriptor.FileOptions.OptimizeMode GetOptimizeFor() { return optimizeFor_; }
+      
+      // optional string csharp_namespace = 1000;
+      private bool hasCsharpNamespace;
+      private string csharpNamespace_ = "";
+      public boolean HasCsharpNamespace {
+        get { return hasCsharpNamespace; }
+      }
+      public string CsharpNamespace {
+        get { return csharpNamespace_; }
+      }
+      
+      // optional string csharp_file_classname = 1001;
+      private bool hasCsharpFileClassname;
+      private string csharpFileClassname_ = "";
+      public boolean HasCsharpFileClassname {
+        get { return hasCsharpFileClassname; }
+      }
+      public string CsharpFileClassname {
+        get { return csharpFileClassname_; }
+      }
+      
+      // optional bool csharp_multiple_files = 1002 [default = false];
+      private bool hasCsharpMultipleFiles;
+      private boolean csharpMultipleFiles_ = false;
+      public boolean HasCsharpMultipleFiles {
+        get { return hasCsharpMultipleFiles; }
+      }
+      public boolean CsharpMultipleFiles {
+        get { return csharpMultipleFiles_; }
+      }
+      
+      // optional bool csharp_nest_classes = 1003 [default = false];
+      private bool hasCsharpNestClasses;
+      private boolean csharpNestClasses_ = false;
+      public boolean HasCsharpNestClasses {
+        get { return hasCsharpNestClasses; }
+      }
+      public boolean CsharpNestClasses {
+        get { return csharpNestClasses_; }
+      }
+      
+      // optional bool csharp_public_classes = 1004 [default = true];
+      private bool hasCsharpPublicClasses;
+      private boolean csharpPublicClasses_ = true;
+      public boolean HasCsharpPublicClasses {
+        get { return hasCsharpPublicClasses; }
+      }
+      public boolean CsharpPublicClasses {
+        get { return csharpPublicClasses_; }
+      }
+      
+      public final boolean isInitialized() {
+        return true;
+      }
+      
+      public void writeTo(pb::CodedOutputStream output) {
+        if (hasJavaPackage()) {
+          output.writeString(1, getJavaPackage());
+        }
+        if (hasJavaOuterClassname()) {
+          output.writeString(8, getJavaOuterClassname());
+        }
+        if (hasOptimizeFor()) {
+          output.writeEnum(9, getOptimizeFor().getNumber());
+        }
+        if (hasJavaMultipleFiles()) {
+          output.writeBool(10, getJavaMultipleFiles());
+        }
+        if (hasCsharpNamespace()) {
+          output.writeString(1000, getCsharpNamespace());
+        }
+        if (hasCsharpFileClassname()) {
+          output.writeString(1001, getCsharpFileClassname());
+        }
+        if (hasCsharpMultipleFiles()) {
+          output.writeBool(1002, getCsharpMultipleFiles());
+        }
+        if (hasCsharpNestClasses()) {
+          output.writeBool(1003, getCsharpNestClasses());
+        }
+        if (hasCsharpPublicClasses()) {
+          output.writeBool(1004, getCsharpPublicClasses());
+        }
+        UnknownFields.WriteTo(output);
+      }
+      
+      private int memoizedSerializedSize = -1;
+      public int SerializedSize {
+        get {
+          int size = memoizedSerializedSize;
+          if (size != -1) return size;
+          
+          size = 0;
+          if (hasJavaPackage()) {
+            size += pb::CodedOutputStream
+              .computeStringSize(1, getJavaPackage());
+          }
+          if (hasJavaOuterClassname()) {
+            size += pb::CodedOutputStream
+              .computeStringSize(8, getJavaOuterClassname());
+          }
+          if (hasOptimizeFor()) {
+            size += pb::CodedOutputStream
+              .computeEnumSize(9, getOptimizeFor().getNumber());
+          }
+          if (hasJavaMultipleFiles()) {
+            size += pb::CodedOutputStream
+              .computeBoolSize(10, getJavaMultipleFiles());
+          }
+          if (hasCsharpNamespace()) {
+            size += pb::CodedOutputStream
+              .computeStringSize(1000, getCsharpNamespace());
+          }
+          if (hasCsharpFileClassname()) {
+            size += pb::CodedOutputStream
+              .computeStringSize(1001, getCsharpFileClassname());
+          }
+          if (hasCsharpMultipleFiles()) {
+            size += pb::CodedOutputStream
+              .computeBoolSize(1002, getCsharpMultipleFiles());
+          }
+          if (hasCsharpNestClasses()) {
+            size += pb::CodedOutputStream
+              .computeBoolSize(1003, getCsharpNestClasses());
+          }
+          if (hasCsharpPublicClasses()) {
+            size += pb::CodedOutputStream
+              .computeBoolSize(1004, getCsharpPublicClasses());
+          }
+          size += UnknownFieldsSerializedSize;
+          memoizedSerializedSize = size;
+          return size;
+        }
+      }
+      
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.FileOptions parseFrom(pb::ByteString data) {
+        return newBuilder().mergeFrom(data).buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.FileOptions parseFrom(pb::ByteString data,
+          pb::ExtensionRegistry extensionRegistry) {
+        return newBuilder().mergeFrom(data, extensionRegistry)
+                 .buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.FileOptions parseFrom(byte[] data) {
+        return newBuilder().mergeFrom(data).buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.FileOptions parseFrom(byte[] data,
+          pb::ExtensionRegistry extensionRegistry) {
+        return newBuilder().mergeFrom(data, extensionRegistry)
+                 .buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.FileOptions parseFrom(global::System.IO.Stream input) {
+        return newBuilder().mergeFrom(input).buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.FileOptions parseFrom(
+          global::System.IO.Stream input,
+          pb::ExtensionRegistry extensionRegistry) {
+        return newBuilder().mergeFrom(input, extensionRegistry)
+                 .buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.FileOptions parseFrom(pb::CodedInputStream input) {
+        return newBuilder().mergeFrom(input).buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.FileOptions parseFrom(pb::CodedInputStream input,
+          pb::ExtensionRegistry extensionRegistry) {
+        return newBuilder().mergeFrom(input, extensionRegistry)
+                 .buildParsed();
+      }
+      
+      public static Builder newBuilder() { return new Builder(); }
+      public Builder newBuilderForType() { return new Builder(); }
+      public static Builder newBuilder(Google.ProtocolBuffers.DescriptorProtos.Descriptor.FileOptions prototype) {
+        return new Builder().mergeFrom(prototype);
+      }
+      
+      public sealed class Builder : pb::GeneratedMessage.Builder<Builder> {
+        // Construct using Google.ProtocolBuffers.DescriptorProtos.Descriptor.FileOptions.newBuilder()
+        private Builder() {}
+        
+        Google.ProtocolBuffers.DescriptorProtos.Descriptor.FileOptions result = new Google.ProtocolBuffers.DescriptorProtos.Descriptor.FileOptions();
+        
+        protected Google.ProtocolBuffers.DescriptorProtos.Descriptor.FileOptions internalGetResult() {
+          return result;
+        }
+        
+        public Builder clear() {
+          result = new Google.ProtocolBuffers.DescriptorProtos.Descriptor.FileOptions();
+          return this;
+        }
+        
+        public Builder clone() {
+          return new Builder().mergeFrom(result);
+        }
+        
+        public pb::Descriptors.Descriptor
+            getDescriptorForType() {
+          return Google.ProtocolBuffers.DescriptorProtos.Descriptor.FileOptions.getDescriptor();
+        }
+        
+        public Google.ProtocolBuffers.DescriptorProtos.Descriptor.FileOptions getDefaultInstanceForType() {
+          return Google.ProtocolBuffers.DescriptorProtos.Descriptor.FileOptions.getDefaultInstance();
+        }
+        
+        public Google.ProtocolBuffers.DescriptorProtos.Descriptor.FileOptions build() {
+          if (!isInitialized()) {
+            throw new pb::UninitializedMessageException(
+              result);
+          }
+          return buildPartial();
+        }
+        
+        private Google.ProtocolBuffers.DescriptorProtos.Descriptor.FileOptions buildParsed() {
+          if (!isInitialized()) {
+            throw new pb::UninitializedMessageException(
+              result).asInvalidProtocolBufferException();
+          }
+          return buildPartial();
+        }
+        
+        public Google.ProtocolBuffers.DescriptorProtos.Descriptor.FileOptions buildPartial() {
+          Google.ProtocolBuffers.DescriptorProtos.Descriptor.FileOptions returnMe = result;
+          result = null;
+          return returnMe;
+        }
+        
+        public Builder mergeFrom(pb::Message other) {
+          if (other instanceof Google.ProtocolBuffers.DescriptorProtos.Descriptor.FileOptions) {
+            return mergeFrom((Google.ProtocolBuffers.DescriptorProtos.Descriptor.FileOptions)other);
+          } else {
+            super.mergeFrom(other);
+            return this;
+          }
+        }
+        
+        public Builder mergeFrom(Google.ProtocolBuffers.DescriptorProtos.Descriptor.FileOptions other) {
+          if (other == Google.ProtocolBuffers.DescriptorProtos.Descriptor.FileOptions.getDefaultInstance()) return this;
+          if (other.hasJavaPackage()) {
+            setJavaPackage(other.getJavaPackage());
+          }
+          if (other.hasJavaOuterClassname()) {
+            setJavaOuterClassname(other.getJavaOuterClassname());
+          }
+          if (other.hasJavaMultipleFiles()) {
+            setJavaMultipleFiles(other.getJavaMultipleFiles());
+          }
+          if (other.hasOptimizeFor()) {
+            setOptimizeFor(other.getOptimizeFor());
+          }
+          if (other.hasCsharpNamespace()) {
+            setCsharpNamespace(other.getCsharpNamespace());
+          }
+          if (other.hasCsharpFileClassname()) {
+            setCsharpFileClassname(other.getCsharpFileClassname());
+          }
+          if (other.hasCsharpMultipleFiles()) {
+            setCsharpMultipleFiles(other.getCsharpMultipleFiles());
+          }
+          if (other.hasCsharpNestClasses()) {
+            setCsharpNestClasses(other.getCsharpNestClasses());
+          }
+          if (other.hasCsharpPublicClasses()) {
+            setCsharpPublicClasses(other.getCsharpPublicClasses());
+          }
+          this.mergeUnknownFields(other.getUnknownFields());
+          return this;
+        }
+        
+        public Builder mergeFrom(
+            pb::CodedInputStream input) {
+          return mergeFrom(input,
+            pb::ExtensionRegistry.getEmptyRegistry());
+        }
+        
+        public Builder mergeFrom(
+            pb::CodedInputStream input,
+            pb::ExtensionRegistry extensionRegistry) {
+          pb::UnknownFieldSet.Builder unknownFields =
+            pb::UnknownFieldSet.newBuilder(
+              this.getUnknownFields());
+          while (true) {
+            int tag = input.readTag();
+            switch (tag) {
+              case 0:
+                this.setUnknownFields(unknownFields.build());
+                return this;
+              default: {
+                if (!parseUnknownField(input, unknownFields,
+                                       extensionRegistry, tag)) {
+                  this.setUnknownFields(unknownFields.build());
+                  return this;
+                }
+                break;
+              }
+              case 10: {
+                setJavaPackage(input.readString());
+                break;
+              }
+              case 66: {
+                setJavaOuterClassname(input.readString());
+                break;
+              }
+              case 72: {
+                int rawValue = input.readEnum();
+                Google.ProtocolBuffers.DescriptorProtos.Descriptor.FileOptions.OptimizeMode value = Google.ProtocolBuffers.DescriptorProtos.Descriptor.FileOptions.OptimizeMode.valueOf(rawValue);
+                if (value == null) {
+                  unknownFields.mergeVarintField(9, rawValue);
+                } else {
+                  setOptimizeFor(value);
+                }
+                break;
+              }
+              case 80: {
+                setJavaMultipleFiles(input.readBool());
+                break;
+              }
+              case 8002: {
+                setCsharpNamespace(input.readString());
+                break;
+              }
+              case 8010: {
+                setCsharpFileClassname(input.readString());
+                break;
+              }
+              case 8016: {
+                setCsharpMultipleFiles(input.readBool());
+                break;
+              }
+              case 8024: {
+                setCsharpNestClasses(input.readBool());
+                break;
+              }
+              case 8032: {
+                setCsharpPublicClasses(input.readBool());
+                break;
+              }
+            }
+          }
+        }
+        
+        
+        // optional string java_package = 1;
+        public boolean HasJavaPackage {
+          get { return result.HasJavaPackage; }
+        }
+        public string JavaPackage {
+          get { return result.JavaPackage; }
+          set {
+            result.hasJavaPackage = true;
+            result.javaPackage_ = value;
+          }
+        }
+        public Builder ClearJavaPackage() {
+          result.hasJavaPackage = false;
+          result.javaPackage_ = "";
+          return this;
+        }
+        
+        // optional string java_outer_classname = 8;
+        public boolean HasJavaOuterClassname {
+          get { return result.HasJavaOuterClassname; }
+        }
+        public string JavaOuterClassname {
+          get { return result.JavaOuterClassname; }
+          set {
+            result.hasJavaOuterClassname = true;
+            result.javaOuterClassname_ = value;
+          }
+        }
+        public Builder ClearJavaOuterClassname() {
+          result.hasJavaOuterClassname = false;
+          result.javaOuterClassname_ = "";
+          return this;
+        }
+        
+        // optional bool java_multiple_files = 10 [default = false];
+        public boolean HasJavaMultipleFiles {
+          get { return result.HasJavaMultipleFiles; }
+        }
+        public boolean JavaMultipleFiles {
+          get { return result.JavaMultipleFiles; }
+          set {
+            result.hasJavaMultipleFiles = true;
+            result.javaMultipleFiles_ = value;
+          }
+        }
+        public Builder ClearJavaMultipleFiles() {
+          result.hasJavaMultipleFiles = false;
+          result.javaMultipleFiles_ = false;
+          return this;
+        }
+        
+        // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = CODE_SIZE];
+        public boolean HasOptimizeFor() {
+          return result.HasOptimizeFor();
+        }
+        public Google.ProtocolBuffers.DescriptorProtos.Descriptor.FileOptions.OptimizeMode GetOptimizeFor() {
+          return result.GetOptimizeFor();
+        }
+        public Builder SetOptimizeFor(Google.ProtocolBuffers.DescriptorProtos.Descriptor.FileOptions.OptimizeMode value) {
+          result.hasOptimizeFor = true;
+          result.optimizeFor_ = value;
+          return this;
+        }
+        public Builder ClearOptimizeFor() {
+          result.hasOptimizeFor = false;
+          result.optimizeFor_ = Google.ProtocolBuffers.DescriptorProtos.Descriptor.FileOptions.OptimizeMode.CODE_SIZE;
+          return this;
+        }
+        
+        // optional string csharp_namespace = 1000;
+        public boolean HasCsharpNamespace {
+          get { return result.HasCsharpNamespace; }
+        }
+        public string CsharpNamespace {
+          get { return result.CsharpNamespace; }
+          set {
+            result.hasCsharpNamespace = true;
+            result.csharpNamespace_ = value;
+          }
+        }
+        public Builder ClearCsharpNamespace() {
+          result.hasCsharpNamespace = false;
+          result.csharpNamespace_ = "";
+          return this;
+        }
+        
+        // optional string csharp_file_classname = 1001;
+        public boolean HasCsharpFileClassname {
+          get { return result.HasCsharpFileClassname; }
+        }
+        public string CsharpFileClassname {
+          get { return result.CsharpFileClassname; }
+          set {
+            result.hasCsharpFileClassname = true;
+            result.csharpFileClassname_ = value;
+          }
+        }
+        public Builder ClearCsharpFileClassname() {
+          result.hasCsharpFileClassname = false;
+          result.csharpFileClassname_ = "";
+          return this;
+        }
+        
+        // optional bool csharp_multiple_files = 1002 [default = false];
+        public boolean HasCsharpMultipleFiles {
+          get { return result.HasCsharpMultipleFiles; }
+        }
+        public boolean CsharpMultipleFiles {
+          get { return result.CsharpMultipleFiles; }
+          set {
+            result.hasCsharpMultipleFiles = true;
+            result.csharpMultipleFiles_ = value;
+          }
+        }
+        public Builder ClearCsharpMultipleFiles() {
+          result.hasCsharpMultipleFiles = false;
+          result.csharpMultipleFiles_ = false;
+          return this;
+        }
+        
+        // optional bool csharp_nest_classes = 1003 [default = false];
+        public boolean HasCsharpNestClasses {
+          get { return result.HasCsharpNestClasses; }
+        }
+        public boolean CsharpNestClasses {
+          get { return result.CsharpNestClasses; }
+          set {
+            result.hasCsharpNestClasses = true;
+            result.csharpNestClasses_ = value;
+          }
+        }
+        public Builder ClearCsharpNestClasses() {
+          result.hasCsharpNestClasses = false;
+          result.csharpNestClasses_ = false;
+          return this;
+        }
+        
+        // optional bool csharp_public_classes = 1004 [default = true];
+        public boolean HasCsharpPublicClasses {
+          get { return result.HasCsharpPublicClasses; }
+        }
+        public boolean CsharpPublicClasses {
+          get { return result.CsharpPublicClasses; }
+          set {
+            result.hasCsharpPublicClasses = true;
+            result.csharpPublicClasses_ = value;
+          }
+        }
+        public Builder ClearCsharpPublicClasses() {
+          result.hasCsharpPublicClasses = false;
+          result.csharpPublicClasses_ = true;
+          return this;
+        }
+      }
+    }
+    
+    public sealed class MessageOptions : pb::GeneratedMessage {
+      // Use MessageOptions.newBuilder() to construct.
+      private MessageOptions() {}
+      
+      private static readonly MessageOptions defaultInstance = new MessageOptions();
+      public static MessageOptions DefaultInstance {
+        get { return defaultInstance; }
+      }
+      
+      public MessageOptions DefaultInstanceForType {
+        get { return defaultInstance; }
+      }
+      
+      public static pb::Descriptors.Descriptor Descriptor {
+        get { return Google.ProtocolBuffers.DescriptorProtos.Descriptor.internal_static_google_protobuf_MessageOptions_descriptor; }
+      }
+      
+      protected pb::GeneratedMessage.FieldAccessorTable InternalGetFieldAccessorTable {
+        get { return Google.ProtocolBuffers.DescriptorProtos.Descriptor.internal_static_google_protobuf_MessageOptions_fieldAccessorTable; }
+      }
+      
+      // optional bool message_set_wire_format = 1 [default = false];
+      private bool hasMessageSetWireFormat;
+      private boolean messageSetWireFormat_ = false;
+      public boolean HasMessageSetWireFormat {
+        get { return hasMessageSetWireFormat; }
+      }
+      public boolean MessageSetWireFormat {
+        get { return messageSetWireFormat_; }
+      }
+      
+      public final boolean isInitialized() {
+        return true;
+      }
+      
+      public void writeTo(pb::CodedOutputStream output) {
+        if (hasMessageSetWireFormat()) {
+          output.writeBool(1, getMessageSetWireFormat());
+        }
+        UnknownFields.WriteTo(output);
+      }
+      
+      private int memoizedSerializedSize = -1;
+      public int SerializedSize {
+        get {
+          int size = memoizedSerializedSize;
+          if (size != -1) return size;
+          
+          size = 0;
+          if (hasMessageSetWireFormat()) {
+            size += pb::CodedOutputStream
+              .computeBoolSize(1, getMessageSetWireFormat());
+          }
+          size += UnknownFieldsSerializedSize;
+          memoizedSerializedSize = size;
+          return size;
+        }
+      }
+      
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.MessageOptions parseFrom(pb::ByteString data) {
+        return newBuilder().mergeFrom(data).buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.MessageOptions parseFrom(pb::ByteString data,
+          pb::ExtensionRegistry extensionRegistry) {
+        return newBuilder().mergeFrom(data, extensionRegistry)
+                 .buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.MessageOptions parseFrom(byte[] data) {
+        return newBuilder().mergeFrom(data).buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.MessageOptions parseFrom(byte[] data,
+          pb::ExtensionRegistry extensionRegistry) {
+        return newBuilder().mergeFrom(data, extensionRegistry)
+                 .buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.MessageOptions parseFrom(global::System.IO.Stream input) {
+        return newBuilder().mergeFrom(input).buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.MessageOptions parseFrom(
+          global::System.IO.Stream input,
+          pb::ExtensionRegistry extensionRegistry) {
+        return newBuilder().mergeFrom(input, extensionRegistry)
+                 .buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.MessageOptions parseFrom(pb::CodedInputStream input) {
+        return newBuilder().mergeFrom(input).buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.MessageOptions parseFrom(pb::CodedInputStream input,
+          pb::ExtensionRegistry extensionRegistry) {
+        return newBuilder().mergeFrom(input, extensionRegistry)
+                 .buildParsed();
+      }
+      
+      public static Builder newBuilder() { return new Builder(); }
+      public Builder newBuilderForType() { return new Builder(); }
+      public static Builder newBuilder(Google.ProtocolBuffers.DescriptorProtos.Descriptor.MessageOptions prototype) {
+        return new Builder().mergeFrom(prototype);
+      }
+      
+      public sealed class Builder : pb::GeneratedMessage.Builder<Builder> {
+        // Construct using Google.ProtocolBuffers.DescriptorProtos.Descriptor.MessageOptions.newBuilder()
+        private Builder() {}
+        
+        Google.ProtocolBuffers.DescriptorProtos.Descriptor.MessageOptions result = new Google.ProtocolBuffers.DescriptorProtos.Descriptor.MessageOptions();
+        
+        protected Google.ProtocolBuffers.DescriptorProtos.Descriptor.MessageOptions internalGetResult() {
+          return result;
+        }
+        
+        public Builder clear() {
+          result = new Google.ProtocolBuffers.DescriptorProtos.Descriptor.MessageOptions();
+          return this;
+        }
+        
+        public Builder clone() {
+          return new Builder().mergeFrom(result);
+        }
+        
+        public pb::Descriptors.Descriptor
+            getDescriptorForType() {
+          return Google.ProtocolBuffers.DescriptorProtos.Descriptor.MessageOptions.getDescriptor();
+        }
+        
+        public Google.ProtocolBuffers.DescriptorProtos.Descriptor.MessageOptions getDefaultInstanceForType() {
+          return Google.ProtocolBuffers.DescriptorProtos.Descriptor.MessageOptions.getDefaultInstance();
+        }
+        
+        public Google.ProtocolBuffers.DescriptorProtos.Descriptor.MessageOptions build() {
+          if (!isInitialized()) {
+            throw new pb::UninitializedMessageException(
+              result);
+          }
+          return buildPartial();
+        }
+        
+        private Google.ProtocolBuffers.DescriptorProtos.Descriptor.MessageOptions buildParsed() {
+          if (!isInitialized()) {
+            throw new pb::UninitializedMessageException(
+              result).asInvalidProtocolBufferException();
+          }
+          return buildPartial();
+        }
+        
+        public Google.ProtocolBuffers.DescriptorProtos.Descriptor.MessageOptions buildPartial() {
+          Google.ProtocolBuffers.DescriptorProtos.Descriptor.MessageOptions returnMe = result;
+          result = null;
+          return returnMe;
+        }
+        
+        public Builder mergeFrom(pb::Message other) {
+          if (other instanceof Google.ProtocolBuffers.DescriptorProtos.Descriptor.MessageOptions) {
+            return mergeFrom((Google.ProtocolBuffers.DescriptorProtos.Descriptor.MessageOptions)other);
+          } else {
+            super.mergeFrom(other);
+            return this;
+          }
+        }
+        
+        public Builder mergeFrom(Google.ProtocolBuffers.DescriptorProtos.Descriptor.MessageOptions other) {
+          if (other == Google.ProtocolBuffers.DescriptorProtos.Descriptor.MessageOptions.getDefaultInstance()) return this;
+          if (other.hasMessageSetWireFormat()) {
+            setMessageSetWireFormat(other.getMessageSetWireFormat());
+          }
+          this.mergeUnknownFields(other.getUnknownFields());
+          return this;
+        }
+        
+        public Builder mergeFrom(
+            pb::CodedInputStream input) {
+          return mergeFrom(input,
+            pb::ExtensionRegistry.getEmptyRegistry());
+        }
+        
+        public Builder mergeFrom(
+            pb::CodedInputStream input,
+            pb::ExtensionRegistry extensionRegistry) {
+          pb::UnknownFieldSet.Builder unknownFields =
+            pb::UnknownFieldSet.newBuilder(
+              this.getUnknownFields());
+          while (true) {
+            int tag = input.readTag();
+            switch (tag) {
+              case 0:
+                this.setUnknownFields(unknownFields.build());
+                return this;
+              default: {
+                if (!parseUnknownField(input, unknownFields,
+                                       extensionRegistry, tag)) {
+                  this.setUnknownFields(unknownFields.build());
+                  return this;
+                }
+                break;
+              }
+              case 8: {
+                setMessageSetWireFormat(input.readBool());
+                break;
+              }
+            }
+          }
+        }
+        
+        
+        // optional bool message_set_wire_format = 1 [default = false];
+        public boolean HasMessageSetWireFormat {
+          get { return result.HasMessageSetWireFormat; }
+        }
+        public boolean MessageSetWireFormat {
+          get { return result.MessageSetWireFormat; }
+          set {
+            result.hasMessageSetWireFormat = true;
+            result.messageSetWireFormat_ = value;
+          }
+        }
+        public Builder ClearMessageSetWireFormat() {
+          result.hasMessageSetWireFormat = false;
+          result.messageSetWireFormat_ = false;
+          return this;
+        }
+      }
+    }
+    
+    public sealed class FieldOptions : pb::GeneratedMessage {
+      // Use FieldOptions.newBuilder() to construct.
+      private FieldOptions() {}
+      
+      private static readonly FieldOptions defaultInstance = new FieldOptions();
+      public static FieldOptions DefaultInstance {
+        get { return defaultInstance; }
+      }
+      
+      public FieldOptions DefaultInstanceForType {
+        get { return defaultInstance; }
+      }
+      
+      public static pb::Descriptors.Descriptor Descriptor {
+        get { return Google.ProtocolBuffers.DescriptorProtos.Descriptor.internal_static_google_protobuf_FieldOptions_descriptor; }
+      }
+      
+      protected pb::GeneratedMessage.FieldAccessorTable InternalGetFieldAccessorTable {
+        get { return Google.ProtocolBuffers.DescriptorProtos.Descriptor.internal_static_google_protobuf_FieldOptions_fieldAccessorTable; }
+      }
+      
+      public enum CType {
+        [pb::DescriptorIndex(0)]
+        CORD = 1,
+        [pb::DescriptorIndex(1)]
+        STRING_PIECE = 2,
+      }
+      
+      // optional .google.protobuf.FieldOptions.CType ctype = 1;
+      private boolean hasCtype;
+      private Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldOptions.CType ctype_ = Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldOptions.CType.CORD;
+      public boolean HasCtype() { return hasCtype; }
+      public Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldOptions.CType GetCtype() { return ctype_; }
+      
+      // optional string experimental_map_key = 9;
+      private bool hasExperimentalMapKey;
+      private string experimentalMapKey_ = "";
+      public boolean HasExperimentalMapKey {
+        get { return hasExperimentalMapKey; }
+      }
+      public string ExperimentalMapKey {
+        get { return experimentalMapKey_; }
+      }
+      
+      public final boolean isInitialized() {
+        return true;
+      }
+      
+      public void writeTo(pb::CodedOutputStream output) {
+        if (hasCtype()) {
+          output.writeEnum(1, getCtype().getNumber());
+        }
+        if (hasExperimentalMapKey()) {
+          output.writeString(9, getExperimentalMapKey());
+        }
+        UnknownFields.WriteTo(output);
+      }
+      
+      private int memoizedSerializedSize = -1;
+      public int SerializedSize {
+        get {
+          int size = memoizedSerializedSize;
+          if (size != -1) return size;
+          
+          size = 0;
+          if (hasCtype()) {
+            size += pb::CodedOutputStream
+              .computeEnumSize(1, getCtype().getNumber());
+          }
+          if (hasExperimentalMapKey()) {
+            size += pb::CodedOutputStream
+              .computeStringSize(9, getExperimentalMapKey());
+          }
+          size += UnknownFieldsSerializedSize;
+          memoizedSerializedSize = size;
+          return size;
+        }
+      }
+      
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldOptions parseFrom(pb::ByteString data) {
+        return newBuilder().mergeFrom(data).buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldOptions parseFrom(pb::ByteString data,
+          pb::ExtensionRegistry extensionRegistry) {
+        return newBuilder().mergeFrom(data, extensionRegistry)
+                 .buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldOptions parseFrom(byte[] data) {
+        return newBuilder().mergeFrom(data).buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldOptions parseFrom(byte[] data,
+          pb::ExtensionRegistry extensionRegistry) {
+        return newBuilder().mergeFrom(data, extensionRegistry)
+                 .buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldOptions parseFrom(global::System.IO.Stream input) {
+        return newBuilder().mergeFrom(input).buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldOptions parseFrom(
+          global::System.IO.Stream input,
+          pb::ExtensionRegistry extensionRegistry) {
+        return newBuilder().mergeFrom(input, extensionRegistry)
+                 .buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldOptions parseFrom(pb::CodedInputStream input) {
+        return newBuilder().mergeFrom(input).buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldOptions parseFrom(pb::CodedInputStream input,
+          pb::ExtensionRegistry extensionRegistry) {
+        return newBuilder().mergeFrom(input, extensionRegistry)
+                 .buildParsed();
+      }
+      
+      public static Builder newBuilder() { return new Builder(); }
+      public Builder newBuilderForType() { return new Builder(); }
+      public static Builder newBuilder(Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldOptions prototype) {
+        return new Builder().mergeFrom(prototype);
+      }
+      
+      public sealed class Builder : pb::GeneratedMessage.Builder<Builder> {
+        // Construct using Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldOptions.newBuilder()
+        private Builder() {}
+        
+        Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldOptions result = new Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldOptions();
+        
+        protected Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldOptions internalGetResult() {
+          return result;
+        }
+        
+        public Builder clear() {
+          result = new Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldOptions();
+          return this;
+        }
+        
+        public Builder clone() {
+          return new Builder().mergeFrom(result);
+        }
+        
+        public pb::Descriptors.Descriptor
+            getDescriptorForType() {
+          return Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldOptions.getDescriptor();
+        }
+        
+        public Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldOptions getDefaultInstanceForType() {
+          return Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldOptions.getDefaultInstance();
+        }
+        
+        public Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldOptions build() {
+          if (!isInitialized()) {
+            throw new pb::UninitializedMessageException(
+              result);
+          }
+          return buildPartial();
+        }
+        
+        private Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldOptions buildParsed() {
+          if (!isInitialized()) {
+            throw new pb::UninitializedMessageException(
+              result).asInvalidProtocolBufferException();
+          }
+          return buildPartial();
+        }
+        
+        public Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldOptions buildPartial() {
+          Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldOptions returnMe = result;
+          result = null;
+          return returnMe;
+        }
+        
+        public Builder mergeFrom(pb::Message other) {
+          if (other instanceof Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldOptions) {
+            return mergeFrom((Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldOptions)other);
+          } else {
+            super.mergeFrom(other);
+            return this;
+          }
+        }
+        
+        public Builder mergeFrom(Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldOptions other) {
+          if (other == Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldOptions.getDefaultInstance()) return this;
+          if (other.hasCtype()) {
+            setCtype(other.getCtype());
+          }
+          if (other.hasExperimentalMapKey()) {
+            setExperimentalMapKey(other.getExperimentalMapKey());
+          }
+          this.mergeUnknownFields(other.getUnknownFields());
+          return this;
+        }
+        
+        public Builder mergeFrom(
+            pb::CodedInputStream input) {
+          return mergeFrom(input,
+            pb::ExtensionRegistry.getEmptyRegistry());
+        }
+        
+        public Builder mergeFrom(
+            pb::CodedInputStream input,
+            pb::ExtensionRegistry extensionRegistry) {
+          pb::UnknownFieldSet.Builder unknownFields =
+            pb::UnknownFieldSet.newBuilder(
+              this.getUnknownFields());
+          while (true) {
+            int tag = input.readTag();
+            switch (tag) {
+              case 0:
+                this.setUnknownFields(unknownFields.build());
+                return this;
+              default: {
+                if (!parseUnknownField(input, unknownFields,
+                                       extensionRegistry, tag)) {
+                  this.setUnknownFields(unknownFields.build());
+                  return this;
+                }
+                break;
+              }
+              case 8: {
+                int rawValue = input.readEnum();
+                Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldOptions.CType value = Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldOptions.CType.valueOf(rawValue);
+                if (value == null) {
+                  unknownFields.mergeVarintField(1, rawValue);
+                } else {
+                  setCtype(value);
+                }
+                break;
+              }
+              case 74: {
+                setExperimentalMapKey(input.readString());
+                break;
+              }
+            }
+          }
+        }
+        
+        
+        // optional .google.protobuf.FieldOptions.CType ctype = 1;
+        public boolean HasCtype() {
+          return result.HasCtype();
+        }
+        public Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldOptions.CType GetCtype() {
+          return result.GetCtype();
+        }
+        public Builder SetCtype(Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldOptions.CType value) {
+          result.hasCtype = true;
+          result.ctype_ = value;
+          return this;
+        }
+        public Builder ClearCtype() {
+          result.hasCtype = false;
+          result.ctype_ = Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldOptions.CType.CORD;
+          return this;
+        }
+        
+        // optional string experimental_map_key = 9;
+        public boolean HasExperimentalMapKey {
+          get { return result.HasExperimentalMapKey; }
+        }
+        public string ExperimentalMapKey {
+          get { return result.ExperimentalMapKey; }
+          set {
+            result.hasExperimentalMapKey = true;
+            result.experimentalMapKey_ = value;
+          }
+        }
+        public Builder ClearExperimentalMapKey() {
+          result.hasExperimentalMapKey = false;
+          result.experimentalMapKey_ = "";
+          return this;
+        }
+      }
+    }
+    
+    public sealed class EnumOptions : pb::GeneratedMessage {
+      // Use EnumOptions.newBuilder() to construct.
+      private EnumOptions() {}
+      
+      private static readonly EnumOptions defaultInstance = new EnumOptions();
+      public static EnumOptions DefaultInstance {
+        get { return defaultInstance; }
+      }
+      
+      public EnumOptions DefaultInstanceForType {
+        get { return defaultInstance; }
+      }
+      
+      public static pb::Descriptors.Descriptor Descriptor {
+        get { return Google.ProtocolBuffers.DescriptorProtos.Descriptor.internal_static_google_protobuf_EnumOptions_descriptor; }
+      }
+      
+      protected pb::GeneratedMessage.FieldAccessorTable InternalGetFieldAccessorTable {
+        get { return Google.ProtocolBuffers.DescriptorProtos.Descriptor.internal_static_google_protobuf_EnumOptions_fieldAccessorTable; }
+      }
+      
+      public final boolean isInitialized() {
+        return true;
+      }
+      
+      public void writeTo(pb::CodedOutputStream output) {
+        UnknownFields.WriteTo(output);
+      }
+      
+      private int memoizedSerializedSize = -1;
+      public int SerializedSize {
+        get {
+          int size = memoizedSerializedSize;
+          if (size != -1) return size;
+          
+          size = 0;
+          size += UnknownFieldsSerializedSize;
+          memoizedSerializedSize = size;
+          return size;
+        }
+      }
+      
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumOptions parseFrom(pb::ByteString data) {
+        return newBuilder().mergeFrom(data).buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumOptions parseFrom(pb::ByteString data,
+          pb::ExtensionRegistry extensionRegistry) {
+        return newBuilder().mergeFrom(data, extensionRegistry)
+                 .buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumOptions parseFrom(byte[] data) {
+        return newBuilder().mergeFrom(data).buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumOptions parseFrom(byte[] data,
+          pb::ExtensionRegistry extensionRegistry) {
+        return newBuilder().mergeFrom(data, extensionRegistry)
+                 .buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumOptions parseFrom(global::System.IO.Stream input) {
+        return newBuilder().mergeFrom(input).buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumOptions parseFrom(
+          global::System.IO.Stream input,
+          pb::ExtensionRegistry extensionRegistry) {
+        return newBuilder().mergeFrom(input, extensionRegistry)
+                 .buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumOptions parseFrom(pb::CodedInputStream input) {
+        return newBuilder().mergeFrom(input).buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumOptions parseFrom(pb::CodedInputStream input,
+          pb::ExtensionRegistry extensionRegistry) {
+        return newBuilder().mergeFrom(input, extensionRegistry)
+                 .buildParsed();
+      }
+      
+      public static Builder newBuilder() { return new Builder(); }
+      public Builder newBuilderForType() { return new Builder(); }
+      public static Builder newBuilder(Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumOptions prototype) {
+        return new Builder().mergeFrom(prototype);
+      }
+      
+      public sealed class Builder : pb::GeneratedMessage.Builder<Builder> {
+        // Construct using Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumOptions.newBuilder()
+        private Builder() {}
+        
+        Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumOptions result = new Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumOptions();
+        
+        protected Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumOptions internalGetResult() {
+          return result;
+        }
+        
+        public Builder clear() {
+          result = new Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumOptions();
+          return this;
+        }
+        
+        public Builder clone() {
+          return new Builder().mergeFrom(result);
+        }
+        
+        public pb::Descriptors.Descriptor
+            getDescriptorForType() {
+          return Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumOptions.getDescriptor();
+        }
+        
+        public Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumOptions getDefaultInstanceForType() {
+          return Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumOptions.getDefaultInstance();
+        }
+        
+        public Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumOptions build() {
+          if (!isInitialized()) {
+            throw new pb::UninitializedMessageException(
+              result);
+          }
+          return buildPartial();
+        }
+        
+        private Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumOptions buildParsed() {
+          if (!isInitialized()) {
+            throw new pb::UninitializedMessageException(
+              result).asInvalidProtocolBufferException();
+          }
+          return buildPartial();
+        }
+        
+        public Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumOptions buildPartial() {
+          Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumOptions returnMe = result;
+          result = null;
+          return returnMe;
+        }
+        
+        public Builder mergeFrom(pb::Message other) {
+          if (other instanceof Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumOptions) {
+            return mergeFrom((Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumOptions)other);
+          } else {
+            super.mergeFrom(other);
+            return this;
+          }
+        }
+        
+        public Builder mergeFrom(Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumOptions other) {
+          if (other == Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumOptions.getDefaultInstance()) return this;
+          this.mergeUnknownFields(other.getUnknownFields());
+          return this;
+        }
+        
+        public Builder mergeFrom(
+            pb::CodedInputStream input) {
+          return mergeFrom(input,
+            pb::ExtensionRegistry.getEmptyRegistry());
+        }
+        
+        public Builder mergeFrom(
+            pb::CodedInputStream input,
+            pb::ExtensionRegistry extensionRegistry) {
+          pb::UnknownFieldSet.Builder unknownFields =
+            pb::UnknownFieldSet.newBuilder(
+              this.getUnknownFields());
+          while (true) {
+            int tag = input.readTag();
+            switch (tag) {
+              case 0:
+                this.setUnknownFields(unknownFields.build());
+                return this;
+              default: {
+                if (!parseUnknownField(input, unknownFields,
+                                       extensionRegistry, tag)) {
+                  this.setUnknownFields(unknownFields.build());
+                  return this;
+                }
+                break;
+              }
+            }
+          }
+        }
+        
+      }
+    }
+    
+    public sealed class EnumValueOptions : pb::GeneratedMessage {
+      // Use EnumValueOptions.newBuilder() to construct.
+      private EnumValueOptions() {}
+      
+      private static readonly EnumValueOptions defaultInstance = new EnumValueOptions();
+      public static EnumValueOptions DefaultInstance {
+        get { return defaultInstance; }
+      }
+      
+      public EnumValueOptions DefaultInstanceForType {
+        get { return defaultInstance; }
+      }
+      
+      public static pb::Descriptors.Descriptor Descriptor {
+        get { return Google.ProtocolBuffers.DescriptorProtos.Descriptor.internal_static_google_protobuf_EnumValueOptions_descriptor; }
+      }
+      
+      protected pb::GeneratedMessage.FieldAccessorTable InternalGetFieldAccessorTable {
+        get { return Google.ProtocolBuffers.DescriptorProtos.Descriptor.internal_static_google_protobuf_EnumValueOptions_fieldAccessorTable; }
+      }
+      
+      public final boolean isInitialized() {
+        return true;
+      }
+      
+      public void writeTo(pb::CodedOutputStream output) {
+        UnknownFields.WriteTo(output);
+      }
+      
+      private int memoizedSerializedSize = -1;
+      public int SerializedSize {
+        get {
+          int size = memoizedSerializedSize;
+          if (size != -1) return size;
+          
+          size = 0;
+          size += UnknownFieldsSerializedSize;
+          memoizedSerializedSize = size;
+          return size;
+        }
+      }
+      
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueOptions parseFrom(pb::ByteString data) {
+        return newBuilder().mergeFrom(data).buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueOptions parseFrom(pb::ByteString data,
+          pb::ExtensionRegistry extensionRegistry) {
+        return newBuilder().mergeFrom(data, extensionRegistry)
+                 .buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueOptions parseFrom(byte[] data) {
+        return newBuilder().mergeFrom(data).buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueOptions parseFrom(byte[] data,
+          pb::ExtensionRegistry extensionRegistry) {
+        return newBuilder().mergeFrom(data, extensionRegistry)
+                 .buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueOptions parseFrom(global::System.IO.Stream input) {
+        return newBuilder().mergeFrom(input).buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueOptions parseFrom(
+          global::System.IO.Stream input,
+          pb::ExtensionRegistry extensionRegistry) {
+        return newBuilder().mergeFrom(input, extensionRegistry)
+                 .buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueOptions parseFrom(pb::CodedInputStream input) {
+        return newBuilder().mergeFrom(input).buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueOptions parseFrom(pb::CodedInputStream input,
+          pb::ExtensionRegistry extensionRegistry) {
+        return newBuilder().mergeFrom(input, extensionRegistry)
+                 .buildParsed();
+      }
+      
+      public static Builder newBuilder() { return new Builder(); }
+      public Builder newBuilderForType() { return new Builder(); }
+      public static Builder newBuilder(Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueOptions prototype) {
+        return new Builder().mergeFrom(prototype);
+      }
+      
+      public sealed class Builder : pb::GeneratedMessage.Builder<Builder> {
+        // Construct using Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueOptions.newBuilder()
+        private Builder() {}
+        
+        Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueOptions result = new Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueOptions();
+        
+        protected Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueOptions internalGetResult() {
+          return result;
+        }
+        
+        public Builder clear() {
+          result = new Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueOptions();
+          return this;
+        }
+        
+        public Builder clone() {
+          return new Builder().mergeFrom(result);
+        }
+        
+        public pb::Descriptors.Descriptor
+            getDescriptorForType() {
+          return Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueOptions.getDescriptor();
+        }
+        
+        public Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueOptions getDefaultInstanceForType() {
+          return Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueOptions.getDefaultInstance();
+        }
+        
+        public Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueOptions build() {
+          if (!isInitialized()) {
+            throw new pb::UninitializedMessageException(
+              result);
+          }
+          return buildPartial();
+        }
+        
+        private Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueOptions buildParsed() {
+          if (!isInitialized()) {
+            throw new pb::UninitializedMessageException(
+              result).asInvalidProtocolBufferException();
+          }
+          return buildPartial();
+        }
+        
+        public Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueOptions buildPartial() {
+          Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueOptions returnMe = result;
+          result = null;
+          return returnMe;
+        }
+        
+        public Builder mergeFrom(pb::Message other) {
+          if (other instanceof Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueOptions) {
+            return mergeFrom((Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueOptions)other);
+          } else {
+            super.mergeFrom(other);
+            return this;
+          }
+        }
+        
+        public Builder mergeFrom(Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueOptions other) {
+          if (other == Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueOptions.getDefaultInstance()) return this;
+          this.mergeUnknownFields(other.getUnknownFields());
+          return this;
+        }
+        
+        public Builder mergeFrom(
+            pb::CodedInputStream input) {
+          return mergeFrom(input,
+            pb::ExtensionRegistry.getEmptyRegistry());
+        }
+        
+        public Builder mergeFrom(
+            pb::CodedInputStream input,
+            pb::ExtensionRegistry extensionRegistry) {
+          pb::UnknownFieldSet.Builder unknownFields =
+            pb::UnknownFieldSet.newBuilder(
+              this.getUnknownFields());
+          while (true) {
+            int tag = input.readTag();
+            switch (tag) {
+              case 0:
+                this.setUnknownFields(unknownFields.build());
+                return this;
+              default: {
+                if (!parseUnknownField(input, unknownFields,
+                                       extensionRegistry, tag)) {
+                  this.setUnknownFields(unknownFields.build());
+                  return this;
+                }
+                break;
+              }
+            }
+          }
+        }
+        
+      }
+    }
+    
+    public sealed class ServiceOptions : pb::GeneratedMessage {
+      // Use ServiceOptions.newBuilder() to construct.
+      private ServiceOptions() {}
+      
+      private static readonly ServiceOptions defaultInstance = new ServiceOptions();
+      public static ServiceOptions DefaultInstance {
+        get { return defaultInstance; }
+      }
+      
+      public ServiceOptions DefaultInstanceForType {
+        get { return defaultInstance; }
+      }
+      
+      public static pb::Descriptors.Descriptor Descriptor {
+        get { return Google.ProtocolBuffers.DescriptorProtos.Descriptor.internal_static_google_protobuf_ServiceOptions_descriptor; }
+      }
+      
+      protected pb::GeneratedMessage.FieldAccessorTable InternalGetFieldAccessorTable {
+        get { return Google.ProtocolBuffers.DescriptorProtos.Descriptor.internal_static_google_protobuf_ServiceOptions_fieldAccessorTable; }
+      }
+      
+      public final boolean isInitialized() {
+        return true;
+      }
+      
+      public void writeTo(pb::CodedOutputStream output) {
+        UnknownFields.WriteTo(output);
+      }
+      
+      private int memoizedSerializedSize = -1;
+      public int SerializedSize {
+        get {
+          int size = memoizedSerializedSize;
+          if (size != -1) return size;
+          
+          size = 0;
+          size += UnknownFieldsSerializedSize;
+          memoizedSerializedSize = size;
+          return size;
+        }
+      }
+      
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceOptions parseFrom(pb::ByteString data) {
+        return newBuilder().mergeFrom(data).buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceOptions parseFrom(pb::ByteString data,
+          pb::ExtensionRegistry extensionRegistry) {
+        return newBuilder().mergeFrom(data, extensionRegistry)
+                 .buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceOptions parseFrom(byte[] data) {
+        return newBuilder().mergeFrom(data).buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceOptions parseFrom(byte[] data,
+          pb::ExtensionRegistry extensionRegistry) {
+        return newBuilder().mergeFrom(data, extensionRegistry)
+                 .buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceOptions parseFrom(global::System.IO.Stream input) {
+        return newBuilder().mergeFrom(input).buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceOptions parseFrom(
+          global::System.IO.Stream input,
+          pb::ExtensionRegistry extensionRegistry) {
+        return newBuilder().mergeFrom(input, extensionRegistry)
+                 .buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceOptions parseFrom(pb::CodedInputStream input) {
+        return newBuilder().mergeFrom(input).buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceOptions parseFrom(pb::CodedInputStream input,
+          pb::ExtensionRegistry extensionRegistry) {
+        return newBuilder().mergeFrom(input, extensionRegistry)
+                 .buildParsed();
+      }
+      
+      public static Builder newBuilder() { return new Builder(); }
+      public Builder newBuilderForType() { return new Builder(); }
+      public static Builder newBuilder(Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceOptions prototype) {
+        return new Builder().mergeFrom(prototype);
+      }
+      
+      public sealed class Builder : pb::GeneratedMessage.Builder<Builder> {
+        // Construct using Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceOptions.newBuilder()
+        private Builder() {}
+        
+        Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceOptions result = new Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceOptions();
+        
+        protected Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceOptions internalGetResult() {
+          return result;
+        }
+        
+        public Builder clear() {
+          result = new Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceOptions();
+          return this;
+        }
+        
+        public Builder clone() {
+          return new Builder().mergeFrom(result);
+        }
+        
+        public pb::Descriptors.Descriptor
+            getDescriptorForType() {
+          return Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceOptions.getDescriptor();
+        }
+        
+        public Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceOptions getDefaultInstanceForType() {
+          return Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceOptions.getDefaultInstance();
+        }
+        
+        public Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceOptions build() {
+          if (!isInitialized()) {
+            throw new pb::UninitializedMessageException(
+              result);
+          }
+          return buildPartial();
+        }
+        
+        private Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceOptions buildParsed() {
+          if (!isInitialized()) {
+            throw new pb::UninitializedMessageException(
+              result).asInvalidProtocolBufferException();
+          }
+          return buildPartial();
+        }
+        
+        public Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceOptions buildPartial() {
+          Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceOptions returnMe = result;
+          result = null;
+          return returnMe;
+        }
+        
+        public Builder mergeFrom(pb::Message other) {
+          if (other instanceof Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceOptions) {
+            return mergeFrom((Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceOptions)other);
+          } else {
+            super.mergeFrom(other);
+            return this;
+          }
+        }
+        
+        public Builder mergeFrom(Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceOptions other) {
+          if (other == Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceOptions.getDefaultInstance()) return this;
+          this.mergeUnknownFields(other.getUnknownFields());
+          return this;
+        }
+        
+        public Builder mergeFrom(
+            pb::CodedInputStream input) {
+          return mergeFrom(input,
+            pb::ExtensionRegistry.getEmptyRegistry());
+        }
+        
+        public Builder mergeFrom(
+            pb::CodedInputStream input,
+            pb::ExtensionRegistry extensionRegistry) {
+          pb::UnknownFieldSet.Builder unknownFields =
+            pb::UnknownFieldSet.newBuilder(
+              this.getUnknownFields());
+          while (true) {
+            int tag = input.readTag();
+            switch (tag) {
+              case 0:
+                this.setUnknownFields(unknownFields.build());
+                return this;
+              default: {
+                if (!parseUnknownField(input, unknownFields,
+                                       extensionRegistry, tag)) {
+                  this.setUnknownFields(unknownFields.build());
+                  return this;
+                }
+                break;
+              }
+            }
+          }
+        }
+        
+      }
+    }
+    
+    public sealed class MethodOptions : pb::GeneratedMessage {
+      // Use MethodOptions.newBuilder() to construct.
+      private MethodOptions() {}
+      
+      private static readonly MethodOptions defaultInstance = new MethodOptions();
+      public static MethodOptions DefaultInstance {
+        get { return defaultInstance; }
+      }
+      
+      public MethodOptions DefaultInstanceForType {
+        get { return defaultInstance; }
+      }
+      
+      public static pb::Descriptors.Descriptor Descriptor {
+        get { return Google.ProtocolBuffers.DescriptorProtos.Descriptor.internal_static_google_protobuf_MethodOptions_descriptor; }
+      }
+      
+      protected pb::GeneratedMessage.FieldAccessorTable InternalGetFieldAccessorTable {
+        get { return Google.ProtocolBuffers.DescriptorProtos.Descriptor.internal_static_google_protobuf_MethodOptions_fieldAccessorTable; }
+      }
+      
+      public final boolean isInitialized() {
+        return true;
+      }
+      
+      public void writeTo(pb::CodedOutputStream output) {
+        UnknownFields.WriteTo(output);
+      }
+      
+      private int memoizedSerializedSize = -1;
+      public int SerializedSize {
+        get {
+          int size = memoizedSerializedSize;
+          if (size != -1) return size;
+          
+          size = 0;
+          size += UnknownFieldsSerializedSize;
+          memoizedSerializedSize = size;
+          return size;
+        }
+      }
+      
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodOptions parseFrom(pb::ByteString data) {
+        return newBuilder().mergeFrom(data).buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodOptions parseFrom(pb::ByteString data,
+          pb::ExtensionRegistry extensionRegistry) {
+        return newBuilder().mergeFrom(data, extensionRegistry)
+                 .buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodOptions parseFrom(byte[] data) {
+        return newBuilder().mergeFrom(data).buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodOptions parseFrom(byte[] data,
+          pb::ExtensionRegistry extensionRegistry) {
+        return newBuilder().mergeFrom(data, extensionRegistry)
+                 .buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodOptions parseFrom(global::System.IO.Stream input) {
+        return newBuilder().mergeFrom(input).buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodOptions parseFrom(
+          global::System.IO.Stream input,
+          pb::ExtensionRegistry extensionRegistry) {
+        return newBuilder().mergeFrom(input, extensionRegistry)
+                 .buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodOptions parseFrom(pb::CodedInputStream input) {
+        return newBuilder().mergeFrom(input).buildParsed();
+      }
+      public static Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodOptions parseFrom(pb::CodedInputStream input,
+          pb::ExtensionRegistry extensionRegistry) {
+        return newBuilder().mergeFrom(input, extensionRegistry)
+                 .buildParsed();
+      }
+      
+      public static Builder newBuilder() { return new Builder(); }
+      public Builder newBuilderForType() { return new Builder(); }
+      public static Builder newBuilder(Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodOptions prototype) {
+        return new Builder().mergeFrom(prototype);
+      }
+      
+      public sealed class Builder : pb::GeneratedMessage.Builder<Builder> {
+        // Construct using Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodOptions.newBuilder()
+        private Builder() {}
+        
+        Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodOptions result = new Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodOptions();
+        
+        protected Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodOptions internalGetResult() {
+          return result;
+        }
+        
+        public Builder clear() {
+          result = new Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodOptions();
+          return this;
+        }
+        
+        public Builder clone() {
+          return new Builder().mergeFrom(result);
+        }
+        
+        public pb::Descriptors.Descriptor
+            getDescriptorForType() {
+          return Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodOptions.getDescriptor();
+        }
+        
+        public Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodOptions getDefaultInstanceForType() {
+          return Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodOptions.getDefaultInstance();
+        }
+        
+        public Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodOptions build() {
+          if (!isInitialized()) {
+            throw new pb::UninitializedMessageException(
+              result);
+          }
+          return buildPartial();
+        }
+        
+        private Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodOptions buildParsed() {
+          if (!isInitialized()) {
+            throw new pb::UninitializedMessageException(
+              result).asInvalidProtocolBufferException();
+          }
+          return buildPartial();
+        }
+        
+        public Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodOptions buildPartial() {
+          Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodOptions returnMe = result;
+          result = null;
+          return returnMe;
+        }
+        
+        public Builder mergeFrom(pb::Message other) {
+          if (other instanceof Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodOptions) {
+            return mergeFrom((Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodOptions)other);
+          } else {
+            super.mergeFrom(other);
+            return this;
+          }
+        }
+        
+        public Builder mergeFrom(Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodOptions other) {
+          if (other == Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodOptions.getDefaultInstance()) return this;
+          this.mergeUnknownFields(other.getUnknownFields());
+          return this;
+        }
+        
+        public Builder mergeFrom(
+            pb::CodedInputStream input) {
+          return mergeFrom(input,
+            pb::ExtensionRegistry.getEmptyRegistry());
+        }
+        
+        public Builder mergeFrom(
+            pb::CodedInputStream input,
+            pb::ExtensionRegistry extensionRegistry) {
+          pb::UnknownFieldSet.Builder unknownFields =
+            pb::UnknownFieldSet.newBuilder(
+              this.getUnknownFields());
+          while (true) {
+            int tag = input.readTag();
+            switch (tag) {
+              case 0:
+                this.setUnknownFields(unknownFields.build());
+                return this;
+              default: {
+                if (!parseUnknownField(input, unknownFields,
+                                       extensionRegistry, tag)) {
+                  this.setUnknownFields(unknownFields.build());
+                  return this;
+                }
+                break;
+              }
+            }
+          }
+        }
+        
+      }
+    }
+    
+    private static readonly pb::Descriptors.Descriptor 
+      internal_static_google_protobuf_FileDescriptorProto_descriptor =
+        getDescriptor().getMessageTypes().get(0);
+    private static
+      pb::GeneratedMessage.FieldAccessorTable
+        internal_static_google_protobuf_FileDescriptorProto_fieldAccessorTable = new
+          pb::GeneratedMessage.FieldAccessorTable(
+            internal_static_google_protobuf_FileDescriptorProto_descriptor,
+            new string[] { "Name", "Package", "Dependency", "MessageType", "EnumType", "Service", "Extension", "Options", },
+            typeof (Google.ProtocolBuffers.DescriptorProtos.Descriptor.FileDescriptorProto),
+            typeof (Google.ProtocolBuffers.DescriptorProtos.Descriptor.FileDescriptorProto.Builder));
+    private static readonly pb::Descriptors.Descriptor 
+      internal_static_google_protobuf_DescriptorProto_descriptor =
+        getDescriptor().getMessageTypes().get(1);
+    private static
+      pb::GeneratedMessage.FieldAccessorTable
+        internal_static_google_protobuf_DescriptorProto_fieldAccessorTable = new
+          pb::GeneratedMessage.FieldAccessorTable(
+            internal_static_google_protobuf_DescriptorProto_descriptor,
+            new string[] { "Name", "Field", "Extension", "NestedType", "EnumType", "ExtensionRange", "Options", },
+            typeof (Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto),
+            typeof (Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.Builder));
+    private static readonly pb::Descriptors.Descriptor 
+      internal_static_google_protobuf_DescriptorProto_ExtensionRange_descriptor =
+        internal_static_google_protobuf_DescriptorProto_descriptor.getNestedTypes().get(0);
+    private static
+      pb::GeneratedMessage.FieldAccessorTable
+        internal_static_google_protobuf_DescriptorProto_ExtensionRange_fieldAccessorTable = new
+          pb::GeneratedMessage.FieldAccessorTable(
+            internal_static_google_protobuf_DescriptorProto_ExtensionRange_descriptor,
+            new string[] { "Start", "End", },
+            typeof (Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.ExtensionRange),
+            typeof (Google.ProtocolBuffers.DescriptorProtos.Descriptor.DescriptorProto.ExtensionRange.Builder));
+    private static readonly pb::Descriptors.Descriptor 
+      internal_static_google_protobuf_FieldDescriptorProto_descriptor =
+        getDescriptor().getMessageTypes().get(2);
+    private static
+      pb::GeneratedMessage.FieldAccessorTable
+        internal_static_google_protobuf_FieldDescriptorProto_fieldAccessorTable = new
+          pb::GeneratedMessage.FieldAccessorTable(
+            internal_static_google_protobuf_FieldDescriptorProto_descriptor,
+            new string[] { "Name", "Number", "Label", "Type", "TypeName", "Extendee", "DefaultValue", "Options", },
+            typeof (Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto),
+            typeof (Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldDescriptorProto.Builder));
+    private static readonly pb::Descriptors.Descriptor 
+      internal_static_google_protobuf_EnumDescriptorProto_descriptor =
+        getDescriptor().getMessageTypes().get(3);
+    private static
+      pb::GeneratedMessage.FieldAccessorTable
+        internal_static_google_protobuf_EnumDescriptorProto_fieldAccessorTable = new
+          pb::GeneratedMessage.FieldAccessorTable(
+            internal_static_google_protobuf_EnumDescriptorProto_descriptor,
+            new string[] { "Name", "Value", "Options", },
+            typeof (Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto),
+            typeof (Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumDescriptorProto.Builder));
+    private static readonly pb::Descriptors.Descriptor 
+      internal_static_google_protobuf_EnumValueDescriptorProto_descriptor =
+        getDescriptor().getMessageTypes().get(4);
+    private static
+      pb::GeneratedMessage.FieldAccessorTable
+        internal_static_google_protobuf_EnumValueDescriptorProto_fieldAccessorTable = new
+          pb::GeneratedMessage.FieldAccessorTable(
+            internal_static_google_protobuf_EnumValueDescriptorProto_descriptor,
+            new string[] { "Name", "Number", "Options", },
+            typeof (Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueDescriptorProto),
+            typeof (Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueDescriptorProto.Builder));
+    private static readonly pb::Descriptors.Descriptor 
+      internal_static_google_protobuf_ServiceDescriptorProto_descriptor =
+        getDescriptor().getMessageTypes().get(5);
+    private static
+      pb::GeneratedMessage.FieldAccessorTable
+        internal_static_google_protobuf_ServiceDescriptorProto_fieldAccessorTable = new
+          pb::GeneratedMessage.FieldAccessorTable(
+            internal_static_google_protobuf_ServiceDescriptorProto_descriptor,
+            new string[] { "Name", "Method", "Options", },
+            typeof (Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceDescriptorProto),
+            typeof (Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceDescriptorProto.Builder));
+    private static readonly pb::Descriptors.Descriptor 
+      internal_static_google_protobuf_MethodDescriptorProto_descriptor =
+        getDescriptor().getMessageTypes().get(6);
+    private static
+      pb::GeneratedMessage.FieldAccessorTable
+        internal_static_google_protobuf_MethodDescriptorProto_fieldAccessorTable = new
+          pb::GeneratedMessage.FieldAccessorTable(
+            internal_static_google_protobuf_MethodDescriptorProto_descriptor,
+            new string[] { "Name", "InputType", "OutputType", "Options", },
+            typeof (Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodDescriptorProto),
+            typeof (Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodDescriptorProto.Builder));
+    private static readonly pb::Descriptors.Descriptor 
+      internal_static_google_protobuf_FileOptions_descriptor =
+        getDescriptor().getMessageTypes().get(7);
+    private static
+      pb::GeneratedMessage.FieldAccessorTable
+        internal_static_google_protobuf_FileOptions_fieldAccessorTable = new
+          pb::GeneratedMessage.FieldAccessorTable(
+            internal_static_google_protobuf_FileOptions_descriptor,
+            new string[] { "JavaPackage", "JavaOuterClassname", "JavaMultipleFiles", "OptimizeFor", "CsharpNamespace", "CsharpFileClassname", "CsharpMultipleFiles", "CsharpNestClasses", "CsharpPublicClasses", },
+            typeof (Google.ProtocolBuffers.DescriptorProtos.Descriptor.FileOptions),
+            typeof (Google.ProtocolBuffers.DescriptorProtos.Descriptor.FileOptions.Builder));
+    private static readonly pb::Descriptors.Descriptor 
+      internal_static_google_protobuf_MessageOptions_descriptor =
+        getDescriptor().getMessageTypes().get(8);
+    private static
+      pb::GeneratedMessage.FieldAccessorTable
+        internal_static_google_protobuf_MessageOptions_fieldAccessorTable = new
+          pb::GeneratedMessage.FieldAccessorTable(
+            internal_static_google_protobuf_MessageOptions_descriptor,
+            new string[] { "MessageSetWireFormat", },
+            typeof (Google.ProtocolBuffers.DescriptorProtos.Descriptor.MessageOptions),
+            typeof (Google.ProtocolBuffers.DescriptorProtos.Descriptor.MessageOptions.Builder));
+    private static readonly pb::Descriptors.Descriptor 
+      internal_static_google_protobuf_FieldOptions_descriptor =
+        getDescriptor().getMessageTypes().get(9);
+    private static
+      pb::GeneratedMessage.FieldAccessorTable
+        internal_static_google_protobuf_FieldOptions_fieldAccessorTable = new
+          pb::GeneratedMessage.FieldAccessorTable(
+            internal_static_google_protobuf_FieldOptions_descriptor,
+            new string[] { "Ctype", "ExperimentalMapKey", },
+            typeof (Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldOptions),
+            typeof (Google.ProtocolBuffers.DescriptorProtos.Descriptor.FieldOptions.Builder));
+    private static readonly pb::Descriptors.Descriptor 
+      internal_static_google_protobuf_EnumOptions_descriptor =
+        getDescriptor().getMessageTypes().get(10);
+    private static
+      pb::GeneratedMessage.FieldAccessorTable
+        internal_static_google_protobuf_EnumOptions_fieldAccessorTable = new
+          pb::GeneratedMessage.FieldAccessorTable(
+            internal_static_google_protobuf_EnumOptions_descriptor,
+            new string[] { },
+            typeof (Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumOptions),
+            typeof (Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumOptions.Builder));
+    private static readonly pb::Descriptors.Descriptor 
+      internal_static_google_protobuf_EnumValueOptions_descriptor =
+        getDescriptor().getMessageTypes().get(11);
+    private static
+      pb::GeneratedMessage.FieldAccessorTable
+        internal_static_google_protobuf_EnumValueOptions_fieldAccessorTable = new
+          pb::GeneratedMessage.FieldAccessorTable(
+            internal_static_google_protobuf_EnumValueOptions_descriptor,
+            new string[] { },
+            typeof (Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueOptions),
+            typeof (Google.ProtocolBuffers.DescriptorProtos.Descriptor.EnumValueOptions.Builder));
+    private static readonly pb::Descriptors.Descriptor 
+      internal_static_google_protobuf_ServiceOptions_descriptor =
+        getDescriptor().getMessageTypes().get(12);
+    private static
+      pb::GeneratedMessage.FieldAccessorTable
+        internal_static_google_protobuf_ServiceOptions_fieldAccessorTable = new
+          pb::GeneratedMessage.FieldAccessorTable(
+            internal_static_google_protobuf_ServiceOptions_descriptor,
+            new string[] { },
+            typeof (Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceOptions),
+            typeof (Google.ProtocolBuffers.DescriptorProtos.Descriptor.ServiceOptions.Builder));
+    private static readonly pb::Descriptors.Descriptor 
+      internal_static_google_protobuf_MethodOptions_descriptor =
+        getDescriptor().getMessageTypes().get(13);
+    private static
+      pb::GeneratedMessage.FieldAccessorTable
+        internal_static_google_protobuf_MethodOptions_fieldAccessorTable = new
+          pb::GeneratedMessage.FieldAccessorTable(
+            internal_static_google_protobuf_MethodOptions_descriptor,
+            new string[] { },
+            typeof (Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodOptions),
+            typeof (Google.ProtocolBuffers.DescriptorProtos.Descriptor.MethodOptions.Builder));
+  }
+}

+ 5436 - 0
csharp/ProtocolBuffers/DescriptorProtos/DescriptorProtoFile.cs

@@ -0,0 +1,5436 @@
+// Generated by the protocol buffer compiler.  DO NOT EDIT!
+
+using pb = global::Google.ProtocolBuffers;
+using pbc = global::Google.ProtocolBuffers.Collections;
+using pbd = global::Google.ProtocolBuffers.Descriptors;
+using scg = global::System.Collections.Generic;
+using self = global::Google.ProtocolBuffers.DescriptorProtos;
+
+namespace Google.ProtocolBuffers.DescriptorProtos {
+  
+  public static partial class DescriptorProtoFile {
+  
+    #region Descriptor
+    public static pbd::FileDescriptor Descriptor {
+        get { return descriptor; }
+    }
+    private static readonly pbd::FileDescriptor descriptor = pbd::FileDescriptor.InternalBuildGeneratedFileFrom (
+        new byte[] {
+            0x0a, 0x24, 0x73, 0x72, 0x63, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 
+            0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 
+            0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x22, 0xdc, 0x02, 0x0a, 0x13, 
+            0x46, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 
+            0x0c, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x12, 0x0f, 0x0a, 0x07, 0x70, 0x61, 0x63, 
+            0x6b, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x12, 0x12, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 
+            0x65, 0x6e, 0x63, 0x79, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x12, 0x36, 0x0a, 0x0c, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 
+            0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 
+            0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 
+            0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x37, 0x0a, 0x09, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 
+            0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 
+            0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 
+            0x6f, 0x74, 0x6f, 0x12, 0x38, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 
+            0x32, 0x27, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 
+            0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 
+            0x6f, 0x12, 0x38, 0x0a, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 
+            0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 
+            0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 
+            0x2d, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 
+            0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4f, 
+            0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xa9, 0x03, 0x0a, 0x0f, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 
+            0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 
+            0x12, 0x34, 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 
+            0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44, 
+            0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x38, 0x0a, 0x09, 0x65, 0x78, 
+            0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 
+            0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x73, 
+            0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x35, 0x0a, 0x0b, 0x6e, 0x65, 0x73, 0x74, 
+            0x65, 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 
+            0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 
+            0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x37, 0x0a, 0x09, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x74, 0x79, 0x70, 0x65, 
+            0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 
+            0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 
+            0x72, 0x6f, 0x74, 0x6f, 0x12, 0x48, 0x0a, 0x0f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x61, 
+            0x6e, 0x67, 0x65, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 
+            0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 
+            0x6f, 0x74, 0x6f, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x30, 
+            0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x6f, 
+            0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 
+            0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x2c, 0x0a, 0x0e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 
+            0x6e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x0d, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 
+            0x05, 0x12, 0x0b, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x22, 0x94, 0x05, 0x0a, 0x14, 0x46, 
+            0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 
+            0x0c, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x12, 0x0e, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 
+            0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x12, 0x3a, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x04, 
+            0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 
+            0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 
+            0x6f, 0x74, 0x6f, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x38, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 
+            0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 
+            0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 
+            0x74, 0x6f, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x11, 0x0a, 0x09, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 
+            0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x12, 0x10, 0x0a, 0x08, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x65, 0x18, 0x02, 
+            0x20, 0x01, 0x28, 0x09, 0x12, 0x15, 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 
+            0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x12, 0x2e, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x08, 
+            0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 
+            0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xb6, 0x02, 0x0a, 0x04, 
+            0x54, 0x79, 0x70, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x44, 0x4f, 0x55, 0x42, 0x4c, 0x45, 0x10, 
+            0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x4c, 0x4f, 0x41, 0x54, 0x10, 0x02, 0x12, 0x0e, 0x0a, 
+            0x0a, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x49, 0x4e, 0x54, 0x36, 0x34, 0x10, 0x03, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 
+            0x45, 0x5f, 0x55, 0x49, 0x4e, 0x54, 0x36, 0x34, 0x10, 0x04, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x49, 
+            0x4e, 0x54, 0x33, 0x32, 0x10, 0x05, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x49, 0x58, 0x45, 0x44, 
+            0x36, 0x34, 0x10, 0x06, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x49, 0x58, 0x45, 0x44, 0x33, 0x32, 
+            0x10, 0x07, 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x42, 0x4f, 0x4f, 0x4c, 0x10, 0x08, 0x12, 0x0f, 0x0a, 
+            0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x09, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x59, 
+            0x50, 0x45, 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x10, 0x0a, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 
+            0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x10, 0x0b, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x42, 0x59, 0x54, 
+            0x45, 0x53, 0x10, 0x0c, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x49, 0x4e, 0x54, 0x33, 0x32, 0x10, 
+            0x0d, 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x10, 0x0e, 0x12, 0x11, 0x0a, 0x0d, 
+            0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x46, 0x49, 0x58, 0x45, 0x44, 0x33, 0x32, 0x10, 0x0f, 0x12, 0x11, 0x0a, 0x0d, 0x54, 
+            0x59, 0x50, 0x45, 0x5f, 0x53, 0x46, 0x49, 0x58, 0x45, 0x44, 0x36, 0x34, 0x10, 0x10, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 
+            0x50, 0x45, 0x5f, 0x53, 0x49, 0x4e, 0x54, 0x33, 0x32, 0x10, 0x11, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 
+            0x53, 0x49, 0x4e, 0x54, 0x36, 0x34, 0x10, 0x12, 0x22, 0x43, 0x0a, 0x05, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x12, 0x0a, 
+            0x0e, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x41, 0x4c, 0x10, 0x01, 0x12, 0x12, 0x0a, 
+            0x0e, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x49, 0x52, 0x45, 0x44, 0x10, 0x02, 0x12, 0x12, 0x0a, 
+            0x0e, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x5f, 0x52, 0x45, 0x50, 0x45, 0x41, 0x54, 0x45, 0x44, 0x10, 0x03, 0x22, 0x8c, 0x01, 
+            0x0a, 0x13, 0x45, 0x6e, 0x75, 0x6d, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 
+            0x6f, 0x12, 0x0c, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x12, 0x38, 0x0a, 0x05, 0x76, 
+            0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 
+            0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x44, 0x65, 
+            0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2d, 0x0a, 0x07, 0x6f, 0x70, 0x74, 
+            0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 
+            0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 
+            0x22, 0x6c, 0x0a, 0x18, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 
+            0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 
+            0x28, 0x09, 0x12, 0x0e, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x12, 0x32, 
+            0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x67, 0x6f, 
+            0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 
+            0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x90, 0x01, 0x0a, 0x16, 0x53, 0x65, 0x72, 0x76, 0x69, 
+            0x63, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x0a, 
+            0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x12, 0x36, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 
+            0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 
+            0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 
+            0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x30, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 
+            0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 
+            0x75, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x7f, 0x0a, 
+            0x15, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 
+            0x74, 0x6f, 0x12, 0x0c, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x12, 0x12, 0x0a, 0x0a, 
+            0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x12, 0x13, 0x0a, 0x0b, 
+            0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x12, 0x2f, 0x0a, 
+            0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 
+            0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 
+            0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x88, 0x03, 0x0a, 0x0b, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 
+            0x6e, 0x73, 0x12, 0x14, 0x0a, 0x0c, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x18, 0x01, 
+            0x20, 0x01, 0x28, 0x09, 0x12, 0x1c, 0x0a, 0x14, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x5f, 0x63, 
+            0x6c, 0x61, 0x73, 0x73, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x12, 0x22, 0x0a, 0x13, 0x6a, 0x61, 
+            0x76, 0x61, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x0a, 0x20, 
+            0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x12, 0x4a, 0x0a, 0x0c, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 
+            0x7a, 0x65, 0x5f, 0x66, 0x6f, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 
+            0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 
+            0x6e, 0x73, 0x2e, 0x4f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x3a, 0x09, 0x43, 0x4f, 0x44, 
+            0x45, 0x5f, 0x53, 0x49, 0x5a, 0x45, 0x12, 0x19, 0x0a, 0x10, 0x63, 0x73, 0x68, 0x61, 0x72, 0x70, 0x5f, 0x6e, 0x61, 0x6d, 
+            0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0xe8, 0x07, 0x20, 0x01, 0x28, 0x09, 0x12, 0x1e, 0x0a, 0x15, 0x63, 0x73, 0x68, 
+            0x61, 0x72, 0x70, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0xe9, 
+            0x07, 0x20, 0x01, 0x28, 0x09, 0x12, 0x25, 0x0a, 0x15, 0x63, 0x73, 0x68, 0x61, 0x72, 0x70, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 
+            0x69, 0x70, 0x6c, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0xea, 0x07, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 
+            0x61, 0x6c, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x13, 0x63, 0x73, 0x68, 0x61, 0x72, 0x70, 0x5f, 0x6e, 0x65, 0x73, 0x74, 0x5f, 
+            0x63, 0x6c, 0x61, 0x73, 0x73, 0x65, 0x73, 0x18, 0xeb, 0x07, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 
+            0x65, 0x12, 0x24, 0x0a, 0x15, 0x63, 0x73, 0x68, 0x61, 0x72, 0x70, 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x63, 
+            0x6c, 0x61, 0x73, 0x73, 0x65, 0x73, 0x18, 0xec, 0x07, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x04, 0x74, 0x72, 0x75, 0x65, 0x22, 
+            0x28, 0x0a, 0x0c, 0x4f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x53, 
+            0x50, 0x45, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x53, 0x49, 0x5a, 0x45, 0x10, 
+            0x02, 0x22, 0x38, 0x0a, 0x0e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 
+            0x26, 0x0a, 0x17, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x65, 0x74, 0x5f, 0x77, 0x69, 0x72, 0x65, 0x5f, 
+            0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x22, 
+            0x85, 0x01, 0x0a, 0x0c, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x32, 0x0a, 0x05, 
+            0x63, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 
+            0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 
+            0x6e, 0x73, 0x2e, 0x43, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x14, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 
+            0x6e, 0x74, 0x61, 0x6c, 0x5f, 0x6d, 0x61, 0x70, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x22, 0x23, 
+            0x0a, 0x05, 0x43, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x43, 0x4f, 0x52, 0x44, 0x10, 0x01, 0x12, 0x10, 0x0a, 
+            0x0c, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x50, 0x49, 0x45, 0x43, 0x45, 0x10, 0x02, 0x22, 0x0d, 0x0a, 0x0b, 0x45, 
+            0x6e, 0x75, 0x6d, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x12, 0x0a, 0x10, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 
+            0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x10, 0x0a, 0x0e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 
+            0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x0f, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 
+            0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x72, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 
+            0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x42, 0x10, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 
+            0x50, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x48, 0x01, 0xc2, 0x3e, 0x27, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x50, 0x72, 
+            0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x73, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 
+            0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0xca, 0x3e, 0x13, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 
+            0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x46, 0x69, 0x6c, 0x65, 0xd0, 0x3e, 0x00, 0xd8, 0x3e, 0x00, 0xe0, 0x3e, 
+            0x01, 
+        }, new pbd::FileDescriptor[] {
+        });
+    #endregion
+    
+    #region Extensions
+    #endregion
+    
+    #region Static variables
+    internal static readonly pbd::MessageDescriptor internal__static_google_protobuf_FileDescriptorProto__Descriptor 
+        = Descriptor.MessageTypes[0];
+    internal static pb::FieldAccess.FieldAccessorTable internal__static_google_protobuf_FileDescriptorProto__FieldAccessorTable
+        = new pb::FieldAccess.FieldAccessorTable(internal__static_google_protobuf_FileDescriptorProto__Descriptor,
+            new string[] { "Name", "Package", "Dependency", "MessageType", "EnumType", "Service", "Extension", "Options", },
+            typeof (self::FileDescriptorProto),
+            typeof (self::FileDescriptorProto.Builder));
+    internal static readonly pbd::MessageDescriptor internal__static_google_protobuf_DescriptorProto__Descriptor 
+        = Descriptor.MessageTypes[1];
+    internal static pb::FieldAccess.FieldAccessorTable internal__static_google_protobuf_DescriptorProto__FieldAccessorTable
+        = new pb::FieldAccess.FieldAccessorTable(internal__static_google_protobuf_DescriptorProto__Descriptor,
+            new string[] { "Name", "Field", "Extension", "NestedType", "EnumType", "ExtensionRange", "Options", },
+            typeof (self::DescriptorProto),
+            typeof (self::DescriptorProto.Builder));
+    internal static readonly pbd::MessageDescriptor  internal__static_google_protobuf_DescriptorProto_ExtensionRange__Descriptor 
+        = internal__static_google_protobuf_DescriptorProto__Descriptor.NestedTypes[0];
+    internal static pb::FieldAccess.FieldAccessorTable internal__static_google_protobuf_DescriptorProto_ExtensionRange__FieldAccessorTable
+        = new pb::FieldAccess.FieldAccessorTable(internal__static_google_protobuf_DescriptorProto_ExtensionRange__Descriptor,
+            new string[] { "Start", "End", },
+            typeof (self::DescriptorProto.Types.ExtensionRange),
+            typeof (self::DescriptorProto.Types.ExtensionRange.Builder));
+    internal static readonly pbd::MessageDescriptor internal__static_google_protobuf_FieldDescriptorProto__Descriptor 
+        = Descriptor.MessageTypes[2];
+    internal static pb::FieldAccess.FieldAccessorTable internal__static_google_protobuf_FieldDescriptorProto__FieldAccessorTable
+        = new pb::FieldAccess.FieldAccessorTable(internal__static_google_protobuf_FieldDescriptorProto__Descriptor,
+            new string[] { "Name", "Number", "Label", "Type", "TypeName", "Extendee", "DefaultValue", "Options", },
+            typeof (self::FieldDescriptorProto),
+            typeof (self::FieldDescriptorProto.Builder));
+    internal static readonly pbd::MessageDescriptor internal__static_google_protobuf_EnumDescriptorProto__Descriptor 
+        = Descriptor.MessageTypes[3];
+    internal static pb::FieldAccess.FieldAccessorTable internal__static_google_protobuf_EnumDescriptorProto__FieldAccessorTable
+        = new pb::FieldAccess.FieldAccessorTable(internal__static_google_protobuf_EnumDescriptorProto__Descriptor,
+            new string[] { "Name", "Value", "Options", },
+            typeof (self::EnumDescriptorProto),
+            typeof (self::EnumDescriptorProto.Builder));
+    internal static readonly pbd::MessageDescriptor internal__static_google_protobuf_EnumValueDescriptorProto__Descriptor 
+        = Descriptor.MessageTypes[4];
+    internal static pb::FieldAccess.FieldAccessorTable internal__static_google_protobuf_EnumValueDescriptorProto__FieldAccessorTable
+        = new pb::FieldAccess.FieldAccessorTable(internal__static_google_protobuf_EnumValueDescriptorProto__Descriptor,
+            new string[] { "Name", "Number", "Options", },
+            typeof (self::EnumValueDescriptorProto),
+            typeof (self::EnumValueDescriptorProto.Builder));
+    internal static readonly pbd::MessageDescriptor internal__static_google_protobuf_ServiceDescriptorProto__Descriptor 
+        = Descriptor.MessageTypes[5];
+    internal static pb::FieldAccess.FieldAccessorTable internal__static_google_protobuf_ServiceDescriptorProto__FieldAccessorTable
+        = new pb::FieldAccess.FieldAccessorTable(internal__static_google_protobuf_ServiceDescriptorProto__Descriptor,
+            new string[] { "Name", "Method", "Options", },
+            typeof (self::ServiceDescriptorProto),
+            typeof (self::ServiceDescriptorProto.Builder));
+    internal static readonly pbd::MessageDescriptor internal__static_google_protobuf_MethodDescriptorProto__Descriptor 
+        = Descriptor.MessageTypes[6];
+    internal static pb::FieldAccess.FieldAccessorTable internal__static_google_protobuf_MethodDescriptorProto__FieldAccessorTable
+        = new pb::FieldAccess.FieldAccessorTable(internal__static_google_protobuf_MethodDescriptorProto__Descriptor,
+            new string[] { "Name", "InputType", "OutputType", "Options", },
+            typeof (self::MethodDescriptorProto),
+            typeof (self::MethodDescriptorProto.Builder));
+    internal static readonly pbd::MessageDescriptor internal__static_google_protobuf_FileOptions__Descriptor 
+        = Descriptor.MessageTypes[7];
+    internal static pb::FieldAccess.FieldAccessorTable internal__static_google_protobuf_FileOptions__FieldAccessorTable
+        = new pb::FieldAccess.FieldAccessorTable(internal__static_google_protobuf_FileOptions__Descriptor,
+            new string[] { "JavaPackage", "JavaOuterClassname", "JavaMultipleFiles", "OptimizeFor", "CsharpNamespace", "CsharpFileClassname", "CsharpMultipleFiles", "CsharpNestClasses", "CsharpPublicClasses", },
+            typeof (self::FileOptions),
+            typeof (self::FileOptions.Builder));
+    internal static readonly pbd::MessageDescriptor internal__static_google_protobuf_MessageOptions__Descriptor 
+        = Descriptor.MessageTypes[8];
+    internal static pb::FieldAccess.FieldAccessorTable internal__static_google_protobuf_MessageOptions__FieldAccessorTable
+        = new pb::FieldAccess.FieldAccessorTable(internal__static_google_protobuf_MessageOptions__Descriptor,
+            new string[] { "MessageSetWireFormat", },
+            typeof (self::MessageOptions),
+            typeof (self::MessageOptions.Builder));
+    internal static readonly pbd::MessageDescriptor internal__static_google_protobuf_FieldOptions__Descriptor 
+        = Descriptor.MessageTypes[9];
+    internal static pb::FieldAccess.FieldAccessorTable internal__static_google_protobuf_FieldOptions__FieldAccessorTable
+        = new pb::FieldAccess.FieldAccessorTable(internal__static_google_protobuf_FieldOptions__Descriptor,
+            new string[] { "Ctype", "ExperimentalMapKey", },
+            typeof (self::FieldOptions),
+            typeof (self::FieldOptions.Builder));
+    internal static readonly pbd::MessageDescriptor internal__static_google_protobuf_EnumOptions__Descriptor 
+        = Descriptor.MessageTypes[10];
+    internal static pb::FieldAccess.FieldAccessorTable internal__static_google_protobuf_EnumOptions__FieldAccessorTable
+        = new pb::FieldAccess.FieldAccessorTable(internal__static_google_protobuf_EnumOptions__Descriptor,
+            new string[] { },
+            typeof (self::EnumOptions),
+            typeof (self::EnumOptions.Builder));
+    internal static readonly pbd::MessageDescriptor internal__static_google_protobuf_EnumValueOptions__Descriptor 
+        = Descriptor.MessageTypes[11];
+    internal static pb::FieldAccess.FieldAccessorTable internal__static_google_protobuf_EnumValueOptions__FieldAccessorTable
+        = new pb::FieldAccess.FieldAccessorTable(internal__static_google_protobuf_EnumValueOptions__Descriptor,
+            new string[] { },
+            typeof (self::EnumValueOptions),
+            typeof (self::EnumValueOptions.Builder));
+    internal static readonly pbd::MessageDescriptor internal__static_google_protobuf_ServiceOptions__Descriptor 
+        = Descriptor.MessageTypes[12];
+    internal static pb::FieldAccess.FieldAccessorTable internal__static_google_protobuf_ServiceOptions__FieldAccessorTable
+        = new pb::FieldAccess.FieldAccessorTable(internal__static_google_protobuf_ServiceOptions__Descriptor,
+            new string[] { },
+            typeof (self::ServiceOptions),
+            typeof (self::ServiceOptions.Builder));
+    internal static readonly pbd::MessageDescriptor internal__static_google_protobuf_MethodOptions__Descriptor 
+        = Descriptor.MessageTypes[13];
+    internal static pb::FieldAccess.FieldAccessorTable internal__static_google_protobuf_MethodOptions__FieldAccessorTable
+        = new pb::FieldAccess.FieldAccessorTable(internal__static_google_protobuf_MethodOptions__Descriptor,
+            new string[] { },
+            typeof (self::MethodOptions),
+            typeof (self::MethodOptions.Builder));
+    #endregion
+    
+  }
+  
+  #region Enums
+  #endregion
+  
+  #region Messages
+  public sealed partial class FileDescriptorProto : pb::GeneratedMessage<FileDescriptorProto, FileDescriptorProto.Builder> {
+    // Use FileDescriptorProto.CreateBuilder() to construct.
+    private FileDescriptorProto() {}
+    
+    private static readonly FileDescriptorProto defaultInstance = new FileDescriptorProto();
+    public static FileDescriptorProto DefaultInstance {
+      get { return defaultInstance; }
+    }
+    
+    public override FileDescriptorProto DefaultInstanceForType {
+      get { return defaultInstance; }
+    }
+    
+    public static pbd::MessageDescriptor Descriptor {
+      get { return self::DescriptorProtoFile.internal__static_google_protobuf_FileDescriptorProto__Descriptor; }
+    }
+    
+    protected internal override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors {
+      get { return self::DescriptorProtoFile.internal__static_google_protobuf_FileDescriptorProto__FieldAccessorTable; }
+    }
+    
+    // optional string name = 1;
+    private bool hasName;
+    private string name_ = "";
+    public bool HasName {
+      get { return hasName; }
+    }
+    public string Name {
+      get { return name_; }
+    }
+    
+    // optional string package = 2;
+    private bool hasPackage;
+    private string package_ = "";
+    public bool HasPackage {
+      get { return hasPackage; }
+    }
+    public string Package {
+      get { return package_; }
+    }
+    
+    // repeated string dependency = 3;
+    private scg::IList<string> dependency_ = pbc::Lists<string>.Empty;
+    public scg::IList<string> DependencyList {
+      get { return dependency_; }
+    }
+    public int DependencyCount {
+      get { return dependency_.Count; }
+    }
+    public string GetDependency(int index) {
+      return dependency_[index];
+    }
+    
+    // repeated .google.protobuf.DescriptorProto message_type = 4;
+    private scg::IList<self::DescriptorProto> messageType_ = pbc::Lists<self::DescriptorProto>.Empty;
+    public scg::IList<self::DescriptorProto> MessageTypeList {
+      get { return messageType_; } 
+    }
+    public int MessageTypeCount
+      { get { return messageType_.Count; }
+    }
+    public self::DescriptorProto GetMessageType(int index) {
+      return messageType_ [index];
+    }
+    
+    // repeated .google.protobuf.EnumDescriptorProto enum_type = 5;
+    private scg::IList<self::EnumDescriptorProto> enumType_ = pbc::Lists<self::EnumDescriptorProto>.Empty;
+    public scg::IList<self::EnumDescriptorProto> EnumTypeList {
+      get { return enumType_; } 
+    }
+    public int EnumTypeCount
+      { get { return enumType_.Count; }
+    }
+    public self::EnumDescriptorProto GetEnumType(int index) {
+      return enumType_ [index];
+    }
+    
+    // repeated .google.protobuf.ServiceDescriptorProto service = 6;
+    private scg::IList<self::ServiceDescriptorProto> service_ = pbc::Lists<self::ServiceDescriptorProto>.Empty;
+    public scg::IList<self::ServiceDescriptorProto> ServiceList {
+      get { return service_; } 
+    }
+    public int ServiceCount
+      { get { return service_.Count; }
+    }
+    public self::ServiceDescriptorProto GetService(int index) {
+      return service_ [index];
+    }
+    
+    // repeated .google.protobuf.FieldDescriptorProto extension = 7;
+    private scg::IList<self::FieldDescriptorProto> extension_ = pbc::Lists<self::FieldDescriptorProto>.Empty;
+    public scg::IList<self::FieldDescriptorProto> ExtensionList {
+      get { return extension_; } 
+    }
+    public int ExtensionCount
+      { get { return extension_.Count; }
+    }
+    public self::FieldDescriptorProto GetExtension(int index) {
+      return extension_ [index];
+    }
+    
+    // optional .google.protobuf.FileOptions options = 8;
+    private bool hasOptions;
+    private self::FileOptions options_ = self::FileOptions.DefaultInstance;
+    public bool HasOptions {
+      get { return hasOptions; }
+    }
+    public self::FileOptions Options {
+      get { return options_; }
+    }
+    
+    public override bool IsInitialized {
+      get {
+        return true;
+      }
+    }
+    
+    public override void WriteTo(pb::CodedOutputStream output) {
+      if (HasName) {
+        output.WriteString(1, Name);
+      }
+      if (HasPackage) {
+        output.WriteString(2, Package);
+      }
+      foreach (string element in DependencyList) {
+        output.WriteString(3, element);
+      }
+      foreach (self::DescriptorProto element in MessageTypeList) {
+        output.WriteMessage(4, element);
+      }
+      foreach (self::EnumDescriptorProto element in EnumTypeList) {
+        output.WriteMessage(5, element);
+      }
+      foreach (self::ServiceDescriptorProto element in ServiceList) {
+        output.WriteMessage(6, element);
+      }
+      foreach (self::FieldDescriptorProto element in ExtensionList) {
+        output.WriteMessage(7, element);
+      }
+      if (HasOptions) {
+        output.WriteMessage(8, Options);
+      }
+      UnknownFields.WriteTo(output);
+    }
+    
+    private int memoizedSerializedSize = -1;
+    public override int SerializedSize {
+      get {
+        int size = memoizedSerializedSize;
+        if (size != -1) return size;
+        
+        size = 0;
+        if (HasName) {
+          size += pb::CodedOutputStream.ComputeStringSize(1, Name);
+        }
+        if (HasPackage) {
+          size += pb::CodedOutputStream.ComputeStringSize(2, Package);
+        }
+        foreach (string element in DependencyList) {
+          size += pb::CodedOutputStream
+            .ComputeStringSize(3, element);
+        }
+        foreach (self::DescriptorProto element in MessageTypeList) {
+          size += pb::CodedOutputStream.ComputeMessageSize(4, element);
+        }
+        foreach (self::EnumDescriptorProto element in EnumTypeList) {
+          size += pb::CodedOutputStream.ComputeMessageSize(5, element);
+        }
+        foreach (self::ServiceDescriptorProto element in ServiceList) {
+          size += pb::CodedOutputStream.ComputeMessageSize(6, element);
+        }
+        foreach (self::FieldDescriptorProto element in ExtensionList) {
+          size += pb::CodedOutputStream.ComputeMessageSize(7, element);
+        }
+        if (HasOptions) {
+          size += pb::CodedOutputStream.ComputeMessageSize(8, Options);
+        }
+        size += UnknownFields.SerializedSize;
+        memoizedSerializedSize = size;
+        return size;
+      }
+    }
+    
+    public static self::FileDescriptorProto ParseFrom(pb::ByteString data) {
+      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+    }
+    public static self::FileDescriptorProto ParseFrom(pb::ByteString data,
+        pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
+               .BuildParsed();
+    }
+    public static self::FileDescriptorProto ParseFrom(byte[] data) {
+      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+    }
+    public static self::FileDescriptorProto parseFrom(byte[] data,
+        pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
+               .BuildParsed();
+    }
+    public static self::FileDescriptorProto ParseFrom(global::System.IO.Stream input) {
+      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+    }
+    public static self::FileDescriptorProto ParseFrom(
+        global::System.IO.Stream input,
+        pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
+               .BuildParsed();
+    }
+    public static self::FileDescriptorProto ParseFrom(pb::CodedInputStream input) {
+      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+    }
+    public static self::FileDescriptorProto ParseFrom(pb::CodedInputStream input,
+        pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
+               .BuildParsed();
+    }
+    
+    public static Builder CreateBuilder() { return new Builder(); }
+    public override IBuilder<self::FileDescriptorProto> CreateBuilderForType() { return new Builder(); }
+    public static Builder CreateBuilder(self::FileDescriptorProto prototype) {
+      return (Builder) new Builder().MergeFrom(prototype);
+    }
+    
+    public sealed partial class Builder : pb::GeneratedBuilder<self::FileDescriptorProto, Builder> {
+      // Construct using self::FileDescriptorProto.CreateBuilder()
+      internal Builder() {}
+      
+      self::FileDescriptorProto result = new self::FileDescriptorProto();
+      
+      protected override self::FileDescriptorProto MessageBeingBuilt {
+        get { return result; }
+      }
+      
+      public override IBuilder<self::FileDescriptorProto> Clear() {
+        result = new self::FileDescriptorProto();
+        return this;
+      }
+      
+      public override IBuilder<self::FileDescriptorProto> Clone() {
+        return new Builder().MergeFrom(result);
+      }
+      
+      public override pbd::MessageDescriptor DescriptorForType {
+        get { return self::FileDescriptorProto.Descriptor; }
+      }
+      
+      public override self::FileDescriptorProto DefaultInstanceForType {
+        get { return self::FileDescriptorProto.DefaultInstance; }
+      }
+      
+      public override self::FileDescriptorProto BuildPartial() {
+        result.dependency_ = pbc::Lists<string>.AsReadOnly(result.dependency_);
+        if (result.messageType_ != pbc::Lists<self::DescriptorProto>.Empty) {
+          result.messageType_ = pbc::Lists<self::DescriptorProto>.AsReadOnly(result.messageType_);
+        }
+        if (result.enumType_ != pbc::Lists<self::EnumDescriptorProto>.Empty) {
+          result.enumType_ = pbc::Lists<self::EnumDescriptorProto>.AsReadOnly(result.enumType_);
+        }
+        if (result.service_ != pbc::Lists<self::ServiceDescriptorProto>.Empty) {
+          result.service_ = pbc::Lists<self::ServiceDescriptorProto>.AsReadOnly(result.service_);
+        }
+        if (result.extension_ != pbc::Lists<self::FieldDescriptorProto>.Empty) {
+          result.extension_ = pbc::Lists<self::FieldDescriptorProto>.AsReadOnly(result.extension_);
+        }
+        self::FileDescriptorProto returnMe = result;
+        result = null;
+        return returnMe;
+      }
+      
+      public override IBuilder MergeFrom(pb::IMessage other) {
+        if (other is self::FileDescriptorProto) {
+          return MergeFrom((self::FileDescriptorProto) other);
+        } else {
+          base.MergeFrom(other);
+          return this;
+        }
+      }
+      
+      public override IBuilder<self::FileDescriptorProto> MergeFrom(self::FileDescriptorProto other) {
+        if (other == self::FileDescriptorProto.DefaultInstance) return this;
+        if (other.HasName) {
+          Name = other.Name;
+        }
+        if (other.HasPackage) {
+          Package = other.Package;
+        }
+        if (other.dependency_.Count != 0) {
+          if (result.dependency_.Count == 0) {
+            result.dependency_ = new scg::List<string>();
+          }
+          base.AddRange(other.dependency_, result.dependency_);
+        }
+        if (other.messageType_.Count != 0) {
+          if (result.messageType_.Count == 0) {
+            result.messageType_ = new scg::List<self::DescriptorProto>();
+          }
+          base.AddRange(other.messageType_, result.messageType_);
+        }
+        if (other.enumType_.Count != 0) {
+          if (result.enumType_.Count == 0) {
+            result.enumType_ = new scg::List<self::EnumDescriptorProto>();
+          }
+          base.AddRange(other.enumType_, result.enumType_);
+        }
+        if (other.service_.Count != 0) {
+          if (result.service_.Count == 0) {
+            result.service_ = new scg::List<self::ServiceDescriptorProto>();
+          }
+          base.AddRange(other.service_, result.service_);
+        }
+        if (other.extension_.Count != 0) {
+          if (result.extension_.Count == 0) {
+            result.extension_ = new scg::List<self::FieldDescriptorProto>();
+          }
+          base.AddRange(other.extension_, result.extension_);
+        }
+        if (other.HasOptions) {
+          MergeOptions(other.Options);
+        }
+        this.MergeUnknownFields(other.UnknownFields);
+        return this;
+      }
+      
+      public override IBuilder<self::FileDescriptorProto> MergeFrom(pb::CodedInputStream input) {
+        return MergeFrom(input, pb::ExtensionRegistry.Empty);
+      }
+      
+      public override IBuilder<self::FileDescriptorProto> MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+        pb::UnknownFieldSet.Builder unknownFields =
+          pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+        while (true) {
+          uint tag = input.ReadTag();
+          switch (tag) {
+            case 0:
+              this.UnknownFields = unknownFields.Build();
+              return this;
+            default: {
+              if (!ParseUnknownField(input, unknownFields,
+                                     extensionRegistry, tag)) {
+                this.UnknownFields = unknownFields.Build();
+                return this;
+              }
+              break;
+            }
+            case 10: {
+              Name = input.ReadString();
+              break;
+            }
+            case 18: {
+              Package = input.ReadString();
+              break;
+            }
+            case 26: {
+              AddDependency(input.ReadString());
+              break;
+            }
+            case 34: {
+              self::DescriptorProto.Builder subBuilder = self::DescriptorProto.CreateBuilder();
+              input.ReadMessage(subBuilder, extensionRegistry);
+              AddMessageType(subBuilder.BuildPartial());
+              break;
+            }
+            case 42: {
+              self::EnumDescriptorProto.Builder subBuilder = self::EnumDescriptorProto.CreateBuilder();
+              input.ReadMessage(subBuilder, extensionRegistry);
+              AddEnumType(subBuilder.BuildPartial());
+              break;
+            }
+            case 50: {
+              self::ServiceDescriptorProto.Builder subBuilder = self::ServiceDescriptorProto.CreateBuilder();
+              input.ReadMessage(subBuilder, extensionRegistry);
+              AddService(subBuilder.BuildPartial());
+              break;
+            }
+            case 58: {
+              self::FieldDescriptorProto.Builder subBuilder = self::FieldDescriptorProto.CreateBuilder();
+              input.ReadMessage(subBuilder, extensionRegistry);
+              AddExtension(subBuilder.BuildPartial());
+              break;
+            }
+            case 66: {
+              self::FileOptions.Builder subBuilder = self::FileOptions.CreateBuilder();
+              if (HasOptions) {
+                subBuilder.MergeFrom(Options);
+              }
+              input.ReadMessage(subBuilder, extensionRegistry);
+              Options = subBuilder.BuildPartial();
+              break;
+            }
+          }
+        }
+      }
+      
+      
+      // optional string name = 1;
+      public bool HasName {
+        get { return result.HasName; }
+      }
+      public string Name {
+        get { return result.Name; }
+        set { SetName(value); }
+      }
+      public Builder SetName(string value) {
+        result.hasName = true;
+        result.name_ = value;
+        return this;
+      }
+      public Builder ClearName() {
+        result.hasName = false;
+        result.name_ = "";
+        return this;
+      }
+      
+      // optional string package = 2;
+      public bool HasPackage {
+        get { return result.HasPackage; }
+      }
+      public string Package {
+        get { return result.Package; }
+        set { SetPackage(value); }
+      }
+      public Builder SetPackage(string value) {
+        result.hasPackage = true;
+        result.package_ = value;
+        return this;
+      }
+      public Builder ClearPackage() {
+        result.hasPackage = false;
+        result.package_ = "";
+        return this;
+      }
+      
+      // repeated string dependency = 3;
+      public scg::IList<string> DependencyList {
+        get { return pbc::Lists<string>.AsReadOnly(result.dependency_); }
+      }
+      public int DependencyCount {
+        get { return result.DependencyCount; }
+      }
+      public string GetDependency(int index) {
+        return result.GetDependency(index);
+      }
+      public Builder SetDependency(int index, string value) {
+        result.dependency_[index] = value;
+        return this;
+      }
+      public Builder AddDependency(string value) {
+        if (result.dependency_.Count == 0) {
+          result.dependency_ = new scg::List<string>();
+        }
+        result.dependency_.Add(value);
+        return this;
+      }
+      public Builder AddRangeDependency(scg::IEnumerable<string> values) {
+        if (result.dependency_.Count == 0) {
+          result.dependency_ = new scg::List<string>();
+        }
+        base.AddRange(values, result.dependency_);
+        return this;
+      }
+      public Builder ClearDependency() {
+        result.dependency_ = pbc::Lists<string>.Empty;
+        return this;
+      }
+      
+      // repeated .google.protobuf.DescriptorProto message_type = 4;
+      public scg::IList<self::DescriptorProto> MessageTypeList {
+        get { return pbc::Lists.AsReadOnly(result.messageType_); }
+      }
+      public int MessageTypeCount {
+        get { return result.MessageTypeCount; }
+      }
+      public self::DescriptorProto GetMessageType(int index) {
+        return result.GetMessageType(index);
+      }
+      public Builder SetMessageType(int index, self::DescriptorProto value) {
+        result.messageType_[index] = value;
+        return this;
+      }
+      public Builder SetMessageType(int index, self::DescriptorProto.Builder builderForValue) {
+        result.messageType_[index] = builderForValue.Build();
+        return this;
+      }
+      public Builder AddMessageType(self::DescriptorProto value) {
+        if (result.messageType_ == pbc::Lists<self::DescriptorProto>.Empty) {
+          result.messageType_ = new scg::List<self::DescriptorProto>();
+        }
+        result.messageType_.Add(value);
+        return this;
+      }
+      public Builder AddMessageType(self::DescriptorProto.Builder builderForValue) {
+        if (result.messageType_ == pbc::Lists<self::DescriptorProto>.Empty) {
+          result.messageType_ = new scg::List<self::DescriptorProto>();
+        }
+        result.messageType_.Add(builderForValue.Build());
+        return this;
+      }
+      public Builder AddRangeMessageType(scg::IEnumerable<self::DescriptorProto> values) {
+        if (result.messageType_ == pbc::Lists<self::DescriptorProto>.Empty) {
+          result.messageType_ = new scg::List<self::DescriptorProto>();
+        }
+        base.AddRange(values, result.messageType_);
+        return this;
+      }
+      public Builder ClearMessageType() {
+        result.messageType_ = pbc::Lists<self::DescriptorProto>.Empty;
+        return this;
+      }
+      
+      // repeated .google.protobuf.EnumDescriptorProto enum_type = 5;
+      public scg::IList<self::EnumDescriptorProto> EnumTypeList {
+        get { return pbc::Lists.AsReadOnly(result.enumType_); }
+      }
+      public int EnumTypeCount {
+        get { return result.EnumTypeCount; }
+      }
+      public self::EnumDescriptorProto GetEnumType(int index) {
+        return result.GetEnumType(index);
+      }
+      public Builder SetEnumType(int index, self::EnumDescriptorProto value) {
+        result.enumType_[index] = value;
+        return this;
+      }
+      public Builder SetEnumType(int index, self::EnumDescriptorProto.Builder builderForValue) {
+        result.enumType_[index] = builderForValue.Build();
+        return this;
+      }
+      public Builder AddEnumType(self::EnumDescriptorProto value) {
+        if (result.enumType_ == pbc::Lists<self::EnumDescriptorProto>.Empty) {
+          result.enumType_ = new scg::List<self::EnumDescriptorProto>();
+        }
+        result.enumType_.Add(value);
+        return this;
+      }
+      public Builder AddEnumType(self::EnumDescriptorProto.Builder builderForValue) {
+        if (result.enumType_ == pbc::Lists<self::EnumDescriptorProto>.Empty) {
+          result.enumType_ = new scg::List<self::EnumDescriptorProto>();
+        }
+        result.enumType_.Add(builderForValue.Build());
+        return this;
+      }
+      public Builder AddRangeEnumType(scg::IEnumerable<self::EnumDescriptorProto> values) {
+        if (result.enumType_ == pbc::Lists<self::EnumDescriptorProto>.Empty) {
+          result.enumType_ = new scg::List<self::EnumDescriptorProto>();
+        }
+        base.AddRange(values, result.enumType_);
+        return this;
+      }
+      public Builder ClearEnumType() {
+        result.enumType_ = pbc::Lists<self::EnumDescriptorProto>.Empty;
+        return this;
+      }
+      
+      // repeated .google.protobuf.ServiceDescriptorProto service = 6;
+      public scg::IList<self::ServiceDescriptorProto> ServiceList {
+        get { return pbc::Lists.AsReadOnly(result.service_); }
+      }
+      public int ServiceCount {
+        get { return result.ServiceCount; }
+      }
+      public self::ServiceDescriptorProto GetService(int index) {
+        return result.GetService(index);
+      }
+      public Builder SetService(int index, self::ServiceDescriptorProto value) {
+        result.service_[index] = value;
+        return this;
+      }
+      public Builder SetService(int index, self::ServiceDescriptorProto.Builder builderForValue) {
+        result.service_[index] = builderForValue.Build();
+        return this;
+      }
+      public Builder AddService(self::ServiceDescriptorProto value) {
+        if (result.service_ == pbc::Lists<self::ServiceDescriptorProto>.Empty) {
+          result.service_ = new scg::List<self::ServiceDescriptorProto>();
+        }
+        result.service_.Add(value);
+        return this;
+      }
+      public Builder AddService(self::ServiceDescriptorProto.Builder builderForValue) {
+        if (result.service_ == pbc::Lists<self::ServiceDescriptorProto>.Empty) {
+          result.service_ = new scg::List<self::ServiceDescriptorProto>();
+        }
+        result.service_.Add(builderForValue.Build());
+        return this;
+      }
+      public Builder AddRangeService(scg::IEnumerable<self::ServiceDescriptorProto> values) {
+        if (result.service_ == pbc::Lists<self::ServiceDescriptorProto>.Empty) {
+          result.service_ = new scg::List<self::ServiceDescriptorProto>();
+        }
+        base.AddRange(values, result.service_);
+        return this;
+      }
+      public Builder ClearService() {
+        result.service_ = pbc::Lists<self::ServiceDescriptorProto>.Empty;
+        return this;
+      }
+      
+      // repeated .google.protobuf.FieldDescriptorProto extension = 7;
+      public scg::IList<self::FieldDescriptorProto> ExtensionList {
+        get { return pbc::Lists.AsReadOnly(result.extension_); }
+      }
+      public int ExtensionCount {
+        get { return result.ExtensionCount; }
+      }
+      public self::FieldDescriptorProto GetExtension(int index) {
+        return result.GetExtension(index);
+      }
+      public Builder SetExtension(int index, self::FieldDescriptorProto value) {
+        result.extension_[index] = value;
+        return this;
+      }
+      public Builder SetExtension(int index, self::FieldDescriptorProto.Builder builderForValue) {
+        result.extension_[index] = builderForValue.Build();
+        return this;
+      }
+      public Builder AddExtension(self::FieldDescriptorProto value) {
+        if (result.extension_ == pbc::Lists<self::FieldDescriptorProto>.Empty) {
+          result.extension_ = new scg::List<self::FieldDescriptorProto>();
+        }
+        result.extension_.Add(value);
+        return this;
+      }
+      public Builder AddExtension(self::FieldDescriptorProto.Builder builderForValue) {
+        if (result.extension_ == pbc::Lists<self::FieldDescriptorProto>.Empty) {
+          result.extension_ = new scg::List<self::FieldDescriptorProto>();
+        }
+        result.extension_.Add(builderForValue.Build());
+        return this;
+      }
+      public Builder AddRangeExtension(scg::IEnumerable<self::FieldDescriptorProto> values) {
+        if (result.extension_ == pbc::Lists<self::FieldDescriptorProto>.Empty) {
+          result.extension_ = new scg::List<self::FieldDescriptorProto>();
+        }
+        base.AddRange(values, result.extension_);
+        return this;
+      }
+      public Builder ClearExtension() {
+        result.extension_ = pbc::Lists<self::FieldDescriptorProto>.Empty;
+        return this;
+      }
+      
+      // optional .google.protobuf.FileOptions options = 8;
+      public bool HasOptions {
+        get { return result.HasOptions; }
+      }
+      public self::FileOptions Options {
+        get { return result.Options; }
+        set { SetOptions(value); }
+      }
+      public Builder SetOptions(self::FileOptions value) {
+        result.hasOptions = true;
+        result.options_ = value;
+        return this;
+      }
+      public Builder SetOptions(self::FileOptions.Builder builderForValue) {
+        result.hasOptions = true;
+        result.options_ = builderForValue.Build();
+        return this;
+      }
+      public Builder MergeOptions(self::FileOptions value) {
+        if (result.HasOptions &&
+            result.options_ != self::FileOptions.DefaultInstance) {
+          result.options_ =
+            self::FileOptions.CreateBuilder(result.options_).MergeFrom(value).BuildPartial();
+        } else {
+          result.options_ = value;
+        }
+        result.hasOptions = true;
+        return this;
+      }
+      public Builder ClearOptions() {
+        result.hasOptions = false;
+        result.options_ = self::FileOptions.DefaultInstance;
+        return this;
+      }
+    }
+  }
+  
+  public sealed partial class DescriptorProto : pb::GeneratedMessage<DescriptorProto, DescriptorProto.Builder> {
+    // Use DescriptorProto.CreateBuilder() to construct.
+    private DescriptorProto() {}
+    
+    private static readonly DescriptorProto defaultInstance = new DescriptorProto();
+    public static DescriptorProto DefaultInstance {
+      get { return defaultInstance; }
+    }
+    
+    public override DescriptorProto DefaultInstanceForType {
+      get { return defaultInstance; }
+    }
+    
+    public static pbd::MessageDescriptor Descriptor {
+      get { return self::DescriptorProtoFile.internal__static_google_protobuf_DescriptorProto__Descriptor; }
+    }
+    
+    protected internal override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors {
+      get { return self::DescriptorProtoFile.internal__static_google_protobuf_DescriptorProto__FieldAccessorTable; }
+    }
+    
+    #region Nested types
+    public static class Types {
+      public sealed partial class ExtensionRange : pb::GeneratedMessage<ExtensionRange, ExtensionRange.Builder> {
+        // Use ExtensionRange.CreateBuilder() to construct.
+        private ExtensionRange() {}
+        
+        private static readonly ExtensionRange defaultInstance = new ExtensionRange();
+        public static ExtensionRange DefaultInstance {
+          get { return defaultInstance; }
+        }
+        
+        public override ExtensionRange DefaultInstanceForType {
+          get { return defaultInstance; }
+        }
+        
+        public static pbd::MessageDescriptor Descriptor {
+          get { return self::DescriptorProtoFile.internal__static_google_protobuf_DescriptorProto_ExtensionRange__Descriptor; }
+        }
+        
+        protected internal override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors {
+          get { return self::DescriptorProtoFile.internal__static_google_protobuf_DescriptorProto_ExtensionRange__FieldAccessorTable; }
+        }
+        
+        // optional int32 start = 1;
+        private bool hasStart;
+        private int start_ = 0;
+        public bool HasStart {
+          get { return hasStart; }
+        }
+        public int Start {
+          get { return start_; }
+        }
+        
+        // optional int32 end = 2;
+        private bool hasEnd;
+        private int end_ = 0;
+        public bool HasEnd {
+          get { return hasEnd; }
+        }
+        public int End {
+          get { return end_; }
+        }
+        
+        public override bool IsInitialized {
+          get {
+            return true;
+          }
+        }
+        
+        public override void WriteTo(pb::CodedOutputStream output) {
+          if (HasStart) {
+            output.WriteInt32(1, Start);
+          }
+          if (HasEnd) {
+            output.WriteInt32(2, End);
+          }
+          UnknownFields.WriteTo(output);
+        }
+        
+        private int memoizedSerializedSize = -1;
+        public override int SerializedSize {
+          get {
+            int size = memoizedSerializedSize;
+            if (size != -1) return size;
+            
+            size = 0;
+            if (HasStart) {
+              size += pb::CodedOutputStream.ComputeInt32Size(1, Start);
+            }
+            if (HasEnd) {
+              size += pb::CodedOutputStream.ComputeInt32Size(2, End);
+            }
+            size += UnknownFields.SerializedSize;
+            memoizedSerializedSize = size;
+            return size;
+          }
+        }
+        
+        public static self::DescriptorProto.Types.ExtensionRange ParseFrom(pb::ByteString data) {
+          return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+        }
+        public static self::DescriptorProto.Types.ExtensionRange ParseFrom(pb::ByteString data,
+            pb::ExtensionRegistry extensionRegistry) {
+          return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
+                   .BuildParsed();
+        }
+        public static self::DescriptorProto.Types.ExtensionRange ParseFrom(byte[] data) {
+          return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+        }
+        public static self::DescriptorProto.Types.ExtensionRange parseFrom(byte[] data,
+            pb::ExtensionRegistry extensionRegistry) {
+          return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
+                   .BuildParsed();
+        }
+        public static self::DescriptorProto.Types.ExtensionRange ParseFrom(global::System.IO.Stream input) {
+          return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+        }
+        public static self::DescriptorProto.Types.ExtensionRange ParseFrom(
+            global::System.IO.Stream input,
+            pb::ExtensionRegistry extensionRegistry) {
+          return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
+                   .BuildParsed();
+        }
+        public static self::DescriptorProto.Types.ExtensionRange ParseFrom(pb::CodedInputStream input) {
+          return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+        }
+        public static self::DescriptorProto.Types.ExtensionRange ParseFrom(pb::CodedInputStream input,
+            pb::ExtensionRegistry extensionRegistry) {
+          return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
+                   .BuildParsed();
+        }
+        
+        public static Builder CreateBuilder() { return new Builder(); }
+        public override IBuilder<self::DescriptorProto.Types.ExtensionRange> CreateBuilderForType() { return new Builder(); }
+        public static Builder CreateBuilder(self::DescriptorProto.Types.ExtensionRange prototype) {
+          return (Builder) new Builder().MergeFrom(prototype);
+        }
+        
+        public sealed partial class Builder : pb::GeneratedBuilder<self::DescriptorProto.Types.ExtensionRange, Builder> {
+          // Construct using self::DescriptorProto.Types.ExtensionRange.CreateBuilder()
+          internal Builder() {}
+          
+          self::DescriptorProto.Types.ExtensionRange result = new self::DescriptorProto.Types.ExtensionRange();
+          
+          protected override self::DescriptorProto.Types.ExtensionRange MessageBeingBuilt {
+            get { return result; }
+          }
+          
+          public override IBuilder<self::DescriptorProto.Types.ExtensionRange> Clear() {
+            result = new self::DescriptorProto.Types.ExtensionRange();
+            return this;
+          }
+          
+          public override IBuilder<self::DescriptorProto.Types.ExtensionRange> Clone() {
+            return new Builder().MergeFrom(result);
+          }
+          
+          public override pbd::MessageDescriptor DescriptorForType {
+            get { return self::DescriptorProto.Types.ExtensionRange.Descriptor; }
+          }
+          
+          public override self::DescriptorProto.Types.ExtensionRange DefaultInstanceForType {
+            get { return self::DescriptorProto.Types.ExtensionRange.DefaultInstance; }
+          }
+          
+          public override self::DescriptorProto.Types.ExtensionRange BuildPartial() {
+            self::DescriptorProto.Types.ExtensionRange returnMe = result;
+            result = null;
+            return returnMe;
+          }
+          
+          public override IBuilder MergeFrom(pb::IMessage other) {
+            if (other is self::DescriptorProto.Types.ExtensionRange) {
+              return MergeFrom((self::DescriptorProto.Types.ExtensionRange) other);
+            } else {
+              base.MergeFrom(other);
+              return this;
+            }
+          }
+          
+          public override IBuilder<self::DescriptorProto.Types.ExtensionRange> MergeFrom(self::DescriptorProto.Types.ExtensionRange other) {
+            if (other == self::DescriptorProto.Types.ExtensionRange.DefaultInstance) return this;
+            if (other.HasStart) {
+              Start = other.Start;
+            }
+            if (other.HasEnd) {
+              End = other.End;
+            }
+            this.MergeUnknownFields(other.UnknownFields);
+            return this;
+          }
+          
+          public override IBuilder<self::DescriptorProto.Types.ExtensionRange> MergeFrom(pb::CodedInputStream input) {
+            return MergeFrom(input, pb::ExtensionRegistry.Empty);
+          }
+          
+          public override IBuilder<self::DescriptorProto.Types.ExtensionRange> MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+            pb::UnknownFieldSet.Builder unknownFields =
+              pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+            while (true) {
+              uint tag = input.ReadTag();
+              switch (tag) {
+                case 0:
+                  this.UnknownFields = unknownFields.Build();
+                  return this;
+                default: {
+                  if (!ParseUnknownField(input, unknownFields,
+                                         extensionRegistry, tag)) {
+                    this.UnknownFields = unknownFields.Build();
+                    return this;
+                  }
+                  break;
+                }
+                case 8: {
+                  Start = input.ReadInt32();
+                  break;
+                }
+                case 16: {
+                  End = input.ReadInt32();
+                  break;
+                }
+              }
+            }
+          }
+          
+          
+          // optional int32 start = 1;
+          public bool HasStart {
+            get { return result.HasStart; }
+          }
+          public int Start {
+            get { return result.Start; }
+            set { SetStart(value); }
+          }
+          public Builder SetStart(int value) {
+            result.hasStart = true;
+            result.start_ = value;
+            return this;
+          }
+          public Builder ClearStart() {
+            result.hasStart = false;
+            result.start_ = 0;
+            return this;
+          }
+          
+          // optional int32 end = 2;
+          public bool HasEnd {
+            get { return result.HasEnd; }
+          }
+          public int End {
+            get { return result.End; }
+            set { SetEnd(value); }
+          }
+          public Builder SetEnd(int value) {
+            result.hasEnd = true;
+            result.end_ = value;
+            return this;
+          }
+          public Builder ClearEnd() {
+            result.hasEnd = false;
+            result.end_ = 0;
+            return this;
+          }
+        }
+      }
+      
+    }
+    #endregion
+    
+    // optional string name = 1;
+    private bool hasName;
+    private string name_ = "";
+    public bool HasName {
+      get { return hasName; }
+    }
+    public string Name {
+      get { return name_; }
+    }
+    
+    // repeated .google.protobuf.FieldDescriptorProto field = 2;
+    private scg::IList<self::FieldDescriptorProto> field_ = pbc::Lists<self::FieldDescriptorProto>.Empty;
+    public scg::IList<self::FieldDescriptorProto> FieldList {
+      get { return field_; } 
+    }
+    public int FieldCount
+      { get { return field_.Count; }
+    }
+    public self::FieldDescriptorProto GetField(int index) {
+      return field_ [index];
+    }
+    
+    // repeated .google.protobuf.FieldDescriptorProto extension = 6;
+    private scg::IList<self::FieldDescriptorProto> extension_ = pbc::Lists<self::FieldDescriptorProto>.Empty;
+    public scg::IList<self::FieldDescriptorProto> ExtensionList {
+      get { return extension_; } 
+    }
+    public int ExtensionCount
+      { get { return extension_.Count; }
+    }
+    public self::FieldDescriptorProto GetExtension(int index) {
+      return extension_ [index];
+    }
+    
+    // repeated .google.protobuf.DescriptorProto nested_type = 3;
+    private scg::IList<self::DescriptorProto> nestedType_ = pbc::Lists<self::DescriptorProto>.Empty;
+    public scg::IList<self::DescriptorProto> NestedTypeList {
+      get { return nestedType_; } 
+    }
+    public int NestedTypeCount
+      { get { return nestedType_.Count; }
+    }
+    public self::DescriptorProto GetNestedType(int index) {
+      return nestedType_ [index];
+    }
+    
+    // repeated .google.protobuf.EnumDescriptorProto enum_type = 4;
+    private scg::IList<self::EnumDescriptorProto> enumType_ = pbc::Lists<self::EnumDescriptorProto>.Empty;
+    public scg::IList<self::EnumDescriptorProto> EnumTypeList {
+      get { return enumType_; } 
+    }
+    public int EnumTypeCount
+      { get { return enumType_.Count; }
+    }
+    public self::EnumDescriptorProto GetEnumType(int index) {
+      return enumType_ [index];
+    }
+    
+    // repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5;
+    private scg::IList<self::DescriptorProto.Types.ExtensionRange> extensionRange_ = pbc::Lists<self::DescriptorProto.Types.ExtensionRange>.Empty;
+    public scg::IList<self::DescriptorProto.Types.ExtensionRange> ExtensionRangeList {
+      get { return extensionRange_; } 
+    }
+    public int ExtensionRangeCount
+      { get { return extensionRange_.Count; }
+    }
+    public self::DescriptorProto.Types.ExtensionRange GetExtensionRange(int index) {
+      return extensionRange_ [index];
+    }
+    
+    // optional .google.protobuf.MessageOptions options = 7;
+    private bool hasOptions;
+    private self::MessageOptions options_ = self::MessageOptions.DefaultInstance;
+    public bool HasOptions {
+      get { return hasOptions; }
+    }
+    public self::MessageOptions Options {
+      get { return options_; }
+    }
+    
+    public override bool IsInitialized {
+      get {
+        return true;
+      }
+    }
+    
+    public override void WriteTo(pb::CodedOutputStream output) {
+      if (HasName) {
+        output.WriteString(1, Name);
+      }
+      foreach (self::FieldDescriptorProto element in FieldList) {
+        output.WriteMessage(2, element);
+      }
+      foreach (self::DescriptorProto element in NestedTypeList) {
+        output.WriteMessage(3, element);
+      }
+      foreach (self::EnumDescriptorProto element in EnumTypeList) {
+        output.WriteMessage(4, element);
+      }
+      foreach (self::DescriptorProto.Types.ExtensionRange element in ExtensionRangeList) {
+        output.WriteMessage(5, element);
+      }
+      foreach (self::FieldDescriptorProto element in ExtensionList) {
+        output.WriteMessage(6, element);
+      }
+      if (HasOptions) {
+        output.WriteMessage(7, Options);
+      }
+      UnknownFields.WriteTo(output);
+    }
+    
+    private int memoizedSerializedSize = -1;
+    public override int SerializedSize {
+      get {
+        int size = memoizedSerializedSize;
+        if (size != -1) return size;
+        
+        size = 0;
+        if (HasName) {
+          size += pb::CodedOutputStream.ComputeStringSize(1, Name);
+        }
+        foreach (self::FieldDescriptorProto element in FieldList) {
+          size += pb::CodedOutputStream.ComputeMessageSize(2, element);
+        }
+        foreach (self::DescriptorProto element in NestedTypeList) {
+          size += pb::CodedOutputStream.ComputeMessageSize(3, element);
+        }
+        foreach (self::EnumDescriptorProto element in EnumTypeList) {
+          size += pb::CodedOutputStream.ComputeMessageSize(4, element);
+        }
+        foreach (self::DescriptorProto.Types.ExtensionRange element in ExtensionRangeList) {
+          size += pb::CodedOutputStream.ComputeMessageSize(5, element);
+        }
+        foreach (self::FieldDescriptorProto element in ExtensionList) {
+          size += pb::CodedOutputStream.ComputeMessageSize(6, element);
+        }
+        if (HasOptions) {
+          size += pb::CodedOutputStream.ComputeMessageSize(7, Options);
+        }
+        size += UnknownFields.SerializedSize;
+        memoizedSerializedSize = size;
+        return size;
+      }
+    }
+    
+    public static self::DescriptorProto ParseFrom(pb::ByteString data) {
+      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+    }
+    public static self::DescriptorProto ParseFrom(pb::ByteString data,
+        pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
+               .BuildParsed();
+    }
+    public static self::DescriptorProto ParseFrom(byte[] data) {
+      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+    }
+    public static self::DescriptorProto parseFrom(byte[] data,
+        pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
+               .BuildParsed();
+    }
+    public static self::DescriptorProto ParseFrom(global::System.IO.Stream input) {
+      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+    }
+    public static self::DescriptorProto ParseFrom(
+        global::System.IO.Stream input,
+        pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
+               .BuildParsed();
+    }
+    public static self::DescriptorProto ParseFrom(pb::CodedInputStream input) {
+      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+    }
+    public static self::DescriptorProto ParseFrom(pb::CodedInputStream input,
+        pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
+               .BuildParsed();
+    }
+    
+    public static Builder CreateBuilder() { return new Builder(); }
+    public override IBuilder<self::DescriptorProto> CreateBuilderForType() { return new Builder(); }
+    public static Builder CreateBuilder(self::DescriptorProto prototype) {
+      return (Builder) new Builder().MergeFrom(prototype);
+    }
+    
+    public sealed partial class Builder : pb::GeneratedBuilder<self::DescriptorProto, Builder> {
+      // Construct using self::DescriptorProto.CreateBuilder()
+      internal Builder() {}
+      
+      self::DescriptorProto result = new self::DescriptorProto();
+      
+      protected override self::DescriptorProto MessageBeingBuilt {
+        get { return result; }
+      }
+      
+      public override IBuilder<self::DescriptorProto> Clear() {
+        result = new self::DescriptorProto();
+        return this;
+      }
+      
+      public override IBuilder<self::DescriptorProto> Clone() {
+        return new Builder().MergeFrom(result);
+      }
+      
+      public override pbd::MessageDescriptor DescriptorForType {
+        get { return self::DescriptorProto.Descriptor; }
+      }
+      
+      public override self::DescriptorProto DefaultInstanceForType {
+        get { return self::DescriptorProto.DefaultInstance; }
+      }
+      
+      public override self::DescriptorProto BuildPartial() {
+        if (result.field_ != pbc::Lists<self::FieldDescriptorProto>.Empty) {
+          result.field_ = pbc::Lists<self::FieldDescriptorProto>.AsReadOnly(result.field_);
+        }
+        if (result.extension_ != pbc::Lists<self::FieldDescriptorProto>.Empty) {
+          result.extension_ = pbc::Lists<self::FieldDescriptorProto>.AsReadOnly(result.extension_);
+        }
+        if (result.nestedType_ != pbc::Lists<self::DescriptorProto>.Empty) {
+          result.nestedType_ = pbc::Lists<self::DescriptorProto>.AsReadOnly(result.nestedType_);
+        }
+        if (result.enumType_ != pbc::Lists<self::EnumDescriptorProto>.Empty) {
+          result.enumType_ = pbc::Lists<self::EnumDescriptorProto>.AsReadOnly(result.enumType_);
+        }
+        if (result.extensionRange_ != pbc::Lists<self::DescriptorProto.Types.ExtensionRange>.Empty) {
+          result.extensionRange_ = pbc::Lists<self::DescriptorProto.Types.ExtensionRange>.AsReadOnly(result.extensionRange_);
+        }
+        self::DescriptorProto returnMe = result;
+        result = null;
+        return returnMe;
+      }
+      
+      public override IBuilder MergeFrom(pb::IMessage other) {
+        if (other is self::DescriptorProto) {
+          return MergeFrom((self::DescriptorProto) other);
+        } else {
+          base.MergeFrom(other);
+          return this;
+        }
+      }
+      
+      public override IBuilder<self::DescriptorProto> MergeFrom(self::DescriptorProto other) {
+        if (other == self::DescriptorProto.DefaultInstance) return this;
+        if (other.HasName) {
+          Name = other.Name;
+        }
+        if (other.field_.Count != 0) {
+          if (result.field_.Count == 0) {
+            result.field_ = new scg::List<self::FieldDescriptorProto>();
+          }
+          base.AddRange(other.field_, result.field_);
+        }
+        if (other.extension_.Count != 0) {
+          if (result.extension_.Count == 0) {
+            result.extension_ = new scg::List<self::FieldDescriptorProto>();
+          }
+          base.AddRange(other.extension_, result.extension_);
+        }
+        if (other.nestedType_.Count != 0) {
+          if (result.nestedType_.Count == 0) {
+            result.nestedType_ = new scg::List<self::DescriptorProto>();
+          }
+          base.AddRange(other.nestedType_, result.nestedType_);
+        }
+        if (other.enumType_.Count != 0) {
+          if (result.enumType_.Count == 0) {
+            result.enumType_ = new scg::List<self::EnumDescriptorProto>();
+          }
+          base.AddRange(other.enumType_, result.enumType_);
+        }
+        if (other.extensionRange_.Count != 0) {
+          if (result.extensionRange_.Count == 0) {
+            result.extensionRange_ = new scg::List<self::DescriptorProto.Types.ExtensionRange>();
+          }
+          base.AddRange(other.extensionRange_, result.extensionRange_);
+        }
+        if (other.HasOptions) {
+          MergeOptions(other.Options);
+        }
+        this.MergeUnknownFields(other.UnknownFields);
+        return this;
+      }
+      
+      public override IBuilder<self::DescriptorProto> MergeFrom(pb::CodedInputStream input) {
+        return MergeFrom(input, pb::ExtensionRegistry.Empty);
+      }
+      
+      public override IBuilder<self::DescriptorProto> MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+        pb::UnknownFieldSet.Builder unknownFields =
+          pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+        while (true) {
+          uint tag = input.ReadTag();
+          switch (tag) {
+            case 0:
+              this.UnknownFields = unknownFields.Build();
+              return this;
+            default: {
+              if (!ParseUnknownField(input, unknownFields,
+                                     extensionRegistry, tag)) {
+                this.UnknownFields = unknownFields.Build();
+                return this;
+              }
+              break;
+            }
+            case 10: {
+              Name = input.ReadString();
+              break;
+            }
+            case 18: {
+              self::FieldDescriptorProto.Builder subBuilder = self::FieldDescriptorProto.CreateBuilder();
+              input.ReadMessage(subBuilder, extensionRegistry);
+              AddField(subBuilder.BuildPartial());
+              break;
+            }
+            case 26: {
+              self::DescriptorProto.Builder subBuilder = self::DescriptorProto.CreateBuilder();
+              input.ReadMessage(subBuilder, extensionRegistry);
+              AddNestedType(subBuilder.BuildPartial());
+              break;
+            }
+            case 34: {
+              self::EnumDescriptorProto.Builder subBuilder = self::EnumDescriptorProto.CreateBuilder();
+              input.ReadMessage(subBuilder, extensionRegistry);
+              AddEnumType(subBuilder.BuildPartial());
+              break;
+            }
+            case 42: {
+              self::DescriptorProto.Types.ExtensionRange.Builder subBuilder = self::DescriptorProto.Types.ExtensionRange.CreateBuilder();
+              input.ReadMessage(subBuilder, extensionRegistry);
+              AddExtensionRange(subBuilder.BuildPartial());
+              break;
+            }
+            case 50: {
+              self::FieldDescriptorProto.Builder subBuilder = self::FieldDescriptorProto.CreateBuilder();
+              input.ReadMessage(subBuilder, extensionRegistry);
+              AddExtension(subBuilder.BuildPartial());
+              break;
+            }
+            case 58: {
+              self::MessageOptions.Builder subBuilder = self::MessageOptions.CreateBuilder();
+              if (HasOptions) {
+                subBuilder.MergeFrom(Options);
+              }
+              input.ReadMessage(subBuilder, extensionRegistry);
+              Options = subBuilder.BuildPartial();
+              break;
+            }
+          }
+        }
+      }
+      
+      
+      // optional string name = 1;
+      public bool HasName {
+        get { return result.HasName; }
+      }
+      public string Name {
+        get { return result.Name; }
+        set { SetName(value); }
+      }
+      public Builder SetName(string value) {
+        result.hasName = true;
+        result.name_ = value;
+        return this;
+      }
+      public Builder ClearName() {
+        result.hasName = false;
+        result.name_ = "";
+        return this;
+      }
+      
+      // repeated .google.protobuf.FieldDescriptorProto field = 2;
+      public scg::IList<self::FieldDescriptorProto> FieldList {
+        get { return pbc::Lists.AsReadOnly(result.field_); }
+      }
+      public int FieldCount {
+        get { return result.FieldCount; }
+      }
+      public self::FieldDescriptorProto GetField(int index) {
+        return result.GetField(index);
+      }
+      public Builder SetField(int index, self::FieldDescriptorProto value) {
+        result.field_[index] = value;
+        return this;
+      }
+      public Builder SetField(int index, self::FieldDescriptorProto.Builder builderForValue) {
+        result.field_[index] = builderForValue.Build();
+        return this;
+      }
+      public Builder AddField(self::FieldDescriptorProto value) {
+        if (result.field_ == pbc::Lists<self::FieldDescriptorProto>.Empty) {
+          result.field_ = new scg::List<self::FieldDescriptorProto>();
+        }
+        result.field_.Add(value);
+        return this;
+      }
+      public Builder AddField(self::FieldDescriptorProto.Builder builderForValue) {
+        if (result.field_ == pbc::Lists<self::FieldDescriptorProto>.Empty) {
+          result.field_ = new scg::List<self::FieldDescriptorProto>();
+        }
+        result.field_.Add(builderForValue.Build());
+        return this;
+      }
+      public Builder AddRangeField(scg::IEnumerable<self::FieldDescriptorProto> values) {
+        if (result.field_ == pbc::Lists<self::FieldDescriptorProto>.Empty) {
+          result.field_ = new scg::List<self::FieldDescriptorProto>();
+        }
+        base.AddRange(values, result.field_);
+        return this;
+      }
+      public Builder ClearField() {
+        result.field_ = pbc::Lists<self::FieldDescriptorProto>.Empty;
+        return this;
+      }
+      
+      // repeated .google.protobuf.FieldDescriptorProto extension = 6;
+      public scg::IList<self::FieldDescriptorProto> ExtensionList {
+        get { return pbc::Lists.AsReadOnly(result.extension_); }
+      }
+      public int ExtensionCount {
+        get { return result.ExtensionCount; }
+      }
+      public self::FieldDescriptorProto GetExtension(int index) {
+        return result.GetExtension(index);
+      }
+      public Builder SetExtension(int index, self::FieldDescriptorProto value) {
+        result.extension_[index] = value;
+        return this;
+      }
+      public Builder SetExtension(int index, self::FieldDescriptorProto.Builder builderForValue) {
+        result.extension_[index] = builderForValue.Build();
+        return this;
+      }
+      public Builder AddExtension(self::FieldDescriptorProto value) {
+        if (result.extension_ == pbc::Lists<self::FieldDescriptorProto>.Empty) {
+          result.extension_ = new scg::List<self::FieldDescriptorProto>();
+        }
+        result.extension_.Add(value);
+        return this;
+      }
+      public Builder AddExtension(self::FieldDescriptorProto.Builder builderForValue) {
+        if (result.extension_ == pbc::Lists<self::FieldDescriptorProto>.Empty) {
+          result.extension_ = new scg::List<self::FieldDescriptorProto>();
+        }
+        result.extension_.Add(builderForValue.Build());
+        return this;
+      }
+      public Builder AddRangeExtension(scg::IEnumerable<self::FieldDescriptorProto> values) {
+        if (result.extension_ == pbc::Lists<self::FieldDescriptorProto>.Empty) {
+          result.extension_ = new scg::List<self::FieldDescriptorProto>();
+        }
+        base.AddRange(values, result.extension_);
+        return this;
+      }
+      public Builder ClearExtension() {
+        result.extension_ = pbc::Lists<self::FieldDescriptorProto>.Empty;
+        return this;
+      }
+      
+      // repeated .google.protobuf.DescriptorProto nested_type = 3;
+      public scg::IList<self::DescriptorProto> NestedTypeList {
+        get { return pbc::Lists.AsReadOnly(result.nestedType_); }
+      }
+      public int NestedTypeCount {
+        get { return result.NestedTypeCount; }
+      }
+      public self::DescriptorProto GetNestedType(int index) {
+        return result.GetNestedType(index);
+      }
+      public Builder SetNestedType(int index, self::DescriptorProto value) {
+        result.nestedType_[index] = value;
+        return this;
+      }
+      public Builder SetNestedType(int index, self::DescriptorProto.Builder builderForValue) {
+        result.nestedType_[index] = builderForValue.Build();
+        return this;
+      }
+      public Builder AddNestedType(self::DescriptorProto value) {
+        if (result.nestedType_ == pbc::Lists<self::DescriptorProto>.Empty) {
+          result.nestedType_ = new scg::List<self::DescriptorProto>();
+        }
+        result.nestedType_.Add(value);
+        return this;
+      }
+      public Builder AddNestedType(self::DescriptorProto.Builder builderForValue) {
+        if (result.nestedType_ == pbc::Lists<self::DescriptorProto>.Empty) {
+          result.nestedType_ = new scg::List<self::DescriptorProto>();
+        }
+        result.nestedType_.Add(builderForValue.Build());
+        return this;
+      }
+      public Builder AddRangeNestedType(scg::IEnumerable<self::DescriptorProto> values) {
+        if (result.nestedType_ == pbc::Lists<self::DescriptorProto>.Empty) {
+          result.nestedType_ = new scg::List<self::DescriptorProto>();
+        }
+        base.AddRange(values, result.nestedType_);
+        return this;
+      }
+      public Builder ClearNestedType() {
+        result.nestedType_ = pbc::Lists<self::DescriptorProto>.Empty;
+        return this;
+      }
+      
+      // repeated .google.protobuf.EnumDescriptorProto enum_type = 4;
+      public scg::IList<self::EnumDescriptorProto> EnumTypeList {
+        get { return pbc::Lists.AsReadOnly(result.enumType_); }
+      }
+      public int EnumTypeCount {
+        get { return result.EnumTypeCount; }
+      }
+      public self::EnumDescriptorProto GetEnumType(int index) {
+        return result.GetEnumType(index);
+      }
+      public Builder SetEnumType(int index, self::EnumDescriptorProto value) {
+        result.enumType_[index] = value;
+        return this;
+      }
+      public Builder SetEnumType(int index, self::EnumDescriptorProto.Builder builderForValue) {
+        result.enumType_[index] = builderForValue.Build();
+        return this;
+      }
+      public Builder AddEnumType(self::EnumDescriptorProto value) {
+        if (result.enumType_ == pbc::Lists<self::EnumDescriptorProto>.Empty) {
+          result.enumType_ = new scg::List<self::EnumDescriptorProto>();
+        }
+        result.enumType_.Add(value);
+        return this;
+      }
+      public Builder AddEnumType(self::EnumDescriptorProto.Builder builderForValue) {
+        if (result.enumType_ == pbc::Lists<self::EnumDescriptorProto>.Empty) {
+          result.enumType_ = new scg::List<self::EnumDescriptorProto>();
+        }
+        result.enumType_.Add(builderForValue.Build());
+        return this;
+      }
+      public Builder AddRangeEnumType(scg::IEnumerable<self::EnumDescriptorProto> values) {
+        if (result.enumType_ == pbc::Lists<self::EnumDescriptorProto>.Empty) {
+          result.enumType_ = new scg::List<self::EnumDescriptorProto>();
+        }
+        base.AddRange(values, result.enumType_);
+        return this;
+      }
+      public Builder ClearEnumType() {
+        result.enumType_ = pbc::Lists<self::EnumDescriptorProto>.Empty;
+        return this;
+      }
+      
+      // repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5;
+      public scg::IList<self::DescriptorProto.Types.ExtensionRange> ExtensionRangeList {
+        get { return pbc::Lists.AsReadOnly(result.extensionRange_); }
+      }
+      public int ExtensionRangeCount {
+        get { return result.ExtensionRangeCount; }
+      }
+      public self::DescriptorProto.Types.ExtensionRange GetExtensionRange(int index) {
+        return result.GetExtensionRange(index);
+      }
+      public Builder SetExtensionRange(int index, self::DescriptorProto.Types.ExtensionRange value) {
+        result.extensionRange_[index] = value;
+        return this;
+      }
+      public Builder SetExtensionRange(int index, self::DescriptorProto.Types.ExtensionRange.Builder builderForValue) {
+        result.extensionRange_[index] = builderForValue.Build();
+        return this;
+      }
+      public Builder AddExtensionRange(self::DescriptorProto.Types.ExtensionRange value) {
+        if (result.extensionRange_ == pbc::Lists<self::DescriptorProto.Types.ExtensionRange>.Empty) {
+          result.extensionRange_ = new scg::List<self::DescriptorProto.Types.ExtensionRange>();
+        }
+        result.extensionRange_.Add(value);
+        return this;
+      }
+      public Builder AddExtensionRange(self::DescriptorProto.Types.ExtensionRange.Builder builderForValue) {
+        if (result.extensionRange_ == pbc::Lists<self::DescriptorProto.Types.ExtensionRange>.Empty) {
+          result.extensionRange_ = new scg::List<self::DescriptorProto.Types.ExtensionRange>();
+        }
+        result.extensionRange_.Add(builderForValue.Build());
+        return this;
+      }
+      public Builder AddRangeExtensionRange(scg::IEnumerable<self::DescriptorProto.Types.ExtensionRange> values) {
+        if (result.extensionRange_ == pbc::Lists<self::DescriptorProto.Types.ExtensionRange>.Empty) {
+          result.extensionRange_ = new scg::List<self::DescriptorProto.Types.ExtensionRange>();
+        }
+        base.AddRange(values, result.extensionRange_);
+        return this;
+      }
+      public Builder ClearExtensionRange() {
+        result.extensionRange_ = pbc::Lists<self::DescriptorProto.Types.ExtensionRange>.Empty;
+        return this;
+      }
+      
+      // optional .google.protobuf.MessageOptions options = 7;
+      public bool HasOptions {
+        get { return result.HasOptions; }
+      }
+      public self::MessageOptions Options {
+        get { return result.Options; }
+        set { SetOptions(value); }
+      }
+      public Builder SetOptions(self::MessageOptions value) {
+        result.hasOptions = true;
+        result.options_ = value;
+        return this;
+      }
+      public Builder SetOptions(self::MessageOptions.Builder builderForValue) {
+        result.hasOptions = true;
+        result.options_ = builderForValue.Build();
+        return this;
+      }
+      public Builder MergeOptions(self::MessageOptions value) {
+        if (result.HasOptions &&
+            result.options_ != self::MessageOptions.DefaultInstance) {
+          result.options_ =
+            self::MessageOptions.CreateBuilder(result.options_).MergeFrom(value).BuildPartial();
+        } else {
+          result.options_ = value;
+        }
+        result.hasOptions = true;
+        return this;
+      }
+      public Builder ClearOptions() {
+        result.hasOptions = false;
+        result.options_ = self::MessageOptions.DefaultInstance;
+        return this;
+      }
+    }
+  }
+  
+  public sealed partial class FieldDescriptorProto : pb::GeneratedMessage<FieldDescriptorProto, FieldDescriptorProto.Builder> {
+    // Use FieldDescriptorProto.CreateBuilder() to construct.
+    private FieldDescriptorProto() {}
+    
+    private static readonly FieldDescriptorProto defaultInstance = new FieldDescriptorProto();
+    public static FieldDescriptorProto DefaultInstance {
+      get { return defaultInstance; }
+    }
+    
+    public override FieldDescriptorProto DefaultInstanceForType {
+      get { return defaultInstance; }
+    }
+    
+    public static pbd::MessageDescriptor Descriptor {
+      get { return self::DescriptorProtoFile.internal__static_google_protobuf_FieldDescriptorProto__Descriptor; }
+    }
+    
+    protected internal override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors {
+      get { return self::DescriptorProtoFile.internal__static_google_protobuf_FieldDescriptorProto__FieldAccessorTable; }
+    }
+    
+    #region Nested types
+    public static class Types {
+      public enum Type {
+        [pbd::EnumDescriptorIndex(0)]
+        TYPE_DOUBLE = 1,
+        [pbd::EnumDescriptorIndex(1)]
+        TYPE_FLOAT = 2,
+        [pbd::EnumDescriptorIndex(2)]
+        TYPE_INT64 = 3,
+        [pbd::EnumDescriptorIndex(3)]
+        TYPE_UINT64 = 4,
+        [pbd::EnumDescriptorIndex(4)]
+        TYPE_INT32 = 5,
+        [pbd::EnumDescriptorIndex(5)]
+        TYPE_FIXED64 = 6,
+        [pbd::EnumDescriptorIndex(6)]
+        TYPE_FIXED32 = 7,
+        [pbd::EnumDescriptorIndex(7)]
+        TYPE_BOOL = 8,
+        [pbd::EnumDescriptorIndex(8)]
+        TYPE_STRING = 9,
+        [pbd::EnumDescriptorIndex(9)]
+        TYPE_GROUP = 10,
+        [pbd::EnumDescriptorIndex(10)]
+        TYPE_MESSAGE = 11,
+        [pbd::EnumDescriptorIndex(11)]
+        TYPE_BYTES = 12,
+        [pbd::EnumDescriptorIndex(12)]
+        TYPE_UINT32 = 13,
+        [pbd::EnumDescriptorIndex(13)]
+        TYPE_ENUM = 14,
+        [pbd::EnumDescriptorIndex(14)]
+        TYPE_SFIXED32 = 15,
+        [pbd::EnumDescriptorIndex(15)]
+        TYPE_SFIXED64 = 16,
+        [pbd::EnumDescriptorIndex(16)]
+        TYPE_SINT32 = 17,
+        [pbd::EnumDescriptorIndex(17)]
+        TYPE_SINT64 = 18,
+      }
+      
+      public enum Label {
+        [pbd::EnumDescriptorIndex(0)]
+        LABEL_OPTIONAL = 1,
+        [pbd::EnumDescriptorIndex(1)]
+        LABEL_REQUIRED = 2,
+        [pbd::EnumDescriptorIndex(2)]
+        LABEL_REPEATED = 3,
+      }
+      
+    }
+    #endregion
+    
+    // optional string name = 1;
+    private bool hasName;
+    private string name_ = "";
+    public bool HasName {
+      get { return hasName; }
+    }
+    public string Name {
+      get { return name_; }
+    }
+    
+    // optional int32 number = 3;
+    private bool hasNumber;
+    private int number_ = 0;
+    public bool HasNumber {
+      get { return hasNumber; }
+    }
+    public int Number {
+      get { return number_; }
+    }
+    
+    // optional .google.protobuf.FieldDescriptorProto.Label label = 4;
+    private bool hasLabel;
+    private self::FieldDescriptorProto.Types.Label label_ = self::FieldDescriptorProto.Types.Label.LABEL_OPTIONAL;
+    public bool HasLabel {
+      get { return hasLabel; }
+    }
+    public self::FieldDescriptorProto.Types.Label Label {  get { return label_; }}
+    
+    // optional .google.protobuf.FieldDescriptorProto.Type type = 5;
+    private bool hasType;
+    private self::FieldDescriptorProto.Types.Type type_ = self::FieldDescriptorProto.Types.Type.TYPE_DOUBLE;
+    public bool HasType {
+      get { return hasType; }
+    }
+    public self::FieldDescriptorProto.Types.Type Type {  get { return type_; }}
+    
+    // optional string type_name = 6;
+    private bool hasTypeName;
+    private string typeName_ = "";
+    public bool HasTypeName {
+      get { return hasTypeName; }
+    }
+    public string TypeName {
+      get { return typeName_; }
+    }
+    
+    // optional string extendee = 2;
+    private bool hasExtendee;
+    private string extendee_ = "";
+    public bool HasExtendee {
+      get { return hasExtendee; }
+    }
+    public string Extendee {
+      get { return extendee_; }
+    }
+    
+    // optional string default_value = 7;
+    private bool hasDefaultValue;
+    private string defaultValue_ = "";
+    public bool HasDefaultValue {
+      get { return hasDefaultValue; }
+    }
+    public string DefaultValue {
+      get { return defaultValue_; }
+    }
+    
+    // optional .google.protobuf.FieldOptions options = 8;
+    private bool hasOptions;
+    private self::FieldOptions options_ = self::FieldOptions.DefaultInstance;
+    public bool HasOptions {
+      get { return hasOptions; }
+    }
+    public self::FieldOptions Options {
+      get { return options_; }
+    }
+    
+    public override bool IsInitialized {
+      get {
+        return true;
+      }
+    }
+    
+    public override void WriteTo(pb::CodedOutputStream output) {
+      if (HasName) {
+        output.WriteString(1, Name);
+      }
+      if (HasExtendee) {
+        output.WriteString(2, Extendee);
+      }
+      if (HasNumber) {
+        output.WriteInt32(3, Number);
+      }
+      if (HasLabel) {
+        output.WriteEnum(4, (int) Label);
+      }
+      if (HasType) {
+        output.WriteEnum(5, (int) Type);
+      }
+      if (HasTypeName) {
+        output.WriteString(6, TypeName);
+      }
+      if (HasDefaultValue) {
+        output.WriteString(7, DefaultValue);
+      }
+      if (HasOptions) {
+        output.WriteMessage(8, Options);
+      }
+      UnknownFields.WriteTo(output);
+    }
+    
+    private int memoizedSerializedSize = -1;
+    public override int SerializedSize {
+      get {
+        int size = memoizedSerializedSize;
+        if (size != -1) return size;
+        
+        size = 0;
+        if (HasName) {
+          size += pb::CodedOutputStream.ComputeStringSize(1, Name);
+        }
+        if (HasExtendee) {
+          size += pb::CodedOutputStream.ComputeStringSize(2, Extendee);
+        }
+        if (HasNumber) {
+          size += pb::CodedOutputStream.ComputeInt32Size(3, Number);
+        }
+        if (HasLabel) {
+          size += pb::CodedOutputStream
+            .ComputeEnumSize(4, (int) Label);
+        }
+        if (HasType) {
+          size += pb::CodedOutputStream
+            .ComputeEnumSize(5, (int) Type);
+        }
+        if (HasTypeName) {
+          size += pb::CodedOutputStream.ComputeStringSize(6, TypeName);
+        }
+        if (HasDefaultValue) {
+          size += pb::CodedOutputStream.ComputeStringSize(7, DefaultValue);
+        }
+        if (HasOptions) {
+          size += pb::CodedOutputStream.ComputeMessageSize(8, Options);
+        }
+        size += UnknownFields.SerializedSize;
+        memoizedSerializedSize = size;
+        return size;
+      }
+    }
+    
+    public static self::FieldDescriptorProto ParseFrom(pb::ByteString data) {
+      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+    }
+    public static self::FieldDescriptorProto ParseFrom(pb::ByteString data,
+        pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
+               .BuildParsed();
+    }
+    public static self::FieldDescriptorProto ParseFrom(byte[] data) {
+      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+    }
+    public static self::FieldDescriptorProto parseFrom(byte[] data,
+        pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
+               .BuildParsed();
+    }
+    public static self::FieldDescriptorProto ParseFrom(global::System.IO.Stream input) {
+      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+    }
+    public static self::FieldDescriptorProto ParseFrom(
+        global::System.IO.Stream input,
+        pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
+               .BuildParsed();
+    }
+    public static self::FieldDescriptorProto ParseFrom(pb::CodedInputStream input) {
+      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+    }
+    public static self::FieldDescriptorProto ParseFrom(pb::CodedInputStream input,
+        pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
+               .BuildParsed();
+    }
+    
+    public static Builder CreateBuilder() { return new Builder(); }
+    public override IBuilder<self::FieldDescriptorProto> CreateBuilderForType() { return new Builder(); }
+    public static Builder CreateBuilder(self::FieldDescriptorProto prototype) {
+      return (Builder) new Builder().MergeFrom(prototype);
+    }
+    
+    public sealed partial class Builder : pb::GeneratedBuilder<self::FieldDescriptorProto, Builder> {
+      // Construct using self::FieldDescriptorProto.CreateBuilder()
+      internal Builder() {}
+      
+      self::FieldDescriptorProto result = new self::FieldDescriptorProto();
+      
+      protected override self::FieldDescriptorProto MessageBeingBuilt {
+        get { return result; }
+      }
+      
+      public override IBuilder<self::FieldDescriptorProto> Clear() {
+        result = new self::FieldDescriptorProto();
+        return this;
+      }
+      
+      public override IBuilder<self::FieldDescriptorProto> Clone() {
+        return new Builder().MergeFrom(result);
+      }
+      
+      public override pbd::MessageDescriptor DescriptorForType {
+        get { return self::FieldDescriptorProto.Descriptor; }
+      }
+      
+      public override self::FieldDescriptorProto DefaultInstanceForType {
+        get { return self::FieldDescriptorProto.DefaultInstance; }
+      }
+      
+      public override self::FieldDescriptorProto BuildPartial() {
+        self::FieldDescriptorProto returnMe = result;
+        result = null;
+        return returnMe;
+      }
+      
+      public override IBuilder MergeFrom(pb::IMessage other) {
+        if (other is self::FieldDescriptorProto) {
+          return MergeFrom((self::FieldDescriptorProto) other);
+        } else {
+          base.MergeFrom(other);
+          return this;
+        }
+      }
+      
+      public override IBuilder<self::FieldDescriptorProto> MergeFrom(self::FieldDescriptorProto other) {
+        if (other == self::FieldDescriptorProto.DefaultInstance) return this;
+        if (other.HasName) {
+          Name = other.Name;
+        }
+        if (other.HasNumber) {
+          Number = other.Number;
+        }
+        if (other.HasLabel) {
+          Label = other.Label;
+        }
+        if (other.HasType) {
+          Type = other.Type;
+        }
+        if (other.HasTypeName) {
+          TypeName = other.TypeName;
+        }
+        if (other.HasExtendee) {
+          Extendee = other.Extendee;
+        }
+        if (other.HasDefaultValue) {
+          DefaultValue = other.DefaultValue;
+        }
+        if (other.HasOptions) {
+          MergeOptions(other.Options);
+        }
+        this.MergeUnknownFields(other.UnknownFields);
+        return this;
+      }
+      
+      public override IBuilder<self::FieldDescriptorProto> MergeFrom(pb::CodedInputStream input) {
+        return MergeFrom(input, pb::ExtensionRegistry.Empty);
+      }
+      
+      public override IBuilder<self::FieldDescriptorProto> MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+        pb::UnknownFieldSet.Builder unknownFields =
+          pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+        while (true) {
+          uint tag = input.ReadTag();
+          switch (tag) {
+            case 0:
+              this.UnknownFields = unknownFields.Build();
+              return this;
+            default: {
+              if (!ParseUnknownField(input, unknownFields,
+                                     extensionRegistry, tag)) {
+                this.UnknownFields = unknownFields.Build();
+                return this;
+              }
+              break;
+            }
+            case 10: {
+              Name = input.ReadString();
+              break;
+            }
+            case 18: {
+              Extendee = input.ReadString();
+              break;
+            }
+            case 24: {
+              Number = input.ReadInt32();
+              break;
+            }
+            case 32: {
+              int rawValue = input.ReadEnum();
+              if (!global::System.Enum.IsDefined(typeof(self::FieldDescriptorProto.Types.Label), rawValue)) {
+                unknownFields.MergeVarintField(4, (ulong) rawValue);
+              } else {
+                Label = (self::FieldDescriptorProto.Types.Label) rawValue;
+              }
+              break;
+            }
+            case 40: {
+              int rawValue = input.ReadEnum();
+              if (!global::System.Enum.IsDefined(typeof(self::FieldDescriptorProto.Types.Type), rawValue)) {
+                unknownFields.MergeVarintField(5, (ulong) rawValue);
+              } else {
+                Type = (self::FieldDescriptorProto.Types.Type) rawValue;
+              }
+              break;
+            }
+            case 50: {
+              TypeName = input.ReadString();
+              break;
+            }
+            case 58: {
+              DefaultValue = input.ReadString();
+              break;
+            }
+            case 66: {
+              self::FieldOptions.Builder subBuilder = self::FieldOptions.CreateBuilder();
+              if (HasOptions) {
+                subBuilder.MergeFrom(Options);
+              }
+              input.ReadMessage(subBuilder, extensionRegistry);
+              Options = subBuilder.BuildPartial();
+              break;
+            }
+          }
+        }
+      }
+      
+      
+      // optional string name = 1;
+      public bool HasName {
+        get { return result.HasName; }
+      }
+      public string Name {
+        get { return result.Name; }
+        set { SetName(value); }
+      }
+      public Builder SetName(string value) {
+        result.hasName = true;
+        result.name_ = value;
+        return this;
+      }
+      public Builder ClearName() {
+        result.hasName = false;
+        result.name_ = "";
+        return this;
+      }
+      
+      // optional int32 number = 3;
+      public bool HasNumber {
+        get { return result.HasNumber; }
+      }
+      public int Number {
+        get { return result.Number; }
+        set { SetNumber(value); }
+      }
+      public Builder SetNumber(int value) {
+        result.hasNumber = true;
+        result.number_ = value;
+        return this;
+      }
+      public Builder ClearNumber() {
+        result.hasNumber = false;
+        result.number_ = 0;
+        return this;
+      }
+      
+      // optional .google.protobuf.FieldDescriptorProto.Label label = 4;
+      public bool HasLabel {
+        get { return result.HasLabel; }
+      }
+      public self::FieldDescriptorProto.Types.Label Label {
+        get { return result.Label; }
+        set { SetLabel(value); }
+      }
+      public Builder SetLabel(self::FieldDescriptorProto.Types.Label value) {
+        result.hasLabel = true;
+        result.label_ = value;
+        return this;
+      }
+      public Builder ClearLabel() {
+        result.hasLabel = false;
+        result.label_ = self::FieldDescriptorProto.Types.Label.LABEL_OPTIONAL;
+        return this;
+      }
+      
+      // optional .google.protobuf.FieldDescriptorProto.Type type = 5;
+      public bool HasType {
+        get { return result.HasType; }
+      }
+      public self::FieldDescriptorProto.Types.Type Type {
+        get { return result.Type; }
+        set { SetType(value); }
+      }
+      public Builder SetType(self::FieldDescriptorProto.Types.Type value) {
+        result.hasType = true;
+        result.type_ = value;
+        return this;
+      }
+      public Builder ClearType() {
+        result.hasType = false;
+        result.type_ = self::FieldDescriptorProto.Types.Type.TYPE_DOUBLE;
+        return this;
+      }
+      
+      // optional string type_name = 6;
+      public bool HasTypeName {
+        get { return result.HasTypeName; }
+      }
+      public string TypeName {
+        get { return result.TypeName; }
+        set { SetTypeName(value); }
+      }
+      public Builder SetTypeName(string value) {
+        result.hasTypeName = true;
+        result.typeName_ = value;
+        return this;
+      }
+      public Builder ClearTypeName() {
+        result.hasTypeName = false;
+        result.typeName_ = "";
+        return this;
+      }
+      
+      // optional string extendee = 2;
+      public bool HasExtendee {
+        get { return result.HasExtendee; }
+      }
+      public string Extendee {
+        get { return result.Extendee; }
+        set { SetExtendee(value); }
+      }
+      public Builder SetExtendee(string value) {
+        result.hasExtendee = true;
+        result.extendee_ = value;
+        return this;
+      }
+      public Builder ClearExtendee() {
+        result.hasExtendee = false;
+        result.extendee_ = "";
+        return this;
+      }
+      
+      // optional string default_value = 7;
+      public bool HasDefaultValue {
+        get { return result.HasDefaultValue; }
+      }
+      public string DefaultValue {
+        get { return result.DefaultValue; }
+        set { SetDefaultValue(value); }
+      }
+      public Builder SetDefaultValue(string value) {
+        result.hasDefaultValue = true;
+        result.defaultValue_ = value;
+        return this;
+      }
+      public Builder ClearDefaultValue() {
+        result.hasDefaultValue = false;
+        result.defaultValue_ = "";
+        return this;
+      }
+      
+      // optional .google.protobuf.FieldOptions options = 8;
+      public bool HasOptions {
+        get { return result.HasOptions; }
+      }
+      public self::FieldOptions Options {
+        get { return result.Options; }
+        set { SetOptions(value); }
+      }
+      public Builder SetOptions(self::FieldOptions value) {
+        result.hasOptions = true;
+        result.options_ = value;
+        return this;
+      }
+      public Builder SetOptions(self::FieldOptions.Builder builderForValue) {
+        result.hasOptions = true;
+        result.options_ = builderForValue.Build();
+        return this;
+      }
+      public Builder MergeOptions(self::FieldOptions value) {
+        if (result.HasOptions &&
+            result.options_ != self::FieldOptions.DefaultInstance) {
+          result.options_ =
+            self::FieldOptions.CreateBuilder(result.options_).MergeFrom(value).BuildPartial();
+        } else {
+          result.options_ = value;
+        }
+        result.hasOptions = true;
+        return this;
+      }
+      public Builder ClearOptions() {
+        result.hasOptions = false;
+        result.options_ = self::FieldOptions.DefaultInstance;
+        return this;
+      }
+    }
+  }
+  
+  public sealed partial class EnumDescriptorProto : pb::GeneratedMessage<EnumDescriptorProto, EnumDescriptorProto.Builder> {
+    // Use EnumDescriptorProto.CreateBuilder() to construct.
+    private EnumDescriptorProto() {}
+    
+    private static readonly EnumDescriptorProto defaultInstance = new EnumDescriptorProto();
+    public static EnumDescriptorProto DefaultInstance {
+      get { return defaultInstance; }
+    }
+    
+    public override EnumDescriptorProto DefaultInstanceForType {
+      get { return defaultInstance; }
+    }
+    
+    public static pbd::MessageDescriptor Descriptor {
+      get { return self::DescriptorProtoFile.internal__static_google_protobuf_EnumDescriptorProto__Descriptor; }
+    }
+    
+    protected internal override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors {
+      get { return self::DescriptorProtoFile.internal__static_google_protobuf_EnumDescriptorProto__FieldAccessorTable; }
+    }
+    
+    // optional string name = 1;
+    private bool hasName;
+    private string name_ = "";
+    public bool HasName {
+      get { return hasName; }
+    }
+    public string Name {
+      get { return name_; }
+    }
+    
+    // repeated .google.protobuf.EnumValueDescriptorProto value = 2;
+    private scg::IList<self::EnumValueDescriptorProto> value_ = pbc::Lists<self::EnumValueDescriptorProto>.Empty;
+    public scg::IList<self::EnumValueDescriptorProto> ValueList {
+      get { return value_; } 
+    }
+    public int ValueCount
+      { get { return value_.Count; }
+    }
+    public self::EnumValueDescriptorProto GetValue(int index) {
+      return value_ [index];
+    }
+    
+    // optional .google.protobuf.EnumOptions options = 3;
+    private bool hasOptions;
+    private self::EnumOptions options_ = self::EnumOptions.DefaultInstance;
+    public bool HasOptions {
+      get { return hasOptions; }
+    }
+    public self::EnumOptions Options {
+      get { return options_; }
+    }
+    
+    public override bool IsInitialized {
+      get {
+        return true;
+      }
+    }
+    
+    public override void WriteTo(pb::CodedOutputStream output) {
+      if (HasName) {
+        output.WriteString(1, Name);
+      }
+      foreach (self::EnumValueDescriptorProto element in ValueList) {
+        output.WriteMessage(2, element);
+      }
+      if (HasOptions) {
+        output.WriteMessage(3, Options);
+      }
+      UnknownFields.WriteTo(output);
+    }
+    
+    private int memoizedSerializedSize = -1;
+    public override int SerializedSize {
+      get {
+        int size = memoizedSerializedSize;
+        if (size != -1) return size;
+        
+        size = 0;
+        if (HasName) {
+          size += pb::CodedOutputStream.ComputeStringSize(1, Name);
+        }
+        foreach (self::EnumValueDescriptorProto element in ValueList) {
+          size += pb::CodedOutputStream.ComputeMessageSize(2, element);
+        }
+        if (HasOptions) {
+          size += pb::CodedOutputStream.ComputeMessageSize(3, Options);
+        }
+        size += UnknownFields.SerializedSize;
+        memoizedSerializedSize = size;
+        return size;
+      }
+    }
+    
+    public static self::EnumDescriptorProto ParseFrom(pb::ByteString data) {
+      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+    }
+    public static self::EnumDescriptorProto ParseFrom(pb::ByteString data,
+        pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
+               .BuildParsed();
+    }
+    public static self::EnumDescriptorProto ParseFrom(byte[] data) {
+      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+    }
+    public static self::EnumDescriptorProto parseFrom(byte[] data,
+        pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
+               .BuildParsed();
+    }
+    public static self::EnumDescriptorProto ParseFrom(global::System.IO.Stream input) {
+      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+    }
+    public static self::EnumDescriptorProto ParseFrom(
+        global::System.IO.Stream input,
+        pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
+               .BuildParsed();
+    }
+    public static self::EnumDescriptorProto ParseFrom(pb::CodedInputStream input) {
+      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+    }
+    public static self::EnumDescriptorProto ParseFrom(pb::CodedInputStream input,
+        pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
+               .BuildParsed();
+    }
+    
+    public static Builder CreateBuilder() { return new Builder(); }
+    public override IBuilder<self::EnumDescriptorProto> CreateBuilderForType() { return new Builder(); }
+    public static Builder CreateBuilder(self::EnumDescriptorProto prototype) {
+      return (Builder) new Builder().MergeFrom(prototype);
+    }
+    
+    public sealed partial class Builder : pb::GeneratedBuilder<self::EnumDescriptorProto, Builder> {
+      // Construct using self::EnumDescriptorProto.CreateBuilder()
+      internal Builder() {}
+      
+      self::EnumDescriptorProto result = new self::EnumDescriptorProto();
+      
+      protected override self::EnumDescriptorProto MessageBeingBuilt {
+        get { return result; }
+      }
+      
+      public override IBuilder<self::EnumDescriptorProto> Clear() {
+        result = new self::EnumDescriptorProto();
+        return this;
+      }
+      
+      public override IBuilder<self::EnumDescriptorProto> Clone() {
+        return new Builder().MergeFrom(result);
+      }
+      
+      public override pbd::MessageDescriptor DescriptorForType {
+        get { return self::EnumDescriptorProto.Descriptor; }
+      }
+      
+      public override self::EnumDescriptorProto DefaultInstanceForType {
+        get { return self::EnumDescriptorProto.DefaultInstance; }
+      }
+      
+      public override self::EnumDescriptorProto BuildPartial() {
+        if (result.value_ != pbc::Lists<self::EnumValueDescriptorProto>.Empty) {
+          result.value_ = pbc::Lists<self::EnumValueDescriptorProto>.AsReadOnly(result.value_);
+        }
+        self::EnumDescriptorProto returnMe = result;
+        result = null;
+        return returnMe;
+      }
+      
+      public override IBuilder MergeFrom(pb::IMessage other) {
+        if (other is self::EnumDescriptorProto) {
+          return MergeFrom((self::EnumDescriptorProto) other);
+        } else {
+          base.MergeFrom(other);
+          return this;
+        }
+      }
+      
+      public override IBuilder<self::EnumDescriptorProto> MergeFrom(self::EnumDescriptorProto other) {
+        if (other == self::EnumDescriptorProto.DefaultInstance) return this;
+        if (other.HasName) {
+          Name = other.Name;
+        }
+        if (other.value_.Count != 0) {
+          if (result.value_.Count == 0) {
+            result.value_ = new scg::List<self::EnumValueDescriptorProto>();
+          }
+          base.AddRange(other.value_, result.value_);
+        }
+        if (other.HasOptions) {
+          MergeOptions(other.Options);
+        }
+        this.MergeUnknownFields(other.UnknownFields);
+        return this;
+      }
+      
+      public override IBuilder<self::EnumDescriptorProto> MergeFrom(pb::CodedInputStream input) {
+        return MergeFrom(input, pb::ExtensionRegistry.Empty);
+      }
+      
+      public override IBuilder<self::EnumDescriptorProto> MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+        pb::UnknownFieldSet.Builder unknownFields =
+          pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+        while (true) {
+          uint tag = input.ReadTag();
+          switch (tag) {
+            case 0:
+              this.UnknownFields = unknownFields.Build();
+              return this;
+            default: {
+              if (!ParseUnknownField(input, unknownFields,
+                                     extensionRegistry, tag)) {
+                this.UnknownFields = unknownFields.Build();
+                return this;
+              }
+              break;
+            }
+            case 10: {
+              Name = input.ReadString();
+              break;
+            }
+            case 18: {
+              self::EnumValueDescriptorProto.Builder subBuilder = self::EnumValueDescriptorProto.CreateBuilder();
+              input.ReadMessage(subBuilder, extensionRegistry);
+              AddValue(subBuilder.BuildPartial());
+              break;
+            }
+            case 26: {
+              self::EnumOptions.Builder subBuilder = self::EnumOptions.CreateBuilder();
+              if (HasOptions) {
+                subBuilder.MergeFrom(Options);
+              }
+              input.ReadMessage(subBuilder, extensionRegistry);
+              Options = subBuilder.BuildPartial();
+              break;
+            }
+          }
+        }
+      }
+      
+      
+      // optional string name = 1;
+      public bool HasName {
+        get { return result.HasName; }
+      }
+      public string Name {
+        get { return result.Name; }
+        set { SetName(value); }
+      }
+      public Builder SetName(string value) {
+        result.hasName = true;
+        result.name_ = value;
+        return this;
+      }
+      public Builder ClearName() {
+        result.hasName = false;
+        result.name_ = "";
+        return this;
+      }
+      
+      // repeated .google.protobuf.EnumValueDescriptorProto value = 2;
+      public scg::IList<self::EnumValueDescriptorProto> ValueList {
+        get { return pbc::Lists.AsReadOnly(result.value_); }
+      }
+      public int ValueCount {
+        get { return result.ValueCount; }
+      }
+      public self::EnumValueDescriptorProto GetValue(int index) {
+        return result.GetValue(index);
+      }
+      public Builder SetValue(int index, self::EnumValueDescriptorProto value) {
+        result.value_[index] = value;
+        return this;
+      }
+      public Builder SetValue(int index, self::EnumValueDescriptorProto.Builder builderForValue) {
+        result.value_[index] = builderForValue.Build();
+        return this;
+      }
+      public Builder AddValue(self::EnumValueDescriptorProto value) {
+        if (result.value_ == pbc::Lists<self::EnumValueDescriptorProto>.Empty) {
+          result.value_ = new scg::List<self::EnumValueDescriptorProto>();
+        }
+        result.value_.Add(value);
+        return this;
+      }
+      public Builder AddValue(self::EnumValueDescriptorProto.Builder builderForValue) {
+        if (result.value_ == pbc::Lists<self::EnumValueDescriptorProto>.Empty) {
+          result.value_ = new scg::List<self::EnumValueDescriptorProto>();
+        }
+        result.value_.Add(builderForValue.Build());
+        return this;
+      }
+      public Builder AddRangeValue(scg::IEnumerable<self::EnumValueDescriptorProto> values) {
+        if (result.value_ == pbc::Lists<self::EnumValueDescriptorProto>.Empty) {
+          result.value_ = new scg::List<self::EnumValueDescriptorProto>();
+        }
+        base.AddRange(values, result.value_);
+        return this;
+      }
+      public Builder ClearValue() {
+        result.value_ = pbc::Lists<self::EnumValueDescriptorProto>.Empty;
+        return this;
+      }
+      
+      // optional .google.protobuf.EnumOptions options = 3;
+      public bool HasOptions {
+        get { return result.HasOptions; }
+      }
+      public self::EnumOptions Options {
+        get { return result.Options; }
+        set { SetOptions(value); }
+      }
+      public Builder SetOptions(self::EnumOptions value) {
+        result.hasOptions = true;
+        result.options_ = value;
+        return this;
+      }
+      public Builder SetOptions(self::EnumOptions.Builder builderForValue) {
+        result.hasOptions = true;
+        result.options_ = builderForValue.Build();
+        return this;
+      }
+      public Builder MergeOptions(self::EnumOptions value) {
+        if (result.HasOptions &&
+            result.options_ != self::EnumOptions.DefaultInstance) {
+          result.options_ =
+            self::EnumOptions.CreateBuilder(result.options_).MergeFrom(value).BuildPartial();
+        } else {
+          result.options_ = value;
+        }
+        result.hasOptions = true;
+        return this;
+      }
+      public Builder ClearOptions() {
+        result.hasOptions = false;
+        result.options_ = self::EnumOptions.DefaultInstance;
+        return this;
+      }
+    }
+  }
+  
+  public sealed partial class EnumValueDescriptorProto : pb::GeneratedMessage<EnumValueDescriptorProto, EnumValueDescriptorProto.Builder> {
+    // Use EnumValueDescriptorProto.CreateBuilder() to construct.
+    private EnumValueDescriptorProto() {}
+    
+    private static readonly EnumValueDescriptorProto defaultInstance = new EnumValueDescriptorProto();
+    public static EnumValueDescriptorProto DefaultInstance {
+      get { return defaultInstance; }
+    }
+    
+    public override EnumValueDescriptorProto DefaultInstanceForType {
+      get { return defaultInstance; }
+    }
+    
+    public static pbd::MessageDescriptor Descriptor {
+      get { return self::DescriptorProtoFile.internal__static_google_protobuf_EnumValueDescriptorProto__Descriptor; }
+    }
+    
+    protected internal override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors {
+      get { return self::DescriptorProtoFile.internal__static_google_protobuf_EnumValueDescriptorProto__FieldAccessorTable; }
+    }
+    
+    // optional string name = 1;
+    private bool hasName;
+    private string name_ = "";
+    public bool HasName {
+      get { return hasName; }
+    }
+    public string Name {
+      get { return name_; }
+    }
+    
+    // optional int32 number = 2;
+    private bool hasNumber;
+    private int number_ = 0;
+    public bool HasNumber {
+      get { return hasNumber; }
+    }
+    public int Number {
+      get { return number_; }
+    }
+    
+    // optional .google.protobuf.EnumValueOptions options = 3;
+    private bool hasOptions;
+    private self::EnumValueOptions options_ = self::EnumValueOptions.DefaultInstance;
+    public bool HasOptions {
+      get { return hasOptions; }
+    }
+    public self::EnumValueOptions Options {
+      get { return options_; }
+    }
+    
+    public override bool IsInitialized {
+      get {
+        return true;
+      }
+    }
+    
+    public override void WriteTo(pb::CodedOutputStream output) {
+      if (HasName) {
+        output.WriteString(1, Name);
+      }
+      if (HasNumber) {
+        output.WriteInt32(2, Number);
+      }
+      if (HasOptions) {
+        output.WriteMessage(3, Options);
+      }
+      UnknownFields.WriteTo(output);
+    }
+    
+    private int memoizedSerializedSize = -1;
+    public override int SerializedSize {
+      get {
+        int size = memoizedSerializedSize;
+        if (size != -1) return size;
+        
+        size = 0;
+        if (HasName) {
+          size += pb::CodedOutputStream.ComputeStringSize(1, Name);
+        }
+        if (HasNumber) {
+          size += pb::CodedOutputStream.ComputeInt32Size(2, Number);
+        }
+        if (HasOptions) {
+          size += pb::CodedOutputStream.ComputeMessageSize(3, Options);
+        }
+        size += UnknownFields.SerializedSize;
+        memoizedSerializedSize = size;
+        return size;
+      }
+    }
+    
+    public static self::EnumValueDescriptorProto ParseFrom(pb::ByteString data) {
+      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+    }
+    public static self::EnumValueDescriptorProto ParseFrom(pb::ByteString data,
+        pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
+               .BuildParsed();
+    }
+    public static self::EnumValueDescriptorProto ParseFrom(byte[] data) {
+      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+    }
+    public static self::EnumValueDescriptorProto parseFrom(byte[] data,
+        pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
+               .BuildParsed();
+    }
+    public static self::EnumValueDescriptorProto ParseFrom(global::System.IO.Stream input) {
+      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+    }
+    public static self::EnumValueDescriptorProto ParseFrom(
+        global::System.IO.Stream input,
+        pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
+               .BuildParsed();
+    }
+    public static self::EnumValueDescriptorProto ParseFrom(pb::CodedInputStream input) {
+      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+    }
+    public static self::EnumValueDescriptorProto ParseFrom(pb::CodedInputStream input,
+        pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
+               .BuildParsed();
+    }
+    
+    public static Builder CreateBuilder() { return new Builder(); }
+    public override IBuilder<self::EnumValueDescriptorProto> CreateBuilderForType() { return new Builder(); }
+    public static Builder CreateBuilder(self::EnumValueDescriptorProto prototype) {
+      return (Builder) new Builder().MergeFrom(prototype);
+    }
+    
+    public sealed partial class Builder : pb::GeneratedBuilder<self::EnumValueDescriptorProto, Builder> {
+      // Construct using self::EnumValueDescriptorProto.CreateBuilder()
+      internal Builder() {}
+      
+      self::EnumValueDescriptorProto result = new self::EnumValueDescriptorProto();
+      
+      protected override self::EnumValueDescriptorProto MessageBeingBuilt {
+        get { return result; }
+      }
+      
+      public override IBuilder<self::EnumValueDescriptorProto> Clear() {
+        result = new self::EnumValueDescriptorProto();
+        return this;
+      }
+      
+      public override IBuilder<self::EnumValueDescriptorProto> Clone() {
+        return new Builder().MergeFrom(result);
+      }
+      
+      public override pbd::MessageDescriptor DescriptorForType {
+        get { return self::EnumValueDescriptorProto.Descriptor; }
+      }
+      
+      public override self::EnumValueDescriptorProto DefaultInstanceForType {
+        get { return self::EnumValueDescriptorProto.DefaultInstance; }
+      }
+      
+      public override self::EnumValueDescriptorProto BuildPartial() {
+        self::EnumValueDescriptorProto returnMe = result;
+        result = null;
+        return returnMe;
+      }
+      
+      public override IBuilder MergeFrom(pb::IMessage other) {
+        if (other is self::EnumValueDescriptorProto) {
+          return MergeFrom((self::EnumValueDescriptorProto) other);
+        } else {
+          base.MergeFrom(other);
+          return this;
+        }
+      }
+      
+      public override IBuilder<self::EnumValueDescriptorProto> MergeFrom(self::EnumValueDescriptorProto other) {
+        if (other == self::EnumValueDescriptorProto.DefaultInstance) return this;
+        if (other.HasName) {
+          Name = other.Name;
+        }
+        if (other.HasNumber) {
+          Number = other.Number;
+        }
+        if (other.HasOptions) {
+          MergeOptions(other.Options);
+        }
+        this.MergeUnknownFields(other.UnknownFields);
+        return this;
+      }
+      
+      public override IBuilder<self::EnumValueDescriptorProto> MergeFrom(pb::CodedInputStream input) {
+        return MergeFrom(input, pb::ExtensionRegistry.Empty);
+      }
+      
+      public override IBuilder<self::EnumValueDescriptorProto> MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+        pb::UnknownFieldSet.Builder unknownFields =
+          pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+        while (true) {
+          uint tag = input.ReadTag();
+          switch (tag) {
+            case 0:
+              this.UnknownFields = unknownFields.Build();
+              return this;
+            default: {
+              if (!ParseUnknownField(input, unknownFields,
+                                     extensionRegistry, tag)) {
+                this.UnknownFields = unknownFields.Build();
+                return this;
+              }
+              break;
+            }
+            case 10: {
+              Name = input.ReadString();
+              break;
+            }
+            case 16: {
+              Number = input.ReadInt32();
+              break;
+            }
+            case 26: {
+              self::EnumValueOptions.Builder subBuilder = self::EnumValueOptions.CreateBuilder();
+              if (HasOptions) {
+                subBuilder.MergeFrom(Options);
+              }
+              input.ReadMessage(subBuilder, extensionRegistry);
+              Options = subBuilder.BuildPartial();
+              break;
+            }
+          }
+        }
+      }
+      
+      
+      // optional string name = 1;
+      public bool HasName {
+        get { return result.HasName; }
+      }
+      public string Name {
+        get { return result.Name; }
+        set { SetName(value); }
+      }
+      public Builder SetName(string value) {
+        result.hasName = true;
+        result.name_ = value;
+        return this;
+      }
+      public Builder ClearName() {
+        result.hasName = false;
+        result.name_ = "";
+        return this;
+      }
+      
+      // optional int32 number = 2;
+      public bool HasNumber {
+        get { return result.HasNumber; }
+      }
+      public int Number {
+        get { return result.Number; }
+        set { SetNumber(value); }
+      }
+      public Builder SetNumber(int value) {
+        result.hasNumber = true;
+        result.number_ = value;
+        return this;
+      }
+      public Builder ClearNumber() {
+        result.hasNumber = false;
+        result.number_ = 0;
+        return this;
+      }
+      
+      // optional .google.protobuf.EnumValueOptions options = 3;
+      public bool HasOptions {
+        get { return result.HasOptions; }
+      }
+      public self::EnumValueOptions Options {
+        get { return result.Options; }
+        set { SetOptions(value); }
+      }
+      public Builder SetOptions(self::EnumValueOptions value) {
+        result.hasOptions = true;
+        result.options_ = value;
+        return this;
+      }
+      public Builder SetOptions(self::EnumValueOptions.Builder builderForValue) {
+        result.hasOptions = true;
+        result.options_ = builderForValue.Build();
+        return this;
+      }
+      public Builder MergeOptions(self::EnumValueOptions value) {
+        if (result.HasOptions &&
+            result.options_ != self::EnumValueOptions.DefaultInstance) {
+          result.options_ =
+            self::EnumValueOptions.CreateBuilder(result.options_).MergeFrom(value).BuildPartial();
+        } else {
+          result.options_ = value;
+        }
+        result.hasOptions = true;
+        return this;
+      }
+      public Builder ClearOptions() {
+        result.hasOptions = false;
+        result.options_ = self::EnumValueOptions.DefaultInstance;
+        return this;
+      }
+    }
+  }
+  
+  public sealed partial class ServiceDescriptorProto : pb::GeneratedMessage<ServiceDescriptorProto, ServiceDescriptorProto.Builder> {
+    // Use ServiceDescriptorProto.CreateBuilder() to construct.
+    private ServiceDescriptorProto() {}
+    
+    private static readonly ServiceDescriptorProto defaultInstance = new ServiceDescriptorProto();
+    public static ServiceDescriptorProto DefaultInstance {
+      get { return defaultInstance; }
+    }
+    
+    public override ServiceDescriptorProto DefaultInstanceForType {
+      get { return defaultInstance; }
+    }
+    
+    public static pbd::MessageDescriptor Descriptor {
+      get { return self::DescriptorProtoFile.internal__static_google_protobuf_ServiceDescriptorProto__Descriptor; }
+    }
+    
+    protected internal override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors {
+      get { return self::DescriptorProtoFile.internal__static_google_protobuf_ServiceDescriptorProto__FieldAccessorTable; }
+    }
+    
+    // optional string name = 1;
+    private bool hasName;
+    private string name_ = "";
+    public bool HasName {
+      get { return hasName; }
+    }
+    public string Name {
+      get { return name_; }
+    }
+    
+    // repeated .google.protobuf.MethodDescriptorProto method = 2;
+    private scg::IList<self::MethodDescriptorProto> method_ = pbc::Lists<self::MethodDescriptorProto>.Empty;
+    public scg::IList<self::MethodDescriptorProto> MethodList {
+      get { return method_; } 
+    }
+    public int MethodCount
+      { get { return method_.Count; }
+    }
+    public self::MethodDescriptorProto GetMethod(int index) {
+      return method_ [index];
+    }
+    
+    // optional .google.protobuf.ServiceOptions options = 3;
+    private bool hasOptions;
+    private self::ServiceOptions options_ = self::ServiceOptions.DefaultInstance;
+    public bool HasOptions {
+      get { return hasOptions; }
+    }
+    public self::ServiceOptions Options {
+      get { return options_; }
+    }
+    
+    public override bool IsInitialized {
+      get {
+        return true;
+      }
+    }
+    
+    public override void WriteTo(pb::CodedOutputStream output) {
+      if (HasName) {
+        output.WriteString(1, Name);
+      }
+      foreach (self::MethodDescriptorProto element in MethodList) {
+        output.WriteMessage(2, element);
+      }
+      if (HasOptions) {
+        output.WriteMessage(3, Options);
+      }
+      UnknownFields.WriteTo(output);
+    }
+    
+    private int memoizedSerializedSize = -1;
+    public override int SerializedSize {
+      get {
+        int size = memoizedSerializedSize;
+        if (size != -1) return size;
+        
+        size = 0;
+        if (HasName) {
+          size += pb::CodedOutputStream.ComputeStringSize(1, Name);
+        }
+        foreach (self::MethodDescriptorProto element in MethodList) {
+          size += pb::CodedOutputStream.ComputeMessageSize(2, element);
+        }
+        if (HasOptions) {
+          size += pb::CodedOutputStream.ComputeMessageSize(3, Options);
+        }
+        size += UnknownFields.SerializedSize;
+        memoizedSerializedSize = size;
+        return size;
+      }
+    }
+    
+    public static self::ServiceDescriptorProto ParseFrom(pb::ByteString data) {
+      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+    }
+    public static self::ServiceDescriptorProto ParseFrom(pb::ByteString data,
+        pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
+               .BuildParsed();
+    }
+    public static self::ServiceDescriptorProto ParseFrom(byte[] data) {
+      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+    }
+    public static self::ServiceDescriptorProto parseFrom(byte[] data,
+        pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
+               .BuildParsed();
+    }
+    public static self::ServiceDescriptorProto ParseFrom(global::System.IO.Stream input) {
+      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+    }
+    public static self::ServiceDescriptorProto ParseFrom(
+        global::System.IO.Stream input,
+        pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
+               .BuildParsed();
+    }
+    public static self::ServiceDescriptorProto ParseFrom(pb::CodedInputStream input) {
+      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+    }
+    public static self::ServiceDescriptorProto ParseFrom(pb::CodedInputStream input,
+        pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
+               .BuildParsed();
+    }
+    
+    public static Builder CreateBuilder() { return new Builder(); }
+    public override IBuilder<self::ServiceDescriptorProto> CreateBuilderForType() { return new Builder(); }
+    public static Builder CreateBuilder(self::ServiceDescriptorProto prototype) {
+      return (Builder) new Builder().MergeFrom(prototype);
+    }
+    
+    public sealed partial class Builder : pb::GeneratedBuilder<self::ServiceDescriptorProto, Builder> {
+      // Construct using self::ServiceDescriptorProto.CreateBuilder()
+      internal Builder() {}
+      
+      self::ServiceDescriptorProto result = new self::ServiceDescriptorProto();
+      
+      protected override self::ServiceDescriptorProto MessageBeingBuilt {
+        get { return result; }
+      }
+      
+      public override IBuilder<self::ServiceDescriptorProto> Clear() {
+        result = new self::ServiceDescriptorProto();
+        return this;
+      }
+      
+      public override IBuilder<self::ServiceDescriptorProto> Clone() {
+        return new Builder().MergeFrom(result);
+      }
+      
+      public override pbd::MessageDescriptor DescriptorForType {
+        get { return self::ServiceDescriptorProto.Descriptor; }
+      }
+      
+      public override self::ServiceDescriptorProto DefaultInstanceForType {
+        get { return self::ServiceDescriptorProto.DefaultInstance; }
+      }
+      
+      public override self::ServiceDescriptorProto BuildPartial() {
+        if (result.method_ != pbc::Lists<self::MethodDescriptorProto>.Empty) {
+          result.method_ = pbc::Lists<self::MethodDescriptorProto>.AsReadOnly(result.method_);
+        }
+        self::ServiceDescriptorProto returnMe = result;
+        result = null;
+        return returnMe;
+      }
+      
+      public override IBuilder MergeFrom(pb::IMessage other) {
+        if (other is self::ServiceDescriptorProto) {
+          return MergeFrom((self::ServiceDescriptorProto) other);
+        } else {
+          base.MergeFrom(other);
+          return this;
+        }
+      }
+      
+      public override IBuilder<self::ServiceDescriptorProto> MergeFrom(self::ServiceDescriptorProto other) {
+        if (other == self::ServiceDescriptorProto.DefaultInstance) return this;
+        if (other.HasName) {
+          Name = other.Name;
+        }
+        if (other.method_.Count != 0) {
+          if (result.method_.Count == 0) {
+            result.method_ = new scg::List<self::MethodDescriptorProto>();
+          }
+          base.AddRange(other.method_, result.method_);
+        }
+        if (other.HasOptions) {
+          MergeOptions(other.Options);
+        }
+        this.MergeUnknownFields(other.UnknownFields);
+        return this;
+      }
+      
+      public override IBuilder<self::ServiceDescriptorProto> MergeFrom(pb::CodedInputStream input) {
+        return MergeFrom(input, pb::ExtensionRegistry.Empty);
+      }
+      
+      public override IBuilder<self::ServiceDescriptorProto> MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+        pb::UnknownFieldSet.Builder unknownFields =
+          pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+        while (true) {
+          uint tag = input.ReadTag();
+          switch (tag) {
+            case 0:
+              this.UnknownFields = unknownFields.Build();
+              return this;
+            default: {
+              if (!ParseUnknownField(input, unknownFields,
+                                     extensionRegistry, tag)) {
+                this.UnknownFields = unknownFields.Build();
+                return this;
+              }
+              break;
+            }
+            case 10: {
+              Name = input.ReadString();
+              break;
+            }
+            case 18: {
+              self::MethodDescriptorProto.Builder subBuilder = self::MethodDescriptorProto.CreateBuilder();
+              input.ReadMessage(subBuilder, extensionRegistry);
+              AddMethod(subBuilder.BuildPartial());
+              break;
+            }
+            case 26: {
+              self::ServiceOptions.Builder subBuilder = self::ServiceOptions.CreateBuilder();
+              if (HasOptions) {
+                subBuilder.MergeFrom(Options);
+              }
+              input.ReadMessage(subBuilder, extensionRegistry);
+              Options = subBuilder.BuildPartial();
+              break;
+            }
+          }
+        }
+      }
+      
+      
+      // optional string name = 1;
+      public bool HasName {
+        get { return result.HasName; }
+      }
+      public string Name {
+        get { return result.Name; }
+        set { SetName(value); }
+      }
+      public Builder SetName(string value) {
+        result.hasName = true;
+        result.name_ = value;
+        return this;
+      }
+      public Builder ClearName() {
+        result.hasName = false;
+        result.name_ = "";
+        return this;
+      }
+      
+      // repeated .google.protobuf.MethodDescriptorProto method = 2;
+      public scg::IList<self::MethodDescriptorProto> MethodList {
+        get { return pbc::Lists.AsReadOnly(result.method_); }
+      }
+      public int MethodCount {
+        get { return result.MethodCount; }
+      }
+      public self::MethodDescriptorProto GetMethod(int index) {
+        return result.GetMethod(index);
+      }
+      public Builder SetMethod(int index, self::MethodDescriptorProto value) {
+        result.method_[index] = value;
+        return this;
+      }
+      public Builder SetMethod(int index, self::MethodDescriptorProto.Builder builderForValue) {
+        result.method_[index] = builderForValue.Build();
+        return this;
+      }
+      public Builder AddMethod(self::MethodDescriptorProto value) {
+        if (result.method_ == pbc::Lists<self::MethodDescriptorProto>.Empty) {
+          result.method_ = new scg::List<self::MethodDescriptorProto>();
+        }
+        result.method_.Add(value);
+        return this;
+      }
+      public Builder AddMethod(self::MethodDescriptorProto.Builder builderForValue) {
+        if (result.method_ == pbc::Lists<self::MethodDescriptorProto>.Empty) {
+          result.method_ = new scg::List<self::MethodDescriptorProto>();
+        }
+        result.method_.Add(builderForValue.Build());
+        return this;
+      }
+      public Builder AddRangeMethod(scg::IEnumerable<self::MethodDescriptorProto> values) {
+        if (result.method_ == pbc::Lists<self::MethodDescriptorProto>.Empty) {
+          result.method_ = new scg::List<self::MethodDescriptorProto>();
+        }
+        base.AddRange(values, result.method_);
+        return this;
+      }
+      public Builder ClearMethod() {
+        result.method_ = pbc::Lists<self::MethodDescriptorProto>.Empty;
+        return this;
+      }
+      
+      // optional .google.protobuf.ServiceOptions options = 3;
+      public bool HasOptions {
+        get { return result.HasOptions; }
+      }
+      public self::ServiceOptions Options {
+        get { return result.Options; }
+        set { SetOptions(value); }
+      }
+      public Builder SetOptions(self::ServiceOptions value) {
+        result.hasOptions = true;
+        result.options_ = value;
+        return this;
+      }
+      public Builder SetOptions(self::ServiceOptions.Builder builderForValue) {
+        result.hasOptions = true;
+        result.options_ = builderForValue.Build();
+        return this;
+      }
+      public Builder MergeOptions(self::ServiceOptions value) {
+        if (result.HasOptions &&
+            result.options_ != self::ServiceOptions.DefaultInstance) {
+          result.options_ =
+            self::ServiceOptions.CreateBuilder(result.options_).MergeFrom(value).BuildPartial();
+        } else {
+          result.options_ = value;
+        }
+        result.hasOptions = true;
+        return this;
+      }
+      public Builder ClearOptions() {
+        result.hasOptions = false;
+        result.options_ = self::ServiceOptions.DefaultInstance;
+        return this;
+      }
+    }
+  }
+  
+  public sealed partial class MethodDescriptorProto : pb::GeneratedMessage<MethodDescriptorProto, MethodDescriptorProto.Builder> {
+    // Use MethodDescriptorProto.CreateBuilder() to construct.
+    private MethodDescriptorProto() {}
+    
+    private static readonly MethodDescriptorProto defaultInstance = new MethodDescriptorProto();
+    public static MethodDescriptorProto DefaultInstance {
+      get { return defaultInstance; }
+    }
+    
+    public override MethodDescriptorProto DefaultInstanceForType {
+      get { return defaultInstance; }
+    }
+    
+    public static pbd::MessageDescriptor Descriptor {
+      get { return self::DescriptorProtoFile.internal__static_google_protobuf_MethodDescriptorProto__Descriptor; }
+    }
+    
+    protected internal override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors {
+      get { return self::DescriptorProtoFile.internal__static_google_protobuf_MethodDescriptorProto__FieldAccessorTable; }
+    }
+    
+    // optional string name = 1;
+    private bool hasName;
+    private string name_ = "";
+    public bool HasName {
+      get { return hasName; }
+    }
+    public string Name {
+      get { return name_; }
+    }
+    
+    // optional string input_type = 2;
+    private bool hasInputType;
+    private string inputType_ = "";
+    public bool HasInputType {
+      get { return hasInputType; }
+    }
+    public string InputType {
+      get { return inputType_; }
+    }
+    
+    // optional string output_type = 3;
+    private bool hasOutputType;
+    private string outputType_ = "";
+    public bool HasOutputType {
+      get { return hasOutputType; }
+    }
+    public string OutputType {
+      get { return outputType_; }
+    }
+    
+    // optional .google.protobuf.MethodOptions options = 4;
+    private bool hasOptions;
+    private self::MethodOptions options_ = self::MethodOptions.DefaultInstance;
+    public bool HasOptions {
+      get { return hasOptions; }
+    }
+    public self::MethodOptions Options {
+      get { return options_; }
+    }
+    
+    public override bool IsInitialized {
+      get {
+        return true;
+      }
+    }
+    
+    public override void WriteTo(pb::CodedOutputStream output) {
+      if (HasName) {
+        output.WriteString(1, Name);
+      }
+      if (HasInputType) {
+        output.WriteString(2, InputType);
+      }
+      if (HasOutputType) {
+        output.WriteString(3, OutputType);
+      }
+      if (HasOptions) {
+        output.WriteMessage(4, Options);
+      }
+      UnknownFields.WriteTo(output);
+    }
+    
+    private int memoizedSerializedSize = -1;
+    public override int SerializedSize {
+      get {
+        int size = memoizedSerializedSize;
+        if (size != -1) return size;
+        
+        size = 0;
+        if (HasName) {
+          size += pb::CodedOutputStream.ComputeStringSize(1, Name);
+        }
+        if (HasInputType) {
+          size += pb::CodedOutputStream.ComputeStringSize(2, InputType);
+        }
+        if (HasOutputType) {
+          size += pb::CodedOutputStream.ComputeStringSize(3, OutputType);
+        }
+        if (HasOptions) {
+          size += pb::CodedOutputStream.ComputeMessageSize(4, Options);
+        }
+        size += UnknownFields.SerializedSize;
+        memoizedSerializedSize = size;
+        return size;
+      }
+    }
+    
+    public static self::MethodDescriptorProto ParseFrom(pb::ByteString data) {
+      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+    }
+    public static self::MethodDescriptorProto ParseFrom(pb::ByteString data,
+        pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
+               .BuildParsed();
+    }
+    public static self::MethodDescriptorProto ParseFrom(byte[] data) {
+      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+    }
+    public static self::MethodDescriptorProto parseFrom(byte[] data,
+        pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
+               .BuildParsed();
+    }
+    public static self::MethodDescriptorProto ParseFrom(global::System.IO.Stream input) {
+      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+    }
+    public static self::MethodDescriptorProto ParseFrom(
+        global::System.IO.Stream input,
+        pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
+               .BuildParsed();
+    }
+    public static self::MethodDescriptorProto ParseFrom(pb::CodedInputStream input) {
+      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+    }
+    public static self::MethodDescriptorProto ParseFrom(pb::CodedInputStream input,
+        pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
+               .BuildParsed();
+    }
+    
+    public static Builder CreateBuilder() { return new Builder(); }
+    public override IBuilder<self::MethodDescriptorProto> CreateBuilderForType() { return new Builder(); }
+    public static Builder CreateBuilder(self::MethodDescriptorProto prototype) {
+      return (Builder) new Builder().MergeFrom(prototype);
+    }
+    
+    public sealed partial class Builder : pb::GeneratedBuilder<self::MethodDescriptorProto, Builder> {
+      // Construct using self::MethodDescriptorProto.CreateBuilder()
+      internal Builder() {}
+      
+      self::MethodDescriptorProto result = new self::MethodDescriptorProto();
+      
+      protected override self::MethodDescriptorProto MessageBeingBuilt {
+        get { return result; }
+      }
+      
+      public override IBuilder<self::MethodDescriptorProto> Clear() {
+        result = new self::MethodDescriptorProto();
+        return this;
+      }
+      
+      public override IBuilder<self::MethodDescriptorProto> Clone() {
+        return new Builder().MergeFrom(result);
+      }
+      
+      public override pbd::MessageDescriptor DescriptorForType {
+        get { return self::MethodDescriptorProto.Descriptor; }
+      }
+      
+      public override self::MethodDescriptorProto DefaultInstanceForType {
+        get { return self::MethodDescriptorProto.DefaultInstance; }
+      }
+      
+      public override self::MethodDescriptorProto BuildPartial() {
+        self::MethodDescriptorProto returnMe = result;
+        result = null;
+        return returnMe;
+      }
+      
+      public override IBuilder MergeFrom(pb::IMessage other) {
+        if (other is self::MethodDescriptorProto) {
+          return MergeFrom((self::MethodDescriptorProto) other);
+        } else {
+          base.MergeFrom(other);
+          return this;
+        }
+      }
+      
+      public override IBuilder<self::MethodDescriptorProto> MergeFrom(self::MethodDescriptorProto other) {
+        if (other == self::MethodDescriptorProto.DefaultInstance) return this;
+        if (other.HasName) {
+          Name = other.Name;
+        }
+        if (other.HasInputType) {
+          InputType = other.InputType;
+        }
+        if (other.HasOutputType) {
+          OutputType = other.OutputType;
+        }
+        if (other.HasOptions) {
+          MergeOptions(other.Options);
+        }
+        this.MergeUnknownFields(other.UnknownFields);
+        return this;
+      }
+      
+      public override IBuilder<self::MethodDescriptorProto> MergeFrom(pb::CodedInputStream input) {
+        return MergeFrom(input, pb::ExtensionRegistry.Empty);
+      }
+      
+      public override IBuilder<self::MethodDescriptorProto> MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+        pb::UnknownFieldSet.Builder unknownFields =
+          pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+        while (true) {
+          uint tag = input.ReadTag();
+          switch (tag) {
+            case 0:
+              this.UnknownFields = unknownFields.Build();
+              return this;
+            default: {
+              if (!ParseUnknownField(input, unknownFields,
+                                     extensionRegistry, tag)) {
+                this.UnknownFields = unknownFields.Build();
+                return this;
+              }
+              break;
+            }
+            case 10: {
+              Name = input.ReadString();
+              break;
+            }
+            case 18: {
+              InputType = input.ReadString();
+              break;
+            }
+            case 26: {
+              OutputType = input.ReadString();
+              break;
+            }
+            case 34: {
+              self::MethodOptions.Builder subBuilder = self::MethodOptions.CreateBuilder();
+              if (HasOptions) {
+                subBuilder.MergeFrom(Options);
+              }
+              input.ReadMessage(subBuilder, extensionRegistry);
+              Options = subBuilder.BuildPartial();
+              break;
+            }
+          }
+        }
+      }
+      
+      
+      // optional string name = 1;
+      public bool HasName {
+        get { return result.HasName; }
+      }
+      public string Name {
+        get { return result.Name; }
+        set { SetName(value); }
+      }
+      public Builder SetName(string value) {
+        result.hasName = true;
+        result.name_ = value;
+        return this;
+      }
+      public Builder ClearName() {
+        result.hasName = false;
+        result.name_ = "";
+        return this;
+      }
+      
+      // optional string input_type = 2;
+      public bool HasInputType {
+        get { return result.HasInputType; }
+      }
+      public string InputType {
+        get { return result.InputType; }
+        set { SetInputType(value); }
+      }
+      public Builder SetInputType(string value) {
+        result.hasInputType = true;
+        result.inputType_ = value;
+        return this;
+      }
+      public Builder ClearInputType() {
+        result.hasInputType = false;
+        result.inputType_ = "";
+        return this;
+      }
+      
+      // optional string output_type = 3;
+      public bool HasOutputType {
+        get { return result.HasOutputType; }
+      }
+      public string OutputType {
+        get { return result.OutputType; }
+        set { SetOutputType(value); }
+      }
+      public Builder SetOutputType(string value) {
+        result.hasOutputType = true;
+        result.outputType_ = value;
+        return this;
+      }
+      public Builder ClearOutputType() {
+        result.hasOutputType = false;
+        result.outputType_ = "";
+        return this;
+      }
+      
+      // optional .google.protobuf.MethodOptions options = 4;
+      public bool HasOptions {
+        get { return result.HasOptions; }
+      }
+      public self::MethodOptions Options {
+        get { return result.Options; }
+        set { SetOptions(value); }
+      }
+      public Builder SetOptions(self::MethodOptions value) {
+        result.hasOptions = true;
+        result.options_ = value;
+        return this;
+      }
+      public Builder SetOptions(self::MethodOptions.Builder builderForValue) {
+        result.hasOptions = true;
+        result.options_ = builderForValue.Build();
+        return this;
+      }
+      public Builder MergeOptions(self::MethodOptions value) {
+        if (result.HasOptions &&
+            result.options_ != self::MethodOptions.DefaultInstance) {
+          result.options_ =
+            self::MethodOptions.CreateBuilder(result.options_).MergeFrom(value).BuildPartial();
+        } else {
+          result.options_ = value;
+        }
+        result.hasOptions = true;
+        return this;
+      }
+      public Builder ClearOptions() {
+        result.hasOptions = false;
+        result.options_ = self::MethodOptions.DefaultInstance;
+        return this;
+      }
+    }
+  }
+  
+  public sealed partial class FileOptions : pb::GeneratedMessage<FileOptions, FileOptions.Builder> {
+    // Use FileOptions.CreateBuilder() to construct.
+    private FileOptions() {}
+    
+    private static readonly FileOptions defaultInstance = new FileOptions();
+    public static FileOptions DefaultInstance {
+      get { return defaultInstance; }
+    }
+    
+    public override FileOptions DefaultInstanceForType {
+      get { return defaultInstance; }
+    }
+    
+    public static pbd::MessageDescriptor Descriptor {
+      get { return self::DescriptorProtoFile.internal__static_google_protobuf_FileOptions__Descriptor; }
+    }
+    
+    protected internal override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors {
+      get { return self::DescriptorProtoFile.internal__static_google_protobuf_FileOptions__FieldAccessorTable; }
+    }
+    
+    #region Nested types
+    public static class Types {
+      public enum OptimizeMode {
+        [pbd::EnumDescriptorIndex(0)]
+        SPEED = 1,
+        [pbd::EnumDescriptorIndex(1)]
+        CODE_SIZE = 2,
+      }
+      
+    }
+    #endregion
+    
+    // optional string java_package = 1;
+    private bool hasJavaPackage;
+    private string javaPackage_ = "";
+    public bool HasJavaPackage {
+      get { return hasJavaPackage; }
+    }
+    public string JavaPackage {
+      get { return javaPackage_; }
+    }
+    
+    // optional string java_outer_classname = 8;
+    private bool hasJavaOuterClassname;
+    private string javaOuterClassname_ = "";
+    public bool HasJavaOuterClassname {
+      get { return hasJavaOuterClassname; }
+    }
+    public string JavaOuterClassname {
+      get { return javaOuterClassname_; }
+    }
+    
+    // optional bool java_multiple_files = 10 [default = false];
+    private bool hasJavaMultipleFiles;
+    private bool javaMultipleFiles_ = false;
+    public bool HasJavaMultipleFiles {
+      get { return hasJavaMultipleFiles; }
+    }
+    public bool JavaMultipleFiles {
+      get { return javaMultipleFiles_; }
+    }
+    
+    // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = CODE_SIZE];
+    private bool hasOptimizeFor;
+    private self::FileOptions.Types.OptimizeMode optimizeFor_ = self::FileOptions.Types.OptimizeMode.CODE_SIZE;
+    public bool HasOptimizeFor {
+      get { return hasOptimizeFor; }
+    }
+    public self::FileOptions.Types.OptimizeMode OptimizeFor {  get { return optimizeFor_; }}
+    
+    // optional string csharp_namespace = 1000;
+    private bool hasCsharpNamespace;
+    private string csharpNamespace_ = "";
+    public bool HasCsharpNamespace {
+      get { return hasCsharpNamespace; }
+    }
+    public string CsharpNamespace {
+      get { return csharpNamespace_; }
+    }
+    
+    // optional string csharp_file_classname = 1001;
+    private bool hasCsharpFileClassname;
+    private string csharpFileClassname_ = "";
+    public bool HasCsharpFileClassname {
+      get { return hasCsharpFileClassname; }
+    }
+    public string CsharpFileClassname {
+      get { return csharpFileClassname_; }
+    }
+    
+    // optional bool csharp_multiple_files = 1002 [default = false];
+    private bool hasCsharpMultipleFiles;
+    private bool csharpMultipleFiles_ = false;
+    public bool HasCsharpMultipleFiles {
+      get { return hasCsharpMultipleFiles; }
+    }
+    public bool CsharpMultipleFiles {
+      get { return csharpMultipleFiles_; }
+    }
+    
+    // optional bool csharp_nest_classes = 1003 [default = false];
+    private bool hasCsharpNestClasses;
+    private bool csharpNestClasses_ = false;
+    public bool HasCsharpNestClasses {
+      get { return hasCsharpNestClasses; }
+    }
+    public bool CsharpNestClasses {
+      get { return csharpNestClasses_; }
+    }
+    
+    // optional bool csharp_public_classes = 1004 [default = true];
+    private bool hasCsharpPublicClasses;
+    private bool csharpPublicClasses_ = true;
+    public bool HasCsharpPublicClasses {
+      get { return hasCsharpPublicClasses; }
+    }
+    public bool CsharpPublicClasses {
+      get { return csharpPublicClasses_; }
+    }
+    
+    public override bool IsInitialized {
+      get {
+        return true;
+      }
+    }
+    
+    public override void WriteTo(pb::CodedOutputStream output) {
+      if (HasJavaPackage) {
+        output.WriteString(1, JavaPackage);
+      }
+      if (HasJavaOuterClassname) {
+        output.WriteString(8, JavaOuterClassname);
+      }
+      if (HasOptimizeFor) {
+        output.WriteEnum(9, (int) OptimizeFor);
+      }
+      if (HasJavaMultipleFiles) {
+        output.WriteBool(10, JavaMultipleFiles);
+      }
+      if (HasCsharpNamespace) {
+        output.WriteString(1000, CsharpNamespace);
+      }
+      if (HasCsharpFileClassname) {
+        output.WriteString(1001, CsharpFileClassname);
+      }
+      if (HasCsharpMultipleFiles) {
+        output.WriteBool(1002, CsharpMultipleFiles);
+      }
+      if (HasCsharpNestClasses) {
+        output.WriteBool(1003, CsharpNestClasses);
+      }
+      if (HasCsharpPublicClasses) {
+        output.WriteBool(1004, CsharpPublicClasses);
+      }
+      UnknownFields.WriteTo(output);
+    }
+    
+    private int memoizedSerializedSize = -1;
+    public override int SerializedSize {
+      get {
+        int size = memoizedSerializedSize;
+        if (size != -1) return size;
+        
+        size = 0;
+        if (HasJavaPackage) {
+          size += pb::CodedOutputStream.ComputeStringSize(1, JavaPackage);
+        }
+        if (HasJavaOuterClassname) {
+          size += pb::CodedOutputStream.ComputeStringSize(8, JavaOuterClassname);
+        }
+        if (HasOptimizeFor) {
+          size += pb::CodedOutputStream
+            .ComputeEnumSize(9, (int) OptimizeFor);
+        }
+        if (HasJavaMultipleFiles) {
+          size += pb::CodedOutputStream.ComputeBoolSize(10, JavaMultipleFiles);
+        }
+        if (HasCsharpNamespace) {
+          size += pb::CodedOutputStream.ComputeStringSize(1000, CsharpNamespace);
+        }
+        if (HasCsharpFileClassname) {
+          size += pb::CodedOutputStream.ComputeStringSize(1001, CsharpFileClassname);
+        }
+        if (HasCsharpMultipleFiles) {
+          size += pb::CodedOutputStream.ComputeBoolSize(1002, CsharpMultipleFiles);
+        }
+        if (HasCsharpNestClasses) {
+          size += pb::CodedOutputStream.ComputeBoolSize(1003, CsharpNestClasses);
+        }
+        if (HasCsharpPublicClasses) {
+          size += pb::CodedOutputStream.ComputeBoolSize(1004, CsharpPublicClasses);
+        }
+        size += UnknownFields.SerializedSize;
+        memoizedSerializedSize = size;
+        return size;
+      }
+    }
+    
+    public static self::FileOptions ParseFrom(pb::ByteString data) {
+      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+    }
+    public static self::FileOptions ParseFrom(pb::ByteString data,
+        pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
+               .BuildParsed();
+    }
+    public static self::FileOptions ParseFrom(byte[] data) {
+      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+    }
+    public static self::FileOptions parseFrom(byte[] data,
+        pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
+               .BuildParsed();
+    }
+    public static self::FileOptions ParseFrom(global::System.IO.Stream input) {
+      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+    }
+    public static self::FileOptions ParseFrom(
+        global::System.IO.Stream input,
+        pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
+               .BuildParsed();
+    }
+    public static self::FileOptions ParseFrom(pb::CodedInputStream input) {
+      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+    }
+    public static self::FileOptions ParseFrom(pb::CodedInputStream input,
+        pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
+               .BuildParsed();
+    }
+    
+    public static Builder CreateBuilder() { return new Builder(); }
+    public override IBuilder<self::FileOptions> CreateBuilderForType() { return new Builder(); }
+    public static Builder CreateBuilder(self::FileOptions prototype) {
+      return (Builder) new Builder().MergeFrom(prototype);
+    }
+    
+    public sealed partial class Builder : pb::GeneratedBuilder<self::FileOptions, Builder> {
+      // Construct using self::FileOptions.CreateBuilder()
+      internal Builder() {}
+      
+      self::FileOptions result = new self::FileOptions();
+      
+      protected override self::FileOptions MessageBeingBuilt {
+        get { return result; }
+      }
+      
+      public override IBuilder<self::FileOptions> Clear() {
+        result = new self::FileOptions();
+        return this;
+      }
+      
+      public override IBuilder<self::FileOptions> Clone() {
+        return new Builder().MergeFrom(result);
+      }
+      
+      public override pbd::MessageDescriptor DescriptorForType {
+        get { return self::FileOptions.Descriptor; }
+      }
+      
+      public override self::FileOptions DefaultInstanceForType {
+        get { return self::FileOptions.DefaultInstance; }
+      }
+      
+      public override self::FileOptions BuildPartial() {
+        self::FileOptions returnMe = result;
+        result = null;
+        return returnMe;
+      }
+      
+      public override IBuilder MergeFrom(pb::IMessage other) {
+        if (other is self::FileOptions) {
+          return MergeFrom((self::FileOptions) other);
+        } else {
+          base.MergeFrom(other);
+          return this;
+        }
+      }
+      
+      public override IBuilder<self::FileOptions> MergeFrom(self::FileOptions other) {
+        if (other == self::FileOptions.DefaultInstance) return this;
+        if (other.HasJavaPackage) {
+          JavaPackage = other.JavaPackage;
+        }
+        if (other.HasJavaOuterClassname) {
+          JavaOuterClassname = other.JavaOuterClassname;
+        }
+        if (other.HasJavaMultipleFiles) {
+          JavaMultipleFiles = other.JavaMultipleFiles;
+        }
+        if (other.HasOptimizeFor) {
+          OptimizeFor = other.OptimizeFor;
+        }
+        if (other.HasCsharpNamespace) {
+          CsharpNamespace = other.CsharpNamespace;
+        }
+        if (other.HasCsharpFileClassname) {
+          CsharpFileClassname = other.CsharpFileClassname;
+        }
+        if (other.HasCsharpMultipleFiles) {
+          CsharpMultipleFiles = other.CsharpMultipleFiles;
+        }
+        if (other.HasCsharpNestClasses) {
+          CsharpNestClasses = other.CsharpNestClasses;
+        }
+        if (other.HasCsharpPublicClasses) {
+          CsharpPublicClasses = other.CsharpPublicClasses;
+        }
+        this.MergeUnknownFields(other.UnknownFields);
+        return this;
+      }
+      
+      public override IBuilder<self::FileOptions> MergeFrom(pb::CodedInputStream input) {
+        return MergeFrom(input, pb::ExtensionRegistry.Empty);
+      }
+      
+      public override IBuilder<self::FileOptions> MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+        pb::UnknownFieldSet.Builder unknownFields =
+          pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+        while (true) {
+          uint tag = input.ReadTag();
+          switch (tag) {
+            case 0:
+              this.UnknownFields = unknownFields.Build();
+              return this;
+            default: {
+              if (!ParseUnknownField(input, unknownFields,
+                                     extensionRegistry, tag)) {
+                this.UnknownFields = unknownFields.Build();
+                return this;
+              }
+              break;
+            }
+            case 10: {
+              JavaPackage = input.ReadString();
+              break;
+            }
+            case 66: {
+              JavaOuterClassname = input.ReadString();
+              break;
+            }
+            case 72: {
+              int rawValue = input.ReadEnum();
+              if (!global::System.Enum.IsDefined(typeof(self::FileOptions.Types.OptimizeMode), rawValue)) {
+                unknownFields.MergeVarintField(9, (ulong) rawValue);
+              } else {
+                OptimizeFor = (self::FileOptions.Types.OptimizeMode) rawValue;
+              }
+              break;
+            }
+            case 80: {
+              JavaMultipleFiles = input.ReadBool();
+              break;
+            }
+            case 8002: {
+              CsharpNamespace = input.ReadString();
+              break;
+            }
+            case 8010: {
+              CsharpFileClassname = input.ReadString();
+              break;
+            }
+            case 8016: {
+              CsharpMultipleFiles = input.ReadBool();
+              break;
+            }
+            case 8024: {
+              CsharpNestClasses = input.ReadBool();
+              break;
+            }
+            case 8032: {
+              CsharpPublicClasses = input.ReadBool();
+              break;
+            }
+          }
+        }
+      }
+      
+      
+      // optional string java_package = 1;
+      public bool HasJavaPackage {
+        get { return result.HasJavaPackage; }
+      }
+      public string JavaPackage {
+        get { return result.JavaPackage; }
+        set { SetJavaPackage(value); }
+      }
+      public Builder SetJavaPackage(string value) {
+        result.hasJavaPackage = true;
+        result.javaPackage_ = value;
+        return this;
+      }
+      public Builder ClearJavaPackage() {
+        result.hasJavaPackage = false;
+        result.javaPackage_ = "";
+        return this;
+      }
+      
+      // optional string java_outer_classname = 8;
+      public bool HasJavaOuterClassname {
+        get { return result.HasJavaOuterClassname; }
+      }
+      public string JavaOuterClassname {
+        get { return result.JavaOuterClassname; }
+        set { SetJavaOuterClassname(value); }
+      }
+      public Builder SetJavaOuterClassname(string value) {
+        result.hasJavaOuterClassname = true;
+        result.javaOuterClassname_ = value;
+        return this;
+      }
+      public Builder ClearJavaOuterClassname() {
+        result.hasJavaOuterClassname = false;
+        result.javaOuterClassname_ = "";
+        return this;
+      }
+      
+      // optional bool java_multiple_files = 10 [default = false];
+      public bool HasJavaMultipleFiles {
+        get { return result.HasJavaMultipleFiles; }
+      }
+      public bool JavaMultipleFiles {
+        get { return result.JavaMultipleFiles; }
+        set { SetJavaMultipleFiles(value); }
+      }
+      public Builder SetJavaMultipleFiles(bool value) {
+        result.hasJavaMultipleFiles = true;
+        result.javaMultipleFiles_ = value;
+        return this;
+      }
+      public Builder ClearJavaMultipleFiles() {
+        result.hasJavaMultipleFiles = false;
+        result.javaMultipleFiles_ = false;
+        return this;
+      }
+      
+      // optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = CODE_SIZE];
+      public bool HasOptimizeFor {
+        get { return result.HasOptimizeFor; }
+      }
+      public self::FileOptions.Types.OptimizeMode OptimizeFor {
+        get { return result.OptimizeFor; }
+        set { SetOptimizeFor(value); }
+      }
+      public Builder SetOptimizeFor(self::FileOptions.Types.OptimizeMode value) {
+        result.hasOptimizeFor = true;
+        result.optimizeFor_ = value;
+        return this;
+      }
+      public Builder ClearOptimizeFor() {
+        result.hasOptimizeFor = false;
+        result.optimizeFor_ = self::FileOptions.Types.OptimizeMode.CODE_SIZE;
+        return this;
+      }
+      
+      // optional string csharp_namespace = 1000;
+      public bool HasCsharpNamespace {
+        get { return result.HasCsharpNamespace; }
+      }
+      public string CsharpNamespace {
+        get { return result.CsharpNamespace; }
+        set { SetCsharpNamespace(value); }
+      }
+      public Builder SetCsharpNamespace(string value) {
+        result.hasCsharpNamespace = true;
+        result.csharpNamespace_ = value;
+        return this;
+      }
+      public Builder ClearCsharpNamespace() {
+        result.hasCsharpNamespace = false;
+        result.csharpNamespace_ = "";
+        return this;
+      }
+      
+      // optional string csharp_file_classname = 1001;
+      public bool HasCsharpFileClassname {
+        get { return result.HasCsharpFileClassname; }
+      }
+      public string CsharpFileClassname {
+        get { return result.CsharpFileClassname; }
+        set { SetCsharpFileClassname(value); }
+      }
+      public Builder SetCsharpFileClassname(string value) {
+        result.hasCsharpFileClassname = true;
+        result.csharpFileClassname_ = value;
+        return this;
+      }
+      public Builder ClearCsharpFileClassname() {
+        result.hasCsharpFileClassname = false;
+        result.csharpFileClassname_ = "";
+        return this;
+      }
+      
+      // optional bool csharp_multiple_files = 1002 [default = false];
+      public bool HasCsharpMultipleFiles {
+        get { return result.HasCsharpMultipleFiles; }
+      }
+      public bool CsharpMultipleFiles {
+        get { return result.CsharpMultipleFiles; }
+        set { SetCsharpMultipleFiles(value); }
+      }
+      public Builder SetCsharpMultipleFiles(bool value) {
+        result.hasCsharpMultipleFiles = true;
+        result.csharpMultipleFiles_ = value;
+        return this;
+      }
+      public Builder ClearCsharpMultipleFiles() {
+        result.hasCsharpMultipleFiles = false;
+        result.csharpMultipleFiles_ = false;
+        return this;
+      }
+      
+      // optional bool csharp_nest_classes = 1003 [default = false];
+      public bool HasCsharpNestClasses {
+        get { return result.HasCsharpNestClasses; }
+      }
+      public bool CsharpNestClasses {
+        get { return result.CsharpNestClasses; }
+        set { SetCsharpNestClasses(value); }
+      }
+      public Builder SetCsharpNestClasses(bool value) {
+        result.hasCsharpNestClasses = true;
+        result.csharpNestClasses_ = value;
+        return this;
+      }
+      public Builder ClearCsharpNestClasses() {
+        result.hasCsharpNestClasses = false;
+        result.csharpNestClasses_ = false;
+        return this;
+      }
+      
+      // optional bool csharp_public_classes = 1004 [default = true];
+      public bool HasCsharpPublicClasses {
+        get { return result.HasCsharpPublicClasses; }
+      }
+      public bool CsharpPublicClasses {
+        get { return result.CsharpPublicClasses; }
+        set { SetCsharpPublicClasses(value); }
+      }
+      public Builder SetCsharpPublicClasses(bool value) {
+        result.hasCsharpPublicClasses = true;
+        result.csharpPublicClasses_ = value;
+        return this;
+      }
+      public Builder ClearCsharpPublicClasses() {
+        result.hasCsharpPublicClasses = false;
+        result.csharpPublicClasses_ = true;
+        return this;
+      }
+    }
+  }
+  
+  public sealed partial class MessageOptions : pb::GeneratedMessage<MessageOptions, MessageOptions.Builder> {
+    // Use MessageOptions.CreateBuilder() to construct.
+    private MessageOptions() {}
+    
+    private static readonly MessageOptions defaultInstance = new MessageOptions();
+    public static MessageOptions DefaultInstance {
+      get { return defaultInstance; }
+    }
+    
+    public override MessageOptions DefaultInstanceForType {
+      get { return defaultInstance; }
+    }
+    
+    public static pbd::MessageDescriptor Descriptor {
+      get { return self::DescriptorProtoFile.internal__static_google_protobuf_MessageOptions__Descriptor; }
+    }
+    
+    protected internal override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors {
+      get { return self::DescriptorProtoFile.internal__static_google_protobuf_MessageOptions__FieldAccessorTable; }
+    }
+    
+    // optional bool message_set_wire_format = 1 [default = false];
+    private bool hasMessageSetWireFormat;
+    private bool messageSetWireFormat_ = false;
+    public bool HasMessageSetWireFormat {
+      get { return hasMessageSetWireFormat; }
+    }
+    public bool MessageSetWireFormat {
+      get { return messageSetWireFormat_; }
+    }
+    
+    public override bool IsInitialized {
+      get {
+        return true;
+      }
+    }
+    
+    public override void WriteTo(pb::CodedOutputStream output) {
+      if (HasMessageSetWireFormat) {
+        output.WriteBool(1, MessageSetWireFormat);
+      }
+      UnknownFields.WriteTo(output);
+    }
+    
+    private int memoizedSerializedSize = -1;
+    public override int SerializedSize {
+      get {
+        int size = memoizedSerializedSize;
+        if (size != -1) return size;
+        
+        size = 0;
+        if (HasMessageSetWireFormat) {
+          size += pb::CodedOutputStream.ComputeBoolSize(1, MessageSetWireFormat);
+        }
+        size += UnknownFields.SerializedSize;
+        memoizedSerializedSize = size;
+        return size;
+      }
+    }
+    
+    public static self::MessageOptions ParseFrom(pb::ByteString data) {
+      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+    }
+    public static self::MessageOptions ParseFrom(pb::ByteString data,
+        pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
+               .BuildParsed();
+    }
+    public static self::MessageOptions ParseFrom(byte[] data) {
+      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+    }
+    public static self::MessageOptions parseFrom(byte[] data,
+        pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
+               .BuildParsed();
+    }
+    public static self::MessageOptions ParseFrom(global::System.IO.Stream input) {
+      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+    }
+    public static self::MessageOptions ParseFrom(
+        global::System.IO.Stream input,
+        pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
+               .BuildParsed();
+    }
+    public static self::MessageOptions ParseFrom(pb::CodedInputStream input) {
+      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+    }
+    public static self::MessageOptions ParseFrom(pb::CodedInputStream input,
+        pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
+               .BuildParsed();
+    }
+    
+    public static Builder CreateBuilder() { return new Builder(); }
+    public override IBuilder<self::MessageOptions> CreateBuilderForType() { return new Builder(); }
+    public static Builder CreateBuilder(self::MessageOptions prototype) {
+      return (Builder) new Builder().MergeFrom(prototype);
+    }
+    
+    public sealed partial class Builder : pb::GeneratedBuilder<self::MessageOptions, Builder> {
+      // Construct using self::MessageOptions.CreateBuilder()
+      internal Builder() {}
+      
+      self::MessageOptions result = new self::MessageOptions();
+      
+      protected override self::MessageOptions MessageBeingBuilt {
+        get { return result; }
+      }
+      
+      public override IBuilder<self::MessageOptions> Clear() {
+        result = new self::MessageOptions();
+        return this;
+      }
+      
+      public override IBuilder<self::MessageOptions> Clone() {
+        return new Builder().MergeFrom(result);
+      }
+      
+      public override pbd::MessageDescriptor DescriptorForType {
+        get { return self::MessageOptions.Descriptor; }
+      }
+      
+      public override self::MessageOptions DefaultInstanceForType {
+        get { return self::MessageOptions.DefaultInstance; }
+      }
+      
+      public override self::MessageOptions BuildPartial() {
+        self::MessageOptions returnMe = result;
+        result = null;
+        return returnMe;
+      }
+      
+      public override IBuilder MergeFrom(pb::IMessage other) {
+        if (other is self::MessageOptions) {
+          return MergeFrom((self::MessageOptions) other);
+        } else {
+          base.MergeFrom(other);
+          return this;
+        }
+      }
+      
+      public override IBuilder<self::MessageOptions> MergeFrom(self::MessageOptions other) {
+        if (other == self::MessageOptions.DefaultInstance) return this;
+        if (other.HasMessageSetWireFormat) {
+          MessageSetWireFormat = other.MessageSetWireFormat;
+        }
+        this.MergeUnknownFields(other.UnknownFields);
+        return this;
+      }
+      
+      public override IBuilder<self::MessageOptions> MergeFrom(pb::CodedInputStream input) {
+        return MergeFrom(input, pb::ExtensionRegistry.Empty);
+      }
+      
+      public override IBuilder<self::MessageOptions> MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+        pb::UnknownFieldSet.Builder unknownFields =
+          pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+        while (true) {
+          uint tag = input.ReadTag();
+          switch (tag) {
+            case 0:
+              this.UnknownFields = unknownFields.Build();
+              return this;
+            default: {
+              if (!ParseUnknownField(input, unknownFields,
+                                     extensionRegistry, tag)) {
+                this.UnknownFields = unknownFields.Build();
+                return this;
+              }
+              break;
+            }
+            case 8: {
+              MessageSetWireFormat = input.ReadBool();
+              break;
+            }
+          }
+        }
+      }
+      
+      
+      // optional bool message_set_wire_format = 1 [default = false];
+      public bool HasMessageSetWireFormat {
+        get { return result.HasMessageSetWireFormat; }
+      }
+      public bool MessageSetWireFormat {
+        get { return result.MessageSetWireFormat; }
+        set { SetMessageSetWireFormat(value); }
+      }
+      public Builder SetMessageSetWireFormat(bool value) {
+        result.hasMessageSetWireFormat = true;
+        result.messageSetWireFormat_ = value;
+        return this;
+      }
+      public Builder ClearMessageSetWireFormat() {
+        result.hasMessageSetWireFormat = false;
+        result.messageSetWireFormat_ = false;
+        return this;
+      }
+    }
+  }
+  
+  public sealed partial class FieldOptions : pb::GeneratedMessage<FieldOptions, FieldOptions.Builder> {
+    // Use FieldOptions.CreateBuilder() to construct.
+    private FieldOptions() {}
+    
+    private static readonly FieldOptions defaultInstance = new FieldOptions();
+    public static FieldOptions DefaultInstance {
+      get { return defaultInstance; }
+    }
+    
+    public override FieldOptions DefaultInstanceForType {
+      get { return defaultInstance; }
+    }
+    
+    public static pbd::MessageDescriptor Descriptor {
+      get { return self::DescriptorProtoFile.internal__static_google_protobuf_FieldOptions__Descriptor; }
+    }
+    
+    protected internal override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors {
+      get { return self::DescriptorProtoFile.internal__static_google_protobuf_FieldOptions__FieldAccessorTable; }
+    }
+    
+    #region Nested types
+    public static class Types {
+      public enum CType {
+        [pbd::EnumDescriptorIndex(0)]
+        CORD = 1,
+        [pbd::EnumDescriptorIndex(1)]
+        STRING_PIECE = 2,
+      }
+      
+    }
+    #endregion
+    
+    // optional .google.protobuf.FieldOptions.CType ctype = 1;
+    private bool hasCtype;
+    private self::FieldOptions.Types.CType ctype_ = self::FieldOptions.Types.CType.CORD;
+    public bool HasCtype {
+      get { return hasCtype; }
+    }
+    public self::FieldOptions.Types.CType Ctype {  get { return ctype_; }}
+    
+    // optional string experimental_map_key = 9;
+    private bool hasExperimentalMapKey;
+    private string experimentalMapKey_ = "";
+    public bool HasExperimentalMapKey {
+      get { return hasExperimentalMapKey; }
+    }
+    public string ExperimentalMapKey {
+      get { return experimentalMapKey_; }
+    }
+    
+    public override bool IsInitialized {
+      get {
+        return true;
+      }
+    }
+    
+    public override void WriteTo(pb::CodedOutputStream output) {
+      if (HasCtype) {
+        output.WriteEnum(1, (int) Ctype);
+      }
+      if (HasExperimentalMapKey) {
+        output.WriteString(9, ExperimentalMapKey);
+      }
+      UnknownFields.WriteTo(output);
+    }
+    
+    private int memoizedSerializedSize = -1;
+    public override int SerializedSize {
+      get {
+        int size = memoizedSerializedSize;
+        if (size != -1) return size;
+        
+        size = 0;
+        if (HasCtype) {
+          size += pb::CodedOutputStream
+            .ComputeEnumSize(1, (int) Ctype);
+        }
+        if (HasExperimentalMapKey) {
+          size += pb::CodedOutputStream.ComputeStringSize(9, ExperimentalMapKey);
+        }
+        size += UnknownFields.SerializedSize;
+        memoizedSerializedSize = size;
+        return size;
+      }
+    }
+    
+    public static self::FieldOptions ParseFrom(pb::ByteString data) {
+      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+    }
+    public static self::FieldOptions ParseFrom(pb::ByteString data,
+        pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
+               .BuildParsed();
+    }
+    public static self::FieldOptions ParseFrom(byte[] data) {
+      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+    }
+    public static self::FieldOptions parseFrom(byte[] data,
+        pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
+               .BuildParsed();
+    }
+    public static self::FieldOptions ParseFrom(global::System.IO.Stream input) {
+      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+    }
+    public static self::FieldOptions ParseFrom(
+        global::System.IO.Stream input,
+        pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
+               .BuildParsed();
+    }
+    public static self::FieldOptions ParseFrom(pb::CodedInputStream input) {
+      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+    }
+    public static self::FieldOptions ParseFrom(pb::CodedInputStream input,
+        pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
+               .BuildParsed();
+    }
+    
+    public static Builder CreateBuilder() { return new Builder(); }
+    public override IBuilder<self::FieldOptions> CreateBuilderForType() { return new Builder(); }
+    public static Builder CreateBuilder(self::FieldOptions prototype) {
+      return (Builder) new Builder().MergeFrom(prototype);
+    }
+    
+    public sealed partial class Builder : pb::GeneratedBuilder<self::FieldOptions, Builder> {
+      // Construct using self::FieldOptions.CreateBuilder()
+      internal Builder() {}
+      
+      self::FieldOptions result = new self::FieldOptions();
+      
+      protected override self::FieldOptions MessageBeingBuilt {
+        get { return result; }
+      }
+      
+      public override IBuilder<self::FieldOptions> Clear() {
+        result = new self::FieldOptions();
+        return this;
+      }
+      
+      public override IBuilder<self::FieldOptions> Clone() {
+        return new Builder().MergeFrom(result);
+      }
+      
+      public override pbd::MessageDescriptor DescriptorForType {
+        get { return self::FieldOptions.Descriptor; }
+      }
+      
+      public override self::FieldOptions DefaultInstanceForType {
+        get { return self::FieldOptions.DefaultInstance; }
+      }
+      
+      public override self::FieldOptions BuildPartial() {
+        self::FieldOptions returnMe = result;
+        result = null;
+        return returnMe;
+      }
+      
+      public override IBuilder MergeFrom(pb::IMessage other) {
+        if (other is self::FieldOptions) {
+          return MergeFrom((self::FieldOptions) other);
+        } else {
+          base.MergeFrom(other);
+          return this;
+        }
+      }
+      
+      public override IBuilder<self::FieldOptions> MergeFrom(self::FieldOptions other) {
+        if (other == self::FieldOptions.DefaultInstance) return this;
+        if (other.HasCtype) {
+          Ctype = other.Ctype;
+        }
+        if (other.HasExperimentalMapKey) {
+          ExperimentalMapKey = other.ExperimentalMapKey;
+        }
+        this.MergeUnknownFields(other.UnknownFields);
+        return this;
+      }
+      
+      public override IBuilder<self::FieldOptions> MergeFrom(pb::CodedInputStream input) {
+        return MergeFrom(input, pb::ExtensionRegistry.Empty);
+      }
+      
+      public override IBuilder<self::FieldOptions> MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+        pb::UnknownFieldSet.Builder unknownFields =
+          pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+        while (true) {
+          uint tag = input.ReadTag();
+          switch (tag) {
+            case 0:
+              this.UnknownFields = unknownFields.Build();
+              return this;
+            default: {
+              if (!ParseUnknownField(input, unknownFields,
+                                     extensionRegistry, tag)) {
+                this.UnknownFields = unknownFields.Build();
+                return this;
+              }
+              break;
+            }
+            case 8: {
+              int rawValue = input.ReadEnum();
+              if (!global::System.Enum.IsDefined(typeof(self::FieldOptions.Types.CType), rawValue)) {
+                unknownFields.MergeVarintField(1, (ulong) rawValue);
+              } else {
+                Ctype = (self::FieldOptions.Types.CType) rawValue;
+              }
+              break;
+            }
+            case 74: {
+              ExperimentalMapKey = input.ReadString();
+              break;
+            }
+          }
+        }
+      }
+      
+      
+      // optional .google.protobuf.FieldOptions.CType ctype = 1;
+      public bool HasCtype {
+        get { return result.HasCtype; }
+      }
+      public self::FieldOptions.Types.CType Ctype {
+        get { return result.Ctype; }
+        set { SetCtype(value); }
+      }
+      public Builder SetCtype(self::FieldOptions.Types.CType value) {
+        result.hasCtype = true;
+        result.ctype_ = value;
+        return this;
+      }
+      public Builder ClearCtype() {
+        result.hasCtype = false;
+        result.ctype_ = self::FieldOptions.Types.CType.CORD;
+        return this;
+      }
+      
+      // optional string experimental_map_key = 9;
+      public bool HasExperimentalMapKey {
+        get { return result.HasExperimentalMapKey; }
+      }
+      public string ExperimentalMapKey {
+        get { return result.ExperimentalMapKey; }
+        set { SetExperimentalMapKey(value); }
+      }
+      public Builder SetExperimentalMapKey(string value) {
+        result.hasExperimentalMapKey = true;
+        result.experimentalMapKey_ = value;
+        return this;
+      }
+      public Builder ClearExperimentalMapKey() {
+        result.hasExperimentalMapKey = false;
+        result.experimentalMapKey_ = "";
+        return this;
+      }
+    }
+  }
+  
+  public sealed partial class EnumOptions : pb::GeneratedMessage<EnumOptions, EnumOptions.Builder> {
+    // Use EnumOptions.CreateBuilder() to construct.
+    private EnumOptions() {}
+    
+    private static readonly EnumOptions defaultInstance = new EnumOptions();
+    public static EnumOptions DefaultInstance {
+      get { return defaultInstance; }
+    }
+    
+    public override EnumOptions DefaultInstanceForType {
+      get { return defaultInstance; }
+    }
+    
+    public static pbd::MessageDescriptor Descriptor {
+      get { return self::DescriptorProtoFile.internal__static_google_protobuf_EnumOptions__Descriptor; }
+    }
+    
+    protected internal override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors {
+      get { return self::DescriptorProtoFile.internal__static_google_protobuf_EnumOptions__FieldAccessorTable; }
+    }
+    
+    public override bool IsInitialized {
+      get {
+        return true;
+      }
+    }
+    
+    public override void WriteTo(pb::CodedOutputStream output) {
+      UnknownFields.WriteTo(output);
+    }
+    
+    private int memoizedSerializedSize = -1;
+    public override int SerializedSize {
+      get {
+        int size = memoizedSerializedSize;
+        if (size != -1) return size;
+        
+        size = 0;
+        size += UnknownFields.SerializedSize;
+        memoizedSerializedSize = size;
+        return size;
+      }
+    }
+    
+    public static self::EnumOptions ParseFrom(pb::ByteString data) {
+      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+    }
+    public static self::EnumOptions ParseFrom(pb::ByteString data,
+        pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
+               .BuildParsed();
+    }
+    public static self::EnumOptions ParseFrom(byte[] data) {
+      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+    }
+    public static self::EnumOptions parseFrom(byte[] data,
+        pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
+               .BuildParsed();
+    }
+    public static self::EnumOptions ParseFrom(global::System.IO.Stream input) {
+      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+    }
+    public static self::EnumOptions ParseFrom(
+        global::System.IO.Stream input,
+        pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
+               .BuildParsed();
+    }
+    public static self::EnumOptions ParseFrom(pb::CodedInputStream input) {
+      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+    }
+    public static self::EnumOptions ParseFrom(pb::CodedInputStream input,
+        pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
+               .BuildParsed();
+    }
+    
+    public static Builder CreateBuilder() { return new Builder(); }
+    public override IBuilder<self::EnumOptions> CreateBuilderForType() { return new Builder(); }
+    public static Builder CreateBuilder(self::EnumOptions prototype) {
+      return (Builder) new Builder().MergeFrom(prototype);
+    }
+    
+    public sealed partial class Builder : pb::GeneratedBuilder<self::EnumOptions, Builder> {
+      // Construct using self::EnumOptions.CreateBuilder()
+      internal Builder() {}
+      
+      self::EnumOptions result = new self::EnumOptions();
+      
+      protected override self::EnumOptions MessageBeingBuilt {
+        get { return result; }
+      }
+      
+      public override IBuilder<self::EnumOptions> Clear() {
+        result = new self::EnumOptions();
+        return this;
+      }
+      
+      public override IBuilder<self::EnumOptions> Clone() {
+        return new Builder().MergeFrom(result);
+      }
+      
+      public override pbd::MessageDescriptor DescriptorForType {
+        get { return self::EnumOptions.Descriptor; }
+      }
+      
+      public override self::EnumOptions DefaultInstanceForType {
+        get { return self::EnumOptions.DefaultInstance; }
+      }
+      
+      public override self::EnumOptions BuildPartial() {
+        self::EnumOptions returnMe = result;
+        result = null;
+        return returnMe;
+      }
+      
+      public override IBuilder MergeFrom(pb::IMessage other) {
+        if (other is self::EnumOptions) {
+          return MergeFrom((self::EnumOptions) other);
+        } else {
+          base.MergeFrom(other);
+          return this;
+        }
+      }
+      
+      public override IBuilder<self::EnumOptions> MergeFrom(self::EnumOptions other) {
+        if (other == self::EnumOptions.DefaultInstance) return this;
+        this.MergeUnknownFields(other.UnknownFields);
+        return this;
+      }
+      
+      public override IBuilder<self::EnumOptions> MergeFrom(pb::CodedInputStream input) {
+        return MergeFrom(input, pb::ExtensionRegistry.Empty);
+      }
+      
+      public override IBuilder<self::EnumOptions> MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+        pb::UnknownFieldSet.Builder unknownFields =
+          pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+        while (true) {
+          uint tag = input.ReadTag();
+          switch (tag) {
+            case 0:
+              this.UnknownFields = unknownFields.Build();
+              return this;
+            default: {
+              if (!ParseUnknownField(input, unknownFields,
+                                     extensionRegistry, tag)) {
+                this.UnknownFields = unknownFields.Build();
+                return this;
+              }
+              break;
+            }
+          }
+        }
+      }
+      
+    }
+  }
+  
+  public sealed partial class EnumValueOptions : pb::GeneratedMessage<EnumValueOptions, EnumValueOptions.Builder> {
+    // Use EnumValueOptions.CreateBuilder() to construct.
+    private EnumValueOptions() {}
+    
+    private static readonly EnumValueOptions defaultInstance = new EnumValueOptions();
+    public static EnumValueOptions DefaultInstance {
+      get { return defaultInstance; }
+    }
+    
+    public override EnumValueOptions DefaultInstanceForType {
+      get { return defaultInstance; }
+    }
+    
+    public static pbd::MessageDescriptor Descriptor {
+      get { return self::DescriptorProtoFile.internal__static_google_protobuf_EnumValueOptions__Descriptor; }
+    }
+    
+    protected internal override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors {
+      get { return self::DescriptorProtoFile.internal__static_google_protobuf_EnumValueOptions__FieldAccessorTable; }
+    }
+    
+    public override bool IsInitialized {
+      get {
+        return true;
+      }
+    }
+    
+    public override void WriteTo(pb::CodedOutputStream output) {
+      UnknownFields.WriteTo(output);
+    }
+    
+    private int memoizedSerializedSize = -1;
+    public override int SerializedSize {
+      get {
+        int size = memoizedSerializedSize;
+        if (size != -1) return size;
+        
+        size = 0;
+        size += UnknownFields.SerializedSize;
+        memoizedSerializedSize = size;
+        return size;
+      }
+    }
+    
+    public static self::EnumValueOptions ParseFrom(pb::ByteString data) {
+      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+    }
+    public static self::EnumValueOptions ParseFrom(pb::ByteString data,
+        pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
+               .BuildParsed();
+    }
+    public static self::EnumValueOptions ParseFrom(byte[] data) {
+      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+    }
+    public static self::EnumValueOptions parseFrom(byte[] data,
+        pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
+               .BuildParsed();
+    }
+    public static self::EnumValueOptions ParseFrom(global::System.IO.Stream input) {
+      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+    }
+    public static self::EnumValueOptions ParseFrom(
+        global::System.IO.Stream input,
+        pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
+               .BuildParsed();
+    }
+    public static self::EnumValueOptions ParseFrom(pb::CodedInputStream input) {
+      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+    }
+    public static self::EnumValueOptions ParseFrom(pb::CodedInputStream input,
+        pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
+               .BuildParsed();
+    }
+    
+    public static Builder CreateBuilder() { return new Builder(); }
+    public override IBuilder<self::EnumValueOptions> CreateBuilderForType() { return new Builder(); }
+    public static Builder CreateBuilder(self::EnumValueOptions prototype) {
+      return (Builder) new Builder().MergeFrom(prototype);
+    }
+    
+    public sealed partial class Builder : pb::GeneratedBuilder<self::EnumValueOptions, Builder> {
+      // Construct using self::EnumValueOptions.CreateBuilder()
+      internal Builder() {}
+      
+      self::EnumValueOptions result = new self::EnumValueOptions();
+      
+      protected override self::EnumValueOptions MessageBeingBuilt {
+        get { return result; }
+      }
+      
+      public override IBuilder<self::EnumValueOptions> Clear() {
+        result = new self::EnumValueOptions();
+        return this;
+      }
+      
+      public override IBuilder<self::EnumValueOptions> Clone() {
+        return new Builder().MergeFrom(result);
+      }
+      
+      public override pbd::MessageDescriptor DescriptorForType {
+        get { return self::EnumValueOptions.Descriptor; }
+      }
+      
+      public override self::EnumValueOptions DefaultInstanceForType {
+        get { return self::EnumValueOptions.DefaultInstance; }
+      }
+      
+      public override self::EnumValueOptions BuildPartial() {
+        self::EnumValueOptions returnMe = result;
+        result = null;
+        return returnMe;
+      }
+      
+      public override IBuilder MergeFrom(pb::IMessage other) {
+        if (other is self::EnumValueOptions) {
+          return MergeFrom((self::EnumValueOptions) other);
+        } else {
+          base.MergeFrom(other);
+          return this;
+        }
+      }
+      
+      public override IBuilder<self::EnumValueOptions> MergeFrom(self::EnumValueOptions other) {
+        if (other == self::EnumValueOptions.DefaultInstance) return this;
+        this.MergeUnknownFields(other.UnknownFields);
+        return this;
+      }
+      
+      public override IBuilder<self::EnumValueOptions> MergeFrom(pb::CodedInputStream input) {
+        return MergeFrom(input, pb::ExtensionRegistry.Empty);
+      }
+      
+      public override IBuilder<self::EnumValueOptions> MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+        pb::UnknownFieldSet.Builder unknownFields =
+          pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+        while (true) {
+          uint tag = input.ReadTag();
+          switch (tag) {
+            case 0:
+              this.UnknownFields = unknownFields.Build();
+              return this;
+            default: {
+              if (!ParseUnknownField(input, unknownFields,
+                                     extensionRegistry, tag)) {
+                this.UnknownFields = unknownFields.Build();
+                return this;
+              }
+              break;
+            }
+          }
+        }
+      }
+      
+    }
+  }
+  
+  public sealed partial class ServiceOptions : pb::GeneratedMessage<ServiceOptions, ServiceOptions.Builder> {
+    // Use ServiceOptions.CreateBuilder() to construct.
+    private ServiceOptions() {}
+    
+    private static readonly ServiceOptions defaultInstance = new ServiceOptions();
+    public static ServiceOptions DefaultInstance {
+      get { return defaultInstance; }
+    }
+    
+    public override ServiceOptions DefaultInstanceForType {
+      get { return defaultInstance; }
+    }
+    
+    public static pbd::MessageDescriptor Descriptor {
+      get { return self::DescriptorProtoFile.internal__static_google_protobuf_ServiceOptions__Descriptor; }
+    }
+    
+    protected internal override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors {
+      get { return self::DescriptorProtoFile.internal__static_google_protobuf_ServiceOptions__FieldAccessorTable; }
+    }
+    
+    public override bool IsInitialized {
+      get {
+        return true;
+      }
+    }
+    
+    public override void WriteTo(pb::CodedOutputStream output) {
+      UnknownFields.WriteTo(output);
+    }
+    
+    private int memoizedSerializedSize = -1;
+    public override int SerializedSize {
+      get {
+        int size = memoizedSerializedSize;
+        if (size != -1) return size;
+        
+        size = 0;
+        size += UnknownFields.SerializedSize;
+        memoizedSerializedSize = size;
+        return size;
+      }
+    }
+    
+    public static self::ServiceOptions ParseFrom(pb::ByteString data) {
+      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+    }
+    public static self::ServiceOptions ParseFrom(pb::ByteString data,
+        pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
+               .BuildParsed();
+    }
+    public static self::ServiceOptions ParseFrom(byte[] data) {
+      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+    }
+    public static self::ServiceOptions parseFrom(byte[] data,
+        pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
+               .BuildParsed();
+    }
+    public static self::ServiceOptions ParseFrom(global::System.IO.Stream input) {
+      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+    }
+    public static self::ServiceOptions ParseFrom(
+        global::System.IO.Stream input,
+        pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
+               .BuildParsed();
+    }
+    public static self::ServiceOptions ParseFrom(pb::CodedInputStream input) {
+      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+    }
+    public static self::ServiceOptions ParseFrom(pb::CodedInputStream input,
+        pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
+               .BuildParsed();
+    }
+    
+    public static Builder CreateBuilder() { return new Builder(); }
+    public override IBuilder<self::ServiceOptions> CreateBuilderForType() { return new Builder(); }
+    public static Builder CreateBuilder(self::ServiceOptions prototype) {
+      return (Builder) new Builder().MergeFrom(prototype);
+    }
+    
+    public sealed partial class Builder : pb::GeneratedBuilder<self::ServiceOptions, Builder> {
+      // Construct using self::ServiceOptions.CreateBuilder()
+      internal Builder() {}
+      
+      self::ServiceOptions result = new self::ServiceOptions();
+      
+      protected override self::ServiceOptions MessageBeingBuilt {
+        get { return result; }
+      }
+      
+      public override IBuilder<self::ServiceOptions> Clear() {
+        result = new self::ServiceOptions();
+        return this;
+      }
+      
+      public override IBuilder<self::ServiceOptions> Clone() {
+        return new Builder().MergeFrom(result);
+      }
+      
+      public override pbd::MessageDescriptor DescriptorForType {
+        get { return self::ServiceOptions.Descriptor; }
+      }
+      
+      public override self::ServiceOptions DefaultInstanceForType {
+        get { return self::ServiceOptions.DefaultInstance; }
+      }
+      
+      public override self::ServiceOptions BuildPartial() {
+        self::ServiceOptions returnMe = result;
+        result = null;
+        return returnMe;
+      }
+      
+      public override IBuilder MergeFrom(pb::IMessage other) {
+        if (other is self::ServiceOptions) {
+          return MergeFrom((self::ServiceOptions) other);
+        } else {
+          base.MergeFrom(other);
+          return this;
+        }
+      }
+      
+      public override IBuilder<self::ServiceOptions> MergeFrom(self::ServiceOptions other) {
+        if (other == self::ServiceOptions.DefaultInstance) return this;
+        this.MergeUnknownFields(other.UnknownFields);
+        return this;
+      }
+      
+      public override IBuilder<self::ServiceOptions> MergeFrom(pb::CodedInputStream input) {
+        return MergeFrom(input, pb::ExtensionRegistry.Empty);
+      }
+      
+      public override IBuilder<self::ServiceOptions> MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+        pb::UnknownFieldSet.Builder unknownFields =
+          pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+        while (true) {
+          uint tag = input.ReadTag();
+          switch (tag) {
+            case 0:
+              this.UnknownFields = unknownFields.Build();
+              return this;
+            default: {
+              if (!ParseUnknownField(input, unknownFields,
+                                     extensionRegistry, tag)) {
+                this.UnknownFields = unknownFields.Build();
+                return this;
+              }
+              break;
+            }
+          }
+        }
+      }
+      
+    }
+  }
+  
+  public sealed partial class MethodOptions : pb::GeneratedMessage<MethodOptions, MethodOptions.Builder> {
+    // Use MethodOptions.CreateBuilder() to construct.
+    private MethodOptions() {}
+    
+    private static readonly MethodOptions defaultInstance = new MethodOptions();
+    public static MethodOptions DefaultInstance {
+      get { return defaultInstance; }
+    }
+    
+    public override MethodOptions DefaultInstanceForType {
+      get { return defaultInstance; }
+    }
+    
+    public static pbd::MessageDescriptor Descriptor {
+      get { return self::DescriptorProtoFile.internal__static_google_protobuf_MethodOptions__Descriptor; }
+    }
+    
+    protected internal override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors {
+      get { return self::DescriptorProtoFile.internal__static_google_protobuf_MethodOptions__FieldAccessorTable; }
+    }
+    
+    public override bool IsInitialized {
+      get {
+        return true;
+      }
+    }
+    
+    public override void WriteTo(pb::CodedOutputStream output) {
+      UnknownFields.WriteTo(output);
+    }
+    
+    private int memoizedSerializedSize = -1;
+    public override int SerializedSize {
+      get {
+        int size = memoizedSerializedSize;
+        if (size != -1) return size;
+        
+        size = 0;
+        size += UnknownFields.SerializedSize;
+        memoizedSerializedSize = size;
+        return size;
+      }
+    }
+    
+    public static self::MethodOptions ParseFrom(pb::ByteString data) {
+      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+    }
+    public static self::MethodOptions ParseFrom(pb::ByteString data,
+        pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
+               .BuildParsed();
+    }
+    public static self::MethodOptions ParseFrom(byte[] data) {
+      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+    }
+    public static self::MethodOptions parseFrom(byte[] data,
+        pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
+               .BuildParsed();
+    }
+    public static self::MethodOptions ParseFrom(global::System.IO.Stream input) {
+      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+    }
+    public static self::MethodOptions ParseFrom(
+        global::System.IO.Stream input,
+        pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
+               .BuildParsed();
+    }
+    public static self::MethodOptions ParseFrom(pb::CodedInputStream input) {
+      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+    }
+    public static self::MethodOptions ParseFrom(pb::CodedInputStream input,
+        pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
+               .BuildParsed();
+    }
+    
+    public static Builder CreateBuilder() { return new Builder(); }
+    public override IBuilder<self::MethodOptions> CreateBuilderForType() { return new Builder(); }
+    public static Builder CreateBuilder(self::MethodOptions prototype) {
+      return (Builder) new Builder().MergeFrom(prototype);
+    }
+    
+    public sealed partial class Builder : pb::GeneratedBuilder<self::MethodOptions, Builder> {
+      // Construct using self::MethodOptions.CreateBuilder()
+      internal Builder() {}
+      
+      self::MethodOptions result = new self::MethodOptions();
+      
+      protected override self::MethodOptions MessageBeingBuilt {
+        get { return result; }
+      }
+      
+      public override IBuilder<self::MethodOptions> Clear() {
+        result = new self::MethodOptions();
+        return this;
+      }
+      
+      public override IBuilder<self::MethodOptions> Clone() {
+        return new Builder().MergeFrom(result);
+      }
+      
+      public override pbd::MessageDescriptor DescriptorForType {
+        get { return self::MethodOptions.Descriptor; }
+      }
+      
+      public override self::MethodOptions DefaultInstanceForType {
+        get { return self::MethodOptions.DefaultInstance; }
+      }
+      
+      public override self::MethodOptions BuildPartial() {
+        self::MethodOptions returnMe = result;
+        result = null;
+        return returnMe;
+      }
+      
+      public override IBuilder MergeFrom(pb::IMessage other) {
+        if (other is self::MethodOptions) {
+          return MergeFrom((self::MethodOptions) other);
+        } else {
+          base.MergeFrom(other);
+          return this;
+        }
+      }
+      
+      public override IBuilder<self::MethodOptions> MergeFrom(self::MethodOptions other) {
+        if (other == self::MethodOptions.DefaultInstance) return this;
+        this.MergeUnknownFields(other.UnknownFields);
+        return this;
+      }
+      
+      public override IBuilder<self::MethodOptions> MergeFrom(pb::CodedInputStream input) {
+        return MergeFrom(input, pb::ExtensionRegistry.Empty);
+      }
+      
+      public override IBuilder<self::MethodOptions> MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+        pb::UnknownFieldSet.Builder unknownFields =
+          pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+        while (true) {
+          uint tag = input.ReadTag();
+          switch (tag) {
+            case 0:
+              this.UnknownFields = unknownFields.Build();
+              return this;
+            default: {
+              if (!ParseUnknownField(input, unknownFields,
+                                     extensionRegistry, tag)) {
+                this.UnknownFields = unknownFields.Build();
+                return this;
+              }
+              break;
+            }
+          }
+        }
+      }
+      
+    }
+  }
+  
+  #endregion
+  
+  #region Services
+  #endregion
+}

+ 0 - 4
csharp/ProtocolBuffers/DescriptorProtos/IDescriptorProto.cs

@@ -7,10 +7,6 @@
   /// </summary>
   /// </summary>
   /// <typeparam name="TOptions">The associated options protocol buffer type</typeparam>
   /// <typeparam name="TOptions">The associated options protocol buffer type</typeparam>
   public interface IDescriptorProto<TOptions> {
   public interface IDescriptorProto<TOptions> {
-    /// <summary>
-    /// The fully qualified name of the descriptor's target.
-    /// </summary>
-    string FullName { get; }
 
 
     /// <summary>
     /// <summary>
     /// The brief name of the descriptor's target.
     /// The brief name of the descriptor's target.

+ 2 - 1
csharp/ProtocolBuffers/Descriptors/DescriptorBase.cs

@@ -32,9 +32,10 @@ namespace Google.ProtocolBuffers.Descriptors {
 
 
     /// <summary>
     /// <summary>
     /// The fully qualified name of the descriptor's target.
     /// The fully qualified name of the descriptor's target.
+    /// TODO(jonskeet): Implement!
     /// </summary>
     /// </summary>
     public string FullName {
     public string FullName {
-      get { return proto.FullName; }
+      get { return null; }
     }
     }
 
 
     /// <summary>
     /// <summary>

+ 22 - 0
csharp/ProtocolBuffers/Descriptors/DescriptorPool.cs

@@ -0,0 +1,22 @@
+using System.Collections.Generic;
+
+namespace Google.ProtocolBuffers.Descriptors {
+  /// <summary>
+  /// Contains lookup tables containing all the descriptors defined in a particular file.
+  /// </summary>
+  internal class DescriptorPool {
+
+    IDictionary<string, object> byName;
+
+    /// <summary>
+    /// Finds a symbol of the given name within the pool.
+    /// </summary>
+    /// <typeparam name="T">The type of symbol to look for</typeparam>
+    /// <param name="name">Name to look up</param>
+    /// <returns>The symbol with the given name and type,
+    /// or null if the symbol doesn't exist or has the wrong type</returns>
+    internal T FindSymbol<T>(string name) where T : class {
+      return default(T);
+    }
+  }
+}

+ 19 - 0
csharp/ProtocolBuffers/Descriptors/EnumDescriptorIndexAttribute.cs

@@ -0,0 +1,19 @@
+using System;
+
+namespace Google.ProtocolBuffers.Descriptors {
+  /// <summary>
+  /// Allows enum values to express the index within their descriptor.
+  /// </summary>
+  [AttributeUsage(AttributeTargets.Field)]
+  internal class EnumDescriptorIndexAttribute : Attribute {
+    readonly int index;
+
+    internal int Index {
+      get { return index; }
+    }
+
+    internal EnumDescriptorIndexAttribute(int index) {
+      this.index = index;
+    }
+  }
+}

+ 69 - 1
csharp/ProtocolBuffers/Descriptors/FileDescriptor.cs

@@ -1,7 +1,75 @@
-using Google.ProtocolBuffers.DescriptorProtos;
+using System;
+using Google.ProtocolBuffers.DescriptorProtos;
+using System.Collections.Generic;
 namespace Google.ProtocolBuffers.Descriptors {
 namespace Google.ProtocolBuffers.Descriptors {
   public class FileDescriptor : DescriptorBase<FileDescriptorProto, FileOptions> {
   public class FileDescriptor : DescriptorBase<FileDescriptorProto, FileOptions> {
+
+    private readonly IList<MessageDescriptor> messageTypes;
+    private readonly IList<EnumDescriptor> enumTypes;
+    private readonly IList<ServiceDescriptor> services;
+    private readonly IList<FieldDescriptor> extensions;
+    private readonly IList<FileDescriptor> dependencies;
+    private readonly DescriptorPool pool;
+
     public FileDescriptor(FileDescriptorProto proto, FileDescriptor file) : base(proto, file) {
     public FileDescriptor(FileDescriptorProto proto, FileDescriptor file) : base(proto, file) {
     }
     }
+
+    /// <summary>
+    /// The package as declared in the .proto file. This may or may not
+    /// be equivalent to the .NET namespace of the generated classes.
+    /// </summary>
+    public string Package {
+      get { return Proto.Package; }
+    }
+
+    /// <value>
+    /// Unmodifiable list of top-level message types declared in this file.
+    /// </value>
+    public IList<MessageDescriptor> MessageTypes {
+      get { return messageTypes; }
+    }
+
+    /// <value>
+    /// Unmodifiable list of top-level enum types declared in this file.
+    /// </value>
+    public IList<EnumDescriptor> EnumTypes {
+      get { return enumTypes; }
+    }
+
+    /// <value>
+    /// Unmodifiable list of top-level services declared in this file.
+    /// </value>
+    public IList<ServiceDescriptor> Services {
+      get { return services; }
+    }
+
+    /// <value>
+    /// Unmodifiable list of top-level extensions declared in this file.
+    /// </value>
+    public IList<FieldDescriptor> Extensions {
+      get { return extensions; }
+    }
+
+    /// <value>
+    /// Unmodifiable list of this file's dependencies (imports).
+    /// </value>
+    public IList<FileDescriptor> Dependencies {
+      get { return dependencies; }
+    }
+
+    public static FileDescriptor BuildFrom(FileDescriptorProto proto,
+        FileDescriptor[] dependencies) {
+      throw new NotImplementedException();
+    }
+    /// <summary>
+    /// This method is to be called by generated code only.  It is equivalent
+    /// to BuilderFrom except that the FileDescriptorProto is encoded in
+    /// protocol buffer wire format.
+    /// </summary>
+    public static FileDescriptor InternalBuildGeneratedFileFrom(byte[] descriptorData,
+        FileDescriptor[] dependencies) {
+      FileDescriptorProto proto = FileDescriptorProto.ParseFrom(descriptorData);
+      return BuildFrom(proto, dependencies);      
+    }
   }
   }
 }
 }

+ 7 - 0
csharp/ProtocolBuffers/Descriptors/MessageDescriptor.cs

@@ -16,5 +16,12 @@ namespace Google.ProtocolBuffers.Descriptors {
     internal FieldDescriptor FindFieldByNumber(int fieldNumber) {
     internal FieldDescriptor FindFieldByNumber(int fieldNumber) {
       throw new System.NotImplementedException();
       throw new System.NotImplementedException();
     }
     }
+
+    /// <value>
+    /// List of message types nested within this one.
+    /// </value>
+    public IList<MessageDescriptor> NestedTypes {
+      get { throw new System.NotImplementedException(); }
+    }
   }
   }
 }
 }

+ 1 - 1
csharp/ProtocolBuffers/ExtensionRegistry.cs

@@ -136,7 +136,7 @@ namespace Google.ProtocolBuffers {
           extension.Descriptor.FieldNumber)] = extension;
           extension.Descriptor.FieldNumber)] = extension;
 
 
       FieldDescriptor field = extension.Descriptor;
       FieldDescriptor field = extension.Descriptor;
-      if (field.ContainingType.Options.IsMessageSetWireFormat
+      if (field.ContainingType.Options.MessageSetWireFormat
           && field.FieldType == FieldType.Message
           && field.FieldType == FieldType.Message
           && field.IsOptional
           && field.IsOptional
           && field.ExtensionScope == field.MessageType) {
           && field.ExtensionScope == field.MessageType) {

+ 3 - 5
csharp/ProtocolBuffers/FieldAccess/FieldAccessorTable.cs

@@ -2,9 +2,7 @@
 using Google.ProtocolBuffers.Descriptors;
 using Google.ProtocolBuffers.Descriptors;
 
 
 namespace Google.ProtocolBuffers.FieldAccess {
 namespace Google.ProtocolBuffers.FieldAccess {
-  public class FieldAccessorTable<TMessage, TBuilder> 
-      where TMessage : IMessage<TMessage> 
-      where TBuilder : IBuilder<TMessage> {
+  public class FieldAccessorTable {
 
 
     readonly MessageDescriptor descriptor;
     readonly MessageDescriptor descriptor;
 
 
@@ -12,11 +10,11 @@ namespace Google.ProtocolBuffers.FieldAccess {
       get { return descriptor; }
       get { return descriptor; }
     }
     }
 
 
-    public FieldAccessorTable(MessageDescriptor descriptor, String[] pascalCaseNames) {
+    public FieldAccessorTable(MessageDescriptor descriptor, String[] pascalCaseFieldNames, Type messageType, Type builderType) {
       this.descriptor = descriptor;
       this.descriptor = descriptor;
     }
     }
 
 
-    internal IFieldAccessor<TMessage, TBuilder> this[FieldDescriptor field] {
+    internal IFieldAccessor this[FieldDescriptor field] {
       get { return null; }
       get { return null; }
     }
     }
   }
   }

+ 10 - 12
csharp/ProtocolBuffers/FieldAccess/IFieldAccessor.cs

@@ -5,25 +5,23 @@
   /// The property descriptors for each field are created once and then cached.
   /// The property descriptors for each field are created once and then cached.
   /// In addition, this interface holds knowledge of repeated fields, builders etc.
   /// In addition, this interface holds knowledge of repeated fields, builders etc.
   /// </summary>
   /// </summary>
-  internal interface IFieldAccessor<TMessage, TBuilder> 
-      where TMessage : IMessage<TMessage> 
-      where TBuilder : IBuilder<TMessage> {
+  internal interface IFieldAccessor {
 
 
     /// <summary>
     /// <summary>
     /// Indicates whether the specified message contains the field.
     /// Indicates whether the specified message contains the field.
     /// </summary>
     /// </summary>
-    bool Has(IMessage<TMessage> message);
+    bool Has(IMessage message);
 
 
     /// <summary>
     /// <summary>
     /// Gets the count of the repeated field in the specified message.
     /// Gets the count of the repeated field in the specified message.
     /// </summary>
     /// </summary>
-    int GetRepeatedCount(IMessage<TMessage> message);
+    int GetRepeatedCount(IMessage message);
 
 
     /// <summary>
     /// <summary>
     /// Clears the field in the specified builder.
     /// Clears the field in the specified builder.
     /// </summary>
     /// </summary>
     /// <param name="builder"></param>
     /// <param name="builder"></param>
-    void Clear(IBuilder<TMessage> builder);
+    void Clear(IBuilder builder);
 
 
     /// <summary>
     /// <summary>
     /// Creates a builder for the type of this field (which must be a message field).
     /// Creates a builder for the type of this field (which must be a message field).
@@ -33,27 +31,27 @@
     /// <summary>
     /// <summary>
     /// Accessor for single fields
     /// Accessor for single fields
     /// </summary>
     /// </summary>
-    object GetValue(IMessage<TMessage> message);
+    object GetValue(IMessage message);
     /// <summary>
     /// <summary>
     /// Mutator for single fields
     /// Mutator for single fields
     /// </summary>
     /// </summary>
-    void SetValue(IBuilder<TMessage> builder, object value);
+    void SetValue(IBuilder builder, object value);
 
 
     /// <summary>
     /// <summary>
     /// Accessor for repeated fields
     /// Accessor for repeated fields
     /// </summary>
     /// </summary>
-    object GetRepeatedValue(IMessage<TMessage> message, int index);
+    object GetRepeatedValue(IMessage message, int index);
     /// <summary>
     /// <summary>
     /// Mutator for repeated fields
     /// Mutator for repeated fields
     /// </summary>
     /// </summary>
-    void SetRepeated(IBuilder<TMessage> builder, int index, object value);
+    void SetRepeated(IBuilder builder, int index, object value);
     /// <summary>
     /// <summary>
     /// Adds the specified value to the field in the given builder.
     /// Adds the specified value to the field in the given builder.
     /// </summary>
     /// </summary>
-    void AddRepeated(IBuilder<TMessage> builder, object value);
+    void AddRepeated(IBuilder builder, object value);
     /// <summary>
     /// <summary>
     /// Returns a read-only wrapper around the value of a repeated field.
     /// Returns a read-only wrapper around the value of a repeated field.
     /// </summary>
     /// </summary>
-    object GetRepeatedWrapper(IBuilder<TMessage> builder);
+    object GetRepeatedWrapper(IBuilder builder);
   }
   }
 }
 }

+ 3 - 3
csharp/ProtocolBuffers/FieldSet.cs

@@ -121,7 +121,7 @@ namespace Google.ProtocolBuffers {
         uint tag) {
         uint tag) {
       MessageDescriptor type = builder.DescriptorForType;
       MessageDescriptor type = builder.DescriptorForType;
 
 
-      if (type.Options.IsMessageSetWireFormat
+      if (type.Options.MessageSetWireFormat
           && tag == WireFormat.MessageSetTag.ItemStart) {
           && tag == WireFormat.MessageSetTag.ItemStart) {
         MergeMessageSetExtensionFromCodedStream(input, unknownFields, extensionRegistry, builder);
         MergeMessageSetExtensionFromCodedStream(input, unknownFields, extensionRegistry, builder);
         return true;
         return true;
@@ -524,7 +524,7 @@ namespace Google.ProtocolBuffers {
     /// Writes a single field to a CodedOutputStream.
     /// Writes a single field to a CodedOutputStream.
     /// </summary>
     /// </summary>
     public void WriteField(FieldDescriptor field, Object value, CodedOutputStream output) {
     public void WriteField(FieldDescriptor field, Object value, CodedOutputStream output) {
-      if (field.IsExtension && field.ContainingType.Options.IsMessageSetWireFormat) {
+      if (field.IsExtension && field.ContainingType.Options.MessageSetWireFormat) {
         output.WriteMessageSetExtension(field.FieldNumber, (IMessage) value);
         output.WriteMessageSetExtension(field.FieldNumber, (IMessage) value);
       } else {
       } else {
         if (field.IsRepeated) {
         if (field.IsRepeated) {
@@ -548,7 +548,7 @@ namespace Google.ProtocolBuffers {
           FieldDescriptor field = entry.Key;
           FieldDescriptor field = entry.Key;
           object value = entry.Value;
           object value = entry.Value;
 
 
-          if (field.IsExtension && field.ContainingType.Options.IsMessageSetWireFormat) {
+          if (field.IsExtension && field.ContainingType.Options.MessageSetWireFormat) {
             size += CodedOutputStream.ComputeMessageSetExtensionSize(field.FieldNumber, (IMessage) value);
             size += CodedOutputStream.ComputeMessageSetExtensionSize(field.FieldNumber, (IMessage) value);
           } else {
           } else {
             if (field.IsRepeated) {
             if (field.IsRepeated) {

+ 78 - 45
csharp/ProtocolBuffers/GeneratedBuilder.cs

@@ -3,6 +3,7 @@ using System.Collections.Generic;
 using System.Text;
 using System.Text;
 using Google.ProtocolBuffers.Collections;
 using Google.ProtocolBuffers.Collections;
 using Google.ProtocolBuffers.Descriptors;
 using Google.ProtocolBuffers.Descriptors;
+using System.IO;
 
 
 namespace Google.ProtocolBuffers {
 namespace Google.ProtocolBuffers {
   /// <summary>
   /// <summary>
@@ -17,7 +18,7 @@ namespace Google.ProtocolBuffers {
     /// <summary>
     /// <summary>
     /// Returns the message being built at the moment.
     /// Returns the message being built at the moment.
     /// </summary>
     /// </summary>
-    protected abstract GeneratedMessage<TMessage,TBuilder> MessageBeingBuilt { get; }
+    protected abstract TMessage MessageBeingBuilt { get; }
 
 
     public override bool Initialized {
     public override bool Initialized {
       get { return MessageBeingBuilt.IsInitialized; }
       get { return MessageBeingBuilt.IsInitialized; }
@@ -40,6 +41,29 @@ namespace Google.ProtocolBuffers {
       }
       }
     }
     }
 
 
+    /// <summary>
+    /// Adds all of the specified values to the given collection.
+    /// </summary>
+    protected void AddRange<T>(IEnumerable<T> source, IList<T> destination) {
+      List<T> list = destination as List<T>;
+      if (list != null) {
+        list.AddRange(source);
+      } else {
+        foreach (T element in source) {
+          destination.Add(element);
+        }
+      }
+    }
+
+    /// <summary>
+    /// Called by derived classes to parse an unknown field.
+    /// </summary>
+    /// <returns>true unless the tag is an end-group tag</returns>
+    protected bool ParseUnknownField(CodedInputStream input, UnknownFieldSet.Builder unknownFields,
+                                     ExtensionRegistry extensionRegistry, uint tag) {
+      return unknownFields.MergeFieldFrom(tag, input);
+    }
+
     public override MessageDescriptor DescriptorForType {
     public override MessageDescriptor DescriptorForType {
       get { return MessageBeingBuilt.DescriptorForType; }
       get { return MessageBeingBuilt.DescriptorForType; }
     }
     }
@@ -73,8 +97,8 @@ namespace Google.ProtocolBuffers {
       get { return DefaultInstanceForType; }
       get { return DefaultInstanceForType; }
     }
     }
 
 
-    protected override IBuilder CreateBuilderForFieldImpl(FieldDescriptor field) {
-      return CreateBuilderForField(field);
+    public override IBuilder CreateBuilderForField(FieldDescriptor field) {
+      return MessageBeingBuilt.InternalFieldAccessors[field].CreateBuilder();
     }
     }
 
 
     protected override IBuilder ClearFieldImpl(FieldDescriptor field) {
     protected override IBuilder ClearFieldImpl(FieldDescriptor field) {
@@ -85,69 +109,78 @@ namespace Google.ProtocolBuffers {
       return AddRepeatedField(field, value);
       return AddRepeatedField(field, value);
     }
     }
 
 
-    public new abstract IBuilder<TMessage> Clear();
-
-    public IBuilder<TMessage> MergeFrom(IMessage<TMessage> other) {
-      throw new NotImplementedException();
-    }
-
-    public abstract TMessage Build();
-
-    public abstract TMessage BuildPartial();
-
-    public abstract IBuilder<TMessage> Clone();
-
-    IBuilder<TMessage> IBuilder<TMessage>.MergeFrom(CodedInputStream input) {
-      throw new NotImplementedException();
-    }
-
-    IBuilder<TMessage> IBuilder<TMessage>.MergeFrom(CodedInputStream input, ExtensionRegistry extensionRegistry) {
-      throw new NotImplementedException();
-    }
-
-    public TMessage DefaultInstanceForType {
-      get { throw new NotImplementedException(); }
-    }
-
-    public IBuilder CreateBuilderForField(FieldDescriptor field) {
-      throw new NotImplementedException();
-    }
-
     public IBuilder<TMessage> ClearField(FieldDescriptor field) {
     public IBuilder<TMessage> ClearField(FieldDescriptor field) {
       MessageBeingBuilt.InternalFieldAccessors[field].Clear(this);
       MessageBeingBuilt.InternalFieldAccessors[field].Clear(this);
       return this;
       return this;
     }
     }
 
 
+    // FIXME: Implement!
+    public virtual IBuilder<TMessage> MergeFrom(TMessage other) { return this; }
+    public virtual IBuilder<TMessage> MergeUnknownFields(UnknownFieldSet unknownFields) { return this; }
+
     public IBuilder<TMessage> AddRepeatedField(FieldDescriptor field, object value) {
     public IBuilder<TMessage> AddRepeatedField(FieldDescriptor field, object value) {
+      MessageBeingBuilt.InternalFieldAccessors[field].AddRepeated(this, value);
       return this;
       return this;
     }
     }
 
 
-    public new IBuilder<TMessage> MergeUnknownFields(UnknownFieldSet unknownFields) {
-      throw new NotImplementedException();
+    public IBuilder<TMessage> MergeFrom(ByteString data) {
+      ((IBuilder) this).MergeFrom(data);
+      return this;
     }
     }
 
 
-    IBuilder<TMessage> IBuilder<TMessage>.MergeFrom(ByteString data) {
-      throw new NotImplementedException();
+    public IBuilder<TMessage> MergeFrom(ByteString data, ExtensionRegistry extensionRegistry) {
+      ((IBuilder) this).MergeFrom(data, extensionRegistry);
+      return this;
     }
     }
 
 
-    IBuilder<TMessage> IBuilder<TMessage>.MergeFrom(ByteString data, ExtensionRegistry extensionRegistry) {
-      throw new NotImplementedException();
+    public IBuilder<TMessage> MergeFrom(byte[] data) {
+      ((IBuilder) this).MergeFrom(data);
+      return this;
     }
     }
 
 
-    IBuilder<TMessage> IBuilder<TMessage>.MergeFrom(byte[] data) {
-      throw new NotImplementedException();
+    public IBuilder<TMessage> MergeFrom(byte[] data, ExtensionRegistry extensionRegistry) {
+      ((IBuilder) this).MergeFrom(data, extensionRegistry);
+      return this;
+    }
+
+    public IBuilder<TMessage> MergeFrom(Stream input) {
+      ((IBuilder) this).MergeFrom(input);
+      return this;
     }
     }
 
 
-    IBuilder<TMessage> IBuilder<TMessage>.MergeFrom(byte[] data, ExtensionRegistry extensionRegistry) {
-      throw new NotImplementedException();
+    public IBuilder<TMessage> MergeFrom(Stream input, ExtensionRegistry extensionRegistry) {
+      ((IBuilder) this).MergeFrom(input, extensionRegistry);
+      return this;
     }
     }
 
 
-    IBuilder<TMessage> IBuilder<TMessage>.MergeFrom(System.IO.Stream input) {
-      throw new NotImplementedException();
+    /// <summary>
+    /// Like Build(), but will wrap UninitializedMessageException in
+    /// InvalidProtocolBufferException.
+    /// TODO(jonskeet): This used to be generated for each class. Find out why.
+    /// </summary>
+    public TMessage BuildParsed() {
+      if (!Initialized) {
+        throw new UninitializedMessageException(MessageBeingBuilt).AsInvalidProtocolBufferException();
+      }
+      return BuildPartial();
     }
     }
 
 
-    IBuilder<TMessage> IBuilder<TMessage>.MergeFrom(System.IO.Stream input, ExtensionRegistry extensionRegistry) {
-      throw new NotImplementedException();
+    /// <summary>
+    /// Implementation of <see cref="IBuilder{T}.Build" />.
+    /// TODO(jonskeet): This used to be generated for each class. Find out why.
+    /// </summary>
+    public TMessage Build() {
+      if (!Initialized) {
+        throw new UninitializedMessageException(MessageBeingBuilt);
+      }
+      return BuildPartial();
     }
     }
+    
+    public abstract TMessage BuildPartial();
+    public abstract IBuilder<TMessage> Clone();
+    public abstract new IBuilder<TMessage> Clear();
+    public abstract TMessage DefaultInstanceForType { get; }
+    public abstract IBuilder<TMessage> MergeFrom(CodedInputStream input);
+    public abstract IBuilder<TMessage> MergeFrom(CodedInputStream input, ExtensionRegistry extensionRegistry);
   }
   }
 }
 }

+ 4 - 8
csharp/ProtocolBuffers/GeneratedMessage.cs

@@ -16,7 +16,7 @@ namespace Google.ProtocolBuffers {
 
 
     private readonly UnknownFieldSet unknownFields = UnknownFieldSet.DefaultInstance;
     private readonly UnknownFieldSet unknownFields = UnknownFieldSet.DefaultInstance;
 
 
-    protected internal abstract FieldAccessorTable<TMessage, TBuilder> InternalFieldAccessors { get; }
+    protected internal abstract FieldAccessorTable InternalFieldAccessors { get; }
 
 
     public override MessageDescriptor DescriptorForType {
     public override MessageDescriptor DescriptorForType {
       get { return InternalFieldAccessors.Descriptor; }
       get { return InternalFieldAccessors.Descriptor; }
@@ -30,13 +30,9 @@ namespace Google.ProtocolBuffers {
       return CreateBuilderForType();
       return CreateBuilderForType();
     }
     }
 
 
-    public IMessage<TMessage> DefaultInstanceForType {
-      get { throw new NotImplementedException(); }
-    }
+    public abstract TMessage DefaultInstanceForType { get; }
 
 
-    public IBuilder<TMessage> CreateBuilderForType() {
-      throw new NotImplementedException();
-    }
+    public abstract IBuilder<TMessage> CreateBuilderForType();
 
 
     private IDictionary<FieldDescriptor, Object> GetMutableFieldMap() {
     private IDictionary<FieldDescriptor, Object> GetMutableFieldMap() {
 
 
@@ -44,7 +40,7 @@ namespace Google.ProtocolBuffers {
       var ret = new SortedList<FieldDescriptor, object>();
       var ret = new SortedList<FieldDescriptor, object>();
       MessageDescriptor descriptor = DescriptorForType;
       MessageDescriptor descriptor = DescriptorForType;
       foreach (FieldDescriptor field in descriptor.Fields) {
       foreach (FieldDescriptor field in descriptor.Fields) {
-        IFieldAccessor<TMessage, TBuilder> accessor = InternalFieldAccessors[field];
+        IFieldAccessor accessor = InternalFieldAccessors[field];
         if ((field.IsRepeated && accessor.GetRepeatedCount(this) != 0)
         if ((field.IsRepeated && accessor.GetRepeatedCount(this) != 0)
             || accessor.Has(this)) {
             || accessor.Has(this)) {
           ret[field] = accessor.GetValue(this);
           ret[field] = accessor.GetValue(this);

+ 1 - 2
csharp/ProtocolBuffers/IBuilder.cs

@@ -125,7 +125,7 @@ namespace Google.ProtocolBuffers {
     /// </summary>
     /// </summary>
     /// <param name="other"></param>
     /// <param name="other"></param>
     /// <returns></returns>
     /// <returns></returns>
-    IBuilder<T> MergeFrom(IMessage<T> other);
+    IBuilder<T> MergeFrom(T other);
 
 
     /// <summary>
     /// <summary>
     /// Constructs the final message. Once this is called, this Builder instance
     /// Constructs the final message. Once this is called, this Builder instance
@@ -142,7 +142,6 @@ namespace Google.ProtocolBuffers {
     /// Like Build(), but does not throw an exception if the message is missing
     /// Like Build(), but does not throw an exception if the message is missing
     /// required fields. Instead, a partial message is returned.
     /// required fields. Instead, a partial message is returned.
     /// </summary>
     /// </summary>
-    /// <returns></returns>
     new T BuildPartial();
     new T BuildPartial();
 
 
     /// <summary>
     /// <summary>

+ 1 - 2
csharp/ProtocolBuffers/IMessage.cs

@@ -179,8 +179,7 @@ namespace Google.ProtocolBuffers {
     /// method is an abstract method of IMessage whereas DefaultInstance is
     /// method is an abstract method of IMessage whereas DefaultInstance is
     /// a static property of a specific class. They return the same thing.
     /// a static property of a specific class. They return the same thing.
     /// </summary>
     /// </summary>
-    new IMessage<T> DefaultInstanceForType { get; }
-
+    new T DefaultInstanceForType { get; }
 
 
     #region Builders
     #region Builders
     /// <summary>
     /// <summary>

+ 1 - 1
csharp/ProtocolBuffers/InvalidProtocolBufferException.cs

@@ -24,7 +24,7 @@ namespace Google.ProtocolBuffers {
   /// </summary>
   /// </summary>
   public class InvalidProtocolBufferException : IOException {
   public class InvalidProtocolBufferException : IOException {
 
 
-    private InvalidProtocolBufferException(string message)
+    internal InvalidProtocolBufferException(string message)
       : base(message) {
       : base(message) {
     }
     }
 
 

+ 0 - 1
csharp/ProtocolBuffers/Properties/AssemblyInfo.cs

@@ -13,7 +13,6 @@ using System.Runtime.InteropServices;
 [assembly: AssemblyCopyright("Copyright ©  2008")]
 [assembly: AssemblyCopyright("Copyright ©  2008")]
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyCulture("")]
 [assembly: AssemblyCulture("")]
-[assembly: AssemblyKeyFile ("Google.ProtocolBuffers.snk")]
 // Setting ComVisible to false makes the types in this assembly not visible 
 // Setting ComVisible to false makes the types in this assembly not visible 
 // to COM components.  If you need to access a type in this assembly from 
 // to COM components.  If you need to access a type in this assembly from 
 // COM, set the ComVisible attribute to true on that type.
 // COM, set the ComVisible attribute to true on that type.

+ 8 - 0
csharp/ProtocolBuffers/ProtocolBuffers.csproj

@@ -12,6 +12,8 @@
     <AssemblyName>Google.ProtocolBuffers</AssemblyName>
     <AssemblyName>Google.ProtocolBuffers</AssemblyName>
     <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
     <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
     <FileAlignment>512</FileAlignment>
     <FileAlignment>512</FileAlignment>
+    <SignAssembly>true</SignAssembly>
+    <AssemblyOriginatorKeyFile>Properties\Google.ProtocolBuffers.snk</AssemblyOriginatorKeyFile>
   </PropertyGroup>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
     <DebugSymbols>true</DebugSymbols>
     <DebugSymbols>true</DebugSymbols>
@@ -45,10 +47,13 @@
     <Compile Include="Collections\Lists.cs" />
     <Compile Include="Collections\Lists.cs" />
     <Compile Include="Collections\ReadOnlyDictionary.cs" />
     <Compile Include="Collections\ReadOnlyDictionary.cs" />
     <Compile Include="DescriptorProtos\Autogenerated.cs" />
     <Compile Include="DescriptorProtos\Autogenerated.cs" />
+    <Compile Include="DescriptorProtos\DescriptorProtoFile.cs" />
     <Compile Include="DescriptorProtos\IDescriptorProto.cs" />
     <Compile Include="DescriptorProtos\IDescriptorProto.cs" />
     <Compile Include="DescriptorProtos\PartialClasses.cs" />
     <Compile Include="DescriptorProtos\PartialClasses.cs" />
     <Compile Include="Descriptors\DescriptorBase.cs" />
     <Compile Include="Descriptors\DescriptorBase.cs" />
+    <Compile Include="Descriptors\DescriptorPool.cs" />
     <Compile Include="Descriptors\EnumDescriptor.cs" />
     <Compile Include="Descriptors\EnumDescriptor.cs" />
+    <Compile Include="Descriptors\EnumDescriptorIndexAttribute.cs" />
     <Compile Include="Descriptors\EnumValueDescriptor.cs" />
     <Compile Include="Descriptors\EnumValueDescriptor.cs" />
     <Compile Include="Descriptors\FieldDescriptor.cs" />
     <Compile Include="Descriptors\FieldDescriptor.cs" />
     <Compile Include="Descriptors\FieldMappingAttribute.cs" />
     <Compile Include="Descriptors\FieldMappingAttribute.cs" />
@@ -77,6 +82,9 @@
     <Compile Include="UnknownFieldSet.cs" />
     <Compile Include="UnknownFieldSet.cs" />
     <Compile Include="WireFormat.cs" />
     <Compile Include="WireFormat.cs" />
   </ItemGroup>
   </ItemGroup>
+  <ItemGroup>
+    <None Include="Properties\Google.ProtocolBuffers.snk" />
+  </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
        Other similar extension points exist, see Microsoft.Common.targets.
        Other similar extension points exist, see Microsoft.Common.targets.

+ 7 - 0
csharp/ProtocolBuffers/UninitializedMessageException.cs

@@ -17,5 +17,12 @@ using System;
 
 
 namespace Google.ProtocolBuffers {
 namespace Google.ProtocolBuffers {
   public class UninitializedMessageException : Exception {
   public class UninitializedMessageException : Exception {
+
+    public UninitializedMessageException(IMessage message) {
+    }
+
+    public InvalidProtocolBufferException AsInvalidProtocolBufferException() {
+      return new InvalidProtocolBufferException(Message);
+    }
   }
   }
 }
 }

+ 1 - 1
src/google/protobuf/compiler/csharp/csharp_enum.cc

@@ -70,7 +70,7 @@ void EnumGenerator::Generate(io::Printer* printer) {
 
 
     // TODO(jonskeet): Change CONSTANT_CASE into PascalCase
     // TODO(jonskeet): Change CONSTANT_CASE into PascalCase
     printer->Print(vars,
     printer->Print(vars,
-      "[pb::DescriptorIndex($index$)]\r\n"
+      "[pbd::EnumDescriptorIndex($index$)]\r\n"
       "$name$ = $number$,\r\n");
       "$name$ = $number$,\r\n");
   }
   }
   printer->Outdent();
   printer->Outdent();

+ 62 - 67
src/google/protobuf/compiler/csharp/csharp_enum_field.cc

@@ -68,20 +68,25 @@ EnumFieldGenerator::~EnumFieldGenerator() {}
 void EnumFieldGenerator::
 void EnumFieldGenerator::
 GenerateMembers(io::Printer* printer) const {
 GenerateMembers(io::Printer* printer) const {
   printer->Print(variables_,
   printer->Print(variables_,
-    "private boolean has$capitalized_name$;\r\n"
+    "private bool has$capitalized_name$;\r\n"
     "private $type$ $name$_ = $default$;\r\n"
     "private $type$ $name$_ = $default$;\r\n"
-    "public boolean Has$capitalized_name$() { return has$capitalized_name$; }\r\n"
-    "public $type$ Get$capitalized_name$() { return $name$_; }\r\n");
+    "public bool Has$capitalized_name$ {\r\n"
+    "  get { return has$capitalized_name$; }\r\n"
+    "}\r\n"
+    "public $type$ $capitalized_name$ {"
+    "  get { return $name$_; }"
+    "}\r\n");
 }
 }
 
 
 void EnumFieldGenerator::
 void EnumFieldGenerator::
 GenerateBuilderMembers(io::Printer* printer) const {
 GenerateBuilderMembers(io::Printer* printer) const {
   printer->Print(variables_,
   printer->Print(variables_,
-    "public boolean Has$capitalized_name$() {\r\n"
-    "  return result.Has$capitalized_name$();\r\n"
+    "public bool Has$capitalized_name$ {\r\n"
+    "  get { return result.Has$capitalized_name$; }\r\n"
     "}\r\n"
     "}\r\n"
-    "public $type$ Get$capitalized_name$() {\r\n"
-    "  return result.Get$capitalized_name$();\r\n"
+    "public $type$ $capitalized_name$ {\r\n"
+    "  get { return result.$capitalized_name$; }\r\n"
+    "  set { Set$capitalized_name$(value); }\r\n"
     "}\r\n"
     "}\r\n"
     "public Builder Set$capitalized_name$($type$ value) {\r\n"
     "public Builder Set$capitalized_name$($type$ value) {\r\n"
     "  result.has$capitalized_name$ = true;\r\n"
     "  result.has$capitalized_name$ = true;\r\n"
@@ -98,8 +103,8 @@ GenerateBuilderMembers(io::Printer* printer) const {
 void EnumFieldGenerator::
 void EnumFieldGenerator::
 GenerateMergingCode(io::Printer* printer) const {
 GenerateMergingCode(io::Printer* printer) const {
   printer->Print(variables_,
   printer->Print(variables_,
-    "if (other.has$capitalized_name$()) {\r\n"
-    "  set$capitalized_name$(other.get$capitalized_name$());\r\n"
+    "if (other.Has$capitalized_name$) {\r\n"
+    "  $capitalized_name$ = other.$capitalized_name$;\r\n"
     "}\r\n");
     "}\r\n");
 }
 }
 
 
@@ -111,36 +116,32 @@ GenerateBuildingCode(io::Printer* printer) const {
 void EnumFieldGenerator::
 void EnumFieldGenerator::
 GenerateParsingCode(io::Printer* printer) const {
 GenerateParsingCode(io::Printer* printer) const {
   printer->Print(variables_,
   printer->Print(variables_,
-    "int rawValue = input.readEnum();\r\n"
-    "$type$ value = $type$.valueOf(rawValue);\r\n"
-    "if (value == null) {\r\n"
-    "  unknownFields.mergeVarintField($number$, rawValue);\r\n"
+    // TODO(jonskeet): Make a more efficient way of doing this
+    "int rawValue = input.ReadEnum();\r\n"
+    "if (!global::System.Enum.IsDefined(typeof($type$), rawValue)) {\r\n"
+    "  unknownFields.MergeVarintField($number$, (ulong) rawValue);\r\n"
     "} else {\r\n"
     "} else {\r\n"
-    "  set$capitalized_name$(value);\r\n"
+    "  $capitalized_name$ = ($type$) rawValue;\r\n"
     "}\r\n");
     "}\r\n");
 }
 }
 
 
 void EnumFieldGenerator::
 void EnumFieldGenerator::
 GenerateSerializationCode(io::Printer* printer) const {
 GenerateSerializationCode(io::Printer* printer) const {
   printer->Print(variables_,
   printer->Print(variables_,
-    "if (has$capitalized_name$()) {\r\n"
-    "  output.writeEnum($number$, get$capitalized_name$().getNumber());\r\n"
+    "if (Has$capitalized_name$) {\r\n"
+    "  output.WriteEnum($number$, (int) $capitalized_name$);\r\n"
     "}\r\n");
     "}\r\n");
 }
 }
 
 
 void EnumFieldGenerator::
 void EnumFieldGenerator::
 GenerateSerializedSizeCode(io::Printer* printer) const {
 GenerateSerializedSizeCode(io::Printer* printer) const {
   printer->Print(variables_,
   printer->Print(variables_,
-    "if (has$capitalized_name$()) {\r\n"
+    "if (Has$capitalized_name$) {\r\n"
     "  size += pb::CodedOutputStream\r\n"
     "  size += pb::CodedOutputStream\r\n"
-    "    .computeEnumSize($number$, get$capitalized_name$().getNumber());\r\n"
+    "    .ComputeEnumSize($number$, (int) $capitalized_name$);\r\n"
     "}\r\n");
     "}\r\n");
 }
 }
 
 
-string EnumFieldGenerator::GetBoxedType() const {
-  return ClassName(descriptor_->enum_type());
-}
-
 // ===================================================================
 // ===================================================================
 
 
 RepeatedEnumFieldGenerator::
 RepeatedEnumFieldGenerator::
@@ -154,17 +155,19 @@ RepeatedEnumFieldGenerator::~RepeatedEnumFieldGenerator() {}
 void RepeatedEnumFieldGenerator::
 void RepeatedEnumFieldGenerator::
 GenerateMembers(io::Printer* printer) const {
 GenerateMembers(io::Printer* printer) const {
   printer->Print(variables_,
   printer->Print(variables_,
-    "private System.Collections.Generic.List<$type$> $name$_ =\r\n"
-    "  new System.Collections.Generic.List<$type$> ();\r\n"
-    "public System.Collections.Generic.List<$type$> $capitalized_name$List() {\r\n"
-    "  return $name$_.AsReadOnly ();\r\n"   // note:  unmodifiable list
+    "private scg::IList<$type$> $name$_ = new scg::List<$type$> ();\r\n"
+    "public scg.IList<$type$> $capitalized_name$List {\r\n"
+    "  get { return pbc::Lists.AsReadOnly($name$_); }\r\n"   // note:  unmodifiable list
     "}\r\n"
     "}\r\n"
 
 
     // Redundant API calls?
     // Redundant API calls?
-    //"public int $capitalized_name$Count() { get { return $name$_.Count; } }\r\n"
-    //"public $type$ get$capitalized_name$(int index) {\r\n"
-    //"  return $name$_.get(index);\r\n"
-    //"}\r\n"
+    // TODO(jonskeet): Possibly. Include for portability to start with though.
+    "public int $capitalized_name$Count {\r\n"
+    "  get { return $name$_.Count; }\r\n"
+    "}\r\n"
+    "public $type$ Get$capitalized_name$(int index) {\r\n"
+    "  return $name$_[index];\r\n"
+    "}\r\n"
     );
     );
 }
 }
 
 
@@ -175,36 +178,35 @@ GenerateBuilderMembers(io::Printer* printer) const {
     //   could hold on to the returned list and modify it after the message
     //   could hold on to the returned list and modify it after the message
     //   has been built, thus mutating the message which is supposed to be
     //   has been built, thus mutating the message which is supposed to be
     //   immutable.
     //   immutable.
-    "public global::System.Collections.Generic::IList<$type$> get$capitalized_name$List() {\r\n"
-    "  return java.util.Collections.unmodifiableList(result.$name$_);\r\n"
+    "public global::System.Collections.Generic::IList<$type$> $capitalized_name$List {\r\n"
+    "  get { return pbc::Lists.AsReadOnly(result.$name$_); }\r\n"
     "}\r\n"
     "}\r\n"
-    "public int get$capitalized_name$Count() {\r\n"
-    "  return result.get$capitalized_name$Count();\r\n"
+    "public int $capitalized_name$Count {\r\n"
+    "  get { return result.get$capitalized_name$Count; } \r\n"
     "}\r\n"
     "}\r\n"
-    "public $type$ get$capitalized_name$(int index) {\r\n"
-    "  return result.get$capitalized_name$(index);\r\n"
+    "public $type$ Get$capitalized_name$(int index) {\r\n"
+    "  return result.Get$capitalized_name$(index);\r\n"
     "}\r\n"
     "}\r\n"
-    "public Builder set$capitalized_name$(int index, $type$ value) {\r\n"
-    "  result.$name$_.set(index, value);\r\n"
+    "public Builder Set$capitalized_name$(int index, $type$ value) {\r\n"
+    "  result.$name$_[index] = value;\r\n"
     "  return this;\r\n"
     "  return this;\r\n"
     "}\r\n"
     "}\r\n"
     "public Builder add$capitalized_name$($type$ value) {\r\n"
     "public Builder add$capitalized_name$($type$ value) {\r\n"
-    "  if (result.$name$_.isEmpty()) {\r\n"
-    "    result.$name$_ = new java.util.ArrayList<$type$>();\r\n"
+    "  if (result.$name$_.Count == 0) {\r\n"
+    "    result.$name$_ = new scg::List<$type$>();\r\n"
     "  }\r\n"
     "  }\r\n"
-    "  result.$name$_.add(value);\r\n"
+    "  result.$name$_.Add(value);\r\n"
     "  return this;\r\n"
     "  return this;\r\n"
     "}\r\n"
     "}\r\n"
-    "public Builder addAll$capitalized_name$<T>(\r\n"
-    "    global::System.Collections.Generic.IEnumerable<T> values) where T : $type$ {\r\n"
-    "  if (result.$name$_.isEmpty()) {\r\n"
-    "    result.$name$_ = new java.util.ArrayList<$type$>();\r\n"
+    "public Builder AddAll$capitalized_name$(scg::IEnumerable<$type$> values) {\r\n"
+    "  if (result.$name$_.Count == 0) {\r\n"
+    "    result.$name$_ = new scg::List<$type$>();\r\n"
     "  }\r\n"
     "  }\r\n"
-    "  super.addAll(values, result.$name$_);\r\n"
+    "  base.AddRange(values, result.$name$_);\r\n"
     "  return this;\r\n"
     "  return this;\r\n"
     "}\r\n"
     "}\r\n"
-    "public Builder clear$capitalized_name$() {\r\n"
-    "  result.$name$_ = java.util.Collections.emptyList();\r\n"
+    "public Builder Clear$capitalized_name$() {\r\n"
+    "  result.$name$_ = pbc::Lists<$type$>.Empty;\r\n"
     "  return this;\r\n"
     "  return this;\r\n"
     "}\r\n");
     "}\r\n");
 }
 }
@@ -212,56 +214,49 @@ GenerateBuilderMembers(io::Printer* printer) const {
 void RepeatedEnumFieldGenerator::
 void RepeatedEnumFieldGenerator::
 GenerateMergingCode(io::Printer* printer) const {
 GenerateMergingCode(io::Printer* printer) const {
   printer->Print(variables_,
   printer->Print(variables_,
-    "if (!other.$name$_.isEmpty()) {\r\n"
-    "  if (result.$name$_.isEmpty()) {\r\n"
-    "    result.$name$_ = new java.util.ArrayList<$type$>();\r\n"
+    "if (other.$name$_.Count != 0) {\r\n"
+    "  if (result.$name$_.Count == 0) {\r\n"
+    "    result.$name$_ = new scg::List<$type$>();\r\n"
     "  }\r\n"
     "  }\r\n"
-    "  result.$name$_.addAll(other.$name$_);\r\n"
+    "  base.AddRange(other.$name$_, result.$name$_);\r\n"
     "}\r\n");
     "}\r\n");
 }
 }
 
 
 void RepeatedEnumFieldGenerator::
 void RepeatedEnumFieldGenerator::
 GenerateBuildingCode(io::Printer* printer) const {
 GenerateBuildingCode(io::Printer* printer) const {
   printer->Print(variables_,
   printer->Print(variables_,
-    "if (result.$name$_ != java.util.Collections.EMPTY_LIST) {\r\n"
-    "  result.$name$_ =\r\n"
-    "    java.util.Collections.unmodifiableList(result.$name$_);\r\n"
-    "}\r\n");
+    "result.$name$_ = pbc::Lists.AsReadOnly(result.$name$_);\r\n");
 }
 }
 
 
 void RepeatedEnumFieldGenerator::
 void RepeatedEnumFieldGenerator::
 GenerateParsingCode(io::Printer* printer) const {
 GenerateParsingCode(io::Printer* printer) const {
   printer->Print(variables_,
   printer->Print(variables_,
-    "int rawValue = input.readEnum();\r\n"
+    "int rawValue = input.ReadEnum();\r\n"
     "$type$ value = $type$.valueOf(rawValue);\r\n"
     "$type$ value = $type$.valueOf(rawValue);\r\n"
     "if (value == null) {\r\n"
     "if (value == null) {\r\n"
-    "  unknownFields.mergeVarintField($number$, rawValue);\r\n"
+    "  unknownFields.MergeVarintField($number$, rawValue);\r\n"
     "} else {\r\n"
     "} else {\r\n"
-    "  add$capitalized_name$(value);\r\n"
+    "  Add$capitalized_name$(value);\r\n"
     "}\r\n");
     "}\r\n");
 }
 }
 
 
 void RepeatedEnumFieldGenerator::
 void RepeatedEnumFieldGenerator::
 GenerateSerializationCode(io::Printer* printer) const {
 GenerateSerializationCode(io::Printer* printer) const {
   printer->Print(variables_,
   printer->Print(variables_,
-    "for ($type$ element : get$capitalized_name$List()) {\r\n"
-    "  output.writeEnum($number$, element.getNumber());\r\n"
+    "foreach ($type$ element in $capitalized_name$List) {\r\n"
+    "  output.WriteEnum($number$, element.Number);\r\n"
     "}\r\n");
     "}\r\n");
 }
 }
 
 
 void RepeatedEnumFieldGenerator::
 void RepeatedEnumFieldGenerator::
 GenerateSerializedSizeCode(io::Printer* printer) const {
 GenerateSerializedSizeCode(io::Printer* printer) const {
   printer->Print(variables_,
   printer->Print(variables_,
-    "for ($type$ element : get$capitalized_name$List()) {\r\n"
+    "foreach ($type$ element in $capitalized_name$List) {\r\n"
     "  size += pb::CodedOutputStream\r\n"
     "  size += pb::CodedOutputStream\r\n"
-    "    .computeEnumSize($number$, element.getNumber());\r\n"
+    "    .ComputeEnumSize($number$, element.Number);\r\n"
     "}\r\n");
     "}\r\n");
 }
 }
 
 
-string RepeatedEnumFieldGenerator::GetBoxedType() const {
-  return ClassName(descriptor_->enum_type());
-}
-
 }  // namespace csharp
 }  // namespace csharp
 }  // namespace compiler
 }  // namespace compiler
 }  // namespace protobuf
 }  // namespace protobuf

+ 0 - 2
src/google/protobuf/compiler/csharp/csharp_enum_field.h

@@ -45,8 +45,6 @@ class EnumFieldGenerator : public FieldGenerator {
   void GenerateSerializationCode(io::Printer* printer) const;
   void GenerateSerializationCode(io::Printer* printer) const;
   void GenerateSerializedSizeCode(io::Printer* printer) const;
   void GenerateSerializedSizeCode(io::Printer* printer) const;
 
 
-  string GetBoxedType() const;
-
  private:
  private:
   const FieldDescriptor* descriptor_;
   const FieldDescriptor* descriptor_;
   map<string, string> variables_;
   map<string, string> variables_;

+ 5 - 5
src/google/protobuf/compiler/csharp/csharp_extension.cc

@@ -40,17 +40,17 @@ void ExtensionGenerator::Generate(io::Printer* printer) {
   vars["containing_type"] = ClassName(descriptor_->containing_type());
   vars["containing_type"] = ClassName(descriptor_->containing_type());
   vars["index"] = SimpleItoa(descriptor_->index());
   vars["index"] = SimpleItoa(descriptor_->index());
 
 
-  JavaType csharp_type = GetJavaType(descriptor_);
+  MappedType mapped_type = GetMappedType(descriptor_);
   string singular_type;
   string singular_type;
-  switch (csharp_type) {
-    case JAVATYPE_MESSAGE:
+  switch (mapped_type) {
+    case MAPPEDTYPE_MESSAGE:
       vars["type"] = ClassName(descriptor_->message_type());
       vars["type"] = ClassName(descriptor_->message_type());
       break;
       break;
-    case JAVATYPE_ENUM:
+    case MAPPEDTYPE_ENUM:
       vars["type"] = ClassName(descriptor_->enum_type());
       vars["type"] = ClassName(descriptor_->enum_type());
       break;
       break;
     default:
     default:
-      vars["type"] = BoxedPrimitiveTypeName(csharp_type);
+      vars["type"] = MappedTypeName(mapped_type);
       break;
       break;
   }
   }
 
 

+ 6 - 6
src/google/protobuf/compiler/csharp/csharp_field.cc

@@ -51,19 +51,19 @@ FieldGeneratorMap::FieldGeneratorMap(const Descriptor* descriptor)
 
 
 FieldGenerator* FieldGeneratorMap::MakeGenerator(const FieldDescriptor* field) {
 FieldGenerator* FieldGeneratorMap::MakeGenerator(const FieldDescriptor* field) {
   if (field->is_repeated()) {
   if (field->is_repeated()) {
-    switch (GetJavaType(field)) {
-      case JAVATYPE_MESSAGE:
+    switch (GetMappedType(field)) {
+      case MAPPEDTYPE_MESSAGE:
         return new RepeatedMessageFieldGenerator(field);
         return new RepeatedMessageFieldGenerator(field);
-      case JAVATYPE_ENUM:
+      case MAPPEDTYPE_ENUM:
         return new RepeatedEnumFieldGenerator(field);
         return new RepeatedEnumFieldGenerator(field);
       default:
       default:
         return new RepeatedPrimitiveFieldGenerator(field);
         return new RepeatedPrimitiveFieldGenerator(field);
     }
     }
   } else {
   } else {
-    switch (GetJavaType(field)) {
-      case JAVATYPE_MESSAGE:
+    switch (GetMappedType(field)) {
+      case MAPPEDTYPE_MESSAGE:
         return new MessageFieldGenerator(field);
         return new MessageFieldGenerator(field);
-      case JAVATYPE_ENUM:
+      case MAPPEDTYPE_ENUM:
         return new EnumFieldGenerator(field);
         return new EnumFieldGenerator(field);
       default:
       default:
         return new PrimitiveFieldGenerator(field);
         return new PrimitiveFieldGenerator(field);

+ 0 - 2
src/google/protobuf/compiler/csharp/csharp_field.h

@@ -50,8 +50,6 @@ class FieldGenerator {
   virtual void GenerateSerializationCode(io::Printer* printer) const = 0;
   virtual void GenerateSerializationCode(io::Printer* printer) const = 0;
   virtual void GenerateSerializedSizeCode(io::Printer* printer) const = 0;
   virtual void GenerateSerializedSizeCode(io::Printer* printer) const = 0;
 
 
-  virtual string GetBoxedType() const = 0;
-
  private:
  private:
   GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(FieldGenerator);
   GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(FieldGenerator);
 };
 };

+ 89 - 39
src/google/protobuf/compiler/csharp/csharp_file.cc

@@ -38,7 +38,7 @@ namespace csharp {
 
 
 FileGenerator::FileGenerator(const FileDescriptor* file)
 FileGenerator::FileGenerator(const FileDescriptor* file)
   : file_(file),
   : file_(file),
-    csharp_namespace_(FileJavaPackage(file)),
+    csharp_namespace_(FileCSharpNamespace(file)),
     classname_(FileClassName(file)) {}
     classname_(FileClassName(file)) {}
 
 
 FileGenerator::~FileGenerator() {}
 FileGenerator::~FileGenerator() {}
@@ -72,9 +72,9 @@ bool FileGenerator::Validate(string* error) {
       ": Cannot generate C# output because the file's top-level class name, \"");
       ": Cannot generate C# output because the file's top-level class name, \"");
     error->append(classname_);
     error->append(classname_);
     error->append(
     error->append(
-      "\", matches the name of one of the types declared inside it.  "
-      "Please either rename the type or use the csharp_outer_classname "
-      "option to specify a different outer class name for the .proto file.");
+      "\", matches the name of one of the message, service or enum types. "
+      "Please either rename the type or use the csharp_file_classname "
+      "option to specify a different file-level class name for the .proto file.");
     return false;
     return false;
   }
   }
 
 
@@ -88,24 +88,30 @@ void FileGenerator::Generate(io::Printer* printer) {
     "// Generated by the protocol buffer compiler.  DO NOT EDIT!\r\n"
     "// Generated by the protocol buffer compiler.  DO NOT EDIT!\r\n"
     "\r\n");
     "\r\n");
 
 
-  // Namespace alias to avoid lines getting horribly long
-  printer->Print("using pb = global::Google.ProtocolBuffers;\r\n\r\n");
+  // Namespace aliases to avoid lines getting horribly long
+  printer->Print("using pb = global::Google.ProtocolBuffers;\r\n");
+  printer->Print("using pbc = global::Google.ProtocolBuffers.Collections;\r\n");
+  printer->Print("using pbd = global::Google.ProtocolBuffers.Descriptors;\r\n");
+  printer->Print("using scg = global::System.Collections.Generic;\r\n");
 
 
   if (!csharp_namespace_.empty()) {
   if (!csharp_namespace_.empty()) {
+    printer->Print("using self = global::$selfnamespace$;\r\n\r\n",
+      "selfnamespace", csharp_namespace_);
     printer->Print(
     printer->Print(
-      "namespace $namespace$ {\r\n"
-      "\r\n",
+      "namespace $namespace$ {\r\n",
       "namespace", csharp_namespace_);
       "namespace", csharp_namespace_);
     printer->Indent();
     printer->Indent();
   }
   }
+  printer->Print("\r\n");
   printer->Print(
   printer->Print(
-    "public sealed class $classname$ {\r\n"
-    "  private $classname$() {}\r\n",
-    "classname", classname_);
+    "$access$ static partial class $classname$ {\r\n\r\n",
+    "classname", classname_,
+    "access", ClassAccessLevel(file_));
   printer->Indent();
   printer->Indent();
 
 
   // -----------------------------------------------------------------
   // -----------------------------------------------------------------
 
 
+  printer->Print("#region Descriptor\r\n");
   // Embed the descriptor.  We simply serialize the entire FileDescriptorProto
   // Embed the descriptor.  We simply serialize the entire FileDescriptorProto
   // and embed it as a byte array, which is parsed and built into real
   // and embed it as a byte array, which is parsed and built into real
   // descriptors at initialization time.
   // descriptors at initialization time.
@@ -115,10 +121,10 @@ void FileGenerator::Generate(io::Printer* printer) {
   file_proto.SerializeToString(&file_data);
   file_proto.SerializeToString(&file_data);
 
 
   printer->Print(
   printer->Print(
-    "public static pb::Descriptors.FileDescriptor Descriptor {\r\n"
+    "public static pbd::FileDescriptor Descriptor {\r\n"
     "    get { return descriptor; }\r\n"
     "    get { return descriptor; }\r\n"
     "}\r\n"
     "}\r\n"
-    "private static readonly pb::Descriptors.FileDescriptor descriptor = pb::Descriptors.FileDescriptor.InternalBuildGeneratedFileFrom (\r\n"
+    "private static readonly pbd::FileDescriptor descriptor = pbd::FileDescriptor.InternalBuildGeneratedFileFrom (\r\n"
     "    new byte[] {");
     "    new byte[] {");
   printer->Indent();
   printer->Indent();
   printer->Indent();
   printer->Indent();
@@ -139,7 +145,7 @@ void FileGenerator::Generate(io::Printer* printer) {
   }
   }
   printer->Outdent();
   printer->Outdent();
   printer->Outdent();
   printer->Outdent();
-  printer->Print("\r\n}, new pb::Descriptors.FileDescriptor[] {\r\n");
+  printer->Print("\r\n}, new pbd::FileDescriptor[] {\r\n");
   for (int i = 0; i < file_->dependency_count(); i++) {
   for (int i = 0; i < file_->dependency_count(); i++) {
     printer->Print(
     printer->Print(
       "        $dependency$.getDescriptor(),\r\n",
       "        $dependency$.getDescriptor(),\r\n",
@@ -150,36 +156,58 @@ void FileGenerator::Generate(io::Printer* printer) {
 
 
   printer->Outdent();
   printer->Outdent();
   printer->Outdent();
   printer->Outdent();
-  printer->Print("\r\n");
+  printer->Print("#endregion\r\n\r\n");
 
 
   // -----------------------------------------------------------------
   // -----------------------------------------------------------------
 
 
+
+
+  // Extensions must be generated in the outer class since they are values,
+  // not classes.
+  printer->Print("#region Extensions\r\n");
+  for (int i = 0; i < file_->extension_count(); i++) {
+    ExtensionGenerator(file_->extension(i)).Generate(printer);
+  }
+  printer->Print("#endregion\r\n\r\n");
+
+  printer->Print("#region Static variables\r\n");
+  // Static variables.
+  for (int i = 0; i < file_->message_type_count(); i++) {
+    // TODO(kenton):  Reuse MessageGenerator objects?
+    MessageGenerator(file_->message_type(i)).GenerateStaticVariables(printer);
+  }
+  printer->Print("#endregion\r\n\r\n");
+
+  // If we're not nesting classes, the class for the .proto file is done now
+  if (!file_->options().csharp_nest_classes()) {
+    printer->Outdent();
+    printer->Print("}\r\n\r\n");
+  }
+
   if (!file_->options().csharp_multiple_files()) {
   if (!file_->options().csharp_multiple_files()) {
+    printer->Print("#region Enums\r\n");
     for (int i = 0; i < file_->enum_type_count(); i++) {
     for (int i = 0; i < file_->enum_type_count(); i++) {
       EnumGenerator(file_->enum_type(i)).Generate(printer);
       EnumGenerator(file_->enum_type(i)).Generate(printer);
     }
     }
+    printer->Print("#endregion\r\n\r\n");
+    printer->Print("#region Messages\r\n");
     for (int i = 0; i < file_->message_type_count(); i++) {
     for (int i = 0; i < file_->message_type_count(); i++) {
       MessageGenerator(file_->message_type(i)).Generate(printer);
       MessageGenerator(file_->message_type(i)).Generate(printer);
     }
     }
+    printer->Print("#endregion\r\n\r\n");
+    printer->Print("#region Services\r\n");
     for (int i = 0; i < file_->service_count(); i++) {
     for (int i = 0; i < file_->service_count(); i++) {
       ServiceGenerator(file_->service(i)).Generate(printer);
       ServiceGenerator(file_->service(i)).Generate(printer);
     }
     }
+    printer->Print("#endregion\r\n");
   }
   }
 
 
-  // Extensions must be generated in the outer class since they are values,
-  // not classes.
-  for (int i = 0; i < file_->extension_count(); i++) {
-    ExtensionGenerator(file_->extension(i)).Generate(printer);
-  }
-
-  // Static variables.
-  for (int i = 0; i < file_->message_type_count(); i++) {
-    // TODO(kenton):  Reuse MessageGenerator objects?
-    MessageGenerator(file_->message_type(i)).GenerateStaticVariables(printer);
+  // If we were nesting classes, we still need to finish the outer one at some point!
+  if (file_->options().csharp_nest_classes()) {
+    printer->Outdent();
+    printer->Print("}\r\n\r\n");
   }
   }
 
 
-  printer->Outdent();
-  printer->Print("}\r\n");
   if (!csharp_namespace_.empty()) {
   if (!csharp_namespace_.empty()) {
     printer->Outdent();
     printer->Outdent();
     printer->Print("}\r\n");
     printer->Print("}\r\n");
@@ -187,12 +215,12 @@ void FileGenerator::Generate(io::Printer* printer) {
 }
 }
 
 
 template<typename GeneratorClass, typename DescriptorClass>
 template<typename GeneratorClass, typename DescriptorClass>
-static void GenerateSibling(const string& package_dir,
-                            const string& csharp_namespace,
+static void GenerateSibling(const string& csharp_namespace,
+                            const FileDescriptor* file,
                             const DescriptorClass* descriptor,
                             const DescriptorClass* descriptor,
                             OutputDirectory* output_directory,
                             OutputDirectory* output_directory,
                             vector<string>* file_list) {
                             vector<string>* file_list) {
-  string filename = package_dir + descriptor->name() + ".cs";
+  string filename = descriptor->name() + ".cs";
   file_list->push_back(filename);
   file_list->push_back(filename);
 
 
   scoped_ptr<io::ZeroCopyOutputStream> output(
   scoped_ptr<io::ZeroCopyOutputStream> output(
@@ -203,40 +231,62 @@ static void GenerateSibling(const string& package_dir,
     "// Generated by the protocol buffer compiler.  DO NOT EDIT!\r\n"
     "// Generated by the protocol buffer compiler.  DO NOT EDIT!\r\n"
     "\r\n");
     "\r\n");
 
 
-  // Namespace alias to avoid lines getting horribly long
-  printer.Print("using pb = global::Google.ProtocolBuffers;\r\n\r\n");
+  // Namespace aliases to avoid lines getting horribly long
+  printer.Print("using pb = global::Google.ProtocolBuffers;\r\n");
+  printer.Print("using pbc = global::Google.ProtocolBuffers.Collections;\r\n");
+  printer.Print("using pbd = global::Google.ProtocolBuffers.Descriptors;\r\n");
+  printer.Print("using scg = global::System.Collections.Generic;\r\n");
 
 
   if (!csharp_namespace.empty()) {
   if (!csharp_namespace.empty()) {
+    printer.Print("using self = global::$selfnamespace$;\r\n\r\n",
+      "selfnamespace", csharp_namespace);
     printer.Print(
     printer.Print(
-      "namespace $namespace$ {\r\n"
-      "\r\n",
+      "namespace $namespace$ {\r\n",
       "namespace", csharp_namespace);
       "namespace", csharp_namespace);
     printer.Indent();
     printer.Indent();
   }
   }
+  printer.Print("\r\n");
+
+  
+  if (file->options().csharp_nest_classes()) {
+    printer.Print(
+    "$access$ static partial class $classname$ {\r\n\r\n",
+    "classname", FileClassName(file),
+    "access", ClassAccessLevel(file));
+    printer.Indent();
+  }
 
 
   GeneratorClass(descriptor).Generate(&printer);
   GeneratorClass(descriptor).Generate(&printer);
+
+  if (file->options().csharp_nest_classes()) {
+    printer.Outdent();
+    printer.Print("}\r\n");
+  }
+
   if (!csharp_namespace.empty()) {
   if (!csharp_namespace.empty()) {
     printer.Outdent();
     printer.Outdent();
     printer.Print("}\r\n");
     printer.Print("}\r\n");
   }
   }
 }
 }
 
 
-void FileGenerator::GenerateSiblings(const string& package_dir,
-                                     OutputDirectory* output_directory,
+void FileGenerator::GenerateSiblings(OutputDirectory* output_directory,
                                      vector<string>* file_list) {
                                      vector<string>* file_list) {
   if (file_->options().csharp_multiple_files()) {
   if (file_->options().csharp_multiple_files()) {
     for (int i = 0; i < file_->enum_type_count(); i++) {
     for (int i = 0; i < file_->enum_type_count(); i++) {
-      GenerateSibling<EnumGenerator>(package_dir, csharp_namespace_,
+      GenerateSibling<EnumGenerator>(csharp_namespace_,
+                                     file_,
                                      file_->enum_type(i),
                                      file_->enum_type(i),
                                      output_directory, file_list);
                                      output_directory, file_list);
     }
     }
     for (int i = 0; i < file_->message_type_count(); i++) {
     for (int i = 0; i < file_->message_type_count(); i++) {
-      GenerateSibling<MessageGenerator>(package_dir, csharp_namespace_,
+      GenerateSibling<MessageGenerator>(csharp_namespace_,
+                                        file_,
                                         file_->message_type(i),
                                         file_->message_type(i),
                                         output_directory, file_list);
                                         output_directory, file_list);
     }
     }
     for (int i = 0; i < file_->service_count(); i++) {
     for (int i = 0; i < file_->service_count(); i++) {
-      GenerateSibling<ServiceGenerator>(package_dir, csharp_namespace_,
+      GenerateSibling<ServiceGenerator>(csharp_namespace_,
+                                        file_,
                                         file_->service(i),
                                         file_->service(i),
                                         output_directory, file_list);
                                         output_directory, file_list);
     }
     }

+ 1 - 2
src/google/protobuf/compiler/csharp/csharp_file.h

@@ -56,8 +56,7 @@ class FileGenerator {
   // If we aren't putting everything into one file, this will write all the
   // If we aren't putting everything into one file, this will write all the
   // files other than the outer file (i.e. one for each message, enum, and
   // files other than the outer file (i.e. one for each message, enum, and
   // service type).
   // service type).
-  void GenerateSiblings(const string& package_dir,
-                        OutputDirectory* output_directory,
+  void GenerateSiblings(OutputDirectory* output_directory,
                         vector<string>* file_list);
                         vector<string>* file_list);
 
 
   const string& csharp_namespace() { return csharp_namespace_; }
   const string& csharp_namespace() { return csharp_namespace_; }

+ 6 - 11
src/google/protobuf/compiler/csharp/csharp_generator.cc

@@ -62,9 +62,9 @@ CSharpGenerator::CSharpGenerator() {}
 CSharpGenerator::~CSharpGenerator() {}
 CSharpGenerator::~CSharpGenerator() {}
 
 
 bool CSharpGenerator::Generate(const FileDescriptor* file,
 bool CSharpGenerator::Generate(const FileDescriptor* file,
-                             const string& parameter,
-                             OutputDirectory* output_directory,
-                             string* error) const {
+                               const string& parameter,
+                               OutputDirectory* output_directory,
+                               string* error) const {
   vector<pair<string, string> > options;
   vector<pair<string, string> > options;
   ParseOptions(parameter, &options);
   ParseOptions(parameter, &options);
 
 
@@ -93,25 +93,20 @@ bool CSharpGenerator::Generate(const FileDescriptor* file,
     return false;
     return false;
   }
   }
 
 
-  string package_dir =
-    StringReplace(file_generator.csharp_namespace(), ".", "/", true);
-  if (!package_dir.empty()) package_dir += "/";
-
   vector<string> all_files;
   vector<string> all_files;
 
 
-  string csharp_filename = package_dir;
-  csharp_filename += file_generator.classname();
+  string csharp_filename = file_generator.classname();
   csharp_filename += ".cs";
   csharp_filename += ".cs";
   all_files.push_back(csharp_filename);
   all_files.push_back(csharp_filename);
 
 
-  // Generate main csharp file.
+  // Generate main C# file.
   scoped_ptr<io::ZeroCopyOutputStream> output(
   scoped_ptr<io::ZeroCopyOutputStream> output(
     output_directory->Open(csharp_filename));
     output_directory->Open(csharp_filename));
   io::Printer printer(output.get(), '$');
   io::Printer printer(output.get(), '$');
   file_generator.Generate(&printer);
   file_generator.Generate(&printer);
 
 
   // Generate sibling files.
   // Generate sibling files.
-  file_generator.GenerateSiblings(package_dir, output_directory, &all_files);
+  file_generator.GenerateSiblings(output_directory, &all_files);
 
 
   // Generate output list if requested.
   // Generate output list if requested.
   if (!output_list_file.empty()) {
   if (!output_list_file.empty()) {

+ 43 - 36
src/google/protobuf/compiler/csharp/csharp_helpers.cc

@@ -104,8 +104,8 @@ string StripProto(const string& filename) {
 }
 }
 
 
 string FileClassName(const FileDescriptor* file) {
 string FileClassName(const FileDescriptor* file) {
-  if (file->options().has_csharp_outer_classname()) {
-    return file->options().csharp_outer_classname();
+  if (file->options().has_csharp_file_classname()) {
+    return file->options().csharp_file_classname();
   } else {
   } else {
     string basename;
     string basename;
     string::size_type last_slash = file->name().find_last_of('/');
     string::size_type last_slash = file->name().find_last_of('/');
@@ -118,7 +118,7 @@ string FileClassName(const FileDescriptor* file) {
   }
   }
 }
 }
 
 
-string FileJavaPackage(const FileDescriptor* file) {
+string FileCSharpNamespace(const FileDescriptor* file) {
   if (file->options().has_csharp_namespace()) {
   if (file->options().has_csharp_namespace()) {
     return file->options().csharp_namespace();
     return file->options().csharp_namespace();
   } else {
   } else {
@@ -131,99 +131,106 @@ string FileJavaPackage(const FileDescriptor* file) {
   }
   }
 }
 }
 
 
-string ToJavaName(const string& full_name, const FileDescriptor* file) {
+string ToCSharpName(const string& full_name, const FileDescriptor* file) {
   string result;
   string result;
-  if (file->options().csharp_multiple_files()) {
-    result = FileJavaPackage(file);
+  if (!file->options().csharp_nest_classes()) {
+    result = "";
   } else {
   } else {
     result = ClassName(file);
     result = ClassName(file);
   }
   }
   if (!result.empty()) {
   if (!result.empty()) {
     result += '.';
     result += '.';
   }
   }
+  string classname;
   if (file->package().empty()) {
   if (file->package().empty()) {
-    result += full_name;
+    classname = full_name;
   } else {
   } else {
     // Strip the proto package from full_name since we've replaced it with
     // Strip the proto package from full_name since we've replaced it with
-    // the Java package.
-    result += full_name.substr(file->package().size() + 1);
+    // the C# package.
+    classname = full_name.substr(file->package().size() + 1);
   }
   }
-  return result;
+  result += StringReplace(classname, ".", ".Types.", true);
+  const char *prefix = FileCSharpNamespace(file).empty() ? "global::" : "self::";
+  return prefix + result;
 }
 }
 
 
 string ClassName(const FileDescriptor* descriptor) {
 string ClassName(const FileDescriptor* descriptor) {
-  string result = FileJavaPackage(descriptor);
-  if (!result.empty()) result += '.';
-  result += FileClassName(descriptor);
-  return result;
+  string alias = FileCSharpNamespace(descriptor).empty() ? "global::" : "self::";
+  return alias + FileClassName(descriptor);
 }
 }
 
 
-JavaType GetJavaType(FieldDescriptor::Type field_type) {
+MappedType GetMappedType(FieldDescriptor::Type field_type) {
   switch (field_type) {
   switch (field_type) {
     case FieldDescriptor::TYPE_INT32:
     case FieldDescriptor::TYPE_INT32:
     case FieldDescriptor::TYPE_UINT32:
     case FieldDescriptor::TYPE_UINT32:
     case FieldDescriptor::TYPE_SINT32:
     case FieldDescriptor::TYPE_SINT32:
     case FieldDescriptor::TYPE_FIXED32:
     case FieldDescriptor::TYPE_FIXED32:
     case FieldDescriptor::TYPE_SFIXED32:
     case FieldDescriptor::TYPE_SFIXED32:
-      return JAVATYPE_INT;
+      return MAPPEDTYPE_INT;
 
 
     case FieldDescriptor::TYPE_INT64:
     case FieldDescriptor::TYPE_INT64:
     case FieldDescriptor::TYPE_UINT64:
     case FieldDescriptor::TYPE_UINT64:
     case FieldDescriptor::TYPE_SINT64:
     case FieldDescriptor::TYPE_SINT64:
     case FieldDescriptor::TYPE_FIXED64:
     case FieldDescriptor::TYPE_FIXED64:
     case FieldDescriptor::TYPE_SFIXED64:
     case FieldDescriptor::TYPE_SFIXED64:
-      return JAVATYPE_LONG;
+      return MAPPEDTYPE_LONG;
 
 
     case FieldDescriptor::TYPE_FLOAT:
     case FieldDescriptor::TYPE_FLOAT:
-      return JAVATYPE_FLOAT;
+      return MAPPEDTYPE_FLOAT;
 
 
     case FieldDescriptor::TYPE_DOUBLE:
     case FieldDescriptor::TYPE_DOUBLE:
-      return JAVATYPE_DOUBLE;
+      return MAPPEDTYPE_DOUBLE;
 
 
     case FieldDescriptor::TYPE_BOOL:
     case FieldDescriptor::TYPE_BOOL:
-      return JAVATYPE_BOOLEAN;
+      return MAPPEDTYPE_BOOLEAN;
 
 
     case FieldDescriptor::TYPE_STRING:
     case FieldDescriptor::TYPE_STRING:
-      return JAVATYPE_STRING;
+      return MAPPEDTYPE_STRING;
 
 
     case FieldDescriptor::TYPE_BYTES:
     case FieldDescriptor::TYPE_BYTES:
-      return JAVATYPE_BYTES;
+      return MAPPEDTYPE_BYTES;
 
 
     case FieldDescriptor::TYPE_ENUM:
     case FieldDescriptor::TYPE_ENUM:
-      return JAVATYPE_ENUM;
+      return MAPPEDTYPE_ENUM;
 
 
     case FieldDescriptor::TYPE_GROUP:
     case FieldDescriptor::TYPE_GROUP:
     case FieldDescriptor::TYPE_MESSAGE:
     case FieldDescriptor::TYPE_MESSAGE:
-      return JAVATYPE_MESSAGE;
+      return MAPPEDTYPE_MESSAGE;
 
 
     // No default because we want the compiler to complain if any new
     // No default because we want the compiler to complain if any new
     // types are added.
     // types are added.
   }
   }
 
 
   GOOGLE_LOG(FATAL) << "Can't get here.";
   GOOGLE_LOG(FATAL) << "Can't get here.";
-  return JAVATYPE_INT;
+  return MAPPEDTYPE_INT;
 }
 }
 
 
-const char* BoxedPrimitiveTypeName(JavaType type) {
+const char* MappedTypeName(MappedType type) {
   switch (type) {
   switch (type) {
-    case JAVATYPE_INT    : return "int";
-    case JAVATYPE_LONG   : return "long";
-    case JAVATYPE_FLOAT  : return "float";
-    case JAVATYPE_DOUBLE : return "double";
-    case JAVATYPE_BOOLEAN: return "bool";
-    case JAVATYPE_STRING : return "string";
-    case JAVATYPE_BYTES  : return "pb::ByteString";
-    case JAVATYPE_ENUM   : return NULL;
-    case JAVATYPE_MESSAGE: return NULL;
+    case MAPPEDTYPE_INT    : return "int";
+    case MAPPEDTYPE_LONG   : return "long";
+    case MAPPEDTYPE_UINT    : return "uint";
+    case MAPPEDTYPE_ULONG   : return "ulong";
+    case MAPPEDTYPE_FLOAT  : return "float";
+    case MAPPEDTYPE_DOUBLE : return "double";
+    case MAPPEDTYPE_BOOLEAN: return "bool";
+    case MAPPEDTYPE_STRING : return "string";
+    case MAPPEDTYPE_BYTES  : return "pb::ByteString";
+    case MAPPEDTYPE_ENUM   : return NULL;
+    case MAPPEDTYPE_MESSAGE: return NULL;
 
 
     // No default because we want the compiler to complain if any new
     // No default because we want the compiler to complain if any new
-    // JavaTypes are added.
+    // MappedTypes are added.
   }
   }
 
 
   GOOGLE_LOG(FATAL) << "Can't get here.";
   GOOGLE_LOG(FATAL) << "Can't get here.";
   return NULL;
   return NULL;
 }
 }
 
 
+const char* ClassAccessLevel(const FileDescriptor* file) {
+  return file->options().csharp_public_classes() ? "public" : "internal";
+}
+
 }  // namespace csharp
 }  // namespace csharp
 }  // namespace compiler
 }  // namespace compiler
 }  // namespace protobuf
 }  // namespace protobuf

+ 29 - 25
src/google/protobuf/compiler/csharp/csharp_helpers.h

@@ -48,52 +48,56 @@ string UnderscoresToCamelCase(const MethodDescriptor* method);
 string StripProto(const string& filename);
 string StripProto(const string& filename);
 
 
 // Gets the unqualified class name for the file.  Each .proto file becomes a
 // Gets the unqualified class name for the file.  Each .proto file becomes a
-// single Java class, with all its contents nested in that class.
+// single C# class, with extra (possibly nested) classes for messages, enums and services.
 string FileClassName(const FileDescriptor* file);
 string FileClassName(const FileDescriptor* file);
 
 
-// Returns the file's Java package name.
-string FileJavaPackage(const FileDescriptor* file);
+// Returns the file's C# namespace.
+string FileCSharpNamespace(const FileDescriptor* file);
 
 
 // Converts the given fully-qualified name in the proto namespace to its
 // Converts the given fully-qualified name in the proto namespace to its
-// fully-qualified name in the Java namespace, given that it is in the given
+// fully-qualified name in the C# namespace, given that it is in the given
 // file.
 // file.
-string ToJavaName(const string& full_name, const FileDescriptor* file);
+string ToCSharpName(const string& full_name, const FileDescriptor* file);
 
 
 // These return the fully-qualified class name corresponding to the given
 // These return the fully-qualified class name corresponding to the given
 // descriptor.
 // descriptor.
 inline string ClassName(const Descriptor* descriptor) {
 inline string ClassName(const Descriptor* descriptor) {
-  return ToJavaName(descriptor->full_name(), descriptor->file());
+  return ToCSharpName(descriptor->full_name(), descriptor->file());
 }
 }
 inline string ClassName(const EnumDescriptor* descriptor) {
 inline string ClassName(const EnumDescriptor* descriptor) {
-  return ToJavaName(descriptor->full_name(), descriptor->file());
+  return ToCSharpName(descriptor->full_name(), descriptor->file());
 }
 }
 inline string ClassName(const ServiceDescriptor* descriptor) {
 inline string ClassName(const ServiceDescriptor* descriptor) {
-  return ToJavaName(descriptor->full_name(), descriptor->file());
+  return ToCSharpName(descriptor->full_name(), descriptor->file());
 }
 }
 string ClassName(const FileDescriptor* descriptor);
 string ClassName(const FileDescriptor* descriptor);
 
 
-enum JavaType {
-  JAVATYPE_INT,
-  JAVATYPE_LONG,
-  JAVATYPE_FLOAT,
-  JAVATYPE_DOUBLE,
-  JAVATYPE_BOOLEAN,
-  JAVATYPE_STRING,
-  JAVATYPE_BYTES,
-  JAVATYPE_ENUM,
-  JAVATYPE_MESSAGE
+enum MappedType {
+  MAPPEDTYPE_INT,
+  MAPPEDTYPE_LONG,
+  MAPPEDTYPE_UINT,
+  MAPPEDTYPE_ULONG,
+  MAPPEDTYPE_FLOAT,
+  MAPPEDTYPE_DOUBLE,
+  MAPPEDTYPE_BOOLEAN,
+  MAPPEDTYPE_STRING,
+  MAPPEDTYPE_BYTES,
+  MAPPEDTYPE_ENUM,
+  MAPPEDTYPE_MESSAGE
 };
 };
 
 
-JavaType GetJavaType(FieldDescriptor::Type field_type);
+MappedType GetMappedType(FieldDescriptor::Type field_type);
 
 
-inline JavaType GetJavaType(const FieldDescriptor* field) {
-  return GetJavaType(field->type());
+inline MappedType GetMappedType(const FieldDescriptor* field) {
+  return GetMappedType(field->type());
 }
 }
 
 
-// Get the fully-qualified class name for a boxed primitive type, e.g.
-// "java.lang.Integer" for JAVATYPE_INT.  Returns NULL for enum and message
-// types.
-const char* BoxedPrimitiveTypeName(JavaType type);
+// Get the access level for generated classes: public or internal
+const char* ClassAccessLevel(const FileDescriptor* file);
+
+// Get the class name for a built-in type (including ByteString).
+// Returns NULL for enum and message types.
+const char* MappedTypeName(MappedType type);
 
 
 }  // namespace csharp
 }  // namespace csharp
 }  // namespace compiler
 }  // namespace compiler

+ 114 - 121
src/google/protobuf/compiler/csharp/csharp_message.cc

@@ -144,7 +144,7 @@ void MessageGenerator::GenerateStaticVariables(io::Printer* printer) {
   // used in the construction of descriptors, we have a tricky bootstrapping
   // used in the construction of descriptors, we have a tricky bootstrapping
   // problem.  To help control static initialization order, we make sure all
   // problem.  To help control static initialization order, we make sure all
   // descriptors and other static data that depends on them are members of
   // descriptors and other static data that depends on them are members of
-  // the outermost class in the file.  This way, they will be initialized in
+  // the proto-descriptor class.  This way, they will be initialized in
   // a deterministic order.
   // a deterministic order.
 
 
   map<string, string> vars;
   map<string, string> vars;
@@ -154,9 +154,9 @@ void MessageGenerator::GenerateStaticVariables(io::Printer* printer) {
   if (descriptor_->containing_type() != NULL) {
   if (descriptor_->containing_type() != NULL) {
     vars["parent"] = UniqueFileScopeIdentifier(descriptor_->containing_type());
     vars["parent"] = UniqueFileScopeIdentifier(descriptor_->containing_type());
   }
   }
-  if (descriptor_->file()->options().csharp_multiple_files()) {
+  if (!descriptor_->file()->options().csharp_nest_classes()) {
     // We can only make these assembly-private since the classes that use them
     // We can only make these assembly-private since the classes that use them
-    // are in separate files.
+    // aren't nested.
     vars["private"] = "internal ";
     vars["private"] = "internal ";
   } else {
   } else {
     vars["private"] = "private ";
     vars["private"] = "private ";
@@ -165,23 +165,18 @@ void MessageGenerator::GenerateStaticVariables(io::Printer* printer) {
   // The descriptor for this type.
   // The descriptor for this type.
   if (descriptor_->containing_type() == NULL) {
   if (descriptor_->containing_type() == NULL) {
     printer->Print(vars,
     printer->Print(vars,
-      "$private$static readonly pb::Descriptors.Descriptor \r\n"
-      "  internal_$identifier$_descriptor =\r\n"
-      "    getDescriptor().getMessageTypes().get($index$);\r\n");
+      "$private$static readonly pbd::MessageDescriptor internal__$identifier$__Descriptor \r\n"
+      "    = Descriptor.MessageTypes[$index$];\r\n");
   } else {
   } else {
     printer->Print(vars,
     printer->Print(vars,
-      "$private$static readonly pb::Descriptors.Descriptor \r\n"
-      "  internal_$identifier$_descriptor =\r\n"
-      "    internal_$parent$_descriptor.getNestedTypes().get($index$);\r\n");
+      "$private$static readonly pbd::MessageDescriptor  internal__$identifier$__Descriptor \r\n"
+      "    = internal__$parent$__Descriptor.NestedTypes[$index$];\r\n");
   }
   }
 
 
   // And the FieldAccessorTable.
   // And the FieldAccessorTable.
   printer->Print(vars,
   printer->Print(vars,
-    "$private$static\r\n"
-    "  pb::GeneratedMessage.FieldAccessorTable\r\n"
-    "    internal_$identifier$_fieldAccessorTable = new\r\n"
-    "      pb::GeneratedMessage.FieldAccessorTable(\r\n"
-    "        internal_$identifier$_descriptor,\r\n"
+    "$private$static pb::FieldAccess.FieldAccessorTable internal__$identifier$__FieldAccessorTable\r\n"
+    "    = new pb::FieldAccess.FieldAccessorTable(internal__$identifier$__Descriptor,\r\n"
     "        new string[] { ");
     "        new string[] { ");
   for (int i = 0; i < descriptor_->field_count(); i++) {
   for (int i = 0; i < descriptor_->field_count(); i++) {
     printer->Print(
     printer->Print(
@@ -209,16 +204,18 @@ void MessageGenerator::Generate(io::Printer* printer) {
 
 
   if (descriptor_->extension_range_count() > 0) {
   if (descriptor_->extension_range_count() > 0) {
     printer->Print(
     printer->Print(
-      "public sealed class $classname$ : pb::GeneratedMessage.ExtendableMessage<$classname$> {\r\n",
-      "classname", descriptor_->name());
+      "$access$ sealed partial class $classname$ : pb::GeneratedMessage.ExtendableMessage<$classname$> {\r\n",
+      "classname", descriptor_->name(),
+      "access", ClassAccessLevel(descriptor_->file()));
   } else {
   } else {
     printer->Print(
     printer->Print(
-      "public sealed class $classname$ : pb::GeneratedMessage {\r\n",
-      "classname", descriptor_->name());
+      "$access$ sealed partial class $classname$ : pb::GeneratedMessage<$classname$, $classname$.Builder> {\r\n",
+      "classname", descriptor_->name(),
+      "access", ClassAccessLevel(descriptor_->file()));
   }
   }
   printer->Indent();
   printer->Indent();
   printer->Print(
   printer->Print(
-    "// Use $classname$.newBuilder() to construct.\r\n"
+    "// Use $classname$.CreateBuilder() to construct.\r\n"
     "private $classname$() {}\r\n"
     "private $classname$() {}\r\n"
     "\r\n"
     "\r\n"
     "private static readonly $classname$ defaultInstance = new $classname$();\r\n"
     "private static readonly $classname$ defaultInstance = new $classname$();\r\n"
@@ -226,34 +223,44 @@ void MessageGenerator::Generate(io::Printer* printer) {
     "  get { return defaultInstance; }\r\n"
     "  get { return defaultInstance; }\r\n"
     "}\r\n"
     "}\r\n"
     "\r\n"
     "\r\n"
-    "public $classname$ DefaultInstanceForType {\r\n"
+    "public override $classname$ DefaultInstanceForType {\r\n"
     "  get { return defaultInstance; }\r\n"
     "  get { return defaultInstance; }\r\n"
     "}\r\n"
     "}\r\n"
     "\r\n",
     "\r\n",
     "classname", descriptor_->name());
     "classname", descriptor_->name());
   printer->Print(
   printer->Print(
-    "public static pb::Descriptors.Descriptor Descriptor {\r\n"
-    "  get { return $fileclass$.internal_$identifier$_descriptor; }\r\n"
+    "public static pbd::MessageDescriptor Descriptor {\r\n"
+    "  get { return $fileclass$.internal__$identifier$__Descriptor; }\r\n"
     "}\r\n"
     "}\r\n"
     "\r\n"
     "\r\n"
-    "protected pb::GeneratedMessage.FieldAccessorTable InternalGetFieldAccessorTable {\r\n"
-    "  get { return $fileclass$.internal_$identifier$_fieldAccessorTable; }\r\n"
+    "protected internal override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors {\r\n"
+    "  get { return $fileclass$.internal__$identifier$__FieldAccessorTable; }\r\n"
     "}\r\n"
     "}\r\n"
     "\r\n",
     "\r\n",
     "fileclass", ClassName(descriptor_->file()),
     "fileclass", ClassName(descriptor_->file()),
     "identifier", UniqueFileScopeIdentifier(descriptor_));
     "identifier", UniqueFileScopeIdentifier(descriptor_));
 
 
-  // Nested types and extensions
-  for (int i = 0; i < descriptor_->enum_type_count(); i++) {
-    EnumGenerator(descriptor_->enum_type(i)).Generate(printer);
-  }
+  if (descriptor_->enum_type_count()
+      + descriptor_->nested_type_count()
+      + descriptor_->extension_count() > 0) {
+    printer->Print("#region Nested types\r\n");
+    printer->Print("public static class Types {\r\n");
+    printer->Indent();
+    // Nested types and extensions
+    for (int i = 0; i < descriptor_->enum_type_count(); i++) {
+      EnumGenerator(descriptor_->enum_type(i)).Generate(printer);
+    }
 
 
-  for (int i = 0; i < descriptor_->nested_type_count(); i++) {
-    MessageGenerator(descriptor_->nested_type(i)).Generate(printer);
-  }
+    for (int i = 0; i < descriptor_->nested_type_count(); i++) {
+      MessageGenerator(descriptor_->nested_type(i)).Generate(printer);
+    }
 
 
-  for (int i = 0; i < descriptor_->extension_count(); i++) {
-    ExtensionGenerator(descriptor_->extension(i)).Generate(printer);
+    for (int i = 0; i < descriptor_->extension_count(); i++) {
+      ExtensionGenerator(descriptor_->extension(i)).Generate(printer);
+    }
+    printer->Outdent();
+    printer->Print("}\r\n");
+    printer->Print("#endregion\r\n\r\n");
   }
   }
 
 
   // Fields
   // Fields
@@ -286,12 +293,12 @@ GenerateMessageSerializationMethods(io::Printer* printer) {
   sort(sorted_extensions.begin(), sorted_extensions.end(),
   sort(sorted_extensions.begin(), sorted_extensions.end(),
        ExtensionRangeOrdering());
        ExtensionRangeOrdering());
 
 
-  printer->Print("public void writeTo(pb::CodedOutputStream output) {\r\n");
+  printer->Print("public override void WriteTo(pb::CodedOutputStream output) {\r\n");
   printer->Indent();
   printer->Indent();
 
 
   if (descriptor_->extension_range_count() > 0) {
   if (descriptor_->extension_range_count() > 0) {
     printer->Print(
     printer->Print(
-      "pb::GeneratedMessage.ExtendableMessage.ExtensionWriter extensionWriter = NewExtensionWriter();\r\n");
+      "pb::GeneratedMessage.ExtendableMessage.ExtensionWriter extensionWriter = CreateExtensionWriter();\r\n");
   }
   }
 
 
   // Merge the fields and the extension ranges, both sorted by field number.
   // Merge the fields and the extension ranges, both sorted by field number.
@@ -322,7 +329,7 @@ GenerateMessageSerializationMethods(io::Printer* printer) {
     "}\r\n"
     "}\r\n"
     "\r\n"
     "\r\n"
     "private int memoizedSerializedSize = -1;\r\n"
     "private int memoizedSerializedSize = -1;\r\n"
-    "public int SerializedSize {\r\n");
+    "public override int SerializedSize {\r\n");
   printer->Indent();
   printer->Indent();
   printer->Print("get {\r\n");
   printer->Print("get {\r\n");
   printer->Indent();
   printer->Indent();
@@ -345,7 +352,7 @@ GenerateMessageSerializationMethods(io::Printer* printer) {
       "size += UnknownFields.SerializedSizeAsMessageSet;\r\n");
       "size += UnknownFields.SerializedSizeAsMessageSet;\r\n");
   } else {
   } else {
     printer->Print(
     printer->Print(
-      "size += UnknownFieldsSerializedSize;\r\n");
+      "size += UnknownFields.SerializedSize;\r\n");
   }
   }
 
 
   printer->Outdent();
   printer->Outdent();
@@ -364,38 +371,38 @@ GenerateParseFromMethods(io::Printer* printer) {
   //   because they need to be generated even for messages that are optimized
   //   because they need to be generated even for messages that are optimized
   //   for code size.
   //   for code size.
   printer->Print(
   printer->Print(
-    "public static $classname$ parseFrom(pb::ByteString data) {\r\n"
-    "  return newBuilder().mergeFrom(data).buildParsed();\r\n"
+    "public static $classname$ ParseFrom(pb::ByteString data) {\r\n"
+    "  return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();\r\n"
     "}\r\n"
     "}\r\n"
-    "public static $classname$ parseFrom(pb::ByteString data,\r\n"
+    "public static $classname$ ParseFrom(pb::ByteString data,\r\n"
     "    pb::ExtensionRegistry extensionRegistry) {\r\n"
     "    pb::ExtensionRegistry extensionRegistry) {\r\n"
-    "  return newBuilder().mergeFrom(data, extensionRegistry)\r\n"
-    "           .buildParsed();\r\n"
+    "  return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))\r\n"
+    "           .BuildParsed();\r\n"
     "}\r\n"
     "}\r\n"
-    "public static $classname$ parseFrom(byte[] data) {\r\n"
-    "  return newBuilder().mergeFrom(data).buildParsed();\r\n"
+    "public static $classname$ ParseFrom(byte[] data) {\r\n"
+    "  return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();\r\n"
     "}\r\n"
     "}\r\n"
     "public static $classname$ parseFrom(byte[] data,\r\n"
     "public static $classname$ parseFrom(byte[] data,\r\n"
     "    pb::ExtensionRegistry extensionRegistry) {\r\n"
     "    pb::ExtensionRegistry extensionRegistry) {\r\n"
-    "  return newBuilder().mergeFrom(data, extensionRegistry)\r\n"
-    "           .buildParsed();\r\n"
+    "  return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))\r\n"
+    "           .BuildParsed();\r\n"
     "}\r\n"
     "}\r\n"
-    "public static $classname$ parseFrom(global::System.IO.Stream input) {\r\n"
-    "  return newBuilder().mergeFrom(input).buildParsed();\r\n"
+    "public static $classname$ ParseFrom(global::System.IO.Stream input) {\r\n"
+    "  return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();\r\n"
     "}\r\n"
     "}\r\n"
-    "public static $classname$ parseFrom(\r\n"
+    "public static $classname$ ParseFrom(\r\n"
     "    global::System.IO.Stream input,\r\n"
     "    global::System.IO.Stream input,\r\n"
     "    pb::ExtensionRegistry extensionRegistry) {\r\n"
     "    pb::ExtensionRegistry extensionRegistry) {\r\n"
-    "  return newBuilder().mergeFrom(input, extensionRegistry)\r\n"
-    "           .buildParsed();\r\n"
+    "  return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))\r\n"
+    "           .BuildParsed();\r\n"
     "}\r\n"
     "}\r\n"
-    "public static $classname$ parseFrom(pb::CodedInputStream input) {\r\n"
-    "  return newBuilder().mergeFrom(input).buildParsed();\r\n"
+    "public static $classname$ ParseFrom(pb::CodedInputStream input) {\r\n"
+    "  return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();\r\n"
     "}\r\n"
     "}\r\n"
-    "public static $classname$ parseFrom(pb::CodedInputStream input,\r\n"
+    "public static $classname$ ParseFrom(pb::CodedInputStream input,\r\n"
     "    pb::ExtensionRegistry extensionRegistry) {\r\n"
     "    pb::ExtensionRegistry extensionRegistry) {\r\n"
-    "  return newBuilder().mergeFrom(input, extensionRegistry)\r\n"
-    "           .buildParsed();\r\n"
+    "  return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))\r\n"
+    "           .BuildParsed();\r\n"
     "}\r\n"
     "}\r\n"
     "\r\n",
     "\r\n",
     "classname", ClassName(descriptor_));
     "classname", ClassName(descriptor_));
@@ -409,7 +416,7 @@ void MessageGenerator::GenerateSerializeOneField(
 void MessageGenerator::GenerateSerializeOneExtensionRange(
 void MessageGenerator::GenerateSerializeOneExtensionRange(
     io::Printer* printer, const Descriptor::ExtensionRange* range) {
     io::Printer* printer, const Descriptor::ExtensionRange* range) {
   printer->Print(
   printer->Print(
-    "extensionWriter.writeUntil($end$, output);\r\n",
+    "extensionWriter.WriteUntil($end$, output);\r\n",
     "end", SimpleItoa(range->end));
     "end", SimpleItoa(range->end));
 }
 }
 
 
@@ -417,23 +424,25 @@ void MessageGenerator::GenerateSerializeOneExtensionRange(
 
 
 void MessageGenerator::GenerateBuilder(io::Printer* printer) {
 void MessageGenerator::GenerateBuilder(io::Printer* printer) {
   printer->Print(
   printer->Print(
-    "public static Builder newBuilder() { return new Builder(); }\r\n"
-    "public Builder newBuilderForType() { return new Builder(); }\r\n"
-    "public static Builder newBuilder($classname$ prototype) {\r\n"
-    "  return new Builder().mergeFrom(prototype);\r\n"
+    "public static Builder CreateBuilder() { return new Builder(); }\r\n"
+    "public override IBuilder<$classname$> CreateBuilderForType() { return new Builder(); }\r\n"
+    "public static Builder CreateBuilder($classname$ prototype) {\r\n"
+    "  return (Builder) new Builder().MergeFrom(prototype);\r\n"
     "}\r\n"
     "}\r\n"
     "\r\n",
     "\r\n",
     "classname", ClassName(descriptor_));
     "classname", ClassName(descriptor_));
 
 
   if (descriptor_->extension_range_count() > 0) {
   if (descriptor_->extension_range_count() > 0) {
     printer->Print(
     printer->Print(
-      "public sealed class Builder : pb::GeneratedMessage.ExtendableBuilder<\r\n"
+      "$access$ sealed partial class Builder : pb::GeneratedMessage.ExtendableBuilder<\r\n"
       "      $classname$, Builder> {\r\n",
       "      $classname$, Builder> {\r\n",
-      "classname", ClassName(descriptor_));
+      "classname", ClassName(descriptor_),
+      "access", ClassAccessLevel(descriptor_->file()));
   } else {
   } else {
     printer->Print(
     printer->Print(
-      "public sealed class Builder : pb::GeneratedMessage.Builder<Builder> {\r\n",
-      "classname", ClassName(descriptor_));
+      "$access$ sealed partial class Builder : pb::GeneratedBuilder<$classname$, Builder> {\r\n",
+      "classname", ClassName(descriptor_),
+      "access", ClassAccessLevel(descriptor_->file()));
   }
   }
   printer->Indent();
   printer->Indent();
 
 
@@ -460,31 +469,30 @@ void MessageGenerator::GenerateBuilder(io::Printer* printer) {
 
 
 void MessageGenerator::GenerateCommonBuilderMethods(io::Printer* printer) {
 void MessageGenerator::GenerateCommonBuilderMethods(io::Printer* printer) {
   printer->Print(
   printer->Print(
-    "// Construct using $classname$.newBuilder()\r\n"
-    "private Builder() {}\r\n"
+    "// Construct using $classname$.CreateBuilder()\r\n"
+    "internal Builder() {}\r\n"
     "\r\n"
     "\r\n"
     "$classname$ result = new $classname$();\r\n"
     "$classname$ result = new $classname$();\r\n"
     "\r\n"
     "\r\n"
-    "protected $classname$ internalGetResult() {\r\n"
-    "  return result;\r\n"
+    "protected override $classname$ MessageBeingBuilt {\r\n"
+    "  get { return result; }\r\n"
     "}\r\n"
     "}\r\n"
     "\r\n"
     "\r\n"
-    "public Builder clear() {\r\n"
+    "public override IBuilder<$classname$> Clear() {\r\n"
     "  result = new $classname$();\r\n"
     "  result = new $classname$();\r\n"
     "  return this;\r\n"
     "  return this;\r\n"
     "}\r\n"
     "}\r\n"
     "\r\n"
     "\r\n"
-    "public Builder clone() {\r\n"
-    "  return new Builder().mergeFrom(result);\r\n"
+    "public override IBuilder<$classname$> Clone() {\r\n"
+    "  return new Builder().MergeFrom(result);\r\n"
     "}\r\n"
     "}\r\n"
     "\r\n"
     "\r\n"
-    "public pb::Descriptors.Descriptor\r\n"
-    "    getDescriptorForType() {\r\n"
-    "  return $classname$.getDescriptor();\r\n"
+    "public override pbd::MessageDescriptor DescriptorForType {\r\n"
+    "  get { return $classname$.Descriptor; }\r\n"
     "}\r\n"
     "}\r\n"
     "\r\n"
     "\r\n"
-    "public $classname$ getDefaultInstanceForType() {\r\n"
-    "  return $classname$.getDefaultInstance();\r\n"
+    "public override $classname$ DefaultInstanceForType {\r\n"
+    "  get { return $classname$.DefaultInstance; }\r\n"
     "}\r\n"
     "}\r\n"
     "\r\n",
     "\r\n",
     "classname", ClassName(descriptor_));
     "classname", ClassName(descriptor_));
@@ -492,23 +500,7 @@ void MessageGenerator::GenerateCommonBuilderMethods(io::Printer* printer) {
   // -----------------------------------------------------------------
   // -----------------------------------------------------------------
 
 
   printer->Print(
   printer->Print(
-    "public $classname$ build() {\r\n"
-    "  if (!isInitialized()) {\r\n"
-    "    throw new pb::UninitializedMessageException(\r\n"
-    "      result);\r\n"
-    "  }\r\n"
-    "  return buildPartial();\r\n"
-    "}\r\n"
-    "\r\n"
-    "private $classname$ buildParsed() {\r\n"
-    "  if (!isInitialized()) {\r\n"
-    "    throw new pb::UninitializedMessageException(\r\n"
-    "      result).asInvalidProtocolBufferException();\r\n"
-    "  }\r\n"
-    "  return buildPartial();\r\n"
-    "}\r\n"
-    "\r\n"
-    "public $classname$ buildPartial() {\r\n",
+    "public override $classname$ BuildPartial() {\r\n",
     "classname", ClassName(descriptor_));
     "classname", ClassName(descriptor_));
   printer->Indent();
   printer->Indent();
 
 
@@ -527,21 +519,22 @@ void MessageGenerator::GenerateCommonBuilderMethods(io::Printer* printer) {
 
 
   // -----------------------------------------------------------------
   // -----------------------------------------------------------------
 
 
+  //TODO(jonskeet): Work out what this is really for...
   if (descriptor_->file()->options().optimize_for() == FileOptions::SPEED) {
   if (descriptor_->file()->options().optimize_for() == FileOptions::SPEED) {
     printer->Print(
     printer->Print(
-      "public Builder mergeFrom(pb::Message other) {\r\n"
-      "  if (other instanceof $classname$) {\r\n"
-      "    return mergeFrom(($classname$)other);\r\n"
+      "public override IBuilder MergeFrom(pb::IMessage other) {\r\n"
+      "  if (other is $classname$) {\r\n"
+      "    return MergeFrom(($classname$) other);\r\n"
       "  } else {\r\n"
       "  } else {\r\n"
-      "    super.mergeFrom(other);\r\n"
+      "    base.MergeFrom(other);\r\n"
       "    return this;\r\n"
       "    return this;\r\n"
       "  }\r\n"
       "  }\r\n"
       "}\r\n"
       "}\r\n"
       "\r\n"
       "\r\n"
-      "public Builder mergeFrom($classname$ other) {\r\n"
+      "public override IBuilder<$classname$> MergeFrom($classname$ other) {\r\n"
       // Optimization:  If other is the default instance, we know none of its
       // Optimization:  If other is the default instance, we know none of its
       //   fields are set so we can skip the merge.
       //   fields are set so we can skip the merge.
-      "  if (other == $classname$.getDefaultInstance()) return this;\r\n",
+      "  if (other == $classname$.DefaultInstance) return this;\r\n",
       "classname", ClassName(descriptor_));
       "classname", ClassName(descriptor_));
     printer->Indent();
     printer->Indent();
 
 
@@ -551,7 +544,7 @@ void MessageGenerator::GenerateCommonBuilderMethods(io::Printer* printer) {
 
 
     printer->Outdent();
     printer->Outdent();
     printer->Print(
     printer->Print(
-      "  this.mergeUnknownFields(other.getUnknownFields());\r\n"
+      "  this.MergeUnknownFields(other.UnknownFields);\r\n"
       "  return this;\r\n"
       "  return this;\r\n"
       "}\r\n"
       "}\r\n"
       "\r\n");
       "\r\n");
@@ -565,37 +558,33 @@ void MessageGenerator::GenerateBuilderParsingMethods(io::Printer* printer) {
     SortFieldsByNumber(descriptor_));
     SortFieldsByNumber(descriptor_));
 
 
   printer->Print(
   printer->Print(
-    "public Builder mergeFrom(\r\n"
-    "    pb::CodedInputStream input) {\r\n"
-    "  return mergeFrom(input,\r\n"
-    "    pb::ExtensionRegistry.getEmptyRegistry());\r\n"
+    "public override IBuilder<$classname$> MergeFrom(pb::CodedInputStream input) {\r\n"
+    "  return MergeFrom(input, pb::ExtensionRegistry.Empty);\r\n"
     "}\r\n"
     "}\r\n"
     "\r\n"
     "\r\n"
-    "public Builder mergeFrom(\r\n"
-    "    pb::CodedInputStream input,\r\n"
-    "    pb::ExtensionRegistry extensionRegistry) {\r\n");
+    "public override IBuilder<$classname$> MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {\r\n",
+    "classname", ClassName(descriptor_));
   printer->Indent();
   printer->Indent();
 
 
   printer->Print(
   printer->Print(
     "pb::UnknownFieldSet.Builder unknownFields =\r\n"
     "pb::UnknownFieldSet.Builder unknownFields =\r\n"
-    "  pb::UnknownFieldSet.newBuilder(\r\n"
-    "    this.getUnknownFields());\r\n"
+    "  pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);\r\n"
     "while (true) {\r\n");
     "while (true) {\r\n");
   printer->Indent();
   printer->Indent();
 
 
   printer->Print(
   printer->Print(
-    "int tag = input.readTag();\r\n"
+    "uint tag = input.ReadTag();\r\n"
     "switch (tag) {\r\n");
     "switch (tag) {\r\n");
   printer->Indent();
   printer->Indent();
 
 
   printer->Print(
   printer->Print(
     "case 0:\r\n"          // zero signals EOF / limit reached
     "case 0:\r\n"          // zero signals EOF / limit reached
-    "  this.setUnknownFields(unknownFields.build());\r\n"
+    "  this.UnknownFields = unknownFields.Build();\r\n"
     "  return this;\r\n"
     "  return this;\r\n"
     "default: {\r\n"
     "default: {\r\n"
-    "  if (!parseUnknownField(input, unknownFields,\r\n"
+    "  if (!ParseUnknownField(input, unknownFields,\r\n"
     "                         extensionRegistry, tag)) {\r\n"
     "                         extensionRegistry, tag)) {\r\n"
-    "    this.setUnknownFields(unknownFields.build());\r\n"
+    "    this.UnknownFields = unknownFields.Build();\r\n"
     "    return this;\r\n"   // it's an endgroup tag
     "    return this;\r\n"   // it's an endgroup tag
     "  }\r\n"
     "  }\r\n"
     "  break;\r\n"
     "  break;\r\n"
@@ -632,8 +621,9 @@ void MessageGenerator::GenerateBuilderParsingMethods(io::Printer* printer) {
 // ===================================================================
 // ===================================================================
 
 
 void MessageGenerator::GenerateIsInitialized(io::Printer* printer) {
 void MessageGenerator::GenerateIsInitialized(io::Printer* printer) {
-  printer->Print(
-    "public final boolean isInitialized() {\r\n");
+  printer->Print("public override bool IsInitialized {\r\n");
+  printer->Indent();
+  printer->Print("get {\r\n");
   printer->Indent();
   printer->Indent();
 
 
   // Check that all required fields in this message are set.
   // Check that all required fields in this message are set.
@@ -657,22 +647,22 @@ void MessageGenerator::GenerateIsInitialized(io::Printer* printer) {
       switch (field->label()) {
       switch (field->label()) {
         case FieldDescriptor::LABEL_REQUIRED:
         case FieldDescriptor::LABEL_REQUIRED:
           printer->Print(
           printer->Print(
-            "if (!get$name$().isInitialized()) return false;\r\n",
+            "if (!$name$.IsInitialized) return false;\r\n",
             "type", ClassName(field->message_type()),
             "type", ClassName(field->message_type()),
             "name", UnderscoresToCapitalizedCamelCase(field));
             "name", UnderscoresToCapitalizedCamelCase(field));
           break;
           break;
         case FieldDescriptor::LABEL_OPTIONAL:
         case FieldDescriptor::LABEL_OPTIONAL:
           printer->Print(
           printer->Print(
-            "if (has$name$()) {\r\n"
-            "  if (!get$name$().isInitialized()) return false;\r\n"
+            "if (Has$name$) {\r\n"
+            "  if (!$name$.IsInitialized) return false;\r\n"
             "}\r\n",
             "}\r\n",
             "type", ClassName(field->message_type()),
             "type", ClassName(field->message_type()),
             "name", UnderscoresToCapitalizedCamelCase(field));
             "name", UnderscoresToCapitalizedCamelCase(field));
           break;
           break;
         case FieldDescriptor::LABEL_REPEATED:
         case FieldDescriptor::LABEL_REPEATED:
           printer->Print(
           printer->Print(
-            "for ($type$ element : get$name$List()) {\r\n"
-            "  if (!element.isInitialized()) return false;\r\n"
+            "foreach ($type$ element in $name$List) {\r\n"
+            "  if (!element.IsInitialized) return false;\r\n"
             "}\r\n",
             "}\r\n",
             "type", ClassName(field->message_type()),
             "type", ClassName(field->message_type()),
             "name", UnderscoresToCapitalizedCamelCase(field));
             "name", UnderscoresToCapitalizedCamelCase(field));
@@ -689,6 +679,9 @@ void MessageGenerator::GenerateIsInitialized(io::Printer* printer) {
   printer->Outdent();
   printer->Outdent();
   printer->Print(
   printer->Print(
     "  return true;\r\n"
     "  return true;\r\n"
+    "}\r\n");
+  printer->Outdent();
+  printer->Print(
     "}\r\n"
     "}\r\n"
     "\r\n");
     "\r\n");
 }
 }

+ 74 - 81
src/google/protobuf/compiler/csharp/csharp_message_field.cc

@@ -65,45 +65,50 @@ MessageFieldGenerator::~MessageFieldGenerator() {}
 void MessageFieldGenerator::
 void MessageFieldGenerator::
 GenerateMembers(io::Printer* printer) const {
 GenerateMembers(io::Printer* printer) const {
   printer->Print(variables_,
   printer->Print(variables_,
-    "private boolean has$capitalized_name$;\r\n"
-    "private $type$ $name$_ = $type$.getDefaultInstance();\r\n"
-    "public boolean has$capitalized_name$() { return has$capitalized_name$; }\r\n"
-    "public $type$ get$capitalized_name$() { return $name$_; }\r\n");
+    "private bool has$capitalized_name$;\r\n"
+    "private $type$ $name$_ = $type$.DefaultInstance;\r\n"
+    "public bool Has$capitalized_name$ {\r\n"
+    "  get { return has$capitalized_name$; }\r\n"
+    "}\r\n"
+    "public $type$ $capitalized_name$ {\r\n"
+    "  get { return $name$_; }\r\n"
+    "}\r\n");
 }
 }
 
 
 void MessageFieldGenerator::
 void MessageFieldGenerator::
 GenerateBuilderMembers(io::Printer* printer) const {
 GenerateBuilderMembers(io::Printer* printer) const {
   printer->Print(variables_,
   printer->Print(variables_,
-    "public boolean has$capitalized_name$() {\r\n"
-    "  return result.has$capitalized_name$();\r\n"
+    "public bool Has$capitalized_name$ {\r\n"
+    "  get { return result.Has$capitalized_name$; }\r\n"
     "}\r\n"
     "}\r\n"
-    "public $type$ get$capitalized_name$() {\r\n"
-    "  return result.get$capitalized_name$();\r\n"
+    "public $type$ $capitalized_name$ {\r\n"
+    "  get { return result.$capitalized_name$; }\r\n"
+    "  set { Set$capitalized_name$(value); }\r\n"
     "}\r\n"
     "}\r\n"
-    "public Builder set$capitalized_name$($type$ value) {\r\n"
+    "public Builder Set$capitalized_name$($type$ value) {\r\n"
     "  result.has$capitalized_name$ = true;\r\n"
     "  result.has$capitalized_name$ = true;\r\n"
     "  result.$name$_ = value;\r\n"
     "  result.$name$_ = value;\r\n"
     "  return this;\r\n"
     "  return this;\r\n"
     "}\r\n"
     "}\r\n"
-    "public Builder set$capitalized_name$($type$.Builder builderForValue) {\r\n"
+    "public Builder Set$capitalized_name$($type$.Builder builderForValue) {\r\n"
     "  result.has$capitalized_name$ = true;\r\n"
     "  result.has$capitalized_name$ = true;\r\n"
-    "  result.$name$_ = builderForValue.build();\r\n"
+    "  result.$name$_ = builderForValue.Build();\r\n"
     "  return this;\r\n"
     "  return this;\r\n"
     "}\r\n"
     "}\r\n"
-    "public Builder merge$capitalized_name$($type$ value) {\r\n"
-    "  if (result.has$capitalized_name$() &&\r\n"
-    "      result.$name$_ != $type$.getDefaultInstance()) {\r\n"
+    "public Builder Merge$capitalized_name$($type$ value) {\r\n"
+    "  if (result.Has$capitalized_name$ &&\r\n"
+    "      result.$name$_ != $type$.DefaultInstance) {\r\n"
     "    result.$name$_ =\r\n"
     "    result.$name$_ =\r\n"
-    "      $type$.newBuilder(result.$name$_).mergeFrom(value).buildPartial();\r\n"
+    "      $type$.CreateBuilder(result.$name$_).MergeFrom(value).BuildPartial();\r\n"
     "  } else {\r\n"
     "  } else {\r\n"
     "    result.$name$_ = value;\r\n"
     "    result.$name$_ = value;\r\n"
     "  }\r\n"
     "  }\r\n"
     "  result.has$capitalized_name$ = true;\r\n"
     "  result.has$capitalized_name$ = true;\r\n"
     "  return this;\r\n"
     "  return this;\r\n"
     "}\r\n"
     "}\r\n"
-    "public Builder clear$capitalized_name$() {\r\n"
+    "public Builder Clear$capitalized_name$() {\r\n"
     "  result.has$capitalized_name$ = false;\r\n"
     "  result.has$capitalized_name$ = false;\r\n"
-    "  result.$name$_ = $type$.getDefaultInstance();\r\n"
+    "  result.$name$_ = $type$.DefaultInstance;\r\n"
     "  return this;\r\n"
     "  return this;\r\n"
     "}\r\n");
     "}\r\n");
 }
 }
@@ -111,8 +116,8 @@ GenerateBuilderMembers(io::Printer* printer) const {
 void MessageFieldGenerator::
 void MessageFieldGenerator::
 GenerateMergingCode(io::Printer* printer) const {
 GenerateMergingCode(io::Printer* printer) const {
   printer->Print(variables_,
   printer->Print(variables_,
-    "if (other.has$capitalized_name$()) {\r\n"
-    "  merge$capitalized_name$(other.get$capitalized_name$());\r\n"
+    "if (other.Has$capitalized_name$) {\r\n"
+    "  Merge$capitalized_name$(other.$capitalized_name$);\r\n"
     "}\r\n");
     "}\r\n");
 }
 }
 
 
@@ -124,44 +129,39 @@ GenerateBuildingCode(io::Printer* printer) const {
 void MessageFieldGenerator::
 void MessageFieldGenerator::
 GenerateParsingCode(io::Printer* printer) const {
 GenerateParsingCode(io::Printer* printer) const {
   printer->Print(variables_,
   printer->Print(variables_,
-    "$type$.Builder subBuilder = $type$.newBuilder();\r\n"
-    "if (has$capitalized_name$()) {\r\n"
-    "  subBuilder.mergeFrom(get$capitalized_name$());\r\n"
+    "$type$.Builder subBuilder = $type$.CreateBuilder();\r\n"
+    "if (Has$capitalized_name$) {\r\n"
+    "  subBuilder.MergeFrom($capitalized_name$);\r\n"
     "}\r\n");
     "}\r\n");
 
 
   if (descriptor_->type() == FieldDescriptor::TYPE_GROUP) {
   if (descriptor_->type() == FieldDescriptor::TYPE_GROUP) {
     printer->Print(variables_,
     printer->Print(variables_,
-      "input.readGroup($number$, subBuilder, extensionRegistry);\r\n");
+      "input.ReadGroup($number$, subBuilder, extensionRegistry);\r\n");
   } else {
   } else {
     printer->Print(variables_,
     printer->Print(variables_,
-      "input.readMessage(subBuilder, extensionRegistry);\r\n");
+      "input.ReadMessage(subBuilder, extensionRegistry);\r\n");
   }
   }
 
 
   printer->Print(variables_,
   printer->Print(variables_,
-    "set$capitalized_name$(subBuilder.buildPartial());\r\n");
+    "$capitalized_name$ = subBuilder.BuildPartial();\r\n");
 }
 }
 
 
 void MessageFieldGenerator::
 void MessageFieldGenerator::
 GenerateSerializationCode(io::Printer* printer) const {
 GenerateSerializationCode(io::Printer* printer) const {
   printer->Print(variables_,
   printer->Print(variables_,
-    "if (has$capitalized_name$()) {\r\n"
-    "  output.write$group_or_message$($number$, get$capitalized_name$());\r\n"
+    "if (Has$capitalized_name$) {\r\n"
+    "  output.Write$group_or_message$($number$, $capitalized_name$);\r\n"
     "}\r\n");
     "}\r\n");
 }
 }
 
 
 void MessageFieldGenerator::
 void MessageFieldGenerator::
 GenerateSerializedSizeCode(io::Printer* printer) const {
 GenerateSerializedSizeCode(io::Printer* printer) const {
   printer->Print(variables_,
   printer->Print(variables_,
-    "if (has$capitalized_name$()) {\r\n"
-    "  size += pb::CodedOutputStream\r\n"
-    "    .compute$group_or_message$Size($number$, get$capitalized_name$());\r\n"
+    "if (Has$capitalized_name$) {\r\n"
+    "  size += pb::CodedOutputStream.Compute$group_or_message$Size($number$, $capitalized_name$);\r\n"
     "}\r\n");
     "}\r\n");
 }
 }
 
 
-string MessageFieldGenerator::GetBoxedType() const {
-  return ClassName(descriptor_->message_type());
-}
-
 // ===================================================================
 // ===================================================================
 
 
 RepeatedMessageFieldGenerator::
 RepeatedMessageFieldGenerator::
@@ -175,14 +175,14 @@ RepeatedMessageFieldGenerator::~RepeatedMessageFieldGenerator() {}
 void RepeatedMessageFieldGenerator::
 void RepeatedMessageFieldGenerator::
 GenerateMembers(io::Printer* printer) const {
 GenerateMembers(io::Printer* printer) const {
   printer->Print(variables_,
   printer->Print(variables_,
-    "internal System.Collections.Generic.IList<$type$> Empty$capitalized_name$ =\r\n"
-    "  new System.Collections.ReadOnlyCollection<$type$> ();\r\n"
-    "internal System.Collections.Generic.IList<$type$> $name$_ = Empty$capitalized_name$;\r\n"
-    "public System.Collections.Generic.IList<$type$> $capitalized_name$List {\r\n"
+    "private scg::IList<$type$> $name$_ = pbc::Lists<$type$>.Empty;\r\n"
+    "public scg::IList<$type$> $capitalized_name$List {\r\n"
     "  get { return $name$_; } \r\n"   // note:  unmodifiable list
     "  get { return $name$_; } \r\n"   // note:  unmodifiable list
     "}\r\n"
     "}\r\n"
-    "public int $capitalized_name$Count { get { return $name$_.Count; }  }\r\n"
-    "public $type$ $capitalized_name$(int index) {\r\n"
+    "public int $capitalized_name$Count\r\n"
+    "  { get { return $name$_.Count; }\r\n"
+    "}\r\n"
+    "public $type$ Get$capitalized_name$(int index) {\r\n"
     "  return $name$_ [index];\r\n"
     "  return $name$_ [index];\r\n"
     "}\r\n");
     "}\r\n");
 }
 }
@@ -194,47 +194,46 @@ GenerateBuilderMembers(io::Printer* printer) const {
     //   could hold on to the returned list and modify it after the message
     //   could hold on to the returned list and modify it after the message
     //   has been built, thus mutating the message which is supposed to be
     //   has been built, thus mutating the message which is supposed to be
     //   immutable.
     //   immutable.
-    "public System.Collections.Generic.IList<$type$> Get$capitalized_name$List() {\r\n"
-    "  if (result.$name$_ == $type$.Empty$capitalized_name$)\r\n"
-    "    return result.$name$;\r\n"
-    "  return result.$name$_.AsReadOnly ();\r\n"
+    "public scg::IList<$type$> $capitalized_name$List {\r\n"
+    "  get { return pbc::Lists.AsReadOnly(result.$name$_); }\r\n"
     "}\r\n"
     "}\r\n"
-    "public int Get$capitalized_name$Count() {\r\n"
-    "  return result.Get$capitalized_name$Count();\r\n"
+    "public int $capitalized_name$Count {\r\n"
+    "  get { return result.$capitalized_name$Count; }\r\n"
     "}\r\n"
     "}\r\n"
     "public $type$ Get$capitalized_name$(int index) {\r\n"
     "public $type$ Get$capitalized_name$(int index) {\r\n"
     "  return result.Get$capitalized_name$(index);\r\n"
     "  return result.Get$capitalized_name$(index);\r\n"
     "}\r\n"
     "}\r\n"
     "public Builder Set$capitalized_name$(int index, $type$ value) {\r\n"
     "public Builder Set$capitalized_name$(int index, $type$ value) {\r\n"
-    "  result.$name$_ [index] = value;\r\n"
+    "  result.$name$_[index] = value;\r\n"
     "  return this;\r\n"
     "  return this;\r\n"
     "}\r\n"
     "}\r\n"
-    "public Builder Set$capitalized_name$(int index, "
-      "$type$.Builder builderForValue) {\r\n"
-    "  result.$name$_ [index] = builderForValue.build();\r\n"
+    "public Builder Set$capitalized_name$(int index, $type$.Builder builderForValue) {\r\n"
+    "  result.$name$_[index] = builderForValue.Build();\r\n"
     "  return this;\r\n"
     "  return this;\r\n"
     "}\r\n"
     "}\r\n"
     "public Builder Add$capitalized_name$($type$ value) {\r\n"
     "public Builder Add$capitalized_name$($type$ value) {\r\n"
-    "  if (result.$name$ == $type$.Empty$capitalized_name$)\r\n"
-    "    result.$name$ = new System.Collections.Generic.List<$type$>();\r\n"
+    "  if (result.$name$_ == pbc::Lists<$type$>.Empty) {\r\n"
+    "    result.$name$_ = new scg::List<$type$>();\r\n"
+    "  }\r\n"
     "  result.$name$_.Add(value);\r\n"
     "  result.$name$_.Add(value);\r\n"
     "  return this;\r\n"
     "  return this;\r\n"
     "}\r\n"
     "}\r\n"
     "public Builder Add$capitalized_name$($type$.Builder builderForValue) {\r\n"
     "public Builder Add$capitalized_name$($type$.Builder builderForValue) {\r\n"
-    "  if (result.$name$ == $type$.Empty$capitalized_name$)\r\n"
-    "    result.$name$ = new System.Collections.Generic.List<$type$>();\r\n"
-    "  result.$name$_.Add(builderForValue.build());\r\n"
+    "  if (result.$name$_ == pbc::Lists<$type$>.Empty) {\r\n"
+    "    result.$name$_ = new scg::List<$type$>();\r\n"
+    "  }\r\n"
+    "  result.$name$_.Add(builderForValue.Build());\r\n"
     "  return this;\r\n"
     "  return this;\r\n"
     "}\r\n"
     "}\r\n"
-    "public Builder AddAll$capitalized_name$<T>(\r\n"
-    "    global::System.Collections.Generic.IEnumerable<T> values) where T : $type$ {\r\n"
-    "  if (result.$name$ == $type$.Empty$capitalized_name$)\r\n"
-    "    result.$name$ = new System.Collections.Generic.List<$type$>();\r\n"
-    "  result.$name$_.AddEnumerable (values);\r\n"
+    "public Builder AddRange$capitalized_name$(scg::IEnumerable<$type$> values) {\r\n"
+    "  if (result.$name$_ == pbc::Lists<$type$>.Empty) {\r\n"
+    "    result.$name$_ = new scg::List<$type$>();\r\n"
+    "  }\r\n"
+    "  base.AddRange(values, result.$name$_);\r\n"
     "  return this;\r\n"
     "  return this;\r\n"
     "}\r\n"
     "}\r\n"
     "public Builder Clear$capitalized_name$() {\r\n"
     "public Builder Clear$capitalized_name$() {\r\n"
-    "  result.$name$_ = $type$.Empty$capitalized_name$;\r\n"
+    "  result.$name$_ = pbc::Lists<$type$>.Empty;\r\n"
     "  return this;\r\n"
     "  return this;\r\n"
     "}\r\n");
     "}\r\n");
 }
 }
@@ -242,61 +241,55 @@ GenerateBuilderMembers(io::Printer* printer) const {
 void RepeatedMessageFieldGenerator::
 void RepeatedMessageFieldGenerator::
 GenerateMergingCode(io::Printer* printer) const {
 GenerateMergingCode(io::Printer* printer) const {
   printer->Print(variables_,
   printer->Print(variables_,
-    "if (!other.$name$_ != $type$.Empty$capitalized_name$) {\r\n"
-    "  if (result.$name$_ == $type$.Empty$capitalized_name$) {\r\n"
-    "    result.$name$_ = new System.Collections.Generic.List<$type$>();\r\n"
+    "if (other.$name$_.Count != 0) {\r\n"
+    "  if (result.$name$_.Count == 0) {\r\n"
+    "    result.$name$_ = new scg::List<$type$>();\r\n"
     "  }\r\n"
     "  }\r\n"
-    "  result.$name$_.AddCollection(other.$name$_);\r\n"
+    "  base.AddRange(other.$name$_, result.$name$_);\r\n"
     "}\r\n");
     "}\r\n");
 }
 }
 
 
 void RepeatedMessageFieldGenerator::
 void RepeatedMessageFieldGenerator::
 GenerateBuildingCode(io::Printer* printer) const {
 GenerateBuildingCode(io::Printer* printer) const {
   printer->Print(variables_,
   printer->Print(variables_,
-    "if (result.$name$_ != $type$.Empty$capitalized_name$) {\r\n"
-    "  result.$name$_ =\r\n"
-    "    result.$name$_.AsReadOnly ();\r\n"
+    "if (result.$name$_ != pbc::Lists<$type$>.Empty) {\r\n"
+    "  result.$name$_ = pbc::Lists<$type$>.AsReadOnly(result.$name$_);\r\n"
     "}\r\n");
     "}\r\n");
 }
 }
 
 
 void RepeatedMessageFieldGenerator::
 void RepeatedMessageFieldGenerator::
 GenerateParsingCode(io::Printer* printer) const {
 GenerateParsingCode(io::Printer* printer) const {
   printer->Print(variables_,
   printer->Print(variables_,
-    "$type$.Builder subBuilder = $type$.newBuilder();\r\n");
+    "$type$.Builder subBuilder = $type$.CreateBuilder();\r\n");
 
 
   if (descriptor_->type() == FieldDescriptor::TYPE_GROUP) {
   if (descriptor_->type() == FieldDescriptor::TYPE_GROUP) {
     printer->Print(variables_,
     printer->Print(variables_,
-      "input.readGroup($number$, subBuilder, extensionRegistry);\r\n");
+      "input.ReadGroup($number$, subBuilder, extensionRegistry);\r\n");
   } else {
   } else {
     printer->Print(variables_,
     printer->Print(variables_,
-      "input.readMessage(subBuilder, extensionRegistry);\r\n");
+      "input.ReadMessage(subBuilder, extensionRegistry);\r\n");
   }
   }
 
 
   printer->Print(variables_,
   printer->Print(variables_,
-    "Add$capitalized_name$(subBuilder.buildPartial());\r\n");
+    "Add$capitalized_name$(subBuilder.BuildPartial());\r\n");
 }
 }
 
 
 void RepeatedMessageFieldGenerator::
 void RepeatedMessageFieldGenerator::
 GenerateSerializationCode(io::Printer* printer) const {
 GenerateSerializationCode(io::Printer* printer) const {
   printer->Print(variables_,
   printer->Print(variables_,
-    "foreach ($type$ element in Get$capitalized_name$List()) {\r\n"
-    "  output.write$group_or_message$($number$, element);\r\n"
+    "foreach ($type$ element in $capitalized_name$List) {\r\n"
+    "  output.Write$group_or_message$($number$, element);\r\n"
     "}\r\n");
     "}\r\n");
 }
 }
 
 
 void RepeatedMessageFieldGenerator::
 void RepeatedMessageFieldGenerator::
 GenerateSerializedSizeCode(io::Printer* printer) const {
 GenerateSerializedSizeCode(io::Printer* printer) const {
   printer->Print(variables_,
   printer->Print(variables_,
-    "foreach ($type$ element in Get$capitalized_name$List()) {\r\n"
-    "  size += pb::CodedOutputStream\r\n"
-    "    .compute$group_or_message$Size($number$, element);\r\n"
+    "foreach ($type$ element in $capitalized_name$List) {\r\n"
+    "  size += pb::CodedOutputStream.Compute$group_or_message$Size($number$, element);\r\n"
     "}\r\n");
     "}\r\n");
 }
 }
 
 
-string RepeatedMessageFieldGenerator::GetBoxedType() const {
-  return ClassName(descriptor_->message_type());
-}
-
 }  // namespace csharp
 }  // namespace csharp
 }  // namespace compiler
 }  // namespace compiler
 }  // namespace protobuf
 }  // namespace protobuf

+ 0 - 2
src/google/protobuf/compiler/csharp/csharp_message_field.h

@@ -45,8 +45,6 @@ class MessageFieldGenerator : public FieldGenerator {
   void GenerateSerializationCode(io::Printer* printer) const;
   void GenerateSerializationCode(io::Printer* printer) const;
   void GenerateSerializedSizeCode(io::Printer* printer) const;
   void GenerateSerializedSizeCode(io::Printer* printer) const;
 
 
-  string GetBoxedType() const;
-
  private:
  private:
   const FieldDescriptor* descriptor_;
   const FieldDescriptor* descriptor_;
   map<string, string> variables_;
   map<string, string> variables_;

+ 55 - 87
src/google/protobuf/compiler/csharp/csharp_primitive_field.cc

@@ -36,26 +36,6 @@ namespace csharp {
 
 
 namespace {
 namespace {
 
 
-const char* PrimitiveTypeName(JavaType type) {
-  switch (type) {
-    case JAVATYPE_INT    : return "int";
-    case JAVATYPE_LONG   : return "long";
-    case JAVATYPE_FLOAT  : return "float";
-    case JAVATYPE_DOUBLE : return "double";
-    case JAVATYPE_BOOLEAN: return "boolean";
-    case JAVATYPE_STRING : return "string";
-    case JAVATYPE_BYTES  : return "pb::ByteString";
-    case JAVATYPE_ENUM   : return NULL;
-    case JAVATYPE_MESSAGE: return NULL;
-
-    // No default because we want the compiler to complain if any new
-    // JavaTypes are added.
-  }
-
-  GOOGLE_LOG(FATAL) << "Can't get here.";
-  return NULL;
-}
-
 const char* GetCapitalizedType(const FieldDescriptor* field) {
 const char* GetCapitalizedType(const FieldDescriptor* field) {
   switch (field->type()) {
   switch (field->type()) {
     case FieldDescriptor::TYPE_INT32   : return "Int32"   ;
     case FieldDescriptor::TYPE_INT32   : return "Int32"   ;
@@ -107,7 +87,7 @@ string DefaultValue(const FieldDescriptor* field) {
       return SimpleItoa(field->default_value_int64()) + "L";
       return SimpleItoa(field->default_value_int64()) + "L";
     case FieldDescriptor::CPPTYPE_UINT64:
     case FieldDescriptor::CPPTYPE_UINT64:
       return SimpleItoa(field->default_value_uint64()) +
       return SimpleItoa(field->default_value_uint64()) +
-             "L";
+             "UL";
     case FieldDescriptor::CPPTYPE_DOUBLE:
     case FieldDescriptor::CPPTYPE_DOUBLE:
       return SimpleDtoa(field->default_value_double()) + "D";
       return SimpleDtoa(field->default_value_double()) + "D";
     case FieldDescriptor::CPPTYPE_FLOAT:
     case FieldDescriptor::CPPTYPE_FLOAT:
@@ -133,8 +113,9 @@ string DefaultValue(const FieldDescriptor* field) {
       // Escaping strings correctly for Java and generating efficient
       // Escaping strings correctly for Java and generating efficient
       // initializers for ByteStrings are both tricky.  We can sidestep the
       // initializers for ByteStrings are both tricky.  We can sidestep the
       // whole problem by just grabbing the default value from the descriptor.
       // whole problem by just grabbing the default value from the descriptor.
+      // TODO(jonskeet): FIXME!
       return strings::Substitute(
       return strings::Substitute(
-        "(($0) $1.getDescriptor().getFields().get($2).getDefaultValue())",
+        "(($0) $1.Descriptor.Fields[$2].DefaultValue)",
         isBytes ? "pb::ByteString" : "string",
         isBytes ? "pb::ByteString" : "string",
         ClassName(field->containing_type()), field->index());
         ClassName(field->containing_type()), field->index());
     }
     }
@@ -159,8 +140,7 @@ void SetPrimitiveVariables(const FieldDescriptor* descriptor,
   (*variables)["capitalized_name"] =
   (*variables)["capitalized_name"] =
     UnderscoresToCapitalizedCamelCase(descriptor);
     UnderscoresToCapitalizedCamelCase(descriptor);
   (*variables)["number"] = SimpleItoa(descriptor->number());
   (*variables)["number"] = SimpleItoa(descriptor->number());
-  (*variables)["type"] = PrimitiveTypeName(GetJavaType(descriptor));
-  (*variables)["boxed_type"] = BoxedPrimitiveTypeName(GetJavaType(descriptor));
+  (*variables)["type"] = MappedTypeName(GetMappedType(descriptor));
   (*variables)["default"] = DefaultValue(descriptor);
   (*variables)["default"] = DefaultValue(descriptor);
   (*variables)["capitalized_type"] = GetCapitalizedType(descriptor);
   (*variables)["capitalized_type"] = GetCapitalizedType(descriptor);
 }
 }
@@ -182,7 +162,7 @@ GenerateMembers(io::Printer* printer) const {
   printer->Print(variables_,
   printer->Print(variables_,
     "private bool has$capitalized_name$;\r\n"
     "private bool has$capitalized_name$;\r\n"
     "private $type$ $name$_ = $default$;\r\n"
     "private $type$ $name$_ = $default$;\r\n"
-    "public boolean Has$capitalized_name$ {\r\n"
+    "public bool Has$capitalized_name$ {\r\n"
     "  get { return has$capitalized_name$; }\r\n"
     "  get { return has$capitalized_name$; }\r\n"
     "}\r\n"
     "}\r\n"
     "public $type$ $capitalized_name$ {\r\n"
     "public $type$ $capitalized_name$ {\r\n"
@@ -193,18 +173,17 @@ GenerateMembers(io::Printer* printer) const {
 void PrimitiveFieldGenerator::
 void PrimitiveFieldGenerator::
 GenerateBuilderMembers(io::Printer* printer) const {
 GenerateBuilderMembers(io::Printer* printer) const {
   printer->Print(variables_,
   printer->Print(variables_,
-    "public boolean Has$capitalized_name$ {\r\n"
+    "public bool Has$capitalized_name$ {\r\n"
     "  get { return result.Has$capitalized_name$; }\r\n"
     "  get { return result.Has$capitalized_name$; }\r\n"
     "}\r\n"
     "}\r\n"
-    // TODO(jonskeet): Consider whether this is really the right pattern,
-    // or whether we want a method returning a Builder. This allows for
-    // object initializers.
     "public $type$ $capitalized_name$ {\r\n"
     "public $type$ $capitalized_name$ {\r\n"
     "  get { return result.$capitalized_name$; }\r\n"
     "  get { return result.$capitalized_name$; }\r\n"
-    "  set {\r\n"
-    "    result.has$capitalized_name$ = true;\r\n"
-    "    result.$name$_ = value;\r\n"
-    "  }\r\n"
+    "  set { Set$capitalized_name$(value); }\r\n"
+    "}\r\n"
+    "public Builder Set$capitalized_name$($type$ value) {\r\n"
+    "  result.has$capitalized_name$ = true;\r\n"
+    "  result.$name$_ = value;\r\n"
+    "  return this;\r\n"
     "}\r\n"
     "}\r\n"
     "public Builder Clear$capitalized_name$() {\r\n"
     "public Builder Clear$capitalized_name$() {\r\n"
     "  result.has$capitalized_name$ = false;\r\n"
     "  result.has$capitalized_name$ = false;\r\n"
@@ -216,8 +195,8 @@ GenerateBuilderMembers(io::Printer* printer) const {
 void PrimitiveFieldGenerator::
 void PrimitiveFieldGenerator::
 GenerateMergingCode(io::Printer* printer) const {
 GenerateMergingCode(io::Printer* printer) const {
   printer->Print(variables_,
   printer->Print(variables_,
-    "if (other.has$capitalized_name$()) {\r\n"
-    "  set$capitalized_name$(other.get$capitalized_name$());\r\n"
+    "if (other.Has$capitalized_name$) {\r\n"
+    "  $capitalized_name$ = other.$capitalized_name$;\r\n"
     "}\r\n");
     "}\r\n");
 }
 }
 
 
@@ -229,30 +208,25 @@ GenerateBuildingCode(io::Printer* printer) const {
 void PrimitiveFieldGenerator::
 void PrimitiveFieldGenerator::
 GenerateParsingCode(io::Printer* printer) const {
 GenerateParsingCode(io::Printer* printer) const {
   printer->Print(variables_,
   printer->Print(variables_,
-    "set$capitalized_name$(input.read$capitalized_type$());\r\n");
+    "$capitalized_name$ = input.Read$capitalized_type$();\r\n");
 }
 }
 
 
 void PrimitiveFieldGenerator::
 void PrimitiveFieldGenerator::
 GenerateSerializationCode(io::Printer* printer) const {
 GenerateSerializationCode(io::Printer* printer) const {
   printer->Print(variables_,
   printer->Print(variables_,
-    "if (has$capitalized_name$()) {\r\n"
-    "  output.write$capitalized_type$($number$, get$capitalized_name$());\r\n"
+    "if (Has$capitalized_name$) {\r\n"
+    "  output.Write$capitalized_type$($number$, $capitalized_name$);\r\n"
     "}\r\n");
     "}\r\n");
 }
 }
 
 
 void PrimitiveFieldGenerator::
 void PrimitiveFieldGenerator::
 GenerateSerializedSizeCode(io::Printer* printer) const {
 GenerateSerializedSizeCode(io::Printer* printer) const {
   printer->Print(variables_,
   printer->Print(variables_,
-    "if (has$capitalized_name$()) {\r\n"
-    "  size += pb::CodedOutputStream\r\n"
-    "    .compute$capitalized_type$Size($number$, get$capitalized_name$());\r\n"
+    "if (Has$capitalized_name$) {\r\n"
+    "  size += pb::CodedOutputStream.Compute$capitalized_type$Size($number$, $capitalized_name$);\r\n"
     "}\r\n");
     "}\r\n");
 }
 }
 
 
-string PrimitiveFieldGenerator::GetBoxedType() const {
-  return BoxedPrimitiveTypeName(GetJavaType(descriptor_));
-}
-
 // ===================================================================
 // ===================================================================
 
 
 RepeatedPrimitiveFieldGenerator::
 RepeatedPrimitiveFieldGenerator::
@@ -266,14 +240,15 @@ RepeatedPrimitiveFieldGenerator::~RepeatedPrimitiveFieldGenerator() {}
 void RepeatedPrimitiveFieldGenerator::
 void RepeatedPrimitiveFieldGenerator::
 GenerateMembers(io::Printer* printer) const {
 GenerateMembers(io::Printer* printer) const {
   printer->Print(variables_,
   printer->Print(variables_,
-    "private java.util.List<$boxed_type$> $name$_ =\r\n"
-    "  java.util.Collections.emptyList();\r\n"
-    "public java.util.List<$boxed_type$> get$capitalized_name$List() {\r\n"
-    "  return $name$_;\r\n"   // note:  unmodifiable list
+    "private scg::IList<$type$> $name$_ = pbc::Lists<$type$>.Empty;\r\n"
+    "public scg::IList<$type$> $capitalized_name$List {\r\n"
+    "  get { return $name$_; }\r\n"   // note:  unmodifiable list
     "}\r\n"
     "}\r\n"
-    "public int get$capitalized_name$Count() { return $name$_.size(); }\r\n"
-    "public $type$ get$capitalized_name$(int index) {\r\n"
-    "  return $name$_.get(index);\r\n"
+    "public int $capitalized_name$Count {\r\n" // TODO(jonskeet): Remove?
+    "  get { return $name$_.Count; }\r\n"
+    "}\r\n"
+    "public $type$ Get$capitalized_name$(int index) {\r\n" // TODO(jonskeet): Remove?
+    "  return $name$_[index];\r\n"
     "}\r\n");
     "}\r\n");
 }
 }
 
 
@@ -284,36 +259,35 @@ GenerateBuilderMembers(io::Printer* printer) const {
     //   could hold on to the returned list and modify it after the message
     //   could hold on to the returned list and modify it after the message
     //   has been built, thus mutating the message which is supposed to be
     //   has been built, thus mutating the message which is supposed to be
     //   immutable.
     //   immutable.
-    "public java.util.List<$boxed_type$> get$capitalized_name$List() {\r\n"
-    "  return java.util.Collections.unmodifiableList(result.$name$_);\r\n"
+    "public scg::IList<$type$> $capitalized_name$List {\r\n"
+    "  get { return pbc::Lists<$type$>.AsReadOnly(result.$name$_); }\r\n"
     "}\r\n"
     "}\r\n"
-    "public int get$capitalized_name$Count() {\r\n"
-    "  return result.get$capitalized_name$Count();\r\n"
+    "public int $capitalized_name$Count {\r\n"
+    "  get { return result.$capitalized_name$Count; }\r\n"
     "}\r\n"
     "}\r\n"
-    "public $type$ get$capitalized_name$(int index) {\r\n"
-    "  return result.get$capitalized_name$(index);\r\n"
+    "public $type$ Get$capitalized_name$(int index) {\r\n"
+    "  return result.Get$capitalized_name$(index);\r\n"
     "}\r\n"
     "}\r\n"
-    "public Builder set$capitalized_name$(int index, $type$ value) {\r\n"
-    "  result.$name$_.set(index, value);\r\n"
+    "public Builder Set$capitalized_name$(int index, $type$ value) {\r\n"
+    "  result.$name$_[index] = value;\r\n"
     "  return this;\r\n"
     "  return this;\r\n"
     "}\r\n"
     "}\r\n"
-    "public Builder add$capitalized_name$($type$ value) {\r\n"
-    "  if (result.$name$_.isEmpty()) {\r\n"
-    "    result.$name$_ = new java.util.ArrayList<$boxed_type$>();\r\n"
+    "public Builder Add$capitalized_name$($type$ value) {\r\n"
+    "  if (result.$name$_.Count == 0) {\r\n"
+    "    result.$name$_ = new scg::List<$type$>();\r\n"
     "  }\r\n"
     "  }\r\n"
-    "  result.$name$_.add(value);\r\n"
+    "  result.$name$_.Add(value);\r\n"
     "  return this;\r\n"
     "  return this;\r\n"
     "}\r\n"
     "}\r\n"
-    "public Builder addAll$capitalized_name$(\r\n"
-    "    java.lang.Iterable<? extends $boxed_type$> values) {\r\n"
-    "  if (result.$name$_.isEmpty()) {\r\n"
-    "    result.$name$_ = new java.util.ArrayList<$boxed_type$>();\r\n"
+    "public Builder AddRange$capitalized_name$(scg::IEnumerable<$type$> values) {\r\n"
+    "  if (result.$name$_.Count == 0) {\r\n"
+    "    result.$name$_ = new scg::List<$type$>();\r\n"
     "  }\r\n"
     "  }\r\n"
-    "  super.addAll(values, result.$name$_);\r\n"
+    "  base.AddRange(values, result.$name$_);\r\n"
     "  return this;\r\n"
     "  return this;\r\n"
     "}\r\n"
     "}\r\n"
-    "public Builder clear$capitalized_name$() {\r\n"
-    "  result.$name$_ = java.util.Collections.emptyList();\r\n"
+    "public Builder Clear$capitalized_name$() {\r\n"
+    "  result.$name$_ = pbc::Lists<$type$>.Empty;\r\n"
     "  return this;\r\n"
     "  return this;\r\n"
     "}\r\n");
     "}\r\n");
 }
 }
@@ -321,49 +295,43 @@ GenerateBuilderMembers(io::Printer* printer) const {
 void RepeatedPrimitiveFieldGenerator::
 void RepeatedPrimitiveFieldGenerator::
 GenerateMergingCode(io::Printer* printer) const {
 GenerateMergingCode(io::Printer* printer) const {
   printer->Print(variables_,
   printer->Print(variables_,
-    "if (!other.$name$_.isEmpty()) {\r\n"
-    "  if (result.$name$_.isEmpty()) {\r\n"
-    "    result.$name$_ = new java.util.ArrayList<$boxed_type$>();\r\n"
+    "if (other.$name$_.Count != 0) {\r\n"
+    "  if (result.$name$_.Count == 0) {\r\n"
+    "    result.$name$_ = new scg::List<$type$>();\r\n"
     "  }\r\n"
     "  }\r\n"
-    "  result.$name$_.addAll(other.$name$_);\r\n"
+    "  base.AddRange(other.$name$_, result.$name$_);\r\n"
     "}\r\n");
     "}\r\n");
 }
 }
 
 
 void RepeatedPrimitiveFieldGenerator::
 void RepeatedPrimitiveFieldGenerator::
 GenerateBuildingCode(io::Printer* printer) const {
 GenerateBuildingCode(io::Printer* printer) const {
   printer->Print(variables_,
   printer->Print(variables_,
-    "if (result.$name$_ != java.util.Collections.EMPTY_LIST) {\r\n"
-    "  result.$name$_ =\r\n"
-    "    java.util.Collections.unmodifiableList(result.$name$_);\r\n"
-    "}\r\n");
+    "result.$name$_ = pbc::Lists<$type$>.AsReadOnly(result.$name$_);\r\n");
 }
 }
 
 
 void RepeatedPrimitiveFieldGenerator::
 void RepeatedPrimitiveFieldGenerator::
 GenerateParsingCode(io::Printer* printer) const {
 GenerateParsingCode(io::Printer* printer) const {
   printer->Print(variables_,
   printer->Print(variables_,
-    "add$capitalized_name$(input.read$capitalized_type$());\r\n");
+    "Add$capitalized_name$(input.Read$capitalized_type$());\r\n");
 }
 }
 
 
 void RepeatedPrimitiveFieldGenerator::
 void RepeatedPrimitiveFieldGenerator::
 GenerateSerializationCode(io::Printer* printer) const {
 GenerateSerializationCode(io::Printer* printer) const {
   printer->Print(variables_,
   printer->Print(variables_,
-    "for ($type$ element : get$capitalized_name$List()) {\r\n"
-    "  output.write$capitalized_type$($number$, element);\r\n"
+    "foreach ($type$ element in $capitalized_name$List) {\r\n"
+    "  output.Write$capitalized_type$($number$, element);\r\n"
     "}\r\n");
     "}\r\n");
 }
 }
 
 
 void RepeatedPrimitiveFieldGenerator::
 void RepeatedPrimitiveFieldGenerator::
 GenerateSerializedSizeCode(io::Printer* printer) const {
 GenerateSerializedSizeCode(io::Printer* printer) const {
   printer->Print(variables_,
   printer->Print(variables_,
-    "for ($type$ element : get$capitalized_name$List()) {\r\n"
+    "foreach ($type$ element in $capitalized_name$List) {\r\n"
     "  size += pb::CodedOutputStream\r\n"
     "  size += pb::CodedOutputStream\r\n"
-    "    .compute$capitalized_type$Size($number$, element);\r\n"
+    "    .Compute$capitalized_type$Size($number$, element);\r\n"
     "}\r\n");
     "}\r\n");
 }
 }
 
 
-string RepeatedPrimitiveFieldGenerator::GetBoxedType() const {
-  return BoxedPrimitiveTypeName(GetJavaType(descriptor_));
-}
 
 
 }  // namespace csharp
 }  // namespace csharp
 }  // namespace compiler
 }  // namespace compiler

+ 0 - 4
src/google/protobuf/compiler/csharp/csharp_primitive_field.h

@@ -45,8 +45,6 @@ class PrimitiveFieldGenerator : public FieldGenerator {
   void GenerateSerializationCode(io::Printer* printer) const;
   void GenerateSerializationCode(io::Printer* printer) const;
   void GenerateSerializedSizeCode(io::Printer* printer) const;
   void GenerateSerializedSizeCode(io::Printer* printer) const;
 
 
-  string GetBoxedType() const;
-
  private:
  private:
   const FieldDescriptor* descriptor_;
   const FieldDescriptor* descriptor_;
   map<string, string> variables_;
   map<string, string> variables_;
@@ -68,8 +66,6 @@ class RepeatedPrimitiveFieldGenerator : public FieldGenerator {
   void GenerateSerializationCode(io::Printer* printer) const;
   void GenerateSerializationCode(io::Printer* printer) const;
   void GenerateSerializedSizeCode(io::Printer* printer) const;
   void GenerateSerializedSizeCode(io::Printer* printer) const;
 
 
-  string GetBoxedType() const;
-
  private:
  private:
   const FieldDescriptor* descriptor_;
   const FieldDescriptor* descriptor_;
   map<string, string> variables_;
   map<string, string> variables_;

+ 18 - 18
src/google/protobuf/compiler/csharp/csharp_service.cc

@@ -62,12 +62,12 @@ void ServiceGenerator::Generate(io::Printer* printer) {
   printer->Print(
   printer->Print(
     "\r\n"
     "\r\n"
     "public static final\r\n"
     "public static final\r\n"
-    "    pb::Descriptors.ServiceDescriptor\r\n"
+    "    pbd::ServiceDescriptor\r\n"
     "    getDescriptor() {\r\n"
     "    getDescriptor() {\r\n"
     "  return $file$.getDescriptor().getServices().get($index$);\r\n"
     "  return $file$.getDescriptor().getServices().get($index$);\r\n"
     "}\r\n"
     "}\r\n"
-    "public final pb::Descriptors.ServiceDescriptor\r\n"
-    "    getDescriptorForType() {\r\n"
+    "public final pbd::ServiceDescriptor\r\n"
+    "    DescriptorForType {\r\n"
     "  return getDescriptor();\r\n"
     "  return getDescriptor();\r\n"
     "}\r\n",
     "}\r\n",
     "file", ClassName(descriptor_->file()),
     "file", ClassName(descriptor_->file()),
@@ -87,14 +87,14 @@ void ServiceGenerator::GenerateCallMethod(io::Printer* printer) {
   printer->Print(
   printer->Print(
     "\r\n"
     "\r\n"
     "public final void callMethod(\r\n"
     "public final void callMethod(\r\n"
-    "    pb::Descriptors.MethodDescriptor method,\r\n"
+    "    pbd::MethodDescriptor method,\r\n"
     "    pb::RpcController controller,\r\n"
     "    pb::RpcController controller,\r\n"
-    "    pb::Message request,\r\n"
+    "    pb::IMessage request,\r\n"
     "    pb::RpcCallback<\r\n"
     "    pb::RpcCallback<\r\n"
     "      pb::Message> done) {\r\n"
     "      pb::Message> done) {\r\n"
     "  if (method.getService() != getDescriptor()) {\r\n"
     "  if (method.getService() != getDescriptor()) {\r\n"
-    "    throw new java.lang.IllegalArgumentException(\r\n"
-    "      \"Service.callMethod() given method descriptor for wrong \" +\r\n"
+    "    throw new global::System.ArgumentException(\r\n"
+    "      \"Service.CallMethod() given method descriptor for wrong \" +\r\n"
     "      \"service type.\");\r\n"
     "      \"service type.\");\r\n"
     "  }\r\n"
     "  }\r\n"
     "  switch(method.getIndex()) {\r\n");
     "  switch(method.getIndex()) {\r\n");
@@ -118,7 +118,7 @@ void ServiceGenerator::GenerateCallMethod(io::Printer* printer) {
 
 
   printer->Print(
   printer->Print(
     "default:\r\n"
     "default:\r\n"
-    "  throw new java.lang.RuntimeException(\"Can't get here.\");\r\n");
+    "  throw new global::System.InvalidOperationException(\"Can't get here.\");\r\n");
 
 
   printer->Outdent();
   printer->Outdent();
   printer->Outdent();
   printer->Outdent();
@@ -133,14 +133,14 @@ void ServiceGenerator::GenerateGetPrototype(RequestOrResponse which,
                                             io::Printer* printer) {
                                             io::Printer* printer) {
   printer->Print(
   printer->Print(
     "public final pb::Message\r\n"
     "public final pb::Message\r\n"
-    "    get$request_or_response$Prototype(\r\n"
-    "    pb::Descriptors.MethodDescriptor method) {\r\n"
+    "    Get$request_or_response$Prototype(\r\n"
+    "    pbd::MethodDescriptor method) {\r\n"
     "  if (method.getService() != getDescriptor()) {\r\n"
     "  if (method.getService() != getDescriptor()) {\r\n"
-    "    throw new java.lang.IllegalArgumentException(\r\n"
-    "      \"Service.get$request_or_response$Prototype() given method \" +\r\n"
+    "    throw new global::System.ArgumentException(\r\n"
+    "      \"Service.Get$request_or_response$Prototype() given method \" +\r\n"
     "      \"descriptor for wrong service type.\");\r\n"
     "      \"descriptor for wrong service type.\");\r\n"
     "  }\r\n"
     "  }\r\n"
-    "  switch(method.getIndex()) {\r\n",
+    "  switch(method.Index) {\r\n",
     "request_or_response", (which == REQUEST) ? "Request" : "Response");
     "request_or_response", (which == REQUEST) ? "Request" : "Response");
   printer->Indent();
   printer->Indent();
   printer->Indent();
   printer->Indent();
@@ -153,12 +153,12 @@ void ServiceGenerator::GenerateGetPrototype(RequestOrResponse which,
       (which == REQUEST) ? method->input_type() : method->output_type());
       (which == REQUEST) ? method->input_type() : method->output_type());
     printer->Print(vars,
     printer->Print(vars,
       "case $index$:\r\n"
       "case $index$:\r\n"
-      "  return $type$.getDefaultInstance();\r\n");
+      "  return $type$.DefaultInstance;\r\n");
   }
   }
 
 
   printer->Print(
   printer->Print(
     "default:\r\n"
     "default:\r\n"
-    "  throw new java.lang.RuntimeException(\"Can't get here.\");\r\n");
+    "  throw new global::System.ArgumentException(\"Can't get here.\");\r\n");
 
 
   printer->Outdent();
   printer->Outdent();
   printer->Outdent();
   printer->Outdent();
@@ -205,14 +205,14 @@ void ServiceGenerator::GenerateStub(io::Printer* printer) {
       "    $input$ request,\r\n"
       "    $input$ request,\r\n"
       "    pb::RpcCallback<$output$> done) {\r\n"
       "    pb::RpcCallback<$output$> done) {\r\n"
       "  channel.callMethod(\r\n"
       "  channel.callMethod(\r\n"
-      "    getDescriptor().getMethods().get($index$),\r\n"
+      "    Descriptor.Methods[$index$],\r\n"
       "    controller,\r\n"
       "    controller,\r\n"
       "    request,\r\n"
       "    request,\r\n"
-      "    $output$.getDefaultInstance(),\r\n"
+      "    $output$.DefaultInstance,\r\n"
       "    pb::RpcUtil.generalizeCallback(\r\n"
       "    pb::RpcUtil.generalizeCallback(\r\n"
       "      done,\r\n"
       "      done,\r\n"
       "      typeof ($output$),\r\n"
       "      typeof ($output$),\r\n"
-      "      $output$.getDefaultInstance()));\r\n"
+      "      $output$.DefaultInstance));\r\n"
       "}\r\n");
       "}\r\n");
   }
   }
 
 

+ 33 - 5
src/google/protobuf/descriptor.proto

@@ -28,8 +28,11 @@ package google.protobuf;
 option java_package = "com.google.protobuf";
 option java_package = "com.google.protobuf";
 option java_outer_classname = "DescriptorProtos";
 option java_outer_classname = "DescriptorProtos";
 
 
-option csharp_namespace = "Google.ProtocolBuffers";
-option csharp_outer_classname = "DescriptorProtos";
+option csharp_namespace = "Google.ProtocolBuffers.DescriptorProtos";
+option csharp_file_classname = "DescriptorProtoFile";
+option csharp_multiple_files = false;
+option csharp_nest_classes = false;
+option csharp_public_classes = true;
 
 
 // descriptor.proto must be optimized for speed because reflection-based
 // descriptor.proto must be optimized for speed because reflection-based
 // algorithms don't work during bootstrapping.
 // algorithms don't work during bootstrapping.
@@ -223,10 +226,35 @@ message FileOptions {
   optional OptimizeMode optimize_for = 9 [default=CODE_SIZE];
   optional OptimizeMode optimize_for = 9 [default=CODE_SIZE];
   
   
   
   
-  // C# stuff... remove eventually?
+  // C# stuff... generalise to .NET?
+  // Sets the namespace where classes generated from this .proto will be
+  // placed. By default, the proto package is used. Unlike the Java
+  // generator, the C# generator does *not* create a directory structure
+  // based on the namespace.
   optional string csharp_namespace = 1000;
   optional string csharp_namespace = 1000;
-  optional string csharp_outer_classname = 1001;
-  optional bool csharp_multiple_files = 1002;
+  
+  // One class is generated to represent the .proto file as a whole.
+  // It contains the file's descriptor as well as any top-level
+  // extensions.
+  optional string csharp_file_classname = 1001;
+  
+  // If set true, the C# generator will generate a separate .cs file
+  // for each top-level message, enum and service defined in the .proto
+  // file. Otherwise, a single .cs file will be generated.
+  optional bool csharp_multiple_files = 1002 [default=false];
+  
+  // If set true, the C# generator will use the "whole .proto file" class
+  // as a container for all the other classes. This value is independent
+  // of csharp_multiple_files - using partial types, the C# generator
+  // can still nest classes even when generating multiple files,
+  // and C# allows multiple public top-level classes in the same
+  // file.
+  optional bool csharp_nest_classes = 1003 [default=false];
+  
+  // If set true, the C# generator will make all its generated classes
+  // public. If set false, classes will be internal (i.e. only
+  // visible within the same assembly).
+  optional bool csharp_public_classes = 1004 [default=true];
 }
 }
 
 
 message MessageOptions {
 message MessageOptions {