csharptest 14 лет назад
Родитель
Сommit
adfdc00891
30 измененных файлов с 7989 добавлено и 2327 удалено
  1. 8 0
      build/build.csproj
  2. BIN
      lib/protoc.exe
  3. 37 0
      protos/extest/unittest_extras.proto
  4. 46 0
      protos/extest/unittest_extras_lite.proto
  5. 35 0
      protos/extest/unittest_rpc_interop_lite.proto
  6. 107 7
      protos/google/protobuf/descriptor.proto
  7. 18 21
      protos/google/protobuf/unittest.proto
  8. 91 0
      protos/google/protobuf/unittest_custom_options.proto
  9. 0 38
      protos/google/protobuf/unittest_lite.proto
  10. 1 3
      protos/google/protobuf/unittest_no_generic_services.proto
  11. 1 0
      src/ProtocolBuffers.Test/AbstractMessageTest.cs
  12. 1 0
      src/ProtocolBuffers.Test/ProtocolBuffers.Test.csproj
  13. 0 5
      src/ProtocolBuffers.Test/ProtocolBuffers.Test.csproj.user
  14. 1476 59
      src/ProtocolBuffers.Test/TestProtos/UnitTestCustomOptionsProtoFile.cs
  15. 403 0
      src/ProtocolBuffers.Test/TestProtos/UnitTestExtrasProtoFile.cs
  16. 4 4
      src/ProtocolBuffers.Test/TestProtos/UnitTestNoGenericServicesProtoFile.cs
  17. 568 325
      src/ProtocolBuffers.Test/TestProtos/UnitTestProtoFile.cs
  18. 43 43
      src/ProtocolBuffers.Test/TestUtil.cs
  19. 7 3
      src/ProtocolBuffers.sln
  20. 944 99
      src/ProtocolBuffers/DescriptorProtos/DescriptorProtoFile.cs
  21. 5 2
      src/ProtocolBuffers2008.sln
  22. 1 0
      src/ProtocolBuffersLite.Test/ExtendableMessageLiteTest.cs
  23. 7 0
      src/ProtocolBuffersLite.Test/ProtocolBuffersLite.Test.csproj
  24. 1599 0
      src/ProtocolBuffersLite.Test/TestProtos/UnitTestExtrasLiteProtoFile.cs
  25. 33 1393
      src/ProtocolBuffersLite.Test/TestProtos/UnitTestLiteProtoFile.cs
  26. 568 325
      src/ProtocolBuffersLite.Test/TestProtos/UnitTestProtoFile.cs
  27. 1405 0
      src/ProtocolBuffersLite.Test/TestProtos/UnitTestRpcInteropLite.cs
  28. 386 0
      src/ProtocolBuffersLite.Test/TestRpcForMimeTypes.cs
  29. 171 0
      src/ProtocolBuffersLite.Test/TestRpcGenerator.cs
  30. 24 0
      src/copysolution.bat

+ 8 - 0
build/build.csproj

@@ -37,11 +37,13 @@
     <WorkingDirectories Include="$(BuildOutputDirectory)" />
 
     <Protos Include="$(ProtosDirectory)\extest\unittest_issues.proto" />
+    <Protos Include="$(ProtosDirectory)\extest\unittest_extras.proto" />
     <Protos Include="$(ProtosDirectory)\extest\unittest_extras_full.proto" />
     <Protos Include="$(ProtosDirectory)\extest\unittest_extras_lite.proto" />
     <Protos Include="$(ProtosDirectory)\extest\unittest_extras_xmltest.proto" />
     <Protos Include="$(ProtosDirectory)\extest\unittest_generic_services.proto" />
     <Protos Include="$(ProtosDirectory)\extest\unittest_rpc_interop.proto" />
+    <Protos Include="$(ProtosDirectory)\extest\unittest_rpc_interop_lite.proto" />
     <Protos Include="$(ProtosDirectory)\google\protobuf\descriptor.proto" />
     <Protos Include="$(ProtosDirectory)\google\protobuf\csharp_options.proto" />
     <Protos Include="$(ProtosDirectory)\google\protobuf\unittest.proto" />
@@ -72,6 +74,9 @@
       <TargetDirectory>$(SourceDirectory)\AddressBook</TargetDirectory>
     </GeneratedSource>
     <!-- Unit test -->
+    <GeneratedSource Include="$(BuildTempDirectory)\UnitTestExtrasProtoFile.cs">
+      <TargetDirectory>$(SourceDirectory)\ProtocolBuffers.Test\TestProtos</TargetDirectory>
+    </GeneratedSource>
     <GeneratedSource Include="$(BuildTempDirectory)\UnitTestExtrasIssuesProtoFile.cs">
       <TargetDirectory>$(SourceDirectory)\ProtocolBuffers.Test\TestProtos</TargetDirectory>
     </GeneratedSource>
@@ -111,6 +116,9 @@
     <GeneratedSource Include="$(BuildTempDirectory)\UnitTestRpcInterop.cs">
       <TargetDirectory>$(SourceDirectory)\ProtocolBuffers.Test\TestProtos</TargetDirectory>
     </GeneratedSource>
+    <GeneratedSource Include="$(BuildTempDirectory)\UnitTestRpcInteropLite.cs">
+      <TargetDirectory>$(SourceDirectory)\ProtocolBuffersLite.Test\TestProtos</TargetDirectory>
+    </GeneratedSource>
     <GeneratedSource Include="$(BuildTempDirectory)\UnitTestGenericServices.cs">
       <TargetDirectory>$(SourceDirectory)\ProtocolBuffers.Test\TestProtos</TargetDirectory>
     </GeneratedSource>

BIN
lib/protoc.exe


+ 37 - 0
protos/extest/unittest_extras.proto

@@ -0,0 +1,37 @@
+// Additional options required for C# generation. File from copyright
+// line onwards is as per original distribution.
+import "google/protobuf/csharp_options.proto";
+option (google.protobuf.csharp_file_options).namespace = "Google.ProtocolBuffers.TestProtos";
+option (google.protobuf.csharp_file_options).umbrella_classname = "UnitTestExtrasProtoFile";
+option (google.protobuf.csharp_file_options).add_serializable = true;
+
+package protobuf_unittest_extra;
+
+option java_package = "com.google.protobuf";
+
+message TestUnpackedExtensions {
+  extensions 1 to max;
+}
+
+extend TestUnpackedExtensions {
+  repeated    int32 unpacked_int32_extension    =  90;
+  repeated    int64 unpacked_int64_extension    =  91;
+  repeated   uint32 unpacked_uint32_extension   =  92;
+  repeated   uint64 unpacked_uint64_extension   =  93;
+  repeated   sint32 unpacked_sint32_extension   =  94;
+  repeated   sint64 unpacked_sint64_extension   =  95;
+  repeated  fixed32 unpacked_fixed32_extension  =  96;
+  repeated  fixed64 unpacked_fixed64_extension  =  97;
+  repeated sfixed32 unpacked_sfixed32_extension =  98;
+  repeated sfixed64 unpacked_sfixed64_extension =  99;
+  repeated    float unpacked_float_extension    = 100;
+  repeated   double unpacked_double_extension   = 101;
+  repeated     bool unpacked_bool_extension     = 102;
+  repeated UnpackedExtensionsForeignEnum unpacked_enum_extension  = 103;
+}
+
+enum UnpackedExtensionsForeignEnum {
+  FOREIGN_FOO = 4;
+  FOREIGN_BAR = 5;
+  FOREIGN_BAZ = 6;
+}

+ 46 - 0
protos/extest/unittest_extras_lite.proto

@@ -60,3 +60,49 @@ message  TestInteropEmployeeIdLite {
 extend TestInteropPersonLite {
   required TestInteropEmployeeIdLite employee_id_lite = 126;
 }
+
+/* Removed from unittest_lite.proto and added back here */
+
+message TestUnpackedExtensionsLite {
+  extensions 1 to max;
+}
+
+message TestUnpackedTypesLite {
+  repeated    int32 unpacked_int32    =  90;
+  repeated    int64 unpacked_int64    =  91;
+  repeated   uint32 unpacked_uint32   =  92;
+  repeated   uint64 unpacked_uint64   =  93;
+  repeated   sint32 unpacked_sint32   =  94;
+  repeated   sint64 unpacked_sint64   =  95;
+  repeated  fixed32 unpacked_fixed32  =  96;
+  repeated  fixed64 unpacked_fixed64  =  97;
+  repeated sfixed32 unpacked_sfixed32 =  98;
+  repeated sfixed64 unpacked_sfixed64 =  99;
+  repeated    float unpacked_float    = 100;
+  repeated   double unpacked_double   = 101;
+  repeated     bool unpacked_bool     = 102;
+  repeated UnpackedTypesForeignEnumLite unpacked_enum  = 103;
+}
+
+extend TestUnpackedExtensionsLite {
+  repeated    int32 unpacked_int32_extension_lite    =  90;
+  repeated    int64 unpacked_int64_extension_lite    =  91;
+  repeated   uint32 unpacked_uint32_extension_lite   =  92;
+  repeated   uint64 unpacked_uint64_extension_lite   =  93;
+  repeated   sint32 unpacked_sint32_extension_lite   =  94;
+  repeated   sint64 unpacked_sint64_extension_lite   =  95;
+  repeated  fixed32 unpacked_fixed32_extension_lite  =  96;
+  repeated  fixed64 unpacked_fixed64_extension_lite  =  97;
+  repeated sfixed32 unpacked_sfixed32_extension_lite =  98;
+  repeated sfixed64 unpacked_sfixed64_extension_lite =  99;
+  repeated    float unpacked_float_extension_lite    = 100;
+  repeated   double unpacked_double_extension_lite   = 101;
+  repeated     bool unpacked_bool_extension_lite     = 102;
+  repeated UnpackedTypesForeignEnumLite unpacked_enum_extension_lite = 103;
+}
+
+enum UnpackedTypesForeignEnumLite {
+  FOREIGN_LITE_FOO = 4;
+  FOREIGN_LITE_BAR = 5;
+  FOREIGN_LITE_BAZ = 6;
+}

+ 35 - 0
protos/extest/unittest_rpc_interop_lite.proto

@@ -0,0 +1,35 @@
+// Additional options required for C# generation. File from copyright
+// line onwards is as per original distribution.
+import "google/protobuf/csharp_options.proto";
+option (google.protobuf.csharp_file_options).namespace = "Google.ProtocolBuffers.TestProtos";
+option (google.protobuf.csharp_file_options).umbrella_classname = "UnitTestRpcInteropLite";
+
+option (google.protobuf.csharp_file_options).service_generator_type = IRPCDISPATCH;
+
+option optimize_for = LITE_RUNTIME;
+package unittest_rpc_interop_lite;
+
+message SearchRequest {
+  repeated string Criteria = 1;
+}
+
+message SearchResponse {
+  message ResultItem {
+    required string url = 1;
+    optional string name = 2;
+  }
+  
+  repeated ResultItem results = 1;
+}
+
+message RefineSearchRequest {
+  repeated string Criteria = 1;
+  required SearchResponse previous_results = 2;
+}
+
+service SearchService {
+  option (google.protobuf.csharp_service_options).interface_id = "{A65F0925-FD11-4f94-B166-89AC4F027205}";
+  rpc Search (SearchRequest) returns (SearchResponse) { option (google.protobuf.csharp_method_options).dispatch_id = 5; };
+  
+  rpc RefineSearch (RefineSearchRequest) returns (SearchResponse);
+}

+ 107 - 7
protos/google/protobuf/descriptor.proto

@@ -67,6 +67,12 @@ message FileDescriptorProto {
   repeated FieldDescriptorProto extension = 7;
 
   optional FileOptions options = 8;
+
+  // This field contains optional information about the original source code.
+  // You may safely remove this entire field whithout harming runtime
+  // functionality of the descriptors -- the information is needed only by
+  // development tools.
+  optional SourceCodeInfo source_code_info = 9;
 }
 
 // Describes a message type.
@@ -245,6 +251,12 @@ message FileOptions {
   // top-level extensions defined in the file.
   optional bool java_multiple_files = 10 [default=false];
 
+  // If set true, then the Java code generator will generate equals() and
+  // hashCode() methods for all messages defined in the .proto file. This is
+  // purely a speed optimization, as the AbstractMessage base class includes
+  // reflection-based implementations of these methods.
+  optional bool java_generate_equals_and_hash = 20 [default=false];
+
   // Generated classes can be optimized for speed or code size.
   enum OptimizeMode {
     SPEED = 1;        // Generate complete code for parsing, serialization,
@@ -264,13 +276,12 @@ message FileOptions {
   // early versions of proto2.
   //
   // Generic services are now considered deprecated in favor of using plugins
-  // that generate code specific to your particular RPC system.  If you are
-  // using such a plugin, set these to false.  In the future, we may change
-  // the default to false, so if you explicitly want generic services, you
-  // should explicitly set these to true.
-  optional bool cc_generic_services = 16 [default=true];
-  optional bool java_generic_services = 17 [default=true];
-  optional bool py_generic_services = 18 [default=true];
+  // that generate code specific to your particular RPC system.  Therefore,
+  // these default to false.  Old code which depends on generic services should
+  // explicitly set them to true.
+  optional bool cc_generic_services = 16 [default=false];
+  optional bool java_generic_services = 17 [default=false];
+  optional bool py_generic_services = 18 [default=false];
 
   // The parser stores options it doesn't recognize here. See above.
   repeated UninterpretedOption uninterpreted_option = 999;
@@ -430,4 +441,93 @@ message UninterpretedOption {
   optional int64 negative_int_value = 5;
   optional double double_value = 6;
   optional bytes string_value = 7;
+  optional string aggregate_value = 8;
+}
+
+// ===================================================================
+// Optional source code info
+
+// Encapsulates information about the original source file from which a
+// FileDescriptorProto was generated.
+message SourceCodeInfo {
+  // A Location identifies a piece of source code in a .proto file which
+  // corresponds to a particular definition.  This information is intended
+  // to be useful to IDEs, code indexers, documentation generators, and similar
+  // tools.
+  //
+  // For example, say we have a file like:
+  //   message Foo {
+  //     optional string foo = 1;
+  //   }
+  // Let's look at just the field definition:
+  //   optional string foo = 1;
+  //   ^       ^^     ^^  ^  ^^^
+  //   a       bc     de  f  ghi
+  // We have the following locations:
+  //   span   path               represents
+  //   [a,i)  [ 4, 0, 2, 0 ]     The whole field definition.
+  //   [a,b)  [ 4, 0, 2, 0, 4 ]  The label (optional).
+  //   [c,d)  [ 4, 0, 2, 0, 5 ]  The type (string).
+  //   [e,f)  [ 4, 0, 2, 0, 1 ]  The name (foo).
+  //   [g,h)  [ 4, 0, 2, 0, 3 ]  The number (1).
+  //
+  // Notes:
+  // - A location may refer to a repeated field itself (i.e. not to any
+  //   particular index within it).  This is used whenever a set of elements are
+  //   logically enclosed in a single code segment.  For example, an entire
+  //   extend block (possibly containing multiple extension definitions) will
+  //   have an outer location whose path refers to the "extensions" repeated
+  //   field without an index.
+  // - Multiple locations may have the same path.  This happens when a single
+  //   logical declaration is spread out across multiple places.  The most
+  //   obvious example is the "extend" block again -- there may be multiple
+  //   extend blocks in the same scope, each of which will have the same path.
+  // - A location's span is not always a subset of its parent's span.  For
+  //   example, the "extendee" of an extension declaration appears at the
+  //   beginning of the "extend" block and is shared by all extensions within
+  //   the block.
+  // - Just because a location's span is a subset of some other location's span
+  //   does not mean that it is a descendent.  For example, a "group" defines
+  //   both a type and a field in a single declaration.  Thus, the locations
+  //   corresponding to the type and field and their components will overlap.
+  // - Code which tries to interpret locations should probably be designed to
+  //   ignore those that it doesn't understand, as more types of locations could
+  //   be recorded in the future.
+  repeated Location location = 1;
+  message Location {
+    // Identifies which part of the FileDescriptorProto was defined at this
+    // location.
+    //
+    // Each element is a field number or an index.  They form a path from
+    // the root FileDescriptorProto to the place where the definition.  For
+    // example, this path:
+    //   [ 4, 3, 2, 7, 1 ]
+    // refers to:
+    //   file.message_type(3)  // 4, 3
+    //       .field(7)         // 2, 7
+    //       .name()           // 1
+    // This is because FileDescriptorProto.message_type has field number 4:
+    //   repeated DescriptorProto message_type = 4;
+    // and DescriptorProto.field has field number 2:
+    //   repeated FieldDescriptorProto field = 2;
+    // and FieldDescriptorProto.name has field number 1:
+    //   optional string name = 1;
+    //
+    // Thus, the above path gives the location of a field name.  If we removed
+    // the last element:
+    //   [ 4, 3, 2, 7 ]
+    // this path refers to the whole field declaration (from the beginning
+    // of the label to the terminating semicolon).
+    repeated int32 path = 1 [packed=true];
+
+    // Always has exactly three or four elements: start line, start column,
+    // end line (optional, otherwise assumed same as start line), end column.
+    // These are packed into a single field for efficiency.  Note that line
+    // and column numbers are zero-based -- typically you will want to add
+    // 1 to each before displaying to a user.
+    repeated int32 span = 2 [packed=true];
+
+    // TODO(kenton):  Record comments appearing before and after the
+    // declaration.
+  }
 }

+ 18 - 21
protos/google/protobuf/unittest.proto

@@ -41,6 +41,12 @@ option (google.protobuf.csharp_file_options).umbrella_classname = "UnitTestProto
 // A proto file we will use for unit testing.
 
 
+// Some generic_services option(s) added automatically.
+// See:  http://go/proto2-generic-services-default
+option cc_generic_services = true;     // auto-added
+option java_generic_services = true;   // auto-added
+option py_generic_services = true;     // auto-added
+
 import "google/protobuf/unittest_import.proto";
 
 // We don't put this in a package within proto2 because we need to make sure
@@ -493,6 +499,17 @@ message TestExtremeDefaultValues {
   optional float inf_float = 17 [default = inf];
   optional float neg_inf_float = 18 [default = -inf];
   optional float nan_float = 19 [default = nan];
+
+  // Tests for C++ trigraphs.
+  // Trigraphs should be escaped in C++ generated files, but they should not be
+  // escaped for other languages.
+  // Note that in .proto file, "\?" is a valid way to escape ? in string
+  // literals.
+  optional string cpp_trigraph = 20 [default = "? \? ?? \?? \??? ??/ ?\?-"];
+}
+
+message SparseEnumMessage {
+  optional TestSparseEnum sparse_enum = 1;
 }
 
 // Test String and Bytes: string is for valid UTF-8 strings
@@ -563,27 +580,6 @@ extend TestPackedExtensions {
   repeated ForeignEnum packed_enum_extension  = 103 [packed = true];
 }
 
-message TestUnpackedExtensions {
-  extensions 1 to max;
-}
-
-extend TestUnpackedExtensions {
-  repeated    int32 unpacked_int32_extension    =  90;
-  repeated    int64 unpacked_int64_extension    =  91;
-  repeated   uint32 unpacked_uint32_extension   =  92;
-  repeated   uint64 unpacked_uint64_extension   =  93;
-  repeated   sint32 unpacked_sint32_extension   =  94;
-  repeated   sint64 unpacked_sint64_extension   =  95;
-  repeated  fixed32 unpacked_fixed32_extension  =  96;
-  repeated  fixed64 unpacked_fixed64_extension  =  97;
-  repeated sfixed32 unpacked_sfixed32_extension =  98;
-  repeated sfixed64 unpacked_sfixed64_extension =  99;
-  repeated    float unpacked_float_extension    = 100;
-  repeated   double unpacked_double_extension   = 101;
-  repeated     bool unpacked_bool_extension     = 102;
-  repeated ForeignEnum unpacked_enum_extension  = 103;
-}
-
 // Used by ExtensionSetTest/DynamicExtensions.  The test actually builds
 // a set of extensions to TestAllExtensions dynamically, based on the fields
 // of this message type.
@@ -625,6 +621,7 @@ message TestRepeatedScalarDifferentTagSizes {
   repeated uint64  repeated_uint64  = 262143;
 }
 
+
 // Test that RPC services work.
 message FooRequest  {}
 message FooResponse {}

+ 91 - 0
protos/google/protobuf/unittest_custom_options.proto

@@ -41,6 +41,12 @@ option (google.protobuf.csharp_file_options).umbrella_classname = "UnitTestCusto
 // A proto file used to test the "custom options" feature of proto2.
 
 
+// Some generic_services option(s) added automatically.
+// See:  http://go/proto2-generic-services-default
+option cc_generic_services = true;     // auto-added
+option java_generic_services = true;   // auto-added
+option py_generic_services = true;
+
 // A custom file option (defined below).
 option (file_opt1) = 9876543210;
 
@@ -279,3 +285,88 @@ message VariousComplexOptions {
   option (complex_opt3).complexoptiontype5.plugh = 22;
   option (complexopt6).xyzzy = 24;
 }
+
+// ------------------------------------------------------
+// Definitions for testing aggregate option parsing.
+// See descriptor_unittest.cc.
+
+message AggregateMessageSet {
+  option message_set_wire_format = true;
+  extensions 4 to max;
+}
+
+message AggregateMessageSetElement {
+  extend AggregateMessageSet {
+    optional AggregateMessageSetElement message_set_extension = 15447542;
+  }
+  optional string s = 1;
+}
+
+// A helper type used to test aggregate option parsing
+message Aggregate {
+  optional int32 i = 1;
+  optional string s = 2;
+
+  // A nested object
+  optional Aggregate sub = 3;
+
+  // To test the parsing of extensions inside aggregate values
+  optional google.protobuf.FileOptions file = 4;
+  extend google.protobuf.FileOptions {
+    optional Aggregate nested = 15476903;
+  }
+
+  // An embedded message set
+  optional AggregateMessageSet mset = 5;
+}
+
+// Allow Aggregate to be used as an option at all possible locations
+// in the .proto grammer.
+extend google.protobuf.FileOptions      { optional Aggregate fileopt    = 15478479; }
+extend google.protobuf.MessageOptions   { optional Aggregate msgopt     = 15480088; }
+extend google.protobuf.FieldOptions     { optional Aggregate fieldopt   = 15481374; }
+extend google.protobuf.EnumOptions      { optional Aggregate enumopt_renamed    = 15483218; }
+extend google.protobuf.EnumValueOptions { optional Aggregate enumvalopt = 15486921; }
+extend google.protobuf.ServiceOptions   { optional Aggregate serviceopt = 15497145; }
+extend google.protobuf.MethodOptions    { optional Aggregate methodopt  = 15512713; }
+
+// Try using AggregateOption at different points in the proto grammar
+option (fileopt) = {
+  s: 'FileAnnotation'
+  // Also test the handling of comments
+  /* of both types */ i: 100
+
+  sub { s: 'NestedFileAnnotation' }
+
+  // Include a google.protobuf.FileOptions and recursively extend it with
+  // another fileopt.
+  file {
+    [protobuf_unittest.fileopt] {
+      s:'FileExtensionAnnotation'
+    }
+  }
+
+  // A message set inside an option value
+  mset {
+    [protobuf_unittest.AggregateMessageSetElement.message_set_extension] {
+      s: 'EmbeddedMessageSetElement'
+    }
+  }
+};
+
+message AggregateMessage {
+  option (msgopt) = { i:101 s:'MessageAnnotation' };
+  optional int32 fieldname = 1 [(fieldopt) = { s:'FieldAnnotation' }];
+}
+
+service AggregateService {
+  option (serviceopt) = { s:'ServiceAnnotation' };
+  rpc Method (AggregateMessage) returns (AggregateMessage) {
+    option (methodopt) = { s:'MethodAnnotation' };
+  }
+}
+
+enum AggregateEnum {
+  option (enumopt_renamed) = { s:'EnumAnnotation' };
+  VALUE = 1 [(enumvalopt) = { s:'EnumValueAnnotation' }];
+}

+ 0 - 38
protos/google/protobuf/unittest_lite.proto

@@ -178,23 +178,6 @@ message TestPackedTypesLite {
   repeated ForeignEnumLite packed_enum  = 103 [packed = true];
 }
 
-message TestUnpackedTypesLite {
-  repeated    int32 unpacked_int32    =  90;
-  repeated    int64 unpacked_int64    =  91;
-  repeated   uint32 unpacked_uint32   =  92;
-  repeated   uint64 unpacked_uint64   =  93;
-  repeated   sint32 unpacked_sint32   =  94;
-  repeated   sint64 unpacked_sint64   =  95;
-  repeated  fixed32 unpacked_fixed32  =  96;
-  repeated  fixed64 unpacked_fixed64  =  97;
-  repeated sfixed32 unpacked_sfixed32 =  98;
-  repeated sfixed64 unpacked_sfixed64 =  99;
-  repeated    float unpacked_float    = 100;
-  repeated   double unpacked_double   = 101;
-  repeated     bool unpacked_bool     = 102;
-  repeated ForeignEnumLite unpacked_enum  = 103;
-}
-
 message TestAllExtensionsLite {
   extensions 1 to max;
 }
@@ -322,27 +305,6 @@ extend TestPackedExtensionsLite {
   repeated ForeignEnumLite packed_enum_extension_lite = 103 [packed = true];
 }
 
-message TestUnpackedExtensionsLite {
-  extensions 1 to max;
-}
-
-extend TestUnpackedExtensionsLite {
-  repeated    int32 unpacked_int32_extension_lite    =  90;
-  repeated    int64 unpacked_int64_extension_lite    =  91;
-  repeated   uint32 unpacked_uint32_extension_lite   =  92;
-  repeated   uint64 unpacked_uint64_extension_lite   =  93;
-  repeated   sint32 unpacked_sint32_extension_lite   =  94;
-  repeated   sint64 unpacked_sint64_extension_lite   =  95;
-  repeated  fixed32 unpacked_fixed32_extension_lite  =  96;
-  repeated  fixed64 unpacked_fixed64_extension_lite  =  97;
-  repeated sfixed32 unpacked_sfixed32_extension_lite =  98;
-  repeated sfixed64 unpacked_sfixed64_extension_lite =  99;
-  repeated    float unpacked_float_extension_lite    = 100;
-  repeated   double unpacked_double_extension_lite   = 101;
-  repeated     bool unpacked_bool_extension_lite     = 102;
-  repeated ForeignEnumLite unpacked_enum_extension_lite = 103;
-}
-
 message TestNestedExtensionLite {
   extend TestAllExtensionsLite {
     optional int32 nested_extension = 12345;

+ 1 - 3
protos/google/protobuf/unittest_no_generic_services.proto

@@ -38,9 +38,7 @@ option (google.protobuf.csharp_file_options).umbrella_classname = "UnitTestNoGen
 
 package google.protobuf.no_generic_services_test;
 
-option cc_generic_services = false;
-option java_generic_services = false;
-option py_generic_services = false;
+// *_generic_services are false by default.
 
 message TestMessage {
   optional int32 a = 1;

+ 1 - 0
src/ProtocolBuffers.Test/AbstractMessageTest.cs

@@ -133,6 +133,7 @@ namespace Google.ProtocolBuffers
             byte[] bytes = TestUtil.GetPackedSet().ToByteArray();
             ExtensionRegistry registry = ExtensionRegistry.CreateInstance();
             UnitTestProtoFile.RegisterAllExtensions(registry);
+            UnitTestExtrasProtoFile.RegisterAllExtensions(registry);
             TestUnpackedExtensions message = TestUnpackedExtensions.ParseFrom(bytes, registry);
             TestUtil.AssertUnpackedExtensionsSet(message);
         }

+ 1 - 0
src/ProtocolBuffers.Test/ProtocolBuffers.Test.csproj

@@ -88,6 +88,7 @@
     </Compile>
     <Compile Include="Compatibility\TextCompatibilityTests.cs" />
     <Compile Include="Compatibility\XmlCompatibilityTests.cs" />
+    <Compile Include="TestProtos\UnitTestExtrasProtoFile.cs" />
     <Compile Include="TestRpcForMimeTypes.cs" />
     <Compile Include="TestReaderForUrlEncoded.cs" />
     <Compile Include="CSharpOptionsTest.cs" />

+ 0 - 5
src/ProtocolBuffers.Test/ProtocolBuffers.Test.csproj.user

@@ -1,5 +0,0 @@
-<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <PropertyGroup>
-    <ProjectView>ProjectFiles</ProjectView>
-  </PropertyGroup>
-</Project>

+ 1476 - 59
src/ProtocolBuffers.Test/TestProtos/UnitTestCustomOptionsProtoFile.cs

@@ -48,7 +48,16 @@ namespace Google.ProtocolBuffers.TestProtos {
       registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.ComplexOpt2);
       registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.ComplexOpt3);
       registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.ComplexOpt6);
+      registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.Fileopt);
+      registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.Msgopt);
+      registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.Fieldopt);
+      registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.EnumoptRenamed);
+      registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.Enumvalopt);
+      registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.Serviceopt);
+      registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.Methodopt);
       registry.Add(global::Google.ProtocolBuffers.TestProtos.ComplexOptionType2.Types.ComplexOptionType4.ComplexOpt4);
+      registry.Add(global::Google.ProtocolBuffers.TestProtos.AggregateMessageSetElement.MessageSetExtension);
+      registry.Add(global::Google.ProtocolBuffers.TestProtos.Aggregate.Nested);
     }
     #endregion
     #region Extensions
@@ -124,6 +133,20 @@ namespace Google.ProtocolBuffers.TestProtos {
     public static pb::GeneratedExtensionBase<global::Google.ProtocolBuffers.TestProtos.ComplexOptionType3> ComplexOpt3;
     public const int ComplexOpt6FieldNumber = 7595468;
     public static pb::GeneratedExtensionBase<global::Google.ProtocolBuffers.TestProtos.ComplexOpt6> ComplexOpt6;
+    public const int FileoptFieldNumber = 15478479;
+    public static pb::GeneratedExtensionBase<global::Google.ProtocolBuffers.TestProtos.Aggregate> Fileopt;
+    public const int MsgoptFieldNumber = 15480088;
+    public static pb::GeneratedExtensionBase<global::Google.ProtocolBuffers.TestProtos.Aggregate> Msgopt;
+    public const int FieldoptFieldNumber = 15481374;
+    public static pb::GeneratedExtensionBase<global::Google.ProtocolBuffers.TestProtos.Aggregate> Fieldopt;
+    public const int EnumoptRenamedFieldNumber = 15483218;
+    public static pb::GeneratedExtensionBase<global::Google.ProtocolBuffers.TestProtos.Aggregate> EnumoptRenamed;
+    public const int EnumvaloptFieldNumber = 15486921;
+    public static pb::GeneratedExtensionBase<global::Google.ProtocolBuffers.TestProtos.Aggregate> Enumvalopt;
+    public const int ServiceoptFieldNumber = 15497145;
+    public static pb::GeneratedExtensionBase<global::Google.ProtocolBuffers.TestProtos.Aggregate> Serviceopt;
+    public const int MethodoptFieldNumber = 15512713;
+    public static pb::GeneratedExtensionBase<global::Google.ProtocolBuffers.TestProtos.Aggregate> Methodopt;
     #endregion
     
     #region Static variables
@@ -161,6 +184,14 @@ namespace Google.ProtocolBuffers.TestProtos {
     internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.ComplexOpt6, global::Google.ProtocolBuffers.TestProtos.ComplexOpt6.Builder> internal__static_protobuf_unittest_ComplexOpt6__FieldAccessorTable;
     internal static pbd::MessageDescriptor internal__static_protobuf_unittest_VariousComplexOptions__Descriptor;
     internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.VariousComplexOptions, global::Google.ProtocolBuffers.TestProtos.VariousComplexOptions.Builder> internal__static_protobuf_unittest_VariousComplexOptions__FieldAccessorTable;
+    internal static pbd::MessageDescriptor internal__static_protobuf_unittest_AggregateMessageSet__Descriptor;
+    internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.AggregateMessageSet, global::Google.ProtocolBuffers.TestProtos.AggregateMessageSet.Builder> internal__static_protobuf_unittest_AggregateMessageSet__FieldAccessorTable;
+    internal static pbd::MessageDescriptor internal__static_protobuf_unittest_AggregateMessageSetElement__Descriptor;
+    internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.AggregateMessageSetElement, global::Google.ProtocolBuffers.TestProtos.AggregateMessageSetElement.Builder> internal__static_protobuf_unittest_AggregateMessageSetElement__FieldAccessorTable;
+    internal static pbd::MessageDescriptor internal__static_protobuf_unittest_Aggregate__Descriptor;
+    internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.Aggregate, global::Google.ProtocolBuffers.TestProtos.Aggregate.Builder> internal__static_protobuf_unittest_Aggregate__FieldAccessorTable;
+    internal static pbd::MessageDescriptor internal__static_protobuf_unittest_AggregateMessage__Descriptor;
+    internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.AggregateMessage, global::Google.ProtocolBuffers.TestProtos.AggregateMessage.Builder> internal__static_protobuf_unittest_AggregateMessage__FieldAccessorTable;
     #endregion
     #region Descriptor
     public static pbd::FileDescriptor Descriptor {
@@ -209,63 +240,97 @@ namespace Google.ProtocolBuffers.TestProtos {
           "HNKojx0DCLMP+t6QHQIICfrekB0EExgWFKr9kB0DENsHqv2QHQb45pcdjgWq" + 
           "/ZAdBQoDCOcFqv2QHQgKBtiFnh3PD6r9kB0KCgiS9Z0dAwjYD6r9kB0IwqyX" + 
           "HQMI5QWq/ZAdC8Kslx0G2IWeHc4Pqv2QHQ3CrJcdCJL1nR0DCMkQqv2QHQUa" + 
-          "AwjBAqLilR0CCCqi4pUdBtiFnh3EAqLilR0IkvWdHQMI7AYqNgoKTWV0aG9k" + 
-          "T3B0MRITCg9NRVRIT0RPUFQxX1ZBTDEQARITCg9NRVRIT0RPUFQxX1ZBTDIQ" + 
-          "AjKOAQocVGVzdFNlcnZpY2VXaXRoQ3VzdG9tT3B0aW9ucxJjCgNGb28SKS5w" + 
-          "cm90b2J1Zl91bml0dGVzdC5DdXN0b21PcHRpb25Gb29SZXF1ZXN0GioucHJv" + 
-          "dG9idWZfdW5pdHRlc3QuQ3VzdG9tT3B0aW9uRm9vUmVzcG9uc2UiBeD6jB4C" + 
-          "GgmQsose09uAy0k6MgoJZmlsZV9vcHQxEhwuZ29vZ2xlLnByb3RvYnVmLkZp" + 
-          "bGVPcHRpb25zGI6d2AMgASgEOjgKDG1lc3NhZ2Vfb3B0MRIfLmdvb2dsZS5w" + 
-          "cm90b2J1Zi5NZXNzYWdlT3B0aW9ucxicrdgDIAEoBTo0CgpmaWVsZF9vcHQx" + 
-          "Eh0uZ29vZ2xlLnByb3RvYnVmLkZpZWxkT3B0aW9ucxiIvNgDIAEoBjo4Cgpm" + 
-          "aWVsZF9vcHQyEh0uZ29vZ2xlLnByb3RvYnVmLkZpZWxkT3B0aW9ucxi5odkD" + 
-          "IAEoBToCNDI6MgoJZW51bV9vcHQxEhwuZ29vZ2xlLnByb3RvYnVmLkVudW1P" + 
-          "cHRpb25zGOie2QMgASgPOjwKD2VudW1fdmFsdWVfb3B0MRIhLmdvb2dsZS5w" + 
-          "cm90b2J1Zi5FbnVtVmFsdWVPcHRpb25zGOagXyABKAU6OAoMc2VydmljZV9v" + 
-          "cHQxEh8uZ29vZ2xlLnByb3RvYnVmLlNlcnZpY2VPcHRpb25zGKK24QMgASgS" + 
-          "OlUKC21ldGhvZF9vcHQxEh4uZ29vZ2xlLnByb3RvYnVmLk1ldGhvZE9wdGlv" + 
-          "bnMYrM/hAyABKA4yHS5wcm90b2J1Zl91bml0dGVzdC5NZXRob2RPcHQxOjQK" + 
-          "CGJvb2xfb3B0Eh8uZ29vZ2xlLnByb3RvYnVmLk1lc3NhZ2VPcHRpb25zGOqr" + 
-          "1gMgASgIOjUKCWludDMyX29wdBIfLmdvb2dsZS5wcm90b2J1Zi5NZXNzYWdl" + 
-          "T3B0aW9ucxjtqNYDIAEoBTo1CglpbnQ2NF9vcHQSHy5nb29nbGUucHJvdG9i" + 
-          "dWYuTWVzc2FnZU9wdGlvbnMYxqfWAyABKAM6NgoKdWludDMyX29wdBIfLmdv" + 
-          "b2dsZS5wcm90b2J1Zi5NZXNzYWdlT3B0aW9ucxiwotYDIAEoDTo2Cgp1aW50" + 
-          "NjRfb3B0Eh8uZ29vZ2xlLnByb3RvYnVmLk1lc3NhZ2VPcHRpb25zGN+O1gMg" + 
-          "ASgEOjYKCnNpbnQzMl9vcHQSHy5nb29nbGUucHJvdG9idWYuTWVzc2FnZU9w" + 
-          "dGlvbnMYwIjWAyABKBE6NgoKc2ludDY0X29wdBIfLmdvb2dsZS5wcm90b2J1" + 
-          "Zi5NZXNzYWdlT3B0aW9ucxj/gtYDIAEoEjo3CgtmaXhlZDMyX29wdBIfLmdv" + 
-          "b2dsZS5wcm90b2J1Zi5NZXNzYWdlT3B0aW9ucxjT/tUDIAEoBzo3CgtmaXhl" + 
-          "ZDY0X29wdBIfLmdvb2dsZS5wcm90b2J1Zi5NZXNzYWdlT3B0aW9ucxji/dUD" + 
-          "IAEoBjo4CgxzZml4ZWQzMl9vcHQSHy5nb29nbGUucHJvdG9idWYuTWVzc2Fn" + 
-          "ZU9wdGlvbnMY1fHVAyABKA86OAoMc2ZpeGVkNjRfb3B0Eh8uZ29vZ2xlLnBy" + 
-          "b3RvYnVmLk1lc3NhZ2VPcHRpb25zGOOK1QMgASgQOjUKCWZsb2F0X29wdBIf" + 
-          "Lmdvb2dsZS5wcm90b2J1Zi5NZXNzYWdlT3B0aW9ucxj+u9QDIAEoAjo2Cgpk" + 
-          "b3VibGVfb3B0Eh8uZ29vZ2xlLnByb3RvYnVmLk1lc3NhZ2VPcHRpb25zGM2r" + 
-          "1AMgASgBOjYKCnN0cmluZ19vcHQSHy5nb29nbGUucHJvdG9idWYuTWVzc2Fn" + 
-          "ZU9wdGlvbnMYxavUAyABKAk6NQoJYnl0ZXNfb3B0Eh8uZ29vZ2xlLnByb3Rv" + 
-          "YnVmLk1lc3NhZ2VPcHRpb25zGJar1AMgASgMOnAKCGVudW1fb3B0Eh8uZ29v" + 
-          "Z2xlLnByb3RvYnVmLk1lc3NhZ2VPcHRpb25zGJGr1AMgASgOMjoucHJvdG9i" + 
-          "dWZfdW5pdHRlc3QuRHVtbXlNZXNzYWdlQ29udGFpbmluZ0VudW0uVGVzdEVu" + 
-          "dW1UeXBlOnAKEG1lc3NhZ2VfdHlwZV9vcHQSHy5nb29nbGUucHJvdG9idWYu" + 
-          "TWVzc2FnZU9wdGlvbnMYr/LTAyABKAsyMi5wcm90b2J1Zl91bml0dGVzdC5E" + 
-          "dW1teU1lc3NhZ2VJbnZhbGlkQXNPcHRpb25UeXBlOjYKBHF1dXgSJS5wcm90" + 
-          "b2J1Zl91bml0dGVzdC5Db21wbGV4T3B0aW9uVHlwZTEY2+DTAyABKAU6XgoF" + 
-          "Y29yZ2USJS5wcm90b2J1Zl91bml0dGVzdC5Db21wbGV4T3B0aW9uVHlwZTEY" + 
-          "0t7TAyABKAsyJS5wcm90b2J1Zl91bml0dGVzdC5Db21wbGV4T3B0aW9uVHlw" + 
-          "ZTM6OAoGZ3JhdWx0EiUucHJvdG9idWZfdW5pdHRlc3QuQ29tcGxleE9wdGlv" + 
-          "blR5cGUyGO/80gMgASgFOl8KBmdhcnBseRIlLnByb3RvYnVmX3VuaXR0ZXN0" + 
-          "LkNvbXBsZXhPcHRpb25UeXBlMhjI9dIDIAEoCzIlLnByb3RvYnVmX3VuaXR0" + 
-          "ZXN0LkNvbXBsZXhPcHRpb25UeXBlMTpfCgxjb21wbGV4X29wdDESHy5nb29n" + 
-          "bGUucHJvdG9idWYuTWVzc2FnZU9wdGlvbnMYpNzSAyABKAsyJS5wcm90b2J1" + 
-          "Zl91bml0dGVzdC5Db21wbGV4T3B0aW9uVHlwZTE6XwoMY29tcGxleF9vcHQy" + 
-          "Eh8uZ29vZ2xlLnByb3RvYnVmLk1lc3NhZ2VPcHRpb25zGNWP0gMgASgLMiUu" + 
-          "cHJvdG9idWZfdW5pdHRlc3QuQ29tcGxleE9wdGlvblR5cGUyOl8KDGNvbXBs" + 
-          "ZXhfb3B0MxIfLmdvb2dsZS5wcm90b2J1Zi5NZXNzYWdlT3B0aW9ucxjvi9ID" + 
-          "IAEoCzIlLnByb3RvYnVmX3VuaXR0ZXN0LkNvbXBsZXhPcHRpb25UeXBlMzpX" + 
-          "Cgtjb21wbGV4b3B0NhIfLmdvb2dsZS5wcm90b2J1Zi5NZXNzYWdlT3B0aW9u" + 
-          "cxjMy88DIAEoCjIeLnByb3RvYnVmX3VuaXR0ZXN0LkNvbXBsZXhPcHQ2Qk/C" + 
-          "PkMKIUdvb2dsZS5Qcm90b2NvbEJ1ZmZlcnMuVGVzdFByb3RvcxIeVW5pdFRl" + 
-          "c3RDdXN0b21PcHRpb25zUHJvdG9GaWxl8OjBHeqtwOUk");
+          "AwjBAqLilR0CCCqi4pUdBtiFnh3EAqLilR0IkvWdHQMI7AYiIwoTQWdncmVn" + 
+          "YXRlTWVzc2FnZVNldCoICAQQgICAgAI6AggBIqABChpBZ2dyZWdhdGVNZXNz" + 
+          "YWdlU2V0RWxlbWVudBIJCgFzGAEgASgJMncKFW1lc3NhZ2Vfc2V0X2V4dGVu" + 
+          "c2lvbhImLnByb3RvYnVmX3VuaXR0ZXN0LkFnZ3JlZ2F0ZU1lc3NhZ2VTZXQY" + 
+          "9uuuByABKAsyLS5wcm90b2J1Zl91bml0dGVzdC5BZ2dyZWdhdGVNZXNzYWdl" + 
+          "U2V0RWxlbWVudCL9AQoJQWdncmVnYXRlEgkKAWkYASABKAUSCQoBcxgCIAEo" + 
+          "CRIpCgNzdWIYAyABKAsyHC5wcm90b2J1Zl91bml0dGVzdC5BZ2dyZWdhdGUS" + 
+          "KgoEZmlsZRgEIAEoCzIcLmdvb2dsZS5wcm90b2J1Zi5GaWxlT3B0aW9ucxI0" + 
+          "CgRtc2V0GAUgASgLMiYucHJvdG9idWZfdW5pdHRlc3QuQWdncmVnYXRlTWVz" + 
+          "c2FnZVNldDJNCgZuZXN0ZWQSHC5nb29nbGUucHJvdG9idWYuRmlsZU9wdGlv" + 
+          "bnMYp9GwByABKAsyHC5wcm90b2J1Zl91bml0dGVzdC5BZ2dyZWdhdGUiWQoQ" + 
+          "QWdncmVnYXRlTWVzc2FnZRIpCglmaWVsZG5hbWUYASABKAVCFvKhhzsREg9G" + 
+          "aWVsZEFubm90YXRpb246GsLRhjsVCGUSEU1lc3NhZ2VBbm5vdGF0aW9uKjYK" + 
+          "Ck1ldGhvZE9wdDESEwoPTUVUSE9ET1BUMV9WQUwxEAESEwoPTUVUSE9ET1BU" + 
+          "MV9WQUwyEAIqTQoNQWdncmVnYXRlRW51bRIlCgVWQUxVRRABGhrK/Ik7FRIT" + 
+          "RW51bVZhbHVlQW5ub3RhdGlvbhoVkpWIOxASDkVudW1Bbm5vdGF0aW9uMo4B" + 
+          "ChxUZXN0U2VydmljZVdpdGhDdXN0b21PcHRpb25zEmMKA0ZvbxIpLnByb3Rv" + 
+          "YnVmX3VuaXR0ZXN0LkN1c3RvbU9wdGlvbkZvb1JlcXVlc3QaKi5wcm90b2J1" + 
+          "Zl91bml0dGVzdC5DdXN0b21PcHRpb25Gb29SZXNwb25zZSIF4PqMHgIaCZCy" + 
+          "ix7T24DLSTKZAQoQQWdncmVnYXRlU2VydmljZRJrCgZNZXRob2QSIy5wcm90" + 
+          "b2J1Zl91bml0dGVzdC5BZ2dyZWdhdGVNZXNzYWdlGiMucHJvdG9idWZfdW5p" + 
+          "dHRlc3QuQWdncmVnYXRlTWVzc2FnZSIXysiWOxISEE1ldGhvZEFubm90YXRp" + 
+          "b24aGMr7jjsTEhFTZXJ2aWNlQW5ub3RhdGlvbjoyCglmaWxlX29wdDESHC5n" + 
+          "b29nbGUucHJvdG9idWYuRmlsZU9wdGlvbnMYjp3YAyABKAQ6OAoMbWVzc2Fn" + 
+          "ZV9vcHQxEh8uZ29vZ2xlLnByb3RvYnVmLk1lc3NhZ2VPcHRpb25zGJyt2AMg" + 
+          "ASgFOjQKCmZpZWxkX29wdDESHS5nb29nbGUucHJvdG9idWYuRmllbGRPcHRp" + 
+          "b25zGIi82AMgASgGOjgKCmZpZWxkX29wdDISHS5nb29nbGUucHJvdG9idWYu" + 
+          "RmllbGRPcHRpb25zGLmh2QMgASgFOgI0MjoyCgllbnVtX29wdDESHC5nb29n" + 
+          "bGUucHJvdG9idWYuRW51bU9wdGlvbnMY6J7ZAyABKA86PAoPZW51bV92YWx1" + 
+          "ZV9vcHQxEiEuZ29vZ2xlLnByb3RvYnVmLkVudW1WYWx1ZU9wdGlvbnMY5qBf" + 
+          "IAEoBTo4CgxzZXJ2aWNlX29wdDESHy5nb29nbGUucHJvdG9idWYuU2Vydmlj" + 
+          "ZU9wdGlvbnMYorbhAyABKBI6VQoLbWV0aG9kX29wdDESHi5nb29nbGUucHJv" + 
+          "dG9idWYuTWV0aG9kT3B0aW9ucxisz+EDIAEoDjIdLnByb3RvYnVmX3VuaXR0" + 
+          "ZXN0Lk1ldGhvZE9wdDE6NAoIYm9vbF9vcHQSHy5nb29nbGUucHJvdG9idWYu" + 
+          "TWVzc2FnZU9wdGlvbnMY6qvWAyABKAg6NQoJaW50MzJfb3B0Eh8uZ29vZ2xl" + 
+          "LnByb3RvYnVmLk1lc3NhZ2VPcHRpb25zGO2o1gMgASgFOjUKCWludDY0X29w" + 
+          "dBIfLmdvb2dsZS5wcm90b2J1Zi5NZXNzYWdlT3B0aW9ucxjGp9YDIAEoAzo2" + 
+          "Cgp1aW50MzJfb3B0Eh8uZ29vZ2xlLnByb3RvYnVmLk1lc3NhZ2VPcHRpb25z" + 
+          "GLCi1gMgASgNOjYKCnVpbnQ2NF9vcHQSHy5nb29nbGUucHJvdG9idWYuTWVz" + 
+          "c2FnZU9wdGlvbnMY347WAyABKAQ6NgoKc2ludDMyX29wdBIfLmdvb2dsZS5w" + 
+          "cm90b2J1Zi5NZXNzYWdlT3B0aW9ucxjAiNYDIAEoETo2CgpzaW50NjRfb3B0" + 
+          "Eh8uZ29vZ2xlLnByb3RvYnVmLk1lc3NhZ2VPcHRpb25zGP+C1gMgASgSOjcK" + 
+          "C2ZpeGVkMzJfb3B0Eh8uZ29vZ2xlLnByb3RvYnVmLk1lc3NhZ2VPcHRpb25z" + 
+          "GNP+1QMgASgHOjcKC2ZpeGVkNjRfb3B0Eh8uZ29vZ2xlLnByb3RvYnVmLk1l" + 
+          "c3NhZ2VPcHRpb25zGOL91QMgASgGOjgKDHNmaXhlZDMyX29wdBIfLmdvb2ds" + 
+          "ZS5wcm90b2J1Zi5NZXNzYWdlT3B0aW9ucxjV8dUDIAEoDzo4CgxzZml4ZWQ2" + 
+          "NF9vcHQSHy5nb29nbGUucHJvdG9idWYuTWVzc2FnZU9wdGlvbnMY44rVAyAB" + 
+          "KBA6NQoJZmxvYXRfb3B0Eh8uZ29vZ2xlLnByb3RvYnVmLk1lc3NhZ2VPcHRp" + 
+          "b25zGP671AMgASgCOjYKCmRvdWJsZV9vcHQSHy5nb29nbGUucHJvdG9idWYu" + 
+          "TWVzc2FnZU9wdGlvbnMYzavUAyABKAE6NgoKc3RyaW5nX29wdBIfLmdvb2ds" + 
+          "ZS5wcm90b2J1Zi5NZXNzYWdlT3B0aW9ucxjFq9QDIAEoCTo1CglieXRlc19v" + 
+          "cHQSHy5nb29nbGUucHJvdG9idWYuTWVzc2FnZU9wdGlvbnMYlqvUAyABKAw6" + 
+          "cAoIZW51bV9vcHQSHy5nb29nbGUucHJvdG9idWYuTWVzc2FnZU9wdGlvbnMY" + 
+          "kavUAyABKA4yOi5wcm90b2J1Zl91bml0dGVzdC5EdW1teU1lc3NhZ2VDb250" + 
+          "YWluaW5nRW51bS5UZXN0RW51bVR5cGU6cAoQbWVzc2FnZV90eXBlX29wdBIf" + 
+          "Lmdvb2dsZS5wcm90b2J1Zi5NZXNzYWdlT3B0aW9ucxiv8tMDIAEoCzIyLnBy" + 
+          "b3RvYnVmX3VuaXR0ZXN0LkR1bW15TWVzc2FnZUludmFsaWRBc09wdGlvblR5" + 
+          "cGU6NgoEcXV1eBIlLnByb3RvYnVmX3VuaXR0ZXN0LkNvbXBsZXhPcHRpb25U" + 
+          "eXBlMRjb4NMDIAEoBTpeCgVjb3JnZRIlLnByb3RvYnVmX3VuaXR0ZXN0LkNv" + 
+          "bXBsZXhPcHRpb25UeXBlMRjS3tMDIAEoCzIlLnByb3RvYnVmX3VuaXR0ZXN0" + 
+          "LkNvbXBsZXhPcHRpb25UeXBlMzo4CgZncmF1bHQSJS5wcm90b2J1Zl91bml0" + 
+          "dGVzdC5Db21wbGV4T3B0aW9uVHlwZTIY7/zSAyABKAU6XwoGZ2FycGx5EiUu" + 
+          "cHJvdG9idWZfdW5pdHRlc3QuQ29tcGxleE9wdGlvblR5cGUyGMj10gMgASgL" + 
+          "MiUucHJvdG9idWZfdW5pdHRlc3QuQ29tcGxleE9wdGlvblR5cGUxOl8KDGNv" + 
+          "bXBsZXhfb3B0MRIfLmdvb2dsZS5wcm90b2J1Zi5NZXNzYWdlT3B0aW9ucxik" + 
+          "3NIDIAEoCzIlLnByb3RvYnVmX3VuaXR0ZXN0LkNvbXBsZXhPcHRpb25UeXBl" + 
+          "MTpfCgxjb21wbGV4X29wdDISHy5nb29nbGUucHJvdG9idWYuTWVzc2FnZU9w" + 
+          "dGlvbnMY1Y/SAyABKAsyJS5wcm90b2J1Zl91bml0dGVzdC5Db21wbGV4T3B0" + 
+          "aW9uVHlwZTI6XwoMY29tcGxleF9vcHQzEh8uZ29vZ2xlLnByb3RvYnVmLk1l" + 
+          "c3NhZ2VPcHRpb25zGO+L0gMgASgLMiUucHJvdG9idWZfdW5pdHRlc3QuQ29t" + 
+          "cGxleE9wdGlvblR5cGUzOlcKC2NvbXBsZXhvcHQ2Eh8uZ29vZ2xlLnByb3Rv" + 
+          "YnVmLk1lc3NhZ2VPcHRpb25zGMzLzwMgASgKMh4ucHJvdG9idWZfdW5pdHRl" + 
+          "c3QuQ29tcGxleE9wdDY6TgoHZmlsZW9wdBIcLmdvb2dsZS5wcm90b2J1Zi5G" + 
+          "aWxlT3B0aW9ucxjP3bAHIAEoCzIcLnByb3RvYnVmX3VuaXR0ZXN0LkFnZ3Jl" + 
+          "Z2F0ZTpQCgZtc2dvcHQSHy5nb29nbGUucHJvdG9idWYuTWVzc2FnZU9wdGlv" + 
+          "bnMYmOqwByABKAsyHC5wcm90b2J1Zl91bml0dGVzdC5BZ2dyZWdhdGU6UAoI" + 
+          "ZmllbGRvcHQSHS5nb29nbGUucHJvdG9idWYuRmllbGRPcHRpb25zGJ70sAcg" + 
+          "ASgLMhwucHJvdG9idWZfdW5pdHRlc3QuQWdncmVnYXRlOlYKD2VudW1vcHRf" + 
+          "cmVuYW1lZBIcLmdvb2dsZS5wcm90b2J1Zi5FbnVtT3B0aW9ucxjSgrEHIAEo" + 
+          "CzIcLnByb3RvYnVmX3VuaXR0ZXN0LkFnZ3JlZ2F0ZTpWCgplbnVtdmFsb3B0" + 
+          "EiEuZ29vZ2xlLnByb3RvYnVmLkVudW1WYWx1ZU9wdGlvbnMYyZ+xByABKAsy" + 
+          "HC5wcm90b2J1Zl91bml0dGVzdC5BZ2dyZWdhdGU6VAoKc2VydmljZW9wdBIf" + 
+          "Lmdvb2dsZS5wcm90b2J1Zi5TZXJ2aWNlT3B0aW9ucxi577EHIAEoCzIcLnBy" + 
+          "b3RvYnVmX3VuaXR0ZXN0LkFnZ3JlZ2F0ZTpSCgltZXRob2RvcHQSHi5nb29n" + 
+          "bGUucHJvdG9idWYuTWV0aG9kT3B0aW9ucxiJ6bIHIAEoCzIcLnByb3RvYnVm" + 
+          "X3VuaXR0ZXN0LkFnZ3JlZ2F0ZULNAYABAYgBAZABAcI+QwohR29vZ2xlLlBy" + 
+          "b3RvY29sQnVmZmVycy5UZXN0UHJvdG9zEh5Vbml0VGVzdEN1c3RvbU9wdGlv" + 
+          "bnNQcm90b0ZpbGXw6MEd6q3A5ST67IU7cAhkEg5GaWxlQW5ub3RhdGlvbhoW" + 
+          "EhROZXN0ZWRGaWxlQW5ub3RhdGlvbiIe+uyFOxkSF0ZpbGVFeHRlbnNpb25B" + 
+          "bm5vdGF0aW9uKiQLEPbrrgcaGwoZRW1iZWRkZWRNZXNzYWdlU2V0RWxlbWVu" + 
+          "dAw=");
       pbd::FileDescriptor.InternalDescriptorAssigner assigner = delegate(pbd::FileDescriptor root) {
         descriptor = root;
         internal__static_protobuf_unittest_TestMessageWithCustomOptions__Descriptor = Descriptor.MessageTypes[0];
@@ -337,6 +402,24 @@ namespace Google.ProtocolBuffers.TestProtos {
         internal__static_protobuf_unittest_VariousComplexOptions__FieldAccessorTable = 
             new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.VariousComplexOptions, global::Google.ProtocolBuffers.TestProtos.VariousComplexOptions.Builder>(internal__static_protobuf_unittest_VariousComplexOptions__Descriptor,
                 new string[] { });
+        internal__static_protobuf_unittest_AggregateMessageSet__Descriptor = Descriptor.MessageTypes[15];
+        internal__static_protobuf_unittest_AggregateMessageSet__FieldAccessorTable = 
+            new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.AggregateMessageSet, global::Google.ProtocolBuffers.TestProtos.AggregateMessageSet.Builder>(internal__static_protobuf_unittest_AggregateMessageSet__Descriptor,
+                new string[] { });
+        internal__static_protobuf_unittest_AggregateMessageSetElement__Descriptor = Descriptor.MessageTypes[16];
+        internal__static_protobuf_unittest_AggregateMessageSetElement__FieldAccessorTable = 
+            new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.AggregateMessageSetElement, global::Google.ProtocolBuffers.TestProtos.AggregateMessageSetElement.Builder>(internal__static_protobuf_unittest_AggregateMessageSetElement__Descriptor,
+                new string[] { "S", });
+        global::Google.ProtocolBuffers.TestProtos.AggregateMessageSetElement.MessageSetExtension = pb::GeneratedSingleExtension<global::Google.ProtocolBuffers.TestProtos.AggregateMessageSetElement>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.AggregateMessageSetElement.Descriptor.Extensions[0]);
+        internal__static_protobuf_unittest_Aggregate__Descriptor = Descriptor.MessageTypes[17];
+        internal__static_protobuf_unittest_Aggregate__FieldAccessorTable = 
+            new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.Aggregate, global::Google.ProtocolBuffers.TestProtos.Aggregate.Builder>(internal__static_protobuf_unittest_Aggregate__Descriptor,
+                new string[] { "I", "S", "Sub", "File", "Mset", });
+        global::Google.ProtocolBuffers.TestProtos.Aggregate.Nested = pb::GeneratedSingleExtension<global::Google.ProtocolBuffers.TestProtos.Aggregate>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Aggregate.Descriptor.Extensions[0]);
+        internal__static_protobuf_unittest_AggregateMessage__Descriptor = Descriptor.MessageTypes[18];
+        internal__static_protobuf_unittest_AggregateMessage__FieldAccessorTable = 
+            new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.AggregateMessage, global::Google.ProtocolBuffers.TestProtos.AggregateMessage.Builder>(internal__static_protobuf_unittest_AggregateMessage__Descriptor,
+                new string[] { "Fieldname", });
         global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.FileOpt1 = pb::GeneratedSingleExtension<ulong>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.Descriptor.Extensions[0]);
         global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.MessageOpt1 = pb::GeneratedSingleExtension<int>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.Descriptor.Extensions[1]);
         global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.FieldOpt1 = pb::GeneratedSingleExtension<ulong>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.Descriptor.Extensions[2]);
@@ -370,6 +453,13 @@ namespace Google.ProtocolBuffers.TestProtos {
         global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.ComplexOpt2 = pb::GeneratedSingleExtension<global::Google.ProtocolBuffers.TestProtos.ComplexOptionType2>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.Descriptor.Extensions[30]);
         global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.ComplexOpt3 = pb::GeneratedSingleExtension<global::Google.ProtocolBuffers.TestProtos.ComplexOptionType3>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.Descriptor.Extensions[31]);
         global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.ComplexOpt6 = pb::GeneratedSingleExtension<global::Google.ProtocolBuffers.TestProtos.ComplexOpt6>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.Descriptor.Extensions[32]);
+        global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.Fileopt = pb::GeneratedSingleExtension<global::Google.ProtocolBuffers.TestProtos.Aggregate>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.Descriptor.Extensions[33]);
+        global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.Msgopt = pb::GeneratedSingleExtension<global::Google.ProtocolBuffers.TestProtos.Aggregate>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.Descriptor.Extensions[34]);
+        global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.Fieldopt = pb::GeneratedSingleExtension<global::Google.ProtocolBuffers.TestProtos.Aggregate>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.Descriptor.Extensions[35]);
+        global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.EnumoptRenamed = pb::GeneratedSingleExtension<global::Google.ProtocolBuffers.TestProtos.Aggregate>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.Descriptor.Extensions[36]);
+        global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.Enumvalopt = pb::GeneratedSingleExtension<global::Google.ProtocolBuffers.TestProtos.Aggregate>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.Descriptor.Extensions[37]);
+        global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.Serviceopt = pb::GeneratedSingleExtension<global::Google.ProtocolBuffers.TestProtos.Aggregate>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.Descriptor.Extensions[38]);
+        global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.Methodopt = pb::GeneratedSingleExtension<global::Google.ProtocolBuffers.TestProtos.Aggregate>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.Descriptor.Extensions[39]);
         pb::ExtensionRegistry registry = pb::ExtensionRegistry.CreateInstance();
         RegisterAllExtensions(registry);
         global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.RegisterAllExtensions(registry);
@@ -393,6 +483,12 @@ namespace Google.ProtocolBuffers.TestProtos {
     METHODOPT1_VAL2 = 2,
   }
   
+  [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+  [global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
+  public enum AggregateEnum {
+    VALUE = 1,
+  }
+  
   #endregion
   
   #region Messages
@@ -4976,9 +5072,1330 @@ namespace Google.ProtocolBuffers.TestProtos {
     }
   }
   
-  #endregion
+  [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+  [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+  [global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
+  public sealed partial class AggregateMessageSet : pb::ExtendableMessage<AggregateMessageSet, AggregateMessageSet.Builder> {
+    private AggregateMessageSet() { }
+    private static readonly AggregateMessageSet defaultInstance = new AggregateMessageSet().MakeReadOnly();
+    private static readonly string[] _aggregateMessageSetFieldNames = new string[] {  };
+    private static readonly uint[] _aggregateMessageSetFieldTags = new uint[] {  };
+    public static AggregateMessageSet DefaultInstance {
+      get { return defaultInstance; }
+    }
+    
+    public override AggregateMessageSet DefaultInstanceForType {
+      get { return DefaultInstance; }
+    }
+    
+    protected override AggregateMessageSet ThisMessage {
+      get { return this; }
+    }
+    
+    public static pbd::MessageDescriptor Descriptor {
+      get { return global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.internal__static_protobuf_unittest_AggregateMessageSet__Descriptor; }
+    }
+    
+    protected override pb::FieldAccess.FieldAccessorTable<AggregateMessageSet, AggregateMessageSet.Builder> InternalFieldAccessors {
+      get { return global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.internal__static_protobuf_unittest_AggregateMessageSet__FieldAccessorTable; }
+    }
+    
+    public override bool IsInitialized {
+      get {
+        if (!ExtensionsAreInitialized) return false;
+        return true;
+      }
+    }
+    
+    public override void WriteTo(pb::ICodedOutputStream output) {
+      int size = SerializedSize;
+      string[] field_names = _aggregateMessageSetFieldNames;
+      pb::ExtendableMessage<AggregateMessageSet, AggregateMessageSet.Builder>.ExtensionWriter extensionWriter = CreateExtensionWriter(this);
+      extensionWriter.WriteUntil(536870912, output);
+      UnknownFields.WriteAsMessageSetTo(output);
+    }
+    
+    private int memoizedSerializedSize = -1;
+    public override int SerializedSize {
+      get {
+        int size = memoizedSerializedSize;
+        if (size != -1) return size;
+        
+        size = 0;
+        size += ExtensionsSerializedSize;
+        size += UnknownFields.SerializedSizeAsMessageSet;
+        memoizedSerializedSize = size;
+        return size;
+      }
+    }
+    
+    public static AggregateMessageSet ParseFrom(pb::ByteString data) {
+      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+    }
+    public static AggregateMessageSet ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+    }
+    public static AggregateMessageSet ParseFrom(byte[] data) {
+      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+    }
+    public static AggregateMessageSet ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+    }
+    public static AggregateMessageSet ParseFrom(global::System.IO.Stream input) {
+      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+    }
+    public static AggregateMessageSet ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+    }
+    public static AggregateMessageSet ParseDelimitedFrom(global::System.IO.Stream input) {
+      return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+    }
+    public static AggregateMessageSet ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+      return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+    }
+    public static AggregateMessageSet ParseFrom(pb::ICodedInputStream input) {
+      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+    }
+    public static AggregateMessageSet ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+    }
+    private AggregateMessageSet MakeReadOnly() {
+      return this;
+    }
+    
+    public static Builder CreateBuilder() { return new Builder(); }
+    public override Builder ToBuilder() { return CreateBuilder(this); }
+    public override Builder CreateBuilderForType() { return new Builder(); }
+    public static Builder CreateBuilder(AggregateMessageSet prototype) {
+      return new Builder(prototype);
+    }
+    
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
+    public sealed partial class Builder : pb::ExtendableBuilder<AggregateMessageSet, Builder> {
+      protected override Builder ThisBuilder {
+        get { return this; }
+      }
+      public Builder() {
+        result = DefaultInstance;
+        resultIsReadOnly = true;
+      }
+      internal Builder(AggregateMessageSet cloneFrom) {
+        result = cloneFrom;
+        resultIsReadOnly = true;
+      }
+      
+      private bool resultIsReadOnly;
+      private AggregateMessageSet result;
+      
+      private AggregateMessageSet PrepareBuilder() {
+        if (resultIsReadOnly) {
+          AggregateMessageSet original = result;
+          result = new AggregateMessageSet();
+          resultIsReadOnly = false;
+          MergeFrom(original);
+        }
+        return result;
+      }
+      
+      public override bool IsInitialized {
+        get { return result.IsInitialized; }
+      }
+      
+      protected override AggregateMessageSet MessageBeingBuilt {
+        get { return PrepareBuilder(); }
+      }
+      
+      public override Builder Clear() {
+        result = DefaultInstance;
+        resultIsReadOnly = true;
+        return this;
+      }
+      
+      public override Builder Clone() {
+        if (resultIsReadOnly) {
+          return new Builder(result);
+        } else {
+          return new Builder().MergeFrom(result);
+        }
+      }
+      
+      public override pbd::MessageDescriptor DescriptorForType {
+        get { return global::Google.ProtocolBuffers.TestProtos.AggregateMessageSet.Descriptor; }
+      }
+      
+      public override AggregateMessageSet DefaultInstanceForType {
+        get { return global::Google.ProtocolBuffers.TestProtos.AggregateMessageSet.DefaultInstance; }
+      }
+      
+      public override AggregateMessageSet BuildPartial() {
+        if (resultIsReadOnly) {
+          return result;
+        }
+        resultIsReadOnly = true;
+        return result.MakeReadOnly();
+      }
+      
+      public override Builder MergeFrom(pb::IMessage other) {
+        if (other is AggregateMessageSet) {
+          return MergeFrom((AggregateMessageSet) other);
+        } else {
+          base.MergeFrom(other);
+          return this;
+        }
+      }
+      
+      public override Builder MergeFrom(AggregateMessageSet other) {
+        if (other == global::Google.ProtocolBuffers.TestProtos.AggregateMessageSet.DefaultInstance) return this;
+        PrepareBuilder();
+          this.MergeExtensionFields(other);
+        this.MergeUnknownFields(other.UnknownFields);
+        return this;
+      }
+      
+      public override Builder MergeFrom(pb::ICodedInputStream input) {
+        return MergeFrom(input, pb::ExtensionRegistry.Empty);
+      }
+      
+      public override Builder MergeFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+        PrepareBuilder();
+        pb::UnknownFieldSet.Builder unknownFields = null;
+        uint tag;
+        string field_name;
+        while (input.ReadTag(out tag, out field_name)) {
+          if(tag == 0 && field_name != null) {
+            int field_ordinal = global::System.Array.BinarySearch(_aggregateMessageSetFieldNames, field_name, global::System.StringComparer.Ordinal);
+            if(field_ordinal >= 0)
+              tag = _aggregateMessageSetFieldTags[field_ordinal];
+            else {
+              if (unknownFields == null) {
+                unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+              }
+              ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
+              continue;
+            }
+          }
+          switch (tag) {
+            case 0: {
+              throw pb::InvalidProtocolBufferException.InvalidTag();
+            }
+            default: {
+              if (pb::WireFormat.IsEndGroupTag(tag)) {
+                if (unknownFields != null) {
+                  this.UnknownFields = unknownFields.Build();
+                }
+                return this;
+              }
+              if (unknownFields == null) {
+                unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+              }
+              ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
+              break;
+            }
+          }
+        }
+        
+        if (unknownFields != null) {
+          this.UnknownFields = unknownFields.Build();
+        }
+        return this;
+      }
+      
+    }
+    static AggregateMessageSet() {
+      object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.Descriptor, null);
+    }
+  }
   
-  #region Services
+  [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+  [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+  [global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
+  public sealed partial class AggregateMessageSetElement : pb::GeneratedMessage<AggregateMessageSetElement, AggregateMessageSetElement.Builder> {
+    private AggregateMessageSetElement() { }
+    private static readonly AggregateMessageSetElement defaultInstance = new AggregateMessageSetElement().MakeReadOnly();
+    private static readonly string[] _aggregateMessageSetElementFieldNames = new string[] { "s" };
+    private static readonly uint[] _aggregateMessageSetElementFieldTags = new uint[] { 10 };
+    public static AggregateMessageSetElement DefaultInstance {
+      get { return defaultInstance; }
+    }
+    
+    public override AggregateMessageSetElement DefaultInstanceForType {
+      get { return DefaultInstance; }
+    }
+    
+    protected override AggregateMessageSetElement ThisMessage {
+      get { return this; }
+    }
+    
+    public static pbd::MessageDescriptor Descriptor {
+      get { return global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.internal__static_protobuf_unittest_AggregateMessageSetElement__Descriptor; }
+    }
+    
+    protected override pb::FieldAccess.FieldAccessorTable<AggregateMessageSetElement, AggregateMessageSetElement.Builder> InternalFieldAccessors {
+      get { return global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.internal__static_protobuf_unittest_AggregateMessageSetElement__FieldAccessorTable; }
+    }
+    
+    public const int MessageSetExtensionFieldNumber = 15447542;
+    public static pb::GeneratedExtensionBase<global::Google.ProtocolBuffers.TestProtos.AggregateMessageSetElement> MessageSetExtension;
+    public const int SFieldNumber = 1;
+    private bool hasS;
+    private string s_ = "";
+    public bool HasS {
+      get { return hasS; }
+    }
+    public string S {
+      get { return s_; }
+    }
+    
+    public override bool IsInitialized {
+      get {
+        return true;
+      }
+    }
+    
+    public override void WriteTo(pb::ICodedOutputStream output) {
+      int size = SerializedSize;
+      string[] field_names = _aggregateMessageSetElementFieldNames;
+      if (hasS) {
+        output.WriteString(1, field_names[0], S);
+      }
+      UnknownFields.WriteTo(output);
+    }
+    
+    private int memoizedSerializedSize = -1;
+    public override int SerializedSize {
+      get {
+        int size = memoizedSerializedSize;
+        if (size != -1) return size;
+        
+        size = 0;
+        if (hasS) {
+          size += pb::CodedOutputStream.ComputeStringSize(1, S);
+        }
+        size += UnknownFields.SerializedSize;
+        memoizedSerializedSize = size;
+        return size;
+      }
+    }
+    
+    public static AggregateMessageSetElement ParseFrom(pb::ByteString data) {
+      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+    }
+    public static AggregateMessageSetElement ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+    }
+    public static AggregateMessageSetElement ParseFrom(byte[] data) {
+      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+    }
+    public static AggregateMessageSetElement ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+    }
+    public static AggregateMessageSetElement ParseFrom(global::System.IO.Stream input) {
+      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+    }
+    public static AggregateMessageSetElement ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+    }
+    public static AggregateMessageSetElement ParseDelimitedFrom(global::System.IO.Stream input) {
+      return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+    }
+    public static AggregateMessageSetElement ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+      return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+    }
+    public static AggregateMessageSetElement ParseFrom(pb::ICodedInputStream input) {
+      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+    }
+    public static AggregateMessageSetElement ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+    }
+    private AggregateMessageSetElement MakeReadOnly() {
+      return this;
+    }
+    
+    public static Builder CreateBuilder() { return new Builder(); }
+    public override Builder ToBuilder() { return CreateBuilder(this); }
+    public override Builder CreateBuilderForType() { return new Builder(); }
+    public static Builder CreateBuilder(AggregateMessageSetElement prototype) {
+      return new Builder(prototype);
+    }
+    
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
+    public sealed partial class Builder : pb::GeneratedBuilder<AggregateMessageSetElement, Builder> {
+      protected override Builder ThisBuilder {
+        get { return this; }
+      }
+      public Builder() {
+        result = DefaultInstance;
+        resultIsReadOnly = true;
+      }
+      internal Builder(AggregateMessageSetElement cloneFrom) {
+        result = cloneFrom;
+        resultIsReadOnly = true;
+      }
+      
+      private bool resultIsReadOnly;
+      private AggregateMessageSetElement result;
+      
+      private AggregateMessageSetElement PrepareBuilder() {
+        if (resultIsReadOnly) {
+          AggregateMessageSetElement original = result;
+          result = new AggregateMessageSetElement();
+          resultIsReadOnly = false;
+          MergeFrom(original);
+        }
+        return result;
+      }
+      
+      public override bool IsInitialized {
+        get { return result.IsInitialized; }
+      }
+      
+      protected override AggregateMessageSetElement MessageBeingBuilt {
+        get { return PrepareBuilder(); }
+      }
+      
+      public override Builder Clear() {
+        result = DefaultInstance;
+        resultIsReadOnly = true;
+        return this;
+      }
+      
+      public override Builder Clone() {
+        if (resultIsReadOnly) {
+          return new Builder(result);
+        } else {
+          return new Builder().MergeFrom(result);
+        }
+      }
+      
+      public override pbd::MessageDescriptor DescriptorForType {
+        get { return global::Google.ProtocolBuffers.TestProtos.AggregateMessageSetElement.Descriptor; }
+      }
+      
+      public override AggregateMessageSetElement DefaultInstanceForType {
+        get { return global::Google.ProtocolBuffers.TestProtos.AggregateMessageSetElement.DefaultInstance; }
+      }
+      
+      public override AggregateMessageSetElement BuildPartial() {
+        if (resultIsReadOnly) {
+          return result;
+        }
+        resultIsReadOnly = true;
+        return result.MakeReadOnly();
+      }
+      
+      public override Builder MergeFrom(pb::IMessage other) {
+        if (other is AggregateMessageSetElement) {
+          return MergeFrom((AggregateMessageSetElement) other);
+        } else {
+          base.MergeFrom(other);
+          return this;
+        }
+      }
+      
+      public override Builder MergeFrom(AggregateMessageSetElement other) {
+        if (other == global::Google.ProtocolBuffers.TestProtos.AggregateMessageSetElement.DefaultInstance) return this;
+        PrepareBuilder();
+        if (other.HasS) {
+          S = other.S;
+        }
+        this.MergeUnknownFields(other.UnknownFields);
+        return this;
+      }
+      
+      public override Builder MergeFrom(pb::ICodedInputStream input) {
+        return MergeFrom(input, pb::ExtensionRegistry.Empty);
+      }
+      
+      public override Builder MergeFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+        PrepareBuilder();
+        pb::UnknownFieldSet.Builder unknownFields = null;
+        uint tag;
+        string field_name;
+        while (input.ReadTag(out tag, out field_name)) {
+          if(tag == 0 && field_name != null) {
+            int field_ordinal = global::System.Array.BinarySearch(_aggregateMessageSetElementFieldNames, field_name, global::System.StringComparer.Ordinal);
+            if(field_ordinal >= 0)
+              tag = _aggregateMessageSetElementFieldTags[field_ordinal];
+            else {
+              if (unknownFields == null) {
+                unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+              }
+              ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
+              continue;
+            }
+          }
+          switch (tag) {
+            case 0: {
+              throw pb::InvalidProtocolBufferException.InvalidTag();
+            }
+            default: {
+              if (pb::WireFormat.IsEndGroupTag(tag)) {
+                if (unknownFields != null) {
+                  this.UnknownFields = unknownFields.Build();
+                }
+                return this;
+              }
+              if (unknownFields == null) {
+                unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+              }
+              ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
+              break;
+            }
+            case 10: {
+              result.hasS = input.ReadString(ref result.s_);
+              break;
+            }
+          }
+        }
+        
+        if (unknownFields != null) {
+          this.UnknownFields = unknownFields.Build();
+        }
+        return this;
+      }
+      
+      
+      public bool HasS {
+        get { return result.hasS; }
+      }
+      public string S {
+        get { return result.S; }
+        set { SetS(value); }
+      }
+      public Builder SetS(string value) {
+        pb::ThrowHelper.ThrowIfNull(value, "value");
+        PrepareBuilder();
+        result.hasS = true;
+        result.s_ = value;
+        return this;
+      }
+      public Builder ClearS() {
+        PrepareBuilder();
+        result.hasS = false;
+        result.s_ = "";
+        return this;
+      }
+    }
+    static AggregateMessageSetElement() {
+      object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.Descriptor, null);
+    }
+  }
+  
+  [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+  [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+  [global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
+  public sealed partial class Aggregate : pb::GeneratedMessage<Aggregate, Aggregate.Builder> {
+    private Aggregate() { }
+    private static readonly Aggregate defaultInstance = new Aggregate().MakeReadOnly();
+    private static readonly string[] _aggregateFieldNames = new string[] { "file", "i", "mset", "s", "sub" };
+    private static readonly uint[] _aggregateFieldTags = new uint[] { 34, 8, 42, 18, 26 };
+    public static Aggregate DefaultInstance {
+      get { return defaultInstance; }
+    }
+    
+    public override Aggregate DefaultInstanceForType {
+      get { return DefaultInstance; }
+    }
+    
+    protected override Aggregate ThisMessage {
+      get { return this; }
+    }
+    
+    public static pbd::MessageDescriptor Descriptor {
+      get { return global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.internal__static_protobuf_unittest_Aggregate__Descriptor; }
+    }
+    
+    protected override pb::FieldAccess.FieldAccessorTable<Aggregate, Aggregate.Builder> InternalFieldAccessors {
+      get { return global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.internal__static_protobuf_unittest_Aggregate__FieldAccessorTable; }
+    }
+    
+    public const int NestedFieldNumber = 15476903;
+    public static pb::GeneratedExtensionBase<global::Google.ProtocolBuffers.TestProtos.Aggregate> Nested;
+    public const int IFieldNumber = 1;
+    private bool hasI;
+    private int i_;
+    public bool HasI {
+      get { return hasI; }
+    }
+    public int I {
+      get { return i_; }
+    }
+    
+    public const int SFieldNumber = 2;
+    private bool hasS;
+    private string s_ = "";
+    public bool HasS {
+      get { return hasS; }
+    }
+    public string S {
+      get { return s_; }
+    }
+    
+    public const int SubFieldNumber = 3;
+    private bool hasSub;
+    private global::Google.ProtocolBuffers.TestProtos.Aggregate sub_;
+    public bool HasSub {
+      get { return hasSub; }
+    }
+    public global::Google.ProtocolBuffers.TestProtos.Aggregate Sub {
+      get { return sub_ ?? global::Google.ProtocolBuffers.TestProtos.Aggregate.DefaultInstance; }
+    }
+    
+    public const int FileFieldNumber = 4;
+    private bool hasFile;
+    private global::Google.ProtocolBuffers.DescriptorProtos.FileOptions file_;
+    public bool HasFile {
+      get { return hasFile; }
+    }
+    public global::Google.ProtocolBuffers.DescriptorProtos.FileOptions File {
+      get { return file_ ?? global::Google.ProtocolBuffers.DescriptorProtos.FileOptions.DefaultInstance; }
+    }
+    
+    public const int MsetFieldNumber = 5;
+    private bool hasMset;
+    private global::Google.ProtocolBuffers.TestProtos.AggregateMessageSet mset_;
+    public bool HasMset {
+      get { return hasMset; }
+    }
+    public global::Google.ProtocolBuffers.TestProtos.AggregateMessageSet Mset {
+      get { return mset_ ?? global::Google.ProtocolBuffers.TestProtos.AggregateMessageSet.DefaultInstance; }
+    }
+    
+    public override bool IsInitialized {
+      get {
+        if (HasSub) {
+          if (!Sub.IsInitialized) return false;
+        }
+        if (HasFile) {
+          if (!File.IsInitialized) return false;
+        }
+        return true;
+      }
+    }
+    
+    public override void WriteTo(pb::ICodedOutputStream output) {
+      int size = SerializedSize;
+      string[] field_names = _aggregateFieldNames;
+      if (hasI) {
+        output.WriteInt32(1, field_names[1], I);
+      }
+      if (hasS) {
+        output.WriteString(2, field_names[3], S);
+      }
+      if (hasSub) {
+        output.WriteMessage(3, field_names[4], Sub);
+      }
+      if (hasFile) {
+        output.WriteMessage(4, field_names[0], File);
+      }
+      if (hasMset) {
+        output.WriteMessage(5, field_names[2], Mset);
+      }
+      UnknownFields.WriteTo(output);
+    }
+    
+    private int memoizedSerializedSize = -1;
+    public override int SerializedSize {
+      get {
+        int size = memoizedSerializedSize;
+        if (size != -1) return size;
+        
+        size = 0;
+        if (hasI) {
+          size += pb::CodedOutputStream.ComputeInt32Size(1, I);
+        }
+        if (hasS) {
+          size += pb::CodedOutputStream.ComputeStringSize(2, S);
+        }
+        if (hasSub) {
+          size += pb::CodedOutputStream.ComputeMessageSize(3, Sub);
+        }
+        if (hasFile) {
+          size += pb::CodedOutputStream.ComputeMessageSize(4, File);
+        }
+        if (hasMset) {
+          size += pb::CodedOutputStream.ComputeMessageSize(5, Mset);
+        }
+        size += UnknownFields.SerializedSize;
+        memoizedSerializedSize = size;
+        return size;
+      }
+    }
+    
+    public static Aggregate ParseFrom(pb::ByteString data) {
+      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+    }
+    public static Aggregate ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+    }
+    public static Aggregate ParseFrom(byte[] data) {
+      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+    }
+    public static Aggregate ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+    }
+    public static Aggregate ParseFrom(global::System.IO.Stream input) {
+      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+    }
+    public static Aggregate ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+    }
+    public static Aggregate ParseDelimitedFrom(global::System.IO.Stream input) {
+      return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+    }
+    public static Aggregate ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+      return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+    }
+    public static Aggregate ParseFrom(pb::ICodedInputStream input) {
+      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+    }
+    public static Aggregate ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+    }
+    private Aggregate MakeReadOnly() {
+      return this;
+    }
+    
+    public static Builder CreateBuilder() { return new Builder(); }
+    public override Builder ToBuilder() { return CreateBuilder(this); }
+    public override Builder CreateBuilderForType() { return new Builder(); }
+    public static Builder CreateBuilder(Aggregate prototype) {
+      return new Builder(prototype);
+    }
+    
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
+    public sealed partial class Builder : pb::GeneratedBuilder<Aggregate, Builder> {
+      protected override Builder ThisBuilder {
+        get { return this; }
+      }
+      public Builder() {
+        result = DefaultInstance;
+        resultIsReadOnly = true;
+      }
+      internal Builder(Aggregate cloneFrom) {
+        result = cloneFrom;
+        resultIsReadOnly = true;
+      }
+      
+      private bool resultIsReadOnly;
+      private Aggregate result;
+      
+      private Aggregate PrepareBuilder() {
+        if (resultIsReadOnly) {
+          Aggregate original = result;
+          result = new Aggregate();
+          resultIsReadOnly = false;
+          MergeFrom(original);
+        }
+        return result;
+      }
+      
+      public override bool IsInitialized {
+        get { return result.IsInitialized; }
+      }
+      
+      protected override Aggregate MessageBeingBuilt {
+        get { return PrepareBuilder(); }
+      }
+      
+      public override Builder Clear() {
+        result = DefaultInstance;
+        resultIsReadOnly = true;
+        return this;
+      }
+      
+      public override Builder Clone() {
+        if (resultIsReadOnly) {
+          return new Builder(result);
+        } else {
+          return new Builder().MergeFrom(result);
+        }
+      }
+      
+      public override pbd::MessageDescriptor DescriptorForType {
+        get { return global::Google.ProtocolBuffers.TestProtos.Aggregate.Descriptor; }
+      }
+      
+      public override Aggregate DefaultInstanceForType {
+        get { return global::Google.ProtocolBuffers.TestProtos.Aggregate.DefaultInstance; }
+      }
+      
+      public override Aggregate BuildPartial() {
+        if (resultIsReadOnly) {
+          return result;
+        }
+        resultIsReadOnly = true;
+        return result.MakeReadOnly();
+      }
+      
+      public override Builder MergeFrom(pb::IMessage other) {
+        if (other is Aggregate) {
+          return MergeFrom((Aggregate) other);
+        } else {
+          base.MergeFrom(other);
+          return this;
+        }
+      }
+      
+      public override Builder MergeFrom(Aggregate other) {
+        if (other == global::Google.ProtocolBuffers.TestProtos.Aggregate.DefaultInstance) return this;
+        PrepareBuilder();
+        if (other.HasI) {
+          I = other.I;
+        }
+        if (other.HasS) {
+          S = other.S;
+        }
+        if (other.HasSub) {
+          MergeSub(other.Sub);
+        }
+        if (other.HasFile) {
+          MergeFile(other.File);
+        }
+        if (other.HasMset) {
+          MergeMset(other.Mset);
+        }
+        this.MergeUnknownFields(other.UnknownFields);
+        return this;
+      }
+      
+      public override Builder MergeFrom(pb::ICodedInputStream input) {
+        return MergeFrom(input, pb::ExtensionRegistry.Empty);
+      }
+      
+      public override Builder MergeFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+        PrepareBuilder();
+        pb::UnknownFieldSet.Builder unknownFields = null;
+        uint tag;
+        string field_name;
+        while (input.ReadTag(out tag, out field_name)) {
+          if(tag == 0 && field_name != null) {
+            int field_ordinal = global::System.Array.BinarySearch(_aggregateFieldNames, field_name, global::System.StringComparer.Ordinal);
+            if(field_ordinal >= 0)
+              tag = _aggregateFieldTags[field_ordinal];
+            else {
+              if (unknownFields == null) {
+                unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+              }
+              ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
+              continue;
+            }
+          }
+          switch (tag) {
+            case 0: {
+              throw pb::InvalidProtocolBufferException.InvalidTag();
+            }
+            default: {
+              if (pb::WireFormat.IsEndGroupTag(tag)) {
+                if (unknownFields != null) {
+                  this.UnknownFields = unknownFields.Build();
+                }
+                return this;
+              }
+              if (unknownFields == null) {
+                unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+              }
+              ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
+              break;
+            }
+            case 8: {
+              result.hasI = input.ReadInt32(ref result.i_);
+              break;
+            }
+            case 18: {
+              result.hasS = input.ReadString(ref result.s_);
+              break;
+            }
+            case 26: {
+              global::Google.ProtocolBuffers.TestProtos.Aggregate.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.Aggregate.CreateBuilder();
+              if (result.hasSub) {
+                subBuilder.MergeFrom(Sub);
+              }
+              input.ReadMessage(subBuilder, extensionRegistry);
+              Sub = subBuilder.BuildPartial();
+              break;
+            }
+            case 34: {
+              global::Google.ProtocolBuffers.DescriptorProtos.FileOptions.Builder subBuilder = global::Google.ProtocolBuffers.DescriptorProtos.FileOptions.CreateBuilder();
+              if (result.hasFile) {
+                subBuilder.MergeFrom(File);
+              }
+              input.ReadMessage(subBuilder, extensionRegistry);
+              File = subBuilder.BuildPartial();
+              break;
+            }
+            case 42: {
+              global::Google.ProtocolBuffers.TestProtos.AggregateMessageSet.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.AggregateMessageSet.CreateBuilder();
+              if (result.hasMset) {
+                subBuilder.MergeFrom(Mset);
+              }
+              input.ReadMessage(subBuilder, extensionRegistry);
+              Mset = subBuilder.BuildPartial();
+              break;
+            }
+          }
+        }
+        
+        if (unknownFields != null) {
+          this.UnknownFields = unknownFields.Build();
+        }
+        return this;
+      }
+      
+      
+      public bool HasI {
+        get { return result.hasI; }
+      }
+      public int I {
+        get { return result.I; }
+        set { SetI(value); }
+      }
+      public Builder SetI(int value) {
+        PrepareBuilder();
+        result.hasI = true;
+        result.i_ = value;
+        return this;
+      }
+      public Builder ClearI() {
+        PrepareBuilder();
+        result.hasI = false;
+        result.i_ = 0;
+        return this;
+      }
+      
+      public bool HasS {
+        get { return result.hasS; }
+      }
+      public string S {
+        get { return result.S; }
+        set { SetS(value); }
+      }
+      public Builder SetS(string value) {
+        pb::ThrowHelper.ThrowIfNull(value, "value");
+        PrepareBuilder();
+        result.hasS = true;
+        result.s_ = value;
+        return this;
+      }
+      public Builder ClearS() {
+        PrepareBuilder();
+        result.hasS = false;
+        result.s_ = "";
+        return this;
+      }
+      
+      public bool HasSub {
+       get { return result.hasSub; }
+      }
+      public global::Google.ProtocolBuffers.TestProtos.Aggregate Sub {
+        get { return result.Sub; }
+        set { SetSub(value); }
+      }
+      public Builder SetSub(global::Google.ProtocolBuffers.TestProtos.Aggregate value) {
+        pb::ThrowHelper.ThrowIfNull(value, "value");
+        PrepareBuilder();
+        result.hasSub = true;
+        result.sub_ = value;
+        return this;
+      }
+      public Builder SetSub(global::Google.ProtocolBuffers.TestProtos.Aggregate.Builder builderForValue) {
+        pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+        PrepareBuilder();
+        result.hasSub = true;
+        result.sub_ = builderForValue.Build();
+        return this;
+      }
+      public Builder MergeSub(global::Google.ProtocolBuffers.TestProtos.Aggregate value) {
+        pb::ThrowHelper.ThrowIfNull(value, "value");
+        PrepareBuilder();
+        if (result.hasSub &&
+            result.sub_ != global::Google.ProtocolBuffers.TestProtos.Aggregate.DefaultInstance) {
+            result.sub_ = global::Google.ProtocolBuffers.TestProtos.Aggregate.CreateBuilder(result.sub_).MergeFrom(value).BuildPartial();
+        } else {
+          result.sub_ = value;
+        }
+        result.hasSub = true;
+        return this;
+      }
+      public Builder ClearSub() {
+        PrepareBuilder();
+        result.hasSub = false;
+        result.sub_ = null;
+        return this;
+      }
+      
+      public bool HasFile {
+       get { return result.hasFile; }
+      }
+      public global::Google.ProtocolBuffers.DescriptorProtos.FileOptions File {
+        get { return result.File; }
+        set { SetFile(value); }
+      }
+      public Builder SetFile(global::Google.ProtocolBuffers.DescriptorProtos.FileOptions value) {
+        pb::ThrowHelper.ThrowIfNull(value, "value");
+        PrepareBuilder();
+        result.hasFile = true;
+        result.file_ = value;
+        return this;
+      }
+      public Builder SetFile(global::Google.ProtocolBuffers.DescriptorProtos.FileOptions.Builder builderForValue) {
+        pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+        PrepareBuilder();
+        result.hasFile = true;
+        result.file_ = builderForValue.Build();
+        return this;
+      }
+      public Builder MergeFile(global::Google.ProtocolBuffers.DescriptorProtos.FileOptions value) {
+        pb::ThrowHelper.ThrowIfNull(value, "value");
+        PrepareBuilder();
+        if (result.hasFile &&
+            result.file_ != global::Google.ProtocolBuffers.DescriptorProtos.FileOptions.DefaultInstance) {
+            result.file_ = global::Google.ProtocolBuffers.DescriptorProtos.FileOptions.CreateBuilder(result.file_).MergeFrom(value).BuildPartial();
+        } else {
+          result.file_ = value;
+        }
+        result.hasFile = true;
+        return this;
+      }
+      public Builder ClearFile() {
+        PrepareBuilder();
+        result.hasFile = false;
+        result.file_ = null;
+        return this;
+      }
+      
+      public bool HasMset {
+       get { return result.hasMset; }
+      }
+      public global::Google.ProtocolBuffers.TestProtos.AggregateMessageSet Mset {
+        get { return result.Mset; }
+        set { SetMset(value); }
+      }
+      public Builder SetMset(global::Google.ProtocolBuffers.TestProtos.AggregateMessageSet value) {
+        pb::ThrowHelper.ThrowIfNull(value, "value");
+        PrepareBuilder();
+        result.hasMset = true;
+        result.mset_ = value;
+        return this;
+      }
+      public Builder SetMset(global::Google.ProtocolBuffers.TestProtos.AggregateMessageSet.Builder builderForValue) {
+        pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+        PrepareBuilder();
+        result.hasMset = true;
+        result.mset_ = builderForValue.Build();
+        return this;
+      }
+      public Builder MergeMset(global::Google.ProtocolBuffers.TestProtos.AggregateMessageSet value) {
+        pb::ThrowHelper.ThrowIfNull(value, "value");
+        PrepareBuilder();
+        if (result.hasMset &&
+            result.mset_ != global::Google.ProtocolBuffers.TestProtos.AggregateMessageSet.DefaultInstance) {
+            result.mset_ = global::Google.ProtocolBuffers.TestProtos.AggregateMessageSet.CreateBuilder(result.mset_).MergeFrom(value).BuildPartial();
+        } else {
+          result.mset_ = value;
+        }
+        result.hasMset = true;
+        return this;
+      }
+      public Builder ClearMset() {
+        PrepareBuilder();
+        result.hasMset = false;
+        result.mset_ = null;
+        return this;
+      }
+    }
+    static Aggregate() {
+      object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.Descriptor, null);
+    }
+  }
+  
+  [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+  [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+  [global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
+  public sealed partial class AggregateMessage : pb::GeneratedMessage<AggregateMessage, AggregateMessage.Builder> {
+    private AggregateMessage() { }
+    private static readonly AggregateMessage defaultInstance = new AggregateMessage().MakeReadOnly();
+    private static readonly string[] _aggregateMessageFieldNames = new string[] { "fieldname" };
+    private static readonly uint[] _aggregateMessageFieldTags = new uint[] { 8 };
+    public static AggregateMessage DefaultInstance {
+      get { return defaultInstance; }
+    }
+    
+    public override AggregateMessage DefaultInstanceForType {
+      get { return DefaultInstance; }
+    }
+    
+    protected override AggregateMessage ThisMessage {
+      get { return this; }
+    }
+    
+    public static pbd::MessageDescriptor Descriptor {
+      get { return global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.internal__static_protobuf_unittest_AggregateMessage__Descriptor; }
+    }
+    
+    protected override pb::FieldAccess.FieldAccessorTable<AggregateMessage, AggregateMessage.Builder> InternalFieldAccessors {
+      get { return global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.internal__static_protobuf_unittest_AggregateMessage__FieldAccessorTable; }
+    }
+    
+    public const int FieldnameFieldNumber = 1;
+    private bool hasFieldname;
+    private int fieldname_;
+    public bool HasFieldname {
+      get { return hasFieldname; }
+    }
+    public int Fieldname {
+      get { return fieldname_; }
+    }
+    
+    public override bool IsInitialized {
+      get {
+        return true;
+      }
+    }
+    
+    public override void WriteTo(pb::ICodedOutputStream output) {
+      int size = SerializedSize;
+      string[] field_names = _aggregateMessageFieldNames;
+      if (hasFieldname) {
+        output.WriteInt32(1, field_names[0], Fieldname);
+      }
+      UnknownFields.WriteTo(output);
+    }
+    
+    private int memoizedSerializedSize = -1;
+    public override int SerializedSize {
+      get {
+        int size = memoizedSerializedSize;
+        if (size != -1) return size;
+        
+        size = 0;
+        if (hasFieldname) {
+          size += pb::CodedOutputStream.ComputeInt32Size(1, Fieldname);
+        }
+        size += UnknownFields.SerializedSize;
+        memoizedSerializedSize = size;
+        return size;
+      }
+    }
+    
+    public static AggregateMessage ParseFrom(pb::ByteString data) {
+      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+    }
+    public static AggregateMessage ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+    }
+    public static AggregateMessage ParseFrom(byte[] data) {
+      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+    }
+    public static AggregateMessage ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+    }
+    public static AggregateMessage ParseFrom(global::System.IO.Stream input) {
+      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+    }
+    public static AggregateMessage ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+    }
+    public static AggregateMessage ParseDelimitedFrom(global::System.IO.Stream input) {
+      return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+    }
+    public static AggregateMessage ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+      return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+    }
+    public static AggregateMessage ParseFrom(pb::ICodedInputStream input) {
+      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+    }
+    public static AggregateMessage ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+    }
+    private AggregateMessage MakeReadOnly() {
+      return this;
+    }
+    
+    public static Builder CreateBuilder() { return new Builder(); }
+    public override Builder ToBuilder() { return CreateBuilder(this); }
+    public override Builder CreateBuilderForType() { return new Builder(); }
+    public static Builder CreateBuilder(AggregateMessage prototype) {
+      return new Builder(prototype);
+    }
+    
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
+    public sealed partial class Builder : pb::GeneratedBuilder<AggregateMessage, Builder> {
+      protected override Builder ThisBuilder {
+        get { return this; }
+      }
+      public Builder() {
+        result = DefaultInstance;
+        resultIsReadOnly = true;
+      }
+      internal Builder(AggregateMessage cloneFrom) {
+        result = cloneFrom;
+        resultIsReadOnly = true;
+      }
+      
+      private bool resultIsReadOnly;
+      private AggregateMessage result;
+      
+      private AggregateMessage PrepareBuilder() {
+        if (resultIsReadOnly) {
+          AggregateMessage original = result;
+          result = new AggregateMessage();
+          resultIsReadOnly = false;
+          MergeFrom(original);
+        }
+        return result;
+      }
+      
+      public override bool IsInitialized {
+        get { return result.IsInitialized; }
+      }
+      
+      protected override AggregateMessage MessageBeingBuilt {
+        get { return PrepareBuilder(); }
+      }
+      
+      public override Builder Clear() {
+        result = DefaultInstance;
+        resultIsReadOnly = true;
+        return this;
+      }
+      
+      public override Builder Clone() {
+        if (resultIsReadOnly) {
+          return new Builder(result);
+        } else {
+          return new Builder().MergeFrom(result);
+        }
+      }
+      
+      public override pbd::MessageDescriptor DescriptorForType {
+        get { return global::Google.ProtocolBuffers.TestProtos.AggregateMessage.Descriptor; }
+      }
+      
+      public override AggregateMessage DefaultInstanceForType {
+        get { return global::Google.ProtocolBuffers.TestProtos.AggregateMessage.DefaultInstance; }
+      }
+      
+      public override AggregateMessage BuildPartial() {
+        if (resultIsReadOnly) {
+          return result;
+        }
+        resultIsReadOnly = true;
+        return result.MakeReadOnly();
+      }
+      
+      public override Builder MergeFrom(pb::IMessage other) {
+        if (other is AggregateMessage) {
+          return MergeFrom((AggregateMessage) other);
+        } else {
+          base.MergeFrom(other);
+          return this;
+        }
+      }
+      
+      public override Builder MergeFrom(AggregateMessage other) {
+        if (other == global::Google.ProtocolBuffers.TestProtos.AggregateMessage.DefaultInstance) return this;
+        PrepareBuilder();
+        if (other.HasFieldname) {
+          Fieldname = other.Fieldname;
+        }
+        this.MergeUnknownFields(other.UnknownFields);
+        return this;
+      }
+      
+      public override Builder MergeFrom(pb::ICodedInputStream input) {
+        return MergeFrom(input, pb::ExtensionRegistry.Empty);
+      }
+      
+      public override Builder MergeFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+        PrepareBuilder();
+        pb::UnknownFieldSet.Builder unknownFields = null;
+        uint tag;
+        string field_name;
+        while (input.ReadTag(out tag, out field_name)) {
+          if(tag == 0 && field_name != null) {
+            int field_ordinal = global::System.Array.BinarySearch(_aggregateMessageFieldNames, field_name, global::System.StringComparer.Ordinal);
+            if(field_ordinal >= 0)
+              tag = _aggregateMessageFieldTags[field_ordinal];
+            else {
+              if (unknownFields == null) {
+                unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+              }
+              ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
+              continue;
+            }
+          }
+          switch (tag) {
+            case 0: {
+              throw pb::InvalidProtocolBufferException.InvalidTag();
+            }
+            default: {
+              if (pb::WireFormat.IsEndGroupTag(tag)) {
+                if (unknownFields != null) {
+                  this.UnknownFields = unknownFields.Build();
+                }
+                return this;
+              }
+              if (unknownFields == null) {
+                unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+              }
+              ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
+              break;
+            }
+            case 8: {
+              result.hasFieldname = input.ReadInt32(ref result.fieldname_);
+              break;
+            }
+          }
+        }
+        
+        if (unknownFields != null) {
+          this.UnknownFields = unknownFields.Build();
+        }
+        return this;
+      }
+      
+      
+      public bool HasFieldname {
+        get { return result.hasFieldname; }
+      }
+      public int Fieldname {
+        get { return result.Fieldname; }
+        set { SetFieldname(value); }
+      }
+      public Builder SetFieldname(int value) {
+        PrepareBuilder();
+        result.hasFieldname = true;
+        result.fieldname_ = value;
+        return this;
+      }
+      public Builder ClearFieldname() {
+        PrepareBuilder();
+        result.hasFieldname = false;
+        result.fieldname_ = 0;
+        return this;
+      }
+    }
+    static AggregateMessage() {
+      object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.Descriptor, null);
+    }
+  }
+  
+  #endregion
+  
+  #region Services
+  /*
+  * Service generation is now disabled by default, use the following option to enable:
+  * option (google.protobuf.csharp_file_options).service_generator_type = GENERIC;
+  */
   /*
   * Service generation is now disabled by default, use the following option to enable:
   * option (google.protobuf.csharp_file_options).service_generator_type = GENERIC;

+ 403 - 0
src/ProtocolBuffers.Test/TestProtos/UnitTestExtrasProtoFile.cs

@@ -0,0 +1,403 @@
+// Generated by ProtoGen, Version=2.3.0.277, Culture=neutral, PublicKeyToken=17b3b1f090c3ea48.  DO NOT EDIT!
+#pragma warning disable 1591, 0612
+#region Designer generated code
+
+using pb = global::Google.ProtocolBuffers;
+using pbc = global::Google.ProtocolBuffers.Collections;
+using pbd = global::Google.ProtocolBuffers.Descriptors;
+using scg = global::System.Collections.Generic;
+namespace Google.ProtocolBuffers.TestProtos {
+  
+  [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+  [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+  [global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
+  public static partial class UnitTestExtrasProtoFile {
+  
+    #region Extension registration
+    public static void RegisterAllExtensions(pb::ExtensionRegistry registry) {
+      registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasProtoFile.UnpackedInt32Extension);
+      registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasProtoFile.UnpackedInt64Extension);
+      registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasProtoFile.UnpackedUint32Extension);
+      registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasProtoFile.UnpackedUint64Extension);
+      registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasProtoFile.UnpackedSint32Extension);
+      registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasProtoFile.UnpackedSint64Extension);
+      registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasProtoFile.UnpackedFixed32Extension);
+      registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasProtoFile.UnpackedFixed64Extension);
+      registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasProtoFile.UnpackedSfixed32Extension);
+      registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasProtoFile.UnpackedSfixed64Extension);
+      registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasProtoFile.UnpackedFloatExtension);
+      registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasProtoFile.UnpackedDoubleExtension);
+      registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasProtoFile.UnpackedBoolExtension);
+      registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasProtoFile.UnpackedEnumExtension);
+    }
+    #endregion
+    #region Extensions
+    public const int UnpackedInt32ExtensionFieldNumber = 90;
+    public static pb::GeneratedExtensionBase<scg::IList<int>> UnpackedInt32Extension;
+    public const int UnpackedInt64ExtensionFieldNumber = 91;
+    public static pb::GeneratedExtensionBase<scg::IList<long>> UnpackedInt64Extension;
+    public const int UnpackedUint32ExtensionFieldNumber = 92;
+    [global::System.CLSCompliant(false)]
+    public static pb::GeneratedExtensionBase<scg::IList<uint>> UnpackedUint32Extension;
+    public const int UnpackedUint64ExtensionFieldNumber = 93;
+    [global::System.CLSCompliant(false)]
+    public static pb::GeneratedExtensionBase<scg::IList<ulong>> UnpackedUint64Extension;
+    public const int UnpackedSint32ExtensionFieldNumber = 94;
+    public static pb::GeneratedExtensionBase<scg::IList<int>> UnpackedSint32Extension;
+    public const int UnpackedSint64ExtensionFieldNumber = 95;
+    public static pb::GeneratedExtensionBase<scg::IList<long>> UnpackedSint64Extension;
+    public const int UnpackedFixed32ExtensionFieldNumber = 96;
+    [global::System.CLSCompliant(false)]
+    public static pb::GeneratedExtensionBase<scg::IList<uint>> UnpackedFixed32Extension;
+    public const int UnpackedFixed64ExtensionFieldNumber = 97;
+    [global::System.CLSCompliant(false)]
+    public static pb::GeneratedExtensionBase<scg::IList<ulong>> UnpackedFixed64Extension;
+    public const int UnpackedSfixed32ExtensionFieldNumber = 98;
+    public static pb::GeneratedExtensionBase<scg::IList<int>> UnpackedSfixed32Extension;
+    public const int UnpackedSfixed64ExtensionFieldNumber = 99;
+    public static pb::GeneratedExtensionBase<scg::IList<long>> UnpackedSfixed64Extension;
+    public const int UnpackedFloatExtensionFieldNumber = 100;
+    public static pb::GeneratedExtensionBase<scg::IList<float>> UnpackedFloatExtension;
+    public const int UnpackedDoubleExtensionFieldNumber = 101;
+    public static pb::GeneratedExtensionBase<scg::IList<double>> UnpackedDoubleExtension;
+    public const int UnpackedBoolExtensionFieldNumber = 102;
+    public static pb::GeneratedExtensionBase<scg::IList<bool>> UnpackedBoolExtension;
+    public const int UnpackedEnumExtensionFieldNumber = 103;
+    public static pb::GeneratedExtensionBase<scg::IList<global::Google.ProtocolBuffers.TestProtos.UnpackedExtensionsForeignEnum>> UnpackedEnumExtension;
+    #endregion
+    
+    #region Static variables
+    internal static pbd::MessageDescriptor internal__static_protobuf_unittest_extra_TestUnpackedExtensions__Descriptor;
+    internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestUnpackedExtensions, global::Google.ProtocolBuffers.TestProtos.TestUnpackedExtensions.Builder> internal__static_protobuf_unittest_extra_TestUnpackedExtensions__FieldAccessorTable;
+    #endregion
+    #region Descriptor
+    public static pbd::FileDescriptor Descriptor {
+      get { return descriptor; }
+    }
+    private static pbd::FileDescriptor descriptor;
+    
+    static UnitTestExtrasProtoFile() {
+      byte[] descriptorData = global::System.Convert.FromBase64String(
+          "ChxleHRlc3QvdW5pdHRlc3RfZXh0cmFzLnByb3RvEhdwcm90b2J1Zl91bml0" + 
+          "dGVzdF9leHRyYRokZ29vZ2xlL3Byb3RvYnVmL2NzaGFycF9vcHRpb25zLnBy" + 
+          "b3RvIiIKFlRlc3RVbnBhY2tlZEV4dGVuc2lvbnMqCAgBEICAgIACKlIKHVVu" + 
+          "cGFja2VkRXh0ZW5zaW9uc0ZvcmVpZ25FbnVtEg8KC0ZPUkVJR05fRk9PEAQS" + 
+          "DwoLRk9SRUlHTl9CQVIQBRIPCgtGT1JFSUdOX0JBWhAGOlEKGHVucGFja2Vk" + 
+          "X2ludDMyX2V4dGVuc2lvbhIvLnByb3RvYnVmX3VuaXR0ZXN0X2V4dHJhLlRl" + 
+          "c3RVbnBhY2tlZEV4dGVuc2lvbnMYWiADKAU6UQoYdW5wYWNrZWRfaW50NjRf" + 
+          "ZXh0ZW5zaW9uEi8ucHJvdG9idWZfdW5pdHRlc3RfZXh0cmEuVGVzdFVucGFj" + 
+          "a2VkRXh0ZW5zaW9ucxhbIAMoAzpSChl1bnBhY2tlZF91aW50MzJfZXh0ZW5z" + 
+          "aW9uEi8ucHJvdG9idWZfdW5pdHRlc3RfZXh0cmEuVGVzdFVucGFja2VkRXh0" + 
+          "ZW5zaW9ucxhcIAMoDTpSChl1bnBhY2tlZF91aW50NjRfZXh0ZW5zaW9uEi8u" + 
+          "cHJvdG9idWZfdW5pdHRlc3RfZXh0cmEuVGVzdFVucGFja2VkRXh0ZW5zaW9u" + 
+          "cxhdIAMoBDpSChl1bnBhY2tlZF9zaW50MzJfZXh0ZW5zaW9uEi8ucHJvdG9i" + 
+          "dWZfdW5pdHRlc3RfZXh0cmEuVGVzdFVucGFja2VkRXh0ZW5zaW9ucxheIAMo" + 
+          "ETpSChl1bnBhY2tlZF9zaW50NjRfZXh0ZW5zaW9uEi8ucHJvdG9idWZfdW5p" + 
+          "dHRlc3RfZXh0cmEuVGVzdFVucGFja2VkRXh0ZW5zaW9ucxhfIAMoEjpTChp1" + 
+          "bnBhY2tlZF9maXhlZDMyX2V4dGVuc2lvbhIvLnByb3RvYnVmX3VuaXR0ZXN0" + 
+          "X2V4dHJhLlRlc3RVbnBhY2tlZEV4dGVuc2lvbnMYYCADKAc6UwoadW5wYWNr" + 
+          "ZWRfZml4ZWQ2NF9leHRlbnNpb24SLy5wcm90b2J1Zl91bml0dGVzdF9leHRy" + 
+          "YS5UZXN0VW5wYWNrZWRFeHRlbnNpb25zGGEgAygGOlQKG3VucGFja2VkX3Nm" + 
+          "aXhlZDMyX2V4dGVuc2lvbhIvLnByb3RvYnVmX3VuaXR0ZXN0X2V4dHJhLlRl" + 
+          "c3RVbnBhY2tlZEV4dGVuc2lvbnMYYiADKA86VAobdW5wYWNrZWRfc2ZpeGVk" + 
+          "NjRfZXh0ZW5zaW9uEi8ucHJvdG9idWZfdW5pdHRlc3RfZXh0cmEuVGVzdFVu" + 
+          "cGFja2VkRXh0ZW5zaW9ucxhjIAMoEDpRChh1bnBhY2tlZF9mbG9hdF9leHRl" + 
+          "bnNpb24SLy5wcm90b2J1Zl91bml0dGVzdF9leHRyYS5UZXN0VW5wYWNrZWRF" + 
+          "eHRlbnNpb25zGGQgAygCOlIKGXVucGFja2VkX2RvdWJsZV9leHRlbnNpb24S" + 
+          "Ly5wcm90b2J1Zl91bml0dGVzdF9leHRyYS5UZXN0VW5wYWNrZWRFeHRlbnNp" + 
+          "b25zGGUgAygBOlAKF3VucGFja2VkX2Jvb2xfZXh0ZW5zaW9uEi8ucHJvdG9i" + 
+          "dWZfdW5pdHRlc3RfZXh0cmEuVGVzdFVucGFja2VkRXh0ZW5zaW9ucxhmIAMo" + 
+          "CDqIAQoXdW5wYWNrZWRfZW51bV9leHRlbnNpb24SLy5wcm90b2J1Zl91bml0" + 
+          "dGVzdF9leHRyYS5UZXN0VW5wYWNrZWRFeHRlbnNpb25zGGcgAygOMjYucHJv" + 
+          "dG9idWZfdW5pdHRlc3RfZXh0cmEuVW5wYWNrZWRFeHRlbnNpb25zRm9yZWln" + 
+          "bkVudW1CVgoTY29tLmdvb2dsZS5wcm90b2J1ZsI+PgohR29vZ2xlLlByb3Rv" + 
+          "Y29sQnVmZmVycy5UZXN0UHJvdG9zEhdVbml0VGVzdEV4dHJhc1Byb3RvRmls" + 
+          "ZUgB");
+      pbd::FileDescriptor.InternalDescriptorAssigner assigner = delegate(pbd::FileDescriptor root) {
+        descriptor = root;
+        internal__static_protobuf_unittest_extra_TestUnpackedExtensions__Descriptor = Descriptor.MessageTypes[0];
+        internal__static_protobuf_unittest_extra_TestUnpackedExtensions__FieldAccessorTable = 
+            new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestUnpackedExtensions, global::Google.ProtocolBuffers.TestProtos.TestUnpackedExtensions.Builder>(internal__static_protobuf_unittest_extra_TestUnpackedExtensions__Descriptor,
+                new string[] { });
+        global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasProtoFile.UnpackedInt32Extension = pb::GeneratedRepeatExtension<int>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasProtoFile.Descriptor.Extensions[0]);
+        global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasProtoFile.UnpackedInt64Extension = pb::GeneratedRepeatExtension<long>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasProtoFile.Descriptor.Extensions[1]);
+        global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasProtoFile.UnpackedUint32Extension = pb::GeneratedRepeatExtension<uint>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasProtoFile.Descriptor.Extensions[2]);
+        global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasProtoFile.UnpackedUint64Extension = pb::GeneratedRepeatExtension<ulong>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasProtoFile.Descriptor.Extensions[3]);
+        global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasProtoFile.UnpackedSint32Extension = pb::GeneratedRepeatExtension<int>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasProtoFile.Descriptor.Extensions[4]);
+        global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasProtoFile.UnpackedSint64Extension = pb::GeneratedRepeatExtension<long>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasProtoFile.Descriptor.Extensions[5]);
+        global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasProtoFile.UnpackedFixed32Extension = pb::GeneratedRepeatExtension<uint>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasProtoFile.Descriptor.Extensions[6]);
+        global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasProtoFile.UnpackedFixed64Extension = pb::GeneratedRepeatExtension<ulong>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasProtoFile.Descriptor.Extensions[7]);
+        global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasProtoFile.UnpackedSfixed32Extension = pb::GeneratedRepeatExtension<int>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasProtoFile.Descriptor.Extensions[8]);
+        global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasProtoFile.UnpackedSfixed64Extension = pb::GeneratedRepeatExtension<long>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasProtoFile.Descriptor.Extensions[9]);
+        global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasProtoFile.UnpackedFloatExtension = pb::GeneratedRepeatExtension<float>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasProtoFile.Descriptor.Extensions[10]);
+        global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasProtoFile.UnpackedDoubleExtension = pb::GeneratedRepeatExtension<double>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasProtoFile.Descriptor.Extensions[11]);
+        global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasProtoFile.UnpackedBoolExtension = pb::GeneratedRepeatExtension<bool>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasProtoFile.Descriptor.Extensions[12]);
+        global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasProtoFile.UnpackedEnumExtension = pb::GeneratedRepeatExtension<global::Google.ProtocolBuffers.TestProtos.UnpackedExtensionsForeignEnum>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasProtoFile.Descriptor.Extensions[13]);
+        pb::ExtensionRegistry registry = pb::ExtensionRegistry.CreateInstance();
+        RegisterAllExtensions(registry);
+        global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.RegisterAllExtensions(registry);
+        return registry;
+      };
+      pbd::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData,
+          new pbd::FileDescriptor[] {
+          global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.Descriptor, 
+          }, assigner);
+    }
+    #endregion
+    
+  }
+  #region Enums
+  [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+  [global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
+  public enum UnpackedExtensionsForeignEnum {
+    FOREIGN_FOO = 4,
+    FOREIGN_BAR = 5,
+    FOREIGN_BAZ = 6,
+  }
+  
+  #endregion
+  
+  #region Messages
+  [global::System.SerializableAttribute()]
+  [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+  [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+  [global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
+  public sealed partial class TestUnpackedExtensions : pb::ExtendableMessage<TestUnpackedExtensions, TestUnpackedExtensions.Builder> {
+    private TestUnpackedExtensions() { }
+    private static readonly TestUnpackedExtensions defaultInstance = new TestUnpackedExtensions().MakeReadOnly();
+    private static readonly string[] _testUnpackedExtensionsFieldNames = new string[] {  };
+    private static readonly uint[] _testUnpackedExtensionsFieldTags = new uint[] {  };
+    public static TestUnpackedExtensions DefaultInstance {
+      get { return defaultInstance; }
+    }
+    
+    public override TestUnpackedExtensions DefaultInstanceForType {
+      get { return DefaultInstance; }
+    }
+    
+    protected override TestUnpackedExtensions ThisMessage {
+      get { return this; }
+    }
+    
+    public static pbd::MessageDescriptor Descriptor {
+      get { return global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasProtoFile.internal__static_protobuf_unittest_extra_TestUnpackedExtensions__Descriptor; }
+    }
+    
+    protected override pb::FieldAccess.FieldAccessorTable<TestUnpackedExtensions, TestUnpackedExtensions.Builder> InternalFieldAccessors {
+      get { return global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasProtoFile.internal__static_protobuf_unittest_extra_TestUnpackedExtensions__FieldAccessorTable; }
+    }
+    
+    public override bool IsInitialized {
+      get {
+        if (!ExtensionsAreInitialized) return false;
+        return true;
+      }
+    }
+    
+    public override void WriteTo(pb::ICodedOutputStream output) {
+      int size = SerializedSize;
+      string[] field_names = _testUnpackedExtensionsFieldNames;
+      pb::ExtendableMessage<TestUnpackedExtensions, TestUnpackedExtensions.Builder>.ExtensionWriter extensionWriter = CreateExtensionWriter(this);
+      extensionWriter.WriteUntil(536870912, output);
+      UnknownFields.WriteTo(output);
+    }
+    
+    private int memoizedSerializedSize = -1;
+    public override int SerializedSize {
+      get {
+        int size = memoizedSerializedSize;
+        if (size != -1) return size;
+        
+        size = 0;
+        size += ExtensionsSerializedSize;
+        size += UnknownFields.SerializedSize;
+        memoizedSerializedSize = size;
+        return size;
+      }
+    }
+    
+    public static TestUnpackedExtensions ParseFrom(pb::ByteString data) {
+      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+    }
+    public static TestUnpackedExtensions ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+    }
+    public static TestUnpackedExtensions ParseFrom(byte[] data) {
+      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+    }
+    public static TestUnpackedExtensions ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+    }
+    public static TestUnpackedExtensions ParseFrom(global::System.IO.Stream input) {
+      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+    }
+    public static TestUnpackedExtensions ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+    }
+    public static TestUnpackedExtensions ParseDelimitedFrom(global::System.IO.Stream input) {
+      return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+    }
+    public static TestUnpackedExtensions ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+      return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+    }
+    public static TestUnpackedExtensions ParseFrom(pb::ICodedInputStream input) {
+      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+    }
+    public static TestUnpackedExtensions ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+    }
+    private TestUnpackedExtensions MakeReadOnly() {
+      return this;
+    }
+    
+    public static Builder CreateBuilder() { return new Builder(); }
+    public override Builder ToBuilder() { return CreateBuilder(this); }
+    public override Builder CreateBuilderForType() { return new Builder(); }
+    public static Builder CreateBuilder(TestUnpackedExtensions prototype) {
+      return new Builder(prototype);
+    }
+    
+    [global::System.SerializableAttribute()]
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
+    public sealed partial class Builder : pb::ExtendableBuilder<TestUnpackedExtensions, Builder> {
+      protected override Builder ThisBuilder {
+        get { return this; }
+      }
+      public Builder() {
+        result = DefaultInstance;
+        resultIsReadOnly = true;
+      }
+      internal Builder(TestUnpackedExtensions cloneFrom) {
+        result = cloneFrom;
+        resultIsReadOnly = true;
+      }
+      
+      private bool resultIsReadOnly;
+      private TestUnpackedExtensions result;
+      
+      private TestUnpackedExtensions PrepareBuilder() {
+        if (resultIsReadOnly) {
+          TestUnpackedExtensions original = result;
+          result = new TestUnpackedExtensions();
+          resultIsReadOnly = false;
+          MergeFrom(original);
+        }
+        return result;
+      }
+      
+      public override bool IsInitialized {
+        get { return result.IsInitialized; }
+      }
+      
+      protected override TestUnpackedExtensions MessageBeingBuilt {
+        get { return PrepareBuilder(); }
+      }
+      
+      public override Builder Clear() {
+        result = DefaultInstance;
+        resultIsReadOnly = true;
+        return this;
+      }
+      
+      public override Builder Clone() {
+        if (resultIsReadOnly) {
+          return new Builder(result);
+        } else {
+          return new Builder().MergeFrom(result);
+        }
+      }
+      
+      public override pbd::MessageDescriptor DescriptorForType {
+        get { return global::Google.ProtocolBuffers.TestProtos.TestUnpackedExtensions.Descriptor; }
+      }
+      
+      public override TestUnpackedExtensions DefaultInstanceForType {
+        get { return global::Google.ProtocolBuffers.TestProtos.TestUnpackedExtensions.DefaultInstance; }
+      }
+      
+      public override TestUnpackedExtensions BuildPartial() {
+        if (resultIsReadOnly) {
+          return result;
+        }
+        resultIsReadOnly = true;
+        return result.MakeReadOnly();
+      }
+      
+      public override Builder MergeFrom(pb::IMessage other) {
+        if (other is TestUnpackedExtensions) {
+          return MergeFrom((TestUnpackedExtensions) other);
+        } else {
+          base.MergeFrom(other);
+          return this;
+        }
+      }
+      
+      public override Builder MergeFrom(TestUnpackedExtensions other) {
+        if (other == global::Google.ProtocolBuffers.TestProtos.TestUnpackedExtensions.DefaultInstance) return this;
+        PrepareBuilder();
+          this.MergeExtensionFields(other);
+        this.MergeUnknownFields(other.UnknownFields);
+        return this;
+      }
+      
+      public override Builder MergeFrom(pb::ICodedInputStream input) {
+        return MergeFrom(input, pb::ExtensionRegistry.Empty);
+      }
+      
+      public override Builder MergeFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+        PrepareBuilder();
+        pb::UnknownFieldSet.Builder unknownFields = null;
+        uint tag;
+        string field_name;
+        while (input.ReadTag(out tag, out field_name)) {
+          if(tag == 0 && field_name != null) {
+            int field_ordinal = global::System.Array.BinarySearch(_testUnpackedExtensionsFieldNames, field_name, global::System.StringComparer.Ordinal);
+            if(field_ordinal >= 0)
+              tag = _testUnpackedExtensionsFieldTags[field_ordinal];
+            else {
+              if (unknownFields == null) {
+                unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+              }
+              ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
+              continue;
+            }
+          }
+          switch (tag) {
+            case 0: {
+              throw pb::InvalidProtocolBufferException.InvalidTag();
+            }
+            default: {
+              if (pb::WireFormat.IsEndGroupTag(tag)) {
+                if (unknownFields != null) {
+                  this.UnknownFields = unknownFields.Build();
+                }
+                return this;
+              }
+              if (unknownFields == null) {
+                unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+              }
+              ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
+              break;
+            }
+          }
+        }
+        
+        if (unknownFields != null) {
+          this.UnknownFields = unknownFields.Build();
+        }
+        return this;
+      }
+      
+    }
+    static TestUnpackedExtensions() {
+      object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasProtoFile.Descriptor, null);
+    }
+  }
+  
+  #endregion
+  
+}
+
+#endregion Designer generated code

+ 4 - 4
src/ProtocolBuffers.Test/TestProtos/UnitTestNoGenericServicesProtoFile.cs

@@ -43,10 +43,10 @@ namespace Google.ProtocolBuffers.TestProtos.NoGenericService {
           "b3RvYnVmLm5vX2dlbmVyaWNfc2VydmljZXNfdGVzdC5UZXN0TWVzc2FnZRo1" + 
           "Lmdvb2dsZS5wcm90b2J1Zi5ub19nZW5lcmljX3NlcnZpY2VzX3Rlc3QuVGVz" + 
           "dE1lc3NhZ2U6TgoOdGVzdF9leHRlbnNpb24SNS5nb29nbGUucHJvdG9idWYu" + 
-          "bm9fZ2VuZXJpY19zZXJ2aWNlc190ZXN0LlRlc3RNZXNzYWdlGOgHIAEoBUJk" + 
-          "gAEAiAEAkAEAwj5YCjJHb29nbGUuUHJvdG9jb2xCdWZmZXJzLlRlc3RQcm90" + 
-          "b3MuTm9HZW5lcmljU2VydmljZRIiVW5pdFRlc3ROb0dlbmVyaWNTZXJ2aWNl" + 
-          "c1Byb3RvRmlsZQ==");
+          "bm9fZ2VuZXJpY19zZXJ2aWNlc190ZXN0LlRlc3RNZXNzYWdlGOgHIAEoBUJb" + 
+          "wj5YCjJHb29nbGUuUHJvdG9jb2xCdWZmZXJzLlRlc3RQcm90b3MuTm9HZW5l" + 
+          "cmljU2VydmljZRIiVW5pdFRlc3ROb0dlbmVyaWNTZXJ2aWNlc1Byb3RvRmls" + 
+          "ZQ==");
       pbd::FileDescriptor.InternalDescriptorAssigner assigner = delegate(pbd::FileDescriptor root) {
         descriptor = root;
         internal__static_google_protobuf_no_generic_services_test_TestMessage__Descriptor = Descriptor.MessageTypes[0];

Разница между файлами не показана из-за своего большого размера
+ 568 - 325
src/ProtocolBuffers.Test/TestProtos/UnitTestProtoFile.cs


+ 43 - 43
src/ProtocolBuffers.Test/TestUtil.cs

@@ -1690,49 +1690,49 @@ namespace Google.ProtocolBuffers
 
         public static void AssertUnpackedExtensionsSet(TestUnpackedExtensions message)
         {
-            Assert.AreEqual(2, message.GetExtensionCount(UnitTestProtoFile.UnpackedInt32Extension));
-            Assert.AreEqual(2, message.GetExtensionCount(UnitTestProtoFile.UnpackedInt64Extension));
-            Assert.AreEqual(2, message.GetExtensionCount(UnitTestProtoFile.UnpackedUint32Extension));
-            Assert.AreEqual(2, message.GetExtensionCount(UnitTestProtoFile.UnpackedUint64Extension));
-            Assert.AreEqual(2, message.GetExtensionCount(UnitTestProtoFile.UnpackedSint32Extension));
-            Assert.AreEqual(2, message.GetExtensionCount(UnitTestProtoFile.UnpackedSint64Extension));
-            Assert.AreEqual(2, message.GetExtensionCount(UnitTestProtoFile.UnpackedFixed32Extension));
-            Assert.AreEqual(2, message.GetExtensionCount(UnitTestProtoFile.UnpackedFixed64Extension));
-            Assert.AreEqual(2, message.GetExtensionCount(UnitTestProtoFile.UnpackedSfixed32Extension));
-            Assert.AreEqual(2, message.GetExtensionCount(UnitTestProtoFile.UnpackedSfixed64Extension));
-            Assert.AreEqual(2, message.GetExtensionCount(UnitTestProtoFile.UnpackedFloatExtension));
-            Assert.AreEqual(2, message.GetExtensionCount(UnitTestProtoFile.UnpackedDoubleExtension));
-            Assert.AreEqual(2, message.GetExtensionCount(UnitTestProtoFile.UnpackedBoolExtension));
-            Assert.AreEqual(2, message.GetExtensionCount(UnitTestProtoFile.UnpackedEnumExtension));
-            Assert.AreEqual(601, message.GetExtension(UnitTestProtoFile.UnpackedInt32Extension, 0));
-            Assert.AreEqual(602L, message.GetExtension(UnitTestProtoFile.UnpackedInt64Extension, 0));
-            Assert.AreEqual(603, message.GetExtension(UnitTestProtoFile.UnpackedUint32Extension, 0));
-            Assert.AreEqual(604L, message.GetExtension(UnitTestProtoFile.UnpackedUint64Extension, 0));
-            Assert.AreEqual(605, message.GetExtension(UnitTestProtoFile.UnpackedSint32Extension, 0));
-            Assert.AreEqual(606L, message.GetExtension(UnitTestProtoFile.UnpackedSint64Extension, 0));
-            Assert.AreEqual(607, message.GetExtension(UnitTestProtoFile.UnpackedFixed32Extension, 0));
-            Assert.AreEqual(608L, message.GetExtension(UnitTestProtoFile.UnpackedFixed64Extension, 0));
-            Assert.AreEqual(609, message.GetExtension(UnitTestProtoFile.UnpackedSfixed32Extension, 0));
-            Assert.AreEqual(610L, message.GetExtension(UnitTestProtoFile.UnpackedSfixed64Extension, 0));
-            Assert.AreEqual(611F, message.GetExtension(UnitTestProtoFile.UnpackedFloatExtension, 0));
-            Assert.AreEqual(612D, message.GetExtension(UnitTestProtoFile.UnpackedDoubleExtension, 0));
-            Assert.AreEqual(true, message.GetExtension(UnitTestProtoFile.UnpackedBoolExtension, 0));
-            Assert.AreEqual(ForeignEnum.FOREIGN_BAR,
-                            message.GetExtension(UnitTestProtoFile.UnpackedEnumExtension, 0));
-            Assert.AreEqual(701, message.GetExtension(UnitTestProtoFile.UnpackedInt32Extension, 1));
-            Assert.AreEqual(702L, message.GetExtension(UnitTestProtoFile.UnpackedInt64Extension, 1));
-            Assert.AreEqual(703, message.GetExtension(UnitTestProtoFile.UnpackedUint32Extension, 1));
-            Assert.AreEqual(704L, message.GetExtension(UnitTestProtoFile.UnpackedUint64Extension, 1));
-            Assert.AreEqual(705, message.GetExtension(UnitTestProtoFile.UnpackedSint32Extension, 1));
-            Assert.AreEqual(706L, message.GetExtension(UnitTestProtoFile.UnpackedSint64Extension, 1));
-            Assert.AreEqual(707, message.GetExtension(UnitTestProtoFile.UnpackedFixed32Extension, 1));
-            Assert.AreEqual(708L, message.GetExtension(UnitTestProtoFile.UnpackedFixed64Extension, 1));
-            Assert.AreEqual(709, message.GetExtension(UnitTestProtoFile.UnpackedSfixed32Extension, 1));
-            Assert.AreEqual(710L, message.GetExtension(UnitTestProtoFile.UnpackedSfixed64Extension, 1));
-            Assert.AreEqual(711F, message.GetExtension(UnitTestProtoFile.UnpackedFloatExtension, 1));
-            Assert.AreEqual(712D, message.GetExtension(UnitTestProtoFile.UnpackedDoubleExtension, 1));
-            Assert.AreEqual(false, message.GetExtension(UnitTestProtoFile.UnpackedBoolExtension, 1));
-            Assert.AreEqual(ForeignEnum.FOREIGN_BAZ, message.GetExtension(UnitTestProtoFile.UnpackedEnumExtension, 1));
+            Assert.AreEqual(2, message.GetExtensionCount(UnitTestExtrasProtoFile.UnpackedInt32Extension));
+            Assert.AreEqual(2, message.GetExtensionCount(UnitTestExtrasProtoFile.UnpackedInt64Extension));
+            Assert.AreEqual(2, message.GetExtensionCount(UnitTestExtrasProtoFile.UnpackedUint32Extension));
+            Assert.AreEqual(2, message.GetExtensionCount(UnitTestExtrasProtoFile.UnpackedUint64Extension));
+            Assert.AreEqual(2, message.GetExtensionCount(UnitTestExtrasProtoFile.UnpackedSint32Extension));
+            Assert.AreEqual(2, message.GetExtensionCount(UnitTestExtrasProtoFile.UnpackedSint64Extension));
+            Assert.AreEqual(2, message.GetExtensionCount(UnitTestExtrasProtoFile.UnpackedFixed32Extension));
+            Assert.AreEqual(2, message.GetExtensionCount(UnitTestExtrasProtoFile.UnpackedFixed64Extension));
+            Assert.AreEqual(2, message.GetExtensionCount(UnitTestExtrasProtoFile.UnpackedSfixed32Extension));
+            Assert.AreEqual(2, message.GetExtensionCount(UnitTestExtrasProtoFile.UnpackedSfixed64Extension));
+            Assert.AreEqual(2, message.GetExtensionCount(UnitTestExtrasProtoFile.UnpackedFloatExtension));
+            Assert.AreEqual(2, message.GetExtensionCount(UnitTestExtrasProtoFile.UnpackedDoubleExtension));
+            Assert.AreEqual(2, message.GetExtensionCount(UnitTestExtrasProtoFile.UnpackedBoolExtension));
+            Assert.AreEqual(2, message.GetExtensionCount(UnitTestExtrasProtoFile.UnpackedEnumExtension));
+            Assert.AreEqual(601, message.GetExtension(UnitTestExtrasProtoFile.UnpackedInt32Extension, 0));
+            Assert.AreEqual(602L, message.GetExtension(UnitTestExtrasProtoFile.UnpackedInt64Extension, 0));
+            Assert.AreEqual(603, message.GetExtension(UnitTestExtrasProtoFile.UnpackedUint32Extension, 0));
+            Assert.AreEqual(604L, message.GetExtension(UnitTestExtrasProtoFile.UnpackedUint64Extension, 0));
+            Assert.AreEqual(605, message.GetExtension(UnitTestExtrasProtoFile.UnpackedSint32Extension, 0));
+            Assert.AreEqual(606L, message.GetExtension(UnitTestExtrasProtoFile.UnpackedSint64Extension, 0));
+            Assert.AreEqual(607, message.GetExtension(UnitTestExtrasProtoFile.UnpackedFixed32Extension, 0));
+            Assert.AreEqual(608L, message.GetExtension(UnitTestExtrasProtoFile.UnpackedFixed64Extension, 0));
+            Assert.AreEqual(609, message.GetExtension(UnitTestExtrasProtoFile.UnpackedSfixed32Extension, 0));
+            Assert.AreEqual(610L, message.GetExtension(UnitTestExtrasProtoFile.UnpackedSfixed64Extension, 0));
+            Assert.AreEqual(611F, message.GetExtension(UnitTestExtrasProtoFile.UnpackedFloatExtension, 0));
+            Assert.AreEqual(612D, message.GetExtension(UnitTestExtrasProtoFile.UnpackedDoubleExtension, 0));
+            Assert.AreEqual(true, message.GetExtension(UnitTestExtrasProtoFile.UnpackedBoolExtension, 0));
+            Assert.AreEqual(UnpackedExtensionsForeignEnum.FOREIGN_BAR,
+                            message.GetExtension(UnitTestExtrasProtoFile.UnpackedEnumExtension, 0));
+            Assert.AreEqual(701, message.GetExtension(UnitTestExtrasProtoFile.UnpackedInt32Extension, 1));
+            Assert.AreEqual(702L, message.GetExtension(UnitTestExtrasProtoFile.UnpackedInt64Extension, 1));
+            Assert.AreEqual(703, message.GetExtension(UnitTestExtrasProtoFile.UnpackedUint32Extension, 1));
+            Assert.AreEqual(704L, message.GetExtension(UnitTestExtrasProtoFile.UnpackedUint64Extension, 1));
+            Assert.AreEqual(705, message.GetExtension(UnitTestExtrasProtoFile.UnpackedSint32Extension, 1));
+            Assert.AreEqual(706L, message.GetExtension(UnitTestExtrasProtoFile.UnpackedSint64Extension, 1));
+            Assert.AreEqual(707, message.GetExtension(UnitTestExtrasProtoFile.UnpackedFixed32Extension, 1));
+            Assert.AreEqual(708L, message.GetExtension(UnitTestExtrasProtoFile.UnpackedFixed64Extension, 1));
+            Assert.AreEqual(709, message.GetExtension(UnitTestExtrasProtoFile.UnpackedSfixed32Extension, 1));
+            Assert.AreEqual(710L, message.GetExtension(UnitTestExtrasProtoFile.UnpackedSfixed64Extension, 1));
+            Assert.AreEqual(711F, message.GetExtension(UnitTestExtrasProtoFile.UnpackedFloatExtension, 1));
+            Assert.AreEqual(712D, message.GetExtension(UnitTestExtrasProtoFile.UnpackedDoubleExtension, 1));
+            Assert.AreEqual(false, message.GetExtension(UnitTestExtrasProtoFile.UnpackedBoolExtension, 1));
+            Assert.AreEqual(UnpackedExtensionsForeignEnum.FOREIGN_BAZ, message.GetExtension(UnitTestExtrasProtoFile.UnpackedEnumExtension, 1));
         }
 
         private static ByteString goldenPackedFieldsMessage = null;

+ 7 - 3
src/ProtocolBuffers.sln

@@ -1,5 +1,6 @@
-Microsoft Visual Studio Solution File, Format Version 11.00
--# Visual Studio 2010
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "proto", "proto", "{1F896D5C-5FC2-4671-9216-781CB8187EC7}"
 	ProjectSection(SolutionItems) = preProject
 		..\protos\tutorial\addressbook.proto = ..\protos\tutorial\addressbook.proto
@@ -17,8 +18,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "unittest", "unittest", "{C8
 		..\protos\google\protobuf\unittest_embed_optimize_for.proto = ..\protos\google\protobuf\unittest_embed_optimize_for.proto
 		..\protos\google\protobuf\unittest_empty.proto = ..\protos\google\protobuf\unittest_empty.proto
 		..\protos\google\protobuf\unittest_enormous_descriptor.proto = ..\protos\google\protobuf\unittest_enormous_descriptor.proto
-		..\protos\extest\unittest_extras_lite.proto = ..\protos\extest\unittest_extras_lite.proto
+		..\protos\extest\unittest_extras.proto = ..\protos\extest\unittest_extras.proto
+		..\protos\extest\unittest_extras_full.proto = ..\protos\extest\unittest_extras_full.proto
 		..\protos\extest\unittest_extras_xmltest.proto = ..\protos\extest\unittest_extras_xmltest.proto
+		..\protos\extest\unittest_extras_lite.proto = ..\protos\extest\unittest_extras_lite.proto
 		..\protos\extest\unittest_generic_services.proto = ..\protos\extest\unittest_generic_services.proto
 		..\protos\google\protobuf\unittest_import.proto = ..\protos\google\protobuf\unittest_import.proto
 		..\protos\google\protobuf\unittest_import_lite.proto = ..\protos\google\protobuf\unittest_import_lite.proto
@@ -29,6 +32,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "unittest", "unittest", "{C8
 		..\protos\google\protobuf\unittest_no_generic_services.proto = ..\protos\google\protobuf\unittest_no_generic_services.proto
 		..\protos\google\protobuf\unittest_optimize_for.proto = ..\protos\google\protobuf\unittest_optimize_for.proto
 		..\protos\extest\unittest_rpc_interop.proto = ..\protos\extest\unittest_rpc_interop.proto
+		..\protos\extest\unittest_rpc_interop_lite.proto = ..\protos\extest\unittest_rpc_interop_lite.proto
 	EndProjectSection
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProtocolBuffers", "ProtocolBuffers\ProtocolBuffers.csproj", "{6908BDCE-D925-43F3-94AC-A531E6DF2591}"

+ 944 - 99
src/ProtocolBuffers/DescriptorProtos/DescriptorProtoFile.cs

@@ -54,6 +54,10 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
     internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.DescriptorProtos.UninterpretedOption, global::Google.ProtocolBuffers.DescriptorProtos.UninterpretedOption.Builder> internal__static_google_protobuf_UninterpretedOption__FieldAccessorTable;
     internal static pbd::MessageDescriptor internal__static_google_protobuf_UninterpretedOption_NamePart__Descriptor;
     internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.DescriptorProtos.UninterpretedOption.Types.NamePart, global::Google.ProtocolBuffers.DescriptorProtos.UninterpretedOption.Types.NamePart.Builder> internal__static_google_protobuf_UninterpretedOption_NamePart__FieldAccessorTable;
+    internal static pbd::MessageDescriptor internal__static_google_protobuf_SourceCodeInfo__Descriptor;
+    internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.DescriptorProtos.SourceCodeInfo, global::Google.ProtocolBuffers.DescriptorProtos.SourceCodeInfo.Builder> internal__static_google_protobuf_SourceCodeInfo__FieldAccessorTable;
+    internal static pbd::MessageDescriptor internal__static_google_protobuf_SourceCodeInfo_Location__Descriptor;
+    internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.DescriptorProtos.SourceCodeInfo.Types.Location, global::Google.ProtocolBuffers.DescriptorProtos.SourceCodeInfo.Types.Location.Builder> internal__static_google_protobuf_SourceCodeInfo_Location__FieldAccessorTable;
     #endregion
     #region Descriptor
     public static pbd::FileDescriptor Descriptor {
@@ -65,7 +69,7 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
       byte[] descriptorData = global::System.Convert.FromBase64String(
           "CiBnb29nbGUvcHJvdG9idWYvZGVzY3JpcHRvci5wcm90bxIPZ29vZ2xlLnBy" + 
           "b3RvYnVmIkcKEUZpbGVEZXNjcmlwdG9yU2V0EjIKBGZpbGUYASADKAsyJC5n" + 
-          "b29nbGUucHJvdG9idWYuRmlsZURlc2NyaXB0b3JQcm90byLcAgoTRmlsZURl" + 
+          "b29nbGUucHJvdG9idWYuRmlsZURlc2NyaXB0b3JQcm90byKXAwoTRmlsZURl" + 
           "c2NyaXB0b3JQcm90bxIMCgRuYW1lGAEgASgJEg8KB3BhY2thZ2UYAiABKAkS" + 
           "EgoKZGVwZW5kZW5jeRgDIAMoCRI2CgxtZXNzYWdlX3R5cGUYBCADKAsyIC5n" + 
           "b29nbGUucHJvdG9idWYuRGVzY3JpcHRvclByb3RvEjcKCWVudW1fdHlwZRgF" + 
@@ -73,78 +77,84 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
           "B3NlcnZpY2UYBiADKAsyJy5nb29nbGUucHJvdG9idWYuU2VydmljZURlc2Ny" + 
           "aXB0b3JQcm90bxI4CglleHRlbnNpb24YByADKAsyJS5nb29nbGUucHJvdG9i" + 
           "dWYuRmllbGREZXNjcmlwdG9yUHJvdG8SLQoHb3B0aW9ucxgIIAEoCzIcLmdv" + 
-          "b2dsZS5wcm90b2J1Zi5GaWxlT3B0aW9ucyKpAwoPRGVzY3JpcHRvclByb3Rv" + 
-          "EgwKBG5hbWUYASABKAkSNAoFZmllbGQYAiADKAsyJS5nb29nbGUucHJvdG9i" + 
-          "dWYuRmllbGREZXNjcmlwdG9yUHJvdG8SOAoJZXh0ZW5zaW9uGAYgAygLMiUu" + 
-          "Z29vZ2xlLnByb3RvYnVmLkZpZWxkRGVzY3JpcHRvclByb3RvEjUKC25lc3Rl" + 
-          "ZF90eXBlGAMgAygLMiAuZ29vZ2xlLnByb3RvYnVmLkRlc2NyaXB0b3JQcm90" + 
-          "bxI3CgllbnVtX3R5cGUYBCADKAsyJC5nb29nbGUucHJvdG9idWYuRW51bURl" + 
-          "c2NyaXB0b3JQcm90bxJICg9leHRlbnNpb25fcmFuZ2UYBSADKAsyLy5nb29n" + 
-          "bGUucHJvdG9idWYuRGVzY3JpcHRvclByb3RvLkV4dGVuc2lvblJhbmdlEjAK" + 
-          "B29wdGlvbnMYByABKAsyHy5nb29nbGUucHJvdG9idWYuTWVzc2FnZU9wdGlv" + 
-          "bnMaLAoORXh0ZW5zaW9uUmFuZ2USDQoFc3RhcnQYASABKAUSCwoDZW5kGAIg" + 
-          "ASgFIpQFChRGaWVsZERlc2NyaXB0b3JQcm90bxIMCgRuYW1lGAEgASgJEg4K" + 
-          "Bm51bWJlchgDIAEoBRI6CgVsYWJlbBgEIAEoDjIrLmdvb2dsZS5wcm90b2J1" + 
-          "Zi5GaWVsZERlc2NyaXB0b3JQcm90by5MYWJlbBI4CgR0eXBlGAUgASgOMiou" + 
-          "Z29vZ2xlLnByb3RvYnVmLkZpZWxkRGVzY3JpcHRvclByb3RvLlR5cGUSEQoJ" + 
-          "dHlwZV9uYW1lGAYgASgJEhAKCGV4dGVuZGVlGAIgASgJEhUKDWRlZmF1bHRf" + 
-          "dmFsdWUYByABKAkSLgoHb3B0aW9ucxgIIAEoCzIdLmdvb2dsZS5wcm90b2J1" + 
-          "Zi5GaWVsZE9wdGlvbnMitgIKBFR5cGUSDwoLVFlQRV9ET1VCTEUQARIOCgpU" + 
-          "WVBFX0ZMT0FUEAISDgoKVFlQRV9JTlQ2NBADEg8KC1RZUEVfVUlOVDY0EAQS" + 
-          "DgoKVFlQRV9JTlQzMhAFEhAKDFRZUEVfRklYRUQ2NBAGEhAKDFRZUEVfRklY" + 
-          "RUQzMhAHEg0KCVRZUEVfQk9PTBAIEg8KC1RZUEVfU1RSSU5HEAkSDgoKVFlQ" + 
-          "RV9HUk9VUBAKEhAKDFRZUEVfTUVTU0FHRRALEg4KClRZUEVfQllURVMQDBIP" + 
-          "CgtUWVBFX1VJTlQzMhANEg0KCVRZUEVfRU5VTRAOEhEKDVRZUEVfU0ZJWEVE" + 
-          "MzIQDxIRCg1UWVBFX1NGSVhFRDY0EBASDwoLVFlQRV9TSU5UMzIQERIPCgtU" + 
-          "WVBFX1NJTlQ2NBASIkMKBUxhYmVsEhIKDkxBQkVMX09QVElPTkFMEAESEgoO" + 
-          "TEFCRUxfUkVRVUlSRUQQAhISCg5MQUJFTF9SRVBFQVRFRBADIowBChNFbnVt" + 
-          "RGVzY3JpcHRvclByb3RvEgwKBG5hbWUYASABKAkSOAoFdmFsdWUYAiADKAsy" + 
-          "KS5nb29nbGUucHJvdG9idWYuRW51bVZhbHVlRGVzY3JpcHRvclByb3RvEi0K" + 
-          "B29wdGlvbnMYAyABKAsyHC5nb29nbGUucHJvdG9idWYuRW51bU9wdGlvbnMi" + 
-          "bAoYRW51bVZhbHVlRGVzY3JpcHRvclByb3RvEgwKBG5hbWUYASABKAkSDgoG" + 
-          "bnVtYmVyGAIgASgFEjIKB29wdGlvbnMYAyABKAsyIS5nb29nbGUucHJvdG9i" + 
-          "dWYuRW51bVZhbHVlT3B0aW9ucyKQAQoWU2VydmljZURlc2NyaXB0b3JQcm90" + 
-          "bxIMCgRuYW1lGAEgASgJEjYKBm1ldGhvZBgCIAMoCzImLmdvb2dsZS5wcm90" + 
-          "b2J1Zi5NZXRob2REZXNjcmlwdG9yUHJvdG8SMAoHb3B0aW9ucxgDIAEoCzIf" + 
-          "Lmdvb2dsZS5wcm90b2J1Zi5TZXJ2aWNlT3B0aW9ucyJ/ChVNZXRob2REZXNj" + 
-          "cmlwdG9yUHJvdG8SDAoEbmFtZRgBIAEoCRISCgppbnB1dF90eXBlGAIgASgJ" + 
-          "EhMKC291dHB1dF90eXBlGAMgASgJEi8KB29wdGlvbnMYBCABKAsyHi5nb29n" + 
-          "bGUucHJvdG9idWYuTWV0aG9kT3B0aW9ucyKkAwoLRmlsZU9wdGlvbnMSFAoM" + 
-          "amF2YV9wYWNrYWdlGAEgASgJEhwKFGphdmFfb3V0ZXJfY2xhc3NuYW1lGAgg" + 
-          "ASgJEiIKE2phdmFfbXVsdGlwbGVfZmlsZXMYCiABKAg6BWZhbHNlEkYKDG9w" + 
-          "dGltaXplX2ZvchgJIAEoDjIpLmdvb2dsZS5wcm90b2J1Zi5GaWxlT3B0aW9u" + 
-          "cy5PcHRpbWl6ZU1vZGU6BVNQRUVEEiEKE2NjX2dlbmVyaWNfc2VydmljZXMY" + 
-          "ECABKAg6BHRydWUSIwoVamF2YV9nZW5lcmljX3NlcnZpY2VzGBEgASgIOgR0" + 
-          "cnVlEiEKE3B5X2dlbmVyaWNfc2VydmljZXMYEiABKAg6BHRydWUSQwoUdW5p" + 
+          "b2dsZS5wcm90b2J1Zi5GaWxlT3B0aW9ucxI5ChBzb3VyY2VfY29kZV9pbmZv" + 
+          "GAkgASgLMh8uZ29vZ2xlLnByb3RvYnVmLlNvdXJjZUNvZGVJbmZvIqkDCg9E" + 
+          "ZXNjcmlwdG9yUHJvdG8SDAoEbmFtZRgBIAEoCRI0CgVmaWVsZBgCIAMoCzIl" + 
+          "Lmdvb2dsZS5wcm90b2J1Zi5GaWVsZERlc2NyaXB0b3JQcm90bxI4CglleHRl" + 
+          "bnNpb24YBiADKAsyJS5nb29nbGUucHJvdG9idWYuRmllbGREZXNjcmlwdG9y" + 
+          "UHJvdG8SNQoLbmVzdGVkX3R5cGUYAyADKAsyIC5nb29nbGUucHJvdG9idWYu" + 
+          "RGVzY3JpcHRvclByb3RvEjcKCWVudW1fdHlwZRgEIAMoCzIkLmdvb2dsZS5w" + 
+          "cm90b2J1Zi5FbnVtRGVzY3JpcHRvclByb3RvEkgKD2V4dGVuc2lvbl9yYW5n" + 
+          "ZRgFIAMoCzIvLmdvb2dsZS5wcm90b2J1Zi5EZXNjcmlwdG9yUHJvdG8uRXh0" + 
+          "ZW5zaW9uUmFuZ2USMAoHb3B0aW9ucxgHIAEoCzIfLmdvb2dsZS5wcm90b2J1" + 
+          "Zi5NZXNzYWdlT3B0aW9ucxosCg5FeHRlbnNpb25SYW5nZRINCgVzdGFydBgB" + 
+          "IAEoBRILCgNlbmQYAiABKAUilAUKFEZpZWxkRGVzY3JpcHRvclByb3RvEgwK" + 
+          "BG5hbWUYASABKAkSDgoGbnVtYmVyGAMgASgFEjoKBWxhYmVsGAQgASgOMisu" + 
+          "Z29vZ2xlLnByb3RvYnVmLkZpZWxkRGVzY3JpcHRvclByb3RvLkxhYmVsEjgK" + 
+          "BHR5cGUYBSABKA4yKi5nb29nbGUucHJvdG9idWYuRmllbGREZXNjcmlwdG9y" + 
+          "UHJvdG8uVHlwZRIRCgl0eXBlX25hbWUYBiABKAkSEAoIZXh0ZW5kZWUYAiAB" + 
+          "KAkSFQoNZGVmYXVsdF92YWx1ZRgHIAEoCRIuCgdvcHRpb25zGAggASgLMh0u" + 
+          "Z29vZ2xlLnByb3RvYnVmLkZpZWxkT3B0aW9ucyK2AgoEVHlwZRIPCgtUWVBF" + 
+          "X0RPVUJMRRABEg4KClRZUEVfRkxPQVQQAhIOCgpUWVBFX0lOVDY0EAMSDwoL" + 
+          "VFlQRV9VSU5UNjQQBBIOCgpUWVBFX0lOVDMyEAUSEAoMVFlQRV9GSVhFRDY0" + 
+          "EAYSEAoMVFlQRV9GSVhFRDMyEAcSDQoJVFlQRV9CT09MEAgSDwoLVFlQRV9T" + 
+          "VFJJTkcQCRIOCgpUWVBFX0dST1VQEAoSEAoMVFlQRV9NRVNTQUdFEAsSDgoK" + 
+          "VFlQRV9CWVRFUxAMEg8KC1RZUEVfVUlOVDMyEA0SDQoJVFlQRV9FTlVNEA4S" + 
+          "EQoNVFlQRV9TRklYRUQzMhAPEhEKDVRZUEVfU0ZJWEVENjQQEBIPCgtUWVBF" + 
+          "X1NJTlQzMhAREg8KC1RZUEVfU0lOVDY0EBIiQwoFTGFiZWwSEgoOTEFCRUxf" + 
+          "T1BUSU9OQUwQARISCg5MQUJFTF9SRVFVSVJFRBACEhIKDkxBQkVMX1JFUEVB" + 
+          "VEVEEAMijAEKE0VudW1EZXNjcmlwdG9yUHJvdG8SDAoEbmFtZRgBIAEoCRI4" + 
+          "CgV2YWx1ZRgCIAMoCzIpLmdvb2dsZS5wcm90b2J1Zi5FbnVtVmFsdWVEZXNj" + 
+          "cmlwdG9yUHJvdG8SLQoHb3B0aW9ucxgDIAEoCzIcLmdvb2dsZS5wcm90b2J1" + 
+          "Zi5FbnVtT3B0aW9ucyJsChhFbnVtVmFsdWVEZXNjcmlwdG9yUHJvdG8SDAoE" + 
+          "bmFtZRgBIAEoCRIOCgZudW1iZXIYAiABKAUSMgoHb3B0aW9ucxgDIAEoCzIh" + 
+          "Lmdvb2dsZS5wcm90b2J1Zi5FbnVtVmFsdWVPcHRpb25zIpABChZTZXJ2aWNl" + 
+          "RGVzY3JpcHRvclByb3RvEgwKBG5hbWUYASABKAkSNgoGbWV0aG9kGAIgAygL" + 
+          "MiYuZ29vZ2xlLnByb3RvYnVmLk1ldGhvZERlc2NyaXB0b3JQcm90bxIwCgdv" + 
+          "cHRpb25zGAMgASgLMh8uZ29vZ2xlLnByb3RvYnVmLlNlcnZpY2VPcHRpb25z" + 
+          "In8KFU1ldGhvZERlc2NyaXB0b3JQcm90bxIMCgRuYW1lGAEgASgJEhIKCmlu" + 
+          "cHV0X3R5cGUYAiABKAkSEwoLb3V0cHV0X3R5cGUYAyABKAkSLwoHb3B0aW9u" + 
+          "cxgEIAEoCzIeLmdvb2dsZS5wcm90b2J1Zi5NZXRob2RPcHRpb25zItUDCgtG" + 
+          "aWxlT3B0aW9ucxIUCgxqYXZhX3BhY2thZ2UYASABKAkSHAoUamF2YV9vdXRl" + 
+          "cl9jbGFzc25hbWUYCCABKAkSIgoTamF2YV9tdWx0aXBsZV9maWxlcxgKIAEo" + 
+          "CDoFZmFsc2USLAodamF2YV9nZW5lcmF0ZV9lcXVhbHNfYW5kX2hhc2gYFCAB" + 
+          "KAg6BWZhbHNlEkYKDG9wdGltaXplX2ZvchgJIAEoDjIpLmdvb2dsZS5wcm90" + 
+          "b2J1Zi5GaWxlT3B0aW9ucy5PcHRpbWl6ZU1vZGU6BVNQRUVEEiIKE2NjX2dl" + 
+          "bmVyaWNfc2VydmljZXMYECABKAg6BWZhbHNlEiQKFWphdmFfZ2VuZXJpY19z" + 
+          "ZXJ2aWNlcxgRIAEoCDoFZmFsc2USIgoTcHlfZ2VuZXJpY19zZXJ2aWNlcxgS" + 
+          "IAEoCDoFZmFsc2USQwoUdW5pbnRlcnByZXRlZF9vcHRpb24Y5wcgAygLMiQu" + 
+          "Z29vZ2xlLnByb3RvYnVmLlVuaW50ZXJwcmV0ZWRPcHRpb24iOgoMT3B0aW1p" + 
+          "emVNb2RlEgkKBVNQRUVEEAESDQoJQ09ERV9TSVpFEAISEAoMTElURV9SVU5U" + 
+          "SU1FEAMqCQjoBxCAgICAAiK4AQoOTWVzc2FnZU9wdGlvbnMSJgoXbWVzc2Fn" + 
+          "ZV9zZXRfd2lyZV9mb3JtYXQYASABKAg6BWZhbHNlEi4KH25vX3N0YW5kYXJk" + 
+          "X2Rlc2NyaXB0b3JfYWNjZXNzb3IYAiABKAg6BWZhbHNlEkMKFHVuaW50ZXJw" + 
+          "cmV0ZWRfb3B0aW9uGOcHIAMoCzIkLmdvb2dsZS5wcm90b2J1Zi5VbmludGVy" + 
+          "cHJldGVkT3B0aW9uKgkI6AcQgICAgAIilAIKDEZpZWxkT3B0aW9ucxI6CgVj" + 
+          "dHlwZRgBIAEoDjIjLmdvb2dsZS5wcm90b2J1Zi5GaWVsZE9wdGlvbnMuQ1R5" + 
+          "cGU6BlNUUklORxIOCgZwYWNrZWQYAiABKAgSGQoKZGVwcmVjYXRlZBgDIAEo" + 
+          "CDoFZmFsc2USHAoUZXhwZXJpbWVudGFsX21hcF9rZXkYCSABKAkSQwoUdW5p" + 
           "bnRlcnByZXRlZF9vcHRpb24Y5wcgAygLMiQuZ29vZ2xlLnByb3RvYnVmLlVu" + 
-          "aW50ZXJwcmV0ZWRPcHRpb24iOgoMT3B0aW1pemVNb2RlEgkKBVNQRUVEEAES" + 
-          "DQoJQ09ERV9TSVpFEAISEAoMTElURV9SVU5USU1FEAMqCQjoBxCAgICAAiK4" + 
-          "AQoOTWVzc2FnZU9wdGlvbnMSJgoXbWVzc2FnZV9zZXRfd2lyZV9mb3JtYXQY" + 
-          "ASABKAg6BWZhbHNlEi4KH25vX3N0YW5kYXJkX2Rlc2NyaXB0b3JfYWNjZXNz" + 
-          "b3IYAiABKAg6BWZhbHNlEkMKFHVuaW50ZXJwcmV0ZWRfb3B0aW9uGOcHIAMo" + 
-          "CzIkLmdvb2dsZS5wcm90b2J1Zi5VbmludGVycHJldGVkT3B0aW9uKgkI6AcQ" + 
-          "gICAgAIilAIKDEZpZWxkT3B0aW9ucxI6CgVjdHlwZRgBIAEoDjIjLmdvb2ds" + 
-          "ZS5wcm90b2J1Zi5GaWVsZE9wdGlvbnMuQ1R5cGU6BlNUUklORxIOCgZwYWNr" + 
-          "ZWQYAiABKAgSGQoKZGVwcmVjYXRlZBgDIAEoCDoFZmFsc2USHAoUZXhwZXJp" + 
-          "bWVudGFsX21hcF9rZXkYCSABKAkSQwoUdW5pbnRlcnByZXRlZF9vcHRpb24Y" + 
-          "5wcgAygLMiQuZ29vZ2xlLnByb3RvYnVmLlVuaW50ZXJwcmV0ZWRPcHRpb24i" + 
-          "LwoFQ1R5cGUSCgoGU1RSSU5HEAASCAoEQ09SRBABEhAKDFNUUklOR19QSUVD" + 
-          "RRACKgkI6AcQgICAgAIiXQoLRW51bU9wdGlvbnMSQwoUdW5pbnRlcnByZXRl" + 
-          "ZF9vcHRpb24Y5wcgAygLMiQuZ29vZ2xlLnByb3RvYnVmLlVuaW50ZXJwcmV0" + 
-          "ZWRPcHRpb24qCQjoBxCAgICAAiJiChBFbnVtVmFsdWVPcHRpb25zEkMKFHVu" + 
-          "aW50ZXJwcmV0ZWRfb3B0aW9uGOcHIAMoCzIkLmdvb2dsZS5wcm90b2J1Zi5V" + 
-          "bmludGVycHJldGVkT3B0aW9uKgkI6AcQgICAgAIiYAoOU2VydmljZU9wdGlv" + 
+          "aW50ZXJwcmV0ZWRPcHRpb24iLwoFQ1R5cGUSCgoGU1RSSU5HEAASCAoEQ09S" + 
+          "RBABEhAKDFNUUklOR19QSUVDRRACKgkI6AcQgICAgAIiXQoLRW51bU9wdGlv" + 
           "bnMSQwoUdW5pbnRlcnByZXRlZF9vcHRpb24Y5wcgAygLMiQuZ29vZ2xlLnBy" + 
-          "b3RvYnVmLlVuaW50ZXJwcmV0ZWRPcHRpb24qCQjoBxCAgICAAiJfCg1NZXRo" + 
-          "b2RPcHRpb25zEkMKFHVuaW50ZXJwcmV0ZWRfb3B0aW9uGOcHIAMoCzIkLmdv" + 
-          "b2dsZS5wcm90b2J1Zi5VbmludGVycHJldGVkT3B0aW9uKgkI6AcQgICAgAIi" + 
-          "hQIKE1VuaW50ZXJwcmV0ZWRPcHRpb24SOwoEbmFtZRgCIAMoCzItLmdvb2ds" + 
-          "ZS5wcm90b2J1Zi5VbmludGVycHJldGVkT3B0aW9uLk5hbWVQYXJ0EhgKEGlk" + 
-          "ZW50aWZpZXJfdmFsdWUYAyABKAkSGgoScG9zaXRpdmVfaW50X3ZhbHVlGAQg" + 
-          "ASgEEhoKEm5lZ2F0aXZlX2ludF92YWx1ZRgFIAEoAxIUCgxkb3VibGVfdmFs" + 
-          "dWUYBiABKAESFAoMc3RyaW5nX3ZhbHVlGAcgASgMGjMKCE5hbWVQYXJ0EhEK" + 
-          "CW5hbWVfcGFydBgBIAIoCRIUCgxpc19leHRlbnNpb24YAiACKAhCKQoTY29t" + 
-          "Lmdvb2dsZS5wcm90b2J1ZkIQRGVzY3JpcHRvclByb3Rvc0gB");
+          "b3RvYnVmLlVuaW50ZXJwcmV0ZWRPcHRpb24qCQjoBxCAgICAAiJiChBFbnVt" + 
+          "VmFsdWVPcHRpb25zEkMKFHVuaW50ZXJwcmV0ZWRfb3B0aW9uGOcHIAMoCzIk" + 
+          "Lmdvb2dsZS5wcm90b2J1Zi5VbmludGVycHJldGVkT3B0aW9uKgkI6AcQgICA" + 
+          "gAIiYAoOU2VydmljZU9wdGlvbnMSQwoUdW5pbnRlcnByZXRlZF9vcHRpb24Y" + 
+          "5wcgAygLMiQuZ29vZ2xlLnByb3RvYnVmLlVuaW50ZXJwcmV0ZWRPcHRpb24q" + 
+          "CQjoBxCAgICAAiJfCg1NZXRob2RPcHRpb25zEkMKFHVuaW50ZXJwcmV0ZWRf" + 
+          "b3B0aW9uGOcHIAMoCzIkLmdvb2dsZS5wcm90b2J1Zi5VbmludGVycHJldGVk" + 
+          "T3B0aW9uKgkI6AcQgICAgAIingIKE1VuaW50ZXJwcmV0ZWRPcHRpb24SOwoE" + 
+          "bmFtZRgCIAMoCzItLmdvb2dsZS5wcm90b2J1Zi5VbmludGVycHJldGVkT3B0" + 
+          "aW9uLk5hbWVQYXJ0EhgKEGlkZW50aWZpZXJfdmFsdWUYAyABKAkSGgoScG9z" + 
+          "aXRpdmVfaW50X3ZhbHVlGAQgASgEEhoKEm5lZ2F0aXZlX2ludF92YWx1ZRgF" + 
+          "IAEoAxIUCgxkb3VibGVfdmFsdWUYBiABKAESFAoMc3RyaW5nX3ZhbHVlGAcg" + 
+          "ASgMEhcKD2FnZ3JlZ2F0ZV92YWx1ZRgIIAEoCRozCghOYW1lUGFydBIRCglu" + 
+          "YW1lX3BhcnQYASACKAkSFAoMaXNfZXh0ZW5zaW9uGAIgAigIInwKDlNvdXJj" + 
+          "ZUNvZGVJbmZvEjoKCGxvY2F0aW9uGAEgAygLMiguZ29vZ2xlLnByb3RvYnVm" + 
+          "LlNvdXJjZUNvZGVJbmZvLkxvY2F0aW9uGi4KCExvY2F0aW9uEhAKBHBhdGgY" + 
+          "ASADKAVCAhABEhAKBHNwYW4YAiADKAVCAhABQikKE2NvbS5nb29nbGUucHJv" + 
+          "dG9idWZCEERlc2NyaXB0b3JQcm90b3NIAQ==");
       pbd::FileDescriptor.InternalDescriptorAssigner assigner = delegate(pbd::FileDescriptor root) {
         descriptor = root;
         internal__static_google_protobuf_FileDescriptorSet__Descriptor = Descriptor.MessageTypes[0];
@@ -154,7 +164,7 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
         internal__static_google_protobuf_FileDescriptorProto__Descriptor = Descriptor.MessageTypes[1];
         internal__static_google_protobuf_FileDescriptorProto__FieldAccessorTable = 
             new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.DescriptorProtos.FileDescriptorProto, global::Google.ProtocolBuffers.DescriptorProtos.FileDescriptorProto.Builder>(internal__static_google_protobuf_FileDescriptorProto__Descriptor,
-                new string[] { "Name", "Package", "Dependency", "MessageType", "EnumType", "Service", "Extension", "Options", });
+                new string[] { "Name", "Package", "Dependency", "MessageType", "EnumType", "Service", "Extension", "Options", "SourceCodeInfo", });
         internal__static_google_protobuf_DescriptorProto__Descriptor = Descriptor.MessageTypes[2];
         internal__static_google_protobuf_DescriptorProto__FieldAccessorTable = 
             new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.DescriptorProtos.DescriptorProto, global::Google.ProtocolBuffers.DescriptorProtos.DescriptorProto.Builder>(internal__static_google_protobuf_DescriptorProto__Descriptor,
@@ -186,7 +196,7 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
         internal__static_google_protobuf_FileOptions__Descriptor = Descriptor.MessageTypes[8];
         internal__static_google_protobuf_FileOptions__FieldAccessorTable = 
             new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.DescriptorProtos.FileOptions, global::Google.ProtocolBuffers.DescriptorProtos.FileOptions.Builder>(internal__static_google_protobuf_FileOptions__Descriptor,
-                new string[] { "JavaPackage", "JavaOuterClassname", "JavaMultipleFiles", "OptimizeFor", "CcGenericServices", "JavaGenericServices", "PyGenericServices", "UninterpretedOption", });
+                new string[] { "JavaPackage", "JavaOuterClassname", "JavaMultipleFiles", "JavaGenerateEqualsAndHash", "OptimizeFor", "CcGenericServices", "JavaGenericServices", "PyGenericServices", "UninterpretedOption", });
         internal__static_google_protobuf_MessageOptions__Descriptor = Descriptor.MessageTypes[9];
         internal__static_google_protobuf_MessageOptions__FieldAccessorTable = 
             new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.DescriptorProtos.MessageOptions, global::Google.ProtocolBuffers.DescriptorProtos.MessageOptions.Builder>(internal__static_google_protobuf_MessageOptions__Descriptor,
@@ -214,11 +224,19 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
         internal__static_google_protobuf_UninterpretedOption__Descriptor = Descriptor.MessageTypes[15];
         internal__static_google_protobuf_UninterpretedOption__FieldAccessorTable = 
             new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.DescriptorProtos.UninterpretedOption, global::Google.ProtocolBuffers.DescriptorProtos.UninterpretedOption.Builder>(internal__static_google_protobuf_UninterpretedOption__Descriptor,
-                new string[] { "Name", "IdentifierValue", "PositiveIntValue", "NegativeIntValue", "DoubleValue", "StringValue", });
+                new string[] { "Name", "IdentifierValue", "PositiveIntValue", "NegativeIntValue", "DoubleValue", "StringValue", "AggregateValue", });
         internal__static_google_protobuf_UninterpretedOption_NamePart__Descriptor = internal__static_google_protobuf_UninterpretedOption__Descriptor.NestedTypes[0];
         internal__static_google_protobuf_UninterpretedOption_NamePart__FieldAccessorTable = 
             new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.DescriptorProtos.UninterpretedOption.Types.NamePart, global::Google.ProtocolBuffers.DescriptorProtos.UninterpretedOption.Types.NamePart.Builder>(internal__static_google_protobuf_UninterpretedOption_NamePart__Descriptor,
                 new string[] { "NamePart_", "IsExtension", });
+        internal__static_google_protobuf_SourceCodeInfo__Descriptor = Descriptor.MessageTypes[16];
+        internal__static_google_protobuf_SourceCodeInfo__FieldAccessorTable = 
+            new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.DescriptorProtos.SourceCodeInfo, global::Google.ProtocolBuffers.DescriptorProtos.SourceCodeInfo.Builder>(internal__static_google_protobuf_SourceCodeInfo__Descriptor,
+                new string[] { "Location", });
+        internal__static_google_protobuf_SourceCodeInfo_Location__Descriptor = internal__static_google_protobuf_SourceCodeInfo__Descriptor.NestedTypes[0];
+        internal__static_google_protobuf_SourceCodeInfo_Location__FieldAccessorTable = 
+            new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.DescriptorProtos.SourceCodeInfo.Types.Location, global::Google.ProtocolBuffers.DescriptorProtos.SourceCodeInfo.Types.Location.Builder>(internal__static_google_protobuf_SourceCodeInfo_Location__Descriptor,
+                new string[] { "Path", "Span", });
         return null;
       };
       pbd::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData,
@@ -539,8 +557,8 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
   public sealed partial class FileDescriptorProto : pb::GeneratedMessage<FileDescriptorProto, FileDescriptorProto.Builder> {
     private FileDescriptorProto() { }
     private static readonly FileDescriptorProto defaultInstance = new FileDescriptorProto().MakeReadOnly();
-    private static readonly string[] _fileDescriptorProtoFieldNames = new string[] { "dependency", "enum_type", "extension", "message_type", "name", "options", "package", "service" };
-    private static readonly uint[] _fileDescriptorProtoFieldTags = new uint[] { 26, 42, 58, 34, 10, 66, 18, 50 };
+    private static readonly string[] _fileDescriptorProtoFieldNames = new string[] { "dependency", "enum_type", "extension", "message_type", "name", "options", "package", "service", "source_code_info" };
+    private static readonly uint[] _fileDescriptorProtoFieldTags = new uint[] { 26, 42, 58, 34, 10, 66, 18, 50, 74 };
     public static FileDescriptorProto DefaultInstance {
       get { return defaultInstance; }
     }
@@ -651,6 +669,16 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
       get { return options_ ?? global::Google.ProtocolBuffers.DescriptorProtos.FileOptions.DefaultInstance; }
     }
     
+    public const int SourceCodeInfoFieldNumber = 9;
+    private bool hasSourceCodeInfo;
+    private global::Google.ProtocolBuffers.DescriptorProtos.SourceCodeInfo sourceCodeInfo_;
+    public bool HasSourceCodeInfo {
+      get { return hasSourceCodeInfo; }
+    }
+    public global::Google.ProtocolBuffers.DescriptorProtos.SourceCodeInfo SourceCodeInfo {
+      get { return sourceCodeInfo_ ?? global::Google.ProtocolBuffers.DescriptorProtos.SourceCodeInfo.DefaultInstance; }
+    }
+    
     public override bool IsInitialized {
       get {
         foreach (global::Google.ProtocolBuffers.DescriptorProtos.DescriptorProto element in MessageTypeList) {
@@ -699,6 +727,9 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
       if (hasOptions) {
         output.WriteMessage(8, field_names[5], Options);
       }
+      if (hasSourceCodeInfo) {
+        output.WriteMessage(9, field_names[8], SourceCodeInfo);
+      }
       UnknownFields.WriteTo(output);
     }
     
@@ -738,6 +769,9 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
         if (hasOptions) {
           size += pb::CodedOutputStream.ComputeMessageSize(8, Options);
         }
+        if (hasSourceCodeInfo) {
+          size += pb::CodedOutputStream.ComputeMessageSize(9, SourceCodeInfo);
+        }
         size += UnknownFields.SerializedSize;
         memoizedSerializedSize = size;
         return size;
@@ -893,6 +927,9 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
         if (other.HasOptions) {
           MergeOptions(other.Options);
         }
+        if (other.HasSourceCodeInfo) {
+          MergeSourceCodeInfo(other.SourceCodeInfo);
+        }
         this.MergeUnknownFields(other.UnknownFields);
         return this;
       }
@@ -973,6 +1010,15 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
               Options = subBuilder.BuildPartial();
               break;
             }
+            case 74: {
+              global::Google.ProtocolBuffers.DescriptorProtos.SourceCodeInfo.Builder subBuilder = global::Google.ProtocolBuffers.DescriptorProtos.SourceCodeInfo.CreateBuilder();
+              if (result.hasSourceCodeInfo) {
+                subBuilder.MergeFrom(SourceCodeInfo);
+              }
+              input.ReadMessage(subBuilder, extensionRegistry);
+              SourceCodeInfo = subBuilder.BuildPartial();
+              break;
+            }
           }
         }
         
@@ -1272,6 +1318,46 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
         result.options_ = null;
         return this;
       }
+      
+      public bool HasSourceCodeInfo {
+       get { return result.hasSourceCodeInfo; }
+      }
+      public global::Google.ProtocolBuffers.DescriptorProtos.SourceCodeInfo SourceCodeInfo {
+        get { return result.SourceCodeInfo; }
+        set { SetSourceCodeInfo(value); }
+      }
+      public Builder SetSourceCodeInfo(global::Google.ProtocolBuffers.DescriptorProtos.SourceCodeInfo value) {
+        pb::ThrowHelper.ThrowIfNull(value, "value");
+        PrepareBuilder();
+        result.hasSourceCodeInfo = true;
+        result.sourceCodeInfo_ = value;
+        return this;
+      }
+      public Builder SetSourceCodeInfo(global::Google.ProtocolBuffers.DescriptorProtos.SourceCodeInfo.Builder builderForValue) {
+        pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+        PrepareBuilder();
+        result.hasSourceCodeInfo = true;
+        result.sourceCodeInfo_ = builderForValue.Build();
+        return this;
+      }
+      public Builder MergeSourceCodeInfo(global::Google.ProtocolBuffers.DescriptorProtos.SourceCodeInfo value) {
+        pb::ThrowHelper.ThrowIfNull(value, "value");
+        PrepareBuilder();
+        if (result.hasSourceCodeInfo &&
+            result.sourceCodeInfo_ != global::Google.ProtocolBuffers.DescriptorProtos.SourceCodeInfo.DefaultInstance) {
+            result.sourceCodeInfo_ = global::Google.ProtocolBuffers.DescriptorProtos.SourceCodeInfo.CreateBuilder(result.sourceCodeInfo_).MergeFrom(value).BuildPartial();
+        } else {
+          result.sourceCodeInfo_ = value;
+        }
+        result.hasSourceCodeInfo = true;
+        return this;
+      }
+      public Builder ClearSourceCodeInfo() {
+        PrepareBuilder();
+        result.hasSourceCodeInfo = false;
+        result.sourceCodeInfo_ = null;
+        return this;
+      }
     }
     static FileDescriptorProto() {
       object.ReferenceEquals(global::Google.ProtocolBuffers.DescriptorProtos.DescriptorProtoFile.Descriptor, null);
@@ -4640,8 +4726,8 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
   public sealed partial class FileOptions : pb::ExtendableMessage<FileOptions, FileOptions.Builder> {
     private FileOptions() { }
     private static readonly FileOptions defaultInstance = new FileOptions().MakeReadOnly();
-    private static readonly string[] _fileOptionsFieldNames = new string[] { "cc_generic_services", "java_generic_services", "java_multiple_files", "java_outer_classname", "java_package", "optimize_for", "py_generic_services", "uninterpreted_option" };
-    private static readonly uint[] _fileOptionsFieldTags = new uint[] { 128, 136, 80, 66, 10, 72, 144, 7994 };
+    private static readonly string[] _fileOptionsFieldNames = new string[] { "cc_generic_services", "java_generate_equals_and_hash", "java_generic_services", "java_multiple_files", "java_outer_classname", "java_package", "optimize_for", "py_generic_services", "uninterpreted_option" };
+    private static readonly uint[] _fileOptionsFieldTags = new uint[] { 128, 160, 136, 80, 66, 10, 72, 144, 7994 };
     public static FileOptions DefaultInstance {
       get { return defaultInstance; }
     }
@@ -4708,6 +4794,16 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
       get { return javaMultipleFiles_; }
     }
     
+    public const int JavaGenerateEqualsAndHashFieldNumber = 20;
+    private bool hasJavaGenerateEqualsAndHash;
+    private bool javaGenerateEqualsAndHash_;
+    public bool HasJavaGenerateEqualsAndHash {
+      get { return hasJavaGenerateEqualsAndHash; }
+    }
+    public bool JavaGenerateEqualsAndHash {
+      get { return javaGenerateEqualsAndHash_; }
+    }
+    
     public const int OptimizeForFieldNumber = 9;
     private bool hasOptimizeFor;
     private global::Google.ProtocolBuffers.DescriptorProtos.FileOptions.Types.OptimizeMode optimizeFor_ = global::Google.ProtocolBuffers.DescriptorProtos.FileOptions.Types.OptimizeMode.SPEED;
@@ -4720,7 +4816,7 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
     
     public const int CcGenericServicesFieldNumber = 16;
     private bool hasCcGenericServices;
-    private bool ccGenericServices_ = true;
+    private bool ccGenericServices_;
     public bool HasCcGenericServices {
       get { return hasCcGenericServices; }
     }
@@ -4730,7 +4826,7 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
     
     public const int JavaGenericServicesFieldNumber = 17;
     private bool hasJavaGenericServices;
-    private bool javaGenericServices_ = true;
+    private bool javaGenericServices_;
     public bool HasJavaGenericServices {
       get { return hasJavaGenericServices; }
     }
@@ -4740,7 +4836,7 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
     
     public const int PyGenericServicesFieldNumber = 18;
     private bool hasPyGenericServices;
-    private bool pyGenericServices_ = true;
+    private bool pyGenericServices_;
     public bool HasPyGenericServices {
       get { return hasPyGenericServices; }
     }
@@ -4775,28 +4871,31 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
       string[] field_names = _fileOptionsFieldNames;
       pb::ExtendableMessage<FileOptions, FileOptions.Builder>.ExtensionWriter extensionWriter = CreateExtensionWriter(this);
       if (hasJavaPackage) {
-        output.WriteString(1, field_names[4], JavaPackage);
+        output.WriteString(1, field_names[5], JavaPackage);
       }
       if (hasJavaOuterClassname) {
-        output.WriteString(8, field_names[3], JavaOuterClassname);
+        output.WriteString(8, field_names[4], JavaOuterClassname);
       }
       if (hasOptimizeFor) {
-        output.WriteEnum(9, field_names[5], (int) OptimizeFor, OptimizeFor);
+        output.WriteEnum(9, field_names[6], (int) OptimizeFor, OptimizeFor);
       }
       if (hasJavaMultipleFiles) {
-        output.WriteBool(10, field_names[2], JavaMultipleFiles);
+        output.WriteBool(10, field_names[3], JavaMultipleFiles);
       }
       if (hasCcGenericServices) {
         output.WriteBool(16, field_names[0], CcGenericServices);
       }
       if (hasJavaGenericServices) {
-        output.WriteBool(17, field_names[1], JavaGenericServices);
+        output.WriteBool(17, field_names[2], JavaGenericServices);
       }
       if (hasPyGenericServices) {
-        output.WriteBool(18, field_names[6], PyGenericServices);
+        output.WriteBool(18, field_names[7], PyGenericServices);
+      }
+      if (hasJavaGenerateEqualsAndHash) {
+        output.WriteBool(20, field_names[1], JavaGenerateEqualsAndHash);
       }
       if (uninterpretedOption_.Count > 0) {
-        output.WriteMessageArray(999, field_names[7], uninterpretedOption_);
+        output.WriteMessageArray(999, field_names[8], uninterpretedOption_);
       }
       extensionWriter.WriteUntil(536870912, output);
       UnknownFields.WriteTo(output);
@@ -4818,6 +4917,9 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
         if (hasJavaMultipleFiles) {
           size += pb::CodedOutputStream.ComputeBoolSize(10, JavaMultipleFiles);
         }
+        if (hasJavaGenerateEqualsAndHash) {
+          size += pb::CodedOutputStream.ComputeBoolSize(20, JavaGenerateEqualsAndHash);
+        }
         if (hasOptimizeFor) {
           size += pb::CodedOutputStream.ComputeEnumSize(9, (int) OptimizeFor);
         }
@@ -4970,6 +5072,9 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
         if (other.HasJavaMultipleFiles) {
           JavaMultipleFiles = other.JavaMultipleFiles;
         }
+        if (other.HasJavaGenerateEqualsAndHash) {
+          JavaGenerateEqualsAndHash = other.JavaGenerateEqualsAndHash;
+        }
         if (other.HasOptimizeFor) {
           OptimizeFor = other.OptimizeFor;
         }
@@ -5065,6 +5170,10 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
               result.hasPyGenericServices = input.ReadBool(ref result.pyGenericServices_);
               break;
             }
+            case 160: {
+              result.hasJavaGenerateEqualsAndHash = input.ReadBool(ref result.javaGenerateEqualsAndHash_);
+              break;
+            }
             case 7994: {
               input.ReadMessageArray(tag, field_name, result.uninterpretedOption_, global::Google.ProtocolBuffers.DescriptorProtos.UninterpretedOption.DefaultInstance, extensionRegistry);
               break;
@@ -5141,6 +5250,26 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
         return this;
       }
       
+      public bool HasJavaGenerateEqualsAndHash {
+        get { return result.hasJavaGenerateEqualsAndHash; }
+      }
+      public bool JavaGenerateEqualsAndHash {
+        get { return result.JavaGenerateEqualsAndHash; }
+        set { SetJavaGenerateEqualsAndHash(value); }
+      }
+      public Builder SetJavaGenerateEqualsAndHash(bool value) {
+        PrepareBuilder();
+        result.hasJavaGenerateEqualsAndHash = true;
+        result.javaGenerateEqualsAndHash_ = value;
+        return this;
+      }
+      public Builder ClearJavaGenerateEqualsAndHash() {
+        PrepareBuilder();
+        result.hasJavaGenerateEqualsAndHash = false;
+        result.javaGenerateEqualsAndHash_ = false;
+        return this;
+      }
+      
       public bool HasOptimizeFor {
        get { return result.hasOptimizeFor; }
       }
@@ -5177,7 +5306,7 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
       public Builder ClearCcGenericServices() {
         PrepareBuilder();
         result.hasCcGenericServices = false;
-        result.ccGenericServices_ = true;
+        result.ccGenericServices_ = false;
         return this;
       }
       
@@ -5197,7 +5326,7 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
       public Builder ClearJavaGenericServices() {
         PrepareBuilder();
         result.hasJavaGenericServices = false;
-        result.javaGenericServices_ = true;
+        result.javaGenericServices_ = false;
         return this;
       }
       
@@ -5217,7 +5346,7 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
       public Builder ClearPyGenericServices() {
         PrepareBuilder();
         result.hasPyGenericServices = false;
-        result.pyGenericServices_ = true;
+        result.pyGenericServices_ = false;
         return this;
       }
       
@@ -7413,8 +7542,8 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
   public sealed partial class UninterpretedOption : pb::GeneratedMessage<UninterpretedOption, UninterpretedOption.Builder> {
     private UninterpretedOption() { }
     private static readonly UninterpretedOption defaultInstance = new UninterpretedOption().MakeReadOnly();
-    private static readonly string[] _uninterpretedOptionFieldNames = new string[] { "double_value", "identifier_value", "name", "negative_int_value", "positive_int_value", "string_value" };
-    private static readonly uint[] _uninterpretedOptionFieldTags = new uint[] { 49, 26, 18, 40, 32, 58 };
+    private static readonly string[] _uninterpretedOptionFieldNames = new string[] { "aggregate_value", "double_value", "identifier_value", "name", "negative_int_value", "positive_int_value", "string_value" };
+    private static readonly uint[] _uninterpretedOptionFieldTags = new uint[] { 66, 49, 26, 18, 40, 32, 58 };
     public static UninterpretedOption DefaultInstance {
       get { return defaultInstance; }
     }
@@ -7826,6 +7955,16 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
       get { return stringValue_; }
     }
     
+    public const int AggregateValueFieldNumber = 8;
+    private bool hasAggregateValue;
+    private string aggregateValue_ = "";
+    public bool HasAggregateValue {
+      get { return hasAggregateValue; }
+    }
+    public string AggregateValue {
+      get { return aggregateValue_; }
+    }
+    
     public override bool IsInitialized {
       get {
         foreach (global::Google.ProtocolBuffers.DescriptorProtos.UninterpretedOption.Types.NamePart element in NameList) {
@@ -7839,22 +7978,25 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
       int size = SerializedSize;
       string[] field_names = _uninterpretedOptionFieldNames;
       if (name_.Count > 0) {
-        output.WriteMessageArray(2, field_names[2], name_);
+        output.WriteMessageArray(2, field_names[3], name_);
       }
       if (hasIdentifierValue) {
-        output.WriteString(3, field_names[1], IdentifierValue);
+        output.WriteString(3, field_names[2], IdentifierValue);
       }
       if (hasPositiveIntValue) {
-        output.WriteUInt64(4, field_names[4], PositiveIntValue);
+        output.WriteUInt64(4, field_names[5], PositiveIntValue);
       }
       if (hasNegativeIntValue) {
-        output.WriteInt64(5, field_names[3], NegativeIntValue);
+        output.WriteInt64(5, field_names[4], NegativeIntValue);
       }
       if (hasDoubleValue) {
-        output.WriteDouble(6, field_names[0], DoubleValue);
+        output.WriteDouble(6, field_names[1], DoubleValue);
       }
       if (hasStringValue) {
-        output.WriteBytes(7, field_names[5], StringValue);
+        output.WriteBytes(7, field_names[6], StringValue);
+      }
+      if (hasAggregateValue) {
+        output.WriteString(8, field_names[0], AggregateValue);
       }
       UnknownFields.WriteTo(output);
     }
@@ -7884,6 +8026,9 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
         if (hasStringValue) {
           size += pb::CodedOutputStream.ComputeBytesSize(7, StringValue);
         }
+        if (hasAggregateValue) {
+          size += pb::CodedOutputStream.ComputeStringSize(8, AggregateValue);
+        }
         size += UnknownFields.SerializedSize;
         memoizedSerializedSize = size;
         return size;
@@ -8029,6 +8174,9 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
         if (other.HasStringValue) {
           StringValue = other.StringValue;
         }
+        if (other.HasAggregateValue) {
+          AggregateValue = other.AggregateValue;
+        }
         this.MergeUnknownFields(other.UnknownFields);
         return this;
       }
@@ -8096,6 +8244,10 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
               result.hasStringValue = input.ReadBytes(ref result.stringValue_);
               break;
             }
+            case 66: {
+              result.hasAggregateValue = input.ReadString(ref result.aggregateValue_);
+              break;
+            }
           }
         }
         
@@ -8253,12 +8405,705 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
         result.stringValue_ = pb::ByteString.Empty;
         return this;
       }
+      
+      public bool HasAggregateValue {
+        get { return result.hasAggregateValue; }
+      }
+      public string AggregateValue {
+        get { return result.AggregateValue; }
+        set { SetAggregateValue(value); }
+      }
+      public Builder SetAggregateValue(string value) {
+        pb::ThrowHelper.ThrowIfNull(value, "value");
+        PrepareBuilder();
+        result.hasAggregateValue = true;
+        result.aggregateValue_ = value;
+        return this;
+      }
+      public Builder ClearAggregateValue() {
+        PrepareBuilder();
+        result.hasAggregateValue = false;
+        result.aggregateValue_ = "";
+        return this;
+      }
     }
     static UninterpretedOption() {
       object.ReferenceEquals(global::Google.ProtocolBuffers.DescriptorProtos.DescriptorProtoFile.Descriptor, null);
     }
   }
   
+  [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+  [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+  [global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
+  public sealed partial class SourceCodeInfo : pb::GeneratedMessage<SourceCodeInfo, SourceCodeInfo.Builder> {
+    private SourceCodeInfo() { }
+    private static readonly SourceCodeInfo defaultInstance = new SourceCodeInfo().MakeReadOnly();
+    private static readonly string[] _sourceCodeInfoFieldNames = new string[] { "location" };
+    private static readonly uint[] _sourceCodeInfoFieldTags = new uint[] { 10 };
+    public static SourceCodeInfo DefaultInstance {
+      get { return defaultInstance; }
+    }
+    
+    public override SourceCodeInfo DefaultInstanceForType {
+      get { return DefaultInstance; }
+    }
+    
+    protected override SourceCodeInfo ThisMessage {
+      get { return this; }
+    }
+    
+    public static pbd::MessageDescriptor Descriptor {
+      get { return global::Google.ProtocolBuffers.DescriptorProtos.DescriptorProtoFile.internal__static_google_protobuf_SourceCodeInfo__Descriptor; }
+    }
+    
+    protected override pb::FieldAccess.FieldAccessorTable<SourceCodeInfo, SourceCodeInfo.Builder> InternalFieldAccessors {
+      get { return global::Google.ProtocolBuffers.DescriptorProtos.DescriptorProtoFile.internal__static_google_protobuf_SourceCodeInfo__FieldAccessorTable; }
+    }
+    
+    #region Nested types
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
+    public static class Types {
+      [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+      [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+      [global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
+      public sealed partial class Location : pb::GeneratedMessage<Location, Location.Builder> {
+        private Location() { }
+        private static readonly Location defaultInstance = new Location().MakeReadOnly();
+        private static readonly string[] _locationFieldNames = new string[] { "path", "span" };
+        private static readonly uint[] _locationFieldTags = new uint[] { 10, 18 };
+        public static Location DefaultInstance {
+          get { return defaultInstance; }
+        }
+        
+        public override Location DefaultInstanceForType {
+          get { return DefaultInstance; }
+        }
+        
+        protected override Location ThisMessage {
+          get { return this; }
+        }
+        
+        public static pbd::MessageDescriptor Descriptor {
+          get { return global::Google.ProtocolBuffers.DescriptorProtos.DescriptorProtoFile.internal__static_google_protobuf_SourceCodeInfo_Location__Descriptor; }
+        }
+        
+        protected override pb::FieldAccess.FieldAccessorTable<Location, Location.Builder> InternalFieldAccessors {
+          get { return global::Google.ProtocolBuffers.DescriptorProtos.DescriptorProtoFile.internal__static_google_protobuf_SourceCodeInfo_Location__FieldAccessorTable; }
+        }
+        
+        public const int PathFieldNumber = 1;
+        private int pathMemoizedSerializedSize;
+        private pbc::PopsicleList<int> path_ = new pbc::PopsicleList<int>();
+        public scg::IList<int> PathList {
+          get { return pbc::Lists.AsReadOnly(path_); }
+        }
+        public int PathCount {
+          get { return path_.Count; }
+        }
+        public int GetPath(int index) {
+          return path_[index];
+        }
+        
+        public const int SpanFieldNumber = 2;
+        private int spanMemoizedSerializedSize;
+        private pbc::PopsicleList<int> span_ = new pbc::PopsicleList<int>();
+        public scg::IList<int> SpanList {
+          get { return pbc::Lists.AsReadOnly(span_); }
+        }
+        public int SpanCount {
+          get { return span_.Count; }
+        }
+        public int GetSpan(int index) {
+          return span_[index];
+        }
+        
+        public override bool IsInitialized {
+          get {
+            return true;
+          }
+        }
+        
+        public override void WriteTo(pb::ICodedOutputStream output) {
+          int size = SerializedSize;
+          string[] field_names = _locationFieldNames;
+          if (path_.Count > 0) {
+            output.WritePackedInt32Array(1, field_names[0], pathMemoizedSerializedSize, path_);
+          }
+          if (span_.Count > 0) {
+            output.WritePackedInt32Array(2, field_names[1], spanMemoizedSerializedSize, span_);
+          }
+          UnknownFields.WriteTo(output);
+        }
+        
+        private int memoizedSerializedSize = -1;
+        public override int SerializedSize {
+          get {
+            int size = memoizedSerializedSize;
+            if (size != -1) return size;
+            
+            size = 0;
+            {
+              int dataSize = 0;
+              foreach (int element in PathList) {
+                dataSize += pb::CodedOutputStream.ComputeInt32SizeNoTag(element);
+              }
+              size += dataSize;
+              if (path_.Count != 0) {
+                size += 1 + pb::CodedOutputStream.ComputeInt32SizeNoTag(dataSize);
+              }
+              pathMemoizedSerializedSize = dataSize;
+            }
+            {
+              int dataSize = 0;
+              foreach (int element in SpanList) {
+                dataSize += pb::CodedOutputStream.ComputeInt32SizeNoTag(element);
+              }
+              size += dataSize;
+              if (span_.Count != 0) {
+                size += 1 + pb::CodedOutputStream.ComputeInt32SizeNoTag(dataSize);
+              }
+              spanMemoizedSerializedSize = dataSize;
+            }
+            size += UnknownFields.SerializedSize;
+            memoizedSerializedSize = size;
+            return size;
+          }
+        }
+        
+        public static Location ParseFrom(pb::ByteString data) {
+          return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+        }
+        public static Location ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+          return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+        }
+        public static Location ParseFrom(byte[] data) {
+          return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+        }
+        public static Location ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+          return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+        }
+        public static Location ParseFrom(global::System.IO.Stream input) {
+          return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+        }
+        public static Location ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+          return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+        }
+        public static Location ParseDelimitedFrom(global::System.IO.Stream input) {
+          return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+        }
+        public static Location ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+          return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+        }
+        public static Location ParseFrom(pb::ICodedInputStream input) {
+          return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+        }
+        public static Location ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+          return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+        }
+        private Location MakeReadOnly() {
+          path_.MakeReadOnly();
+          span_.MakeReadOnly();
+          return this;
+        }
+        
+        public static Builder CreateBuilder() { return new Builder(); }
+        public override Builder ToBuilder() { return CreateBuilder(this); }
+        public override Builder CreateBuilderForType() { return new Builder(); }
+        public static Builder CreateBuilder(Location prototype) {
+          return new Builder(prototype);
+        }
+        
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
+        public sealed partial class Builder : pb::GeneratedBuilder<Location, Builder> {
+          protected override Builder ThisBuilder {
+            get { return this; }
+          }
+          public Builder() {
+            result = DefaultInstance;
+            resultIsReadOnly = true;
+          }
+          internal Builder(Location cloneFrom) {
+            result = cloneFrom;
+            resultIsReadOnly = true;
+          }
+          
+          private bool resultIsReadOnly;
+          private Location result;
+          
+          private Location PrepareBuilder() {
+            if (resultIsReadOnly) {
+              Location original = result;
+              result = new Location();
+              resultIsReadOnly = false;
+              MergeFrom(original);
+            }
+            return result;
+          }
+          
+          public override bool IsInitialized {
+            get { return result.IsInitialized; }
+          }
+          
+          protected override Location MessageBeingBuilt {
+            get { return PrepareBuilder(); }
+          }
+          
+          public override Builder Clear() {
+            result = DefaultInstance;
+            resultIsReadOnly = true;
+            return this;
+          }
+          
+          public override Builder Clone() {
+            if (resultIsReadOnly) {
+              return new Builder(result);
+            } else {
+              return new Builder().MergeFrom(result);
+            }
+          }
+          
+          public override pbd::MessageDescriptor DescriptorForType {
+            get { return global::Google.ProtocolBuffers.DescriptorProtos.SourceCodeInfo.Types.Location.Descriptor; }
+          }
+          
+          public override Location DefaultInstanceForType {
+            get { return global::Google.ProtocolBuffers.DescriptorProtos.SourceCodeInfo.Types.Location.DefaultInstance; }
+          }
+          
+          public override Location BuildPartial() {
+            if (resultIsReadOnly) {
+              return result;
+            }
+            resultIsReadOnly = true;
+            return result.MakeReadOnly();
+          }
+          
+          public override Builder MergeFrom(pb::IMessage other) {
+            if (other is Location) {
+              return MergeFrom((Location) other);
+            } else {
+              base.MergeFrom(other);
+              return this;
+            }
+          }
+          
+          public override Builder MergeFrom(Location other) {
+            if (other == global::Google.ProtocolBuffers.DescriptorProtos.SourceCodeInfo.Types.Location.DefaultInstance) return this;
+            PrepareBuilder();
+            if (other.path_.Count != 0) {
+              result.path_.Add(other.path_);
+            }
+            if (other.span_.Count != 0) {
+              result.span_.Add(other.span_);
+            }
+            this.MergeUnknownFields(other.UnknownFields);
+            return this;
+          }
+          
+          public override Builder MergeFrom(pb::ICodedInputStream input) {
+            return MergeFrom(input, pb::ExtensionRegistry.Empty);
+          }
+          
+          public override Builder MergeFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+            PrepareBuilder();
+            pb::UnknownFieldSet.Builder unknownFields = null;
+            uint tag;
+            string field_name;
+            while (input.ReadTag(out tag, out field_name)) {
+              if(tag == 0 && field_name != null) {
+                int field_ordinal = global::System.Array.BinarySearch(_locationFieldNames, field_name, global::System.StringComparer.Ordinal);
+                if(field_ordinal >= 0)
+                  tag = _locationFieldTags[field_ordinal];
+                else {
+                  if (unknownFields == null) {
+                    unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+                  }
+                  ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
+                  continue;
+                }
+              }
+              switch (tag) {
+                case 0: {
+                  throw pb::InvalidProtocolBufferException.InvalidTag();
+                }
+                default: {
+                  if (pb::WireFormat.IsEndGroupTag(tag)) {
+                    if (unknownFields != null) {
+                      this.UnknownFields = unknownFields.Build();
+                    }
+                    return this;
+                  }
+                  if (unknownFields == null) {
+                    unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+                  }
+                  ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
+                  break;
+                }
+                case 10:
+                case 8: {
+                  input.ReadInt32Array(tag, field_name, result.path_);
+                  break;
+                }
+                case 18:
+                case 16: {
+                  input.ReadInt32Array(tag, field_name, result.span_);
+                  break;
+                }
+              }
+            }
+            
+            if (unknownFields != null) {
+              this.UnknownFields = unknownFields.Build();
+            }
+            return this;
+          }
+          
+          
+          public pbc::IPopsicleList<int> PathList {
+            get { return PrepareBuilder().path_; }
+          }
+          public int PathCount {
+            get { return result.PathCount; }
+          }
+          public int GetPath(int index) {
+            return result.GetPath(index);
+          }
+          public Builder SetPath(int index, int value) {
+            PrepareBuilder();
+            result.path_[index] = value;
+            return this;
+          }
+          public Builder AddPath(int value) {
+            PrepareBuilder();
+            result.path_.Add(value);
+            return this;
+          }
+          public Builder AddRangePath(scg::IEnumerable<int> values) {
+            PrepareBuilder();
+            result.path_.Add(values);
+            return this;
+          }
+          public Builder ClearPath() {
+            PrepareBuilder();
+            result.path_.Clear();
+            return this;
+          }
+          
+          public pbc::IPopsicleList<int> SpanList {
+            get { return PrepareBuilder().span_; }
+          }
+          public int SpanCount {
+            get { return result.SpanCount; }
+          }
+          public int GetSpan(int index) {
+            return result.GetSpan(index);
+          }
+          public Builder SetSpan(int index, int value) {
+            PrepareBuilder();
+            result.span_[index] = value;
+            return this;
+          }
+          public Builder AddSpan(int value) {
+            PrepareBuilder();
+            result.span_.Add(value);
+            return this;
+          }
+          public Builder AddRangeSpan(scg::IEnumerable<int> values) {
+            PrepareBuilder();
+            result.span_.Add(values);
+            return this;
+          }
+          public Builder ClearSpan() {
+            PrepareBuilder();
+            result.span_.Clear();
+            return this;
+          }
+        }
+        static Location() {
+          object.ReferenceEquals(global::Google.ProtocolBuffers.DescriptorProtos.DescriptorProtoFile.Descriptor, null);
+        }
+      }
+      
+    }
+    #endregion
+    
+    public const int LocationFieldNumber = 1;
+    private pbc::PopsicleList<global::Google.ProtocolBuffers.DescriptorProtos.SourceCodeInfo.Types.Location> location_ = new pbc::PopsicleList<global::Google.ProtocolBuffers.DescriptorProtos.SourceCodeInfo.Types.Location>();
+    public scg::IList<global::Google.ProtocolBuffers.DescriptorProtos.SourceCodeInfo.Types.Location> LocationList {
+      get { return location_; }
+    }
+    public int LocationCount {
+      get { return location_.Count; }
+    }
+    public global::Google.ProtocolBuffers.DescriptorProtos.SourceCodeInfo.Types.Location GetLocation(int index) {
+      return location_[index];
+    }
+    
+    public override bool IsInitialized {
+      get {
+        return true;
+      }
+    }
+    
+    public override void WriteTo(pb::ICodedOutputStream output) {
+      int size = SerializedSize;
+      string[] field_names = _sourceCodeInfoFieldNames;
+      if (location_.Count > 0) {
+        output.WriteMessageArray(1, field_names[0], location_);
+      }
+      UnknownFields.WriteTo(output);
+    }
+    
+    private int memoizedSerializedSize = -1;
+    public override int SerializedSize {
+      get {
+        int size = memoizedSerializedSize;
+        if (size != -1) return size;
+        
+        size = 0;
+        foreach (global::Google.ProtocolBuffers.DescriptorProtos.SourceCodeInfo.Types.Location element in LocationList) {
+          size += pb::CodedOutputStream.ComputeMessageSize(1, element);
+        }
+        size += UnknownFields.SerializedSize;
+        memoizedSerializedSize = size;
+        return size;
+      }
+    }
+    
+    public static SourceCodeInfo ParseFrom(pb::ByteString data) {
+      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+    }
+    public static SourceCodeInfo ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+    }
+    public static SourceCodeInfo ParseFrom(byte[] data) {
+      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+    }
+    public static SourceCodeInfo ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+    }
+    public static SourceCodeInfo ParseFrom(global::System.IO.Stream input) {
+      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+    }
+    public static SourceCodeInfo ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+    }
+    public static SourceCodeInfo ParseDelimitedFrom(global::System.IO.Stream input) {
+      return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+    }
+    public static SourceCodeInfo ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+      return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+    }
+    public static SourceCodeInfo ParseFrom(pb::ICodedInputStream input) {
+      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+    }
+    public static SourceCodeInfo ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+    }
+    private SourceCodeInfo MakeReadOnly() {
+      location_.MakeReadOnly();
+      return this;
+    }
+    
+    public static Builder CreateBuilder() { return new Builder(); }
+    public override Builder ToBuilder() { return CreateBuilder(this); }
+    public override Builder CreateBuilderForType() { return new Builder(); }
+    public static Builder CreateBuilder(SourceCodeInfo prototype) {
+      return new Builder(prototype);
+    }
+    
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
+    public sealed partial class Builder : pb::GeneratedBuilder<SourceCodeInfo, Builder> {
+      protected override Builder ThisBuilder {
+        get { return this; }
+      }
+      public Builder() {
+        result = DefaultInstance;
+        resultIsReadOnly = true;
+      }
+      internal Builder(SourceCodeInfo cloneFrom) {
+        result = cloneFrom;
+        resultIsReadOnly = true;
+      }
+      
+      private bool resultIsReadOnly;
+      private SourceCodeInfo result;
+      
+      private SourceCodeInfo PrepareBuilder() {
+        if (resultIsReadOnly) {
+          SourceCodeInfo original = result;
+          result = new SourceCodeInfo();
+          resultIsReadOnly = false;
+          MergeFrom(original);
+        }
+        return result;
+      }
+      
+      public override bool IsInitialized {
+        get { return result.IsInitialized; }
+      }
+      
+      protected override SourceCodeInfo MessageBeingBuilt {
+        get { return PrepareBuilder(); }
+      }
+      
+      public override Builder Clear() {
+        result = DefaultInstance;
+        resultIsReadOnly = true;
+        return this;
+      }
+      
+      public override Builder Clone() {
+        if (resultIsReadOnly) {
+          return new Builder(result);
+        } else {
+          return new Builder().MergeFrom(result);
+        }
+      }
+      
+      public override pbd::MessageDescriptor DescriptorForType {
+        get { return global::Google.ProtocolBuffers.DescriptorProtos.SourceCodeInfo.Descriptor; }
+      }
+      
+      public override SourceCodeInfo DefaultInstanceForType {
+        get { return global::Google.ProtocolBuffers.DescriptorProtos.SourceCodeInfo.DefaultInstance; }
+      }
+      
+      public override SourceCodeInfo BuildPartial() {
+        if (resultIsReadOnly) {
+          return result;
+        }
+        resultIsReadOnly = true;
+        return result.MakeReadOnly();
+      }
+      
+      public override Builder MergeFrom(pb::IMessage other) {
+        if (other is SourceCodeInfo) {
+          return MergeFrom((SourceCodeInfo) other);
+        } else {
+          base.MergeFrom(other);
+          return this;
+        }
+      }
+      
+      public override Builder MergeFrom(SourceCodeInfo other) {
+        if (other == global::Google.ProtocolBuffers.DescriptorProtos.SourceCodeInfo.DefaultInstance) return this;
+        PrepareBuilder();
+        if (other.location_.Count != 0) {
+          result.location_.Add(other.location_);
+        }
+        this.MergeUnknownFields(other.UnknownFields);
+        return this;
+      }
+      
+      public override Builder MergeFrom(pb::ICodedInputStream input) {
+        return MergeFrom(input, pb::ExtensionRegistry.Empty);
+      }
+      
+      public override Builder MergeFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+        PrepareBuilder();
+        pb::UnknownFieldSet.Builder unknownFields = null;
+        uint tag;
+        string field_name;
+        while (input.ReadTag(out tag, out field_name)) {
+          if(tag == 0 && field_name != null) {
+            int field_ordinal = global::System.Array.BinarySearch(_sourceCodeInfoFieldNames, field_name, global::System.StringComparer.Ordinal);
+            if(field_ordinal >= 0)
+              tag = _sourceCodeInfoFieldTags[field_ordinal];
+            else {
+              if (unknownFields == null) {
+                unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+              }
+              ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
+              continue;
+            }
+          }
+          switch (tag) {
+            case 0: {
+              throw pb::InvalidProtocolBufferException.InvalidTag();
+            }
+            default: {
+              if (pb::WireFormat.IsEndGroupTag(tag)) {
+                if (unknownFields != null) {
+                  this.UnknownFields = unknownFields.Build();
+                }
+                return this;
+              }
+              if (unknownFields == null) {
+                unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+              }
+              ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
+              break;
+            }
+            case 10: {
+              input.ReadMessageArray(tag, field_name, result.location_, global::Google.ProtocolBuffers.DescriptorProtos.SourceCodeInfo.Types.Location.DefaultInstance, extensionRegistry);
+              break;
+            }
+          }
+        }
+        
+        if (unknownFields != null) {
+          this.UnknownFields = unknownFields.Build();
+        }
+        return this;
+      }
+      
+      
+      public pbc::IPopsicleList<global::Google.ProtocolBuffers.DescriptorProtos.SourceCodeInfo.Types.Location> LocationList {
+        get { return PrepareBuilder().location_; }
+      }
+      public int LocationCount {
+        get { return result.LocationCount; }
+      }
+      public global::Google.ProtocolBuffers.DescriptorProtos.SourceCodeInfo.Types.Location GetLocation(int index) {
+        return result.GetLocation(index);
+      }
+      public Builder SetLocation(int index, global::Google.ProtocolBuffers.DescriptorProtos.SourceCodeInfo.Types.Location value) {
+        pb::ThrowHelper.ThrowIfNull(value, "value");
+        PrepareBuilder();
+        result.location_[index] = value;
+        return this;
+      }
+      public Builder SetLocation(int index, global::Google.ProtocolBuffers.DescriptorProtos.SourceCodeInfo.Types.Location.Builder builderForValue) {
+        pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+        PrepareBuilder();
+        result.location_[index] = builderForValue.Build();
+        return this;
+      }
+      public Builder AddLocation(global::Google.ProtocolBuffers.DescriptorProtos.SourceCodeInfo.Types.Location value) {
+        pb::ThrowHelper.ThrowIfNull(value, "value");
+        PrepareBuilder();
+        result.location_.Add(value);
+        return this;
+      }
+      public Builder AddLocation(global::Google.ProtocolBuffers.DescriptorProtos.SourceCodeInfo.Types.Location.Builder builderForValue) {
+        pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+        PrepareBuilder();
+        result.location_.Add(builderForValue.Build());
+        return this;
+      }
+      public Builder AddRangeLocation(scg::IEnumerable<global::Google.ProtocolBuffers.DescriptorProtos.SourceCodeInfo.Types.Location> values) {
+        PrepareBuilder();
+        result.location_.Add(values);
+        return this;
+      }
+      public Builder ClearLocation() {
+        PrepareBuilder();
+        result.location_.Clear();
+        return this;
+      }
+    }
+    static SourceCodeInfo() {
+      object.ReferenceEquals(global::Google.ProtocolBuffers.DescriptorProtos.DescriptorProtoFile.Descriptor, null);
+    }
+  }
+  
   #endregion
   
 }

+ 5 - 2
src/ProtocolBuffers2008.sln

@@ -1,6 +1,6 @@
-
 Microsoft Visual Studio Solution File, Format Version 10.00
 # Visual Studio 2008
+
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "proto", "proto", "{1F896D5C-5FC2-4671-9216-781CB8187EC7}"
 	ProjectSection(SolutionItems) = preProject
 		..\protos\tutorial\addressbook.proto = ..\protos\tutorial\addressbook.proto
@@ -18,8 +18,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "unittest", "unittest", "{C8
 		..\protos\google\protobuf\unittest_embed_optimize_for.proto = ..\protos\google\protobuf\unittest_embed_optimize_for.proto
 		..\protos\google\protobuf\unittest_empty.proto = ..\protos\google\protobuf\unittest_empty.proto
 		..\protos\google\protobuf\unittest_enormous_descriptor.proto = ..\protos\google\protobuf\unittest_enormous_descriptor.proto
-		..\protos\extest\unittest_extras_lite.proto = ..\protos\extest\unittest_extras_lite.proto
+		..\protos\extest\unittest_extras.proto = ..\protos\extest\unittest_extras.proto
+		..\protos\extest\unittest_extras_full.proto = ..\protos\extest\unittest_extras_full.proto
 		..\protos\extest\unittest_extras_xmltest.proto = ..\protos\extest\unittest_extras_xmltest.proto
+		..\protos\extest\unittest_extras_lite.proto = ..\protos\extest\unittest_extras_lite.proto
 		..\protos\extest\unittest_generic_services.proto = ..\protos\extest\unittest_generic_services.proto
 		..\protos\google\protobuf\unittest_import.proto = ..\protos\google\protobuf\unittest_import.proto
 		..\protos\google\protobuf\unittest_import_lite.proto = ..\protos\google\protobuf\unittest_import_lite.proto
@@ -30,6 +32,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "unittest", "unittest", "{C8
 		..\protos\google\protobuf\unittest_no_generic_services.proto = ..\protos\google\protobuf\unittest_no_generic_services.proto
 		..\protos\google\protobuf\unittest_optimize_for.proto = ..\protos\google\protobuf\unittest_optimize_for.proto
 		..\protos\extest\unittest_rpc_interop.proto = ..\protos\extest\unittest_rpc_interop.proto
+		..\protos\extest\unittest_rpc_interop_lite.proto = ..\protos\extest\unittest_rpc_interop_lite.proto
 	EndProjectSection
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProtocolBuffers", "ProtocolBuffers\ProtocolBuffers.csproj", "{6908BDCE-D925-43F3-94AC-A531E6DF2591}"

+ 1 - 0
src/ProtocolBuffersLite.Test/ExtendableMessageLiteTest.cs

@@ -348,6 +348,7 @@ namespace Google.ProtocolBuffers
 
             ExtensionRegistry registry = ExtensionRegistry.CreateInstance();
             UnitTestLiteProtoFile.RegisterAllExtensions(registry);
+            UnitTestExtrasLiteProtoFile.RegisterAllExtensions(registry);
 
             TestUnpackedExtensionsLite unpacked = TestUnpackedExtensionsLite.ParseFrom(original.ToByteArray(), registry);
 

+ 7 - 0
src/ProtocolBuffersLite.Test/ProtocolBuffersLite.Test.csproj

@@ -66,8 +66,15 @@
     <Compile Include="TestProtos\UnitTestExtrasLiteProtoFile.cs" />
     <Compile Include="TestProtos\UnitTestImportLiteProtoFile.cs" />
     <Compile Include="TestProtos\UnitTestLiteProtoFile.cs" />
+    <Compile Include="TestProtos\UnitTestRpcInteropLite.cs" />
+    <Compile Include="TestRpcForMimeTypes.cs" />
+    <Compile Include="TestRpcGenerator.cs" />
   </ItemGroup>
   <ItemGroup>
+    <ProjectReference Include="..\ProtocolBuffers.Serialization\ProtocolBuffersLite.Serialization.csproj">
+      <Project>{E067A59D-9D0A-4A1F-92B1-38E4457241D1}</Project>
+      <Name>ProtocolBuffersLite.Serialization</Name>
+    </ProjectReference>
     <ProjectReference Include="..\ProtocolBuffers\ProtocolBuffersLite.csproj">
       <Project>{6969BDCE-D925-43F3-94AC-A531E6DF2591}</Project>
       <Name>ProtocolBuffersLite</Name>

+ 1599 - 0
src/ProtocolBuffersLite.Test/TestProtos/UnitTestExtrasLiteProtoFile.cs

@@ -16,11 +16,57 @@ namespace Google.ProtocolBuffers.TestProtos {
     #region Extension registration
     public static void RegisterAllExtensions(pb::ExtensionRegistry registry) {
       registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasLiteProtoFile.EmployeeIdLite);
+      registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasLiteProtoFile.UnpackedInt32ExtensionLite);
+      registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasLiteProtoFile.UnpackedInt64ExtensionLite);
+      registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasLiteProtoFile.UnpackedUint32ExtensionLite);
+      registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasLiteProtoFile.UnpackedUint64ExtensionLite);
+      registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasLiteProtoFile.UnpackedSint32ExtensionLite);
+      registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasLiteProtoFile.UnpackedSint64ExtensionLite);
+      registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasLiteProtoFile.UnpackedFixed32ExtensionLite);
+      registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasLiteProtoFile.UnpackedFixed64ExtensionLite);
+      registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasLiteProtoFile.UnpackedSfixed32ExtensionLite);
+      registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasLiteProtoFile.UnpackedSfixed64ExtensionLite);
+      registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasLiteProtoFile.UnpackedFloatExtensionLite);
+      registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasLiteProtoFile.UnpackedDoubleExtensionLite);
+      registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasLiteProtoFile.UnpackedBoolExtensionLite);
+      registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasLiteProtoFile.UnpackedEnumExtensionLite);
     }
     #endregion
     #region Extensions
     public const int EmployeeIdLiteFieldNumber = 126;
     public static pb::GeneratedExtensionLite<global::Google.ProtocolBuffers.TestProtos.TestInteropPersonLite, global::Google.ProtocolBuffers.TestProtos.TestInteropEmployeeIdLite> EmployeeIdLite;
+    public const int UnpackedInt32ExtensionLiteFieldNumber = 90;
+    public static pb::GeneratedRepeatExtensionLite<global::Google.ProtocolBuffers.TestProtos.TestUnpackedExtensionsLite, int> UnpackedInt32ExtensionLite;
+    public const int UnpackedInt64ExtensionLiteFieldNumber = 91;
+    public static pb::GeneratedRepeatExtensionLite<global::Google.ProtocolBuffers.TestProtos.TestUnpackedExtensionsLite, long> UnpackedInt64ExtensionLite;
+    public const int UnpackedUint32ExtensionLiteFieldNumber = 92;
+    [global::System.CLSCompliant(false)]
+    public static pb::GeneratedRepeatExtensionLite<global::Google.ProtocolBuffers.TestProtos.TestUnpackedExtensionsLite, uint> UnpackedUint32ExtensionLite;
+    public const int UnpackedUint64ExtensionLiteFieldNumber = 93;
+    [global::System.CLSCompliant(false)]
+    public static pb::GeneratedRepeatExtensionLite<global::Google.ProtocolBuffers.TestProtos.TestUnpackedExtensionsLite, ulong> UnpackedUint64ExtensionLite;
+    public const int UnpackedSint32ExtensionLiteFieldNumber = 94;
+    public static pb::GeneratedRepeatExtensionLite<global::Google.ProtocolBuffers.TestProtos.TestUnpackedExtensionsLite, int> UnpackedSint32ExtensionLite;
+    public const int UnpackedSint64ExtensionLiteFieldNumber = 95;
+    public static pb::GeneratedRepeatExtensionLite<global::Google.ProtocolBuffers.TestProtos.TestUnpackedExtensionsLite, long> UnpackedSint64ExtensionLite;
+    public const int UnpackedFixed32ExtensionLiteFieldNumber = 96;
+    [global::System.CLSCompliant(false)]
+    public static pb::GeneratedRepeatExtensionLite<global::Google.ProtocolBuffers.TestProtos.TestUnpackedExtensionsLite, uint> UnpackedFixed32ExtensionLite;
+    public const int UnpackedFixed64ExtensionLiteFieldNumber = 97;
+    [global::System.CLSCompliant(false)]
+    public static pb::GeneratedRepeatExtensionLite<global::Google.ProtocolBuffers.TestProtos.TestUnpackedExtensionsLite, ulong> UnpackedFixed64ExtensionLite;
+    public const int UnpackedSfixed32ExtensionLiteFieldNumber = 98;
+    public static pb::GeneratedRepeatExtensionLite<global::Google.ProtocolBuffers.TestProtos.TestUnpackedExtensionsLite, int> UnpackedSfixed32ExtensionLite;
+    public const int UnpackedSfixed64ExtensionLiteFieldNumber = 99;
+    public static pb::GeneratedRepeatExtensionLite<global::Google.ProtocolBuffers.TestProtos.TestUnpackedExtensionsLite, long> UnpackedSfixed64ExtensionLite;
+    public const int UnpackedFloatExtensionLiteFieldNumber = 100;
+    public static pb::GeneratedRepeatExtensionLite<global::Google.ProtocolBuffers.TestProtos.TestUnpackedExtensionsLite, float> UnpackedFloatExtensionLite;
+    public const int UnpackedDoubleExtensionLiteFieldNumber = 101;
+    public static pb::GeneratedRepeatExtensionLite<global::Google.ProtocolBuffers.TestProtos.TestUnpackedExtensionsLite, double> UnpackedDoubleExtensionLite;
+    public const int UnpackedBoolExtensionLiteFieldNumber = 102;
+    public static pb::GeneratedRepeatExtensionLite<global::Google.ProtocolBuffers.TestProtos.TestUnpackedExtensionsLite, bool> UnpackedBoolExtensionLite;
+    public const int UnpackedEnumExtensionLiteFieldNumber = 103;
+    public static pb::GeneratedRepeatExtensionLite<global::Google.ProtocolBuffers.TestProtos.TestUnpackedExtensionsLite, global::Google.ProtocolBuffers.TestProtos.UnpackedTypesForeignEnumLite> UnpackedEnumExtensionLite;
     #endregion
     
     #region Static variables
@@ -38,6 +84,132 @@ namespace Google.ProtocolBuffers.TestProtos {
           null,
           global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasLiteProtoFile.EmployeeIdLiteFieldNumber,
           pbd::FieldType.Message);
+      global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasLiteProtoFile.UnpackedInt32ExtensionLite = 
+        new pb::GeneratedRepeatExtensionLite<global::Google.ProtocolBuffers.TestProtos.TestUnpackedExtensionsLite, int>(
+          "protobuf_unittest_extra.unpacked_int32_extension_lite",
+          global::Google.ProtocolBuffers.TestProtos.TestUnpackedExtensionsLite.DefaultInstance,
+          null,
+          null,
+          global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasLiteProtoFile.UnpackedInt32ExtensionLiteFieldNumber,
+          pbd::FieldType.Int32,
+          false);
+      global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasLiteProtoFile.UnpackedInt64ExtensionLite = 
+        new pb::GeneratedRepeatExtensionLite<global::Google.ProtocolBuffers.TestProtos.TestUnpackedExtensionsLite, long>(
+          "protobuf_unittest_extra.unpacked_int64_extension_lite",
+          global::Google.ProtocolBuffers.TestProtos.TestUnpackedExtensionsLite.DefaultInstance,
+          null,
+          null,
+          global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasLiteProtoFile.UnpackedInt64ExtensionLiteFieldNumber,
+          pbd::FieldType.Int64,
+          false);
+      global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasLiteProtoFile.UnpackedUint32ExtensionLite = 
+        new pb::GeneratedRepeatExtensionLite<global::Google.ProtocolBuffers.TestProtos.TestUnpackedExtensionsLite, uint>(
+          "protobuf_unittest_extra.unpacked_uint32_extension_lite",
+          global::Google.ProtocolBuffers.TestProtos.TestUnpackedExtensionsLite.DefaultInstance,
+          null,
+          null,
+          global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasLiteProtoFile.UnpackedUint32ExtensionLiteFieldNumber,
+          pbd::FieldType.UInt32,
+          false);
+      global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasLiteProtoFile.UnpackedUint64ExtensionLite = 
+        new pb::GeneratedRepeatExtensionLite<global::Google.ProtocolBuffers.TestProtos.TestUnpackedExtensionsLite, ulong>(
+          "protobuf_unittest_extra.unpacked_uint64_extension_lite",
+          global::Google.ProtocolBuffers.TestProtos.TestUnpackedExtensionsLite.DefaultInstance,
+          null,
+          null,
+          global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasLiteProtoFile.UnpackedUint64ExtensionLiteFieldNumber,
+          pbd::FieldType.UInt64,
+          false);
+      global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasLiteProtoFile.UnpackedSint32ExtensionLite = 
+        new pb::GeneratedRepeatExtensionLite<global::Google.ProtocolBuffers.TestProtos.TestUnpackedExtensionsLite, int>(
+          "protobuf_unittest_extra.unpacked_sint32_extension_lite",
+          global::Google.ProtocolBuffers.TestProtos.TestUnpackedExtensionsLite.DefaultInstance,
+          null,
+          null,
+          global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasLiteProtoFile.UnpackedSint32ExtensionLiteFieldNumber,
+          pbd::FieldType.SInt32,
+          false);
+      global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasLiteProtoFile.UnpackedSint64ExtensionLite = 
+        new pb::GeneratedRepeatExtensionLite<global::Google.ProtocolBuffers.TestProtos.TestUnpackedExtensionsLite, long>(
+          "protobuf_unittest_extra.unpacked_sint64_extension_lite",
+          global::Google.ProtocolBuffers.TestProtos.TestUnpackedExtensionsLite.DefaultInstance,
+          null,
+          null,
+          global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasLiteProtoFile.UnpackedSint64ExtensionLiteFieldNumber,
+          pbd::FieldType.SInt64,
+          false);
+      global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasLiteProtoFile.UnpackedFixed32ExtensionLite = 
+        new pb::GeneratedRepeatExtensionLite<global::Google.ProtocolBuffers.TestProtos.TestUnpackedExtensionsLite, uint>(
+          "protobuf_unittest_extra.unpacked_fixed32_extension_lite",
+          global::Google.ProtocolBuffers.TestProtos.TestUnpackedExtensionsLite.DefaultInstance,
+          null,
+          null,
+          global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasLiteProtoFile.UnpackedFixed32ExtensionLiteFieldNumber,
+          pbd::FieldType.Fixed32,
+          false);
+      global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasLiteProtoFile.UnpackedFixed64ExtensionLite = 
+        new pb::GeneratedRepeatExtensionLite<global::Google.ProtocolBuffers.TestProtos.TestUnpackedExtensionsLite, ulong>(
+          "protobuf_unittest_extra.unpacked_fixed64_extension_lite",
+          global::Google.ProtocolBuffers.TestProtos.TestUnpackedExtensionsLite.DefaultInstance,
+          null,
+          null,
+          global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasLiteProtoFile.UnpackedFixed64ExtensionLiteFieldNumber,
+          pbd::FieldType.Fixed64,
+          false);
+      global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasLiteProtoFile.UnpackedSfixed32ExtensionLite = 
+        new pb::GeneratedRepeatExtensionLite<global::Google.ProtocolBuffers.TestProtos.TestUnpackedExtensionsLite, int>(
+          "protobuf_unittest_extra.unpacked_sfixed32_extension_lite",
+          global::Google.ProtocolBuffers.TestProtos.TestUnpackedExtensionsLite.DefaultInstance,
+          null,
+          null,
+          global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasLiteProtoFile.UnpackedSfixed32ExtensionLiteFieldNumber,
+          pbd::FieldType.SFixed32,
+          false);
+      global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasLiteProtoFile.UnpackedSfixed64ExtensionLite = 
+        new pb::GeneratedRepeatExtensionLite<global::Google.ProtocolBuffers.TestProtos.TestUnpackedExtensionsLite, long>(
+          "protobuf_unittest_extra.unpacked_sfixed64_extension_lite",
+          global::Google.ProtocolBuffers.TestProtos.TestUnpackedExtensionsLite.DefaultInstance,
+          null,
+          null,
+          global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasLiteProtoFile.UnpackedSfixed64ExtensionLiteFieldNumber,
+          pbd::FieldType.SFixed64,
+          false);
+      global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasLiteProtoFile.UnpackedFloatExtensionLite = 
+        new pb::GeneratedRepeatExtensionLite<global::Google.ProtocolBuffers.TestProtos.TestUnpackedExtensionsLite, float>(
+          "protobuf_unittest_extra.unpacked_float_extension_lite",
+          global::Google.ProtocolBuffers.TestProtos.TestUnpackedExtensionsLite.DefaultInstance,
+          null,
+          null,
+          global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasLiteProtoFile.UnpackedFloatExtensionLiteFieldNumber,
+          pbd::FieldType.Float,
+          false);
+      global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasLiteProtoFile.UnpackedDoubleExtensionLite = 
+        new pb::GeneratedRepeatExtensionLite<global::Google.ProtocolBuffers.TestProtos.TestUnpackedExtensionsLite, double>(
+          "protobuf_unittest_extra.unpacked_double_extension_lite",
+          global::Google.ProtocolBuffers.TestProtos.TestUnpackedExtensionsLite.DefaultInstance,
+          null,
+          null,
+          global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasLiteProtoFile.UnpackedDoubleExtensionLiteFieldNumber,
+          pbd::FieldType.Double,
+          false);
+      global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasLiteProtoFile.UnpackedBoolExtensionLite = 
+        new pb::GeneratedRepeatExtensionLite<global::Google.ProtocolBuffers.TestProtos.TestUnpackedExtensionsLite, bool>(
+          "protobuf_unittest_extra.unpacked_bool_extension_lite",
+          global::Google.ProtocolBuffers.TestProtos.TestUnpackedExtensionsLite.DefaultInstance,
+          null,
+          null,
+          global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasLiteProtoFile.UnpackedBoolExtensionLiteFieldNumber,
+          pbd::FieldType.Bool,
+          false);
+      global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasLiteProtoFile.UnpackedEnumExtensionLite = 
+        new pb::GeneratedRepeatExtensionLite<global::Google.ProtocolBuffers.TestProtos.TestUnpackedExtensionsLite, global::Google.ProtocolBuffers.TestProtos.UnpackedTypesForeignEnumLite>(
+          "protobuf_unittest_extra.unpacked_enum_extension_lite",
+          global::Google.ProtocolBuffers.TestProtos.TestUnpackedExtensionsLite.DefaultInstance,
+          null,
+          new EnumLiteMap<global::Google.ProtocolBuffers.TestProtos.UnpackedTypesForeignEnumLite>(),
+          global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasLiteProtoFile.UnpackedEnumExtensionLiteFieldNumber,
+          pbd::FieldType.Enum,
+          false);
     }
     #endregion
     
@@ -52,6 +224,14 @@ namespace Google.ProtocolBuffers.TestProtos {
     EXLITE_BAZ = 9,
   }
   
+  [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+  [global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
+  public enum UnpackedTypesForeignEnumLite {
+    FOREIGN_LITE_FOO = 4,
+    FOREIGN_LITE_BAR = 5,
+    FOREIGN_LITE_BAZ = 6,
+  }
+  
   #endregion
   
   #region Messages
@@ -2038,6 +2218,1425 @@ namespace Google.ProtocolBuffers.TestProtos {
     }
   }
   
+  [global::System.SerializableAttribute()]
+  [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+  [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+  [global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
+  public sealed partial class TestUnpackedExtensionsLite : pb::ExtendableMessageLite<TestUnpackedExtensionsLite, TestUnpackedExtensionsLite.Builder> {
+    private TestUnpackedExtensionsLite() { }
+    private static readonly TestUnpackedExtensionsLite defaultInstance = new TestUnpackedExtensionsLite().MakeReadOnly();
+    private static readonly string[] _testUnpackedExtensionsLiteFieldNames = new string[] {  };
+    private static readonly uint[] _testUnpackedExtensionsLiteFieldTags = new uint[] {  };
+    public static TestUnpackedExtensionsLite DefaultInstance {
+      get { return defaultInstance; }
+    }
+    
+    public override TestUnpackedExtensionsLite DefaultInstanceForType {
+      get { return DefaultInstance; }
+    }
+    
+    protected override TestUnpackedExtensionsLite ThisMessage {
+      get { return this; }
+    }
+    
+    public override bool IsInitialized {
+      get {
+        if (!ExtensionsAreInitialized) return false;
+        return true;
+      }
+    }
+    
+    public override void WriteTo(pb::ICodedOutputStream output) {
+      int size = SerializedSize;
+      string[] field_names = _testUnpackedExtensionsLiteFieldNames;
+      pb::ExtendableMessageLite<TestUnpackedExtensionsLite, TestUnpackedExtensionsLite.Builder>.ExtensionWriter extensionWriter = CreateExtensionWriter(this);
+      extensionWriter.WriteUntil(536870912, output);
+    }
+    
+    private int memoizedSerializedSize = -1;
+    public override int SerializedSize {
+      get {
+        int size = memoizedSerializedSize;
+        if (size != -1) return size;
+        
+        size = 0;
+        size += ExtensionsSerializedSize;
+        memoizedSerializedSize = size;
+        return size;
+      }
+    }
+    
+    #region Lite runtime methods
+    public override int GetHashCode() {
+      int hash = GetType().GetHashCode();
+      hash ^= base.GetHashCode();
+      return hash;
+    }
+    
+    public override bool Equals(object obj) {
+      TestUnpackedExtensionsLite other = obj as TestUnpackedExtensionsLite;
+      if (other == null) return false;
+      if (!base.Equals(other)) return false;
+      return true;
+    }
+    
+    public override void PrintTo(global::System.IO.TextWriter writer) {
+      base.PrintTo(writer);
+    }
+    #endregion
+    
+    public static TestUnpackedExtensionsLite ParseFrom(pb::ByteString data) {
+      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+    }
+    public static TestUnpackedExtensionsLite ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+    }
+    public static TestUnpackedExtensionsLite ParseFrom(byte[] data) {
+      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+    }
+    public static TestUnpackedExtensionsLite ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+    }
+    public static TestUnpackedExtensionsLite ParseFrom(global::System.IO.Stream input) {
+      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+    }
+    public static TestUnpackedExtensionsLite ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+    }
+    public static TestUnpackedExtensionsLite ParseDelimitedFrom(global::System.IO.Stream input) {
+      return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+    }
+    public static TestUnpackedExtensionsLite ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+      return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+    }
+    public static TestUnpackedExtensionsLite ParseFrom(pb::ICodedInputStream input) {
+      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+    }
+    public static TestUnpackedExtensionsLite ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+    }
+    private TestUnpackedExtensionsLite MakeReadOnly() {
+      return this;
+    }
+    
+    public static Builder CreateBuilder() { return new Builder(); }
+    public override Builder ToBuilder() { return CreateBuilder(this); }
+    public override Builder CreateBuilderForType() { return new Builder(); }
+    public static Builder CreateBuilder(TestUnpackedExtensionsLite prototype) {
+      return new Builder(prototype);
+    }
+    
+    [global::System.SerializableAttribute()]
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
+    public sealed partial class Builder : pb::ExtendableBuilderLite<TestUnpackedExtensionsLite, Builder> {
+      protected override Builder ThisBuilder {
+        get { return this; }
+      }
+      public Builder() {
+        result = DefaultInstance;
+        resultIsReadOnly = true;
+      }
+      internal Builder(TestUnpackedExtensionsLite cloneFrom) {
+        result = cloneFrom;
+        resultIsReadOnly = true;
+      }
+      
+      private bool resultIsReadOnly;
+      private TestUnpackedExtensionsLite result;
+      
+      private TestUnpackedExtensionsLite PrepareBuilder() {
+        if (resultIsReadOnly) {
+          TestUnpackedExtensionsLite original = result;
+          result = new TestUnpackedExtensionsLite();
+          resultIsReadOnly = false;
+          MergeFrom(original);
+        }
+        return result;
+      }
+      
+      public override bool IsInitialized {
+        get { return result.IsInitialized; }
+      }
+      
+      protected override TestUnpackedExtensionsLite MessageBeingBuilt {
+        get { return PrepareBuilder(); }
+      }
+      
+      public override Builder Clear() {
+        result = DefaultInstance;
+        resultIsReadOnly = true;
+        return this;
+      }
+      
+      public override Builder Clone() {
+        if (resultIsReadOnly) {
+          return new Builder(result);
+        } else {
+          return new Builder().MergeFrom(result);
+        }
+      }
+      
+      public override TestUnpackedExtensionsLite DefaultInstanceForType {
+        get { return global::Google.ProtocolBuffers.TestProtos.TestUnpackedExtensionsLite.DefaultInstance; }
+      }
+      
+      public override TestUnpackedExtensionsLite BuildPartial() {
+        if (resultIsReadOnly) {
+          return result;
+        }
+        resultIsReadOnly = true;
+        return result.MakeReadOnly();
+      }
+      
+      public override Builder MergeFrom(pb::IMessageLite other) {
+        if (other is TestUnpackedExtensionsLite) {
+          return MergeFrom((TestUnpackedExtensionsLite) other);
+        } else {
+          base.MergeFrom(other);
+          return this;
+        }
+      }
+      
+      public override Builder MergeFrom(TestUnpackedExtensionsLite other) {
+        if (other == global::Google.ProtocolBuffers.TestProtos.TestUnpackedExtensionsLite.DefaultInstance) return this;
+        PrepareBuilder();
+          this.MergeExtensionFields(other);
+        return this;
+      }
+      
+      public override Builder MergeFrom(pb::ICodedInputStream input) {
+        return MergeFrom(input, pb::ExtensionRegistry.Empty);
+      }
+      
+      public override Builder MergeFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+        PrepareBuilder();
+        uint tag;
+        string field_name;
+        while (input.ReadTag(out tag, out field_name)) {
+          if(tag == 0 && field_name != null) {
+            int field_ordinal = global::System.Array.BinarySearch(_testUnpackedExtensionsLiteFieldNames, field_name, global::System.StringComparer.Ordinal);
+            if(field_ordinal >= 0)
+              tag = _testUnpackedExtensionsLiteFieldTags[field_ordinal];
+            else {
+              ParseUnknownField(input, extensionRegistry, tag, field_name);
+              continue;
+            }
+          }
+          switch (tag) {
+            case 0: {
+              throw pb::InvalidProtocolBufferException.InvalidTag();
+            }
+            default: {
+              if (pb::WireFormat.IsEndGroupTag(tag)) {
+                return this;
+              }
+              ParseUnknownField(input, extensionRegistry, tag, field_name);
+              break;
+            }
+          }
+        }
+        
+        return this;
+      }
+      
+    }
+    static TestUnpackedExtensionsLite() {
+      object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasLiteProtoFile.Descriptor, null);
+    }
+  }
+  
+  [global::System.SerializableAttribute()]
+  [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+  [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+  [global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
+  public sealed partial class TestUnpackedTypesLite : pb::GeneratedMessageLite<TestUnpackedTypesLite, TestUnpackedTypesLite.Builder> {
+    private TestUnpackedTypesLite() { }
+    private static readonly TestUnpackedTypesLite defaultInstance = new TestUnpackedTypesLite().MakeReadOnly();
+    private static readonly string[] _testUnpackedTypesLiteFieldNames = new string[] { "unpacked_bool", "unpacked_double", "unpacked_enum", "unpacked_fixed32", "unpacked_fixed64", "unpacked_float", "unpacked_int32", "unpacked_int64", "unpacked_sfixed32", "unpacked_sfixed64", "unpacked_sint32", "unpacked_sint64", "unpacked_uint32", "unpacked_uint64" };
+    private static readonly uint[] _testUnpackedTypesLiteFieldTags = new uint[] { 816, 809, 824, 773, 777, 805, 720, 728, 789, 793, 752, 760, 736, 744 };
+    public static TestUnpackedTypesLite DefaultInstance {
+      get { return defaultInstance; }
+    }
+    
+    public override TestUnpackedTypesLite DefaultInstanceForType {
+      get { return DefaultInstance; }
+    }
+    
+    protected override TestUnpackedTypesLite ThisMessage {
+      get { return this; }
+    }
+    
+    public const int UnpackedInt32FieldNumber = 90;
+    private pbc::PopsicleList<int> unpackedInt32_ = new pbc::PopsicleList<int>();
+    public scg::IList<int> UnpackedInt32List {
+      get { return pbc::Lists.AsReadOnly(unpackedInt32_); }
+    }
+    public int UnpackedInt32Count {
+      get { return unpackedInt32_.Count; }
+    }
+    public int GetUnpackedInt32(int index) {
+      return unpackedInt32_[index];
+    }
+    
+    public const int UnpackedInt64FieldNumber = 91;
+    private pbc::PopsicleList<long> unpackedInt64_ = new pbc::PopsicleList<long>();
+    public scg::IList<long> UnpackedInt64List {
+      get { return pbc::Lists.AsReadOnly(unpackedInt64_); }
+    }
+    public int UnpackedInt64Count {
+      get { return unpackedInt64_.Count; }
+    }
+    public long GetUnpackedInt64(int index) {
+      return unpackedInt64_[index];
+    }
+    
+    public const int UnpackedUint32FieldNumber = 92;
+    private pbc::PopsicleList<uint> unpackedUint32_ = new pbc::PopsicleList<uint>();
+    [global::System.CLSCompliant(false)]
+    public scg::IList<uint> UnpackedUint32List {
+      get { return pbc::Lists.AsReadOnly(unpackedUint32_); }
+    }
+    public int UnpackedUint32Count {
+      get { return unpackedUint32_.Count; }
+    }
+    [global::System.CLSCompliant(false)]
+    public uint GetUnpackedUint32(int index) {
+      return unpackedUint32_[index];
+    }
+    
+    public const int UnpackedUint64FieldNumber = 93;
+    private pbc::PopsicleList<ulong> unpackedUint64_ = new pbc::PopsicleList<ulong>();
+    [global::System.CLSCompliant(false)]
+    public scg::IList<ulong> UnpackedUint64List {
+      get { return pbc::Lists.AsReadOnly(unpackedUint64_); }
+    }
+    public int UnpackedUint64Count {
+      get { return unpackedUint64_.Count; }
+    }
+    [global::System.CLSCompliant(false)]
+    public ulong GetUnpackedUint64(int index) {
+      return unpackedUint64_[index];
+    }
+    
+    public const int UnpackedSint32FieldNumber = 94;
+    private pbc::PopsicleList<int> unpackedSint32_ = new pbc::PopsicleList<int>();
+    public scg::IList<int> UnpackedSint32List {
+      get { return pbc::Lists.AsReadOnly(unpackedSint32_); }
+    }
+    public int UnpackedSint32Count {
+      get { return unpackedSint32_.Count; }
+    }
+    public int GetUnpackedSint32(int index) {
+      return unpackedSint32_[index];
+    }
+    
+    public const int UnpackedSint64FieldNumber = 95;
+    private pbc::PopsicleList<long> unpackedSint64_ = new pbc::PopsicleList<long>();
+    public scg::IList<long> UnpackedSint64List {
+      get { return pbc::Lists.AsReadOnly(unpackedSint64_); }
+    }
+    public int UnpackedSint64Count {
+      get { return unpackedSint64_.Count; }
+    }
+    public long GetUnpackedSint64(int index) {
+      return unpackedSint64_[index];
+    }
+    
+    public const int UnpackedFixed32FieldNumber = 96;
+    private pbc::PopsicleList<uint> unpackedFixed32_ = new pbc::PopsicleList<uint>();
+    [global::System.CLSCompliant(false)]
+    public scg::IList<uint> UnpackedFixed32List {
+      get { return pbc::Lists.AsReadOnly(unpackedFixed32_); }
+    }
+    public int UnpackedFixed32Count {
+      get { return unpackedFixed32_.Count; }
+    }
+    [global::System.CLSCompliant(false)]
+    public uint GetUnpackedFixed32(int index) {
+      return unpackedFixed32_[index];
+    }
+    
+    public const int UnpackedFixed64FieldNumber = 97;
+    private pbc::PopsicleList<ulong> unpackedFixed64_ = new pbc::PopsicleList<ulong>();
+    [global::System.CLSCompliant(false)]
+    public scg::IList<ulong> UnpackedFixed64List {
+      get { return pbc::Lists.AsReadOnly(unpackedFixed64_); }
+    }
+    public int UnpackedFixed64Count {
+      get { return unpackedFixed64_.Count; }
+    }
+    [global::System.CLSCompliant(false)]
+    public ulong GetUnpackedFixed64(int index) {
+      return unpackedFixed64_[index];
+    }
+    
+    public const int UnpackedSfixed32FieldNumber = 98;
+    private pbc::PopsicleList<int> unpackedSfixed32_ = new pbc::PopsicleList<int>();
+    public scg::IList<int> UnpackedSfixed32List {
+      get { return pbc::Lists.AsReadOnly(unpackedSfixed32_); }
+    }
+    public int UnpackedSfixed32Count {
+      get { return unpackedSfixed32_.Count; }
+    }
+    public int GetUnpackedSfixed32(int index) {
+      return unpackedSfixed32_[index];
+    }
+    
+    public const int UnpackedSfixed64FieldNumber = 99;
+    private pbc::PopsicleList<long> unpackedSfixed64_ = new pbc::PopsicleList<long>();
+    public scg::IList<long> UnpackedSfixed64List {
+      get { return pbc::Lists.AsReadOnly(unpackedSfixed64_); }
+    }
+    public int UnpackedSfixed64Count {
+      get { return unpackedSfixed64_.Count; }
+    }
+    public long GetUnpackedSfixed64(int index) {
+      return unpackedSfixed64_[index];
+    }
+    
+    public const int UnpackedFloatFieldNumber = 100;
+    private pbc::PopsicleList<float> unpackedFloat_ = new pbc::PopsicleList<float>();
+    public scg::IList<float> UnpackedFloatList {
+      get { return pbc::Lists.AsReadOnly(unpackedFloat_); }
+    }
+    public int UnpackedFloatCount {
+      get { return unpackedFloat_.Count; }
+    }
+    public float GetUnpackedFloat(int index) {
+      return unpackedFloat_[index];
+    }
+    
+    public const int UnpackedDoubleFieldNumber = 101;
+    private pbc::PopsicleList<double> unpackedDouble_ = new pbc::PopsicleList<double>();
+    public scg::IList<double> UnpackedDoubleList {
+      get { return pbc::Lists.AsReadOnly(unpackedDouble_); }
+    }
+    public int UnpackedDoubleCount {
+      get { return unpackedDouble_.Count; }
+    }
+    public double GetUnpackedDouble(int index) {
+      return unpackedDouble_[index];
+    }
+    
+    public const int UnpackedBoolFieldNumber = 102;
+    private pbc::PopsicleList<bool> unpackedBool_ = new pbc::PopsicleList<bool>();
+    public scg::IList<bool> UnpackedBoolList {
+      get { return pbc::Lists.AsReadOnly(unpackedBool_); }
+    }
+    public int UnpackedBoolCount {
+      get { return unpackedBool_.Count; }
+    }
+    public bool GetUnpackedBool(int index) {
+      return unpackedBool_[index];
+    }
+    
+    public const int UnpackedEnumFieldNumber = 103;
+    private pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.UnpackedTypesForeignEnumLite> unpackedEnum_ = new pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.UnpackedTypesForeignEnumLite>();
+    public scg::IList<global::Google.ProtocolBuffers.TestProtos.UnpackedTypesForeignEnumLite> UnpackedEnumList {
+      get { return pbc::Lists.AsReadOnly(unpackedEnum_); }
+    }
+    public int UnpackedEnumCount {
+      get { return unpackedEnum_.Count; }
+    }
+    public global::Google.ProtocolBuffers.TestProtos.UnpackedTypesForeignEnumLite GetUnpackedEnum(int index) {
+      return unpackedEnum_[index];
+    }
+    
+    public override bool IsInitialized {
+      get {
+        return true;
+      }
+    }
+    
+    public override void WriteTo(pb::ICodedOutputStream output) {
+      int size = SerializedSize;
+      string[] field_names = _testUnpackedTypesLiteFieldNames;
+      if (unpackedInt32_.Count > 0) {
+        output.WriteInt32Array(90, field_names[6], unpackedInt32_);
+      }
+      if (unpackedInt64_.Count > 0) {
+        output.WriteInt64Array(91, field_names[7], unpackedInt64_);
+      }
+      if (unpackedUint32_.Count > 0) {
+        output.WriteUInt32Array(92, field_names[12], unpackedUint32_);
+      }
+      if (unpackedUint64_.Count > 0) {
+        output.WriteUInt64Array(93, field_names[13], unpackedUint64_);
+      }
+      if (unpackedSint32_.Count > 0) {
+        output.WriteSInt32Array(94, field_names[10], unpackedSint32_);
+      }
+      if (unpackedSint64_.Count > 0) {
+        output.WriteSInt64Array(95, field_names[11], unpackedSint64_);
+      }
+      if (unpackedFixed32_.Count > 0) {
+        output.WriteFixed32Array(96, field_names[3], unpackedFixed32_);
+      }
+      if (unpackedFixed64_.Count > 0) {
+        output.WriteFixed64Array(97, field_names[4], unpackedFixed64_);
+      }
+      if (unpackedSfixed32_.Count > 0) {
+        output.WriteSFixed32Array(98, field_names[8], unpackedSfixed32_);
+      }
+      if (unpackedSfixed64_.Count > 0) {
+        output.WriteSFixed64Array(99, field_names[9], unpackedSfixed64_);
+      }
+      if (unpackedFloat_.Count > 0) {
+        output.WriteFloatArray(100, field_names[5], unpackedFloat_);
+      }
+      if (unpackedDouble_.Count > 0) {
+        output.WriteDoubleArray(101, field_names[1], unpackedDouble_);
+      }
+      if (unpackedBool_.Count > 0) {
+        output.WriteBoolArray(102, field_names[0], unpackedBool_);
+      }
+      if (unpackedEnum_.Count > 0) {
+        output.WriteEnumArray(103, field_names[2], unpackedEnum_);
+      }
+    }
+    
+    private int memoizedSerializedSize = -1;
+    public override int SerializedSize {
+      get {
+        int size = memoizedSerializedSize;
+        if (size != -1) return size;
+        
+        size = 0;
+        {
+          int dataSize = 0;
+          foreach (int element in UnpackedInt32List) {
+            dataSize += pb::CodedOutputStream.ComputeInt32SizeNoTag(element);
+          }
+          size += dataSize;
+          size += 2 * unpackedInt32_.Count;
+        }
+        {
+          int dataSize = 0;
+          foreach (long element in UnpackedInt64List) {
+            dataSize += pb::CodedOutputStream.ComputeInt64SizeNoTag(element);
+          }
+          size += dataSize;
+          size += 2 * unpackedInt64_.Count;
+        }
+        {
+          int dataSize = 0;
+          foreach (uint element in UnpackedUint32List) {
+            dataSize += pb::CodedOutputStream.ComputeUInt32SizeNoTag(element);
+          }
+          size += dataSize;
+          size += 2 * unpackedUint32_.Count;
+        }
+        {
+          int dataSize = 0;
+          foreach (ulong element in UnpackedUint64List) {
+            dataSize += pb::CodedOutputStream.ComputeUInt64SizeNoTag(element);
+          }
+          size += dataSize;
+          size += 2 * unpackedUint64_.Count;
+        }
+        {
+          int dataSize = 0;
+          foreach (int element in UnpackedSint32List) {
+            dataSize += pb::CodedOutputStream.ComputeSInt32SizeNoTag(element);
+          }
+          size += dataSize;
+          size += 2 * unpackedSint32_.Count;
+        }
+        {
+          int dataSize = 0;
+          foreach (long element in UnpackedSint64List) {
+            dataSize += pb::CodedOutputStream.ComputeSInt64SizeNoTag(element);
+          }
+          size += dataSize;
+          size += 2 * unpackedSint64_.Count;
+        }
+        {
+          int dataSize = 0;
+          dataSize = 4 * unpackedFixed32_.Count;
+          size += dataSize;
+          size += 2 * unpackedFixed32_.Count;
+        }
+        {
+          int dataSize = 0;
+          dataSize = 8 * unpackedFixed64_.Count;
+          size += dataSize;
+          size += 2 * unpackedFixed64_.Count;
+        }
+        {
+          int dataSize = 0;
+          dataSize = 4 * unpackedSfixed32_.Count;
+          size += dataSize;
+          size += 2 * unpackedSfixed32_.Count;
+        }
+        {
+          int dataSize = 0;
+          dataSize = 8 * unpackedSfixed64_.Count;
+          size += dataSize;
+          size += 2 * unpackedSfixed64_.Count;
+        }
+        {
+          int dataSize = 0;
+          dataSize = 4 * unpackedFloat_.Count;
+          size += dataSize;
+          size += 2 * unpackedFloat_.Count;
+        }
+        {
+          int dataSize = 0;
+          dataSize = 8 * unpackedDouble_.Count;
+          size += dataSize;
+          size += 2 * unpackedDouble_.Count;
+        }
+        {
+          int dataSize = 0;
+          dataSize = 1 * unpackedBool_.Count;
+          size += dataSize;
+          size += 2 * unpackedBool_.Count;
+        }
+        {
+          int dataSize = 0;
+          if (unpackedEnum_.Count > 0) {
+            foreach (global::Google.ProtocolBuffers.TestProtos.UnpackedTypesForeignEnumLite element in unpackedEnum_) {
+              dataSize += pb::CodedOutputStream.ComputeEnumSizeNoTag((int) element);
+            }
+            size += dataSize;
+            size += 2 * unpackedEnum_.Count;
+          }
+        }
+        memoizedSerializedSize = size;
+        return size;
+      }
+    }
+    
+    #region Lite runtime methods
+    public override int GetHashCode() {
+      int hash = GetType().GetHashCode();
+      foreach(int i in unpackedInt32_)
+        hash ^= i.GetHashCode();
+      foreach(long i in unpackedInt64_)
+        hash ^= i.GetHashCode();
+      foreach(uint i in unpackedUint32_)
+        hash ^= i.GetHashCode();
+      foreach(ulong i in unpackedUint64_)
+        hash ^= i.GetHashCode();
+      foreach(int i in unpackedSint32_)
+        hash ^= i.GetHashCode();
+      foreach(long i in unpackedSint64_)
+        hash ^= i.GetHashCode();
+      foreach(uint i in unpackedFixed32_)
+        hash ^= i.GetHashCode();
+      foreach(ulong i in unpackedFixed64_)
+        hash ^= i.GetHashCode();
+      foreach(int i in unpackedSfixed32_)
+        hash ^= i.GetHashCode();
+      foreach(long i in unpackedSfixed64_)
+        hash ^= i.GetHashCode();
+      foreach(float i in unpackedFloat_)
+        hash ^= i.GetHashCode();
+      foreach(double i in unpackedDouble_)
+        hash ^= i.GetHashCode();
+      foreach(bool i in unpackedBool_)
+        hash ^= i.GetHashCode();
+      foreach(global::Google.ProtocolBuffers.TestProtos.UnpackedTypesForeignEnumLite i in unpackedEnum_)
+        hash ^= i.GetHashCode();
+      return hash;
+    }
+    
+    public override bool Equals(object obj) {
+      TestUnpackedTypesLite other = obj as TestUnpackedTypesLite;
+      if (other == null) return false;
+      if(unpackedInt32_.Count != other.unpackedInt32_.Count) return false;
+      for(int ix=0; ix < unpackedInt32_.Count; ix++)
+        if(!unpackedInt32_[ix].Equals(other.unpackedInt32_[ix])) return false;
+      if(unpackedInt64_.Count != other.unpackedInt64_.Count) return false;
+      for(int ix=0; ix < unpackedInt64_.Count; ix++)
+        if(!unpackedInt64_[ix].Equals(other.unpackedInt64_[ix])) return false;
+      if(unpackedUint32_.Count != other.unpackedUint32_.Count) return false;
+      for(int ix=0; ix < unpackedUint32_.Count; ix++)
+        if(!unpackedUint32_[ix].Equals(other.unpackedUint32_[ix])) return false;
+      if(unpackedUint64_.Count != other.unpackedUint64_.Count) return false;
+      for(int ix=0; ix < unpackedUint64_.Count; ix++)
+        if(!unpackedUint64_[ix].Equals(other.unpackedUint64_[ix])) return false;
+      if(unpackedSint32_.Count != other.unpackedSint32_.Count) return false;
+      for(int ix=0; ix < unpackedSint32_.Count; ix++)
+        if(!unpackedSint32_[ix].Equals(other.unpackedSint32_[ix])) return false;
+      if(unpackedSint64_.Count != other.unpackedSint64_.Count) return false;
+      for(int ix=0; ix < unpackedSint64_.Count; ix++)
+        if(!unpackedSint64_[ix].Equals(other.unpackedSint64_[ix])) return false;
+      if(unpackedFixed32_.Count != other.unpackedFixed32_.Count) return false;
+      for(int ix=0; ix < unpackedFixed32_.Count; ix++)
+        if(!unpackedFixed32_[ix].Equals(other.unpackedFixed32_[ix])) return false;
+      if(unpackedFixed64_.Count != other.unpackedFixed64_.Count) return false;
+      for(int ix=0; ix < unpackedFixed64_.Count; ix++)
+        if(!unpackedFixed64_[ix].Equals(other.unpackedFixed64_[ix])) return false;
+      if(unpackedSfixed32_.Count != other.unpackedSfixed32_.Count) return false;
+      for(int ix=0; ix < unpackedSfixed32_.Count; ix++)
+        if(!unpackedSfixed32_[ix].Equals(other.unpackedSfixed32_[ix])) return false;
+      if(unpackedSfixed64_.Count != other.unpackedSfixed64_.Count) return false;
+      for(int ix=0; ix < unpackedSfixed64_.Count; ix++)
+        if(!unpackedSfixed64_[ix].Equals(other.unpackedSfixed64_[ix])) return false;
+      if(unpackedFloat_.Count != other.unpackedFloat_.Count) return false;
+      for(int ix=0; ix < unpackedFloat_.Count; ix++)
+        if(!unpackedFloat_[ix].Equals(other.unpackedFloat_[ix])) return false;
+      if(unpackedDouble_.Count != other.unpackedDouble_.Count) return false;
+      for(int ix=0; ix < unpackedDouble_.Count; ix++)
+        if(!unpackedDouble_[ix].Equals(other.unpackedDouble_[ix])) return false;
+      if(unpackedBool_.Count != other.unpackedBool_.Count) return false;
+      for(int ix=0; ix < unpackedBool_.Count; ix++)
+        if(!unpackedBool_[ix].Equals(other.unpackedBool_[ix])) return false;
+      if(unpackedEnum_.Count != other.unpackedEnum_.Count) return false;
+      for(int ix=0; ix < unpackedEnum_.Count; ix++)
+        if(!unpackedEnum_[ix].Equals(other.unpackedEnum_[ix])) return false;
+      return true;
+    }
+    
+    public override void PrintTo(global::System.IO.TextWriter writer) {
+      PrintField("unpacked_int32", unpackedInt32_, writer);
+      PrintField("unpacked_int64", unpackedInt64_, writer);
+      PrintField("unpacked_uint32", unpackedUint32_, writer);
+      PrintField("unpacked_uint64", unpackedUint64_, writer);
+      PrintField("unpacked_sint32", unpackedSint32_, writer);
+      PrintField("unpacked_sint64", unpackedSint64_, writer);
+      PrintField("unpacked_fixed32", unpackedFixed32_, writer);
+      PrintField("unpacked_fixed64", unpackedFixed64_, writer);
+      PrintField("unpacked_sfixed32", unpackedSfixed32_, writer);
+      PrintField("unpacked_sfixed64", unpackedSfixed64_, writer);
+      PrintField("unpacked_float", unpackedFloat_, writer);
+      PrintField("unpacked_double", unpackedDouble_, writer);
+      PrintField("unpacked_bool", unpackedBool_, writer);
+      PrintField("unpacked_enum", unpackedEnum_, writer);
+    }
+    #endregion
+    
+    public static TestUnpackedTypesLite ParseFrom(pb::ByteString data) {
+      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+    }
+    public static TestUnpackedTypesLite ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+    }
+    public static TestUnpackedTypesLite ParseFrom(byte[] data) {
+      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+    }
+    public static TestUnpackedTypesLite ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+    }
+    public static TestUnpackedTypesLite ParseFrom(global::System.IO.Stream input) {
+      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+    }
+    public static TestUnpackedTypesLite ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+    }
+    public static TestUnpackedTypesLite ParseDelimitedFrom(global::System.IO.Stream input) {
+      return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+    }
+    public static TestUnpackedTypesLite ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+      return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+    }
+    public static TestUnpackedTypesLite ParseFrom(pb::ICodedInputStream input) {
+      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+    }
+    public static TestUnpackedTypesLite ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+    }
+    private TestUnpackedTypesLite MakeReadOnly() {
+      unpackedInt32_.MakeReadOnly();
+      unpackedInt64_.MakeReadOnly();
+      unpackedUint32_.MakeReadOnly();
+      unpackedUint64_.MakeReadOnly();
+      unpackedSint32_.MakeReadOnly();
+      unpackedSint64_.MakeReadOnly();
+      unpackedFixed32_.MakeReadOnly();
+      unpackedFixed64_.MakeReadOnly();
+      unpackedSfixed32_.MakeReadOnly();
+      unpackedSfixed64_.MakeReadOnly();
+      unpackedFloat_.MakeReadOnly();
+      unpackedDouble_.MakeReadOnly();
+      unpackedBool_.MakeReadOnly();
+      unpackedEnum_.MakeReadOnly();
+      return this;
+    }
+    
+    public static Builder CreateBuilder() { return new Builder(); }
+    public override Builder ToBuilder() { return CreateBuilder(this); }
+    public override Builder CreateBuilderForType() { return new Builder(); }
+    public static Builder CreateBuilder(TestUnpackedTypesLite prototype) {
+      return new Builder(prototype);
+    }
+    
+    [global::System.SerializableAttribute()]
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
+    public sealed partial class Builder : pb::GeneratedBuilderLite<TestUnpackedTypesLite, Builder> {
+      protected override Builder ThisBuilder {
+        get { return this; }
+      }
+      public Builder() {
+        result = DefaultInstance;
+        resultIsReadOnly = true;
+      }
+      internal Builder(TestUnpackedTypesLite cloneFrom) {
+        result = cloneFrom;
+        resultIsReadOnly = true;
+      }
+      
+      private bool resultIsReadOnly;
+      private TestUnpackedTypesLite result;
+      
+      private TestUnpackedTypesLite PrepareBuilder() {
+        if (resultIsReadOnly) {
+          TestUnpackedTypesLite original = result;
+          result = new TestUnpackedTypesLite();
+          resultIsReadOnly = false;
+          MergeFrom(original);
+        }
+        return result;
+      }
+      
+      public override bool IsInitialized {
+        get { return result.IsInitialized; }
+      }
+      
+      protected override TestUnpackedTypesLite MessageBeingBuilt {
+        get { return PrepareBuilder(); }
+      }
+      
+      public override Builder Clear() {
+        result = DefaultInstance;
+        resultIsReadOnly = true;
+        return this;
+      }
+      
+      public override Builder Clone() {
+        if (resultIsReadOnly) {
+          return new Builder(result);
+        } else {
+          return new Builder().MergeFrom(result);
+        }
+      }
+      
+      public override TestUnpackedTypesLite DefaultInstanceForType {
+        get { return global::Google.ProtocolBuffers.TestProtos.TestUnpackedTypesLite.DefaultInstance; }
+      }
+      
+      public override TestUnpackedTypesLite BuildPartial() {
+        if (resultIsReadOnly) {
+          return result;
+        }
+        resultIsReadOnly = true;
+        return result.MakeReadOnly();
+      }
+      
+      public override Builder MergeFrom(pb::IMessageLite other) {
+        if (other is TestUnpackedTypesLite) {
+          return MergeFrom((TestUnpackedTypesLite) other);
+        } else {
+          base.MergeFrom(other);
+          return this;
+        }
+      }
+      
+      public override Builder MergeFrom(TestUnpackedTypesLite other) {
+        if (other == global::Google.ProtocolBuffers.TestProtos.TestUnpackedTypesLite.DefaultInstance) return this;
+        PrepareBuilder();
+        if (other.unpackedInt32_.Count != 0) {
+          result.unpackedInt32_.Add(other.unpackedInt32_);
+        }
+        if (other.unpackedInt64_.Count != 0) {
+          result.unpackedInt64_.Add(other.unpackedInt64_);
+        }
+        if (other.unpackedUint32_.Count != 0) {
+          result.unpackedUint32_.Add(other.unpackedUint32_);
+        }
+        if (other.unpackedUint64_.Count != 0) {
+          result.unpackedUint64_.Add(other.unpackedUint64_);
+        }
+        if (other.unpackedSint32_.Count != 0) {
+          result.unpackedSint32_.Add(other.unpackedSint32_);
+        }
+        if (other.unpackedSint64_.Count != 0) {
+          result.unpackedSint64_.Add(other.unpackedSint64_);
+        }
+        if (other.unpackedFixed32_.Count != 0) {
+          result.unpackedFixed32_.Add(other.unpackedFixed32_);
+        }
+        if (other.unpackedFixed64_.Count != 0) {
+          result.unpackedFixed64_.Add(other.unpackedFixed64_);
+        }
+        if (other.unpackedSfixed32_.Count != 0) {
+          result.unpackedSfixed32_.Add(other.unpackedSfixed32_);
+        }
+        if (other.unpackedSfixed64_.Count != 0) {
+          result.unpackedSfixed64_.Add(other.unpackedSfixed64_);
+        }
+        if (other.unpackedFloat_.Count != 0) {
+          result.unpackedFloat_.Add(other.unpackedFloat_);
+        }
+        if (other.unpackedDouble_.Count != 0) {
+          result.unpackedDouble_.Add(other.unpackedDouble_);
+        }
+        if (other.unpackedBool_.Count != 0) {
+          result.unpackedBool_.Add(other.unpackedBool_);
+        }
+        if (other.unpackedEnum_.Count != 0) {
+          result.unpackedEnum_.Add(other.unpackedEnum_);
+        }
+        return this;
+      }
+      
+      public override Builder MergeFrom(pb::ICodedInputStream input) {
+        return MergeFrom(input, pb::ExtensionRegistry.Empty);
+      }
+      
+      public override Builder MergeFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+        PrepareBuilder();
+        uint tag;
+        string field_name;
+        while (input.ReadTag(out tag, out field_name)) {
+          if(tag == 0 && field_name != null) {
+            int field_ordinal = global::System.Array.BinarySearch(_testUnpackedTypesLiteFieldNames, field_name, global::System.StringComparer.Ordinal);
+            if(field_ordinal >= 0)
+              tag = _testUnpackedTypesLiteFieldTags[field_ordinal];
+            else {
+              ParseUnknownField(input, extensionRegistry, tag, field_name);
+              continue;
+            }
+          }
+          switch (tag) {
+            case 0: {
+              throw pb::InvalidProtocolBufferException.InvalidTag();
+            }
+            default: {
+              if (pb::WireFormat.IsEndGroupTag(tag)) {
+                return this;
+              }
+              ParseUnknownField(input, extensionRegistry, tag, field_name);
+              break;
+            }
+            case 722:
+            case 720: {
+              input.ReadInt32Array(tag, field_name, result.unpackedInt32_);
+              break;
+            }
+            case 730:
+            case 728: {
+              input.ReadInt64Array(tag, field_name, result.unpackedInt64_);
+              break;
+            }
+            case 738:
+            case 736: {
+              input.ReadUInt32Array(tag, field_name, result.unpackedUint32_);
+              break;
+            }
+            case 746:
+            case 744: {
+              input.ReadUInt64Array(tag, field_name, result.unpackedUint64_);
+              break;
+            }
+            case 754:
+            case 752: {
+              input.ReadSInt32Array(tag, field_name, result.unpackedSint32_);
+              break;
+            }
+            case 762:
+            case 760: {
+              input.ReadSInt64Array(tag, field_name, result.unpackedSint64_);
+              break;
+            }
+            case 770:
+            case 773: {
+              input.ReadFixed32Array(tag, field_name, result.unpackedFixed32_);
+              break;
+            }
+            case 778:
+            case 777: {
+              input.ReadFixed64Array(tag, field_name, result.unpackedFixed64_);
+              break;
+            }
+            case 786:
+            case 789: {
+              input.ReadSFixed32Array(tag, field_name, result.unpackedSfixed32_);
+              break;
+            }
+            case 794:
+            case 793: {
+              input.ReadSFixed64Array(tag, field_name, result.unpackedSfixed64_);
+              break;
+            }
+            case 802:
+            case 805: {
+              input.ReadFloatArray(tag, field_name, result.unpackedFloat_);
+              break;
+            }
+            case 810:
+            case 809: {
+              input.ReadDoubleArray(tag, field_name, result.unpackedDouble_);
+              break;
+            }
+            case 818:
+            case 816: {
+              input.ReadBoolArray(tag, field_name, result.unpackedBool_);
+              break;
+            }
+            case 826:
+            case 824: {
+              scg::ICollection<object> unknownItems;
+              input.ReadEnumArray<global::Google.ProtocolBuffers.TestProtos.UnpackedTypesForeignEnumLite>(tag, field_name, result.unpackedEnum_, out unknownItems);
+              break;
+            }
+          }
+        }
+        
+        return this;
+      }
+      
+      
+      public pbc::IPopsicleList<int> UnpackedInt32List {
+        get { return PrepareBuilder().unpackedInt32_; }
+      }
+      public int UnpackedInt32Count {
+        get { return result.UnpackedInt32Count; }
+      }
+      public int GetUnpackedInt32(int index) {
+        return result.GetUnpackedInt32(index);
+      }
+      public Builder SetUnpackedInt32(int index, int value) {
+        PrepareBuilder();
+        result.unpackedInt32_[index] = value;
+        return this;
+      }
+      public Builder AddUnpackedInt32(int value) {
+        PrepareBuilder();
+        result.unpackedInt32_.Add(value);
+        return this;
+      }
+      public Builder AddRangeUnpackedInt32(scg::IEnumerable<int> values) {
+        PrepareBuilder();
+        result.unpackedInt32_.Add(values);
+        return this;
+      }
+      public Builder ClearUnpackedInt32() {
+        PrepareBuilder();
+        result.unpackedInt32_.Clear();
+        return this;
+      }
+      
+      public pbc::IPopsicleList<long> UnpackedInt64List {
+        get { return PrepareBuilder().unpackedInt64_; }
+      }
+      public int UnpackedInt64Count {
+        get { return result.UnpackedInt64Count; }
+      }
+      public long GetUnpackedInt64(int index) {
+        return result.GetUnpackedInt64(index);
+      }
+      public Builder SetUnpackedInt64(int index, long value) {
+        PrepareBuilder();
+        result.unpackedInt64_[index] = value;
+        return this;
+      }
+      public Builder AddUnpackedInt64(long value) {
+        PrepareBuilder();
+        result.unpackedInt64_.Add(value);
+        return this;
+      }
+      public Builder AddRangeUnpackedInt64(scg::IEnumerable<long> values) {
+        PrepareBuilder();
+        result.unpackedInt64_.Add(values);
+        return this;
+      }
+      public Builder ClearUnpackedInt64() {
+        PrepareBuilder();
+        result.unpackedInt64_.Clear();
+        return this;
+      }
+      
+      [global::System.CLSCompliant(false)]
+      public pbc::IPopsicleList<uint> UnpackedUint32List {
+        get { return PrepareBuilder().unpackedUint32_; }
+      }
+      public int UnpackedUint32Count {
+        get { return result.UnpackedUint32Count; }
+      }
+      [global::System.CLSCompliant(false)]
+      public uint GetUnpackedUint32(int index) {
+        return result.GetUnpackedUint32(index);
+      }
+      [global::System.CLSCompliant(false)]
+      public Builder SetUnpackedUint32(int index, uint value) {
+        PrepareBuilder();
+        result.unpackedUint32_[index] = value;
+        return this;
+      }
+      [global::System.CLSCompliant(false)]
+      public Builder AddUnpackedUint32(uint value) {
+        PrepareBuilder();
+        result.unpackedUint32_.Add(value);
+        return this;
+      }
+      [global::System.CLSCompliant(false)]
+      public Builder AddRangeUnpackedUint32(scg::IEnumerable<uint> values) {
+        PrepareBuilder();
+        result.unpackedUint32_.Add(values);
+        return this;
+      }
+      public Builder ClearUnpackedUint32() {
+        PrepareBuilder();
+        result.unpackedUint32_.Clear();
+        return this;
+      }
+      
+      [global::System.CLSCompliant(false)]
+      public pbc::IPopsicleList<ulong> UnpackedUint64List {
+        get { return PrepareBuilder().unpackedUint64_; }
+      }
+      public int UnpackedUint64Count {
+        get { return result.UnpackedUint64Count; }
+      }
+      [global::System.CLSCompliant(false)]
+      public ulong GetUnpackedUint64(int index) {
+        return result.GetUnpackedUint64(index);
+      }
+      [global::System.CLSCompliant(false)]
+      public Builder SetUnpackedUint64(int index, ulong value) {
+        PrepareBuilder();
+        result.unpackedUint64_[index] = value;
+        return this;
+      }
+      [global::System.CLSCompliant(false)]
+      public Builder AddUnpackedUint64(ulong value) {
+        PrepareBuilder();
+        result.unpackedUint64_.Add(value);
+        return this;
+      }
+      [global::System.CLSCompliant(false)]
+      public Builder AddRangeUnpackedUint64(scg::IEnumerable<ulong> values) {
+        PrepareBuilder();
+        result.unpackedUint64_.Add(values);
+        return this;
+      }
+      public Builder ClearUnpackedUint64() {
+        PrepareBuilder();
+        result.unpackedUint64_.Clear();
+        return this;
+      }
+      
+      public pbc::IPopsicleList<int> UnpackedSint32List {
+        get { return PrepareBuilder().unpackedSint32_; }
+      }
+      public int UnpackedSint32Count {
+        get { return result.UnpackedSint32Count; }
+      }
+      public int GetUnpackedSint32(int index) {
+        return result.GetUnpackedSint32(index);
+      }
+      public Builder SetUnpackedSint32(int index, int value) {
+        PrepareBuilder();
+        result.unpackedSint32_[index] = value;
+        return this;
+      }
+      public Builder AddUnpackedSint32(int value) {
+        PrepareBuilder();
+        result.unpackedSint32_.Add(value);
+        return this;
+      }
+      public Builder AddRangeUnpackedSint32(scg::IEnumerable<int> values) {
+        PrepareBuilder();
+        result.unpackedSint32_.Add(values);
+        return this;
+      }
+      public Builder ClearUnpackedSint32() {
+        PrepareBuilder();
+        result.unpackedSint32_.Clear();
+        return this;
+      }
+      
+      public pbc::IPopsicleList<long> UnpackedSint64List {
+        get { return PrepareBuilder().unpackedSint64_; }
+      }
+      public int UnpackedSint64Count {
+        get { return result.UnpackedSint64Count; }
+      }
+      public long GetUnpackedSint64(int index) {
+        return result.GetUnpackedSint64(index);
+      }
+      public Builder SetUnpackedSint64(int index, long value) {
+        PrepareBuilder();
+        result.unpackedSint64_[index] = value;
+        return this;
+      }
+      public Builder AddUnpackedSint64(long value) {
+        PrepareBuilder();
+        result.unpackedSint64_.Add(value);
+        return this;
+      }
+      public Builder AddRangeUnpackedSint64(scg::IEnumerable<long> values) {
+        PrepareBuilder();
+        result.unpackedSint64_.Add(values);
+        return this;
+      }
+      public Builder ClearUnpackedSint64() {
+        PrepareBuilder();
+        result.unpackedSint64_.Clear();
+        return this;
+      }
+      
+      [global::System.CLSCompliant(false)]
+      public pbc::IPopsicleList<uint> UnpackedFixed32List {
+        get { return PrepareBuilder().unpackedFixed32_; }
+      }
+      public int UnpackedFixed32Count {
+        get { return result.UnpackedFixed32Count; }
+      }
+      [global::System.CLSCompliant(false)]
+      public uint GetUnpackedFixed32(int index) {
+        return result.GetUnpackedFixed32(index);
+      }
+      [global::System.CLSCompliant(false)]
+      public Builder SetUnpackedFixed32(int index, uint value) {
+        PrepareBuilder();
+        result.unpackedFixed32_[index] = value;
+        return this;
+      }
+      [global::System.CLSCompliant(false)]
+      public Builder AddUnpackedFixed32(uint value) {
+        PrepareBuilder();
+        result.unpackedFixed32_.Add(value);
+        return this;
+      }
+      [global::System.CLSCompliant(false)]
+      public Builder AddRangeUnpackedFixed32(scg::IEnumerable<uint> values) {
+        PrepareBuilder();
+        result.unpackedFixed32_.Add(values);
+        return this;
+      }
+      public Builder ClearUnpackedFixed32() {
+        PrepareBuilder();
+        result.unpackedFixed32_.Clear();
+        return this;
+      }
+      
+      [global::System.CLSCompliant(false)]
+      public pbc::IPopsicleList<ulong> UnpackedFixed64List {
+        get { return PrepareBuilder().unpackedFixed64_; }
+      }
+      public int UnpackedFixed64Count {
+        get { return result.UnpackedFixed64Count; }
+      }
+      [global::System.CLSCompliant(false)]
+      public ulong GetUnpackedFixed64(int index) {
+        return result.GetUnpackedFixed64(index);
+      }
+      [global::System.CLSCompliant(false)]
+      public Builder SetUnpackedFixed64(int index, ulong value) {
+        PrepareBuilder();
+        result.unpackedFixed64_[index] = value;
+        return this;
+      }
+      [global::System.CLSCompliant(false)]
+      public Builder AddUnpackedFixed64(ulong value) {
+        PrepareBuilder();
+        result.unpackedFixed64_.Add(value);
+        return this;
+      }
+      [global::System.CLSCompliant(false)]
+      public Builder AddRangeUnpackedFixed64(scg::IEnumerable<ulong> values) {
+        PrepareBuilder();
+        result.unpackedFixed64_.Add(values);
+        return this;
+      }
+      public Builder ClearUnpackedFixed64() {
+        PrepareBuilder();
+        result.unpackedFixed64_.Clear();
+        return this;
+      }
+      
+      public pbc::IPopsicleList<int> UnpackedSfixed32List {
+        get { return PrepareBuilder().unpackedSfixed32_; }
+      }
+      public int UnpackedSfixed32Count {
+        get { return result.UnpackedSfixed32Count; }
+      }
+      public int GetUnpackedSfixed32(int index) {
+        return result.GetUnpackedSfixed32(index);
+      }
+      public Builder SetUnpackedSfixed32(int index, int value) {
+        PrepareBuilder();
+        result.unpackedSfixed32_[index] = value;
+        return this;
+      }
+      public Builder AddUnpackedSfixed32(int value) {
+        PrepareBuilder();
+        result.unpackedSfixed32_.Add(value);
+        return this;
+      }
+      public Builder AddRangeUnpackedSfixed32(scg::IEnumerable<int> values) {
+        PrepareBuilder();
+        result.unpackedSfixed32_.Add(values);
+        return this;
+      }
+      public Builder ClearUnpackedSfixed32() {
+        PrepareBuilder();
+        result.unpackedSfixed32_.Clear();
+        return this;
+      }
+      
+      public pbc::IPopsicleList<long> UnpackedSfixed64List {
+        get { return PrepareBuilder().unpackedSfixed64_; }
+      }
+      public int UnpackedSfixed64Count {
+        get { return result.UnpackedSfixed64Count; }
+      }
+      public long GetUnpackedSfixed64(int index) {
+        return result.GetUnpackedSfixed64(index);
+      }
+      public Builder SetUnpackedSfixed64(int index, long value) {
+        PrepareBuilder();
+        result.unpackedSfixed64_[index] = value;
+        return this;
+      }
+      public Builder AddUnpackedSfixed64(long value) {
+        PrepareBuilder();
+        result.unpackedSfixed64_.Add(value);
+        return this;
+      }
+      public Builder AddRangeUnpackedSfixed64(scg::IEnumerable<long> values) {
+        PrepareBuilder();
+        result.unpackedSfixed64_.Add(values);
+        return this;
+      }
+      public Builder ClearUnpackedSfixed64() {
+        PrepareBuilder();
+        result.unpackedSfixed64_.Clear();
+        return this;
+      }
+      
+      public pbc::IPopsicleList<float> UnpackedFloatList {
+        get { return PrepareBuilder().unpackedFloat_; }
+      }
+      public int UnpackedFloatCount {
+        get { return result.UnpackedFloatCount; }
+      }
+      public float GetUnpackedFloat(int index) {
+        return result.GetUnpackedFloat(index);
+      }
+      public Builder SetUnpackedFloat(int index, float value) {
+        PrepareBuilder();
+        result.unpackedFloat_[index] = value;
+        return this;
+      }
+      public Builder AddUnpackedFloat(float value) {
+        PrepareBuilder();
+        result.unpackedFloat_.Add(value);
+        return this;
+      }
+      public Builder AddRangeUnpackedFloat(scg::IEnumerable<float> values) {
+        PrepareBuilder();
+        result.unpackedFloat_.Add(values);
+        return this;
+      }
+      public Builder ClearUnpackedFloat() {
+        PrepareBuilder();
+        result.unpackedFloat_.Clear();
+        return this;
+      }
+      
+      public pbc::IPopsicleList<double> UnpackedDoubleList {
+        get { return PrepareBuilder().unpackedDouble_; }
+      }
+      public int UnpackedDoubleCount {
+        get { return result.UnpackedDoubleCount; }
+      }
+      public double GetUnpackedDouble(int index) {
+        return result.GetUnpackedDouble(index);
+      }
+      public Builder SetUnpackedDouble(int index, double value) {
+        PrepareBuilder();
+        result.unpackedDouble_[index] = value;
+        return this;
+      }
+      public Builder AddUnpackedDouble(double value) {
+        PrepareBuilder();
+        result.unpackedDouble_.Add(value);
+        return this;
+      }
+      public Builder AddRangeUnpackedDouble(scg::IEnumerable<double> values) {
+        PrepareBuilder();
+        result.unpackedDouble_.Add(values);
+        return this;
+      }
+      public Builder ClearUnpackedDouble() {
+        PrepareBuilder();
+        result.unpackedDouble_.Clear();
+        return this;
+      }
+      
+      public pbc::IPopsicleList<bool> UnpackedBoolList {
+        get { return PrepareBuilder().unpackedBool_; }
+      }
+      public int UnpackedBoolCount {
+        get { return result.UnpackedBoolCount; }
+      }
+      public bool GetUnpackedBool(int index) {
+        return result.GetUnpackedBool(index);
+      }
+      public Builder SetUnpackedBool(int index, bool value) {
+        PrepareBuilder();
+        result.unpackedBool_[index] = value;
+        return this;
+      }
+      public Builder AddUnpackedBool(bool value) {
+        PrepareBuilder();
+        result.unpackedBool_.Add(value);
+        return this;
+      }
+      public Builder AddRangeUnpackedBool(scg::IEnumerable<bool> values) {
+        PrepareBuilder();
+        result.unpackedBool_.Add(values);
+        return this;
+      }
+      public Builder ClearUnpackedBool() {
+        PrepareBuilder();
+        result.unpackedBool_.Clear();
+        return this;
+      }
+      
+      public pbc::IPopsicleList<global::Google.ProtocolBuffers.TestProtos.UnpackedTypesForeignEnumLite> UnpackedEnumList {
+        get { return PrepareBuilder().unpackedEnum_; }
+      }
+      public int UnpackedEnumCount {
+        get { return result.UnpackedEnumCount; }
+      }
+      public global::Google.ProtocolBuffers.TestProtos.UnpackedTypesForeignEnumLite GetUnpackedEnum(int index) {
+        return result.GetUnpackedEnum(index);
+      }
+      public Builder SetUnpackedEnum(int index, global::Google.ProtocolBuffers.TestProtos.UnpackedTypesForeignEnumLite value) {
+        PrepareBuilder();
+        result.unpackedEnum_[index] = value;
+        return this;
+      }
+      public Builder AddUnpackedEnum(global::Google.ProtocolBuffers.TestProtos.UnpackedTypesForeignEnumLite value) {
+        PrepareBuilder();
+        result.unpackedEnum_.Add(value);
+        return this;
+      }
+      public Builder AddRangeUnpackedEnum(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.UnpackedTypesForeignEnumLite> values) {
+        PrepareBuilder();
+        result.unpackedEnum_.Add(values);
+        return this;
+      }
+      public Builder ClearUnpackedEnum() {
+        PrepareBuilder();
+        result.unpackedEnum_.Clear();
+        return this;
+      }
+    }
+    static TestUnpackedTypesLite() {
+      object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestExtrasLiteProtoFile.Descriptor, null);
+    }
+  }
+  
   #endregion
   
 }

Разница между файлами не показана из-за своего большого размера
+ 33 - 1393
src/ProtocolBuffersLite.Test/TestProtos/UnitTestLiteProtoFile.cs


Разница между файлами не показана из-за своего большого размера
+ 568 - 325
src/ProtocolBuffersLite.Test/TestProtos/UnitTestProtoFile.cs


+ 1405 - 0
src/ProtocolBuffersLite.Test/TestProtos/UnitTestRpcInteropLite.cs

@@ -0,0 +1,1405 @@
+// Generated by ProtoGen, Version=2.3.0.277, Culture=neutral, PublicKeyToken=17b3b1f090c3ea48.  DO NOT EDIT!
+#pragma warning disable 1591, 0612
+#region Designer generated code
+
+using pb = global::Google.ProtocolBuffers;
+using pbc = global::Google.ProtocolBuffers.Collections;
+using pbd = global::Google.ProtocolBuffers.Descriptors;
+using scg = global::System.Collections.Generic;
+namespace Google.ProtocolBuffers.TestProtos {
+  
+  [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+  [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+  [global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
+  public static partial class UnitTestRpcInteropLite {
+  
+    #region Extension registration
+    public static void RegisterAllExtensions(pb::ExtensionRegistry registry) {
+    }
+    #endregion
+    #region Static variables
+    #endregion
+    #region Extensions
+    internal static readonly object Descriptor;
+    static UnitTestRpcInteropLite() {
+      Descriptor = null;
+    }
+    #endregion
+    
+  }
+  #region Messages
+  [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+  [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+  [global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
+  public sealed partial class SearchRequest : pb::GeneratedMessageLite<SearchRequest, SearchRequest.Builder> {
+    private SearchRequest() { }
+    private static readonly SearchRequest defaultInstance = new SearchRequest().MakeReadOnly();
+    private static readonly string[] _searchRequestFieldNames = new string[] { "Criteria" };
+    private static readonly uint[] _searchRequestFieldTags = new uint[] { 10 };
+    public static SearchRequest DefaultInstance {
+      get { return defaultInstance; }
+    }
+    
+    public override SearchRequest DefaultInstanceForType {
+      get { return DefaultInstance; }
+    }
+    
+    protected override SearchRequest ThisMessage {
+      get { return this; }
+    }
+    
+    public const int CriteriaFieldNumber = 1;
+    private pbc::PopsicleList<string> criteria_ = new pbc::PopsicleList<string>();
+    public scg::IList<string> CriteriaList {
+      get { return pbc::Lists.AsReadOnly(criteria_); }
+    }
+    public int CriteriaCount {
+      get { return criteria_.Count; }
+    }
+    public string GetCriteria(int index) {
+      return criteria_[index];
+    }
+    
+    public override bool IsInitialized {
+      get {
+        return true;
+      }
+    }
+    
+    public override void WriteTo(pb::ICodedOutputStream output) {
+      int size = SerializedSize;
+      string[] field_names = _searchRequestFieldNames;
+      if (criteria_.Count > 0) {
+        output.WriteStringArray(1, field_names[0], criteria_);
+      }
+    }
+    
+    private int memoizedSerializedSize = -1;
+    public override int SerializedSize {
+      get {
+        int size = memoizedSerializedSize;
+        if (size != -1) return size;
+        
+        size = 0;
+        {
+          int dataSize = 0;
+          foreach (string element in CriteriaList) {
+            dataSize += pb::CodedOutputStream.ComputeStringSizeNoTag(element);
+          }
+          size += dataSize;
+          size += 1 * criteria_.Count;
+        }
+        memoizedSerializedSize = size;
+        return size;
+      }
+    }
+    
+    #region Lite runtime methods
+    public override int GetHashCode() {
+      int hash = GetType().GetHashCode();
+      foreach(string i in criteria_)
+        hash ^= i.GetHashCode();
+      return hash;
+    }
+    
+    public override bool Equals(object obj) {
+      SearchRequest other = obj as SearchRequest;
+      if (other == null) return false;
+      if(criteria_.Count != other.criteria_.Count) return false;
+      for(int ix=0; ix < criteria_.Count; ix++)
+        if(!criteria_[ix].Equals(other.criteria_[ix])) return false;
+      return true;
+    }
+    
+    public override void PrintTo(global::System.IO.TextWriter writer) {
+      PrintField("Criteria", criteria_, writer);
+    }
+    #endregion
+    
+    public static SearchRequest ParseFrom(pb::ByteString data) {
+      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+    }
+    public static SearchRequest ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+    }
+    public static SearchRequest ParseFrom(byte[] data) {
+      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+    }
+    public static SearchRequest ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+    }
+    public static SearchRequest ParseFrom(global::System.IO.Stream input) {
+      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+    }
+    public static SearchRequest ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+    }
+    public static SearchRequest ParseDelimitedFrom(global::System.IO.Stream input) {
+      return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+    }
+    public static SearchRequest ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+      return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+    }
+    public static SearchRequest ParseFrom(pb::ICodedInputStream input) {
+      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+    }
+    public static SearchRequest ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+    }
+    private SearchRequest MakeReadOnly() {
+      criteria_.MakeReadOnly();
+      return this;
+    }
+    
+    public static Builder CreateBuilder() { return new Builder(); }
+    public override Builder ToBuilder() { return CreateBuilder(this); }
+    public override Builder CreateBuilderForType() { return new Builder(); }
+    public static Builder CreateBuilder(SearchRequest prototype) {
+      return new Builder(prototype);
+    }
+    
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
+    public sealed partial class Builder : pb::GeneratedBuilderLite<SearchRequest, Builder> {
+      protected override Builder ThisBuilder {
+        get { return this; }
+      }
+      public Builder() {
+        result = DefaultInstance;
+        resultIsReadOnly = true;
+      }
+      internal Builder(SearchRequest cloneFrom) {
+        result = cloneFrom;
+        resultIsReadOnly = true;
+      }
+      
+      private bool resultIsReadOnly;
+      private SearchRequest result;
+      
+      private SearchRequest PrepareBuilder() {
+        if (resultIsReadOnly) {
+          SearchRequest original = result;
+          result = new SearchRequest();
+          resultIsReadOnly = false;
+          MergeFrom(original);
+        }
+        return result;
+      }
+      
+      public override bool IsInitialized {
+        get { return result.IsInitialized; }
+      }
+      
+      protected override SearchRequest MessageBeingBuilt {
+        get { return PrepareBuilder(); }
+      }
+      
+      public override Builder Clear() {
+        result = DefaultInstance;
+        resultIsReadOnly = true;
+        return this;
+      }
+      
+      public override Builder Clone() {
+        if (resultIsReadOnly) {
+          return new Builder(result);
+        } else {
+          return new Builder().MergeFrom(result);
+        }
+      }
+      
+      public override SearchRequest DefaultInstanceForType {
+        get { return global::Google.ProtocolBuffers.TestProtos.SearchRequest.DefaultInstance; }
+      }
+      
+      public override SearchRequest BuildPartial() {
+        if (resultIsReadOnly) {
+          return result;
+        }
+        resultIsReadOnly = true;
+        return result.MakeReadOnly();
+      }
+      
+      public override Builder MergeFrom(pb::IMessageLite other) {
+        if (other is SearchRequest) {
+          return MergeFrom((SearchRequest) other);
+        } else {
+          base.MergeFrom(other);
+          return this;
+        }
+      }
+      
+      public override Builder MergeFrom(SearchRequest other) {
+        if (other == global::Google.ProtocolBuffers.TestProtos.SearchRequest.DefaultInstance) return this;
+        PrepareBuilder();
+        if (other.criteria_.Count != 0) {
+          result.criteria_.Add(other.criteria_);
+        }
+        return this;
+      }
+      
+      public override Builder MergeFrom(pb::ICodedInputStream input) {
+        return MergeFrom(input, pb::ExtensionRegistry.Empty);
+      }
+      
+      public override Builder MergeFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+        PrepareBuilder();
+        uint tag;
+        string field_name;
+        while (input.ReadTag(out tag, out field_name)) {
+          if(tag == 0 && field_name != null) {
+            int field_ordinal = global::System.Array.BinarySearch(_searchRequestFieldNames, field_name, global::System.StringComparer.Ordinal);
+            if(field_ordinal >= 0)
+              tag = _searchRequestFieldTags[field_ordinal];
+            else {
+              ParseUnknownField(input, extensionRegistry, tag, field_name);
+              continue;
+            }
+          }
+          switch (tag) {
+            case 0: {
+              throw pb::InvalidProtocolBufferException.InvalidTag();
+            }
+            default: {
+              if (pb::WireFormat.IsEndGroupTag(tag)) {
+                return this;
+              }
+              ParseUnknownField(input, extensionRegistry, tag, field_name);
+              break;
+            }
+            case 10: {
+              input.ReadStringArray(tag, field_name, result.criteria_);
+              break;
+            }
+          }
+        }
+        
+        return this;
+      }
+      
+      
+      public pbc::IPopsicleList<string> CriteriaList {
+        get { return PrepareBuilder().criteria_; }
+      }
+      public int CriteriaCount {
+        get { return result.CriteriaCount; }
+      }
+      public string GetCriteria(int index) {
+        return result.GetCriteria(index);
+      }
+      public Builder SetCriteria(int index, string value) {
+        pb::ThrowHelper.ThrowIfNull(value, "value");
+        PrepareBuilder();
+        result.criteria_[index] = value;
+        return this;
+      }
+      public Builder AddCriteria(string value) {
+        pb::ThrowHelper.ThrowIfNull(value, "value");
+        PrepareBuilder();
+        result.criteria_.Add(value);
+        return this;
+      }
+      public Builder AddRangeCriteria(scg::IEnumerable<string> values) {
+        PrepareBuilder();
+        result.criteria_.Add(values);
+        return this;
+      }
+      public Builder ClearCriteria() {
+        PrepareBuilder();
+        result.criteria_.Clear();
+        return this;
+      }
+    }
+    static SearchRequest() {
+      object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestRpcInteropLite.Descriptor, null);
+    }
+  }
+  
+  [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+  [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+  [global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
+  public sealed partial class SearchResponse : pb::GeneratedMessageLite<SearchResponse, SearchResponse.Builder> {
+    private SearchResponse() { }
+    private static readonly SearchResponse defaultInstance = new SearchResponse().MakeReadOnly();
+    private static readonly string[] _searchResponseFieldNames = new string[] { "results" };
+    private static readonly uint[] _searchResponseFieldTags = new uint[] { 10 };
+    public static SearchResponse DefaultInstance {
+      get { return defaultInstance; }
+    }
+    
+    public override SearchResponse DefaultInstanceForType {
+      get { return DefaultInstance; }
+    }
+    
+    protected override SearchResponse ThisMessage {
+      get { return this; }
+    }
+    
+    #region Nested types
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
+    public static class Types {
+      [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+      [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+      [global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
+      public sealed partial class ResultItem : pb::GeneratedMessageLite<ResultItem, ResultItem.Builder> {
+        private ResultItem() { }
+        private static readonly ResultItem defaultInstance = new ResultItem().MakeReadOnly();
+        private static readonly string[] _resultItemFieldNames = new string[] { "name", "url" };
+        private static readonly uint[] _resultItemFieldTags = new uint[] { 18, 10 };
+        public static ResultItem DefaultInstance {
+          get { return defaultInstance; }
+        }
+        
+        public override ResultItem DefaultInstanceForType {
+          get { return DefaultInstance; }
+        }
+        
+        protected override ResultItem ThisMessage {
+          get { return this; }
+        }
+        
+        public const int UrlFieldNumber = 1;
+        private bool hasUrl;
+        private string url_ = "";
+        public bool HasUrl {
+          get { return hasUrl; }
+        }
+        public string Url {
+          get { return url_; }
+        }
+        
+        public const int NameFieldNumber = 2;
+        private bool hasName;
+        private string name_ = "";
+        public bool HasName {
+          get { return hasName; }
+        }
+        public string Name {
+          get { return name_; }
+        }
+        
+        public override bool IsInitialized {
+          get {
+            if (!hasUrl) return false;
+            return true;
+          }
+        }
+        
+        public override void WriteTo(pb::ICodedOutputStream output) {
+          int size = SerializedSize;
+          string[] field_names = _resultItemFieldNames;
+          if (hasUrl) {
+            output.WriteString(1, field_names[1], Url);
+          }
+          if (hasName) {
+            output.WriteString(2, field_names[0], Name);
+          }
+        }
+        
+        private int memoizedSerializedSize = -1;
+        public override int SerializedSize {
+          get {
+            int size = memoizedSerializedSize;
+            if (size != -1) return size;
+            
+            size = 0;
+            if (hasUrl) {
+              size += pb::CodedOutputStream.ComputeStringSize(1, Url);
+            }
+            if (hasName) {
+              size += pb::CodedOutputStream.ComputeStringSize(2, Name);
+            }
+            memoizedSerializedSize = size;
+            return size;
+          }
+        }
+        
+        #region Lite runtime methods
+        public override int GetHashCode() {
+          int hash = GetType().GetHashCode();
+          if (hasUrl) hash ^= url_.GetHashCode();
+          if (hasName) hash ^= name_.GetHashCode();
+          return hash;
+        }
+        
+        public override bool Equals(object obj) {
+          ResultItem other = obj as ResultItem;
+          if (other == null) return false;
+          if (hasUrl != other.hasUrl || (hasUrl && !url_.Equals(other.url_))) return false;
+          if (hasName != other.hasName || (hasName && !name_.Equals(other.name_))) return false;
+          return true;
+        }
+        
+        public override void PrintTo(global::System.IO.TextWriter writer) {
+          PrintField("url", hasUrl, url_, writer);
+          PrintField("name", hasName, name_, writer);
+        }
+        #endregion
+        
+        public static ResultItem ParseFrom(pb::ByteString data) {
+          return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+        }
+        public static ResultItem ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+          return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+        }
+        public static ResultItem ParseFrom(byte[] data) {
+          return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+        }
+        public static ResultItem ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+          return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+        }
+        public static ResultItem ParseFrom(global::System.IO.Stream input) {
+          return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+        }
+        public static ResultItem ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+          return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+        }
+        public static ResultItem ParseDelimitedFrom(global::System.IO.Stream input) {
+          return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+        }
+        public static ResultItem ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+          return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+        }
+        public static ResultItem ParseFrom(pb::ICodedInputStream input) {
+          return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+        }
+        public static ResultItem ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+          return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+        }
+        private ResultItem MakeReadOnly() {
+          return this;
+        }
+        
+        public static Builder CreateBuilder() { return new Builder(); }
+        public override Builder ToBuilder() { return CreateBuilder(this); }
+        public override Builder CreateBuilderForType() { return new Builder(); }
+        public static Builder CreateBuilder(ResultItem prototype) {
+          return new Builder(prototype);
+        }
+        
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
+        public sealed partial class Builder : pb::GeneratedBuilderLite<ResultItem, Builder> {
+          protected override Builder ThisBuilder {
+            get { return this; }
+          }
+          public Builder() {
+            result = DefaultInstance;
+            resultIsReadOnly = true;
+          }
+          internal Builder(ResultItem cloneFrom) {
+            result = cloneFrom;
+            resultIsReadOnly = true;
+          }
+          
+          private bool resultIsReadOnly;
+          private ResultItem result;
+          
+          private ResultItem PrepareBuilder() {
+            if (resultIsReadOnly) {
+              ResultItem original = result;
+              result = new ResultItem();
+              resultIsReadOnly = false;
+              MergeFrom(original);
+            }
+            return result;
+          }
+          
+          public override bool IsInitialized {
+            get { return result.IsInitialized; }
+          }
+          
+          protected override ResultItem MessageBeingBuilt {
+            get { return PrepareBuilder(); }
+          }
+          
+          public override Builder Clear() {
+            result = DefaultInstance;
+            resultIsReadOnly = true;
+            return this;
+          }
+          
+          public override Builder Clone() {
+            if (resultIsReadOnly) {
+              return new Builder(result);
+            } else {
+              return new Builder().MergeFrom(result);
+            }
+          }
+          
+          public override ResultItem DefaultInstanceForType {
+            get { return global::Google.ProtocolBuffers.TestProtos.SearchResponse.Types.ResultItem.DefaultInstance; }
+          }
+          
+          public override ResultItem BuildPartial() {
+            if (resultIsReadOnly) {
+              return result;
+            }
+            resultIsReadOnly = true;
+            return result.MakeReadOnly();
+          }
+          
+          public override Builder MergeFrom(pb::IMessageLite other) {
+            if (other is ResultItem) {
+              return MergeFrom((ResultItem) other);
+            } else {
+              base.MergeFrom(other);
+              return this;
+            }
+          }
+          
+          public override Builder MergeFrom(ResultItem other) {
+            if (other == global::Google.ProtocolBuffers.TestProtos.SearchResponse.Types.ResultItem.DefaultInstance) return this;
+            PrepareBuilder();
+            if (other.HasUrl) {
+              Url = other.Url;
+            }
+            if (other.HasName) {
+              Name = other.Name;
+            }
+            return this;
+          }
+          
+          public override Builder MergeFrom(pb::ICodedInputStream input) {
+            return MergeFrom(input, pb::ExtensionRegistry.Empty);
+          }
+          
+          public override Builder MergeFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+            PrepareBuilder();
+            uint tag;
+            string field_name;
+            while (input.ReadTag(out tag, out field_name)) {
+              if(tag == 0 && field_name != null) {
+                int field_ordinal = global::System.Array.BinarySearch(_resultItemFieldNames, field_name, global::System.StringComparer.Ordinal);
+                if(field_ordinal >= 0)
+                  tag = _resultItemFieldTags[field_ordinal];
+                else {
+                  ParseUnknownField(input, extensionRegistry, tag, field_name);
+                  continue;
+                }
+              }
+              switch (tag) {
+                case 0: {
+                  throw pb::InvalidProtocolBufferException.InvalidTag();
+                }
+                default: {
+                  if (pb::WireFormat.IsEndGroupTag(tag)) {
+                    return this;
+                  }
+                  ParseUnknownField(input, extensionRegistry, tag, field_name);
+                  break;
+                }
+                case 10: {
+                  result.hasUrl = input.ReadString(ref result.url_);
+                  break;
+                }
+                case 18: {
+                  result.hasName = input.ReadString(ref result.name_);
+                  break;
+                }
+              }
+            }
+            
+            return this;
+          }
+          
+          
+          public bool HasUrl {
+            get { return result.hasUrl; }
+          }
+          public string Url {
+            get { return result.Url; }
+            set { SetUrl(value); }
+          }
+          public Builder SetUrl(string value) {
+            pb::ThrowHelper.ThrowIfNull(value, "value");
+            PrepareBuilder();
+            result.hasUrl = true;
+            result.url_ = value;
+            return this;
+          }
+          public Builder ClearUrl() {
+            PrepareBuilder();
+            result.hasUrl = false;
+            result.url_ = "";
+            return this;
+          }
+          
+          public bool HasName {
+            get { return result.hasName; }
+          }
+          public string Name {
+            get { return result.Name; }
+            set { SetName(value); }
+          }
+          public Builder SetName(string value) {
+            pb::ThrowHelper.ThrowIfNull(value, "value");
+            PrepareBuilder();
+            result.hasName = true;
+            result.name_ = value;
+            return this;
+          }
+          public Builder ClearName() {
+            PrepareBuilder();
+            result.hasName = false;
+            result.name_ = "";
+            return this;
+          }
+        }
+        static ResultItem() {
+          object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestRpcInteropLite.Descriptor, null);
+        }
+      }
+      
+    }
+    #endregion
+    
+    public const int ResultsFieldNumber = 1;
+    private pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.SearchResponse.Types.ResultItem> results_ = new pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.SearchResponse.Types.ResultItem>();
+    public scg::IList<global::Google.ProtocolBuffers.TestProtos.SearchResponse.Types.ResultItem> ResultsList {
+      get { return results_; }
+    }
+    public int ResultsCount {
+      get { return results_.Count; }
+    }
+    public global::Google.ProtocolBuffers.TestProtos.SearchResponse.Types.ResultItem GetResults(int index) {
+      return results_[index];
+    }
+    
+    public override bool IsInitialized {
+      get {
+        foreach (global::Google.ProtocolBuffers.TestProtos.SearchResponse.Types.ResultItem element in ResultsList) {
+          if (!element.IsInitialized) return false;
+        }
+        return true;
+      }
+    }
+    
+    public override void WriteTo(pb::ICodedOutputStream output) {
+      int size = SerializedSize;
+      string[] field_names = _searchResponseFieldNames;
+      if (results_.Count > 0) {
+        output.WriteMessageArray(1, field_names[0], results_);
+      }
+    }
+    
+    private int memoizedSerializedSize = -1;
+    public override int SerializedSize {
+      get {
+        int size = memoizedSerializedSize;
+        if (size != -1) return size;
+        
+        size = 0;
+        foreach (global::Google.ProtocolBuffers.TestProtos.SearchResponse.Types.ResultItem element in ResultsList) {
+          size += pb::CodedOutputStream.ComputeMessageSize(1, element);
+        }
+        memoizedSerializedSize = size;
+        return size;
+      }
+    }
+    
+    #region Lite runtime methods
+    public override int GetHashCode() {
+      int hash = GetType().GetHashCode();
+      foreach(global::Google.ProtocolBuffers.TestProtos.SearchResponse.Types.ResultItem i in results_)
+        hash ^= i.GetHashCode();
+      return hash;
+    }
+    
+    public override bool Equals(object obj) {
+      SearchResponse other = obj as SearchResponse;
+      if (other == null) return false;
+      if(results_.Count != other.results_.Count) return false;
+      for(int ix=0; ix < results_.Count; ix++)
+        if(!results_[ix].Equals(other.results_[ix])) return false;
+      return true;
+    }
+    
+    public override void PrintTo(global::System.IO.TextWriter writer) {
+      PrintField("results", results_, writer);
+    }
+    #endregion
+    
+    public static SearchResponse ParseFrom(pb::ByteString data) {
+      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+    }
+    public static SearchResponse ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+    }
+    public static SearchResponse ParseFrom(byte[] data) {
+      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+    }
+    public static SearchResponse ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+    }
+    public static SearchResponse ParseFrom(global::System.IO.Stream input) {
+      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+    }
+    public static SearchResponse ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+    }
+    public static SearchResponse ParseDelimitedFrom(global::System.IO.Stream input) {
+      return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+    }
+    public static SearchResponse ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+      return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+    }
+    public static SearchResponse ParseFrom(pb::ICodedInputStream input) {
+      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+    }
+    public static SearchResponse ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+    }
+    private SearchResponse MakeReadOnly() {
+      results_.MakeReadOnly();
+      return this;
+    }
+    
+    public static Builder CreateBuilder() { return new Builder(); }
+    public override Builder ToBuilder() { return CreateBuilder(this); }
+    public override Builder CreateBuilderForType() { return new Builder(); }
+    public static Builder CreateBuilder(SearchResponse prototype) {
+      return new Builder(prototype);
+    }
+    
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
+    public sealed partial class Builder : pb::GeneratedBuilderLite<SearchResponse, Builder> {
+      protected override Builder ThisBuilder {
+        get { return this; }
+      }
+      public Builder() {
+        result = DefaultInstance;
+        resultIsReadOnly = true;
+      }
+      internal Builder(SearchResponse cloneFrom) {
+        result = cloneFrom;
+        resultIsReadOnly = true;
+      }
+      
+      private bool resultIsReadOnly;
+      private SearchResponse result;
+      
+      private SearchResponse PrepareBuilder() {
+        if (resultIsReadOnly) {
+          SearchResponse original = result;
+          result = new SearchResponse();
+          resultIsReadOnly = false;
+          MergeFrom(original);
+        }
+        return result;
+      }
+      
+      public override bool IsInitialized {
+        get { return result.IsInitialized; }
+      }
+      
+      protected override SearchResponse MessageBeingBuilt {
+        get { return PrepareBuilder(); }
+      }
+      
+      public override Builder Clear() {
+        result = DefaultInstance;
+        resultIsReadOnly = true;
+        return this;
+      }
+      
+      public override Builder Clone() {
+        if (resultIsReadOnly) {
+          return new Builder(result);
+        } else {
+          return new Builder().MergeFrom(result);
+        }
+      }
+      
+      public override SearchResponse DefaultInstanceForType {
+        get { return global::Google.ProtocolBuffers.TestProtos.SearchResponse.DefaultInstance; }
+      }
+      
+      public override SearchResponse BuildPartial() {
+        if (resultIsReadOnly) {
+          return result;
+        }
+        resultIsReadOnly = true;
+        return result.MakeReadOnly();
+      }
+      
+      public override Builder MergeFrom(pb::IMessageLite other) {
+        if (other is SearchResponse) {
+          return MergeFrom((SearchResponse) other);
+        } else {
+          base.MergeFrom(other);
+          return this;
+        }
+      }
+      
+      public override Builder MergeFrom(SearchResponse other) {
+        if (other == global::Google.ProtocolBuffers.TestProtos.SearchResponse.DefaultInstance) return this;
+        PrepareBuilder();
+        if (other.results_.Count != 0) {
+          result.results_.Add(other.results_);
+        }
+        return this;
+      }
+      
+      public override Builder MergeFrom(pb::ICodedInputStream input) {
+        return MergeFrom(input, pb::ExtensionRegistry.Empty);
+      }
+      
+      public override Builder MergeFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+        PrepareBuilder();
+        uint tag;
+        string field_name;
+        while (input.ReadTag(out tag, out field_name)) {
+          if(tag == 0 && field_name != null) {
+            int field_ordinal = global::System.Array.BinarySearch(_searchResponseFieldNames, field_name, global::System.StringComparer.Ordinal);
+            if(field_ordinal >= 0)
+              tag = _searchResponseFieldTags[field_ordinal];
+            else {
+              ParseUnknownField(input, extensionRegistry, tag, field_name);
+              continue;
+            }
+          }
+          switch (tag) {
+            case 0: {
+              throw pb::InvalidProtocolBufferException.InvalidTag();
+            }
+            default: {
+              if (pb::WireFormat.IsEndGroupTag(tag)) {
+                return this;
+              }
+              ParseUnknownField(input, extensionRegistry, tag, field_name);
+              break;
+            }
+            case 10: {
+              input.ReadMessageArray(tag, field_name, result.results_, global::Google.ProtocolBuffers.TestProtos.SearchResponse.Types.ResultItem.DefaultInstance, extensionRegistry);
+              break;
+            }
+          }
+        }
+        
+        return this;
+      }
+      
+      
+      public pbc::IPopsicleList<global::Google.ProtocolBuffers.TestProtos.SearchResponse.Types.ResultItem> ResultsList {
+        get { return PrepareBuilder().results_; }
+      }
+      public int ResultsCount {
+        get { return result.ResultsCount; }
+      }
+      public global::Google.ProtocolBuffers.TestProtos.SearchResponse.Types.ResultItem GetResults(int index) {
+        return result.GetResults(index);
+      }
+      public Builder SetResults(int index, global::Google.ProtocolBuffers.TestProtos.SearchResponse.Types.ResultItem value) {
+        pb::ThrowHelper.ThrowIfNull(value, "value");
+        PrepareBuilder();
+        result.results_[index] = value;
+        return this;
+      }
+      public Builder SetResults(int index, global::Google.ProtocolBuffers.TestProtos.SearchResponse.Types.ResultItem.Builder builderForValue) {
+        pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+        PrepareBuilder();
+        result.results_[index] = builderForValue.Build();
+        return this;
+      }
+      public Builder AddResults(global::Google.ProtocolBuffers.TestProtos.SearchResponse.Types.ResultItem value) {
+        pb::ThrowHelper.ThrowIfNull(value, "value");
+        PrepareBuilder();
+        result.results_.Add(value);
+        return this;
+      }
+      public Builder AddResults(global::Google.ProtocolBuffers.TestProtos.SearchResponse.Types.ResultItem.Builder builderForValue) {
+        pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+        PrepareBuilder();
+        result.results_.Add(builderForValue.Build());
+        return this;
+      }
+      public Builder AddRangeResults(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.SearchResponse.Types.ResultItem> values) {
+        PrepareBuilder();
+        result.results_.Add(values);
+        return this;
+      }
+      public Builder ClearResults() {
+        PrepareBuilder();
+        result.results_.Clear();
+        return this;
+      }
+    }
+    static SearchResponse() {
+      object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestRpcInteropLite.Descriptor, null);
+    }
+  }
+  
+  [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+  [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+  [global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
+  public sealed partial class RefineSearchRequest : pb::GeneratedMessageLite<RefineSearchRequest, RefineSearchRequest.Builder> {
+    private RefineSearchRequest() { }
+    private static readonly RefineSearchRequest defaultInstance = new RefineSearchRequest().MakeReadOnly();
+    private static readonly string[] _refineSearchRequestFieldNames = new string[] { "Criteria", "previous_results" };
+    private static readonly uint[] _refineSearchRequestFieldTags = new uint[] { 10, 18 };
+    public static RefineSearchRequest DefaultInstance {
+      get { return defaultInstance; }
+    }
+    
+    public override RefineSearchRequest DefaultInstanceForType {
+      get { return DefaultInstance; }
+    }
+    
+    protected override RefineSearchRequest ThisMessage {
+      get { return this; }
+    }
+    
+    public const int CriteriaFieldNumber = 1;
+    private pbc::PopsicleList<string> criteria_ = new pbc::PopsicleList<string>();
+    public scg::IList<string> CriteriaList {
+      get { return pbc::Lists.AsReadOnly(criteria_); }
+    }
+    public int CriteriaCount {
+      get { return criteria_.Count; }
+    }
+    public string GetCriteria(int index) {
+      return criteria_[index];
+    }
+    
+    public const int PreviousResultsFieldNumber = 2;
+    private bool hasPreviousResults;
+    private global::Google.ProtocolBuffers.TestProtos.SearchResponse previousResults_;
+    public bool HasPreviousResults {
+      get { return hasPreviousResults; }
+    }
+    public global::Google.ProtocolBuffers.TestProtos.SearchResponse PreviousResults {
+      get { return previousResults_ ?? global::Google.ProtocolBuffers.TestProtos.SearchResponse.DefaultInstance; }
+    }
+    
+    public override bool IsInitialized {
+      get {
+        if (!hasPreviousResults) return false;
+        if (!PreviousResults.IsInitialized) return false;
+        return true;
+      }
+    }
+    
+    public override void WriteTo(pb::ICodedOutputStream output) {
+      int size = SerializedSize;
+      string[] field_names = _refineSearchRequestFieldNames;
+      if (criteria_.Count > 0) {
+        output.WriteStringArray(1, field_names[0], criteria_);
+      }
+      if (hasPreviousResults) {
+        output.WriteMessage(2, field_names[1], PreviousResults);
+      }
+    }
+    
+    private int memoizedSerializedSize = -1;
+    public override int SerializedSize {
+      get {
+        int size = memoizedSerializedSize;
+        if (size != -1) return size;
+        
+        size = 0;
+        {
+          int dataSize = 0;
+          foreach (string element in CriteriaList) {
+            dataSize += pb::CodedOutputStream.ComputeStringSizeNoTag(element);
+          }
+          size += dataSize;
+          size += 1 * criteria_.Count;
+        }
+        if (hasPreviousResults) {
+          size += pb::CodedOutputStream.ComputeMessageSize(2, PreviousResults);
+        }
+        memoizedSerializedSize = size;
+        return size;
+      }
+    }
+    
+    #region Lite runtime methods
+    public override int GetHashCode() {
+      int hash = GetType().GetHashCode();
+      foreach(string i in criteria_)
+        hash ^= i.GetHashCode();
+      if (hasPreviousResults) hash ^= previousResults_.GetHashCode();
+      return hash;
+    }
+    
+    public override bool Equals(object obj) {
+      RefineSearchRequest other = obj as RefineSearchRequest;
+      if (other == null) return false;
+      if(criteria_.Count != other.criteria_.Count) return false;
+      for(int ix=0; ix < criteria_.Count; ix++)
+        if(!criteria_[ix].Equals(other.criteria_[ix])) return false;
+      if (hasPreviousResults != other.hasPreviousResults || (hasPreviousResults && !previousResults_.Equals(other.previousResults_))) return false;
+      return true;
+    }
+    
+    public override void PrintTo(global::System.IO.TextWriter writer) {
+      PrintField("Criteria", criteria_, writer);
+      PrintField("previous_results", hasPreviousResults, previousResults_, writer);
+    }
+    #endregion
+    
+    public static RefineSearchRequest ParseFrom(pb::ByteString data) {
+      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+    }
+    public static RefineSearchRequest ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+    }
+    public static RefineSearchRequest ParseFrom(byte[] data) {
+      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+    }
+    public static RefineSearchRequest ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+    }
+    public static RefineSearchRequest ParseFrom(global::System.IO.Stream input) {
+      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+    }
+    public static RefineSearchRequest ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+    }
+    public static RefineSearchRequest ParseDelimitedFrom(global::System.IO.Stream input) {
+      return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+    }
+    public static RefineSearchRequest ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+      return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+    }
+    public static RefineSearchRequest ParseFrom(pb::ICodedInputStream input) {
+      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+    }
+    public static RefineSearchRequest ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+    }
+    private RefineSearchRequest MakeReadOnly() {
+      criteria_.MakeReadOnly();
+      return this;
+    }
+    
+    public static Builder CreateBuilder() { return new Builder(); }
+    public override Builder ToBuilder() { return CreateBuilder(this); }
+    public override Builder CreateBuilderForType() { return new Builder(); }
+    public static Builder CreateBuilder(RefineSearchRequest prototype) {
+      return new Builder(prototype);
+    }
+    
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
+    public sealed partial class Builder : pb::GeneratedBuilderLite<RefineSearchRequest, Builder> {
+      protected override Builder ThisBuilder {
+        get { return this; }
+      }
+      public Builder() {
+        result = DefaultInstance;
+        resultIsReadOnly = true;
+      }
+      internal Builder(RefineSearchRequest cloneFrom) {
+        result = cloneFrom;
+        resultIsReadOnly = true;
+      }
+      
+      private bool resultIsReadOnly;
+      private RefineSearchRequest result;
+      
+      private RefineSearchRequest PrepareBuilder() {
+        if (resultIsReadOnly) {
+          RefineSearchRequest original = result;
+          result = new RefineSearchRequest();
+          resultIsReadOnly = false;
+          MergeFrom(original);
+        }
+        return result;
+      }
+      
+      public override bool IsInitialized {
+        get { return result.IsInitialized; }
+      }
+      
+      protected override RefineSearchRequest MessageBeingBuilt {
+        get { return PrepareBuilder(); }
+      }
+      
+      public override Builder Clear() {
+        result = DefaultInstance;
+        resultIsReadOnly = true;
+        return this;
+      }
+      
+      public override Builder Clone() {
+        if (resultIsReadOnly) {
+          return new Builder(result);
+        } else {
+          return new Builder().MergeFrom(result);
+        }
+      }
+      
+      public override RefineSearchRequest DefaultInstanceForType {
+        get { return global::Google.ProtocolBuffers.TestProtos.RefineSearchRequest.DefaultInstance; }
+      }
+      
+      public override RefineSearchRequest BuildPartial() {
+        if (resultIsReadOnly) {
+          return result;
+        }
+        resultIsReadOnly = true;
+        return result.MakeReadOnly();
+      }
+      
+      public override Builder MergeFrom(pb::IMessageLite other) {
+        if (other is RefineSearchRequest) {
+          return MergeFrom((RefineSearchRequest) other);
+        } else {
+          base.MergeFrom(other);
+          return this;
+        }
+      }
+      
+      public override Builder MergeFrom(RefineSearchRequest other) {
+        if (other == global::Google.ProtocolBuffers.TestProtos.RefineSearchRequest.DefaultInstance) return this;
+        PrepareBuilder();
+        if (other.criteria_.Count != 0) {
+          result.criteria_.Add(other.criteria_);
+        }
+        if (other.HasPreviousResults) {
+          MergePreviousResults(other.PreviousResults);
+        }
+        return this;
+      }
+      
+      public override Builder MergeFrom(pb::ICodedInputStream input) {
+        return MergeFrom(input, pb::ExtensionRegistry.Empty);
+      }
+      
+      public override Builder MergeFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+        PrepareBuilder();
+        uint tag;
+        string field_name;
+        while (input.ReadTag(out tag, out field_name)) {
+          if(tag == 0 && field_name != null) {
+            int field_ordinal = global::System.Array.BinarySearch(_refineSearchRequestFieldNames, field_name, global::System.StringComparer.Ordinal);
+            if(field_ordinal >= 0)
+              tag = _refineSearchRequestFieldTags[field_ordinal];
+            else {
+              ParseUnknownField(input, extensionRegistry, tag, field_name);
+              continue;
+            }
+          }
+          switch (tag) {
+            case 0: {
+              throw pb::InvalidProtocolBufferException.InvalidTag();
+            }
+            default: {
+              if (pb::WireFormat.IsEndGroupTag(tag)) {
+                return this;
+              }
+              ParseUnknownField(input, extensionRegistry, tag, field_name);
+              break;
+            }
+            case 10: {
+              input.ReadStringArray(tag, field_name, result.criteria_);
+              break;
+            }
+            case 18: {
+              global::Google.ProtocolBuffers.TestProtos.SearchResponse.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.SearchResponse.CreateBuilder();
+              if (result.hasPreviousResults) {
+                subBuilder.MergeFrom(PreviousResults);
+              }
+              input.ReadMessage(subBuilder, extensionRegistry);
+              PreviousResults = subBuilder.BuildPartial();
+              break;
+            }
+          }
+        }
+        
+        return this;
+      }
+      
+      
+      public pbc::IPopsicleList<string> CriteriaList {
+        get { return PrepareBuilder().criteria_; }
+      }
+      public int CriteriaCount {
+        get { return result.CriteriaCount; }
+      }
+      public string GetCriteria(int index) {
+        return result.GetCriteria(index);
+      }
+      public Builder SetCriteria(int index, string value) {
+        pb::ThrowHelper.ThrowIfNull(value, "value");
+        PrepareBuilder();
+        result.criteria_[index] = value;
+        return this;
+      }
+      public Builder AddCriteria(string value) {
+        pb::ThrowHelper.ThrowIfNull(value, "value");
+        PrepareBuilder();
+        result.criteria_.Add(value);
+        return this;
+      }
+      public Builder AddRangeCriteria(scg::IEnumerable<string> values) {
+        PrepareBuilder();
+        result.criteria_.Add(values);
+        return this;
+      }
+      public Builder ClearCriteria() {
+        PrepareBuilder();
+        result.criteria_.Clear();
+        return this;
+      }
+      
+      public bool HasPreviousResults {
+       get { return result.hasPreviousResults; }
+      }
+      public global::Google.ProtocolBuffers.TestProtos.SearchResponse PreviousResults {
+        get { return result.PreviousResults; }
+        set { SetPreviousResults(value); }
+      }
+      public Builder SetPreviousResults(global::Google.ProtocolBuffers.TestProtos.SearchResponse value) {
+        pb::ThrowHelper.ThrowIfNull(value, "value");
+        PrepareBuilder();
+        result.hasPreviousResults = true;
+        result.previousResults_ = value;
+        return this;
+      }
+      public Builder SetPreviousResults(global::Google.ProtocolBuffers.TestProtos.SearchResponse.Builder builderForValue) {
+        pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+        PrepareBuilder();
+        result.hasPreviousResults = true;
+        result.previousResults_ = builderForValue.Build();
+        return this;
+      }
+      public Builder MergePreviousResults(global::Google.ProtocolBuffers.TestProtos.SearchResponse value) {
+        pb::ThrowHelper.ThrowIfNull(value, "value");
+        PrepareBuilder();
+        if (result.hasPreviousResults &&
+            result.previousResults_ != global::Google.ProtocolBuffers.TestProtos.SearchResponse.DefaultInstance) {
+            result.previousResults_ = global::Google.ProtocolBuffers.TestProtos.SearchResponse.CreateBuilder(result.previousResults_).MergeFrom(value).BuildPartial();
+        } else {
+          result.previousResults_ = value;
+        }
+        result.hasPreviousResults = true;
+        return this;
+      }
+      public Builder ClearPreviousResults() {
+        PrepareBuilder();
+        result.hasPreviousResults = false;
+        result.previousResults_ = null;
+        return this;
+      }
+    }
+    static RefineSearchRequest() {
+      object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestRpcInteropLite.Descriptor, null);
+    }
+  }
+  
+  #endregion
+  
+  #region Services
+  [global::System.Runtime.InteropServices.GuidAttribute("a65f0925-fd11-4f94-b166-89ac4f027205")]
+  [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+  [global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
+  public partial interface ISearchService {
+    [global::System.Runtime.InteropServices.DispId(5)]
+    global::Google.ProtocolBuffers.TestProtos.SearchResponse Search(global::Google.ProtocolBuffers.TestProtos.SearchRequest searchRequest);
+    global::Google.ProtocolBuffers.TestProtos.SearchResponse RefineSearch(global::Google.ProtocolBuffers.TestProtos.RefineSearchRequest refineSearchRequest);
+  }
+  
+  [global::System.CLSCompliant(false)]
+  [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+  [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+  [global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
+  public partial class SearchService : ISearchService, pb::IRpcDispatch, global::System.IDisposable {
+    private readonly bool dispose;
+    private readonly pb::IRpcDispatch dispatch;
+    public SearchService(pb::IRpcDispatch dispatch) : this(dispatch, true) {
+    }
+    public SearchService(pb::IRpcDispatch dispatch, bool dispose) {
+      if (null == (this.dispatch = dispatch)) throw new global::System.ArgumentNullException();
+      this.dispose = dispose && dispatch is global::System.IDisposable;
+    }
+    
+    public void Dispose() {
+      if (dispose) ((global::System.IDisposable)dispatch).Dispose();
+    }
+    
+    TMessage pb::IRpcDispatch.CallMethod<TMessage, TBuilder>(string method, pb::IMessageLite request, pb::IBuilderLite<TMessage, TBuilder> response) {
+      return dispatch.CallMethod(method, request, response);
+    }
+    
+    public global::Google.ProtocolBuffers.TestProtos.SearchResponse Search(global::Google.ProtocolBuffers.TestProtos.SearchRequest searchRequest) {
+       return dispatch.CallMethod("Search", searchRequest, global::Google.ProtocolBuffers.TestProtos.SearchResponse.CreateBuilder());
+    }
+    
+    public global::Google.ProtocolBuffers.TestProtos.SearchResponse RefineSearch(global::Google.ProtocolBuffers.TestProtos.RefineSearchRequest refineSearchRequest) {
+       return dispatch.CallMethod("RefineSearch", refineSearchRequest, global::Google.ProtocolBuffers.TestProtos.SearchResponse.CreateBuilder());
+    }
+    
+    [global::System.CLSCompliant(false)]
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
+    public partial class Dispatch : pb::IRpcDispatch, global::System.IDisposable {
+      private readonly bool dispose;
+      private readonly ISearchService implementation;
+      public Dispatch(ISearchService implementation) : this(implementation, true) {
+      }
+      public Dispatch(ISearchService implementation, bool dispose) {
+        if (null == (this.implementation = implementation)) throw new global::System.ArgumentNullException();
+        this.dispose = dispose && implementation is global::System.IDisposable;
+      }
+      
+      public void Dispose() {
+        if (dispose) ((global::System.IDisposable)implementation).Dispose();
+      }
+      
+      public TMessage CallMethod<TMessage, TBuilder>(string methodName, pb::IMessageLite request, pb::IBuilderLite<TMessage, TBuilder> response)
+        where TMessage : pb::IMessageLite<TMessage, TBuilder>
+        where TBuilder : pb::IBuilderLite<TMessage, TBuilder> {
+        switch(methodName) {
+          case "Search": return response.MergeFrom(implementation.Search((global::Google.ProtocolBuffers.TestProtos.SearchRequest)request)).Build();
+          case "RefineSearch": return response.MergeFrom(implementation.RefineSearch((global::Google.ProtocolBuffers.TestProtos.RefineSearchRequest)request)).Build();
+          default: throw new global::System.MissingMethodException(typeof(ISearchService).FullName, methodName);
+        }
+      }
+    }
+    [global::System.CLSCompliant(false)]
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
+    public partial class ServerStub : pb::IRpcServerStub, global::System.IDisposable {
+      private readonly bool dispose;
+      private readonly pb::IRpcDispatch implementation;
+      public ServerStub(ISearchService implementation) : this(implementation, true) {
+      }
+      public ServerStub(ISearchService implementation, bool dispose) : this(new Dispatch(implementation, dispose), dispose) {
+      }
+      public ServerStub(pb::IRpcDispatch implementation) : this(implementation, true) {
+      }
+      public ServerStub(pb::IRpcDispatch implementation, bool dispose) {
+        if (null == (this.implementation = implementation)) throw new global::System.ArgumentNullException();
+        this.dispose = dispose && implementation is global::System.IDisposable;
+      }
+      
+      public void Dispose() {
+        if (dispose) ((global::System.IDisposable)implementation).Dispose();
+      }
+      
+      public pb::IMessageLite CallMethod(string methodName, pb::ICodedInputStream input, pb::ExtensionRegistry registry) {
+        switch(methodName) {
+          case "Search": return implementation.CallMethod(methodName, global::Google.ProtocolBuffers.TestProtos.SearchRequest.ParseFrom(input, registry), global::Google.ProtocolBuffers.TestProtos.SearchResponse.CreateBuilder());
+          case "RefineSearch": return implementation.CallMethod(methodName, global::Google.ProtocolBuffers.TestProtos.RefineSearchRequest.ParseFrom(input, registry), global::Google.ProtocolBuffers.TestProtos.SearchResponse.CreateBuilder());
+          default: throw new global::System.MissingMethodException(typeof(ISearchService).FullName, methodName);
+        }
+      }
+    }
+  }
+  #endregion
+  
+}
+
+#endregion Designer generated code

+ 386 - 0
src/ProtocolBuffersLite.Test/TestRpcForMimeTypes.cs

@@ -0,0 +1,386 @@
+#region Copyright notice and license
+
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc.  All rights reserved.
+// http://github.com/jskeet/dotnet-protobufs/
+// Original C++/Java/Python code:
+// http://code.google.com/p/protobuf/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+//     * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+//     * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+#endregion
+
+using System;
+using Google.ProtocolBuffers;
+using Google.ProtocolBuffers.Serialization.Http;
+using Google.ProtocolBuffers.TestProtos;
+using NUnit.Framework;
+using System.IO;
+using Google.ProtocolBuffers.Serialization;
+using System.Text;
+
+namespace Google.ProtocolBuffers
+{
+    /// <summary>
+    /// This class verifies the correct code is generated from unittest_rpc_interop.proto and provides a small demonstration
+    /// of using the new IRpcDispatch to write a client/server
+    /// </summary>
+    [TestFixture]
+    public class TestRpcForMimeTypes
+    {
+        /// <summary>
+        /// A sample implementation of the ISearchService for testing
+        /// </summary>
+        private class ExampleSearchImpl : ISearchService
+        {
+            SearchResponse ISearchService.Search(SearchRequest searchRequest)
+            {
+                if (searchRequest.CriteriaCount == 0)
+                {
+                    throw new ArgumentException("No criteria specified.", new InvalidOperationException());
+                }
+                SearchResponse.Builder resp = SearchResponse.CreateBuilder();
+                foreach (string criteria in searchRequest.CriteriaList)
+                {
+                    resp.AddResults(
+                        SearchResponse.Types.ResultItem.CreateBuilder().SetName(criteria).SetUrl("http://search.com").
+                            Build());
+                }
+                return resp.Build();
+            }
+
+            SearchResponse ISearchService.RefineSearch(RefineSearchRequest refineSearchRequest)
+            {
+                SearchResponse.Builder resp = refineSearchRequest.PreviousResults.ToBuilder();
+                foreach (string criteria in refineSearchRequest.CriteriaList)
+                {
+                    resp.AddResults(
+                        SearchResponse.Types.ResultItem.CreateBuilder().SetName(criteria).SetUrl("http://refine.com").
+                            Build());
+                }
+                return resp.Build();
+            }
+        }
+
+        /// <summary>
+        /// An example extraction of the wire protocol
+        /// </summary>
+        private interface IHttpTransfer
+        {
+            void Execute(string method, string contentType, Stream input, string acceptType, Stream output);
+        }
+
+        /// <summary>
+        /// An example of a server responding to a web/http request
+        /// </summary>
+        private class ExampleHttpServer : IHttpTransfer
+        {
+            public readonly MessageFormatOptions Options =
+                new MessageFormatOptions
+                {
+                    ExtensionRegistry = ExtensionRegistry.Empty,
+                    FormattedOutput = true,
+                    XmlReaderOptions = XmlReaderOptions.ReadNestedArrays,
+                    XmlReaderRootElementName = "request",
+                    XmlWriterOptions = XmlWriterOptions.OutputNestedArrays,
+                    XmlWriterRootElementName = "response"
+                };
+
+            private readonly IRpcServerStub _stub;
+
+            public ExampleHttpServer(ISearchService implementation)
+            {
+                //on the server, we create a dispatch to call the appropriate method by name
+                IRpcDispatch dispatch = new SearchService.Dispatch(implementation);
+                //we then wrap that dispatch in a server stub which will deserialize the wire bytes to the message
+                //type appropriate for the method name being invoked.
+                _stub = new SearchService.ServerStub(dispatch);
+            }
+
+            void IHttpTransfer.Execute(string method, string contentType, Stream input, string acceptType, Stream output)
+            {
+                //Extension for: Google.ProtocolBuffers.Serialization.Http.ServiceExtensions.HttpCallMethod(_stub,
+                _stub.HttpCallMethod(
+                    method, Options,
+                    contentType, input,
+                    acceptType, output
+                    );
+            }
+        }
+
+        /// <summary>
+        /// An example of a client sending a wire request
+        /// </summary>
+        private class ExampleClient : IRpcDispatch
+        {
+            public readonly MessageFormatOptions Options =
+                new MessageFormatOptions
+                {
+                    ExtensionRegistry = ExtensionRegistry.Empty,
+                    FormattedOutput = true,
+                    XmlReaderOptions = XmlReaderOptions.ReadNestedArrays,
+                    XmlReaderRootElementName = "response",
+                    XmlWriterOptions = XmlWriterOptions.OutputNestedArrays,
+                    XmlWriterRootElementName = "request"
+                };
+
+
+            private readonly IHttpTransfer _wire;
+            private readonly string _mimeType;
+
+            public ExampleClient(IHttpTransfer wire, string mimeType)
+            {
+                _wire = wire;
+                _mimeType = mimeType;
+            }
+
+            TMessage IRpcDispatch.CallMethod<TMessage, TBuilder>(string method, IMessageLite request,
+                                                                 IBuilderLite<TMessage, TBuilder> response)
+            {
+                MemoryStream input = new MemoryStream();
+                MemoryStream output = new MemoryStream();
+
+                //Write to _mimeType format
+                request.WriteTo(Options, _mimeType, input);
+
+                input.Position = 0;
+                _wire.Execute(method, _mimeType, input, _mimeType, output);
+
+                //Read from _mimeType format
+                output.Position = 0;
+                response.MergeFrom(Options, _mimeType, output);
+                
+                return response.Build();
+            }
+        }
+
+        /// <summary>
+        /// Test sending and recieving messages via text/json
+        /// </summary>
+        [Test]
+        public void TestClientServerWithJsonFormat()
+        {
+            ExampleHttpServer server = new ExampleHttpServer(new ExampleSearchImpl());
+            //obviously if this was a 'real' transport we would not use the server, rather the server would be listening, the client transmitting
+            IHttpTransfer wire = server;
+
+            ISearchService client = new SearchService(new ExampleClient(wire, "text/json"));
+            //now the client has a real, typed, interface to work with:
+            SearchResponse result = client.Search(SearchRequest.CreateBuilder().AddCriteria("Test").Build());
+            Assert.AreEqual(1, result.ResultsCount);
+            Assert.AreEqual("Test", result.ResultsList[0].Name);
+            Assert.AreEqual("http://search.com", result.ResultsList[0].Url);
+
+            //The test part of this, call the only other method
+            result =
+                client.RefineSearch(
+                    RefineSearchRequest.CreateBuilder().SetPreviousResults(result).AddCriteria("Refine").Build());
+            Assert.AreEqual(2, result.ResultsCount);
+            Assert.AreEqual("Test", result.ResultsList[0].Name);
+            Assert.AreEqual("http://search.com", result.ResultsList[0].Url);
+
+            Assert.AreEqual("Refine", result.ResultsList[1].Name);
+            Assert.AreEqual("http://refine.com", result.ResultsList[1].Url);
+        }
+
+        /// <summary>
+        /// Test sending and recieving messages via text/json
+        /// </summary>
+        [Test]
+        public void TestClientServerWithXmlFormat()
+        {
+            ExampleHttpServer server = new ExampleHttpServer(new ExampleSearchImpl());
+            //obviously if this was a 'real' transport we would not use the server, rather the server would be listening, the client transmitting
+            IHttpTransfer wire = server;
+
+            ISearchService client = new SearchService(new ExampleClient(wire, "text/xml"));
+            //now the client has a real, typed, interface to work with:
+            SearchResponse result = client.Search(SearchRequest.CreateBuilder().AddCriteria("Test").Build());
+            Assert.AreEqual(1, result.ResultsCount);
+            Assert.AreEqual("Test", result.ResultsList[0].Name);
+            Assert.AreEqual("http://search.com", result.ResultsList[0].Url);
+
+            //The test part of this, call the only other method
+            result =
+                client.RefineSearch(
+                    RefineSearchRequest.CreateBuilder().SetPreviousResults(result).AddCriteria("Refine").Build());
+            Assert.AreEqual(2, result.ResultsCount);
+            Assert.AreEqual("Test", result.ResultsList[0].Name);
+            Assert.AreEqual("http://search.com", result.ResultsList[0].Url);
+
+            Assert.AreEqual("Refine", result.ResultsList[1].Name);
+            Assert.AreEqual("http://refine.com", result.ResultsList[1].Url);
+        }
+
+        /// <summary>
+        /// Test sending and recieving messages via text/json
+        /// </summary>
+        [Test]
+        public void TestClientServerWithProtoFormat()
+        {
+            ExampleHttpServer server = new ExampleHttpServer(new ExampleSearchImpl());
+            //obviously if this was a 'real' transport we would not use the server, rather the server would be listening, the client transmitting
+            IHttpTransfer wire = server;
+
+            ISearchService client = new SearchService(new ExampleClient(wire, "application/x-protobuf"));
+            //now the client has a real, typed, interface to work with:
+            SearchResponse result = client.Search(SearchRequest.CreateBuilder().AddCriteria("Test").Build());
+            Assert.AreEqual(1, result.ResultsCount);
+            Assert.AreEqual("Test", result.ResultsList[0].Name);
+            Assert.AreEqual("http://search.com", result.ResultsList[0].Url);
+
+            //The test part of this, call the only other method
+            result =
+                client.RefineSearch(
+                    RefineSearchRequest.CreateBuilder().SetPreviousResults(result).AddCriteria("Refine").Build());
+            Assert.AreEqual(2, result.ResultsCount);
+            Assert.AreEqual("Test", result.ResultsList[0].Name);
+            Assert.AreEqual("http://search.com", result.ResultsList[0].Url);
+
+            Assert.AreEqual("Refine", result.ResultsList[1].Name);
+            Assert.AreEqual("http://refine.com", result.ResultsList[1].Url);
+        }
+
+        /// <summary>
+        /// Test sending and recieving messages via text/json
+        /// </summary>
+        [Test]
+        public void TestClientServerWithCustomFormat()
+        {
+            ExampleHttpServer server = new ExampleHttpServer(new ExampleSearchImpl());
+            //Setup our custom mime-type format as the only format supported:
+            server.Options.MimeInputTypes.Clear();
+            server.Options.MimeInputTypes.Add("foo/bar", CodedInputStream.CreateInstance);
+            server.Options.MimeOutputTypes.Clear();
+            server.Options.MimeOutputTypes.Add("foo/bar", CodedOutputStream.CreateInstance);
+
+            //obviously if this was a 'real' transport we would not use the server, rather the server would be listening, the client transmitting
+            IHttpTransfer wire = server;
+
+            ExampleClient exclient = new ExampleClient(wire, "foo/bar");
+            //Add our custom mime-type format
+            exclient.Options.MimeInputTypes.Add("foo/bar", CodedInputStream.CreateInstance);
+            exclient.Options.MimeOutputTypes.Add("foo/bar", CodedOutputStream.CreateInstance);
+            ISearchService client = new SearchService(exclient);
+
+            //now the client has a real, typed, interface to work with:
+            SearchResponse result = client.Search(SearchRequest.CreateBuilder().AddCriteria("Test").Build());
+            Assert.AreEqual(1, result.ResultsCount);
+            Assert.AreEqual("Test", result.ResultsList[0].Name);
+            Assert.AreEqual("http://search.com", result.ResultsList[0].Url);
+
+            //The test part of this, call the only other method
+            result =
+                client.RefineSearch(
+                    RefineSearchRequest.CreateBuilder().SetPreviousResults(result).AddCriteria("Refine").Build());
+            Assert.AreEqual(2, result.ResultsCount);
+            Assert.AreEqual("Test", result.ResultsList[0].Name);
+            Assert.AreEqual("http://search.com", result.ResultsList[0].Url);
+
+            Assert.AreEqual("Refine", result.ResultsList[1].Name);
+            Assert.AreEqual("http://refine.com", result.ResultsList[1].Url);
+        }
+
+        /// <summary>
+        /// Test sending and recieving messages via text/json
+        /// </summary>
+        [Test]
+        public void TestServerWithUriFormat()
+        {
+            ExampleHttpServer server = new ExampleHttpServer(new ExampleSearchImpl());
+            //obviously if this was a 'real' transport we would not use the server, rather the server would be listening, the client transmitting
+            IHttpTransfer wire = server;
+
+            MemoryStream input = new MemoryStream(Encoding.UTF8.GetBytes("?Criteria=Test&Criteria=Test+of%20URI"));
+            MemoryStream output = new MemoryStream();
+
+            //Call the server
+            wire.Execute("Search",
+                         MessageFormatOptions.ContentFormUrlEncoded, input,
+                         MessageFormatOptions.ContentTypeProtoBuffer, output
+                         );
+
+            SearchResponse result = SearchResponse.ParseFrom(output.ToArray());
+            Assert.AreEqual(2, result.ResultsCount);
+            Assert.AreEqual("Test", result.ResultsList[0].Name);
+            Assert.AreEqual("http://search.com", result.ResultsList[0].Url);
+
+            Assert.AreEqual("Test of URI", result.ResultsList[1].Name);
+            Assert.AreEqual("http://search.com", result.ResultsList[1].Url);
+        }
+
+        /// <summary>
+        /// Test sending and recieving messages via text/json
+        /// </summary>
+        [Test, ExpectedException(typeof(ArgumentOutOfRangeException))]
+        public void TestInvalidMimeType()
+        {
+            ExampleHttpServer server = new ExampleHttpServer(new ExampleSearchImpl());
+            //obviously if this was a 'real' transport we would not use the server, rather the server would be listening, the client transmitting
+            IHttpTransfer wire = server;
+
+            MemoryStream input = new MemoryStream();
+            MemoryStream output = new MemoryStream();
+
+            //Call the server
+            wire.Execute("Search",
+                         "bad/mime", input,
+                         MessageFormatOptions.ContentTypeProtoBuffer, output
+                         );
+            Assert.Fail();
+        }
+
+        /// <summary>
+        /// Test sending and recieving messages via text/json
+        /// </summary>
+        [Test]
+        public void TestDefaultMimeType()
+        {
+            ExampleHttpServer server = new ExampleHttpServer(new ExampleSearchImpl());
+            
+            //obviously if this was a 'real' transport we would not use the server, rather the server would be listening, the client transmitting
+            IHttpTransfer wire = server;
+
+
+            MemoryStream input = new MemoryStream(new SearchRequest.Builder().AddCriteria("Test").Build().ToByteArray());
+            MemoryStream output = new MemoryStream();
+
+            //With this default set, any invalid/unknown mime-type will be mapped to use that format
+            server.Options.DefaultContentType = MessageFormatOptions.ContentTypeProtoBuffer;
+
+            wire.Execute("Search",
+                         "foo", input,
+                         "bar", output
+                         );
+
+            SearchResponse result = SearchResponse.ParseFrom(output.ToArray());
+            Assert.AreEqual(1, result.ResultsCount);
+            Assert.AreEqual("Test", result.ResultsList[0].Name);
+            Assert.AreEqual("http://search.com", result.ResultsList[0].Url);
+        }
+    }
+}

+ 171 - 0
src/ProtocolBuffersLite.Test/TestRpcGenerator.cs

@@ -0,0 +1,171 @@
+#region Copyright notice and license
+
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc.  All rights reserved.
+// http://github.com/jskeet/dotnet-protobufs/
+// Original C++/Java/Python code:
+// http://code.google.com/p/protobuf/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+//     * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+//     * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+#endregion
+
+using System;
+using Google.ProtocolBuffers;
+using Google.ProtocolBuffers.TestProtos;
+using NUnit.Framework;
+
+namespace Google.ProtocolBuffers
+{
+    /// <summary>
+    /// This class verifies the correct code is generated from unittest_rpc_interop.proto and provides a small demonstration
+    /// of using the new IRpcDispatch to write a client/server
+    /// </summary>
+    [TestFixture]
+    public class TestRpcGenerator
+    {
+        /// <summary>
+        /// A sample implementation of the ISearchService for testing
+        /// </summary>
+        private class ExampleSearchImpl : ISearchService
+        {
+            SearchResponse ISearchService.Search(SearchRequest searchRequest)
+            {
+                if (searchRequest.CriteriaCount == 0)
+                {
+                    throw new ArgumentException("No criteria specified.", new InvalidOperationException());
+                }
+                SearchResponse.Builder resp = SearchResponse.CreateBuilder();
+                foreach (string criteria in searchRequest.CriteriaList)
+                {
+                    resp.AddResults(
+                        SearchResponse.Types.ResultItem.CreateBuilder().SetName(criteria).SetUrl("http://search.com").
+                            Build());
+                }
+                return resp.Build();
+            }
+
+            SearchResponse ISearchService.RefineSearch(RefineSearchRequest refineSearchRequest)
+            {
+                SearchResponse.Builder resp = refineSearchRequest.PreviousResults.ToBuilder();
+                foreach (string criteria in refineSearchRequest.CriteriaList)
+                {
+                    resp.AddResults(
+                        SearchResponse.Types.ResultItem.CreateBuilder().SetName(criteria).SetUrl("http://refine.com").
+                            Build());
+                }
+                return resp.Build();
+            }
+        }
+
+        /// <summary>
+        /// An example extraction of the wire protocol
+        /// </summary>
+        private interface IWireTransfer
+        {
+            byte[] Execute(string method, byte[] message);
+        }
+
+        /// <summary>
+        /// An example of a server responding to a wire request
+        /// </summary>
+        private class ExampleServerHost : IWireTransfer
+        {
+            private readonly IRpcServerStub _stub;
+
+            public ExampleServerHost(ISearchService implementation)
+            {
+                //on the server, we create a dispatch to call the appropriate method by name
+                IRpcDispatch dispatch = new SearchService.Dispatch(implementation);
+                //we then wrap that dispatch in a server stub which will deserialize the wire bytes to the message
+                //type appropriate for the method name being invoked.
+                _stub = new SearchService.ServerStub(dispatch);
+            }
+
+            byte[] IWireTransfer.Execute(string method, byte[] message)
+            {
+                //now when we recieve a wire transmission to invoke a method by name with a byte[] or stream payload
+                //we just simply call the sub:
+                IMessageLite response = _stub.CallMethod(method, CodedInputStream.CreateInstance(message),
+                                                         ExtensionRegistry.Empty);
+                //now we return the expected response message:
+                return response.ToByteArray();
+            }
+        }
+
+        /// <summary>
+        /// An example of a client sending a wire request
+        /// </summary>
+        private class ExampleClient : IRpcDispatch
+        {
+            private readonly IWireTransfer _wire;
+
+            public ExampleClient(IWireTransfer wire)
+            {
+                _wire = wire;
+            }
+
+            TMessage IRpcDispatch.CallMethod<TMessage, TBuilder>(string method, IMessageLite request,
+                                                                 IBuilderLite<TMessage, TBuilder> response)
+            {
+                byte[] rawResponse = _wire.Execute(method, request.ToByteArray());
+                response.MergeFrom(rawResponse);
+                return response.Build();
+            }
+        }
+
+        /// <summary>
+        /// Put it all together to create one seamless client/server experience full of rich-type goodness ;)
+        /// All you need to do is send/recieve the method name and message bytes across the wire.
+        /// </summary>
+        [Test]
+        public void TestClientServerDispatch()
+        {
+            ExampleServerHost server = new ExampleServerHost(new ExampleSearchImpl());
+            //obviously if this was a 'real' transport we would not use the server, rather the server would be listening, the client transmitting
+            IWireTransfer wire = server;
+
+            ISearchService client = new SearchService(new ExampleClient(wire));
+            //now the client has a real, typed, interface to work with:
+            SearchResponse result = client.Search(SearchRequest.CreateBuilder().AddCriteria("Test").Build());
+            Assert.AreEqual(1, result.ResultsCount);
+            Assert.AreEqual("Test", result.ResultsList[0].Name);
+            Assert.AreEqual("http://search.com", result.ResultsList[0].Url);
+
+            //The test part of this, call the only other method
+            result =
+                client.RefineSearch(
+                    RefineSearchRequest.CreateBuilder().SetPreviousResults(result).AddCriteria("Refine").Build());
+            Assert.AreEqual(2, result.ResultsCount);
+            Assert.AreEqual("Test", result.ResultsList[0].Name);
+            Assert.AreEqual("http://search.com", result.ResultsList[0].Url);
+
+            Assert.AreEqual("Refine", result.ResultsList[1].Name);
+            Assert.AreEqual("http://refine.com", result.ResultsList[1].Url);
+        }
+    }
+}

+ 24 - 0
src/copysolution.bat

@@ -0,0 +1,24 @@
+@ECHO OFF
+IF "%1" == "2008" GOTO COPY2008
+IF "%1" == "2010" GOTO COPY2010
+GOTO HELP
+
+:COPY2008
+type ProtocolBuffers.sln | FIND " Visual Studio " > Temp.sln
+type ProtocolBuffers2008.sln | FIND /V " Visual Studio " >> Temp.sln
+move /Y Temp.sln ProtocolBuffers.sln
+GOTO EXIT
+
+:COPY2010
+type ProtocolBuffers2008.sln | FIND " Visual Studio " > Temp.sln
+type ProtocolBuffers.sln | FIND /V " Visual Studio " >> Temp.sln
+move /Y Temp.sln ProtocolBuffers2008.sln
+GOTO EXIT
+
+:HELP
+ECHO.
+ECHO Specify the Visiual Studio edition (2008/2010)
+ECHO Example:  %~nx0 2008
+ECHO.
+
+:EXIT

Некоторые файлы не были показаны из-за большого количества измененных файлов