Merge branch 'csharp' of git://github.com/google/protobuf into google-csharp
diff --git a/.gitignore b/.gitignore
index 220e5c3..c21c20c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -79,3 +79,6 @@
vsprojects/Debug
vsprojects/Release
+# NuGet packages: we want the repository configuration, but not the
+# packages themselves.
+/csharp/src/packages/*/
diff --git a/csharp/lib/NUnit-config/Microsoft.VisualStudio.TestTools.cs b/csharp/lib/NUnit-config/Microsoft.VisualStudio.TestTools.cs
deleted file mode 100644
index fd151da..0000000
--- a/csharp/lib/NUnit-config/Microsoft.VisualStudio.TestTools.cs
+++ /dev/null
@@ -1,54 +0,0 @@
-
-using System;
-#if CLIENTPROFILE
-namespace Microsoft.VisualStudio.TestTools.UnitTesting
-{
- [AttributeUsage(AttributeTargets.Class, Inherited = true, AllowMultiple = false)]
- public sealed class TestClassAttribute : NUnit.Framework.TestFixtureAttribute
- {
- }
-
- [AttributeUsage(AttributeTargets.Method, Inherited = true, AllowMultiple = false)]
- public sealed class TestMethodAttribute : NUnit.Framework.TestAttribute
- {
- }
-
- [AttributeUsage(AttributeTargets.Method, Inherited = true, AllowMultiple = false)]
- public sealed class TestInitializeAttribute : NUnit.Framework.SetUpAttribute
- {
- }
-
- [AttributeUsage(AttributeTargets.Method, Inherited = true, AllowMultiple = false)]
- public sealed class IgnoreAttribute : NUnit.Framework.IgnoreAttribute
- {
- }
-
- [AttributeUsage(AttributeTargets.Method, Inherited = true, AllowMultiple = false)]
- public sealed class ExpectedExceptionAttribute : NUnit.Framework.ExpectedExceptionAttribute
- {
- public ExpectedExceptionAttribute(Type type) : base(type)
- { }
- }
-
- public class Assert : NUnit.Framework.Assert
- {
- [Obsolete("Do not use AreEqual on Byte[], use TestUtil.AssertBytesEqual(,)")]
- public static void AreEqual(byte[] b1, byte[] b2)
- {
- NUnit.Framework.Assert.AreEqual(b1, b2);
- }
-
- [Obsolete("No not use assert with miss-matched types.")]
- public static new void AreEqual(object b1, object b2)
- {
- NUnit.Framework.Assert.AreEqual(b1, b2);
- }
-
- //Allowed if the types match
- public static void AreEqual<T>(T b1, T b2)
- {
- NUnit.Framework.Assert.AreEqual(b1, b2);
- }
- }
-}
-#endif
\ No newline at end of file
diff --git a/csharp/lib/NUnit-config/nunit-console.v2.0.config b/csharp/lib/NUnit-config/nunit-console.v2.0.config
deleted file mode 100644
index 30453c9..0000000
--- a/csharp/lib/NUnit-config/nunit-console.v2.0.config
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<configuration>
-
- <startup>
- <requiredRuntime version="v2.0.50727" />
- </startup>
-
- <runtime>
- <!-- We need this so test exceptions don't crash NUnit -->
- <legacyUnhandledExceptionPolicy enabled="1" />
-
- <!-- Look for addins in the addins directory for now -->
- <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
- <probing privatePath="lib;addins"/>
- </assemblyBinding>
- </runtime>
-
-</configuration>
\ No newline at end of file
diff --git a/csharp/lib/NUnit-config/nunit-console.v3.5.config b/csharp/lib/NUnit-config/nunit-console.v3.5.config
deleted file mode 100644
index 30453c9..0000000
--- a/csharp/lib/NUnit-config/nunit-console.v3.5.config
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<configuration>
-
- <startup>
- <requiredRuntime version="v2.0.50727" />
- </startup>
-
- <runtime>
- <!-- We need this so test exceptions don't crash NUnit -->
- <legacyUnhandledExceptionPolicy enabled="1" />
-
- <!-- Look for addins in the addins directory for now -->
- <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
- <probing privatePath="lib;addins"/>
- </assemblyBinding>
- </runtime>
-
-</configuration>
\ No newline at end of file
diff --git a/csharp/lib/NUnit-config/nunit-console.v4.0.config b/csharp/lib/NUnit-config/nunit-console.v4.0.config
deleted file mode 100644
index 08ee954..0000000
--- a/csharp/lib/NUnit-config/nunit-console.v4.0.config
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<configuration>
-
- <startup useLegacyV2RuntimeActivationPolicy="true">
- <requiredRuntime version="v4.0.30319" safemode="true"/>
- </startup>
-
- <runtime>
- <!-- We need this so test exceptions don't crash NUnit -->
- <legacyUnhandledExceptionPolicy enabled="1" />
-
- <!-- Look for addins in the addins directory for now -->
- <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
- <probing privatePath="lib;addins"/>
- </assemblyBinding>
- </runtime>
-
-</configuration>
\ No newline at end of file
diff --git a/csharp/src/AddressBook/AddressBook.csproj b/csharp/src/AddressBook/AddressBook.csproj
index fe05ad6..52b82a8 100644
--- a/csharp/src/AddressBook/AddressBook.csproj
+++ b/csharp/src/AddressBook/AddressBook.csproj
@@ -1,8 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
- <EnvironmentFlavor>CLIENTPROFILE</EnvironmentFlavor>
- <EnvironmentTemplate>NET35</EnvironmentTemplate>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
@@ -12,16 +10,17 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Google.ProtocolBuffers.Examples.AddressBook</RootNamespace>
<AssemblyName>AddressBook</AssemblyName>
- <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<StartupObject>Google.ProtocolBuffers.Examples.AddressBook.Program</StartupObject>
+ <TargetFrameworkProfile>Client</TargetFrameworkProfile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
- <OutputPath>bin\NET35\Debug</OutputPath>
- <IntermediateOutputPath>obj\NET35\Debug\</IntermediateOutputPath>
+ <OutputPath>bin\Debug</OutputPath>
+ <IntermediateOutputPath>obj\Debug\</IntermediateOutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
@@ -32,8 +31,8 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
- <OutputPath>bin\NET35\Release</OutputPath>
- <IntermediateOutputPath>obj\NET35\Release\</IntermediateOutputPath>
+ <OutputPath>bin\Release</OutputPath>
+ <IntermediateOutputPath>obj\Release\</IntermediateOutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
diff --git a/csharp/src/AddressBook/app.config b/csharp/src/AddressBook/app.config
index 0df7832..19fac17 100644
--- a/csharp/src/AddressBook/app.config
+++ b/csharp/src/AddressBook/app.config
@@ -1,3 +1,3 @@
<?xml version="1.0"?>
<configuration>
- <startup/></configuration>
+ <startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0,Profile=Client"/></startup></configuration>
diff --git a/csharp/src/ProtoBench/TestProtos/GoogleSizeProtoFile.cs b/csharp/src/ProtoBench/GoogleSize.cs
similarity index 90%
rename from csharp/src/ProtoBench/TestProtos/GoogleSizeProtoFile.cs
rename to csharp/src/ProtoBench/GoogleSize.cs
index aa6c507..06f2c0c 100644
--- a/csharp/src/ProtoBench/TestProtos/GoogleSizeProtoFile.cs
+++ b/csharp/src/ProtoBench/GoogleSize.cs
@@ -1,4572 +1,4569 @@
-// Generated by ProtoGen, Version=2.4.1.555, Culture=neutral, PublicKeyToken=55f7125234beb589. DO NOT EDIT!
-#pragma warning disable 1591, 0612, 3021
-#region Designer generated code
-
-using pb = global::Google.ProtocolBuffers;
-using pbc = global::Google.ProtocolBuffers.Collections;
-using pbd = global::Google.ProtocolBuffers.Descriptors;
-using scg = global::System.Collections.Generic;
-namespace Google.ProtocolBuffers.ProtoBench {
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public static partial class GoogleSizeProtoFile {
-
- #region Extension registration
- public static void RegisterAllExtensions(pb::ExtensionRegistry registry) {
- }
- #endregion
- #region Static variables
- internal static pbd::MessageDescriptor internal__static_benchmarks_SizeMessage1__Descriptor;
- internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.ProtoBench.SizeMessage1, global::Google.ProtocolBuffers.ProtoBench.SizeMessage1.Builder> internal__static_benchmarks_SizeMessage1__FieldAccessorTable;
- internal static pbd::MessageDescriptor internal__static_benchmarks_SizeMessage1SubMessage__Descriptor;
- internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.ProtoBench.SizeMessage1SubMessage, global::Google.ProtocolBuffers.ProtoBench.SizeMessage1SubMessage.Builder> internal__static_benchmarks_SizeMessage1SubMessage__FieldAccessorTable;
- internal static pbd::MessageDescriptor internal__static_benchmarks_SizeMessage2__Descriptor;
- internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.ProtoBench.SizeMessage2, global::Google.ProtocolBuffers.ProtoBench.SizeMessage2.Builder> internal__static_benchmarks_SizeMessage2__FieldAccessorTable;
- internal static pbd::MessageDescriptor internal__static_benchmarks_SizeMessage2_Group1__Descriptor;
- internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.ProtoBench.SizeMessage2.Types.Group1, global::Google.ProtocolBuffers.ProtoBench.SizeMessage2.Types.Group1.Builder> internal__static_benchmarks_SizeMessage2_Group1__FieldAccessorTable;
- internal static pbd::MessageDescriptor internal__static_benchmarks_SizeMessage2GroupedMessage__Descriptor;
- internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.ProtoBench.SizeMessage2GroupedMessage, global::Google.ProtocolBuffers.ProtoBench.SizeMessage2GroupedMessage.Builder> internal__static_benchmarks_SizeMessage2GroupedMessage__FieldAccessorTable;
- #endregion
- #region Descriptor
- public static pbd::FileDescriptor Descriptor {
- get { return descriptor; }
- }
- private static pbd::FileDescriptor descriptor;
-
- static GoogleSizeProtoFile() {
- byte[] descriptorData = global::System.Convert.FromBase64String(
- string.Concat(
- "ChxiZW5jaG1hcmtzL2dvb2dsZV9zaXplLnByb3RvEgpiZW5jaG1hcmtzGiRn",
- "b29nbGUvcHJvdG9idWYvY3NoYXJwX29wdGlvbnMucHJvdG8i9gYKDFNpemVN",
- "ZXNzYWdlMRIOCgZmaWVsZDEYASACKAkSDgoGZmllbGQ5GAkgASgJEg8KB2Zp",
- "ZWxkMTgYEiABKAkSFgoHZmllbGQ4MBhQIAEoCDoFZmFsc2USFQoHZmllbGQ4",
- "MRhRIAEoCDoEdHJ1ZRIOCgZmaWVsZDIYAiACKAUSDgoGZmllbGQzGAMgAigF",
- "EhEKCGZpZWxkMjgwGJgCIAEoBRIRCgZmaWVsZDYYBiABKAU6ATASDwoHZmll",
- "bGQyMhgWIAEoAxIOCgZmaWVsZDQYBCABKAkSDgoGZmllbGQ1GAUgAygGEhYK",
- "B2ZpZWxkNTkYOyABKAg6BWZhbHNlEg4KBmZpZWxkNxgHIAEoCRIPCgdmaWVs",
- "ZDE2GBAgASgFEhQKCGZpZWxkMTMwGIIBIAEoBToBMBIVCgdmaWVsZDEyGAwg",
- "ASgIOgR0cnVlEhUKB2ZpZWxkMTcYESABKAg6BHRydWUSFQoHZmllbGQxMxgN",
- "IAEoCDoEdHJ1ZRIVCgdmaWVsZDE0GA4gASgIOgR0cnVlEhMKCGZpZWxkMTA0",
- "GGggASgFOgEwEhMKCGZpZWxkMTAwGGQgASgFOgEwEhMKCGZpZWxkMTAxGGUg",
- "ASgFOgEwEhAKCGZpZWxkMTAyGGYgASgJEhAKCGZpZWxkMTAzGGcgASgJEhIK",
- "B2ZpZWxkMjkYHSABKAU6ATASFgoHZmllbGQzMBgeIAEoCDoFZmFsc2USEwoH",
- "ZmllbGQ2MBg8IAEoBToCLTESFQoIZmllbGQyNzEYjwIgASgFOgItMRIVCghm",
- "aWVsZDI3MhiQAiABKAU6Ai0xEhEKCGZpZWxkMTUwGJYBIAEoBRISCgdmaWVs",
- "ZDIzGBcgASgFOgEwEhYKB2ZpZWxkMjQYGCABKAg6BWZhbHNlEhIKB2ZpZWxk",
- "MjUYGSABKAU6ATASMwoHZmllbGQxNRgPIAEoCzIiLmJlbmNobWFya3MuU2l6",
- "ZU1lc3NhZ2UxU3ViTWVzc2FnZRIPCgdmaWVsZDc4GE4gASgIEhIKB2ZpZWxk",
- "NjcYQyABKAU6ATASDwoHZmllbGQ2OBhEIAEoBRIUCghmaWVsZDEyOBiAASAB",
- "KAU6ATASKAoIZmllbGQxMjkYgQEgASgJOhV4eHh4eHh4eHh4eHh4eHh4eHh4",
- "eHgSFAoIZmllbGQxMzEYgwEgASgFOgEwIqEDChZTaXplTWVzc2FnZTFTdWJN",
- "ZXNzYWdlEhEKBmZpZWxkMRgBIAEoBToBMBIRCgZmaWVsZDIYAiABKAU6ATAS",
- "EQoGZmllbGQzGAMgASgFOgEwEg8KB2ZpZWxkMTUYDyABKAkSFQoHZmllbGQx",
- "MhgMIAEoCDoEdHJ1ZRIPCgdmaWVsZDEzGA0gASgDEg8KB2ZpZWxkMTQYDiAB",
- "KAMSDwoHZmllbGQxNhgQIAEoBRISCgdmaWVsZDE5GBMgASgFOgEyEhUKB2Zp",
- "ZWxkMjAYFCABKAg6BHRydWUSFQoHZmllbGQyOBgcIAEoCDoEdHJ1ZRIPCgdm",
- "aWVsZDIxGBUgASgGEg8KB2ZpZWxkMjIYFiABKAUSFgoHZmllbGQyMxgXIAEo",
- "CDoFZmFsc2USGAoIZmllbGQyMDYYzgEgASgIOgVmYWxzZRIRCghmaWVsZDIw",
- "MxjLASABKAcSEQoIZmllbGQyMDQYzAEgASgFEhEKCGZpZWxkMjA1GM0BIAEo",
- "CRIRCghmaWVsZDIwNxjPASABKAQSEQoIZmllbGQzMDAYrAIgASgEIscHCgxT",
- "aXplTWVzc2FnZTISDgoGZmllbGQxGAEgASgJEg4KBmZpZWxkMxgDIAEoAxIO",
- "CgZmaWVsZDQYBCABKAMSDwoHZmllbGQzMBgeIAEoAxIWCgdmaWVsZDc1GEsg",
- "ASgIOgVmYWxzZRIOCgZmaWVsZDYYBiABKAkSDgoGZmllbGQyGAIgASgMEhIK",
- "B2ZpZWxkMjEYFSABKAU6ATASDwoHZmllbGQ3MRhHIAEoBRIPCgdmaWVsZDI1",
- "GBkgASgCEhMKCGZpZWxkMTA5GG0gASgFOgEwEhQKCGZpZWxkMjEwGNIBIAEo",
- "BToBMBIUCghmaWVsZDIxMRjTASABKAU6ATASFAoIZmllbGQyMTIY1AEgASgF",
- "OgEwEhQKCGZpZWxkMjEzGNUBIAEoBToBMBIUCghmaWVsZDIxNhjYASABKAU6",
- "ATASFAoIZmllbGQyMTcY2QEgASgFOgEwEhQKCGZpZWxkMjE4GNoBIAEoBToB",
- "MBIUCghmaWVsZDIyMBjcASABKAU6ATASFAoIZmllbGQyMjEY3QEgASgFOgEw",
- "EhQKCGZpZWxkMjIyGN4BIAEoAjoBMBIPCgdmaWVsZDYzGD8gASgFEi8KBmdy",
- "b3VwMRgKIAMoCjIfLmJlbmNobWFya3MuU2l6ZU1lc3NhZ2UyLkdyb3VwMRIR",
- "CghmaWVsZDEyOBiAASADKAkSEQoIZmllbGQxMzEYgwEgASgDEhAKCGZpZWxk",
- "MTI3GH8gAygJEhEKCGZpZWxkMTI5GIEBIAEoBRIRCghmaWVsZDEzMBiCASAD",
- "KAMSGAoIZmllbGQyMDUYzQEgASgIOgVmYWxzZRIYCghmaWVsZDIwNhjOASAB",
- "KAg6BWZhbHNlGsICCgZHcm91cDESDwoHZmllbGQxMRgLIAIoAhIPCgdmaWVs",
- "ZDI2GBogASgCEg8KB2ZpZWxkMTIYDCABKAkSDwoHZmllbGQxMxgNIAEoCRIP",
- "CgdmaWVsZDE0GA4gAygJEg8KB2ZpZWxkMTUYDyACKAQSDgoGZmllbGQ1GAUg",
- "ASgFEg8KB2ZpZWxkMjcYGyABKAkSDwoHZmllbGQyOBgcIAEoBRIPCgdmaWVs",
- "ZDI5GB0gASgJEg8KB2ZpZWxkMTYYECABKAkSDwoHZmllbGQyMhgWIAMoCRIP",
- "CgdmaWVsZDczGEkgAygFEhIKB2ZpZWxkMjAYFCABKAU6ATASDwoHZmllbGQy",
- "NBgYIAEoCRI3CgdmaWVsZDMxGB8gASgLMiYuYmVuY2htYXJrcy5TaXplTWVz",
- "c2FnZTJHcm91cGVkTWVzc2FnZSLeAQoaU2l6ZU1lc3NhZ2UyR3JvdXBlZE1l",
- "c3NhZ2USDgoGZmllbGQxGAEgASgCEg4KBmZpZWxkMhgCIAEoAhIRCgZmaWVs",
- "ZDMYAyABKAI6ATASDgoGZmllbGQ0GAQgASgIEg4KBmZpZWxkNRgFIAEoCBIU",
- "CgZmaWVsZDYYBiABKAg6BHRydWUSFQoGZmllbGQ3GAcgASgIOgVmYWxzZRIO",
- "CgZmaWVsZDgYCCABKAISDgoGZmllbGQ5GAkgASgIEg8KB2ZpZWxkMTAYCiAB",
- "KAISDwoHZmllbGQxMRgLIAEoA0JJQgpHb29nbGVTaXplSALCPjgKIUdvb2ds",
- "ZS5Qcm90b2NvbEJ1ZmZlcnMuUHJvdG9CZW5jaBITR29vZ2xlU2l6ZVByb3Rv",
- "RmlsZQ=="));
- pbd::FileDescriptor.InternalDescriptorAssigner assigner = delegate(pbd::FileDescriptor root) {
- descriptor = root;
- internal__static_benchmarks_SizeMessage1__Descriptor = Descriptor.MessageTypes[0];
- internal__static_benchmarks_SizeMessage1__FieldAccessorTable =
- new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.ProtoBench.SizeMessage1, global::Google.ProtocolBuffers.ProtoBench.SizeMessage1.Builder>(internal__static_benchmarks_SizeMessage1__Descriptor,
- new string[] { "Field1", "Field9", "Field18", "Field80", "Field81", "Field2", "Field3", "Field280", "Field6", "Field22", "Field4", "Field5", "Field59", "Field7", "Field16", "Field130", "Field12", "Field17", "Field13", "Field14", "Field104", "Field100", "Field101", "Field102", "Field103", "Field29", "Field30", "Field60", "Field271", "Field272", "Field150", "Field23", "Field24", "Field25", "Field15", "Field78", "Field67", "Field68", "Field128", "Field129", "Field131", });
- internal__static_benchmarks_SizeMessage1SubMessage__Descriptor = Descriptor.MessageTypes[1];
- internal__static_benchmarks_SizeMessage1SubMessage__FieldAccessorTable =
- new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.ProtoBench.SizeMessage1SubMessage, global::Google.ProtocolBuffers.ProtoBench.SizeMessage1SubMessage.Builder>(internal__static_benchmarks_SizeMessage1SubMessage__Descriptor,
- new string[] { "Field1", "Field2", "Field3", "Field15", "Field12", "Field13", "Field14", "Field16", "Field19", "Field20", "Field28", "Field21", "Field22", "Field23", "Field206", "Field203", "Field204", "Field205", "Field207", "Field300", });
- internal__static_benchmarks_SizeMessage2__Descriptor = Descriptor.MessageTypes[2];
- internal__static_benchmarks_SizeMessage2__FieldAccessorTable =
- new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.ProtoBench.SizeMessage2, global::Google.ProtocolBuffers.ProtoBench.SizeMessage2.Builder>(internal__static_benchmarks_SizeMessage2__Descriptor,
- new string[] { "Field1", "Field3", "Field4", "Field30", "Field75", "Field6", "Field2", "Field21", "Field71", "Field25", "Field109", "Field210", "Field211", "Field212", "Field213", "Field216", "Field217", "Field218", "Field220", "Field221", "Field222", "Field63", "Group1", "Field128", "Field131", "Field127", "Field129", "Field130", "Field205", "Field206", });
- internal__static_benchmarks_SizeMessage2_Group1__Descriptor = internal__static_benchmarks_SizeMessage2__Descriptor.NestedTypes[0];
- internal__static_benchmarks_SizeMessage2_Group1__FieldAccessorTable =
- new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.ProtoBench.SizeMessage2.Types.Group1, global::Google.ProtocolBuffers.ProtoBench.SizeMessage2.Types.Group1.Builder>(internal__static_benchmarks_SizeMessage2_Group1__Descriptor,
- new string[] { "Field11", "Field26", "Field12", "Field13", "Field14", "Field15", "Field5", "Field27", "Field28", "Field29", "Field16", "Field22", "Field73", "Field20", "Field24", "Field31", });
- internal__static_benchmarks_SizeMessage2GroupedMessage__Descriptor = Descriptor.MessageTypes[3];
- internal__static_benchmarks_SizeMessage2GroupedMessage__FieldAccessorTable =
- new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.ProtoBench.SizeMessage2GroupedMessage, global::Google.ProtocolBuffers.ProtoBench.SizeMessage2GroupedMessage.Builder>(internal__static_benchmarks_SizeMessage2GroupedMessage__Descriptor,
- new string[] { "Field1", "Field2", "Field3", "Field4", "Field5", "Field6", "Field7", "Field8", "Field9", "Field10", "Field11", });
- 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 Messages
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class SizeMessage1 : pb::GeneratedMessage<SizeMessage1, SizeMessage1.Builder> {
- private SizeMessage1() { }
- private static readonly SizeMessage1 defaultInstance = new SizeMessage1().MakeReadOnly();
- public static SizeMessage1 DefaultInstance {
- get { return defaultInstance; }
- }
-
- public override SizeMessage1 DefaultInstanceForType {
- get { return DefaultInstance; }
- }
-
- protected override SizeMessage1 ThisMessage {
- get { return this; }
- }
-
- public static pbd::MessageDescriptor Descriptor {
- get { return global::Google.ProtocolBuffers.ProtoBench.GoogleSizeProtoFile.internal__static_benchmarks_SizeMessage1__Descriptor; }
- }
-
- protected override pb::FieldAccess.FieldAccessorTable<SizeMessage1, SizeMessage1.Builder> InternalFieldAccessors {
- get { return global::Google.ProtocolBuffers.ProtoBench.GoogleSizeProtoFile.internal__static_benchmarks_SizeMessage1__FieldAccessorTable; }
- }
-
- public const int Field1FieldNumber = 1;
- private bool hasField1;
- private string field1_ = "";
- public bool HasField1 {
- get { return hasField1; }
- }
- public string Field1 {
- get { return field1_; }
- }
-
- public const int Field9FieldNumber = 9;
- private bool hasField9;
- private string field9_ = "";
- public bool HasField9 {
- get { return hasField9; }
- }
- public string Field9 {
- get { return field9_; }
- }
-
- public const int Field18FieldNumber = 18;
- private bool hasField18;
- private string field18_ = "";
- public bool HasField18 {
- get { return hasField18; }
- }
- public string Field18 {
- get { return field18_; }
- }
-
- public const int Field80FieldNumber = 80;
- private bool hasField80;
- private bool field80_;
- public bool HasField80 {
- get { return hasField80; }
- }
- public bool Field80 {
- get { return field80_; }
- }
-
- public const int Field81FieldNumber = 81;
- private bool hasField81;
- private bool field81_ = true;
- public bool HasField81 {
- get { return hasField81; }
- }
- public bool Field81 {
- get { return field81_; }
- }
-
- public const int Field2FieldNumber = 2;
- private bool hasField2;
- private int field2_;
- public bool HasField2 {
- get { return hasField2; }
- }
- public int Field2 {
- get { return field2_; }
- }
-
- public const int Field3FieldNumber = 3;
- private bool hasField3;
- private int field3_;
- public bool HasField3 {
- get { return hasField3; }
- }
- public int Field3 {
- get { return field3_; }
- }
-
- public const int Field280FieldNumber = 280;
- private bool hasField280;
- private int field280_;
- public bool HasField280 {
- get { return hasField280; }
- }
- public int Field280 {
- get { return field280_; }
- }
-
- public const int Field6FieldNumber = 6;
- private bool hasField6;
- private int field6_;
- public bool HasField6 {
- get { return hasField6; }
- }
- public int Field6 {
- get { return field6_; }
- }
-
- public const int Field22FieldNumber = 22;
- private bool hasField22;
- private long field22_;
- public bool HasField22 {
- get { return hasField22; }
- }
- public long Field22 {
- get { return field22_; }
- }
-
- public const int Field4FieldNumber = 4;
- private bool hasField4;
- private string field4_ = "";
- public bool HasField4 {
- get { return hasField4; }
- }
- public string Field4 {
- get { return field4_; }
- }
-
- public const int Field5FieldNumber = 5;
- private pbc::PopsicleList<ulong> field5_ = new pbc::PopsicleList<ulong>();
- [global::System.CLSCompliant(false)]
- public scg::IList<ulong> Field5List {
- get { return pbc::Lists.AsReadOnly(field5_); }
- }
- public int Field5Count {
- get { return field5_.Count; }
- }
- [global::System.CLSCompliant(false)]
- public ulong GetField5(int index) {
- return field5_[index];
- }
-
- public const int Field59FieldNumber = 59;
- private bool hasField59;
- private bool field59_;
- public bool HasField59 {
- get { return hasField59; }
- }
- public bool Field59 {
- get { return field59_; }
- }
-
- public const int Field7FieldNumber = 7;
- private bool hasField7;
- private string field7_ = "";
- public bool HasField7 {
- get { return hasField7; }
- }
- public string Field7 {
- get { return field7_; }
- }
-
- public const int Field16FieldNumber = 16;
- private bool hasField16;
- private int field16_;
- public bool HasField16 {
- get { return hasField16; }
- }
- public int Field16 {
- get { return field16_; }
- }
-
- public const int Field130FieldNumber = 130;
- private bool hasField130;
- private int field130_;
- public bool HasField130 {
- get { return hasField130; }
- }
- public int Field130 {
- get { return field130_; }
- }
-
- public const int Field12FieldNumber = 12;
- private bool hasField12;
- private bool field12_ = true;
- public bool HasField12 {
- get { return hasField12; }
- }
- public bool Field12 {
- get { return field12_; }
- }
-
- public const int Field17FieldNumber = 17;
- private bool hasField17;
- private bool field17_ = true;
- public bool HasField17 {
- get { return hasField17; }
- }
- public bool Field17 {
- get { return field17_; }
- }
-
- public const int Field13FieldNumber = 13;
- private bool hasField13;
- private bool field13_ = true;
- public bool HasField13 {
- get { return hasField13; }
- }
- public bool Field13 {
- get { return field13_; }
- }
-
- public const int Field14FieldNumber = 14;
- private bool hasField14;
- private bool field14_ = true;
- public bool HasField14 {
- get { return hasField14; }
- }
- public bool Field14 {
- get { return field14_; }
- }
-
- public const int Field104FieldNumber = 104;
- private bool hasField104;
- private int field104_;
- public bool HasField104 {
- get { return hasField104; }
- }
- public int Field104 {
- get { return field104_; }
- }
-
- public const int Field100FieldNumber = 100;
- private bool hasField100;
- private int field100_;
- public bool HasField100 {
- get { return hasField100; }
- }
- public int Field100 {
- get { return field100_; }
- }
-
- public const int Field101FieldNumber = 101;
- private bool hasField101;
- private int field101_;
- public bool HasField101 {
- get { return hasField101; }
- }
- public int Field101 {
- get { return field101_; }
- }
-
- public const int Field102FieldNumber = 102;
- private bool hasField102;
- private string field102_ = "";
- public bool HasField102 {
- get { return hasField102; }
- }
- public string Field102 {
- get { return field102_; }
- }
-
- public const int Field103FieldNumber = 103;
- private bool hasField103;
- private string field103_ = "";
- public bool HasField103 {
- get { return hasField103; }
- }
- public string Field103 {
- get { return field103_; }
- }
-
- public const int Field29FieldNumber = 29;
- private bool hasField29;
- private int field29_;
- public bool HasField29 {
- get { return hasField29; }
- }
- public int Field29 {
- get { return field29_; }
- }
-
- public const int Field30FieldNumber = 30;
- private bool hasField30;
- private bool field30_;
- public bool HasField30 {
- get { return hasField30; }
- }
- public bool Field30 {
- get { return field30_; }
- }
-
- public const int Field60FieldNumber = 60;
- private bool hasField60;
- private int field60_ = -1;
- public bool HasField60 {
- get { return hasField60; }
- }
- public int Field60 {
- get { return field60_; }
- }
-
- public const int Field271FieldNumber = 271;
- private bool hasField271;
- private int field271_ = -1;
- public bool HasField271 {
- get { return hasField271; }
- }
- public int Field271 {
- get { return field271_; }
- }
-
- public const int Field272FieldNumber = 272;
- private bool hasField272;
- private int field272_ = -1;
- public bool HasField272 {
- get { return hasField272; }
- }
- public int Field272 {
- get { return field272_; }
- }
-
- public const int Field150FieldNumber = 150;
- private bool hasField150;
- private int field150_;
- public bool HasField150 {
- get { return hasField150; }
- }
- public int Field150 {
- get { return field150_; }
- }
-
- public const int Field23FieldNumber = 23;
- private bool hasField23;
- private int field23_;
- public bool HasField23 {
- get { return hasField23; }
- }
- public int Field23 {
- get { return field23_; }
- }
-
- public const int Field24FieldNumber = 24;
- private bool hasField24;
- private bool field24_;
- public bool HasField24 {
- get { return hasField24; }
- }
- public bool Field24 {
- get { return field24_; }
- }
-
- public const int Field25FieldNumber = 25;
- private bool hasField25;
- private int field25_;
- public bool HasField25 {
- get { return hasField25; }
- }
- public int Field25 {
- get { return field25_; }
- }
-
- public const int Field15FieldNumber = 15;
- private bool hasField15;
- private global::Google.ProtocolBuffers.ProtoBench.SizeMessage1SubMessage field15_;
- public bool HasField15 {
- get { return hasField15; }
- }
- public global::Google.ProtocolBuffers.ProtoBench.SizeMessage1SubMessage Field15 {
- get { return field15_ ?? global::Google.ProtocolBuffers.ProtoBench.SizeMessage1SubMessage.DefaultInstance; }
- }
-
- public const int Field78FieldNumber = 78;
- private bool hasField78;
- private bool field78_;
- public bool HasField78 {
- get { return hasField78; }
- }
- public bool Field78 {
- get { return field78_; }
- }
-
- public const int Field67FieldNumber = 67;
- private bool hasField67;
- private int field67_;
- public bool HasField67 {
- get { return hasField67; }
- }
- public int Field67 {
- get { return field67_; }
- }
-
- public const int Field68FieldNumber = 68;
- private bool hasField68;
- private int field68_;
- public bool HasField68 {
- get { return hasField68; }
- }
- public int Field68 {
- get { return field68_; }
- }
-
- public const int Field128FieldNumber = 128;
- private bool hasField128;
- private int field128_;
- public bool HasField128 {
- get { return hasField128; }
- }
- public int Field128 {
- get { return field128_; }
- }
-
- public const int Field129FieldNumber = 129;
- private bool hasField129;
- private string field129_ = "xxxxxxxxxxxxxxxxxxxxx";
- public bool HasField129 {
- get { return hasField129; }
- }
- public string Field129 {
- get { return field129_; }
- }
-
- public const int Field131FieldNumber = 131;
- private bool hasField131;
- private int field131_;
- public bool HasField131 {
- get { return hasField131; }
- }
- public int Field131 {
- get { return field131_; }
- }
-
- public static SizeMessage1 ParseFrom(pb::ByteString data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static SizeMessage1 ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static SizeMessage1 ParseFrom(byte[] data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static SizeMessage1 ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static SizeMessage1 ParseFrom(global::System.IO.Stream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static SizeMessage1 ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- public static SizeMessage1 ParseDelimitedFrom(global::System.IO.Stream input) {
- return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
- }
- public static SizeMessage1 ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
- }
- public static SizeMessage1 ParseFrom(pb::ICodedInputStream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static SizeMessage1 ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- private SizeMessage1 MakeReadOnly() {
- field5_.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(SizeMessage1 prototype) {
- return new Builder(prototype);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class Builder : pb::GeneratedBuilder<SizeMessage1, Builder> {
- protected override Builder ThisBuilder {
- get { return this; }
- }
- public Builder() {
- result = DefaultInstance;
- resultIsReadOnly = true;
- }
- internal Builder(SizeMessage1 cloneFrom) {
- result = cloneFrom;
- resultIsReadOnly = true;
- }
-
- private bool resultIsReadOnly;
- private SizeMessage1 result;
-
- private SizeMessage1 PrepareBuilder() {
- if (resultIsReadOnly) {
- SizeMessage1 original = result;
- result = new SizeMessage1();
- resultIsReadOnly = false;
- MergeFrom(original);
- }
- return result;
- }
-
- public override bool IsInitialized {
- get { return result.IsInitialized; }
- }
-
- protected override SizeMessage1 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.ProtoBench.SizeMessage1.Descriptor; }
- }
-
- public override SizeMessage1 DefaultInstanceForType {
- get { return global::Google.ProtocolBuffers.ProtoBench.SizeMessage1.DefaultInstance; }
- }
-
- public override SizeMessage1 BuildPartial() {
- if (resultIsReadOnly) {
- return result;
- }
- resultIsReadOnly = true;
- return result.MakeReadOnly();
- }
-
-
- public bool HasField1 {
- get { return result.hasField1; }
- }
- public string Field1 {
- get { return result.Field1; }
- set { SetField1(value); }
- }
- public Builder SetField1(string value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.hasField1 = true;
- result.field1_ = value;
- return this;
- }
- public Builder ClearField1() {
- PrepareBuilder();
- result.hasField1 = false;
- result.field1_ = "";
- return this;
- }
-
- public bool HasField9 {
- get { return result.hasField9; }
- }
- public string Field9 {
- get { return result.Field9; }
- set { SetField9(value); }
- }
- public Builder SetField9(string value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.hasField9 = true;
- result.field9_ = value;
- return this;
- }
- public Builder ClearField9() {
- PrepareBuilder();
- result.hasField9 = false;
- result.field9_ = "";
- return this;
- }
-
- public bool HasField18 {
- get { return result.hasField18; }
- }
- public string Field18 {
- get { return result.Field18; }
- set { SetField18(value); }
- }
- public Builder SetField18(string value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.hasField18 = true;
- result.field18_ = value;
- return this;
- }
- public Builder ClearField18() {
- PrepareBuilder();
- result.hasField18 = false;
- result.field18_ = "";
- return this;
- }
-
- public bool HasField80 {
- get { return result.hasField80; }
- }
- public bool Field80 {
- get { return result.Field80; }
- set { SetField80(value); }
- }
- public Builder SetField80(bool value) {
- PrepareBuilder();
- result.hasField80 = true;
- result.field80_ = value;
- return this;
- }
- public Builder ClearField80() {
- PrepareBuilder();
- result.hasField80 = false;
- result.field80_ = false;
- return this;
- }
-
- public bool HasField81 {
- get { return result.hasField81; }
- }
- public bool Field81 {
- get { return result.Field81; }
- set { SetField81(value); }
- }
- public Builder SetField81(bool value) {
- PrepareBuilder();
- result.hasField81 = true;
- result.field81_ = value;
- return this;
- }
- public Builder ClearField81() {
- PrepareBuilder();
- result.hasField81 = false;
- result.field81_ = true;
- return this;
- }
-
- public bool HasField2 {
- get { return result.hasField2; }
- }
- public int Field2 {
- get { return result.Field2; }
- set { SetField2(value); }
- }
- public Builder SetField2(int value) {
- PrepareBuilder();
- result.hasField2 = true;
- result.field2_ = value;
- return this;
- }
- public Builder ClearField2() {
- PrepareBuilder();
- result.hasField2 = false;
- result.field2_ = 0;
- return this;
- }
-
- public bool HasField3 {
- get { return result.hasField3; }
- }
- public int Field3 {
- get { return result.Field3; }
- set { SetField3(value); }
- }
- public Builder SetField3(int value) {
- PrepareBuilder();
- result.hasField3 = true;
- result.field3_ = value;
- return this;
- }
- public Builder ClearField3() {
- PrepareBuilder();
- result.hasField3 = false;
- result.field3_ = 0;
- return this;
- }
-
- public bool HasField280 {
- get { return result.hasField280; }
- }
- public int Field280 {
- get { return result.Field280; }
- set { SetField280(value); }
- }
- public Builder SetField280(int value) {
- PrepareBuilder();
- result.hasField280 = true;
- result.field280_ = value;
- return this;
- }
- public Builder ClearField280() {
- PrepareBuilder();
- result.hasField280 = false;
- result.field280_ = 0;
- return this;
- }
-
- public bool HasField6 {
- get { return result.hasField6; }
- }
- public int Field6 {
- get { return result.Field6; }
- set { SetField6(value); }
- }
- public Builder SetField6(int value) {
- PrepareBuilder();
- result.hasField6 = true;
- result.field6_ = value;
- return this;
- }
- public Builder ClearField6() {
- PrepareBuilder();
- result.hasField6 = false;
- result.field6_ = 0;
- return this;
- }
-
- public bool HasField22 {
- get { return result.hasField22; }
- }
- public long Field22 {
- get { return result.Field22; }
- set { SetField22(value); }
- }
- public Builder SetField22(long value) {
- PrepareBuilder();
- result.hasField22 = true;
- result.field22_ = value;
- return this;
- }
- public Builder ClearField22() {
- PrepareBuilder();
- result.hasField22 = false;
- result.field22_ = 0L;
- return this;
- }
-
- public bool HasField4 {
- get { return result.hasField4; }
- }
- public string Field4 {
- get { return result.Field4; }
- set { SetField4(value); }
- }
- public Builder SetField4(string value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.hasField4 = true;
- result.field4_ = value;
- return this;
- }
- public Builder ClearField4() {
- PrepareBuilder();
- result.hasField4 = false;
- result.field4_ = "";
- return this;
- }
-
- [global::System.CLSCompliant(false)]
- public pbc::IPopsicleList<ulong> Field5List {
- get { return PrepareBuilder().field5_; }
- }
- public int Field5Count {
- get { return result.Field5Count; }
- }
- [global::System.CLSCompliant(false)]
- public ulong GetField5(int index) {
- return result.GetField5(index);
- }
- [global::System.CLSCompliant(false)]
- public Builder SetField5(int index, ulong value) {
- PrepareBuilder();
- result.field5_[index] = value;
- return this;
- }
- [global::System.CLSCompliant(false)]
- public Builder AddField5(ulong value) {
- PrepareBuilder();
- result.field5_.Add(value);
- return this;
- }
- [global::System.CLSCompliant(false)]
- public Builder AddRangeField5(scg::IEnumerable<ulong> values) {
- PrepareBuilder();
- result.field5_.Add(values);
- return this;
- }
- public Builder ClearField5() {
- PrepareBuilder();
- result.field5_.Clear();
- return this;
- }
-
- public bool HasField59 {
- get { return result.hasField59; }
- }
- public bool Field59 {
- get { return result.Field59; }
- set { SetField59(value); }
- }
- public Builder SetField59(bool value) {
- PrepareBuilder();
- result.hasField59 = true;
- result.field59_ = value;
- return this;
- }
- public Builder ClearField59() {
- PrepareBuilder();
- result.hasField59 = false;
- result.field59_ = false;
- return this;
- }
-
- public bool HasField7 {
- get { return result.hasField7; }
- }
- public string Field7 {
- get { return result.Field7; }
- set { SetField7(value); }
- }
- public Builder SetField7(string value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.hasField7 = true;
- result.field7_ = value;
- return this;
- }
- public Builder ClearField7() {
- PrepareBuilder();
- result.hasField7 = false;
- result.field7_ = "";
- return this;
- }
-
- public bool HasField16 {
- get { return result.hasField16; }
- }
- public int Field16 {
- get { return result.Field16; }
- set { SetField16(value); }
- }
- public Builder SetField16(int value) {
- PrepareBuilder();
- result.hasField16 = true;
- result.field16_ = value;
- return this;
- }
- public Builder ClearField16() {
- PrepareBuilder();
- result.hasField16 = false;
- result.field16_ = 0;
- return this;
- }
-
- public bool HasField130 {
- get { return result.hasField130; }
- }
- public int Field130 {
- get { return result.Field130; }
- set { SetField130(value); }
- }
- public Builder SetField130(int value) {
- PrepareBuilder();
- result.hasField130 = true;
- result.field130_ = value;
- return this;
- }
- public Builder ClearField130() {
- PrepareBuilder();
- result.hasField130 = false;
- result.field130_ = 0;
- return this;
- }
-
- public bool HasField12 {
- get { return result.hasField12; }
- }
- public bool Field12 {
- get { return result.Field12; }
- set { SetField12(value); }
- }
- public Builder SetField12(bool value) {
- PrepareBuilder();
- result.hasField12 = true;
- result.field12_ = value;
- return this;
- }
- public Builder ClearField12() {
- PrepareBuilder();
- result.hasField12 = false;
- result.field12_ = true;
- return this;
- }
-
- public bool HasField17 {
- get { return result.hasField17; }
- }
- public bool Field17 {
- get { return result.Field17; }
- set { SetField17(value); }
- }
- public Builder SetField17(bool value) {
- PrepareBuilder();
- result.hasField17 = true;
- result.field17_ = value;
- return this;
- }
- public Builder ClearField17() {
- PrepareBuilder();
- result.hasField17 = false;
- result.field17_ = true;
- return this;
- }
-
- public bool HasField13 {
- get { return result.hasField13; }
- }
- public bool Field13 {
- get { return result.Field13; }
- set { SetField13(value); }
- }
- public Builder SetField13(bool value) {
- PrepareBuilder();
- result.hasField13 = true;
- result.field13_ = value;
- return this;
- }
- public Builder ClearField13() {
- PrepareBuilder();
- result.hasField13 = false;
- result.field13_ = true;
- return this;
- }
-
- public bool HasField14 {
- get { return result.hasField14; }
- }
- public bool Field14 {
- get { return result.Field14; }
- set { SetField14(value); }
- }
- public Builder SetField14(bool value) {
- PrepareBuilder();
- result.hasField14 = true;
- result.field14_ = value;
- return this;
- }
- public Builder ClearField14() {
- PrepareBuilder();
- result.hasField14 = false;
- result.field14_ = true;
- return this;
- }
-
- public bool HasField104 {
- get { return result.hasField104; }
- }
- public int Field104 {
- get { return result.Field104; }
- set { SetField104(value); }
- }
- public Builder SetField104(int value) {
- PrepareBuilder();
- result.hasField104 = true;
- result.field104_ = value;
- return this;
- }
- public Builder ClearField104() {
- PrepareBuilder();
- result.hasField104 = false;
- result.field104_ = 0;
- return this;
- }
-
- public bool HasField100 {
- get { return result.hasField100; }
- }
- public int Field100 {
- get { return result.Field100; }
- set { SetField100(value); }
- }
- public Builder SetField100(int value) {
- PrepareBuilder();
- result.hasField100 = true;
- result.field100_ = value;
- return this;
- }
- public Builder ClearField100() {
- PrepareBuilder();
- result.hasField100 = false;
- result.field100_ = 0;
- return this;
- }
-
- public bool HasField101 {
- get { return result.hasField101; }
- }
- public int Field101 {
- get { return result.Field101; }
- set { SetField101(value); }
- }
- public Builder SetField101(int value) {
- PrepareBuilder();
- result.hasField101 = true;
- result.field101_ = value;
- return this;
- }
- public Builder ClearField101() {
- PrepareBuilder();
- result.hasField101 = false;
- result.field101_ = 0;
- return this;
- }
-
- public bool HasField102 {
- get { return result.hasField102; }
- }
- public string Field102 {
- get { return result.Field102; }
- set { SetField102(value); }
- }
- public Builder SetField102(string value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.hasField102 = true;
- result.field102_ = value;
- return this;
- }
- public Builder ClearField102() {
- PrepareBuilder();
- result.hasField102 = false;
- result.field102_ = "";
- return this;
- }
-
- public bool HasField103 {
- get { return result.hasField103; }
- }
- public string Field103 {
- get { return result.Field103; }
- set { SetField103(value); }
- }
- public Builder SetField103(string value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.hasField103 = true;
- result.field103_ = value;
- return this;
- }
- public Builder ClearField103() {
- PrepareBuilder();
- result.hasField103 = false;
- result.field103_ = "";
- return this;
- }
-
- public bool HasField29 {
- get { return result.hasField29; }
- }
- public int Field29 {
- get { return result.Field29; }
- set { SetField29(value); }
- }
- public Builder SetField29(int value) {
- PrepareBuilder();
- result.hasField29 = true;
- result.field29_ = value;
- return this;
- }
- public Builder ClearField29() {
- PrepareBuilder();
- result.hasField29 = false;
- result.field29_ = 0;
- return this;
- }
-
- public bool HasField30 {
- get { return result.hasField30; }
- }
- public bool Field30 {
- get { return result.Field30; }
- set { SetField30(value); }
- }
- public Builder SetField30(bool value) {
- PrepareBuilder();
- result.hasField30 = true;
- result.field30_ = value;
- return this;
- }
- public Builder ClearField30() {
- PrepareBuilder();
- result.hasField30 = false;
- result.field30_ = false;
- return this;
- }
-
- public bool HasField60 {
- get { return result.hasField60; }
- }
- public int Field60 {
- get { return result.Field60; }
- set { SetField60(value); }
- }
- public Builder SetField60(int value) {
- PrepareBuilder();
- result.hasField60 = true;
- result.field60_ = value;
- return this;
- }
- public Builder ClearField60() {
- PrepareBuilder();
- result.hasField60 = false;
- result.field60_ = -1;
- return this;
- }
-
- public bool HasField271 {
- get { return result.hasField271; }
- }
- public int Field271 {
- get { return result.Field271; }
- set { SetField271(value); }
- }
- public Builder SetField271(int value) {
- PrepareBuilder();
- result.hasField271 = true;
- result.field271_ = value;
- return this;
- }
- public Builder ClearField271() {
- PrepareBuilder();
- result.hasField271 = false;
- result.field271_ = -1;
- return this;
- }
-
- public bool HasField272 {
- get { return result.hasField272; }
- }
- public int Field272 {
- get { return result.Field272; }
- set { SetField272(value); }
- }
- public Builder SetField272(int value) {
- PrepareBuilder();
- result.hasField272 = true;
- result.field272_ = value;
- return this;
- }
- public Builder ClearField272() {
- PrepareBuilder();
- result.hasField272 = false;
- result.field272_ = -1;
- return this;
- }
-
- public bool HasField150 {
- get { return result.hasField150; }
- }
- public int Field150 {
- get { return result.Field150; }
- set { SetField150(value); }
- }
- public Builder SetField150(int value) {
- PrepareBuilder();
- result.hasField150 = true;
- result.field150_ = value;
- return this;
- }
- public Builder ClearField150() {
- PrepareBuilder();
- result.hasField150 = false;
- result.field150_ = 0;
- return this;
- }
-
- public bool HasField23 {
- get { return result.hasField23; }
- }
- public int Field23 {
- get { return result.Field23; }
- set { SetField23(value); }
- }
- public Builder SetField23(int value) {
- PrepareBuilder();
- result.hasField23 = true;
- result.field23_ = value;
- return this;
- }
- public Builder ClearField23() {
- PrepareBuilder();
- result.hasField23 = false;
- result.field23_ = 0;
- return this;
- }
-
- public bool HasField24 {
- get { return result.hasField24; }
- }
- public bool Field24 {
- get { return result.Field24; }
- set { SetField24(value); }
- }
- public Builder SetField24(bool value) {
- PrepareBuilder();
- result.hasField24 = true;
- result.field24_ = value;
- return this;
- }
- public Builder ClearField24() {
- PrepareBuilder();
- result.hasField24 = false;
- result.field24_ = false;
- return this;
- }
-
- public bool HasField25 {
- get { return result.hasField25; }
- }
- public int Field25 {
- get { return result.Field25; }
- set { SetField25(value); }
- }
- public Builder SetField25(int value) {
- PrepareBuilder();
- result.hasField25 = true;
- result.field25_ = value;
- return this;
- }
- public Builder ClearField25() {
- PrepareBuilder();
- result.hasField25 = false;
- result.field25_ = 0;
- return this;
- }
-
- public bool HasField15 {
- get { return result.hasField15; }
- }
- public global::Google.ProtocolBuffers.ProtoBench.SizeMessage1SubMessage Field15 {
- get { return result.Field15; }
- set { SetField15(value); }
- }
- public Builder SetField15(global::Google.ProtocolBuffers.ProtoBench.SizeMessage1SubMessage value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.hasField15 = true;
- result.field15_ = value;
- return this;
- }
- public Builder SetField15(global::Google.ProtocolBuffers.ProtoBench.SizeMessage1SubMessage.Builder builderForValue) {
- pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
- PrepareBuilder();
- result.hasField15 = true;
- result.field15_ = builderForValue.Build();
- return this;
- }
- public Builder MergeField15(global::Google.ProtocolBuffers.ProtoBench.SizeMessage1SubMessage value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- if (result.hasField15 &&
- result.field15_ != global::Google.ProtocolBuffers.ProtoBench.SizeMessage1SubMessage.DefaultInstance) {
- result.field15_ = global::Google.ProtocolBuffers.ProtoBench.SizeMessage1SubMessage.CreateBuilder(result.field15_).MergeFrom(value).BuildPartial();
- } else {
- result.field15_ = value;
- }
- result.hasField15 = true;
- return this;
- }
- public Builder ClearField15() {
- PrepareBuilder();
- result.hasField15 = false;
- result.field15_ = null;
- return this;
- }
-
- public bool HasField78 {
- get { return result.hasField78; }
- }
- public bool Field78 {
- get { return result.Field78; }
- set { SetField78(value); }
- }
- public Builder SetField78(bool value) {
- PrepareBuilder();
- result.hasField78 = true;
- result.field78_ = value;
- return this;
- }
- public Builder ClearField78() {
- PrepareBuilder();
- result.hasField78 = false;
- result.field78_ = false;
- return this;
- }
-
- public bool HasField67 {
- get { return result.hasField67; }
- }
- public int Field67 {
- get { return result.Field67; }
- set { SetField67(value); }
- }
- public Builder SetField67(int value) {
- PrepareBuilder();
- result.hasField67 = true;
- result.field67_ = value;
- return this;
- }
- public Builder ClearField67() {
- PrepareBuilder();
- result.hasField67 = false;
- result.field67_ = 0;
- return this;
- }
-
- public bool HasField68 {
- get { return result.hasField68; }
- }
- public int Field68 {
- get { return result.Field68; }
- set { SetField68(value); }
- }
- public Builder SetField68(int value) {
- PrepareBuilder();
- result.hasField68 = true;
- result.field68_ = value;
- return this;
- }
- public Builder ClearField68() {
- PrepareBuilder();
- result.hasField68 = false;
- result.field68_ = 0;
- return this;
- }
-
- public bool HasField128 {
- get { return result.hasField128; }
- }
- public int Field128 {
- get { return result.Field128; }
- set { SetField128(value); }
- }
- public Builder SetField128(int value) {
- PrepareBuilder();
- result.hasField128 = true;
- result.field128_ = value;
- return this;
- }
- public Builder ClearField128() {
- PrepareBuilder();
- result.hasField128 = false;
- result.field128_ = 0;
- return this;
- }
-
- public bool HasField129 {
- get { return result.hasField129; }
- }
- public string Field129 {
- get { return result.Field129; }
- set { SetField129(value); }
- }
- public Builder SetField129(string value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.hasField129 = true;
- result.field129_ = value;
- return this;
- }
- public Builder ClearField129() {
- PrepareBuilder();
- result.hasField129 = false;
- result.field129_ = "xxxxxxxxxxxxxxxxxxxxx";
- return this;
- }
-
- public bool HasField131 {
- get { return result.hasField131; }
- }
- public int Field131 {
- get { return result.Field131; }
- set { SetField131(value); }
- }
- public Builder SetField131(int value) {
- PrepareBuilder();
- result.hasField131 = true;
- result.field131_ = value;
- return this;
- }
- public Builder ClearField131() {
- PrepareBuilder();
- result.hasField131 = false;
- result.field131_ = 0;
- return this;
- }
- }
- static SizeMessage1() {
- object.ReferenceEquals(global::Google.ProtocolBuffers.ProtoBench.GoogleSizeProtoFile.Descriptor, null);
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class SizeMessage1SubMessage : pb::GeneratedMessage<SizeMessage1SubMessage, SizeMessage1SubMessage.Builder> {
- private SizeMessage1SubMessage() { }
- private static readonly SizeMessage1SubMessage defaultInstance = new SizeMessage1SubMessage().MakeReadOnly();
- public static SizeMessage1SubMessage DefaultInstance {
- get { return defaultInstance; }
- }
-
- public override SizeMessage1SubMessage DefaultInstanceForType {
- get { return DefaultInstance; }
- }
-
- protected override SizeMessage1SubMessage ThisMessage {
- get { return this; }
- }
-
- public static pbd::MessageDescriptor Descriptor {
- get { return global::Google.ProtocolBuffers.ProtoBench.GoogleSizeProtoFile.internal__static_benchmarks_SizeMessage1SubMessage__Descriptor; }
- }
-
- protected override pb::FieldAccess.FieldAccessorTable<SizeMessage1SubMessage, SizeMessage1SubMessage.Builder> InternalFieldAccessors {
- get { return global::Google.ProtocolBuffers.ProtoBench.GoogleSizeProtoFile.internal__static_benchmarks_SizeMessage1SubMessage__FieldAccessorTable; }
- }
-
- public const int Field1FieldNumber = 1;
- private bool hasField1;
- private int field1_;
- public bool HasField1 {
- get { return hasField1; }
- }
- public int Field1 {
- get { return field1_; }
- }
-
- public const int Field2FieldNumber = 2;
- private bool hasField2;
- private int field2_;
- public bool HasField2 {
- get { return hasField2; }
- }
- public int Field2 {
- get { return field2_; }
- }
-
- public const int Field3FieldNumber = 3;
- private bool hasField3;
- private int field3_;
- public bool HasField3 {
- get { return hasField3; }
- }
- public int Field3 {
- get { return field3_; }
- }
-
- public const int Field15FieldNumber = 15;
- private bool hasField15;
- private string field15_ = "";
- public bool HasField15 {
- get { return hasField15; }
- }
- public string Field15 {
- get { return field15_; }
- }
-
- public const int Field12FieldNumber = 12;
- private bool hasField12;
- private bool field12_ = true;
- public bool HasField12 {
- get { return hasField12; }
- }
- public bool Field12 {
- get { return field12_; }
- }
-
- public const int Field13FieldNumber = 13;
- private bool hasField13;
- private long field13_;
- public bool HasField13 {
- get { return hasField13; }
- }
- public long Field13 {
- get { return field13_; }
- }
-
- public const int Field14FieldNumber = 14;
- private bool hasField14;
- private long field14_;
- public bool HasField14 {
- get { return hasField14; }
- }
- public long Field14 {
- get { return field14_; }
- }
-
- public const int Field16FieldNumber = 16;
- private bool hasField16;
- private int field16_;
- public bool HasField16 {
- get { return hasField16; }
- }
- public int Field16 {
- get { return field16_; }
- }
-
- public const int Field19FieldNumber = 19;
- private bool hasField19;
- private int field19_ = 2;
- public bool HasField19 {
- get { return hasField19; }
- }
- public int Field19 {
- get { return field19_; }
- }
-
- public const int Field20FieldNumber = 20;
- private bool hasField20;
- private bool field20_ = true;
- public bool HasField20 {
- get { return hasField20; }
- }
- public bool Field20 {
- get { return field20_; }
- }
-
- public const int Field28FieldNumber = 28;
- private bool hasField28;
- private bool field28_ = true;
- public bool HasField28 {
- get { return hasField28; }
- }
- public bool Field28 {
- get { return field28_; }
- }
-
- public const int Field21FieldNumber = 21;
- private bool hasField21;
- private ulong field21_;
- public bool HasField21 {
- get { return hasField21; }
- }
- [global::System.CLSCompliant(false)]
- public ulong Field21 {
- get { return field21_; }
- }
-
- public const int Field22FieldNumber = 22;
- private bool hasField22;
- private int field22_;
- public bool HasField22 {
- get { return hasField22; }
- }
- public int Field22 {
- get { return field22_; }
- }
-
- public const int Field23FieldNumber = 23;
- private bool hasField23;
- private bool field23_;
- public bool HasField23 {
- get { return hasField23; }
- }
- public bool Field23 {
- get { return field23_; }
- }
-
- public const int Field206FieldNumber = 206;
- private bool hasField206;
- private bool field206_;
- public bool HasField206 {
- get { return hasField206; }
- }
- public bool Field206 {
- get { return field206_; }
- }
-
- public const int Field203FieldNumber = 203;
- private bool hasField203;
- private uint field203_;
- public bool HasField203 {
- get { return hasField203; }
- }
- [global::System.CLSCompliant(false)]
- public uint Field203 {
- get { return field203_; }
- }
-
- public const int Field204FieldNumber = 204;
- private bool hasField204;
- private int field204_;
- public bool HasField204 {
- get { return hasField204; }
- }
- public int Field204 {
- get { return field204_; }
- }
-
- public const int Field205FieldNumber = 205;
- private bool hasField205;
- private string field205_ = "";
- public bool HasField205 {
- get { return hasField205; }
- }
- public string Field205 {
- get { return field205_; }
- }
-
- public const int Field207FieldNumber = 207;
- private bool hasField207;
- private ulong field207_;
- public bool HasField207 {
- get { return hasField207; }
- }
- [global::System.CLSCompliant(false)]
- public ulong Field207 {
- get { return field207_; }
- }
-
- public const int Field300FieldNumber = 300;
- private bool hasField300;
- private ulong field300_;
- public bool HasField300 {
- get { return hasField300; }
- }
- [global::System.CLSCompliant(false)]
- public ulong Field300 {
- get { return field300_; }
- }
-
- public static SizeMessage1SubMessage ParseFrom(pb::ByteString data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static SizeMessage1SubMessage ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static SizeMessage1SubMessage ParseFrom(byte[] data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static SizeMessage1SubMessage ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static SizeMessage1SubMessage ParseFrom(global::System.IO.Stream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static SizeMessage1SubMessage ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- public static SizeMessage1SubMessage ParseDelimitedFrom(global::System.IO.Stream input) {
- return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
- }
- public static SizeMessage1SubMessage ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
- }
- public static SizeMessage1SubMessage ParseFrom(pb::ICodedInputStream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static SizeMessage1SubMessage ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- private SizeMessage1SubMessage 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(SizeMessage1SubMessage prototype) {
- return new Builder(prototype);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class Builder : pb::GeneratedBuilder<SizeMessage1SubMessage, Builder> {
- protected override Builder ThisBuilder {
- get { return this; }
- }
- public Builder() {
- result = DefaultInstance;
- resultIsReadOnly = true;
- }
- internal Builder(SizeMessage1SubMessage cloneFrom) {
- result = cloneFrom;
- resultIsReadOnly = true;
- }
-
- private bool resultIsReadOnly;
- private SizeMessage1SubMessage result;
-
- private SizeMessage1SubMessage PrepareBuilder() {
- if (resultIsReadOnly) {
- SizeMessage1SubMessage original = result;
- result = new SizeMessage1SubMessage();
- resultIsReadOnly = false;
- MergeFrom(original);
- }
- return result;
- }
-
- public override bool IsInitialized {
- get { return result.IsInitialized; }
- }
-
- protected override SizeMessage1SubMessage 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.ProtoBench.SizeMessage1SubMessage.Descriptor; }
- }
-
- public override SizeMessage1SubMessage DefaultInstanceForType {
- get { return global::Google.ProtocolBuffers.ProtoBench.SizeMessage1SubMessage.DefaultInstance; }
- }
-
- public override SizeMessage1SubMessage BuildPartial() {
- if (resultIsReadOnly) {
- return result;
- }
- resultIsReadOnly = true;
- return result.MakeReadOnly();
- }
-
-
- public bool HasField1 {
- get { return result.hasField1; }
- }
- public int Field1 {
- get { return result.Field1; }
- set { SetField1(value); }
- }
- public Builder SetField1(int value) {
- PrepareBuilder();
- result.hasField1 = true;
- result.field1_ = value;
- return this;
- }
- public Builder ClearField1() {
- PrepareBuilder();
- result.hasField1 = false;
- result.field1_ = 0;
- return this;
- }
-
- public bool HasField2 {
- get { return result.hasField2; }
- }
- public int Field2 {
- get { return result.Field2; }
- set { SetField2(value); }
- }
- public Builder SetField2(int value) {
- PrepareBuilder();
- result.hasField2 = true;
- result.field2_ = value;
- return this;
- }
- public Builder ClearField2() {
- PrepareBuilder();
- result.hasField2 = false;
- result.field2_ = 0;
- return this;
- }
-
- public bool HasField3 {
- get { return result.hasField3; }
- }
- public int Field3 {
- get { return result.Field3; }
- set { SetField3(value); }
- }
- public Builder SetField3(int value) {
- PrepareBuilder();
- result.hasField3 = true;
- result.field3_ = value;
- return this;
- }
- public Builder ClearField3() {
- PrepareBuilder();
- result.hasField3 = false;
- result.field3_ = 0;
- return this;
- }
-
- public bool HasField15 {
- get { return result.hasField15; }
- }
- public string Field15 {
- get { return result.Field15; }
- set { SetField15(value); }
- }
- public Builder SetField15(string value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.hasField15 = true;
- result.field15_ = value;
- return this;
- }
- public Builder ClearField15() {
- PrepareBuilder();
- result.hasField15 = false;
- result.field15_ = "";
- return this;
- }
-
- public bool HasField12 {
- get { return result.hasField12; }
- }
- public bool Field12 {
- get { return result.Field12; }
- set { SetField12(value); }
- }
- public Builder SetField12(bool value) {
- PrepareBuilder();
- result.hasField12 = true;
- result.field12_ = value;
- return this;
- }
- public Builder ClearField12() {
- PrepareBuilder();
- result.hasField12 = false;
- result.field12_ = true;
- return this;
- }
-
- public bool HasField13 {
- get { return result.hasField13; }
- }
- public long Field13 {
- get { return result.Field13; }
- set { SetField13(value); }
- }
- public Builder SetField13(long value) {
- PrepareBuilder();
- result.hasField13 = true;
- result.field13_ = value;
- return this;
- }
- public Builder ClearField13() {
- PrepareBuilder();
- result.hasField13 = false;
- result.field13_ = 0L;
- return this;
- }
-
- public bool HasField14 {
- get { return result.hasField14; }
- }
- public long Field14 {
- get { return result.Field14; }
- set { SetField14(value); }
- }
- public Builder SetField14(long value) {
- PrepareBuilder();
- result.hasField14 = true;
- result.field14_ = value;
- return this;
- }
- public Builder ClearField14() {
- PrepareBuilder();
- result.hasField14 = false;
- result.field14_ = 0L;
- return this;
- }
-
- public bool HasField16 {
- get { return result.hasField16; }
- }
- public int Field16 {
- get { return result.Field16; }
- set { SetField16(value); }
- }
- public Builder SetField16(int value) {
- PrepareBuilder();
- result.hasField16 = true;
- result.field16_ = value;
- return this;
- }
- public Builder ClearField16() {
- PrepareBuilder();
- result.hasField16 = false;
- result.field16_ = 0;
- return this;
- }
-
- public bool HasField19 {
- get { return result.hasField19; }
- }
- public int Field19 {
- get { return result.Field19; }
- set { SetField19(value); }
- }
- public Builder SetField19(int value) {
- PrepareBuilder();
- result.hasField19 = true;
- result.field19_ = value;
- return this;
- }
- public Builder ClearField19() {
- PrepareBuilder();
- result.hasField19 = false;
- result.field19_ = 2;
- return this;
- }
-
- public bool HasField20 {
- get { return result.hasField20; }
- }
- public bool Field20 {
- get { return result.Field20; }
- set { SetField20(value); }
- }
- public Builder SetField20(bool value) {
- PrepareBuilder();
- result.hasField20 = true;
- result.field20_ = value;
- return this;
- }
- public Builder ClearField20() {
- PrepareBuilder();
- result.hasField20 = false;
- result.field20_ = true;
- return this;
- }
-
- public bool HasField28 {
- get { return result.hasField28; }
- }
- public bool Field28 {
- get { return result.Field28; }
- set { SetField28(value); }
- }
- public Builder SetField28(bool value) {
- PrepareBuilder();
- result.hasField28 = true;
- result.field28_ = value;
- return this;
- }
- public Builder ClearField28() {
- PrepareBuilder();
- result.hasField28 = false;
- result.field28_ = true;
- return this;
- }
-
- public bool HasField21 {
- get { return result.hasField21; }
- }
- [global::System.CLSCompliant(false)]
- public ulong Field21 {
- get { return result.Field21; }
- set { SetField21(value); }
- }
- [global::System.CLSCompliant(false)]
- public Builder SetField21(ulong value) {
- PrepareBuilder();
- result.hasField21 = true;
- result.field21_ = value;
- return this;
- }
- public Builder ClearField21() {
- PrepareBuilder();
- result.hasField21 = false;
- result.field21_ = 0;
- return this;
- }
-
- public bool HasField22 {
- get { return result.hasField22; }
- }
- public int Field22 {
- get { return result.Field22; }
- set { SetField22(value); }
- }
- public Builder SetField22(int value) {
- PrepareBuilder();
- result.hasField22 = true;
- result.field22_ = value;
- return this;
- }
- public Builder ClearField22() {
- PrepareBuilder();
- result.hasField22 = false;
- result.field22_ = 0;
- return this;
- }
-
- public bool HasField23 {
- get { return result.hasField23; }
- }
- public bool Field23 {
- get { return result.Field23; }
- set { SetField23(value); }
- }
- public Builder SetField23(bool value) {
- PrepareBuilder();
- result.hasField23 = true;
- result.field23_ = value;
- return this;
- }
- public Builder ClearField23() {
- PrepareBuilder();
- result.hasField23 = false;
- result.field23_ = false;
- return this;
- }
-
- public bool HasField206 {
- get { return result.hasField206; }
- }
- public bool Field206 {
- get { return result.Field206; }
- set { SetField206(value); }
- }
- public Builder SetField206(bool value) {
- PrepareBuilder();
- result.hasField206 = true;
- result.field206_ = value;
- return this;
- }
- public Builder ClearField206() {
- PrepareBuilder();
- result.hasField206 = false;
- result.field206_ = false;
- return this;
- }
-
- public bool HasField203 {
- get { return result.hasField203; }
- }
- [global::System.CLSCompliant(false)]
- public uint Field203 {
- get { return result.Field203; }
- set { SetField203(value); }
- }
- [global::System.CLSCompliant(false)]
- public Builder SetField203(uint value) {
- PrepareBuilder();
- result.hasField203 = true;
- result.field203_ = value;
- return this;
- }
- public Builder ClearField203() {
- PrepareBuilder();
- result.hasField203 = false;
- result.field203_ = 0;
- return this;
- }
-
- public bool HasField204 {
- get { return result.hasField204; }
- }
- public int Field204 {
- get { return result.Field204; }
- set { SetField204(value); }
- }
- public Builder SetField204(int value) {
- PrepareBuilder();
- result.hasField204 = true;
- result.field204_ = value;
- return this;
- }
- public Builder ClearField204() {
- PrepareBuilder();
- result.hasField204 = false;
- result.field204_ = 0;
- return this;
- }
-
- public bool HasField205 {
- get { return result.hasField205; }
- }
- public string Field205 {
- get { return result.Field205; }
- set { SetField205(value); }
- }
- public Builder SetField205(string value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.hasField205 = true;
- result.field205_ = value;
- return this;
- }
- public Builder ClearField205() {
- PrepareBuilder();
- result.hasField205 = false;
- result.field205_ = "";
- return this;
- }
-
- public bool HasField207 {
- get { return result.hasField207; }
- }
- [global::System.CLSCompliant(false)]
- public ulong Field207 {
- get { return result.Field207; }
- set { SetField207(value); }
- }
- [global::System.CLSCompliant(false)]
- public Builder SetField207(ulong value) {
- PrepareBuilder();
- result.hasField207 = true;
- result.field207_ = value;
- return this;
- }
- public Builder ClearField207() {
- PrepareBuilder();
- result.hasField207 = false;
- result.field207_ = 0UL;
- return this;
- }
-
- public bool HasField300 {
- get { return result.hasField300; }
- }
- [global::System.CLSCompliant(false)]
- public ulong Field300 {
- get { return result.Field300; }
- set { SetField300(value); }
- }
- [global::System.CLSCompliant(false)]
- public Builder SetField300(ulong value) {
- PrepareBuilder();
- result.hasField300 = true;
- result.field300_ = value;
- return this;
- }
- public Builder ClearField300() {
- PrepareBuilder();
- result.hasField300 = false;
- result.field300_ = 0UL;
- return this;
- }
- }
- static SizeMessage1SubMessage() {
- object.ReferenceEquals(global::Google.ProtocolBuffers.ProtoBench.GoogleSizeProtoFile.Descriptor, null);
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class SizeMessage2 : pb::GeneratedMessage<SizeMessage2, SizeMessage2.Builder> {
- private SizeMessage2() { }
- private static readonly SizeMessage2 defaultInstance = new SizeMessage2().MakeReadOnly();
- public static SizeMessage2 DefaultInstance {
- get { return defaultInstance; }
- }
-
- public override SizeMessage2 DefaultInstanceForType {
- get { return DefaultInstance; }
- }
-
- protected override SizeMessage2 ThisMessage {
- get { return this; }
- }
-
- public static pbd::MessageDescriptor Descriptor {
- get { return global::Google.ProtocolBuffers.ProtoBench.GoogleSizeProtoFile.internal__static_benchmarks_SizeMessage2__Descriptor; }
- }
-
- protected override pb::FieldAccess.FieldAccessorTable<SizeMessage2, SizeMessage2.Builder> InternalFieldAccessors {
- get { return global::Google.ProtocolBuffers.ProtoBench.GoogleSizeProtoFile.internal__static_benchmarks_SizeMessage2__FieldAccessorTable; }
- }
-
- #region Nested types
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public static partial class Types {
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class Group1 : pb::GeneratedMessage<Group1, Group1.Builder> {
- private Group1() { }
- private static readonly Group1 defaultInstance = new Group1().MakeReadOnly();
- public static Group1 DefaultInstance {
- get { return defaultInstance; }
- }
-
- public override Group1 DefaultInstanceForType {
- get { return DefaultInstance; }
- }
-
- protected override Group1 ThisMessage {
- get { return this; }
- }
-
- public static pbd::MessageDescriptor Descriptor {
- get { return global::Google.ProtocolBuffers.ProtoBench.GoogleSizeProtoFile.internal__static_benchmarks_SizeMessage2_Group1__Descriptor; }
- }
-
- protected override pb::FieldAccess.FieldAccessorTable<Group1, Group1.Builder> InternalFieldAccessors {
- get { return global::Google.ProtocolBuffers.ProtoBench.GoogleSizeProtoFile.internal__static_benchmarks_SizeMessage2_Group1__FieldAccessorTable; }
- }
-
- public const int Field11FieldNumber = 11;
- private bool hasField11;
- private float field11_;
- public bool HasField11 {
- get { return hasField11; }
- }
- public float Field11 {
- get { return field11_; }
- }
-
- public const int Field26FieldNumber = 26;
- private bool hasField26;
- private float field26_;
- public bool HasField26 {
- get { return hasField26; }
- }
- public float Field26 {
- get { return field26_; }
- }
-
- public const int Field12FieldNumber = 12;
- private bool hasField12;
- private string field12_ = "";
- public bool HasField12 {
- get { return hasField12; }
- }
- public string Field12 {
- get { return field12_; }
- }
-
- public const int Field13FieldNumber = 13;
- private bool hasField13;
- private string field13_ = "";
- public bool HasField13 {
- get { return hasField13; }
- }
- public string Field13 {
- get { return field13_; }
- }
-
- public const int Field14FieldNumber = 14;
- private pbc::PopsicleList<string> field14_ = new pbc::PopsicleList<string>();
- public scg::IList<string> Field14List {
- get { return pbc::Lists.AsReadOnly(field14_); }
- }
- public int Field14Count {
- get { return field14_.Count; }
- }
- public string GetField14(int index) {
- return field14_[index];
- }
-
- public const int Field15FieldNumber = 15;
- private bool hasField15;
- private ulong field15_;
- public bool HasField15 {
- get { return hasField15; }
- }
- [global::System.CLSCompliant(false)]
- public ulong Field15 {
- get { return field15_; }
- }
-
- public const int Field5FieldNumber = 5;
- private bool hasField5;
- private int field5_;
- public bool HasField5 {
- get { return hasField5; }
- }
- public int Field5 {
- get { return field5_; }
- }
-
- public const int Field27FieldNumber = 27;
- private bool hasField27;
- private string field27_ = "";
- public bool HasField27 {
- get { return hasField27; }
- }
- public string Field27 {
- get { return field27_; }
- }
-
- public const int Field28FieldNumber = 28;
- private bool hasField28;
- private int field28_;
- public bool HasField28 {
- get { return hasField28; }
- }
- public int Field28 {
- get { return field28_; }
- }
-
- public const int Field29FieldNumber = 29;
- private bool hasField29;
- private string field29_ = "";
- public bool HasField29 {
- get { return hasField29; }
- }
- public string Field29 {
- get { return field29_; }
- }
-
- public const int Field16FieldNumber = 16;
- private bool hasField16;
- private string field16_ = "";
- public bool HasField16 {
- get { return hasField16; }
- }
- public string Field16 {
- get { return field16_; }
- }
-
- public const int Field22FieldNumber = 22;
- private pbc::PopsicleList<string> field22_ = new pbc::PopsicleList<string>();
- public scg::IList<string> Field22List {
- get { return pbc::Lists.AsReadOnly(field22_); }
- }
- public int Field22Count {
- get { return field22_.Count; }
- }
- public string GetField22(int index) {
- return field22_[index];
- }
-
- public const int Field73FieldNumber = 73;
- private pbc::PopsicleList<int> field73_ = new pbc::PopsicleList<int>();
- public scg::IList<int> Field73List {
- get { return pbc::Lists.AsReadOnly(field73_); }
- }
- public int Field73Count {
- get { return field73_.Count; }
- }
- public int GetField73(int index) {
- return field73_[index];
- }
-
- public const int Field20FieldNumber = 20;
- private bool hasField20;
- private int field20_;
- public bool HasField20 {
- get { return hasField20; }
- }
- public int Field20 {
- get { return field20_; }
- }
-
- public const int Field24FieldNumber = 24;
- private bool hasField24;
- private string field24_ = "";
- public bool HasField24 {
- get { return hasField24; }
- }
- public string Field24 {
- get { return field24_; }
- }
-
- public const int Field31FieldNumber = 31;
- private bool hasField31;
- private global::Google.ProtocolBuffers.ProtoBench.SizeMessage2GroupedMessage field31_;
- public bool HasField31 {
- get { return hasField31; }
- }
- public global::Google.ProtocolBuffers.ProtoBench.SizeMessage2GroupedMessage Field31 {
- get { return field31_ ?? global::Google.ProtocolBuffers.ProtoBench.SizeMessage2GroupedMessage.DefaultInstance; }
- }
-
- public static Group1 ParseFrom(pb::ByteString data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static Group1 ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static Group1 ParseFrom(byte[] data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static Group1 ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static Group1 ParseFrom(global::System.IO.Stream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static Group1 ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- public static Group1 ParseDelimitedFrom(global::System.IO.Stream input) {
- return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
- }
- public static Group1 ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
- }
- public static Group1 ParseFrom(pb::ICodedInputStream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static Group1 ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- private Group1 MakeReadOnly() {
- field14_.MakeReadOnly();
- field22_.MakeReadOnly();
- field73_.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(Group1 prototype) {
- return new Builder(prototype);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class Builder : pb::GeneratedBuilder<Group1, Builder> {
- protected override Builder ThisBuilder {
- get { return this; }
- }
- public Builder() {
- result = DefaultInstance;
- resultIsReadOnly = true;
- }
- internal Builder(Group1 cloneFrom) {
- result = cloneFrom;
- resultIsReadOnly = true;
- }
-
- private bool resultIsReadOnly;
- private Group1 result;
-
- private Group1 PrepareBuilder() {
- if (resultIsReadOnly) {
- Group1 original = result;
- result = new Group1();
- resultIsReadOnly = false;
- MergeFrom(original);
- }
- return result;
- }
-
- public override bool IsInitialized {
- get { return result.IsInitialized; }
- }
-
- protected override Group1 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.ProtoBench.SizeMessage2.Types.Group1.Descriptor; }
- }
-
- public override Group1 DefaultInstanceForType {
- get { return global::Google.ProtocolBuffers.ProtoBench.SizeMessage2.Types.Group1.DefaultInstance; }
- }
-
- public override Group1 BuildPartial() {
- if (resultIsReadOnly) {
- return result;
- }
- resultIsReadOnly = true;
- return result.MakeReadOnly();
- }
-
-
- public bool HasField11 {
- get { return result.hasField11; }
- }
- public float Field11 {
- get { return result.Field11; }
- set { SetField11(value); }
- }
- public Builder SetField11(float value) {
- PrepareBuilder();
- result.hasField11 = true;
- result.field11_ = value;
- return this;
- }
- public Builder ClearField11() {
- PrepareBuilder();
- result.hasField11 = false;
- result.field11_ = 0F;
- return this;
- }
-
- public bool HasField26 {
- get { return result.hasField26; }
- }
- public float Field26 {
- get { return result.Field26; }
- set { SetField26(value); }
- }
- public Builder SetField26(float value) {
- PrepareBuilder();
- result.hasField26 = true;
- result.field26_ = value;
- return this;
- }
- public Builder ClearField26() {
- PrepareBuilder();
- result.hasField26 = false;
- result.field26_ = 0F;
- return this;
- }
-
- public bool HasField12 {
- get { return result.hasField12; }
- }
- public string Field12 {
- get { return result.Field12; }
- set { SetField12(value); }
- }
- public Builder SetField12(string value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.hasField12 = true;
- result.field12_ = value;
- return this;
- }
- public Builder ClearField12() {
- PrepareBuilder();
- result.hasField12 = false;
- result.field12_ = "";
- return this;
- }
-
- public bool HasField13 {
- get { return result.hasField13; }
- }
- public string Field13 {
- get { return result.Field13; }
- set { SetField13(value); }
- }
- public Builder SetField13(string value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.hasField13 = true;
- result.field13_ = value;
- return this;
- }
- public Builder ClearField13() {
- PrepareBuilder();
- result.hasField13 = false;
- result.field13_ = "";
- return this;
- }
-
- public pbc::IPopsicleList<string> Field14List {
- get { return PrepareBuilder().field14_; }
- }
- public int Field14Count {
- get { return result.Field14Count; }
- }
- public string GetField14(int index) {
- return result.GetField14(index);
- }
- public Builder SetField14(int index, string value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.field14_[index] = value;
- return this;
- }
- public Builder AddField14(string value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.field14_.Add(value);
- return this;
- }
- public Builder AddRangeField14(scg::IEnumerable<string> values) {
- PrepareBuilder();
- result.field14_.Add(values);
- return this;
- }
- public Builder ClearField14() {
- PrepareBuilder();
- result.field14_.Clear();
- return this;
- }
-
- public bool HasField15 {
- get { return result.hasField15; }
- }
- [global::System.CLSCompliant(false)]
- public ulong Field15 {
- get { return result.Field15; }
- set { SetField15(value); }
- }
- [global::System.CLSCompliant(false)]
- public Builder SetField15(ulong value) {
- PrepareBuilder();
- result.hasField15 = true;
- result.field15_ = value;
- return this;
- }
- public Builder ClearField15() {
- PrepareBuilder();
- result.hasField15 = false;
- result.field15_ = 0UL;
- return this;
- }
-
- public bool HasField5 {
- get { return result.hasField5; }
- }
- public int Field5 {
- get { return result.Field5; }
- set { SetField5(value); }
- }
- public Builder SetField5(int value) {
- PrepareBuilder();
- result.hasField5 = true;
- result.field5_ = value;
- return this;
- }
- public Builder ClearField5() {
- PrepareBuilder();
- result.hasField5 = false;
- result.field5_ = 0;
- return this;
- }
-
- public bool HasField27 {
- get { return result.hasField27; }
- }
- public string Field27 {
- get { return result.Field27; }
- set { SetField27(value); }
- }
- public Builder SetField27(string value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.hasField27 = true;
- result.field27_ = value;
- return this;
- }
- public Builder ClearField27() {
- PrepareBuilder();
- result.hasField27 = false;
- result.field27_ = "";
- return this;
- }
-
- public bool HasField28 {
- get { return result.hasField28; }
- }
- public int Field28 {
- get { return result.Field28; }
- set { SetField28(value); }
- }
- public Builder SetField28(int value) {
- PrepareBuilder();
- result.hasField28 = true;
- result.field28_ = value;
- return this;
- }
- public Builder ClearField28() {
- PrepareBuilder();
- result.hasField28 = false;
- result.field28_ = 0;
- return this;
- }
-
- public bool HasField29 {
- get { return result.hasField29; }
- }
- public string Field29 {
- get { return result.Field29; }
- set { SetField29(value); }
- }
- public Builder SetField29(string value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.hasField29 = true;
- result.field29_ = value;
- return this;
- }
- public Builder ClearField29() {
- PrepareBuilder();
- result.hasField29 = false;
- result.field29_ = "";
- return this;
- }
-
- public bool HasField16 {
- get { return result.hasField16; }
- }
- public string Field16 {
- get { return result.Field16; }
- set { SetField16(value); }
- }
- public Builder SetField16(string value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.hasField16 = true;
- result.field16_ = value;
- return this;
- }
- public Builder ClearField16() {
- PrepareBuilder();
- result.hasField16 = false;
- result.field16_ = "";
- return this;
- }
-
- public pbc::IPopsicleList<string> Field22List {
- get { return PrepareBuilder().field22_; }
- }
- public int Field22Count {
- get { return result.Field22Count; }
- }
- public string GetField22(int index) {
- return result.GetField22(index);
- }
- public Builder SetField22(int index, string value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.field22_[index] = value;
- return this;
- }
- public Builder AddField22(string value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.field22_.Add(value);
- return this;
- }
- public Builder AddRangeField22(scg::IEnumerable<string> values) {
- PrepareBuilder();
- result.field22_.Add(values);
- return this;
- }
- public Builder ClearField22() {
- PrepareBuilder();
- result.field22_.Clear();
- return this;
- }
-
- public pbc::IPopsicleList<int> Field73List {
- get { return PrepareBuilder().field73_; }
- }
- public int Field73Count {
- get { return result.Field73Count; }
- }
- public int GetField73(int index) {
- return result.GetField73(index);
- }
- public Builder SetField73(int index, int value) {
- PrepareBuilder();
- result.field73_[index] = value;
- return this;
- }
- public Builder AddField73(int value) {
- PrepareBuilder();
- result.field73_.Add(value);
- return this;
- }
- public Builder AddRangeField73(scg::IEnumerable<int> values) {
- PrepareBuilder();
- result.field73_.Add(values);
- return this;
- }
- public Builder ClearField73() {
- PrepareBuilder();
- result.field73_.Clear();
- return this;
- }
-
- public bool HasField20 {
- get { return result.hasField20; }
- }
- public int Field20 {
- get { return result.Field20; }
- set { SetField20(value); }
- }
- public Builder SetField20(int value) {
- PrepareBuilder();
- result.hasField20 = true;
- result.field20_ = value;
- return this;
- }
- public Builder ClearField20() {
- PrepareBuilder();
- result.hasField20 = false;
- result.field20_ = 0;
- return this;
- }
-
- public bool HasField24 {
- get { return result.hasField24; }
- }
- public string Field24 {
- get { return result.Field24; }
- set { SetField24(value); }
- }
- public Builder SetField24(string value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.hasField24 = true;
- result.field24_ = value;
- return this;
- }
- public Builder ClearField24() {
- PrepareBuilder();
- result.hasField24 = false;
- result.field24_ = "";
- return this;
- }
-
- public bool HasField31 {
- get { return result.hasField31; }
- }
- public global::Google.ProtocolBuffers.ProtoBench.SizeMessage2GroupedMessage Field31 {
- get { return result.Field31; }
- set { SetField31(value); }
- }
- public Builder SetField31(global::Google.ProtocolBuffers.ProtoBench.SizeMessage2GroupedMessage value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.hasField31 = true;
- result.field31_ = value;
- return this;
- }
- public Builder SetField31(global::Google.ProtocolBuffers.ProtoBench.SizeMessage2GroupedMessage.Builder builderForValue) {
- pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
- PrepareBuilder();
- result.hasField31 = true;
- result.field31_ = builderForValue.Build();
- return this;
- }
- public Builder MergeField31(global::Google.ProtocolBuffers.ProtoBench.SizeMessage2GroupedMessage value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- if (result.hasField31 &&
- result.field31_ != global::Google.ProtocolBuffers.ProtoBench.SizeMessage2GroupedMessage.DefaultInstance) {
- result.field31_ = global::Google.ProtocolBuffers.ProtoBench.SizeMessage2GroupedMessage.CreateBuilder(result.field31_).MergeFrom(value).BuildPartial();
- } else {
- result.field31_ = value;
- }
- result.hasField31 = true;
- return this;
- }
- public Builder ClearField31() {
- PrepareBuilder();
- result.hasField31 = false;
- result.field31_ = null;
- return this;
- }
- }
- static Group1() {
- object.ReferenceEquals(global::Google.ProtocolBuffers.ProtoBench.GoogleSizeProtoFile.Descriptor, null);
- }
- }
-
- }
- #endregion
-
- public const int Field1FieldNumber = 1;
- private bool hasField1;
- private string field1_ = "";
- public bool HasField1 {
- get { return hasField1; }
- }
- public string Field1 {
- get { return field1_; }
- }
-
- public const int Field3FieldNumber = 3;
- private bool hasField3;
- private long field3_;
- public bool HasField3 {
- get { return hasField3; }
- }
- public long Field3 {
- get { return field3_; }
- }
-
- public const int Field4FieldNumber = 4;
- private bool hasField4;
- private long field4_;
- public bool HasField4 {
- get { return hasField4; }
- }
- public long Field4 {
- get { return field4_; }
- }
-
- public const int Field30FieldNumber = 30;
- private bool hasField30;
- private long field30_;
- public bool HasField30 {
- get { return hasField30; }
- }
- public long Field30 {
- get { return field30_; }
- }
-
- public const int Field75FieldNumber = 75;
- private bool hasField75;
- private bool field75_;
- public bool HasField75 {
- get { return hasField75; }
- }
- public bool Field75 {
- get { return field75_; }
- }
-
- public const int Field6FieldNumber = 6;
- private bool hasField6;
- private string field6_ = "";
- public bool HasField6 {
- get { return hasField6; }
- }
- public string Field6 {
- get { return field6_; }
- }
-
- public const int Field2FieldNumber = 2;
- private bool hasField2;
- private pb::ByteString field2_ = pb::ByteString.Empty;
- public bool HasField2 {
- get { return hasField2; }
- }
- public pb::ByteString Field2 {
- get { return field2_; }
- }
-
- public const int Field21FieldNumber = 21;
- private bool hasField21;
- private int field21_;
- public bool HasField21 {
- get { return hasField21; }
- }
- public int Field21 {
- get { return field21_; }
- }
-
- public const int Field71FieldNumber = 71;
- private bool hasField71;
- private int field71_;
- public bool HasField71 {
- get { return hasField71; }
- }
- public int Field71 {
- get { return field71_; }
- }
-
- public const int Field25FieldNumber = 25;
- private bool hasField25;
- private float field25_;
- public bool HasField25 {
- get { return hasField25; }
- }
- public float Field25 {
- get { return field25_; }
- }
-
- public const int Field109FieldNumber = 109;
- private bool hasField109;
- private int field109_;
- public bool HasField109 {
- get { return hasField109; }
- }
- public int Field109 {
- get { return field109_; }
- }
-
- public const int Field210FieldNumber = 210;
- private bool hasField210;
- private int field210_;
- public bool HasField210 {
- get { return hasField210; }
- }
- public int Field210 {
- get { return field210_; }
- }
-
- public const int Field211FieldNumber = 211;
- private bool hasField211;
- private int field211_;
- public bool HasField211 {
- get { return hasField211; }
- }
- public int Field211 {
- get { return field211_; }
- }
-
- public const int Field212FieldNumber = 212;
- private bool hasField212;
- private int field212_;
- public bool HasField212 {
- get { return hasField212; }
- }
- public int Field212 {
- get { return field212_; }
- }
-
- public const int Field213FieldNumber = 213;
- private bool hasField213;
- private int field213_;
- public bool HasField213 {
- get { return hasField213; }
- }
- public int Field213 {
- get { return field213_; }
- }
-
- public const int Field216FieldNumber = 216;
- private bool hasField216;
- private int field216_;
- public bool HasField216 {
- get { return hasField216; }
- }
- public int Field216 {
- get { return field216_; }
- }
-
- public const int Field217FieldNumber = 217;
- private bool hasField217;
- private int field217_;
- public bool HasField217 {
- get { return hasField217; }
- }
- public int Field217 {
- get { return field217_; }
- }
-
- public const int Field218FieldNumber = 218;
- private bool hasField218;
- private int field218_;
- public bool HasField218 {
- get { return hasField218; }
- }
- public int Field218 {
- get { return field218_; }
- }
-
- public const int Field220FieldNumber = 220;
- private bool hasField220;
- private int field220_;
- public bool HasField220 {
- get { return hasField220; }
- }
- public int Field220 {
- get { return field220_; }
- }
-
- public const int Field221FieldNumber = 221;
- private bool hasField221;
- private int field221_;
- public bool HasField221 {
- get { return hasField221; }
- }
- public int Field221 {
- get { return field221_; }
- }
-
- public const int Field222FieldNumber = 222;
- private bool hasField222;
- private float field222_;
- public bool HasField222 {
- get { return hasField222; }
- }
- public float Field222 {
- get { return field222_; }
- }
-
- public const int Field63FieldNumber = 63;
- private bool hasField63;
- private int field63_;
- public bool HasField63 {
- get { return hasField63; }
- }
- public int Field63 {
- get { return field63_; }
- }
-
- public const int Group1FieldNumber = 10;
- private pbc::PopsicleList<global::Google.ProtocolBuffers.ProtoBench.SizeMessage2.Types.Group1> group1_ = new pbc::PopsicleList<global::Google.ProtocolBuffers.ProtoBench.SizeMessage2.Types.Group1>();
- public scg::IList<global::Google.ProtocolBuffers.ProtoBench.SizeMessage2.Types.Group1> Group1List {
- get { return group1_; }
- }
- public int Group1Count {
- get { return group1_.Count; }
- }
- public global::Google.ProtocolBuffers.ProtoBench.SizeMessage2.Types.Group1 GetGroup1(int index) {
- return group1_[index];
- }
-
- public const int Field128FieldNumber = 128;
- private pbc::PopsicleList<string> field128_ = new pbc::PopsicleList<string>();
- public scg::IList<string> Field128List {
- get { return pbc::Lists.AsReadOnly(field128_); }
- }
- public int Field128Count {
- get { return field128_.Count; }
- }
- public string GetField128(int index) {
- return field128_[index];
- }
-
- public const int Field131FieldNumber = 131;
- private bool hasField131;
- private long field131_;
- public bool HasField131 {
- get { return hasField131; }
- }
- public long Field131 {
- get { return field131_; }
- }
-
- public const int Field127FieldNumber = 127;
- private pbc::PopsicleList<string> field127_ = new pbc::PopsicleList<string>();
- public scg::IList<string> Field127List {
- get { return pbc::Lists.AsReadOnly(field127_); }
- }
- public int Field127Count {
- get { return field127_.Count; }
- }
- public string GetField127(int index) {
- return field127_[index];
- }
-
- public const int Field129FieldNumber = 129;
- private bool hasField129;
- private int field129_;
- public bool HasField129 {
- get { return hasField129; }
- }
- public int Field129 {
- get { return field129_; }
- }
-
- public const int Field130FieldNumber = 130;
- private pbc::PopsicleList<long> field130_ = new pbc::PopsicleList<long>();
- public scg::IList<long> Field130List {
- get { return pbc::Lists.AsReadOnly(field130_); }
- }
- public int Field130Count {
- get { return field130_.Count; }
- }
- public long GetField130(int index) {
- return field130_[index];
- }
-
- public const int Field205FieldNumber = 205;
- private bool hasField205;
- private bool field205_;
- public bool HasField205 {
- get { return hasField205; }
- }
- public bool Field205 {
- get { return field205_; }
- }
-
- public const int Field206FieldNumber = 206;
- private bool hasField206;
- private bool field206_;
- public bool HasField206 {
- get { return hasField206; }
- }
- public bool Field206 {
- get { return field206_; }
- }
-
- public static SizeMessage2 ParseFrom(pb::ByteString data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static SizeMessage2 ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static SizeMessage2 ParseFrom(byte[] data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static SizeMessage2 ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static SizeMessage2 ParseFrom(global::System.IO.Stream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static SizeMessage2 ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- public static SizeMessage2 ParseDelimitedFrom(global::System.IO.Stream input) {
- return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
- }
- public static SizeMessage2 ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
- }
- public static SizeMessage2 ParseFrom(pb::ICodedInputStream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static SizeMessage2 ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- private SizeMessage2 MakeReadOnly() {
- group1_.MakeReadOnly();
- field128_.MakeReadOnly();
- field127_.MakeReadOnly();
- field130_.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(SizeMessage2 prototype) {
- return new Builder(prototype);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class Builder : pb::GeneratedBuilder<SizeMessage2, Builder> {
- protected override Builder ThisBuilder {
- get { return this; }
- }
- public Builder() {
- result = DefaultInstance;
- resultIsReadOnly = true;
- }
- internal Builder(SizeMessage2 cloneFrom) {
- result = cloneFrom;
- resultIsReadOnly = true;
- }
-
- private bool resultIsReadOnly;
- private SizeMessage2 result;
-
- private SizeMessage2 PrepareBuilder() {
- if (resultIsReadOnly) {
- SizeMessage2 original = result;
- result = new SizeMessage2();
- resultIsReadOnly = false;
- MergeFrom(original);
- }
- return result;
- }
-
- public override bool IsInitialized {
- get { return result.IsInitialized; }
- }
-
- protected override SizeMessage2 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.ProtoBench.SizeMessage2.Descriptor; }
- }
-
- public override SizeMessage2 DefaultInstanceForType {
- get { return global::Google.ProtocolBuffers.ProtoBench.SizeMessage2.DefaultInstance; }
- }
-
- public override SizeMessage2 BuildPartial() {
- if (resultIsReadOnly) {
- return result;
- }
- resultIsReadOnly = true;
- return result.MakeReadOnly();
- }
-
-
- public bool HasField1 {
- get { return result.hasField1; }
- }
- public string Field1 {
- get { return result.Field1; }
- set { SetField1(value); }
- }
- public Builder SetField1(string value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.hasField1 = true;
- result.field1_ = value;
- return this;
- }
- public Builder ClearField1() {
- PrepareBuilder();
- result.hasField1 = false;
- result.field1_ = "";
- return this;
- }
-
- public bool HasField3 {
- get { return result.hasField3; }
- }
- public long Field3 {
- get { return result.Field3; }
- set { SetField3(value); }
- }
- public Builder SetField3(long value) {
- PrepareBuilder();
- result.hasField3 = true;
- result.field3_ = value;
- return this;
- }
- public Builder ClearField3() {
- PrepareBuilder();
- result.hasField3 = false;
- result.field3_ = 0L;
- return this;
- }
-
- public bool HasField4 {
- get { return result.hasField4; }
- }
- public long Field4 {
- get { return result.Field4; }
- set { SetField4(value); }
- }
- public Builder SetField4(long value) {
- PrepareBuilder();
- result.hasField4 = true;
- result.field4_ = value;
- return this;
- }
- public Builder ClearField4() {
- PrepareBuilder();
- result.hasField4 = false;
- result.field4_ = 0L;
- return this;
- }
-
- public bool HasField30 {
- get { return result.hasField30; }
- }
- public long Field30 {
- get { return result.Field30; }
- set { SetField30(value); }
- }
- public Builder SetField30(long value) {
- PrepareBuilder();
- result.hasField30 = true;
- result.field30_ = value;
- return this;
- }
- public Builder ClearField30() {
- PrepareBuilder();
- result.hasField30 = false;
- result.field30_ = 0L;
- return this;
- }
-
- public bool HasField75 {
- get { return result.hasField75; }
- }
- public bool Field75 {
- get { return result.Field75; }
- set { SetField75(value); }
- }
- public Builder SetField75(bool value) {
- PrepareBuilder();
- result.hasField75 = true;
- result.field75_ = value;
- return this;
- }
- public Builder ClearField75() {
- PrepareBuilder();
- result.hasField75 = false;
- result.field75_ = false;
- return this;
- }
-
- public bool HasField6 {
- get { return result.hasField6; }
- }
- public string Field6 {
- get { return result.Field6; }
- set { SetField6(value); }
- }
- public Builder SetField6(string value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.hasField6 = true;
- result.field6_ = value;
- return this;
- }
- public Builder ClearField6() {
- PrepareBuilder();
- result.hasField6 = false;
- result.field6_ = "";
- return this;
- }
-
- public bool HasField2 {
- get { return result.hasField2; }
- }
- public pb::ByteString Field2 {
- get { return result.Field2; }
- set { SetField2(value); }
- }
- public Builder SetField2(pb::ByteString value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.hasField2 = true;
- result.field2_ = value;
- return this;
- }
- public Builder ClearField2() {
- PrepareBuilder();
- result.hasField2 = false;
- result.field2_ = pb::ByteString.Empty;
- return this;
- }
-
- public bool HasField21 {
- get { return result.hasField21; }
- }
- public int Field21 {
- get { return result.Field21; }
- set { SetField21(value); }
- }
- public Builder SetField21(int value) {
- PrepareBuilder();
- result.hasField21 = true;
- result.field21_ = value;
- return this;
- }
- public Builder ClearField21() {
- PrepareBuilder();
- result.hasField21 = false;
- result.field21_ = 0;
- return this;
- }
-
- public bool HasField71 {
- get { return result.hasField71; }
- }
- public int Field71 {
- get { return result.Field71; }
- set { SetField71(value); }
- }
- public Builder SetField71(int value) {
- PrepareBuilder();
- result.hasField71 = true;
- result.field71_ = value;
- return this;
- }
- public Builder ClearField71() {
- PrepareBuilder();
- result.hasField71 = false;
- result.field71_ = 0;
- return this;
- }
-
- public bool HasField25 {
- get { return result.hasField25; }
- }
- public float Field25 {
- get { return result.Field25; }
- set { SetField25(value); }
- }
- public Builder SetField25(float value) {
- PrepareBuilder();
- result.hasField25 = true;
- result.field25_ = value;
- return this;
- }
- public Builder ClearField25() {
- PrepareBuilder();
- result.hasField25 = false;
- result.field25_ = 0F;
- return this;
- }
-
- public bool HasField109 {
- get { return result.hasField109; }
- }
- public int Field109 {
- get { return result.Field109; }
- set { SetField109(value); }
- }
- public Builder SetField109(int value) {
- PrepareBuilder();
- result.hasField109 = true;
- result.field109_ = value;
- return this;
- }
- public Builder ClearField109() {
- PrepareBuilder();
- result.hasField109 = false;
- result.field109_ = 0;
- return this;
- }
-
- public bool HasField210 {
- get { return result.hasField210; }
- }
- public int Field210 {
- get { return result.Field210; }
- set { SetField210(value); }
- }
- public Builder SetField210(int value) {
- PrepareBuilder();
- result.hasField210 = true;
- result.field210_ = value;
- return this;
- }
- public Builder ClearField210() {
- PrepareBuilder();
- result.hasField210 = false;
- result.field210_ = 0;
- return this;
- }
-
- public bool HasField211 {
- get { return result.hasField211; }
- }
- public int Field211 {
- get { return result.Field211; }
- set { SetField211(value); }
- }
- public Builder SetField211(int value) {
- PrepareBuilder();
- result.hasField211 = true;
- result.field211_ = value;
- return this;
- }
- public Builder ClearField211() {
- PrepareBuilder();
- result.hasField211 = false;
- result.field211_ = 0;
- return this;
- }
-
- public bool HasField212 {
- get { return result.hasField212; }
- }
- public int Field212 {
- get { return result.Field212; }
- set { SetField212(value); }
- }
- public Builder SetField212(int value) {
- PrepareBuilder();
- result.hasField212 = true;
- result.field212_ = value;
- return this;
- }
- public Builder ClearField212() {
- PrepareBuilder();
- result.hasField212 = false;
- result.field212_ = 0;
- return this;
- }
-
- public bool HasField213 {
- get { return result.hasField213; }
- }
- public int Field213 {
- get { return result.Field213; }
- set { SetField213(value); }
- }
- public Builder SetField213(int value) {
- PrepareBuilder();
- result.hasField213 = true;
- result.field213_ = value;
- return this;
- }
- public Builder ClearField213() {
- PrepareBuilder();
- result.hasField213 = false;
- result.field213_ = 0;
- return this;
- }
-
- public bool HasField216 {
- get { return result.hasField216; }
- }
- public int Field216 {
- get { return result.Field216; }
- set { SetField216(value); }
- }
- public Builder SetField216(int value) {
- PrepareBuilder();
- result.hasField216 = true;
- result.field216_ = value;
- return this;
- }
- public Builder ClearField216() {
- PrepareBuilder();
- result.hasField216 = false;
- result.field216_ = 0;
- return this;
- }
-
- public bool HasField217 {
- get { return result.hasField217; }
- }
- public int Field217 {
- get { return result.Field217; }
- set { SetField217(value); }
- }
- public Builder SetField217(int value) {
- PrepareBuilder();
- result.hasField217 = true;
- result.field217_ = value;
- return this;
- }
- public Builder ClearField217() {
- PrepareBuilder();
- result.hasField217 = false;
- result.field217_ = 0;
- return this;
- }
-
- public bool HasField218 {
- get { return result.hasField218; }
- }
- public int Field218 {
- get { return result.Field218; }
- set { SetField218(value); }
- }
- public Builder SetField218(int value) {
- PrepareBuilder();
- result.hasField218 = true;
- result.field218_ = value;
- return this;
- }
- public Builder ClearField218() {
- PrepareBuilder();
- result.hasField218 = false;
- result.field218_ = 0;
- return this;
- }
-
- public bool HasField220 {
- get { return result.hasField220; }
- }
- public int Field220 {
- get { return result.Field220; }
- set { SetField220(value); }
- }
- public Builder SetField220(int value) {
- PrepareBuilder();
- result.hasField220 = true;
- result.field220_ = value;
- return this;
- }
- public Builder ClearField220() {
- PrepareBuilder();
- result.hasField220 = false;
- result.field220_ = 0;
- return this;
- }
-
- public bool HasField221 {
- get { return result.hasField221; }
- }
- public int Field221 {
- get { return result.Field221; }
- set { SetField221(value); }
- }
- public Builder SetField221(int value) {
- PrepareBuilder();
- result.hasField221 = true;
- result.field221_ = value;
- return this;
- }
- public Builder ClearField221() {
- PrepareBuilder();
- result.hasField221 = false;
- result.field221_ = 0;
- return this;
- }
-
- public bool HasField222 {
- get { return result.hasField222; }
- }
- public float Field222 {
- get { return result.Field222; }
- set { SetField222(value); }
- }
- public Builder SetField222(float value) {
- PrepareBuilder();
- result.hasField222 = true;
- result.field222_ = value;
- return this;
- }
- public Builder ClearField222() {
- PrepareBuilder();
- result.hasField222 = false;
- result.field222_ = 0F;
- return this;
- }
-
- public bool HasField63 {
- get { return result.hasField63; }
- }
- public int Field63 {
- get { return result.Field63; }
- set { SetField63(value); }
- }
- public Builder SetField63(int value) {
- PrepareBuilder();
- result.hasField63 = true;
- result.field63_ = value;
- return this;
- }
- public Builder ClearField63() {
- PrepareBuilder();
- result.hasField63 = false;
- result.field63_ = 0;
- return this;
- }
-
- public pbc::IPopsicleList<global::Google.ProtocolBuffers.ProtoBench.SizeMessage2.Types.Group1> Group1List {
- get { return PrepareBuilder().group1_; }
- }
- public int Group1Count {
- get { return result.Group1Count; }
- }
- public global::Google.ProtocolBuffers.ProtoBench.SizeMessage2.Types.Group1 GetGroup1(int index) {
- return result.GetGroup1(index);
- }
- public Builder SetGroup1(int index, global::Google.ProtocolBuffers.ProtoBench.SizeMessage2.Types.Group1 value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.group1_[index] = value;
- return this;
- }
- public Builder SetGroup1(int index, global::Google.ProtocolBuffers.ProtoBench.SizeMessage2.Types.Group1.Builder builderForValue) {
- pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
- PrepareBuilder();
- result.group1_[index] = builderForValue.Build();
- return this;
- }
- public Builder AddGroup1(global::Google.ProtocolBuffers.ProtoBench.SizeMessage2.Types.Group1 value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.group1_.Add(value);
- return this;
- }
- public Builder AddGroup1(global::Google.ProtocolBuffers.ProtoBench.SizeMessage2.Types.Group1.Builder builderForValue) {
- pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
- PrepareBuilder();
- result.group1_.Add(builderForValue.Build());
- return this;
- }
- public Builder AddRangeGroup1(scg::IEnumerable<global::Google.ProtocolBuffers.ProtoBench.SizeMessage2.Types.Group1> values) {
- PrepareBuilder();
- result.group1_.Add(values);
- return this;
- }
- public Builder ClearGroup1() {
- PrepareBuilder();
- result.group1_.Clear();
- return this;
- }
-
- public pbc::IPopsicleList<string> Field128List {
- get { return PrepareBuilder().field128_; }
- }
- public int Field128Count {
- get { return result.Field128Count; }
- }
- public string GetField128(int index) {
- return result.GetField128(index);
- }
- public Builder SetField128(int index, string value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.field128_[index] = value;
- return this;
- }
- public Builder AddField128(string value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.field128_.Add(value);
- return this;
- }
- public Builder AddRangeField128(scg::IEnumerable<string> values) {
- PrepareBuilder();
- result.field128_.Add(values);
- return this;
- }
- public Builder ClearField128() {
- PrepareBuilder();
- result.field128_.Clear();
- return this;
- }
-
- public bool HasField131 {
- get { return result.hasField131; }
- }
- public long Field131 {
- get { return result.Field131; }
- set { SetField131(value); }
- }
- public Builder SetField131(long value) {
- PrepareBuilder();
- result.hasField131 = true;
- result.field131_ = value;
- return this;
- }
- public Builder ClearField131() {
- PrepareBuilder();
- result.hasField131 = false;
- result.field131_ = 0L;
- return this;
- }
-
- public pbc::IPopsicleList<string> Field127List {
- get { return PrepareBuilder().field127_; }
- }
- public int Field127Count {
- get { return result.Field127Count; }
- }
- public string GetField127(int index) {
- return result.GetField127(index);
- }
- public Builder SetField127(int index, string value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.field127_[index] = value;
- return this;
- }
- public Builder AddField127(string value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.field127_.Add(value);
- return this;
- }
- public Builder AddRangeField127(scg::IEnumerable<string> values) {
- PrepareBuilder();
- result.field127_.Add(values);
- return this;
- }
- public Builder ClearField127() {
- PrepareBuilder();
- result.field127_.Clear();
- return this;
- }
-
- public bool HasField129 {
- get { return result.hasField129; }
- }
- public int Field129 {
- get { return result.Field129; }
- set { SetField129(value); }
- }
- public Builder SetField129(int value) {
- PrepareBuilder();
- result.hasField129 = true;
- result.field129_ = value;
- return this;
- }
- public Builder ClearField129() {
- PrepareBuilder();
- result.hasField129 = false;
- result.field129_ = 0;
- return this;
- }
-
- public pbc::IPopsicleList<long> Field130List {
- get { return PrepareBuilder().field130_; }
- }
- public int Field130Count {
- get { return result.Field130Count; }
- }
- public long GetField130(int index) {
- return result.GetField130(index);
- }
- public Builder SetField130(int index, long value) {
- PrepareBuilder();
- result.field130_[index] = value;
- return this;
- }
- public Builder AddField130(long value) {
- PrepareBuilder();
- result.field130_.Add(value);
- return this;
- }
- public Builder AddRangeField130(scg::IEnumerable<long> values) {
- PrepareBuilder();
- result.field130_.Add(values);
- return this;
- }
- public Builder ClearField130() {
- PrepareBuilder();
- result.field130_.Clear();
- return this;
- }
-
- public bool HasField205 {
- get { return result.hasField205; }
- }
- public bool Field205 {
- get { return result.Field205; }
- set { SetField205(value); }
- }
- public Builder SetField205(bool value) {
- PrepareBuilder();
- result.hasField205 = true;
- result.field205_ = value;
- return this;
- }
- public Builder ClearField205() {
- PrepareBuilder();
- result.hasField205 = false;
- result.field205_ = false;
- return this;
- }
-
- public bool HasField206 {
- get { return result.hasField206; }
- }
- public bool Field206 {
- get { return result.Field206; }
- set { SetField206(value); }
- }
- public Builder SetField206(bool value) {
- PrepareBuilder();
- result.hasField206 = true;
- result.field206_ = value;
- return this;
- }
- public Builder ClearField206() {
- PrepareBuilder();
- result.hasField206 = false;
- result.field206_ = false;
- return this;
- }
- }
- static SizeMessage2() {
- object.ReferenceEquals(global::Google.ProtocolBuffers.ProtoBench.GoogleSizeProtoFile.Descriptor, null);
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class SizeMessage2GroupedMessage : pb::GeneratedMessage<SizeMessage2GroupedMessage, SizeMessage2GroupedMessage.Builder> {
- private SizeMessage2GroupedMessage() { }
- private static readonly SizeMessage2GroupedMessage defaultInstance = new SizeMessage2GroupedMessage().MakeReadOnly();
- public static SizeMessage2GroupedMessage DefaultInstance {
- get { return defaultInstance; }
- }
-
- public override SizeMessage2GroupedMessage DefaultInstanceForType {
- get { return DefaultInstance; }
- }
-
- protected override SizeMessage2GroupedMessage ThisMessage {
- get { return this; }
- }
-
- public static pbd::MessageDescriptor Descriptor {
- get { return global::Google.ProtocolBuffers.ProtoBench.GoogleSizeProtoFile.internal__static_benchmarks_SizeMessage2GroupedMessage__Descriptor; }
- }
-
- protected override pb::FieldAccess.FieldAccessorTable<SizeMessage2GroupedMessage, SizeMessage2GroupedMessage.Builder> InternalFieldAccessors {
- get { return global::Google.ProtocolBuffers.ProtoBench.GoogleSizeProtoFile.internal__static_benchmarks_SizeMessage2GroupedMessage__FieldAccessorTable; }
- }
-
- public const int Field1FieldNumber = 1;
- private bool hasField1;
- private float field1_;
- public bool HasField1 {
- get { return hasField1; }
- }
- public float Field1 {
- get { return field1_; }
- }
-
- public const int Field2FieldNumber = 2;
- private bool hasField2;
- private float field2_;
- public bool HasField2 {
- get { return hasField2; }
- }
- public float Field2 {
- get { return field2_; }
- }
-
- public const int Field3FieldNumber = 3;
- private bool hasField3;
- private float field3_;
- public bool HasField3 {
- get { return hasField3; }
- }
- public float Field3 {
- get { return field3_; }
- }
-
- public const int Field4FieldNumber = 4;
- private bool hasField4;
- private bool field4_;
- public bool HasField4 {
- get { return hasField4; }
- }
- public bool Field4 {
- get { return field4_; }
- }
-
- public const int Field5FieldNumber = 5;
- private bool hasField5;
- private bool field5_;
- public bool HasField5 {
- get { return hasField5; }
- }
- public bool Field5 {
- get { return field5_; }
- }
-
- public const int Field6FieldNumber = 6;
- private bool hasField6;
- private bool field6_ = true;
- public bool HasField6 {
- get { return hasField6; }
- }
- public bool Field6 {
- get { return field6_; }
- }
-
- public const int Field7FieldNumber = 7;
- private bool hasField7;
- private bool field7_;
- public bool HasField7 {
- get { return hasField7; }
- }
- public bool Field7 {
- get { return field7_; }
- }
-
- public const int Field8FieldNumber = 8;
- private bool hasField8;
- private float field8_;
- public bool HasField8 {
- get { return hasField8; }
- }
- public float Field8 {
- get { return field8_; }
- }
-
- public const int Field9FieldNumber = 9;
- private bool hasField9;
- private bool field9_;
- public bool HasField9 {
- get { return hasField9; }
- }
- public bool Field9 {
- get { return field9_; }
- }
-
- public const int Field10FieldNumber = 10;
- private bool hasField10;
- private float field10_;
- public bool HasField10 {
- get { return hasField10; }
- }
- public float Field10 {
- get { return field10_; }
- }
-
- public const int Field11FieldNumber = 11;
- private bool hasField11;
- private long field11_;
- public bool HasField11 {
- get { return hasField11; }
- }
- public long Field11 {
- get { return field11_; }
- }
-
- public static SizeMessage2GroupedMessage ParseFrom(pb::ByteString data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static SizeMessage2GroupedMessage ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static SizeMessage2GroupedMessage ParseFrom(byte[] data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static SizeMessage2GroupedMessage ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static SizeMessage2GroupedMessage ParseFrom(global::System.IO.Stream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static SizeMessage2GroupedMessage ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- public static SizeMessage2GroupedMessage ParseDelimitedFrom(global::System.IO.Stream input) {
- return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
- }
- public static SizeMessage2GroupedMessage ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
- }
- public static SizeMessage2GroupedMessage ParseFrom(pb::ICodedInputStream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static SizeMessage2GroupedMessage ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- private SizeMessage2GroupedMessage 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(SizeMessage2GroupedMessage prototype) {
- return new Builder(prototype);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class Builder : pb::GeneratedBuilder<SizeMessage2GroupedMessage, Builder> {
- protected override Builder ThisBuilder {
- get { return this; }
- }
- public Builder() {
- result = DefaultInstance;
- resultIsReadOnly = true;
- }
- internal Builder(SizeMessage2GroupedMessage cloneFrom) {
- result = cloneFrom;
- resultIsReadOnly = true;
- }
-
- private bool resultIsReadOnly;
- private SizeMessage2GroupedMessage result;
-
- private SizeMessage2GroupedMessage PrepareBuilder() {
- if (resultIsReadOnly) {
- SizeMessage2GroupedMessage original = result;
- result = new SizeMessage2GroupedMessage();
- resultIsReadOnly = false;
- MergeFrom(original);
- }
- return result;
- }
-
- public override bool IsInitialized {
- get { return result.IsInitialized; }
- }
-
- protected override SizeMessage2GroupedMessage 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.ProtoBench.SizeMessage2GroupedMessage.Descriptor; }
- }
-
- public override SizeMessage2GroupedMessage DefaultInstanceForType {
- get { return global::Google.ProtocolBuffers.ProtoBench.SizeMessage2GroupedMessage.DefaultInstance; }
- }
-
- public override SizeMessage2GroupedMessage BuildPartial() {
- if (resultIsReadOnly) {
- return result;
- }
- resultIsReadOnly = true;
- return result.MakeReadOnly();
- }
-
-
- public bool HasField1 {
- get { return result.hasField1; }
- }
- public float Field1 {
- get { return result.Field1; }
- set { SetField1(value); }
- }
- public Builder SetField1(float value) {
- PrepareBuilder();
- result.hasField1 = true;
- result.field1_ = value;
- return this;
- }
- public Builder ClearField1() {
- PrepareBuilder();
- result.hasField1 = false;
- result.field1_ = 0F;
- return this;
- }
-
- public bool HasField2 {
- get { return result.hasField2; }
- }
- public float Field2 {
- get { return result.Field2; }
- set { SetField2(value); }
- }
- public Builder SetField2(float value) {
- PrepareBuilder();
- result.hasField2 = true;
- result.field2_ = value;
- return this;
- }
- public Builder ClearField2() {
- PrepareBuilder();
- result.hasField2 = false;
- result.field2_ = 0F;
- return this;
- }
-
- public bool HasField3 {
- get { return result.hasField3; }
- }
- public float Field3 {
- get { return result.Field3; }
- set { SetField3(value); }
- }
- public Builder SetField3(float value) {
- PrepareBuilder();
- result.hasField3 = true;
- result.field3_ = value;
- return this;
- }
- public Builder ClearField3() {
- PrepareBuilder();
- result.hasField3 = false;
- result.field3_ = 0F;
- return this;
- }
-
- public bool HasField4 {
- get { return result.hasField4; }
- }
- public bool Field4 {
- get { return result.Field4; }
- set { SetField4(value); }
- }
- public Builder SetField4(bool value) {
- PrepareBuilder();
- result.hasField4 = true;
- result.field4_ = value;
- return this;
- }
- public Builder ClearField4() {
- PrepareBuilder();
- result.hasField4 = false;
- result.field4_ = false;
- return this;
- }
-
- public bool HasField5 {
- get { return result.hasField5; }
- }
- public bool Field5 {
- get { return result.Field5; }
- set { SetField5(value); }
- }
- public Builder SetField5(bool value) {
- PrepareBuilder();
- result.hasField5 = true;
- result.field5_ = value;
- return this;
- }
- public Builder ClearField5() {
- PrepareBuilder();
- result.hasField5 = false;
- result.field5_ = false;
- return this;
- }
-
- public bool HasField6 {
- get { return result.hasField6; }
- }
- public bool Field6 {
- get { return result.Field6; }
- set { SetField6(value); }
- }
- public Builder SetField6(bool value) {
- PrepareBuilder();
- result.hasField6 = true;
- result.field6_ = value;
- return this;
- }
- public Builder ClearField6() {
- PrepareBuilder();
- result.hasField6 = false;
- result.field6_ = true;
- return this;
- }
-
- public bool HasField7 {
- get { return result.hasField7; }
- }
- public bool Field7 {
- get { return result.Field7; }
- set { SetField7(value); }
- }
- public Builder SetField7(bool value) {
- PrepareBuilder();
- result.hasField7 = true;
- result.field7_ = value;
- return this;
- }
- public Builder ClearField7() {
- PrepareBuilder();
- result.hasField7 = false;
- result.field7_ = false;
- return this;
- }
-
- public bool HasField8 {
- get { return result.hasField8; }
- }
- public float Field8 {
- get { return result.Field8; }
- set { SetField8(value); }
- }
- public Builder SetField8(float value) {
- PrepareBuilder();
- result.hasField8 = true;
- result.field8_ = value;
- return this;
- }
- public Builder ClearField8() {
- PrepareBuilder();
- result.hasField8 = false;
- result.field8_ = 0F;
- return this;
- }
-
- public bool HasField9 {
- get { return result.hasField9; }
- }
- public bool Field9 {
- get { return result.Field9; }
- set { SetField9(value); }
- }
- public Builder SetField9(bool value) {
- PrepareBuilder();
- result.hasField9 = true;
- result.field9_ = value;
- return this;
- }
- public Builder ClearField9() {
- PrepareBuilder();
- result.hasField9 = false;
- result.field9_ = false;
- return this;
- }
-
- public bool HasField10 {
- get { return result.hasField10; }
- }
- public float Field10 {
- get { return result.Field10; }
- set { SetField10(value); }
- }
- public Builder SetField10(float value) {
- PrepareBuilder();
- result.hasField10 = true;
- result.field10_ = value;
- return this;
- }
- public Builder ClearField10() {
- PrepareBuilder();
- result.hasField10 = false;
- result.field10_ = 0F;
- return this;
- }
-
- public bool HasField11 {
- get { return result.hasField11; }
- }
- public long Field11 {
- get { return result.Field11; }
- set { SetField11(value); }
- }
- public Builder SetField11(long value) {
- PrepareBuilder();
- result.hasField11 = true;
- result.field11_ = value;
- return this;
- }
- public Builder ClearField11() {
- PrepareBuilder();
- result.hasField11 = false;
- result.field11_ = 0L;
- return this;
- }
- }
- static SizeMessage2GroupedMessage() {
- object.ReferenceEquals(global::Google.ProtocolBuffers.ProtoBench.GoogleSizeProtoFile.Descriptor, null);
- }
- }
-
- #endregion
-
-}
-
-#endregion Designer generated code
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google_size.proto
+#pragma warning disable 1591, 0612, 3021
+#region Designer generated code
+
+using pb = global::Google.ProtocolBuffers;
+using pbc = global::Google.ProtocolBuffers.Collections;
+using pbd = global::Google.ProtocolBuffers.Descriptors;
+using scg = global::System.Collections.Generic;
+namespace Google.ProtocolBuffers.TestProtos {
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public static partial class GoogleSize {
+
+ #region Extension registration
+ public static void RegisterAllExtensions(pb::ExtensionRegistry registry) {
+ }
+ #endregion
+ #region Static variables
+ internal static pbd::MessageDescriptor internal__static_benchmarks_SizeMessage1__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.SizeMessage1, global::Google.ProtocolBuffers.TestProtos.SizeMessage1.Builder> internal__static_benchmarks_SizeMessage1__FieldAccessorTable;
+ internal static pbd::MessageDescriptor internal__static_benchmarks_SizeMessage1SubMessage__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.SizeMessage1SubMessage, global::Google.ProtocolBuffers.TestProtos.SizeMessage1SubMessage.Builder> internal__static_benchmarks_SizeMessage1SubMessage__FieldAccessorTable;
+ internal static pbd::MessageDescriptor internal__static_benchmarks_SizeMessage2__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.SizeMessage2, global::Google.ProtocolBuffers.TestProtos.SizeMessage2.Builder> internal__static_benchmarks_SizeMessage2__FieldAccessorTable;
+ internal static pbd::MessageDescriptor internal__static_benchmarks_SizeMessage2_Group1__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.SizeMessage2.Types.Group1, global::Google.ProtocolBuffers.TestProtos.SizeMessage2.Types.Group1.Builder> internal__static_benchmarks_SizeMessage2_Group1__FieldAccessorTable;
+ internal static pbd::MessageDescriptor internal__static_benchmarks_SizeMessage2GroupedMessage__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.SizeMessage2GroupedMessage, global::Google.ProtocolBuffers.TestProtos.SizeMessage2GroupedMessage.Builder> internal__static_benchmarks_SizeMessage2GroupedMessage__FieldAccessorTable;
+ #endregion
+ #region Descriptor
+ public static pbd::FileDescriptor Descriptor {
+ get { return descriptor; }
+ }
+ private static pbd::FileDescriptor descriptor;
+
+ static GoogleSize() {
+ byte[] descriptorData = global::System.Convert.FromBase64String(
+ string.Concat(
+ "ChFnb29nbGVfc2l6ZS5wcm90bxIKYmVuY2htYXJrcyL2BgoMU2l6ZU1lc3Nh",
+ "Z2UxEg4KBmZpZWxkMRgBIAIoCRIOCgZmaWVsZDkYCSABKAkSDwoHZmllbGQx",
+ "OBgSIAEoCRIWCgdmaWVsZDgwGFAgASgIOgVmYWxzZRIVCgdmaWVsZDgxGFEg",
+ "ASgIOgR0cnVlEg4KBmZpZWxkMhgCIAIoBRIOCgZmaWVsZDMYAyACKAUSEQoI",
+ "ZmllbGQyODAYmAIgASgFEhEKBmZpZWxkNhgGIAEoBToBMBIPCgdmaWVsZDIy",
+ "GBYgASgDEg4KBmZpZWxkNBgEIAEoCRIOCgZmaWVsZDUYBSADKAYSFgoHZmll",
+ "bGQ1ORg7IAEoCDoFZmFsc2USDgoGZmllbGQ3GAcgASgJEg8KB2ZpZWxkMTYY",
+ "ECABKAUSFAoIZmllbGQxMzAYggEgASgFOgEwEhUKB2ZpZWxkMTIYDCABKAg6",
+ "BHRydWUSFQoHZmllbGQxNxgRIAEoCDoEdHJ1ZRIVCgdmaWVsZDEzGA0gASgI",
+ "OgR0cnVlEhUKB2ZpZWxkMTQYDiABKAg6BHRydWUSEwoIZmllbGQxMDQYaCAB",
+ "KAU6ATASEwoIZmllbGQxMDAYZCABKAU6ATASEwoIZmllbGQxMDEYZSABKAU6",
+ "ATASEAoIZmllbGQxMDIYZiABKAkSEAoIZmllbGQxMDMYZyABKAkSEgoHZmll",
+ "bGQyORgdIAEoBToBMBIWCgdmaWVsZDMwGB4gASgIOgVmYWxzZRITCgdmaWVs",
+ "ZDYwGDwgASgFOgItMRIVCghmaWVsZDI3MRiPAiABKAU6Ai0xEhUKCGZpZWxk",
+ "MjcyGJACIAEoBToCLTESEQoIZmllbGQxNTAYlgEgASgFEhIKB2ZpZWxkMjMY",
+ "FyABKAU6ATASFgoHZmllbGQyNBgYIAEoCDoFZmFsc2USEgoHZmllbGQyNRgZ",
+ "IAEoBToBMBIzCgdmaWVsZDE1GA8gASgLMiIuYmVuY2htYXJrcy5TaXplTWVz",
+ "c2FnZTFTdWJNZXNzYWdlEg8KB2ZpZWxkNzgYTiABKAgSEgoHZmllbGQ2NxhD",
+ "IAEoBToBMBIPCgdmaWVsZDY4GEQgASgFEhQKCGZpZWxkMTI4GIABIAEoBToB",
+ "MBIoCghmaWVsZDEyORiBASABKAk6FXh4eHh4eHh4eHh4eHh4eHh4eHh4eBIU",
+ "CghmaWVsZDEzMRiDASABKAU6ATAioQMKFlNpemVNZXNzYWdlMVN1Yk1lc3Nh",
+ "Z2USEQoGZmllbGQxGAEgASgFOgEwEhEKBmZpZWxkMhgCIAEoBToBMBIRCgZm",
+ "aWVsZDMYAyABKAU6ATASDwoHZmllbGQxNRgPIAEoCRIVCgdmaWVsZDEyGAwg",
+ "ASgIOgR0cnVlEg8KB2ZpZWxkMTMYDSABKAMSDwoHZmllbGQxNBgOIAEoAxIP",
+ "CgdmaWVsZDE2GBAgASgFEhIKB2ZpZWxkMTkYEyABKAU6ATISFQoHZmllbGQy",
+ "MBgUIAEoCDoEdHJ1ZRIVCgdmaWVsZDI4GBwgASgIOgR0cnVlEg8KB2ZpZWxk",
+ "MjEYFSABKAYSDwoHZmllbGQyMhgWIAEoBRIWCgdmaWVsZDIzGBcgASgIOgVm",
+ "YWxzZRIYCghmaWVsZDIwNhjOASABKAg6BWZhbHNlEhEKCGZpZWxkMjAzGMsB",
+ "IAEoBxIRCghmaWVsZDIwNBjMASABKAUSEQoIZmllbGQyMDUYzQEgASgJEhEK",
+ "CGZpZWxkMjA3GM8BIAEoBBIRCghmaWVsZDMwMBisAiABKAQixwcKDFNpemVN",
+ "ZXNzYWdlMhIOCgZmaWVsZDEYASABKAkSDgoGZmllbGQzGAMgASgDEg4KBmZp",
+ "ZWxkNBgEIAEoAxIPCgdmaWVsZDMwGB4gASgDEhYKB2ZpZWxkNzUYSyABKAg6",
+ "BWZhbHNlEg4KBmZpZWxkNhgGIAEoCRIOCgZmaWVsZDIYAiABKAwSEgoHZmll",
+ "bGQyMRgVIAEoBToBMBIPCgdmaWVsZDcxGEcgASgFEg8KB2ZpZWxkMjUYGSAB",
+ "KAISEwoIZmllbGQxMDkYbSABKAU6ATASFAoIZmllbGQyMTAY0gEgASgFOgEw",
+ "EhQKCGZpZWxkMjExGNMBIAEoBToBMBIUCghmaWVsZDIxMhjUASABKAU6ATAS",
+ "FAoIZmllbGQyMTMY1QEgASgFOgEwEhQKCGZpZWxkMjE2GNgBIAEoBToBMBIU",
+ "CghmaWVsZDIxNxjZASABKAU6ATASFAoIZmllbGQyMTgY2gEgASgFOgEwEhQK",
+ "CGZpZWxkMjIwGNwBIAEoBToBMBIUCghmaWVsZDIyMRjdASABKAU6ATASFAoI",
+ "ZmllbGQyMjIY3gEgASgCOgEwEg8KB2ZpZWxkNjMYPyABKAUSLwoGZ3JvdXAx",
+ "GAogAygKMh8uYmVuY2htYXJrcy5TaXplTWVzc2FnZTIuR3JvdXAxEhEKCGZp",
+ "ZWxkMTI4GIABIAMoCRIRCghmaWVsZDEzMRiDASABKAMSEAoIZmllbGQxMjcY",
+ "fyADKAkSEQoIZmllbGQxMjkYgQEgASgFEhEKCGZpZWxkMTMwGIIBIAMoAxIY",
+ "CghmaWVsZDIwNRjNASABKAg6BWZhbHNlEhgKCGZpZWxkMjA2GM4BIAEoCDoF",
+ "ZmFsc2UawgIKBkdyb3VwMRIPCgdmaWVsZDExGAsgAigCEg8KB2ZpZWxkMjYY",
+ "GiABKAISDwoHZmllbGQxMhgMIAEoCRIPCgdmaWVsZDEzGA0gASgJEg8KB2Zp",
+ "ZWxkMTQYDiADKAkSDwoHZmllbGQxNRgPIAIoBBIOCgZmaWVsZDUYBSABKAUS",
+ "DwoHZmllbGQyNxgbIAEoCRIPCgdmaWVsZDI4GBwgASgFEg8KB2ZpZWxkMjkY",
+ "HSABKAkSDwoHZmllbGQxNhgQIAEoCRIPCgdmaWVsZDIyGBYgAygJEg8KB2Zp",
+ "ZWxkNzMYSSADKAUSEgoHZmllbGQyMBgUIAEoBToBMBIPCgdmaWVsZDI0GBgg",
+ "ASgJEjcKB2ZpZWxkMzEYHyABKAsyJi5iZW5jaG1hcmtzLlNpemVNZXNzYWdl",
+ "Mkdyb3VwZWRNZXNzYWdlIt4BChpTaXplTWVzc2FnZTJHcm91cGVkTWVzc2Fn",
+ "ZRIOCgZmaWVsZDEYASABKAISDgoGZmllbGQyGAIgASgCEhEKBmZpZWxkMxgD",
+ "IAEoAjoBMBIOCgZmaWVsZDQYBCABKAgSDgoGZmllbGQ1GAUgASgIEhQKBmZp",
+ "ZWxkNhgGIAEoCDoEdHJ1ZRIVCgZmaWVsZDcYByABKAg6BWZhbHNlEg4KBmZp",
+ "ZWxkOBgIIAEoAhIOCgZmaWVsZDkYCSABKAgSDwoHZmllbGQxMBgKIAEoAhIP",
+ "CgdmaWVsZDExGAsgASgDQjJCCkdvb2dsZVNpemVIAqoCIUdvb2dsZS5Qcm90",
+ "b2NvbEJ1ZmZlcnMuVGVzdFByb3Rvcw=="));
+ pbd::FileDescriptor.InternalDescriptorAssigner assigner = delegate(pbd::FileDescriptor root) {
+ descriptor = root;
+ internal__static_benchmarks_SizeMessage1__Descriptor = Descriptor.MessageTypes[0];
+ internal__static_benchmarks_SizeMessage1__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.SizeMessage1, global::Google.ProtocolBuffers.TestProtos.SizeMessage1.Builder>(internal__static_benchmarks_SizeMessage1__Descriptor,
+ new string[] { "Field1", "Field9", "Field18", "Field80", "Field81", "Field2", "Field3", "Field280", "Field6", "Field22", "Field4", "Field5", "Field59", "Field7", "Field16", "Field130", "Field12", "Field17", "Field13", "Field14", "Field104", "Field100", "Field101", "Field102", "Field103", "Field29", "Field30", "Field60", "Field271", "Field272", "Field150", "Field23", "Field24", "Field25", "Field15", "Field78", "Field67", "Field68", "Field128", "Field129", "Field131", });
+ internal__static_benchmarks_SizeMessage1SubMessage__Descriptor = Descriptor.MessageTypes[1];
+ internal__static_benchmarks_SizeMessage1SubMessage__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.SizeMessage1SubMessage, global::Google.ProtocolBuffers.TestProtos.SizeMessage1SubMessage.Builder>(internal__static_benchmarks_SizeMessage1SubMessage__Descriptor,
+ new string[] { "Field1", "Field2", "Field3", "Field15", "Field12", "Field13", "Field14", "Field16", "Field19", "Field20", "Field28", "Field21", "Field22", "Field23", "Field206", "Field203", "Field204", "Field205", "Field207", "Field300", });
+ internal__static_benchmarks_SizeMessage2__Descriptor = Descriptor.MessageTypes[2];
+ internal__static_benchmarks_SizeMessage2__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.SizeMessage2, global::Google.ProtocolBuffers.TestProtos.SizeMessage2.Builder>(internal__static_benchmarks_SizeMessage2__Descriptor,
+ new string[] { "Field1", "Field3", "Field4", "Field30", "Field75", "Field6", "Field2", "Field21", "Field71", "Field25", "Field109", "Field210", "Field211", "Field212", "Field213", "Field216", "Field217", "Field218", "Field220", "Field221", "Field222", "Field63", "Group1", "Field128", "Field131", "Field127", "Field129", "Field130", "Field205", "Field206", });
+ internal__static_benchmarks_SizeMessage2_Group1__Descriptor = internal__static_benchmarks_SizeMessage2__Descriptor.NestedTypes[0];
+ internal__static_benchmarks_SizeMessage2_Group1__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.SizeMessage2.Types.Group1, global::Google.ProtocolBuffers.TestProtos.SizeMessage2.Types.Group1.Builder>(internal__static_benchmarks_SizeMessage2_Group1__Descriptor,
+ new string[] { "Field11", "Field26", "Field12", "Field13", "Field14", "Field15", "Field5", "Field27", "Field28", "Field29", "Field16", "Field22", "Field73", "Field20", "Field24", "Field31", });
+ internal__static_benchmarks_SizeMessage2GroupedMessage__Descriptor = Descriptor.MessageTypes[3];
+ internal__static_benchmarks_SizeMessage2GroupedMessage__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.SizeMessage2GroupedMessage, global::Google.ProtocolBuffers.TestProtos.SizeMessage2GroupedMessage.Builder>(internal__static_benchmarks_SizeMessage2GroupedMessage__Descriptor,
+ new string[] { "Field1", "Field2", "Field3", "Field4", "Field5", "Field6", "Field7", "Field8", "Field9", "Field10", "Field11", });
+ pb::ExtensionRegistry registry = pb::ExtensionRegistry.CreateInstance();
+ RegisterAllExtensions(registry);
+ return registry;
+ };
+ pbd::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData,
+ new pbd::FileDescriptor[] {
+ }, assigner);
+ }
+ #endregion
+
+ }
+ #region Messages
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class SizeMessage1 : pb::GeneratedMessage<SizeMessage1, SizeMessage1.Builder> {
+ private SizeMessage1() { }
+ private static readonly SizeMessage1 defaultInstance = new SizeMessage1().MakeReadOnly();
+ public static SizeMessage1 DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override SizeMessage1 DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override SizeMessage1 ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::Google.ProtocolBuffers.TestProtos.GoogleSize.internal__static_benchmarks_SizeMessage1__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<SizeMessage1, SizeMessage1.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.GoogleSize.internal__static_benchmarks_SizeMessage1__FieldAccessorTable; }
+ }
+
+ public const int Field1FieldNumber = 1;
+ private bool hasField1;
+ private string field1_ = "";
+ public bool HasField1 {
+ get { return hasField1; }
+ }
+ public string Field1 {
+ get { return field1_; }
+ }
+
+ public const int Field9FieldNumber = 9;
+ private bool hasField9;
+ private string field9_ = "";
+ public bool HasField9 {
+ get { return hasField9; }
+ }
+ public string Field9 {
+ get { return field9_; }
+ }
+
+ public const int Field18FieldNumber = 18;
+ private bool hasField18;
+ private string field18_ = "";
+ public bool HasField18 {
+ get { return hasField18; }
+ }
+ public string Field18 {
+ get { return field18_; }
+ }
+
+ public const int Field80FieldNumber = 80;
+ private bool hasField80;
+ private bool field80_;
+ public bool HasField80 {
+ get { return hasField80; }
+ }
+ public bool Field80 {
+ get { return field80_; }
+ }
+
+ public const int Field81FieldNumber = 81;
+ private bool hasField81;
+ private bool field81_ = true;
+ public bool HasField81 {
+ get { return hasField81; }
+ }
+ public bool Field81 {
+ get { return field81_; }
+ }
+
+ public const int Field2FieldNumber = 2;
+ private bool hasField2;
+ private int field2_;
+ public bool HasField2 {
+ get { return hasField2; }
+ }
+ public int Field2 {
+ get { return field2_; }
+ }
+
+ public const int Field3FieldNumber = 3;
+ private bool hasField3;
+ private int field3_;
+ public bool HasField3 {
+ get { return hasField3; }
+ }
+ public int Field3 {
+ get { return field3_; }
+ }
+
+ public const int Field280FieldNumber = 280;
+ private bool hasField280;
+ private int field280_;
+ public bool HasField280 {
+ get { return hasField280; }
+ }
+ public int Field280 {
+ get { return field280_; }
+ }
+
+ public const int Field6FieldNumber = 6;
+ private bool hasField6;
+ private int field6_;
+ public bool HasField6 {
+ get { return hasField6; }
+ }
+ public int Field6 {
+ get { return field6_; }
+ }
+
+ public const int Field22FieldNumber = 22;
+ private bool hasField22;
+ private long field22_;
+ public bool HasField22 {
+ get { return hasField22; }
+ }
+ public long Field22 {
+ get { return field22_; }
+ }
+
+ public const int Field4FieldNumber = 4;
+ private bool hasField4;
+ private string field4_ = "";
+ public bool HasField4 {
+ get { return hasField4; }
+ }
+ public string Field4 {
+ get { return field4_; }
+ }
+
+ public const int Field5FieldNumber = 5;
+ private pbc::PopsicleList<ulong> field5_ = new pbc::PopsicleList<ulong>();
+ [global::System.CLSCompliant(false)]
+ public scg::IList<ulong> Field5List {
+ get { return pbc::Lists.AsReadOnly(field5_); }
+ }
+ public int Field5Count {
+ get { return field5_.Count; }
+ }
+ [global::System.CLSCompliant(false)]
+ public ulong GetField5(int index) {
+ return field5_[index];
+ }
+
+ public const int Field59FieldNumber = 59;
+ private bool hasField59;
+ private bool field59_;
+ public bool HasField59 {
+ get { return hasField59; }
+ }
+ public bool Field59 {
+ get { return field59_; }
+ }
+
+ public const int Field7FieldNumber = 7;
+ private bool hasField7;
+ private string field7_ = "";
+ public bool HasField7 {
+ get { return hasField7; }
+ }
+ public string Field7 {
+ get { return field7_; }
+ }
+
+ public const int Field16FieldNumber = 16;
+ private bool hasField16;
+ private int field16_;
+ public bool HasField16 {
+ get { return hasField16; }
+ }
+ public int Field16 {
+ get { return field16_; }
+ }
+
+ public const int Field130FieldNumber = 130;
+ private bool hasField130;
+ private int field130_;
+ public bool HasField130 {
+ get { return hasField130; }
+ }
+ public int Field130 {
+ get { return field130_; }
+ }
+
+ public const int Field12FieldNumber = 12;
+ private bool hasField12;
+ private bool field12_ = true;
+ public bool HasField12 {
+ get { return hasField12; }
+ }
+ public bool Field12 {
+ get { return field12_; }
+ }
+
+ public const int Field17FieldNumber = 17;
+ private bool hasField17;
+ private bool field17_ = true;
+ public bool HasField17 {
+ get { return hasField17; }
+ }
+ public bool Field17 {
+ get { return field17_; }
+ }
+
+ public const int Field13FieldNumber = 13;
+ private bool hasField13;
+ private bool field13_ = true;
+ public bool HasField13 {
+ get { return hasField13; }
+ }
+ public bool Field13 {
+ get { return field13_; }
+ }
+
+ public const int Field14FieldNumber = 14;
+ private bool hasField14;
+ private bool field14_ = true;
+ public bool HasField14 {
+ get { return hasField14; }
+ }
+ public bool Field14 {
+ get { return field14_; }
+ }
+
+ public const int Field104FieldNumber = 104;
+ private bool hasField104;
+ private int field104_;
+ public bool HasField104 {
+ get { return hasField104; }
+ }
+ public int Field104 {
+ get { return field104_; }
+ }
+
+ public const int Field100FieldNumber = 100;
+ private bool hasField100;
+ private int field100_;
+ public bool HasField100 {
+ get { return hasField100; }
+ }
+ public int Field100 {
+ get { return field100_; }
+ }
+
+ public const int Field101FieldNumber = 101;
+ private bool hasField101;
+ private int field101_;
+ public bool HasField101 {
+ get { return hasField101; }
+ }
+ public int Field101 {
+ get { return field101_; }
+ }
+
+ public const int Field102FieldNumber = 102;
+ private bool hasField102;
+ private string field102_ = "";
+ public bool HasField102 {
+ get { return hasField102; }
+ }
+ public string Field102 {
+ get { return field102_; }
+ }
+
+ public const int Field103FieldNumber = 103;
+ private bool hasField103;
+ private string field103_ = "";
+ public bool HasField103 {
+ get { return hasField103; }
+ }
+ public string Field103 {
+ get { return field103_; }
+ }
+
+ public const int Field29FieldNumber = 29;
+ private bool hasField29;
+ private int field29_;
+ public bool HasField29 {
+ get { return hasField29; }
+ }
+ public int Field29 {
+ get { return field29_; }
+ }
+
+ public const int Field30FieldNumber = 30;
+ private bool hasField30;
+ private bool field30_;
+ public bool HasField30 {
+ get { return hasField30; }
+ }
+ public bool Field30 {
+ get { return field30_; }
+ }
+
+ public const int Field60FieldNumber = 60;
+ private bool hasField60;
+ private int field60_ = -1;
+ public bool HasField60 {
+ get { return hasField60; }
+ }
+ public int Field60 {
+ get { return field60_; }
+ }
+
+ public const int Field271FieldNumber = 271;
+ private bool hasField271;
+ private int field271_ = -1;
+ public bool HasField271 {
+ get { return hasField271; }
+ }
+ public int Field271 {
+ get { return field271_; }
+ }
+
+ public const int Field272FieldNumber = 272;
+ private bool hasField272;
+ private int field272_ = -1;
+ public bool HasField272 {
+ get { return hasField272; }
+ }
+ public int Field272 {
+ get { return field272_; }
+ }
+
+ public const int Field150FieldNumber = 150;
+ private bool hasField150;
+ private int field150_;
+ public bool HasField150 {
+ get { return hasField150; }
+ }
+ public int Field150 {
+ get { return field150_; }
+ }
+
+ public const int Field23FieldNumber = 23;
+ private bool hasField23;
+ private int field23_;
+ public bool HasField23 {
+ get { return hasField23; }
+ }
+ public int Field23 {
+ get { return field23_; }
+ }
+
+ public const int Field24FieldNumber = 24;
+ private bool hasField24;
+ private bool field24_;
+ public bool HasField24 {
+ get { return hasField24; }
+ }
+ public bool Field24 {
+ get { return field24_; }
+ }
+
+ public const int Field25FieldNumber = 25;
+ private bool hasField25;
+ private int field25_;
+ public bool HasField25 {
+ get { return hasField25; }
+ }
+ public int Field25 {
+ get { return field25_; }
+ }
+
+ public const int Field15FieldNumber = 15;
+ private bool hasField15;
+ private global::Google.ProtocolBuffers.TestProtos.SizeMessage1SubMessage field15_;
+ public bool HasField15 {
+ get { return hasField15; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.SizeMessage1SubMessage Field15 {
+ get { return field15_ ?? global::Google.ProtocolBuffers.TestProtos.SizeMessage1SubMessage.DefaultInstance; }
+ }
+
+ public const int Field78FieldNumber = 78;
+ private bool hasField78;
+ private bool field78_;
+ public bool HasField78 {
+ get { return hasField78; }
+ }
+ public bool Field78 {
+ get { return field78_; }
+ }
+
+ public const int Field67FieldNumber = 67;
+ private bool hasField67;
+ private int field67_;
+ public bool HasField67 {
+ get { return hasField67; }
+ }
+ public int Field67 {
+ get { return field67_; }
+ }
+
+ public const int Field68FieldNumber = 68;
+ private bool hasField68;
+ private int field68_;
+ public bool HasField68 {
+ get { return hasField68; }
+ }
+ public int Field68 {
+ get { return field68_; }
+ }
+
+ public const int Field128FieldNumber = 128;
+ private bool hasField128;
+ private int field128_;
+ public bool HasField128 {
+ get { return hasField128; }
+ }
+ public int Field128 {
+ get { return field128_; }
+ }
+
+ public const int Field129FieldNumber = 129;
+ private bool hasField129;
+ private string field129_ = "xxxxxxxxxxxxxxxxxxxxx";
+ public bool HasField129 {
+ get { return hasField129; }
+ }
+ public string Field129 {
+ get { return field129_; }
+ }
+
+ public const int Field131FieldNumber = 131;
+ private bool hasField131;
+ private int field131_;
+ public bool HasField131 {
+ get { return hasField131; }
+ }
+ public int Field131 {
+ get { return field131_; }
+ }
+
+ public static SizeMessage1 ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static SizeMessage1 ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static SizeMessage1 ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static SizeMessage1 ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static SizeMessage1 ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static SizeMessage1 ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static SizeMessage1 ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static SizeMessage1 ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static SizeMessage1 ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static SizeMessage1 ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private SizeMessage1 MakeReadOnly() {
+ field5_.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(SizeMessage1 prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Builder : pb::GeneratedBuilder<SizeMessage1, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(SizeMessage1 cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private SizeMessage1 result;
+
+ private SizeMessage1 PrepareBuilder() {
+ if (resultIsReadOnly) {
+ SizeMessage1 original = result;
+ result = new SizeMessage1();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override SizeMessage1 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.SizeMessage1.Descriptor; }
+ }
+
+ public override SizeMessage1 DefaultInstanceForType {
+ get { return global::Google.ProtocolBuffers.TestProtos.SizeMessage1.DefaultInstance; }
+ }
+
+ public override SizeMessage1 BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+
+ public bool HasField1 {
+ get { return result.hasField1; }
+ }
+ public string Field1 {
+ get { return result.Field1; }
+ set { SetField1(value); }
+ }
+ public Builder SetField1(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasField1 = true;
+ result.field1_ = value;
+ return this;
+ }
+ public Builder ClearField1() {
+ PrepareBuilder();
+ result.hasField1 = false;
+ result.field1_ = "";
+ return this;
+ }
+
+ public bool HasField9 {
+ get { return result.hasField9; }
+ }
+ public string Field9 {
+ get { return result.Field9; }
+ set { SetField9(value); }
+ }
+ public Builder SetField9(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasField9 = true;
+ result.field9_ = value;
+ return this;
+ }
+ public Builder ClearField9() {
+ PrepareBuilder();
+ result.hasField9 = false;
+ result.field9_ = "";
+ return this;
+ }
+
+ public bool HasField18 {
+ get { return result.hasField18; }
+ }
+ public string Field18 {
+ get { return result.Field18; }
+ set { SetField18(value); }
+ }
+ public Builder SetField18(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasField18 = true;
+ result.field18_ = value;
+ return this;
+ }
+ public Builder ClearField18() {
+ PrepareBuilder();
+ result.hasField18 = false;
+ result.field18_ = "";
+ return this;
+ }
+
+ public bool HasField80 {
+ get { return result.hasField80; }
+ }
+ public bool Field80 {
+ get { return result.Field80; }
+ set { SetField80(value); }
+ }
+ public Builder SetField80(bool value) {
+ PrepareBuilder();
+ result.hasField80 = true;
+ result.field80_ = value;
+ return this;
+ }
+ public Builder ClearField80() {
+ PrepareBuilder();
+ result.hasField80 = false;
+ result.field80_ = false;
+ return this;
+ }
+
+ public bool HasField81 {
+ get { return result.hasField81; }
+ }
+ public bool Field81 {
+ get { return result.Field81; }
+ set { SetField81(value); }
+ }
+ public Builder SetField81(bool value) {
+ PrepareBuilder();
+ result.hasField81 = true;
+ result.field81_ = value;
+ return this;
+ }
+ public Builder ClearField81() {
+ PrepareBuilder();
+ result.hasField81 = false;
+ result.field81_ = true;
+ return this;
+ }
+
+ public bool HasField2 {
+ get { return result.hasField2; }
+ }
+ public int Field2 {
+ get { return result.Field2; }
+ set { SetField2(value); }
+ }
+ public Builder SetField2(int value) {
+ PrepareBuilder();
+ result.hasField2 = true;
+ result.field2_ = value;
+ return this;
+ }
+ public Builder ClearField2() {
+ PrepareBuilder();
+ result.hasField2 = false;
+ result.field2_ = 0;
+ return this;
+ }
+
+ public bool HasField3 {
+ get { return result.hasField3; }
+ }
+ public int Field3 {
+ get { return result.Field3; }
+ set { SetField3(value); }
+ }
+ public Builder SetField3(int value) {
+ PrepareBuilder();
+ result.hasField3 = true;
+ result.field3_ = value;
+ return this;
+ }
+ public Builder ClearField3() {
+ PrepareBuilder();
+ result.hasField3 = false;
+ result.field3_ = 0;
+ return this;
+ }
+
+ public bool HasField280 {
+ get { return result.hasField280; }
+ }
+ public int Field280 {
+ get { return result.Field280; }
+ set { SetField280(value); }
+ }
+ public Builder SetField280(int value) {
+ PrepareBuilder();
+ result.hasField280 = true;
+ result.field280_ = value;
+ return this;
+ }
+ public Builder ClearField280() {
+ PrepareBuilder();
+ result.hasField280 = false;
+ result.field280_ = 0;
+ return this;
+ }
+
+ public bool HasField6 {
+ get { return result.hasField6; }
+ }
+ public int Field6 {
+ get { return result.Field6; }
+ set { SetField6(value); }
+ }
+ public Builder SetField6(int value) {
+ PrepareBuilder();
+ result.hasField6 = true;
+ result.field6_ = value;
+ return this;
+ }
+ public Builder ClearField6() {
+ PrepareBuilder();
+ result.hasField6 = false;
+ result.field6_ = 0;
+ return this;
+ }
+
+ public bool HasField22 {
+ get { return result.hasField22; }
+ }
+ public long Field22 {
+ get { return result.Field22; }
+ set { SetField22(value); }
+ }
+ public Builder SetField22(long value) {
+ PrepareBuilder();
+ result.hasField22 = true;
+ result.field22_ = value;
+ return this;
+ }
+ public Builder ClearField22() {
+ PrepareBuilder();
+ result.hasField22 = false;
+ result.field22_ = 0L;
+ return this;
+ }
+
+ public bool HasField4 {
+ get { return result.hasField4; }
+ }
+ public string Field4 {
+ get { return result.Field4; }
+ set { SetField4(value); }
+ }
+ public Builder SetField4(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasField4 = true;
+ result.field4_ = value;
+ return this;
+ }
+ public Builder ClearField4() {
+ PrepareBuilder();
+ result.hasField4 = false;
+ result.field4_ = "";
+ return this;
+ }
+
+ [global::System.CLSCompliant(false)]
+ public pbc::IPopsicleList<ulong> Field5List {
+ get { return PrepareBuilder().field5_; }
+ }
+ public int Field5Count {
+ get { return result.Field5Count; }
+ }
+ [global::System.CLSCompliant(false)]
+ public ulong GetField5(int index) {
+ return result.GetField5(index);
+ }
+ [global::System.CLSCompliant(false)]
+ public Builder SetField5(int index, ulong value) {
+ PrepareBuilder();
+ result.field5_[index] = value;
+ return this;
+ }
+ [global::System.CLSCompliant(false)]
+ public Builder AddField5(ulong value) {
+ PrepareBuilder();
+ result.field5_.Add(value);
+ return this;
+ }
+ [global::System.CLSCompliant(false)]
+ public Builder AddRangeField5(scg::IEnumerable<ulong> values) {
+ PrepareBuilder();
+ result.field5_.Add(values);
+ return this;
+ }
+ public Builder ClearField5() {
+ PrepareBuilder();
+ result.field5_.Clear();
+ return this;
+ }
+
+ public bool HasField59 {
+ get { return result.hasField59; }
+ }
+ public bool Field59 {
+ get { return result.Field59; }
+ set { SetField59(value); }
+ }
+ public Builder SetField59(bool value) {
+ PrepareBuilder();
+ result.hasField59 = true;
+ result.field59_ = value;
+ return this;
+ }
+ public Builder ClearField59() {
+ PrepareBuilder();
+ result.hasField59 = false;
+ result.field59_ = false;
+ return this;
+ }
+
+ public bool HasField7 {
+ get { return result.hasField7; }
+ }
+ public string Field7 {
+ get { return result.Field7; }
+ set { SetField7(value); }
+ }
+ public Builder SetField7(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasField7 = true;
+ result.field7_ = value;
+ return this;
+ }
+ public Builder ClearField7() {
+ PrepareBuilder();
+ result.hasField7 = false;
+ result.field7_ = "";
+ return this;
+ }
+
+ public bool HasField16 {
+ get { return result.hasField16; }
+ }
+ public int Field16 {
+ get { return result.Field16; }
+ set { SetField16(value); }
+ }
+ public Builder SetField16(int value) {
+ PrepareBuilder();
+ result.hasField16 = true;
+ result.field16_ = value;
+ return this;
+ }
+ public Builder ClearField16() {
+ PrepareBuilder();
+ result.hasField16 = false;
+ result.field16_ = 0;
+ return this;
+ }
+
+ public bool HasField130 {
+ get { return result.hasField130; }
+ }
+ public int Field130 {
+ get { return result.Field130; }
+ set { SetField130(value); }
+ }
+ public Builder SetField130(int value) {
+ PrepareBuilder();
+ result.hasField130 = true;
+ result.field130_ = value;
+ return this;
+ }
+ public Builder ClearField130() {
+ PrepareBuilder();
+ result.hasField130 = false;
+ result.field130_ = 0;
+ return this;
+ }
+
+ public bool HasField12 {
+ get { return result.hasField12; }
+ }
+ public bool Field12 {
+ get { return result.Field12; }
+ set { SetField12(value); }
+ }
+ public Builder SetField12(bool value) {
+ PrepareBuilder();
+ result.hasField12 = true;
+ result.field12_ = value;
+ return this;
+ }
+ public Builder ClearField12() {
+ PrepareBuilder();
+ result.hasField12 = false;
+ result.field12_ = true;
+ return this;
+ }
+
+ public bool HasField17 {
+ get { return result.hasField17; }
+ }
+ public bool Field17 {
+ get { return result.Field17; }
+ set { SetField17(value); }
+ }
+ public Builder SetField17(bool value) {
+ PrepareBuilder();
+ result.hasField17 = true;
+ result.field17_ = value;
+ return this;
+ }
+ public Builder ClearField17() {
+ PrepareBuilder();
+ result.hasField17 = false;
+ result.field17_ = true;
+ return this;
+ }
+
+ public bool HasField13 {
+ get { return result.hasField13; }
+ }
+ public bool Field13 {
+ get { return result.Field13; }
+ set { SetField13(value); }
+ }
+ public Builder SetField13(bool value) {
+ PrepareBuilder();
+ result.hasField13 = true;
+ result.field13_ = value;
+ return this;
+ }
+ public Builder ClearField13() {
+ PrepareBuilder();
+ result.hasField13 = false;
+ result.field13_ = true;
+ return this;
+ }
+
+ public bool HasField14 {
+ get { return result.hasField14; }
+ }
+ public bool Field14 {
+ get { return result.Field14; }
+ set { SetField14(value); }
+ }
+ public Builder SetField14(bool value) {
+ PrepareBuilder();
+ result.hasField14 = true;
+ result.field14_ = value;
+ return this;
+ }
+ public Builder ClearField14() {
+ PrepareBuilder();
+ result.hasField14 = false;
+ result.field14_ = true;
+ return this;
+ }
+
+ public bool HasField104 {
+ get { return result.hasField104; }
+ }
+ public int Field104 {
+ get { return result.Field104; }
+ set { SetField104(value); }
+ }
+ public Builder SetField104(int value) {
+ PrepareBuilder();
+ result.hasField104 = true;
+ result.field104_ = value;
+ return this;
+ }
+ public Builder ClearField104() {
+ PrepareBuilder();
+ result.hasField104 = false;
+ result.field104_ = 0;
+ return this;
+ }
+
+ public bool HasField100 {
+ get { return result.hasField100; }
+ }
+ public int Field100 {
+ get { return result.Field100; }
+ set { SetField100(value); }
+ }
+ public Builder SetField100(int value) {
+ PrepareBuilder();
+ result.hasField100 = true;
+ result.field100_ = value;
+ return this;
+ }
+ public Builder ClearField100() {
+ PrepareBuilder();
+ result.hasField100 = false;
+ result.field100_ = 0;
+ return this;
+ }
+
+ public bool HasField101 {
+ get { return result.hasField101; }
+ }
+ public int Field101 {
+ get { return result.Field101; }
+ set { SetField101(value); }
+ }
+ public Builder SetField101(int value) {
+ PrepareBuilder();
+ result.hasField101 = true;
+ result.field101_ = value;
+ return this;
+ }
+ public Builder ClearField101() {
+ PrepareBuilder();
+ result.hasField101 = false;
+ result.field101_ = 0;
+ return this;
+ }
+
+ public bool HasField102 {
+ get { return result.hasField102; }
+ }
+ public string Field102 {
+ get { return result.Field102; }
+ set { SetField102(value); }
+ }
+ public Builder SetField102(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasField102 = true;
+ result.field102_ = value;
+ return this;
+ }
+ public Builder ClearField102() {
+ PrepareBuilder();
+ result.hasField102 = false;
+ result.field102_ = "";
+ return this;
+ }
+
+ public bool HasField103 {
+ get { return result.hasField103; }
+ }
+ public string Field103 {
+ get { return result.Field103; }
+ set { SetField103(value); }
+ }
+ public Builder SetField103(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasField103 = true;
+ result.field103_ = value;
+ return this;
+ }
+ public Builder ClearField103() {
+ PrepareBuilder();
+ result.hasField103 = false;
+ result.field103_ = "";
+ return this;
+ }
+
+ public bool HasField29 {
+ get { return result.hasField29; }
+ }
+ public int Field29 {
+ get { return result.Field29; }
+ set { SetField29(value); }
+ }
+ public Builder SetField29(int value) {
+ PrepareBuilder();
+ result.hasField29 = true;
+ result.field29_ = value;
+ return this;
+ }
+ public Builder ClearField29() {
+ PrepareBuilder();
+ result.hasField29 = false;
+ result.field29_ = 0;
+ return this;
+ }
+
+ public bool HasField30 {
+ get { return result.hasField30; }
+ }
+ public bool Field30 {
+ get { return result.Field30; }
+ set { SetField30(value); }
+ }
+ public Builder SetField30(bool value) {
+ PrepareBuilder();
+ result.hasField30 = true;
+ result.field30_ = value;
+ return this;
+ }
+ public Builder ClearField30() {
+ PrepareBuilder();
+ result.hasField30 = false;
+ result.field30_ = false;
+ return this;
+ }
+
+ public bool HasField60 {
+ get { return result.hasField60; }
+ }
+ public int Field60 {
+ get { return result.Field60; }
+ set { SetField60(value); }
+ }
+ public Builder SetField60(int value) {
+ PrepareBuilder();
+ result.hasField60 = true;
+ result.field60_ = value;
+ return this;
+ }
+ public Builder ClearField60() {
+ PrepareBuilder();
+ result.hasField60 = false;
+ result.field60_ = -1;
+ return this;
+ }
+
+ public bool HasField271 {
+ get { return result.hasField271; }
+ }
+ public int Field271 {
+ get { return result.Field271; }
+ set { SetField271(value); }
+ }
+ public Builder SetField271(int value) {
+ PrepareBuilder();
+ result.hasField271 = true;
+ result.field271_ = value;
+ return this;
+ }
+ public Builder ClearField271() {
+ PrepareBuilder();
+ result.hasField271 = false;
+ result.field271_ = -1;
+ return this;
+ }
+
+ public bool HasField272 {
+ get { return result.hasField272; }
+ }
+ public int Field272 {
+ get { return result.Field272; }
+ set { SetField272(value); }
+ }
+ public Builder SetField272(int value) {
+ PrepareBuilder();
+ result.hasField272 = true;
+ result.field272_ = value;
+ return this;
+ }
+ public Builder ClearField272() {
+ PrepareBuilder();
+ result.hasField272 = false;
+ result.field272_ = -1;
+ return this;
+ }
+
+ public bool HasField150 {
+ get { return result.hasField150; }
+ }
+ public int Field150 {
+ get { return result.Field150; }
+ set { SetField150(value); }
+ }
+ public Builder SetField150(int value) {
+ PrepareBuilder();
+ result.hasField150 = true;
+ result.field150_ = value;
+ return this;
+ }
+ public Builder ClearField150() {
+ PrepareBuilder();
+ result.hasField150 = false;
+ result.field150_ = 0;
+ return this;
+ }
+
+ public bool HasField23 {
+ get { return result.hasField23; }
+ }
+ public int Field23 {
+ get { return result.Field23; }
+ set { SetField23(value); }
+ }
+ public Builder SetField23(int value) {
+ PrepareBuilder();
+ result.hasField23 = true;
+ result.field23_ = value;
+ return this;
+ }
+ public Builder ClearField23() {
+ PrepareBuilder();
+ result.hasField23 = false;
+ result.field23_ = 0;
+ return this;
+ }
+
+ public bool HasField24 {
+ get { return result.hasField24; }
+ }
+ public bool Field24 {
+ get { return result.Field24; }
+ set { SetField24(value); }
+ }
+ public Builder SetField24(bool value) {
+ PrepareBuilder();
+ result.hasField24 = true;
+ result.field24_ = value;
+ return this;
+ }
+ public Builder ClearField24() {
+ PrepareBuilder();
+ result.hasField24 = false;
+ result.field24_ = false;
+ return this;
+ }
+
+ public bool HasField25 {
+ get { return result.hasField25; }
+ }
+ public int Field25 {
+ get { return result.Field25; }
+ set { SetField25(value); }
+ }
+ public Builder SetField25(int value) {
+ PrepareBuilder();
+ result.hasField25 = true;
+ result.field25_ = value;
+ return this;
+ }
+ public Builder ClearField25() {
+ PrepareBuilder();
+ result.hasField25 = false;
+ result.field25_ = 0;
+ return this;
+ }
+
+ public bool HasField15 {
+ get { return result.hasField15; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.SizeMessage1SubMessage Field15 {
+ get { return result.Field15; }
+ set { SetField15(value); }
+ }
+ public Builder SetField15(global::Google.ProtocolBuffers.TestProtos.SizeMessage1SubMessage value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasField15 = true;
+ result.field15_ = value;
+ return this;
+ }
+ public Builder SetField15(global::Google.ProtocolBuffers.TestProtos.SizeMessage1SubMessage.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.hasField15 = true;
+ result.field15_ = builderForValue.Build();
+ return this;
+ }
+ public Builder MergeField15(global::Google.ProtocolBuffers.TestProtos.SizeMessage1SubMessage value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ if (result.hasField15 &&
+ result.field15_ != global::Google.ProtocolBuffers.TestProtos.SizeMessage1SubMessage.DefaultInstance) {
+ result.field15_ = global::Google.ProtocolBuffers.TestProtos.SizeMessage1SubMessage.CreateBuilder(result.field15_).MergeFrom(value).BuildPartial();
+ } else {
+ result.field15_ = value;
+ }
+ result.hasField15 = true;
+ return this;
+ }
+ public Builder ClearField15() {
+ PrepareBuilder();
+ result.hasField15 = false;
+ result.field15_ = null;
+ return this;
+ }
+
+ public bool HasField78 {
+ get { return result.hasField78; }
+ }
+ public bool Field78 {
+ get { return result.Field78; }
+ set { SetField78(value); }
+ }
+ public Builder SetField78(bool value) {
+ PrepareBuilder();
+ result.hasField78 = true;
+ result.field78_ = value;
+ return this;
+ }
+ public Builder ClearField78() {
+ PrepareBuilder();
+ result.hasField78 = false;
+ result.field78_ = false;
+ return this;
+ }
+
+ public bool HasField67 {
+ get { return result.hasField67; }
+ }
+ public int Field67 {
+ get { return result.Field67; }
+ set { SetField67(value); }
+ }
+ public Builder SetField67(int value) {
+ PrepareBuilder();
+ result.hasField67 = true;
+ result.field67_ = value;
+ return this;
+ }
+ public Builder ClearField67() {
+ PrepareBuilder();
+ result.hasField67 = false;
+ result.field67_ = 0;
+ return this;
+ }
+
+ public bool HasField68 {
+ get { return result.hasField68; }
+ }
+ public int Field68 {
+ get { return result.Field68; }
+ set { SetField68(value); }
+ }
+ public Builder SetField68(int value) {
+ PrepareBuilder();
+ result.hasField68 = true;
+ result.field68_ = value;
+ return this;
+ }
+ public Builder ClearField68() {
+ PrepareBuilder();
+ result.hasField68 = false;
+ result.field68_ = 0;
+ return this;
+ }
+
+ public bool HasField128 {
+ get { return result.hasField128; }
+ }
+ public int Field128 {
+ get { return result.Field128; }
+ set { SetField128(value); }
+ }
+ public Builder SetField128(int value) {
+ PrepareBuilder();
+ result.hasField128 = true;
+ result.field128_ = value;
+ return this;
+ }
+ public Builder ClearField128() {
+ PrepareBuilder();
+ result.hasField128 = false;
+ result.field128_ = 0;
+ return this;
+ }
+
+ public bool HasField129 {
+ get { return result.hasField129; }
+ }
+ public string Field129 {
+ get { return result.Field129; }
+ set { SetField129(value); }
+ }
+ public Builder SetField129(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasField129 = true;
+ result.field129_ = value;
+ return this;
+ }
+ public Builder ClearField129() {
+ PrepareBuilder();
+ result.hasField129 = false;
+ result.field129_ = "xxxxxxxxxxxxxxxxxxxxx";
+ return this;
+ }
+
+ public bool HasField131 {
+ get { return result.hasField131; }
+ }
+ public int Field131 {
+ get { return result.Field131; }
+ set { SetField131(value); }
+ }
+ public Builder SetField131(int value) {
+ PrepareBuilder();
+ result.hasField131 = true;
+ result.field131_ = value;
+ return this;
+ }
+ public Builder ClearField131() {
+ PrepareBuilder();
+ result.hasField131 = false;
+ result.field131_ = 0;
+ return this;
+ }
+ }
+ static SizeMessage1() {
+ object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.GoogleSize.Descriptor, null);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class SizeMessage1SubMessage : pb::GeneratedMessage<SizeMessage1SubMessage, SizeMessage1SubMessage.Builder> {
+ private SizeMessage1SubMessage() { }
+ private static readonly SizeMessage1SubMessage defaultInstance = new SizeMessage1SubMessage().MakeReadOnly();
+ public static SizeMessage1SubMessage DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override SizeMessage1SubMessage DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override SizeMessage1SubMessage ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::Google.ProtocolBuffers.TestProtos.GoogleSize.internal__static_benchmarks_SizeMessage1SubMessage__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<SizeMessage1SubMessage, SizeMessage1SubMessage.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.GoogleSize.internal__static_benchmarks_SizeMessage1SubMessage__FieldAccessorTable; }
+ }
+
+ public const int Field1FieldNumber = 1;
+ private bool hasField1;
+ private int field1_;
+ public bool HasField1 {
+ get { return hasField1; }
+ }
+ public int Field1 {
+ get { return field1_; }
+ }
+
+ public const int Field2FieldNumber = 2;
+ private bool hasField2;
+ private int field2_;
+ public bool HasField2 {
+ get { return hasField2; }
+ }
+ public int Field2 {
+ get { return field2_; }
+ }
+
+ public const int Field3FieldNumber = 3;
+ private bool hasField3;
+ private int field3_;
+ public bool HasField3 {
+ get { return hasField3; }
+ }
+ public int Field3 {
+ get { return field3_; }
+ }
+
+ public const int Field15FieldNumber = 15;
+ private bool hasField15;
+ private string field15_ = "";
+ public bool HasField15 {
+ get { return hasField15; }
+ }
+ public string Field15 {
+ get { return field15_; }
+ }
+
+ public const int Field12FieldNumber = 12;
+ private bool hasField12;
+ private bool field12_ = true;
+ public bool HasField12 {
+ get { return hasField12; }
+ }
+ public bool Field12 {
+ get { return field12_; }
+ }
+
+ public const int Field13FieldNumber = 13;
+ private bool hasField13;
+ private long field13_;
+ public bool HasField13 {
+ get { return hasField13; }
+ }
+ public long Field13 {
+ get { return field13_; }
+ }
+
+ public const int Field14FieldNumber = 14;
+ private bool hasField14;
+ private long field14_;
+ public bool HasField14 {
+ get { return hasField14; }
+ }
+ public long Field14 {
+ get { return field14_; }
+ }
+
+ public const int Field16FieldNumber = 16;
+ private bool hasField16;
+ private int field16_;
+ public bool HasField16 {
+ get { return hasField16; }
+ }
+ public int Field16 {
+ get { return field16_; }
+ }
+
+ public const int Field19FieldNumber = 19;
+ private bool hasField19;
+ private int field19_ = 2;
+ public bool HasField19 {
+ get { return hasField19; }
+ }
+ public int Field19 {
+ get { return field19_; }
+ }
+
+ public const int Field20FieldNumber = 20;
+ private bool hasField20;
+ private bool field20_ = true;
+ public bool HasField20 {
+ get { return hasField20; }
+ }
+ public bool Field20 {
+ get { return field20_; }
+ }
+
+ public const int Field28FieldNumber = 28;
+ private bool hasField28;
+ private bool field28_ = true;
+ public bool HasField28 {
+ get { return hasField28; }
+ }
+ public bool Field28 {
+ get { return field28_; }
+ }
+
+ public const int Field21FieldNumber = 21;
+ private bool hasField21;
+ private ulong field21_;
+ public bool HasField21 {
+ get { return hasField21; }
+ }
+ [global::System.CLSCompliant(false)]
+ public ulong Field21 {
+ get { return field21_; }
+ }
+
+ public const int Field22FieldNumber = 22;
+ private bool hasField22;
+ private int field22_;
+ public bool HasField22 {
+ get { return hasField22; }
+ }
+ public int Field22 {
+ get { return field22_; }
+ }
+
+ public const int Field23FieldNumber = 23;
+ private bool hasField23;
+ private bool field23_;
+ public bool HasField23 {
+ get { return hasField23; }
+ }
+ public bool Field23 {
+ get { return field23_; }
+ }
+
+ public const int Field206FieldNumber = 206;
+ private bool hasField206;
+ private bool field206_;
+ public bool HasField206 {
+ get { return hasField206; }
+ }
+ public bool Field206 {
+ get { return field206_; }
+ }
+
+ public const int Field203FieldNumber = 203;
+ private bool hasField203;
+ private uint field203_;
+ public bool HasField203 {
+ get { return hasField203; }
+ }
+ [global::System.CLSCompliant(false)]
+ public uint Field203 {
+ get { return field203_; }
+ }
+
+ public const int Field204FieldNumber = 204;
+ private bool hasField204;
+ private int field204_;
+ public bool HasField204 {
+ get { return hasField204; }
+ }
+ public int Field204 {
+ get { return field204_; }
+ }
+
+ public const int Field205FieldNumber = 205;
+ private bool hasField205;
+ private string field205_ = "";
+ public bool HasField205 {
+ get { return hasField205; }
+ }
+ public string Field205 {
+ get { return field205_; }
+ }
+
+ public const int Field207FieldNumber = 207;
+ private bool hasField207;
+ private ulong field207_;
+ public bool HasField207 {
+ get { return hasField207; }
+ }
+ [global::System.CLSCompliant(false)]
+ public ulong Field207 {
+ get { return field207_; }
+ }
+
+ public const int Field300FieldNumber = 300;
+ private bool hasField300;
+ private ulong field300_;
+ public bool HasField300 {
+ get { return hasField300; }
+ }
+ [global::System.CLSCompliant(false)]
+ public ulong Field300 {
+ get { return field300_; }
+ }
+
+ public static SizeMessage1SubMessage ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static SizeMessage1SubMessage ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static SizeMessage1SubMessage ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static SizeMessage1SubMessage ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static SizeMessage1SubMessage ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static SizeMessage1SubMessage ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static SizeMessage1SubMessage ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static SizeMessage1SubMessage ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static SizeMessage1SubMessage ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static SizeMessage1SubMessage ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private SizeMessage1SubMessage 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(SizeMessage1SubMessage prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Builder : pb::GeneratedBuilder<SizeMessage1SubMessage, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(SizeMessage1SubMessage cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private SizeMessage1SubMessage result;
+
+ private SizeMessage1SubMessage PrepareBuilder() {
+ if (resultIsReadOnly) {
+ SizeMessage1SubMessage original = result;
+ result = new SizeMessage1SubMessage();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override SizeMessage1SubMessage 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.SizeMessage1SubMessage.Descriptor; }
+ }
+
+ public override SizeMessage1SubMessage DefaultInstanceForType {
+ get { return global::Google.ProtocolBuffers.TestProtos.SizeMessage1SubMessage.DefaultInstance; }
+ }
+
+ public override SizeMessage1SubMessage BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+
+ public bool HasField1 {
+ get { return result.hasField1; }
+ }
+ public int Field1 {
+ get { return result.Field1; }
+ set { SetField1(value); }
+ }
+ public Builder SetField1(int value) {
+ PrepareBuilder();
+ result.hasField1 = true;
+ result.field1_ = value;
+ return this;
+ }
+ public Builder ClearField1() {
+ PrepareBuilder();
+ result.hasField1 = false;
+ result.field1_ = 0;
+ return this;
+ }
+
+ public bool HasField2 {
+ get { return result.hasField2; }
+ }
+ public int Field2 {
+ get { return result.Field2; }
+ set { SetField2(value); }
+ }
+ public Builder SetField2(int value) {
+ PrepareBuilder();
+ result.hasField2 = true;
+ result.field2_ = value;
+ return this;
+ }
+ public Builder ClearField2() {
+ PrepareBuilder();
+ result.hasField2 = false;
+ result.field2_ = 0;
+ return this;
+ }
+
+ public bool HasField3 {
+ get { return result.hasField3; }
+ }
+ public int Field3 {
+ get { return result.Field3; }
+ set { SetField3(value); }
+ }
+ public Builder SetField3(int value) {
+ PrepareBuilder();
+ result.hasField3 = true;
+ result.field3_ = value;
+ return this;
+ }
+ public Builder ClearField3() {
+ PrepareBuilder();
+ result.hasField3 = false;
+ result.field3_ = 0;
+ return this;
+ }
+
+ public bool HasField15 {
+ get { return result.hasField15; }
+ }
+ public string Field15 {
+ get { return result.Field15; }
+ set { SetField15(value); }
+ }
+ public Builder SetField15(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasField15 = true;
+ result.field15_ = value;
+ return this;
+ }
+ public Builder ClearField15() {
+ PrepareBuilder();
+ result.hasField15 = false;
+ result.field15_ = "";
+ return this;
+ }
+
+ public bool HasField12 {
+ get { return result.hasField12; }
+ }
+ public bool Field12 {
+ get { return result.Field12; }
+ set { SetField12(value); }
+ }
+ public Builder SetField12(bool value) {
+ PrepareBuilder();
+ result.hasField12 = true;
+ result.field12_ = value;
+ return this;
+ }
+ public Builder ClearField12() {
+ PrepareBuilder();
+ result.hasField12 = false;
+ result.field12_ = true;
+ return this;
+ }
+
+ public bool HasField13 {
+ get { return result.hasField13; }
+ }
+ public long Field13 {
+ get { return result.Field13; }
+ set { SetField13(value); }
+ }
+ public Builder SetField13(long value) {
+ PrepareBuilder();
+ result.hasField13 = true;
+ result.field13_ = value;
+ return this;
+ }
+ public Builder ClearField13() {
+ PrepareBuilder();
+ result.hasField13 = false;
+ result.field13_ = 0L;
+ return this;
+ }
+
+ public bool HasField14 {
+ get { return result.hasField14; }
+ }
+ public long Field14 {
+ get { return result.Field14; }
+ set { SetField14(value); }
+ }
+ public Builder SetField14(long value) {
+ PrepareBuilder();
+ result.hasField14 = true;
+ result.field14_ = value;
+ return this;
+ }
+ public Builder ClearField14() {
+ PrepareBuilder();
+ result.hasField14 = false;
+ result.field14_ = 0L;
+ return this;
+ }
+
+ public bool HasField16 {
+ get { return result.hasField16; }
+ }
+ public int Field16 {
+ get { return result.Field16; }
+ set { SetField16(value); }
+ }
+ public Builder SetField16(int value) {
+ PrepareBuilder();
+ result.hasField16 = true;
+ result.field16_ = value;
+ return this;
+ }
+ public Builder ClearField16() {
+ PrepareBuilder();
+ result.hasField16 = false;
+ result.field16_ = 0;
+ return this;
+ }
+
+ public bool HasField19 {
+ get { return result.hasField19; }
+ }
+ public int Field19 {
+ get { return result.Field19; }
+ set { SetField19(value); }
+ }
+ public Builder SetField19(int value) {
+ PrepareBuilder();
+ result.hasField19 = true;
+ result.field19_ = value;
+ return this;
+ }
+ public Builder ClearField19() {
+ PrepareBuilder();
+ result.hasField19 = false;
+ result.field19_ = 2;
+ return this;
+ }
+
+ public bool HasField20 {
+ get { return result.hasField20; }
+ }
+ public bool Field20 {
+ get { return result.Field20; }
+ set { SetField20(value); }
+ }
+ public Builder SetField20(bool value) {
+ PrepareBuilder();
+ result.hasField20 = true;
+ result.field20_ = value;
+ return this;
+ }
+ public Builder ClearField20() {
+ PrepareBuilder();
+ result.hasField20 = false;
+ result.field20_ = true;
+ return this;
+ }
+
+ public bool HasField28 {
+ get { return result.hasField28; }
+ }
+ public bool Field28 {
+ get { return result.Field28; }
+ set { SetField28(value); }
+ }
+ public Builder SetField28(bool value) {
+ PrepareBuilder();
+ result.hasField28 = true;
+ result.field28_ = value;
+ return this;
+ }
+ public Builder ClearField28() {
+ PrepareBuilder();
+ result.hasField28 = false;
+ result.field28_ = true;
+ return this;
+ }
+
+ public bool HasField21 {
+ get { return result.hasField21; }
+ }
+ [global::System.CLSCompliant(false)]
+ public ulong Field21 {
+ get { return result.Field21; }
+ set { SetField21(value); }
+ }
+ [global::System.CLSCompliant(false)]
+ public Builder SetField21(ulong value) {
+ PrepareBuilder();
+ result.hasField21 = true;
+ result.field21_ = value;
+ return this;
+ }
+ public Builder ClearField21() {
+ PrepareBuilder();
+ result.hasField21 = false;
+ result.field21_ = 0UL;
+ return this;
+ }
+
+ public bool HasField22 {
+ get { return result.hasField22; }
+ }
+ public int Field22 {
+ get { return result.Field22; }
+ set { SetField22(value); }
+ }
+ public Builder SetField22(int value) {
+ PrepareBuilder();
+ result.hasField22 = true;
+ result.field22_ = value;
+ return this;
+ }
+ public Builder ClearField22() {
+ PrepareBuilder();
+ result.hasField22 = false;
+ result.field22_ = 0;
+ return this;
+ }
+
+ public bool HasField23 {
+ get { return result.hasField23; }
+ }
+ public bool Field23 {
+ get { return result.Field23; }
+ set { SetField23(value); }
+ }
+ public Builder SetField23(bool value) {
+ PrepareBuilder();
+ result.hasField23 = true;
+ result.field23_ = value;
+ return this;
+ }
+ public Builder ClearField23() {
+ PrepareBuilder();
+ result.hasField23 = false;
+ result.field23_ = false;
+ return this;
+ }
+
+ public bool HasField206 {
+ get { return result.hasField206; }
+ }
+ public bool Field206 {
+ get { return result.Field206; }
+ set { SetField206(value); }
+ }
+ public Builder SetField206(bool value) {
+ PrepareBuilder();
+ result.hasField206 = true;
+ result.field206_ = value;
+ return this;
+ }
+ public Builder ClearField206() {
+ PrepareBuilder();
+ result.hasField206 = false;
+ result.field206_ = false;
+ return this;
+ }
+
+ public bool HasField203 {
+ get { return result.hasField203; }
+ }
+ [global::System.CLSCompliant(false)]
+ public uint Field203 {
+ get { return result.Field203; }
+ set { SetField203(value); }
+ }
+ [global::System.CLSCompliant(false)]
+ public Builder SetField203(uint value) {
+ PrepareBuilder();
+ result.hasField203 = true;
+ result.field203_ = value;
+ return this;
+ }
+ public Builder ClearField203() {
+ PrepareBuilder();
+ result.hasField203 = false;
+ result.field203_ = 0;
+ return this;
+ }
+
+ public bool HasField204 {
+ get { return result.hasField204; }
+ }
+ public int Field204 {
+ get { return result.Field204; }
+ set { SetField204(value); }
+ }
+ public Builder SetField204(int value) {
+ PrepareBuilder();
+ result.hasField204 = true;
+ result.field204_ = value;
+ return this;
+ }
+ public Builder ClearField204() {
+ PrepareBuilder();
+ result.hasField204 = false;
+ result.field204_ = 0;
+ return this;
+ }
+
+ public bool HasField205 {
+ get { return result.hasField205; }
+ }
+ public string Field205 {
+ get { return result.Field205; }
+ set { SetField205(value); }
+ }
+ public Builder SetField205(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasField205 = true;
+ result.field205_ = value;
+ return this;
+ }
+ public Builder ClearField205() {
+ PrepareBuilder();
+ result.hasField205 = false;
+ result.field205_ = "";
+ return this;
+ }
+
+ public bool HasField207 {
+ get { return result.hasField207; }
+ }
+ [global::System.CLSCompliant(false)]
+ public ulong Field207 {
+ get { return result.Field207; }
+ set { SetField207(value); }
+ }
+ [global::System.CLSCompliant(false)]
+ public Builder SetField207(ulong value) {
+ PrepareBuilder();
+ result.hasField207 = true;
+ result.field207_ = value;
+ return this;
+ }
+ public Builder ClearField207() {
+ PrepareBuilder();
+ result.hasField207 = false;
+ result.field207_ = 0UL;
+ return this;
+ }
+
+ public bool HasField300 {
+ get { return result.hasField300; }
+ }
+ [global::System.CLSCompliant(false)]
+ public ulong Field300 {
+ get { return result.Field300; }
+ set { SetField300(value); }
+ }
+ [global::System.CLSCompliant(false)]
+ public Builder SetField300(ulong value) {
+ PrepareBuilder();
+ result.hasField300 = true;
+ result.field300_ = value;
+ return this;
+ }
+ public Builder ClearField300() {
+ PrepareBuilder();
+ result.hasField300 = false;
+ result.field300_ = 0UL;
+ return this;
+ }
+ }
+ static SizeMessage1SubMessage() {
+ object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.GoogleSize.Descriptor, null);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class SizeMessage2 : pb::GeneratedMessage<SizeMessage2, SizeMessage2.Builder> {
+ private SizeMessage2() { }
+ private static readonly SizeMessage2 defaultInstance = new SizeMessage2().MakeReadOnly();
+ public static SizeMessage2 DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override SizeMessage2 DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override SizeMessage2 ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::Google.ProtocolBuffers.TestProtos.GoogleSize.internal__static_benchmarks_SizeMessage2__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<SizeMessage2, SizeMessage2.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.GoogleSize.internal__static_benchmarks_SizeMessage2__FieldAccessorTable; }
+ }
+
+ #region Nested types
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public static partial class Types {
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Group1 : pb::GeneratedMessage<Group1, Group1.Builder> {
+ private Group1() { }
+ private static readonly Group1 defaultInstance = new Group1().MakeReadOnly();
+ public static Group1 DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override Group1 DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override Group1 ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::Google.ProtocolBuffers.TestProtos.GoogleSize.internal__static_benchmarks_SizeMessage2_Group1__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<Group1, Group1.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.GoogleSize.internal__static_benchmarks_SizeMessage2_Group1__FieldAccessorTable; }
+ }
+
+ public const int Field11FieldNumber = 11;
+ private bool hasField11;
+ private float field11_;
+ public bool HasField11 {
+ get { return hasField11; }
+ }
+ public float Field11 {
+ get { return field11_; }
+ }
+
+ public const int Field26FieldNumber = 26;
+ private bool hasField26;
+ private float field26_;
+ public bool HasField26 {
+ get { return hasField26; }
+ }
+ public float Field26 {
+ get { return field26_; }
+ }
+
+ public const int Field12FieldNumber = 12;
+ private bool hasField12;
+ private string field12_ = "";
+ public bool HasField12 {
+ get { return hasField12; }
+ }
+ public string Field12 {
+ get { return field12_; }
+ }
+
+ public const int Field13FieldNumber = 13;
+ private bool hasField13;
+ private string field13_ = "";
+ public bool HasField13 {
+ get { return hasField13; }
+ }
+ public string Field13 {
+ get { return field13_; }
+ }
+
+ public const int Field14FieldNumber = 14;
+ private pbc::PopsicleList<string> field14_ = new pbc::PopsicleList<string>();
+ public scg::IList<string> Field14List {
+ get { return pbc::Lists.AsReadOnly(field14_); }
+ }
+ public int Field14Count {
+ get { return field14_.Count; }
+ }
+ public string GetField14(int index) {
+ return field14_[index];
+ }
+
+ public const int Field15FieldNumber = 15;
+ private bool hasField15;
+ private ulong field15_;
+ public bool HasField15 {
+ get { return hasField15; }
+ }
+ [global::System.CLSCompliant(false)]
+ public ulong Field15 {
+ get { return field15_; }
+ }
+
+ public const int Field5FieldNumber = 5;
+ private bool hasField5;
+ private int field5_;
+ public bool HasField5 {
+ get { return hasField5; }
+ }
+ public int Field5 {
+ get { return field5_; }
+ }
+
+ public const int Field27FieldNumber = 27;
+ private bool hasField27;
+ private string field27_ = "";
+ public bool HasField27 {
+ get { return hasField27; }
+ }
+ public string Field27 {
+ get { return field27_; }
+ }
+
+ public const int Field28FieldNumber = 28;
+ private bool hasField28;
+ private int field28_;
+ public bool HasField28 {
+ get { return hasField28; }
+ }
+ public int Field28 {
+ get { return field28_; }
+ }
+
+ public const int Field29FieldNumber = 29;
+ private bool hasField29;
+ private string field29_ = "";
+ public bool HasField29 {
+ get { return hasField29; }
+ }
+ public string Field29 {
+ get { return field29_; }
+ }
+
+ public const int Field16FieldNumber = 16;
+ private bool hasField16;
+ private string field16_ = "";
+ public bool HasField16 {
+ get { return hasField16; }
+ }
+ public string Field16 {
+ get { return field16_; }
+ }
+
+ public const int Field22FieldNumber = 22;
+ private pbc::PopsicleList<string> field22_ = new pbc::PopsicleList<string>();
+ public scg::IList<string> Field22List {
+ get { return pbc::Lists.AsReadOnly(field22_); }
+ }
+ public int Field22Count {
+ get { return field22_.Count; }
+ }
+ public string GetField22(int index) {
+ return field22_[index];
+ }
+
+ public const int Field73FieldNumber = 73;
+ private pbc::PopsicleList<int> field73_ = new pbc::PopsicleList<int>();
+ public scg::IList<int> Field73List {
+ get { return pbc::Lists.AsReadOnly(field73_); }
+ }
+ public int Field73Count {
+ get { return field73_.Count; }
+ }
+ public int GetField73(int index) {
+ return field73_[index];
+ }
+
+ public const int Field20FieldNumber = 20;
+ private bool hasField20;
+ private int field20_;
+ public bool HasField20 {
+ get { return hasField20; }
+ }
+ public int Field20 {
+ get { return field20_; }
+ }
+
+ public const int Field24FieldNumber = 24;
+ private bool hasField24;
+ private string field24_ = "";
+ public bool HasField24 {
+ get { return hasField24; }
+ }
+ public string Field24 {
+ get { return field24_; }
+ }
+
+ public const int Field31FieldNumber = 31;
+ private bool hasField31;
+ private global::Google.ProtocolBuffers.TestProtos.SizeMessage2GroupedMessage field31_;
+ public bool HasField31 {
+ get { return hasField31; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.SizeMessage2GroupedMessage Field31 {
+ get { return field31_ ?? global::Google.ProtocolBuffers.TestProtos.SizeMessage2GroupedMessage.DefaultInstance; }
+ }
+
+ public static Group1 ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static Group1 ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static Group1 ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static Group1 ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static Group1 ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static Group1 ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static Group1 ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static Group1 ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static Group1 ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static Group1 ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private Group1 MakeReadOnly() {
+ field14_.MakeReadOnly();
+ field22_.MakeReadOnly();
+ field73_.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(Group1 prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Builder : pb::GeneratedBuilder<Group1, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(Group1 cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private Group1 result;
+
+ private Group1 PrepareBuilder() {
+ if (resultIsReadOnly) {
+ Group1 original = result;
+ result = new Group1();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override Group1 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.SizeMessage2.Types.Group1.Descriptor; }
+ }
+
+ public override Group1 DefaultInstanceForType {
+ get { return global::Google.ProtocolBuffers.TestProtos.SizeMessage2.Types.Group1.DefaultInstance; }
+ }
+
+ public override Group1 BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+
+ public bool HasField11 {
+ get { return result.hasField11; }
+ }
+ public float Field11 {
+ get { return result.Field11; }
+ set { SetField11(value); }
+ }
+ public Builder SetField11(float value) {
+ PrepareBuilder();
+ result.hasField11 = true;
+ result.field11_ = value;
+ return this;
+ }
+ public Builder ClearField11() {
+ PrepareBuilder();
+ result.hasField11 = false;
+ result.field11_ = 0F;
+ return this;
+ }
+
+ public bool HasField26 {
+ get { return result.hasField26; }
+ }
+ public float Field26 {
+ get { return result.Field26; }
+ set { SetField26(value); }
+ }
+ public Builder SetField26(float value) {
+ PrepareBuilder();
+ result.hasField26 = true;
+ result.field26_ = value;
+ return this;
+ }
+ public Builder ClearField26() {
+ PrepareBuilder();
+ result.hasField26 = false;
+ result.field26_ = 0F;
+ return this;
+ }
+
+ public bool HasField12 {
+ get { return result.hasField12; }
+ }
+ public string Field12 {
+ get { return result.Field12; }
+ set { SetField12(value); }
+ }
+ public Builder SetField12(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasField12 = true;
+ result.field12_ = value;
+ return this;
+ }
+ public Builder ClearField12() {
+ PrepareBuilder();
+ result.hasField12 = false;
+ result.field12_ = "";
+ return this;
+ }
+
+ public bool HasField13 {
+ get { return result.hasField13; }
+ }
+ public string Field13 {
+ get { return result.Field13; }
+ set { SetField13(value); }
+ }
+ public Builder SetField13(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasField13 = true;
+ result.field13_ = value;
+ return this;
+ }
+ public Builder ClearField13() {
+ PrepareBuilder();
+ result.hasField13 = false;
+ result.field13_ = "";
+ return this;
+ }
+
+ public pbc::IPopsicleList<string> Field14List {
+ get { return PrepareBuilder().field14_; }
+ }
+ public int Field14Count {
+ get { return result.Field14Count; }
+ }
+ public string GetField14(int index) {
+ return result.GetField14(index);
+ }
+ public Builder SetField14(int index, string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.field14_[index] = value;
+ return this;
+ }
+ public Builder AddField14(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.field14_.Add(value);
+ return this;
+ }
+ public Builder AddRangeField14(scg::IEnumerable<string> values) {
+ PrepareBuilder();
+ result.field14_.Add(values);
+ return this;
+ }
+ public Builder ClearField14() {
+ PrepareBuilder();
+ result.field14_.Clear();
+ return this;
+ }
+
+ public bool HasField15 {
+ get { return result.hasField15; }
+ }
+ [global::System.CLSCompliant(false)]
+ public ulong Field15 {
+ get { return result.Field15; }
+ set { SetField15(value); }
+ }
+ [global::System.CLSCompliant(false)]
+ public Builder SetField15(ulong value) {
+ PrepareBuilder();
+ result.hasField15 = true;
+ result.field15_ = value;
+ return this;
+ }
+ public Builder ClearField15() {
+ PrepareBuilder();
+ result.hasField15 = false;
+ result.field15_ = 0UL;
+ return this;
+ }
+
+ public bool HasField5 {
+ get { return result.hasField5; }
+ }
+ public int Field5 {
+ get { return result.Field5; }
+ set { SetField5(value); }
+ }
+ public Builder SetField5(int value) {
+ PrepareBuilder();
+ result.hasField5 = true;
+ result.field5_ = value;
+ return this;
+ }
+ public Builder ClearField5() {
+ PrepareBuilder();
+ result.hasField5 = false;
+ result.field5_ = 0;
+ return this;
+ }
+
+ public bool HasField27 {
+ get { return result.hasField27; }
+ }
+ public string Field27 {
+ get { return result.Field27; }
+ set { SetField27(value); }
+ }
+ public Builder SetField27(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasField27 = true;
+ result.field27_ = value;
+ return this;
+ }
+ public Builder ClearField27() {
+ PrepareBuilder();
+ result.hasField27 = false;
+ result.field27_ = "";
+ return this;
+ }
+
+ public bool HasField28 {
+ get { return result.hasField28; }
+ }
+ public int Field28 {
+ get { return result.Field28; }
+ set { SetField28(value); }
+ }
+ public Builder SetField28(int value) {
+ PrepareBuilder();
+ result.hasField28 = true;
+ result.field28_ = value;
+ return this;
+ }
+ public Builder ClearField28() {
+ PrepareBuilder();
+ result.hasField28 = false;
+ result.field28_ = 0;
+ return this;
+ }
+
+ public bool HasField29 {
+ get { return result.hasField29; }
+ }
+ public string Field29 {
+ get { return result.Field29; }
+ set { SetField29(value); }
+ }
+ public Builder SetField29(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasField29 = true;
+ result.field29_ = value;
+ return this;
+ }
+ public Builder ClearField29() {
+ PrepareBuilder();
+ result.hasField29 = false;
+ result.field29_ = "";
+ return this;
+ }
+
+ public bool HasField16 {
+ get { return result.hasField16; }
+ }
+ public string Field16 {
+ get { return result.Field16; }
+ set { SetField16(value); }
+ }
+ public Builder SetField16(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasField16 = true;
+ result.field16_ = value;
+ return this;
+ }
+ public Builder ClearField16() {
+ PrepareBuilder();
+ result.hasField16 = false;
+ result.field16_ = "";
+ return this;
+ }
+
+ public pbc::IPopsicleList<string> Field22List {
+ get { return PrepareBuilder().field22_; }
+ }
+ public int Field22Count {
+ get { return result.Field22Count; }
+ }
+ public string GetField22(int index) {
+ return result.GetField22(index);
+ }
+ public Builder SetField22(int index, string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.field22_[index] = value;
+ return this;
+ }
+ public Builder AddField22(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.field22_.Add(value);
+ return this;
+ }
+ public Builder AddRangeField22(scg::IEnumerable<string> values) {
+ PrepareBuilder();
+ result.field22_.Add(values);
+ return this;
+ }
+ public Builder ClearField22() {
+ PrepareBuilder();
+ result.field22_.Clear();
+ return this;
+ }
+
+ public pbc::IPopsicleList<int> Field73List {
+ get { return PrepareBuilder().field73_; }
+ }
+ public int Field73Count {
+ get { return result.Field73Count; }
+ }
+ public int GetField73(int index) {
+ return result.GetField73(index);
+ }
+ public Builder SetField73(int index, int value) {
+ PrepareBuilder();
+ result.field73_[index] = value;
+ return this;
+ }
+ public Builder AddField73(int value) {
+ PrepareBuilder();
+ result.field73_.Add(value);
+ return this;
+ }
+ public Builder AddRangeField73(scg::IEnumerable<int> values) {
+ PrepareBuilder();
+ result.field73_.Add(values);
+ return this;
+ }
+ public Builder ClearField73() {
+ PrepareBuilder();
+ result.field73_.Clear();
+ return this;
+ }
+
+ public bool HasField20 {
+ get { return result.hasField20; }
+ }
+ public int Field20 {
+ get { return result.Field20; }
+ set { SetField20(value); }
+ }
+ public Builder SetField20(int value) {
+ PrepareBuilder();
+ result.hasField20 = true;
+ result.field20_ = value;
+ return this;
+ }
+ public Builder ClearField20() {
+ PrepareBuilder();
+ result.hasField20 = false;
+ result.field20_ = 0;
+ return this;
+ }
+
+ public bool HasField24 {
+ get { return result.hasField24; }
+ }
+ public string Field24 {
+ get { return result.Field24; }
+ set { SetField24(value); }
+ }
+ public Builder SetField24(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasField24 = true;
+ result.field24_ = value;
+ return this;
+ }
+ public Builder ClearField24() {
+ PrepareBuilder();
+ result.hasField24 = false;
+ result.field24_ = "";
+ return this;
+ }
+
+ public bool HasField31 {
+ get { return result.hasField31; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.SizeMessage2GroupedMessage Field31 {
+ get { return result.Field31; }
+ set { SetField31(value); }
+ }
+ public Builder SetField31(global::Google.ProtocolBuffers.TestProtos.SizeMessage2GroupedMessage value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasField31 = true;
+ result.field31_ = value;
+ return this;
+ }
+ public Builder SetField31(global::Google.ProtocolBuffers.TestProtos.SizeMessage2GroupedMessage.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.hasField31 = true;
+ result.field31_ = builderForValue.Build();
+ return this;
+ }
+ public Builder MergeField31(global::Google.ProtocolBuffers.TestProtos.SizeMessage2GroupedMessage value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ if (result.hasField31 &&
+ result.field31_ != global::Google.ProtocolBuffers.TestProtos.SizeMessage2GroupedMessage.DefaultInstance) {
+ result.field31_ = global::Google.ProtocolBuffers.TestProtos.SizeMessage2GroupedMessage.CreateBuilder(result.field31_).MergeFrom(value).BuildPartial();
+ } else {
+ result.field31_ = value;
+ }
+ result.hasField31 = true;
+ return this;
+ }
+ public Builder ClearField31() {
+ PrepareBuilder();
+ result.hasField31 = false;
+ result.field31_ = null;
+ return this;
+ }
+ }
+ static Group1() {
+ object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.GoogleSize.Descriptor, null);
+ }
+ }
+
+ }
+ #endregion
+
+ public const int Field1FieldNumber = 1;
+ private bool hasField1;
+ private string field1_ = "";
+ public bool HasField1 {
+ get { return hasField1; }
+ }
+ public string Field1 {
+ get { return field1_; }
+ }
+
+ public const int Field3FieldNumber = 3;
+ private bool hasField3;
+ private long field3_;
+ public bool HasField3 {
+ get { return hasField3; }
+ }
+ public long Field3 {
+ get { return field3_; }
+ }
+
+ public const int Field4FieldNumber = 4;
+ private bool hasField4;
+ private long field4_;
+ public bool HasField4 {
+ get { return hasField4; }
+ }
+ public long Field4 {
+ get { return field4_; }
+ }
+
+ public const int Field30FieldNumber = 30;
+ private bool hasField30;
+ private long field30_;
+ public bool HasField30 {
+ get { return hasField30; }
+ }
+ public long Field30 {
+ get { return field30_; }
+ }
+
+ public const int Field75FieldNumber = 75;
+ private bool hasField75;
+ private bool field75_;
+ public bool HasField75 {
+ get { return hasField75; }
+ }
+ public bool Field75 {
+ get { return field75_; }
+ }
+
+ public const int Field6FieldNumber = 6;
+ private bool hasField6;
+ private string field6_ = "";
+ public bool HasField6 {
+ get { return hasField6; }
+ }
+ public string Field6 {
+ get { return field6_; }
+ }
+
+ public const int Field2FieldNumber = 2;
+ private bool hasField2;
+ private pb::ByteString field2_ = pb::ByteString.Empty;
+ public bool HasField2 {
+ get { return hasField2; }
+ }
+ public pb::ByteString Field2 {
+ get { return field2_; }
+ }
+
+ public const int Field21FieldNumber = 21;
+ private bool hasField21;
+ private int field21_;
+ public bool HasField21 {
+ get { return hasField21; }
+ }
+ public int Field21 {
+ get { return field21_; }
+ }
+
+ public const int Field71FieldNumber = 71;
+ private bool hasField71;
+ private int field71_;
+ public bool HasField71 {
+ get { return hasField71; }
+ }
+ public int Field71 {
+ get { return field71_; }
+ }
+
+ public const int Field25FieldNumber = 25;
+ private bool hasField25;
+ private float field25_;
+ public bool HasField25 {
+ get { return hasField25; }
+ }
+ public float Field25 {
+ get { return field25_; }
+ }
+
+ public const int Field109FieldNumber = 109;
+ private bool hasField109;
+ private int field109_;
+ public bool HasField109 {
+ get { return hasField109; }
+ }
+ public int Field109 {
+ get { return field109_; }
+ }
+
+ public const int Field210FieldNumber = 210;
+ private bool hasField210;
+ private int field210_;
+ public bool HasField210 {
+ get { return hasField210; }
+ }
+ public int Field210 {
+ get { return field210_; }
+ }
+
+ public const int Field211FieldNumber = 211;
+ private bool hasField211;
+ private int field211_;
+ public bool HasField211 {
+ get { return hasField211; }
+ }
+ public int Field211 {
+ get { return field211_; }
+ }
+
+ public const int Field212FieldNumber = 212;
+ private bool hasField212;
+ private int field212_;
+ public bool HasField212 {
+ get { return hasField212; }
+ }
+ public int Field212 {
+ get { return field212_; }
+ }
+
+ public const int Field213FieldNumber = 213;
+ private bool hasField213;
+ private int field213_;
+ public bool HasField213 {
+ get { return hasField213; }
+ }
+ public int Field213 {
+ get { return field213_; }
+ }
+
+ public const int Field216FieldNumber = 216;
+ private bool hasField216;
+ private int field216_;
+ public bool HasField216 {
+ get { return hasField216; }
+ }
+ public int Field216 {
+ get { return field216_; }
+ }
+
+ public const int Field217FieldNumber = 217;
+ private bool hasField217;
+ private int field217_;
+ public bool HasField217 {
+ get { return hasField217; }
+ }
+ public int Field217 {
+ get { return field217_; }
+ }
+
+ public const int Field218FieldNumber = 218;
+ private bool hasField218;
+ private int field218_;
+ public bool HasField218 {
+ get { return hasField218; }
+ }
+ public int Field218 {
+ get { return field218_; }
+ }
+
+ public const int Field220FieldNumber = 220;
+ private bool hasField220;
+ private int field220_;
+ public bool HasField220 {
+ get { return hasField220; }
+ }
+ public int Field220 {
+ get { return field220_; }
+ }
+
+ public const int Field221FieldNumber = 221;
+ private bool hasField221;
+ private int field221_;
+ public bool HasField221 {
+ get { return hasField221; }
+ }
+ public int Field221 {
+ get { return field221_; }
+ }
+
+ public const int Field222FieldNumber = 222;
+ private bool hasField222;
+ private float field222_;
+ public bool HasField222 {
+ get { return hasField222; }
+ }
+ public float Field222 {
+ get { return field222_; }
+ }
+
+ public const int Field63FieldNumber = 63;
+ private bool hasField63;
+ private int field63_;
+ public bool HasField63 {
+ get { return hasField63; }
+ }
+ public int Field63 {
+ get { return field63_; }
+ }
+
+ public const int Group1FieldNumber = 10;
+ private pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.SizeMessage2.Types.Group1> group1_ = new pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.SizeMessage2.Types.Group1>();
+ public scg::IList<global::Google.ProtocolBuffers.TestProtos.SizeMessage2.Types.Group1> Group1List {
+ get { return group1_; }
+ }
+ public int Group1Count {
+ get { return group1_.Count; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.SizeMessage2.Types.Group1 GetGroup1(int index) {
+ return group1_[index];
+ }
+
+ public const int Field128FieldNumber = 128;
+ private pbc::PopsicleList<string> field128_ = new pbc::PopsicleList<string>();
+ public scg::IList<string> Field128List {
+ get { return pbc::Lists.AsReadOnly(field128_); }
+ }
+ public int Field128Count {
+ get { return field128_.Count; }
+ }
+ public string GetField128(int index) {
+ return field128_[index];
+ }
+
+ public const int Field131FieldNumber = 131;
+ private bool hasField131;
+ private long field131_;
+ public bool HasField131 {
+ get { return hasField131; }
+ }
+ public long Field131 {
+ get { return field131_; }
+ }
+
+ public const int Field127FieldNumber = 127;
+ private pbc::PopsicleList<string> field127_ = new pbc::PopsicleList<string>();
+ public scg::IList<string> Field127List {
+ get { return pbc::Lists.AsReadOnly(field127_); }
+ }
+ public int Field127Count {
+ get { return field127_.Count; }
+ }
+ public string GetField127(int index) {
+ return field127_[index];
+ }
+
+ public const int Field129FieldNumber = 129;
+ private bool hasField129;
+ private int field129_;
+ public bool HasField129 {
+ get { return hasField129; }
+ }
+ public int Field129 {
+ get { return field129_; }
+ }
+
+ public const int Field130FieldNumber = 130;
+ private pbc::PopsicleList<long> field130_ = new pbc::PopsicleList<long>();
+ public scg::IList<long> Field130List {
+ get { return pbc::Lists.AsReadOnly(field130_); }
+ }
+ public int Field130Count {
+ get { return field130_.Count; }
+ }
+ public long GetField130(int index) {
+ return field130_[index];
+ }
+
+ public const int Field205FieldNumber = 205;
+ private bool hasField205;
+ private bool field205_;
+ public bool HasField205 {
+ get { return hasField205; }
+ }
+ public bool Field205 {
+ get { return field205_; }
+ }
+
+ public const int Field206FieldNumber = 206;
+ private bool hasField206;
+ private bool field206_;
+ public bool HasField206 {
+ get { return hasField206; }
+ }
+ public bool Field206 {
+ get { return field206_; }
+ }
+
+ public static SizeMessage2 ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static SizeMessage2 ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static SizeMessage2 ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static SizeMessage2 ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static SizeMessage2 ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static SizeMessage2 ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static SizeMessage2 ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static SizeMessage2 ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static SizeMessage2 ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static SizeMessage2 ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private SizeMessage2 MakeReadOnly() {
+ group1_.MakeReadOnly();
+ field128_.MakeReadOnly();
+ field127_.MakeReadOnly();
+ field130_.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(SizeMessage2 prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Builder : pb::GeneratedBuilder<SizeMessage2, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(SizeMessage2 cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private SizeMessage2 result;
+
+ private SizeMessage2 PrepareBuilder() {
+ if (resultIsReadOnly) {
+ SizeMessage2 original = result;
+ result = new SizeMessage2();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override SizeMessage2 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.SizeMessage2.Descriptor; }
+ }
+
+ public override SizeMessage2 DefaultInstanceForType {
+ get { return global::Google.ProtocolBuffers.TestProtos.SizeMessage2.DefaultInstance; }
+ }
+
+ public override SizeMessage2 BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+
+ public bool HasField1 {
+ get { return result.hasField1; }
+ }
+ public string Field1 {
+ get { return result.Field1; }
+ set { SetField1(value); }
+ }
+ public Builder SetField1(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasField1 = true;
+ result.field1_ = value;
+ return this;
+ }
+ public Builder ClearField1() {
+ PrepareBuilder();
+ result.hasField1 = false;
+ result.field1_ = "";
+ return this;
+ }
+
+ public bool HasField3 {
+ get { return result.hasField3; }
+ }
+ public long Field3 {
+ get { return result.Field3; }
+ set { SetField3(value); }
+ }
+ public Builder SetField3(long value) {
+ PrepareBuilder();
+ result.hasField3 = true;
+ result.field3_ = value;
+ return this;
+ }
+ public Builder ClearField3() {
+ PrepareBuilder();
+ result.hasField3 = false;
+ result.field3_ = 0L;
+ return this;
+ }
+
+ public bool HasField4 {
+ get { return result.hasField4; }
+ }
+ public long Field4 {
+ get { return result.Field4; }
+ set { SetField4(value); }
+ }
+ public Builder SetField4(long value) {
+ PrepareBuilder();
+ result.hasField4 = true;
+ result.field4_ = value;
+ return this;
+ }
+ public Builder ClearField4() {
+ PrepareBuilder();
+ result.hasField4 = false;
+ result.field4_ = 0L;
+ return this;
+ }
+
+ public bool HasField30 {
+ get { return result.hasField30; }
+ }
+ public long Field30 {
+ get { return result.Field30; }
+ set { SetField30(value); }
+ }
+ public Builder SetField30(long value) {
+ PrepareBuilder();
+ result.hasField30 = true;
+ result.field30_ = value;
+ return this;
+ }
+ public Builder ClearField30() {
+ PrepareBuilder();
+ result.hasField30 = false;
+ result.field30_ = 0L;
+ return this;
+ }
+
+ public bool HasField75 {
+ get { return result.hasField75; }
+ }
+ public bool Field75 {
+ get { return result.Field75; }
+ set { SetField75(value); }
+ }
+ public Builder SetField75(bool value) {
+ PrepareBuilder();
+ result.hasField75 = true;
+ result.field75_ = value;
+ return this;
+ }
+ public Builder ClearField75() {
+ PrepareBuilder();
+ result.hasField75 = false;
+ result.field75_ = false;
+ return this;
+ }
+
+ public bool HasField6 {
+ get { return result.hasField6; }
+ }
+ public string Field6 {
+ get { return result.Field6; }
+ set { SetField6(value); }
+ }
+ public Builder SetField6(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasField6 = true;
+ result.field6_ = value;
+ return this;
+ }
+ public Builder ClearField6() {
+ PrepareBuilder();
+ result.hasField6 = false;
+ result.field6_ = "";
+ return this;
+ }
+
+ public bool HasField2 {
+ get { return result.hasField2; }
+ }
+ public pb::ByteString Field2 {
+ get { return result.Field2; }
+ set { SetField2(value); }
+ }
+ public Builder SetField2(pb::ByteString value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasField2 = true;
+ result.field2_ = value;
+ return this;
+ }
+ public Builder ClearField2() {
+ PrepareBuilder();
+ result.hasField2 = false;
+ result.field2_ = pb::ByteString.Empty;
+ return this;
+ }
+
+ public bool HasField21 {
+ get { return result.hasField21; }
+ }
+ public int Field21 {
+ get { return result.Field21; }
+ set { SetField21(value); }
+ }
+ public Builder SetField21(int value) {
+ PrepareBuilder();
+ result.hasField21 = true;
+ result.field21_ = value;
+ return this;
+ }
+ public Builder ClearField21() {
+ PrepareBuilder();
+ result.hasField21 = false;
+ result.field21_ = 0;
+ return this;
+ }
+
+ public bool HasField71 {
+ get { return result.hasField71; }
+ }
+ public int Field71 {
+ get { return result.Field71; }
+ set { SetField71(value); }
+ }
+ public Builder SetField71(int value) {
+ PrepareBuilder();
+ result.hasField71 = true;
+ result.field71_ = value;
+ return this;
+ }
+ public Builder ClearField71() {
+ PrepareBuilder();
+ result.hasField71 = false;
+ result.field71_ = 0;
+ return this;
+ }
+
+ public bool HasField25 {
+ get { return result.hasField25; }
+ }
+ public float Field25 {
+ get { return result.Field25; }
+ set { SetField25(value); }
+ }
+ public Builder SetField25(float value) {
+ PrepareBuilder();
+ result.hasField25 = true;
+ result.field25_ = value;
+ return this;
+ }
+ public Builder ClearField25() {
+ PrepareBuilder();
+ result.hasField25 = false;
+ result.field25_ = 0F;
+ return this;
+ }
+
+ public bool HasField109 {
+ get { return result.hasField109; }
+ }
+ public int Field109 {
+ get { return result.Field109; }
+ set { SetField109(value); }
+ }
+ public Builder SetField109(int value) {
+ PrepareBuilder();
+ result.hasField109 = true;
+ result.field109_ = value;
+ return this;
+ }
+ public Builder ClearField109() {
+ PrepareBuilder();
+ result.hasField109 = false;
+ result.field109_ = 0;
+ return this;
+ }
+
+ public bool HasField210 {
+ get { return result.hasField210; }
+ }
+ public int Field210 {
+ get { return result.Field210; }
+ set { SetField210(value); }
+ }
+ public Builder SetField210(int value) {
+ PrepareBuilder();
+ result.hasField210 = true;
+ result.field210_ = value;
+ return this;
+ }
+ public Builder ClearField210() {
+ PrepareBuilder();
+ result.hasField210 = false;
+ result.field210_ = 0;
+ return this;
+ }
+
+ public bool HasField211 {
+ get { return result.hasField211; }
+ }
+ public int Field211 {
+ get { return result.Field211; }
+ set { SetField211(value); }
+ }
+ public Builder SetField211(int value) {
+ PrepareBuilder();
+ result.hasField211 = true;
+ result.field211_ = value;
+ return this;
+ }
+ public Builder ClearField211() {
+ PrepareBuilder();
+ result.hasField211 = false;
+ result.field211_ = 0;
+ return this;
+ }
+
+ public bool HasField212 {
+ get { return result.hasField212; }
+ }
+ public int Field212 {
+ get { return result.Field212; }
+ set { SetField212(value); }
+ }
+ public Builder SetField212(int value) {
+ PrepareBuilder();
+ result.hasField212 = true;
+ result.field212_ = value;
+ return this;
+ }
+ public Builder ClearField212() {
+ PrepareBuilder();
+ result.hasField212 = false;
+ result.field212_ = 0;
+ return this;
+ }
+
+ public bool HasField213 {
+ get { return result.hasField213; }
+ }
+ public int Field213 {
+ get { return result.Field213; }
+ set { SetField213(value); }
+ }
+ public Builder SetField213(int value) {
+ PrepareBuilder();
+ result.hasField213 = true;
+ result.field213_ = value;
+ return this;
+ }
+ public Builder ClearField213() {
+ PrepareBuilder();
+ result.hasField213 = false;
+ result.field213_ = 0;
+ return this;
+ }
+
+ public bool HasField216 {
+ get { return result.hasField216; }
+ }
+ public int Field216 {
+ get { return result.Field216; }
+ set { SetField216(value); }
+ }
+ public Builder SetField216(int value) {
+ PrepareBuilder();
+ result.hasField216 = true;
+ result.field216_ = value;
+ return this;
+ }
+ public Builder ClearField216() {
+ PrepareBuilder();
+ result.hasField216 = false;
+ result.field216_ = 0;
+ return this;
+ }
+
+ public bool HasField217 {
+ get { return result.hasField217; }
+ }
+ public int Field217 {
+ get { return result.Field217; }
+ set { SetField217(value); }
+ }
+ public Builder SetField217(int value) {
+ PrepareBuilder();
+ result.hasField217 = true;
+ result.field217_ = value;
+ return this;
+ }
+ public Builder ClearField217() {
+ PrepareBuilder();
+ result.hasField217 = false;
+ result.field217_ = 0;
+ return this;
+ }
+
+ public bool HasField218 {
+ get { return result.hasField218; }
+ }
+ public int Field218 {
+ get { return result.Field218; }
+ set { SetField218(value); }
+ }
+ public Builder SetField218(int value) {
+ PrepareBuilder();
+ result.hasField218 = true;
+ result.field218_ = value;
+ return this;
+ }
+ public Builder ClearField218() {
+ PrepareBuilder();
+ result.hasField218 = false;
+ result.field218_ = 0;
+ return this;
+ }
+
+ public bool HasField220 {
+ get { return result.hasField220; }
+ }
+ public int Field220 {
+ get { return result.Field220; }
+ set { SetField220(value); }
+ }
+ public Builder SetField220(int value) {
+ PrepareBuilder();
+ result.hasField220 = true;
+ result.field220_ = value;
+ return this;
+ }
+ public Builder ClearField220() {
+ PrepareBuilder();
+ result.hasField220 = false;
+ result.field220_ = 0;
+ return this;
+ }
+
+ public bool HasField221 {
+ get { return result.hasField221; }
+ }
+ public int Field221 {
+ get { return result.Field221; }
+ set { SetField221(value); }
+ }
+ public Builder SetField221(int value) {
+ PrepareBuilder();
+ result.hasField221 = true;
+ result.field221_ = value;
+ return this;
+ }
+ public Builder ClearField221() {
+ PrepareBuilder();
+ result.hasField221 = false;
+ result.field221_ = 0;
+ return this;
+ }
+
+ public bool HasField222 {
+ get { return result.hasField222; }
+ }
+ public float Field222 {
+ get { return result.Field222; }
+ set { SetField222(value); }
+ }
+ public Builder SetField222(float value) {
+ PrepareBuilder();
+ result.hasField222 = true;
+ result.field222_ = value;
+ return this;
+ }
+ public Builder ClearField222() {
+ PrepareBuilder();
+ result.hasField222 = false;
+ result.field222_ = 0F;
+ return this;
+ }
+
+ public bool HasField63 {
+ get { return result.hasField63; }
+ }
+ public int Field63 {
+ get { return result.Field63; }
+ set { SetField63(value); }
+ }
+ public Builder SetField63(int value) {
+ PrepareBuilder();
+ result.hasField63 = true;
+ result.field63_ = value;
+ return this;
+ }
+ public Builder ClearField63() {
+ PrepareBuilder();
+ result.hasField63 = false;
+ result.field63_ = 0;
+ return this;
+ }
+
+ public pbc::IPopsicleList<global::Google.ProtocolBuffers.TestProtos.SizeMessage2.Types.Group1> Group1List {
+ get { return PrepareBuilder().group1_; }
+ }
+ public int Group1Count {
+ get { return result.Group1Count; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.SizeMessage2.Types.Group1 GetGroup1(int index) {
+ return result.GetGroup1(index);
+ }
+ public Builder SetGroup1(int index, global::Google.ProtocolBuffers.TestProtos.SizeMessage2.Types.Group1 value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.group1_[index] = value;
+ return this;
+ }
+ public Builder SetGroup1(int index, global::Google.ProtocolBuffers.TestProtos.SizeMessage2.Types.Group1.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.group1_[index] = builderForValue.Build();
+ return this;
+ }
+ public Builder AddGroup1(global::Google.ProtocolBuffers.TestProtos.SizeMessage2.Types.Group1 value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.group1_.Add(value);
+ return this;
+ }
+ public Builder AddGroup1(global::Google.ProtocolBuffers.TestProtos.SizeMessage2.Types.Group1.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.group1_.Add(builderForValue.Build());
+ return this;
+ }
+ public Builder AddRangeGroup1(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.SizeMessage2.Types.Group1> values) {
+ PrepareBuilder();
+ result.group1_.Add(values);
+ return this;
+ }
+ public Builder ClearGroup1() {
+ PrepareBuilder();
+ result.group1_.Clear();
+ return this;
+ }
+
+ public pbc::IPopsicleList<string> Field128List {
+ get { return PrepareBuilder().field128_; }
+ }
+ public int Field128Count {
+ get { return result.Field128Count; }
+ }
+ public string GetField128(int index) {
+ return result.GetField128(index);
+ }
+ public Builder SetField128(int index, string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.field128_[index] = value;
+ return this;
+ }
+ public Builder AddField128(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.field128_.Add(value);
+ return this;
+ }
+ public Builder AddRangeField128(scg::IEnumerable<string> values) {
+ PrepareBuilder();
+ result.field128_.Add(values);
+ return this;
+ }
+ public Builder ClearField128() {
+ PrepareBuilder();
+ result.field128_.Clear();
+ return this;
+ }
+
+ public bool HasField131 {
+ get { return result.hasField131; }
+ }
+ public long Field131 {
+ get { return result.Field131; }
+ set { SetField131(value); }
+ }
+ public Builder SetField131(long value) {
+ PrepareBuilder();
+ result.hasField131 = true;
+ result.field131_ = value;
+ return this;
+ }
+ public Builder ClearField131() {
+ PrepareBuilder();
+ result.hasField131 = false;
+ result.field131_ = 0L;
+ return this;
+ }
+
+ public pbc::IPopsicleList<string> Field127List {
+ get { return PrepareBuilder().field127_; }
+ }
+ public int Field127Count {
+ get { return result.Field127Count; }
+ }
+ public string GetField127(int index) {
+ return result.GetField127(index);
+ }
+ public Builder SetField127(int index, string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.field127_[index] = value;
+ return this;
+ }
+ public Builder AddField127(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.field127_.Add(value);
+ return this;
+ }
+ public Builder AddRangeField127(scg::IEnumerable<string> values) {
+ PrepareBuilder();
+ result.field127_.Add(values);
+ return this;
+ }
+ public Builder ClearField127() {
+ PrepareBuilder();
+ result.field127_.Clear();
+ return this;
+ }
+
+ public bool HasField129 {
+ get { return result.hasField129; }
+ }
+ public int Field129 {
+ get { return result.Field129; }
+ set { SetField129(value); }
+ }
+ public Builder SetField129(int value) {
+ PrepareBuilder();
+ result.hasField129 = true;
+ result.field129_ = value;
+ return this;
+ }
+ public Builder ClearField129() {
+ PrepareBuilder();
+ result.hasField129 = false;
+ result.field129_ = 0;
+ return this;
+ }
+
+ public pbc::IPopsicleList<long> Field130List {
+ get { return PrepareBuilder().field130_; }
+ }
+ public int Field130Count {
+ get { return result.Field130Count; }
+ }
+ public long GetField130(int index) {
+ return result.GetField130(index);
+ }
+ public Builder SetField130(int index, long value) {
+ PrepareBuilder();
+ result.field130_[index] = value;
+ return this;
+ }
+ public Builder AddField130(long value) {
+ PrepareBuilder();
+ result.field130_.Add(value);
+ return this;
+ }
+ public Builder AddRangeField130(scg::IEnumerable<long> values) {
+ PrepareBuilder();
+ result.field130_.Add(values);
+ return this;
+ }
+ public Builder ClearField130() {
+ PrepareBuilder();
+ result.field130_.Clear();
+ return this;
+ }
+
+ public bool HasField205 {
+ get { return result.hasField205; }
+ }
+ public bool Field205 {
+ get { return result.Field205; }
+ set { SetField205(value); }
+ }
+ public Builder SetField205(bool value) {
+ PrepareBuilder();
+ result.hasField205 = true;
+ result.field205_ = value;
+ return this;
+ }
+ public Builder ClearField205() {
+ PrepareBuilder();
+ result.hasField205 = false;
+ result.field205_ = false;
+ return this;
+ }
+
+ public bool HasField206 {
+ get { return result.hasField206; }
+ }
+ public bool Field206 {
+ get { return result.Field206; }
+ set { SetField206(value); }
+ }
+ public Builder SetField206(bool value) {
+ PrepareBuilder();
+ result.hasField206 = true;
+ result.field206_ = value;
+ return this;
+ }
+ public Builder ClearField206() {
+ PrepareBuilder();
+ result.hasField206 = false;
+ result.field206_ = false;
+ return this;
+ }
+ }
+ static SizeMessage2() {
+ object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.GoogleSize.Descriptor, null);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class SizeMessage2GroupedMessage : pb::GeneratedMessage<SizeMessage2GroupedMessage, SizeMessage2GroupedMessage.Builder> {
+ private SizeMessage2GroupedMessage() { }
+ private static readonly SizeMessage2GroupedMessage defaultInstance = new SizeMessage2GroupedMessage().MakeReadOnly();
+ public static SizeMessage2GroupedMessage DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override SizeMessage2GroupedMessage DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override SizeMessage2GroupedMessage ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::Google.ProtocolBuffers.TestProtos.GoogleSize.internal__static_benchmarks_SizeMessage2GroupedMessage__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<SizeMessage2GroupedMessage, SizeMessage2GroupedMessage.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.GoogleSize.internal__static_benchmarks_SizeMessage2GroupedMessage__FieldAccessorTable; }
+ }
+
+ public const int Field1FieldNumber = 1;
+ private bool hasField1;
+ private float field1_;
+ public bool HasField1 {
+ get { return hasField1; }
+ }
+ public float Field1 {
+ get { return field1_; }
+ }
+
+ public const int Field2FieldNumber = 2;
+ private bool hasField2;
+ private float field2_;
+ public bool HasField2 {
+ get { return hasField2; }
+ }
+ public float Field2 {
+ get { return field2_; }
+ }
+
+ public const int Field3FieldNumber = 3;
+ private bool hasField3;
+ private float field3_;
+ public bool HasField3 {
+ get { return hasField3; }
+ }
+ public float Field3 {
+ get { return field3_; }
+ }
+
+ public const int Field4FieldNumber = 4;
+ private bool hasField4;
+ private bool field4_;
+ public bool HasField4 {
+ get { return hasField4; }
+ }
+ public bool Field4 {
+ get { return field4_; }
+ }
+
+ public const int Field5FieldNumber = 5;
+ private bool hasField5;
+ private bool field5_;
+ public bool HasField5 {
+ get { return hasField5; }
+ }
+ public bool Field5 {
+ get { return field5_; }
+ }
+
+ public const int Field6FieldNumber = 6;
+ private bool hasField6;
+ private bool field6_ = true;
+ public bool HasField6 {
+ get { return hasField6; }
+ }
+ public bool Field6 {
+ get { return field6_; }
+ }
+
+ public const int Field7FieldNumber = 7;
+ private bool hasField7;
+ private bool field7_;
+ public bool HasField7 {
+ get { return hasField7; }
+ }
+ public bool Field7 {
+ get { return field7_; }
+ }
+
+ public const int Field8FieldNumber = 8;
+ private bool hasField8;
+ private float field8_;
+ public bool HasField8 {
+ get { return hasField8; }
+ }
+ public float Field8 {
+ get { return field8_; }
+ }
+
+ public const int Field9FieldNumber = 9;
+ private bool hasField9;
+ private bool field9_;
+ public bool HasField9 {
+ get { return hasField9; }
+ }
+ public bool Field9 {
+ get { return field9_; }
+ }
+
+ public const int Field10FieldNumber = 10;
+ private bool hasField10;
+ private float field10_;
+ public bool HasField10 {
+ get { return hasField10; }
+ }
+ public float Field10 {
+ get { return field10_; }
+ }
+
+ public const int Field11FieldNumber = 11;
+ private bool hasField11;
+ private long field11_;
+ public bool HasField11 {
+ get { return hasField11; }
+ }
+ public long Field11 {
+ get { return field11_; }
+ }
+
+ public static SizeMessage2GroupedMessage ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static SizeMessage2GroupedMessage ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static SizeMessage2GroupedMessage ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static SizeMessage2GroupedMessage ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static SizeMessage2GroupedMessage ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static SizeMessage2GroupedMessage ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static SizeMessage2GroupedMessage ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static SizeMessage2GroupedMessage ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static SizeMessage2GroupedMessage ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static SizeMessage2GroupedMessage ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private SizeMessage2GroupedMessage 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(SizeMessage2GroupedMessage prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Builder : pb::GeneratedBuilder<SizeMessage2GroupedMessage, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(SizeMessage2GroupedMessage cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private SizeMessage2GroupedMessage result;
+
+ private SizeMessage2GroupedMessage PrepareBuilder() {
+ if (resultIsReadOnly) {
+ SizeMessage2GroupedMessage original = result;
+ result = new SizeMessage2GroupedMessage();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override SizeMessage2GroupedMessage 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.SizeMessage2GroupedMessage.Descriptor; }
+ }
+
+ public override SizeMessage2GroupedMessage DefaultInstanceForType {
+ get { return global::Google.ProtocolBuffers.TestProtos.SizeMessage2GroupedMessage.DefaultInstance; }
+ }
+
+ public override SizeMessage2GroupedMessage BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+
+ public bool HasField1 {
+ get { return result.hasField1; }
+ }
+ public float Field1 {
+ get { return result.Field1; }
+ set { SetField1(value); }
+ }
+ public Builder SetField1(float value) {
+ PrepareBuilder();
+ result.hasField1 = true;
+ result.field1_ = value;
+ return this;
+ }
+ public Builder ClearField1() {
+ PrepareBuilder();
+ result.hasField1 = false;
+ result.field1_ = 0F;
+ return this;
+ }
+
+ public bool HasField2 {
+ get { return result.hasField2; }
+ }
+ public float Field2 {
+ get { return result.Field2; }
+ set { SetField2(value); }
+ }
+ public Builder SetField2(float value) {
+ PrepareBuilder();
+ result.hasField2 = true;
+ result.field2_ = value;
+ return this;
+ }
+ public Builder ClearField2() {
+ PrepareBuilder();
+ result.hasField2 = false;
+ result.field2_ = 0F;
+ return this;
+ }
+
+ public bool HasField3 {
+ get { return result.hasField3; }
+ }
+ public float Field3 {
+ get { return result.Field3; }
+ set { SetField3(value); }
+ }
+ public Builder SetField3(float value) {
+ PrepareBuilder();
+ result.hasField3 = true;
+ result.field3_ = value;
+ return this;
+ }
+ public Builder ClearField3() {
+ PrepareBuilder();
+ result.hasField3 = false;
+ result.field3_ = 0F;
+ return this;
+ }
+
+ public bool HasField4 {
+ get { return result.hasField4; }
+ }
+ public bool Field4 {
+ get { return result.Field4; }
+ set { SetField4(value); }
+ }
+ public Builder SetField4(bool value) {
+ PrepareBuilder();
+ result.hasField4 = true;
+ result.field4_ = value;
+ return this;
+ }
+ public Builder ClearField4() {
+ PrepareBuilder();
+ result.hasField4 = false;
+ result.field4_ = false;
+ return this;
+ }
+
+ public bool HasField5 {
+ get { return result.hasField5; }
+ }
+ public bool Field5 {
+ get { return result.Field5; }
+ set { SetField5(value); }
+ }
+ public Builder SetField5(bool value) {
+ PrepareBuilder();
+ result.hasField5 = true;
+ result.field5_ = value;
+ return this;
+ }
+ public Builder ClearField5() {
+ PrepareBuilder();
+ result.hasField5 = false;
+ result.field5_ = false;
+ return this;
+ }
+
+ public bool HasField6 {
+ get { return result.hasField6; }
+ }
+ public bool Field6 {
+ get { return result.Field6; }
+ set { SetField6(value); }
+ }
+ public Builder SetField6(bool value) {
+ PrepareBuilder();
+ result.hasField6 = true;
+ result.field6_ = value;
+ return this;
+ }
+ public Builder ClearField6() {
+ PrepareBuilder();
+ result.hasField6 = false;
+ result.field6_ = true;
+ return this;
+ }
+
+ public bool HasField7 {
+ get { return result.hasField7; }
+ }
+ public bool Field7 {
+ get { return result.Field7; }
+ set { SetField7(value); }
+ }
+ public Builder SetField7(bool value) {
+ PrepareBuilder();
+ result.hasField7 = true;
+ result.field7_ = value;
+ return this;
+ }
+ public Builder ClearField7() {
+ PrepareBuilder();
+ result.hasField7 = false;
+ result.field7_ = false;
+ return this;
+ }
+
+ public bool HasField8 {
+ get { return result.hasField8; }
+ }
+ public float Field8 {
+ get { return result.Field8; }
+ set { SetField8(value); }
+ }
+ public Builder SetField8(float value) {
+ PrepareBuilder();
+ result.hasField8 = true;
+ result.field8_ = value;
+ return this;
+ }
+ public Builder ClearField8() {
+ PrepareBuilder();
+ result.hasField8 = false;
+ result.field8_ = 0F;
+ return this;
+ }
+
+ public bool HasField9 {
+ get { return result.hasField9; }
+ }
+ public bool Field9 {
+ get { return result.Field9; }
+ set { SetField9(value); }
+ }
+ public Builder SetField9(bool value) {
+ PrepareBuilder();
+ result.hasField9 = true;
+ result.field9_ = value;
+ return this;
+ }
+ public Builder ClearField9() {
+ PrepareBuilder();
+ result.hasField9 = false;
+ result.field9_ = false;
+ return this;
+ }
+
+ public bool HasField10 {
+ get { return result.hasField10; }
+ }
+ public float Field10 {
+ get { return result.Field10; }
+ set { SetField10(value); }
+ }
+ public Builder SetField10(float value) {
+ PrepareBuilder();
+ result.hasField10 = true;
+ result.field10_ = value;
+ return this;
+ }
+ public Builder ClearField10() {
+ PrepareBuilder();
+ result.hasField10 = false;
+ result.field10_ = 0F;
+ return this;
+ }
+
+ public bool HasField11 {
+ get { return result.hasField11; }
+ }
+ public long Field11 {
+ get { return result.Field11; }
+ set { SetField11(value); }
+ }
+ public Builder SetField11(long value) {
+ PrepareBuilder();
+ result.hasField11 = true;
+ result.field11_ = value;
+ return this;
+ }
+ public Builder ClearField11() {
+ PrepareBuilder();
+ result.hasField11 = false;
+ result.field11_ = 0L;
+ return this;
+ }
+ }
+ static SizeMessage2GroupedMessage() {
+ object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.GoogleSize.Descriptor, null);
+ }
+ }
+
+ #endregion
+
+}
+
+#endregion Designer generated code
diff --git a/csharp/src/ProtoBench/TestProtos/GoogleSpeedProtoFile.cs b/csharp/src/ProtoBench/GoogleSpeed.cs
similarity index 92%
rename from csharp/src/ProtoBench/TestProtos/GoogleSpeedProtoFile.cs
rename to csharp/src/ProtoBench/GoogleSpeed.cs
index 3a18950..13e684a 100644
--- a/csharp/src/ProtoBench/TestProtos/GoogleSpeedProtoFile.cs
+++ b/csharp/src/ProtoBench/GoogleSpeed.cs
@@ -1,6637 +1,6634 @@
-// Generated by ProtoGen, Version=2.4.1.555, Culture=neutral, PublicKeyToken=55f7125234beb589. DO NOT EDIT!
-#pragma warning disable 1591, 0612, 3021
-#region Designer generated code
-
-using pb = global::Google.ProtocolBuffers;
-using pbc = global::Google.ProtocolBuffers.Collections;
-using pbd = global::Google.ProtocolBuffers.Descriptors;
-using scg = global::System.Collections.Generic;
-namespace Google.ProtocolBuffers.ProtoBench {
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public static partial class GoogleSpeedProtoFile {
-
- #region Extension registration
- public static void RegisterAllExtensions(pb::ExtensionRegistry registry) {
- }
- #endregion
- #region Static variables
- internal static pbd::MessageDescriptor internal__static_benchmarks_SpeedMessage1__Descriptor;
- internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.ProtoBench.SpeedMessage1, global::Google.ProtocolBuffers.ProtoBench.SpeedMessage1.Builder> internal__static_benchmarks_SpeedMessage1__FieldAccessorTable;
- internal static pbd::MessageDescriptor internal__static_benchmarks_SpeedMessage1SubMessage__Descriptor;
- internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.ProtoBench.SpeedMessage1SubMessage, global::Google.ProtocolBuffers.ProtoBench.SpeedMessage1SubMessage.Builder> internal__static_benchmarks_SpeedMessage1SubMessage__FieldAccessorTable;
- internal static pbd::MessageDescriptor internal__static_benchmarks_SpeedMessage2__Descriptor;
- internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.ProtoBench.SpeedMessage2, global::Google.ProtocolBuffers.ProtoBench.SpeedMessage2.Builder> internal__static_benchmarks_SpeedMessage2__FieldAccessorTable;
- internal static pbd::MessageDescriptor internal__static_benchmarks_SpeedMessage2_Group1__Descriptor;
- internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.ProtoBench.SpeedMessage2.Types.Group1, global::Google.ProtocolBuffers.ProtoBench.SpeedMessage2.Types.Group1.Builder> internal__static_benchmarks_SpeedMessage2_Group1__FieldAccessorTable;
- internal static pbd::MessageDescriptor internal__static_benchmarks_SpeedMessage2GroupedMessage__Descriptor;
- internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.ProtoBench.SpeedMessage2GroupedMessage, global::Google.ProtocolBuffers.ProtoBench.SpeedMessage2GroupedMessage.Builder> internal__static_benchmarks_SpeedMessage2GroupedMessage__FieldAccessorTable;
- #endregion
- #region Descriptor
- public static pbd::FileDescriptor Descriptor {
- get { return descriptor; }
- }
- private static pbd::FileDescriptor descriptor;
-
- static GoogleSpeedProtoFile() {
- byte[] descriptorData = global::System.Convert.FromBase64String(
- string.Concat(
- "Ch1iZW5jaG1hcmtzL2dvb2dsZV9zcGVlZC5wcm90bxIKYmVuY2htYXJrcxok",
- "Z29vZ2xlL3Byb3RvYnVmL2NzaGFycF9vcHRpb25zLnByb3RvIvgGCg1TcGVl",
- "ZE1lc3NhZ2UxEg4KBmZpZWxkMRgBIAIoCRIOCgZmaWVsZDkYCSABKAkSDwoH",
- "ZmllbGQxOBgSIAEoCRIWCgdmaWVsZDgwGFAgASgIOgVmYWxzZRIVCgdmaWVs",
- "ZDgxGFEgASgIOgR0cnVlEg4KBmZpZWxkMhgCIAIoBRIOCgZmaWVsZDMYAyAC",
- "KAUSEQoIZmllbGQyODAYmAIgASgFEhEKBmZpZWxkNhgGIAEoBToBMBIPCgdm",
- "aWVsZDIyGBYgASgDEg4KBmZpZWxkNBgEIAEoCRIOCgZmaWVsZDUYBSADKAYS",
- "FgoHZmllbGQ1ORg7IAEoCDoFZmFsc2USDgoGZmllbGQ3GAcgASgJEg8KB2Zp",
- "ZWxkMTYYECABKAUSFAoIZmllbGQxMzAYggEgASgFOgEwEhUKB2ZpZWxkMTIY",
- "DCABKAg6BHRydWUSFQoHZmllbGQxNxgRIAEoCDoEdHJ1ZRIVCgdmaWVsZDEz",
- "GA0gASgIOgR0cnVlEhUKB2ZpZWxkMTQYDiABKAg6BHRydWUSEwoIZmllbGQx",
- "MDQYaCABKAU6ATASEwoIZmllbGQxMDAYZCABKAU6ATASEwoIZmllbGQxMDEY",
- "ZSABKAU6ATASEAoIZmllbGQxMDIYZiABKAkSEAoIZmllbGQxMDMYZyABKAkS",
- "EgoHZmllbGQyORgdIAEoBToBMBIWCgdmaWVsZDMwGB4gASgIOgVmYWxzZRIT",
- "CgdmaWVsZDYwGDwgASgFOgItMRIVCghmaWVsZDI3MRiPAiABKAU6Ai0xEhUK",
- "CGZpZWxkMjcyGJACIAEoBToCLTESEQoIZmllbGQxNTAYlgEgASgFEhIKB2Zp",
- "ZWxkMjMYFyABKAU6ATASFgoHZmllbGQyNBgYIAEoCDoFZmFsc2USEgoHZmll",
- "bGQyNRgZIAEoBToBMBI0CgdmaWVsZDE1GA8gASgLMiMuYmVuY2htYXJrcy5T",
- "cGVlZE1lc3NhZ2UxU3ViTWVzc2FnZRIPCgdmaWVsZDc4GE4gASgIEhIKB2Zp",
- "ZWxkNjcYQyABKAU6ATASDwoHZmllbGQ2OBhEIAEoBRIUCghmaWVsZDEyOBiA",
- "ASABKAU6ATASKAoIZmllbGQxMjkYgQEgASgJOhV4eHh4eHh4eHh4eHh4eHh4",
- "eHh4eHgSFAoIZmllbGQxMzEYgwEgASgFOgEwIqIDChdTcGVlZE1lc3NhZ2Ux",
- "U3ViTWVzc2FnZRIRCgZmaWVsZDEYASABKAU6ATASEQoGZmllbGQyGAIgASgF",
- "OgEwEhEKBmZpZWxkMxgDIAEoBToBMBIPCgdmaWVsZDE1GA8gASgJEhUKB2Zp",
- "ZWxkMTIYDCABKAg6BHRydWUSDwoHZmllbGQxMxgNIAEoAxIPCgdmaWVsZDE0",
- "GA4gASgDEg8KB2ZpZWxkMTYYECABKAUSEgoHZmllbGQxORgTIAEoBToBMhIV",
- "CgdmaWVsZDIwGBQgASgIOgR0cnVlEhUKB2ZpZWxkMjgYHCABKAg6BHRydWUS",
- "DwoHZmllbGQyMRgVIAEoBhIPCgdmaWVsZDIyGBYgASgFEhYKB2ZpZWxkMjMY",
- "FyABKAg6BWZhbHNlEhgKCGZpZWxkMjA2GM4BIAEoCDoFZmFsc2USEQoIZmll",
- "bGQyMDMYywEgASgHEhEKCGZpZWxkMjA0GMwBIAEoBRIRCghmaWVsZDIwNRjN",
- "ASABKAkSEQoIZmllbGQyMDcYzwEgASgEEhEKCGZpZWxkMzAwGKwCIAEoBCLK",
- "BwoNU3BlZWRNZXNzYWdlMhIOCgZmaWVsZDEYASABKAkSDgoGZmllbGQzGAMg",
- "ASgDEg4KBmZpZWxkNBgEIAEoAxIPCgdmaWVsZDMwGB4gASgDEhYKB2ZpZWxk",
- "NzUYSyABKAg6BWZhbHNlEg4KBmZpZWxkNhgGIAEoCRIOCgZmaWVsZDIYAiAB",
- "KAwSEgoHZmllbGQyMRgVIAEoBToBMBIPCgdmaWVsZDcxGEcgASgFEg8KB2Zp",
- "ZWxkMjUYGSABKAISEwoIZmllbGQxMDkYbSABKAU6ATASFAoIZmllbGQyMTAY",
- "0gEgASgFOgEwEhQKCGZpZWxkMjExGNMBIAEoBToBMBIUCghmaWVsZDIxMhjU",
- "ASABKAU6ATASFAoIZmllbGQyMTMY1QEgASgFOgEwEhQKCGZpZWxkMjE2GNgB",
- "IAEoBToBMBIUCghmaWVsZDIxNxjZASABKAU6ATASFAoIZmllbGQyMTgY2gEg",
- "ASgFOgEwEhQKCGZpZWxkMjIwGNwBIAEoBToBMBIUCghmaWVsZDIyMRjdASAB",
- "KAU6ATASFAoIZmllbGQyMjIY3gEgASgCOgEwEg8KB2ZpZWxkNjMYPyABKAUS",
- "MAoGZ3JvdXAxGAogAygKMiAuYmVuY2htYXJrcy5TcGVlZE1lc3NhZ2UyLkdy",
- "b3VwMRIRCghmaWVsZDEyOBiAASADKAkSEQoIZmllbGQxMzEYgwEgASgDEhAK",
- "CGZpZWxkMTI3GH8gAygJEhEKCGZpZWxkMTI5GIEBIAEoBRIRCghmaWVsZDEz",
- "MBiCASADKAMSGAoIZmllbGQyMDUYzQEgASgIOgVmYWxzZRIYCghmaWVsZDIw",
- "NhjOASABKAg6BWZhbHNlGsMCCgZHcm91cDESDwoHZmllbGQxMRgLIAIoAhIP",
- "CgdmaWVsZDI2GBogASgCEg8KB2ZpZWxkMTIYDCABKAkSDwoHZmllbGQxMxgN",
- "IAEoCRIPCgdmaWVsZDE0GA4gAygJEg8KB2ZpZWxkMTUYDyACKAQSDgoGZmll",
- "bGQ1GAUgASgFEg8KB2ZpZWxkMjcYGyABKAkSDwoHZmllbGQyOBgcIAEoBRIP",
- "CgdmaWVsZDI5GB0gASgJEg8KB2ZpZWxkMTYYECABKAkSDwoHZmllbGQyMhgW",
- "IAMoCRIPCgdmaWVsZDczGEkgAygFEhIKB2ZpZWxkMjAYFCABKAU6ATASDwoH",
- "ZmllbGQyNBgYIAEoCRI4CgdmaWVsZDMxGB8gASgLMicuYmVuY2htYXJrcy5T",
- "cGVlZE1lc3NhZ2UyR3JvdXBlZE1lc3NhZ2Ui3wEKG1NwZWVkTWVzc2FnZTJH",
- "cm91cGVkTWVzc2FnZRIOCgZmaWVsZDEYASABKAISDgoGZmllbGQyGAIgASgC",
- "EhEKBmZpZWxkMxgDIAEoAjoBMBIOCgZmaWVsZDQYBCABKAgSDgoGZmllbGQ1",
- "GAUgASgIEhQKBmZpZWxkNhgGIAEoCDoEdHJ1ZRIVCgZmaWVsZDcYByABKAg6",
- "BWZhbHNlEg4KBmZpZWxkOBgIIAEoAhIOCgZmaWVsZDkYCSABKAgSDwoHZmll",
- "bGQxMBgKIAEoAhIPCgdmaWVsZDExGAsgASgDQktCC0dvb2dsZVNwZWVkSAHC",
- "PjkKIUdvb2dsZS5Qcm90b2NvbEJ1ZmZlcnMuUHJvdG9CZW5jaBIUR29vZ2xl",
- "U3BlZWRQcm90b0ZpbGU="));
- pbd::FileDescriptor.InternalDescriptorAssigner assigner = delegate(pbd::FileDescriptor root) {
- descriptor = root;
- internal__static_benchmarks_SpeedMessage1__Descriptor = Descriptor.MessageTypes[0];
- internal__static_benchmarks_SpeedMessage1__FieldAccessorTable =
- new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.ProtoBench.SpeedMessage1, global::Google.ProtocolBuffers.ProtoBench.SpeedMessage1.Builder>(internal__static_benchmarks_SpeedMessage1__Descriptor,
- new string[] { "Field1", "Field9", "Field18", "Field80", "Field81", "Field2", "Field3", "Field280", "Field6", "Field22", "Field4", "Field5", "Field59", "Field7", "Field16", "Field130", "Field12", "Field17", "Field13", "Field14", "Field104", "Field100", "Field101", "Field102", "Field103", "Field29", "Field30", "Field60", "Field271", "Field272", "Field150", "Field23", "Field24", "Field25", "Field15", "Field78", "Field67", "Field68", "Field128", "Field129", "Field131", });
- internal__static_benchmarks_SpeedMessage1SubMessage__Descriptor = Descriptor.MessageTypes[1];
- internal__static_benchmarks_SpeedMessage1SubMessage__FieldAccessorTable =
- new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.ProtoBench.SpeedMessage1SubMessage, global::Google.ProtocolBuffers.ProtoBench.SpeedMessage1SubMessage.Builder>(internal__static_benchmarks_SpeedMessage1SubMessage__Descriptor,
- new string[] { "Field1", "Field2", "Field3", "Field15", "Field12", "Field13", "Field14", "Field16", "Field19", "Field20", "Field28", "Field21", "Field22", "Field23", "Field206", "Field203", "Field204", "Field205", "Field207", "Field300", });
- internal__static_benchmarks_SpeedMessage2__Descriptor = Descriptor.MessageTypes[2];
- internal__static_benchmarks_SpeedMessage2__FieldAccessorTable =
- new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.ProtoBench.SpeedMessage2, global::Google.ProtocolBuffers.ProtoBench.SpeedMessage2.Builder>(internal__static_benchmarks_SpeedMessage2__Descriptor,
- new string[] { "Field1", "Field3", "Field4", "Field30", "Field75", "Field6", "Field2", "Field21", "Field71", "Field25", "Field109", "Field210", "Field211", "Field212", "Field213", "Field216", "Field217", "Field218", "Field220", "Field221", "Field222", "Field63", "Group1", "Field128", "Field131", "Field127", "Field129", "Field130", "Field205", "Field206", });
- internal__static_benchmarks_SpeedMessage2_Group1__Descriptor = internal__static_benchmarks_SpeedMessage2__Descriptor.NestedTypes[0];
- internal__static_benchmarks_SpeedMessage2_Group1__FieldAccessorTable =
- new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.ProtoBench.SpeedMessage2.Types.Group1, global::Google.ProtocolBuffers.ProtoBench.SpeedMessage2.Types.Group1.Builder>(internal__static_benchmarks_SpeedMessage2_Group1__Descriptor,
- new string[] { "Field11", "Field26", "Field12", "Field13", "Field14", "Field15", "Field5", "Field27", "Field28", "Field29", "Field16", "Field22", "Field73", "Field20", "Field24", "Field31", });
- internal__static_benchmarks_SpeedMessage2GroupedMessage__Descriptor = Descriptor.MessageTypes[3];
- internal__static_benchmarks_SpeedMessage2GroupedMessage__FieldAccessorTable =
- new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.ProtoBench.SpeedMessage2GroupedMessage, global::Google.ProtocolBuffers.ProtoBench.SpeedMessage2GroupedMessage.Builder>(internal__static_benchmarks_SpeedMessage2GroupedMessage__Descriptor,
- new string[] { "Field1", "Field2", "Field3", "Field4", "Field5", "Field6", "Field7", "Field8", "Field9", "Field10", "Field11", });
- 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 Messages
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class SpeedMessage1 : pb::GeneratedMessage<SpeedMessage1, SpeedMessage1.Builder> {
- private SpeedMessage1() { }
- private static readonly SpeedMessage1 defaultInstance = new SpeedMessage1().MakeReadOnly();
- private static readonly string[] _speedMessage1FieldNames = new string[] { "field1", "field100", "field101", "field102", "field103", "field104", "field12", "field128", "field129", "field13", "field130", "field131", "field14", "field15", "field150", "field16", "field17", "field18", "field2", "field22", "field23", "field24", "field25", "field271", "field272", "field280", "field29", "field3", "field30", "field4", "field5", "field59", "field6", "field60", "field67", "field68", "field7", "field78", "field80", "field81", "field9" };
- private static readonly uint[] _speedMessage1FieldTags = new uint[] { 10, 800, 808, 818, 826, 832, 96, 1024, 1034, 104, 1040, 1048, 112, 122, 1200, 128, 136, 146, 16, 176, 184, 192, 200, 2168, 2176, 2240, 232, 24, 240, 34, 41, 472, 48, 480, 536, 544, 58, 624, 640, 648, 74 };
- public static SpeedMessage1 DefaultInstance {
- get { return defaultInstance; }
- }
-
- public override SpeedMessage1 DefaultInstanceForType {
- get { return DefaultInstance; }
- }
-
- protected override SpeedMessage1 ThisMessage {
- get { return this; }
- }
-
- public static pbd::MessageDescriptor Descriptor {
- get { return global::Google.ProtocolBuffers.ProtoBench.GoogleSpeedProtoFile.internal__static_benchmarks_SpeedMessage1__Descriptor; }
- }
-
- protected override pb::FieldAccess.FieldAccessorTable<SpeedMessage1, SpeedMessage1.Builder> InternalFieldAccessors {
- get { return global::Google.ProtocolBuffers.ProtoBench.GoogleSpeedProtoFile.internal__static_benchmarks_SpeedMessage1__FieldAccessorTable; }
- }
-
- public const int Field1FieldNumber = 1;
- private bool hasField1;
- private string field1_ = "";
- public bool HasField1 {
- get { return hasField1; }
- }
- public string Field1 {
- get { return field1_; }
- }
-
- public const int Field9FieldNumber = 9;
- private bool hasField9;
- private string field9_ = "";
- public bool HasField9 {
- get { return hasField9; }
- }
- public string Field9 {
- get { return field9_; }
- }
-
- public const int Field18FieldNumber = 18;
- private bool hasField18;
- private string field18_ = "";
- public bool HasField18 {
- get { return hasField18; }
- }
- public string Field18 {
- get { return field18_; }
- }
-
- public const int Field80FieldNumber = 80;
- private bool hasField80;
- private bool field80_;
- public bool HasField80 {
- get { return hasField80; }
- }
- public bool Field80 {
- get { return field80_; }
- }
-
- public const int Field81FieldNumber = 81;
- private bool hasField81;
- private bool field81_ = true;
- public bool HasField81 {
- get { return hasField81; }
- }
- public bool Field81 {
- get { return field81_; }
- }
-
- public const int Field2FieldNumber = 2;
- private bool hasField2;
- private int field2_;
- public bool HasField2 {
- get { return hasField2; }
- }
- public int Field2 {
- get { return field2_; }
- }
-
- public const int Field3FieldNumber = 3;
- private bool hasField3;
- private int field3_;
- public bool HasField3 {
- get { return hasField3; }
- }
- public int Field3 {
- get { return field3_; }
- }
-
- public const int Field280FieldNumber = 280;
- private bool hasField280;
- private int field280_;
- public bool HasField280 {
- get { return hasField280; }
- }
- public int Field280 {
- get { return field280_; }
- }
-
- public const int Field6FieldNumber = 6;
- private bool hasField6;
- private int field6_;
- public bool HasField6 {
- get { return hasField6; }
- }
- public int Field6 {
- get { return field6_; }
- }
-
- public const int Field22FieldNumber = 22;
- private bool hasField22;
- private long field22_;
- public bool HasField22 {
- get { return hasField22; }
- }
- public long Field22 {
- get { return field22_; }
- }
-
- public const int Field4FieldNumber = 4;
- private bool hasField4;
- private string field4_ = "";
- public bool HasField4 {
- get { return hasField4; }
- }
- public string Field4 {
- get { return field4_; }
- }
-
- public const int Field5FieldNumber = 5;
- private pbc::PopsicleList<ulong> field5_ = new pbc::PopsicleList<ulong>();
- [global::System.CLSCompliant(false)]
- public scg::IList<ulong> Field5List {
- get { return pbc::Lists.AsReadOnly(field5_); }
- }
- public int Field5Count {
- get { return field5_.Count; }
- }
- [global::System.CLSCompliant(false)]
- public ulong GetField5(int index) {
- return field5_[index];
- }
-
- public const int Field59FieldNumber = 59;
- private bool hasField59;
- private bool field59_;
- public bool HasField59 {
- get { return hasField59; }
- }
- public bool Field59 {
- get { return field59_; }
- }
-
- public const int Field7FieldNumber = 7;
- private bool hasField7;
- private string field7_ = "";
- public bool HasField7 {
- get { return hasField7; }
- }
- public string Field7 {
- get { return field7_; }
- }
-
- public const int Field16FieldNumber = 16;
- private bool hasField16;
- private int field16_;
- public bool HasField16 {
- get { return hasField16; }
- }
- public int Field16 {
- get { return field16_; }
- }
-
- public const int Field130FieldNumber = 130;
- private bool hasField130;
- private int field130_;
- public bool HasField130 {
- get { return hasField130; }
- }
- public int Field130 {
- get { return field130_; }
- }
-
- public const int Field12FieldNumber = 12;
- private bool hasField12;
- private bool field12_ = true;
- public bool HasField12 {
- get { return hasField12; }
- }
- public bool Field12 {
- get { return field12_; }
- }
-
- public const int Field17FieldNumber = 17;
- private bool hasField17;
- private bool field17_ = true;
- public bool HasField17 {
- get { return hasField17; }
- }
- public bool Field17 {
- get { return field17_; }
- }
-
- public const int Field13FieldNumber = 13;
- private bool hasField13;
- private bool field13_ = true;
- public bool HasField13 {
- get { return hasField13; }
- }
- public bool Field13 {
- get { return field13_; }
- }
-
- public const int Field14FieldNumber = 14;
- private bool hasField14;
- private bool field14_ = true;
- public bool HasField14 {
- get { return hasField14; }
- }
- public bool Field14 {
- get { return field14_; }
- }
-
- public const int Field104FieldNumber = 104;
- private bool hasField104;
- private int field104_;
- public bool HasField104 {
- get { return hasField104; }
- }
- public int Field104 {
- get { return field104_; }
- }
-
- public const int Field100FieldNumber = 100;
- private bool hasField100;
- private int field100_;
- public bool HasField100 {
- get { return hasField100; }
- }
- public int Field100 {
- get { return field100_; }
- }
-
- public const int Field101FieldNumber = 101;
- private bool hasField101;
- private int field101_;
- public bool HasField101 {
- get { return hasField101; }
- }
- public int Field101 {
- get { return field101_; }
- }
-
- public const int Field102FieldNumber = 102;
- private bool hasField102;
- private string field102_ = "";
- public bool HasField102 {
- get { return hasField102; }
- }
- public string Field102 {
- get { return field102_; }
- }
-
- public const int Field103FieldNumber = 103;
- private bool hasField103;
- private string field103_ = "";
- public bool HasField103 {
- get { return hasField103; }
- }
- public string Field103 {
- get { return field103_; }
- }
-
- public const int Field29FieldNumber = 29;
- private bool hasField29;
- private int field29_;
- public bool HasField29 {
- get { return hasField29; }
- }
- public int Field29 {
- get { return field29_; }
- }
-
- public const int Field30FieldNumber = 30;
- private bool hasField30;
- private bool field30_;
- public bool HasField30 {
- get { return hasField30; }
- }
- public bool Field30 {
- get { return field30_; }
- }
-
- public const int Field60FieldNumber = 60;
- private bool hasField60;
- private int field60_ = -1;
- public bool HasField60 {
- get { return hasField60; }
- }
- public int Field60 {
- get { return field60_; }
- }
-
- public const int Field271FieldNumber = 271;
- private bool hasField271;
- private int field271_ = -1;
- public bool HasField271 {
- get { return hasField271; }
- }
- public int Field271 {
- get { return field271_; }
- }
-
- public const int Field272FieldNumber = 272;
- private bool hasField272;
- private int field272_ = -1;
- public bool HasField272 {
- get { return hasField272; }
- }
- public int Field272 {
- get { return field272_; }
- }
-
- public const int Field150FieldNumber = 150;
- private bool hasField150;
- private int field150_;
- public bool HasField150 {
- get { return hasField150; }
- }
- public int Field150 {
- get { return field150_; }
- }
-
- public const int Field23FieldNumber = 23;
- private bool hasField23;
- private int field23_;
- public bool HasField23 {
- get { return hasField23; }
- }
- public int Field23 {
- get { return field23_; }
- }
-
- public const int Field24FieldNumber = 24;
- private bool hasField24;
- private bool field24_;
- public bool HasField24 {
- get { return hasField24; }
- }
- public bool Field24 {
- get { return field24_; }
- }
-
- public const int Field25FieldNumber = 25;
- private bool hasField25;
- private int field25_;
- public bool HasField25 {
- get { return hasField25; }
- }
- public int Field25 {
- get { return field25_; }
- }
-
- public const int Field15FieldNumber = 15;
- private bool hasField15;
- private global::Google.ProtocolBuffers.ProtoBench.SpeedMessage1SubMessage field15_;
- public bool HasField15 {
- get { return hasField15; }
- }
- public global::Google.ProtocolBuffers.ProtoBench.SpeedMessage1SubMessage Field15 {
- get { return field15_ ?? global::Google.ProtocolBuffers.ProtoBench.SpeedMessage1SubMessage.DefaultInstance; }
- }
-
- public const int Field78FieldNumber = 78;
- private bool hasField78;
- private bool field78_;
- public bool HasField78 {
- get { return hasField78; }
- }
- public bool Field78 {
- get { return field78_; }
- }
-
- public const int Field67FieldNumber = 67;
- private bool hasField67;
- private int field67_;
- public bool HasField67 {
- get { return hasField67; }
- }
- public int Field67 {
- get { return field67_; }
- }
-
- public const int Field68FieldNumber = 68;
- private bool hasField68;
- private int field68_;
- public bool HasField68 {
- get { return hasField68; }
- }
- public int Field68 {
- get { return field68_; }
- }
-
- public const int Field128FieldNumber = 128;
- private bool hasField128;
- private int field128_;
- public bool HasField128 {
- get { return hasField128; }
- }
- public int Field128 {
- get { return field128_; }
- }
-
- public const int Field129FieldNumber = 129;
- private bool hasField129;
- private string field129_ = "xxxxxxxxxxxxxxxxxxxxx";
- public bool HasField129 {
- get { return hasField129; }
- }
- public string Field129 {
- get { return field129_; }
- }
-
- public const int Field131FieldNumber = 131;
- private bool hasField131;
- private int field131_;
- public bool HasField131 {
- get { return hasField131; }
- }
- public int Field131 {
- get { return field131_; }
- }
-
- public override bool IsInitialized {
- get {
- if (!hasField1) return false;
- if (!hasField2) return false;
- if (!hasField3) return false;
- return true;
- }
- }
-
- public override void WriteTo(pb::ICodedOutputStream output) {
- CalcSerializedSize();
- string[] field_names = _speedMessage1FieldNames;
- if (hasField1) {
- output.WriteString(1, field_names[0], Field1);
- }
- if (hasField2) {
- output.WriteInt32(2, field_names[18], Field2);
- }
- if (hasField3) {
- output.WriteInt32(3, field_names[27], Field3);
- }
- if (hasField4) {
- output.WriteString(4, field_names[29], Field4);
- }
- if (field5_.Count > 0) {
- output.WriteFixed64Array(5, field_names[30], field5_);
- }
- if (hasField6) {
- output.WriteInt32(6, field_names[32], Field6);
- }
- if (hasField7) {
- output.WriteString(7, field_names[36], Field7);
- }
- if (hasField9) {
- output.WriteString(9, field_names[40], Field9);
- }
- if (hasField12) {
- output.WriteBool(12, field_names[6], Field12);
- }
- if (hasField13) {
- output.WriteBool(13, field_names[9], Field13);
- }
- if (hasField14) {
- output.WriteBool(14, field_names[12], Field14);
- }
- if (hasField15) {
- output.WriteMessage(15, field_names[13], Field15);
- }
- if (hasField16) {
- output.WriteInt32(16, field_names[15], Field16);
- }
- if (hasField17) {
- output.WriteBool(17, field_names[16], Field17);
- }
- if (hasField18) {
- output.WriteString(18, field_names[17], Field18);
- }
- if (hasField22) {
- output.WriteInt64(22, field_names[19], Field22);
- }
- if (hasField23) {
- output.WriteInt32(23, field_names[20], Field23);
- }
- if (hasField24) {
- output.WriteBool(24, field_names[21], Field24);
- }
- if (hasField25) {
- output.WriteInt32(25, field_names[22], Field25);
- }
- if (hasField29) {
- output.WriteInt32(29, field_names[26], Field29);
- }
- if (hasField30) {
- output.WriteBool(30, field_names[28], Field30);
- }
- if (hasField59) {
- output.WriteBool(59, field_names[31], Field59);
- }
- if (hasField60) {
- output.WriteInt32(60, field_names[33], Field60);
- }
- if (hasField67) {
- output.WriteInt32(67, field_names[34], Field67);
- }
- if (hasField68) {
- output.WriteInt32(68, field_names[35], Field68);
- }
- if (hasField78) {
- output.WriteBool(78, field_names[37], Field78);
- }
- if (hasField80) {
- output.WriteBool(80, field_names[38], Field80);
- }
- if (hasField81) {
- output.WriteBool(81, field_names[39], Field81);
- }
- if (hasField100) {
- output.WriteInt32(100, field_names[1], Field100);
- }
- if (hasField101) {
- output.WriteInt32(101, field_names[2], Field101);
- }
- if (hasField102) {
- output.WriteString(102, field_names[3], Field102);
- }
- if (hasField103) {
- output.WriteString(103, field_names[4], Field103);
- }
- if (hasField104) {
- output.WriteInt32(104, field_names[5], Field104);
- }
- if (hasField128) {
- output.WriteInt32(128, field_names[7], Field128);
- }
- if (hasField129) {
- output.WriteString(129, field_names[8], Field129);
- }
- if (hasField130) {
- output.WriteInt32(130, field_names[10], Field130);
- }
- if (hasField131) {
- output.WriteInt32(131, field_names[11], Field131);
- }
- if (hasField150) {
- output.WriteInt32(150, field_names[14], Field150);
- }
- if (hasField271) {
- output.WriteInt32(271, field_names[23], Field271);
- }
- if (hasField272) {
- output.WriteInt32(272, field_names[24], Field272);
- }
- if (hasField280) {
- output.WriteInt32(280, field_names[25], Field280);
- }
- UnknownFields.WriteTo(output);
- }
-
- private int memoizedSerializedSize = -1;
- public override int SerializedSize {
- get {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
- return CalcSerializedSize();
- }
- }
-
- private int CalcSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- if (hasField1) {
- size += pb::CodedOutputStream.ComputeStringSize(1, Field1);
- }
- if (hasField9) {
- size += pb::CodedOutputStream.ComputeStringSize(9, Field9);
- }
- if (hasField18) {
- size += pb::CodedOutputStream.ComputeStringSize(18, Field18);
- }
- if (hasField80) {
- size += pb::CodedOutputStream.ComputeBoolSize(80, Field80);
- }
- if (hasField81) {
- size += pb::CodedOutputStream.ComputeBoolSize(81, Field81);
- }
- if (hasField2) {
- size += pb::CodedOutputStream.ComputeInt32Size(2, Field2);
- }
- if (hasField3) {
- size += pb::CodedOutputStream.ComputeInt32Size(3, Field3);
- }
- if (hasField280) {
- size += pb::CodedOutputStream.ComputeInt32Size(280, Field280);
- }
- if (hasField6) {
- size += pb::CodedOutputStream.ComputeInt32Size(6, Field6);
- }
- if (hasField22) {
- size += pb::CodedOutputStream.ComputeInt64Size(22, Field22);
- }
- if (hasField4) {
- size += pb::CodedOutputStream.ComputeStringSize(4, Field4);
- }
- {
- int dataSize = 0;
- dataSize = 8 * field5_.Count;
- size += dataSize;
- size += 1 * field5_.Count;
- }
- if (hasField59) {
- size += pb::CodedOutputStream.ComputeBoolSize(59, Field59);
- }
- if (hasField7) {
- size += pb::CodedOutputStream.ComputeStringSize(7, Field7);
- }
- if (hasField16) {
- size += pb::CodedOutputStream.ComputeInt32Size(16, Field16);
- }
- if (hasField130) {
- size += pb::CodedOutputStream.ComputeInt32Size(130, Field130);
- }
- if (hasField12) {
- size += pb::CodedOutputStream.ComputeBoolSize(12, Field12);
- }
- if (hasField17) {
- size += pb::CodedOutputStream.ComputeBoolSize(17, Field17);
- }
- if (hasField13) {
- size += pb::CodedOutputStream.ComputeBoolSize(13, Field13);
- }
- if (hasField14) {
- size += pb::CodedOutputStream.ComputeBoolSize(14, Field14);
- }
- if (hasField104) {
- size += pb::CodedOutputStream.ComputeInt32Size(104, Field104);
- }
- if (hasField100) {
- size += pb::CodedOutputStream.ComputeInt32Size(100, Field100);
- }
- if (hasField101) {
- size += pb::CodedOutputStream.ComputeInt32Size(101, Field101);
- }
- if (hasField102) {
- size += pb::CodedOutputStream.ComputeStringSize(102, Field102);
- }
- if (hasField103) {
- size += pb::CodedOutputStream.ComputeStringSize(103, Field103);
- }
- if (hasField29) {
- size += pb::CodedOutputStream.ComputeInt32Size(29, Field29);
- }
- if (hasField30) {
- size += pb::CodedOutputStream.ComputeBoolSize(30, Field30);
- }
- if (hasField60) {
- size += pb::CodedOutputStream.ComputeInt32Size(60, Field60);
- }
- if (hasField271) {
- size += pb::CodedOutputStream.ComputeInt32Size(271, Field271);
- }
- if (hasField272) {
- size += pb::CodedOutputStream.ComputeInt32Size(272, Field272);
- }
- if (hasField150) {
- size += pb::CodedOutputStream.ComputeInt32Size(150, Field150);
- }
- if (hasField23) {
- size += pb::CodedOutputStream.ComputeInt32Size(23, Field23);
- }
- if (hasField24) {
- size += pb::CodedOutputStream.ComputeBoolSize(24, Field24);
- }
- if (hasField25) {
- size += pb::CodedOutputStream.ComputeInt32Size(25, Field25);
- }
- if (hasField15) {
- size += pb::CodedOutputStream.ComputeMessageSize(15, Field15);
- }
- if (hasField78) {
- size += pb::CodedOutputStream.ComputeBoolSize(78, Field78);
- }
- if (hasField67) {
- size += pb::CodedOutputStream.ComputeInt32Size(67, Field67);
- }
- if (hasField68) {
- size += pb::CodedOutputStream.ComputeInt32Size(68, Field68);
- }
- if (hasField128) {
- size += pb::CodedOutputStream.ComputeInt32Size(128, Field128);
- }
- if (hasField129) {
- size += pb::CodedOutputStream.ComputeStringSize(129, Field129);
- }
- if (hasField131) {
- size += pb::CodedOutputStream.ComputeInt32Size(131, Field131);
- }
- size += UnknownFields.SerializedSize;
- memoizedSerializedSize = size;
- return size;
- }
- public static SpeedMessage1 ParseFrom(pb::ByteString data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static SpeedMessage1 ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static SpeedMessage1 ParseFrom(byte[] data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static SpeedMessage1 ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static SpeedMessage1 ParseFrom(global::System.IO.Stream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static SpeedMessage1 ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- public static SpeedMessage1 ParseDelimitedFrom(global::System.IO.Stream input) {
- return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
- }
- public static SpeedMessage1 ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
- }
- public static SpeedMessage1 ParseFrom(pb::ICodedInputStream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static SpeedMessage1 ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- private SpeedMessage1 MakeReadOnly() {
- field5_.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(SpeedMessage1 prototype) {
- return new Builder(prototype);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class Builder : pb::GeneratedBuilder<SpeedMessage1, Builder> {
- protected override Builder ThisBuilder {
- get { return this; }
- }
- public Builder() {
- result = DefaultInstance;
- resultIsReadOnly = true;
- }
- internal Builder(SpeedMessage1 cloneFrom) {
- result = cloneFrom;
- resultIsReadOnly = true;
- }
-
- private bool resultIsReadOnly;
- private SpeedMessage1 result;
-
- private SpeedMessage1 PrepareBuilder() {
- if (resultIsReadOnly) {
- SpeedMessage1 original = result;
- result = new SpeedMessage1();
- resultIsReadOnly = false;
- MergeFrom(original);
- }
- return result;
- }
-
- public override bool IsInitialized {
- get { return result.IsInitialized; }
- }
-
- protected override SpeedMessage1 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.ProtoBench.SpeedMessage1.Descriptor; }
- }
-
- public override SpeedMessage1 DefaultInstanceForType {
- get { return global::Google.ProtocolBuffers.ProtoBench.SpeedMessage1.DefaultInstance; }
- }
-
- public override SpeedMessage1 BuildPartial() {
- if (resultIsReadOnly) {
- return result;
- }
- resultIsReadOnly = true;
- return result.MakeReadOnly();
- }
-
- public override Builder MergeFrom(pb::IMessage other) {
- if (other is SpeedMessage1) {
- return MergeFrom((SpeedMessage1) other);
- } else {
- base.MergeFrom(other);
- return this;
- }
- }
-
- public override Builder MergeFrom(SpeedMessage1 other) {
- if (other == global::Google.ProtocolBuffers.ProtoBench.SpeedMessage1.DefaultInstance) return this;
- PrepareBuilder();
- if (other.HasField1) {
- Field1 = other.Field1;
- }
- if (other.HasField9) {
- Field9 = other.Field9;
- }
- if (other.HasField18) {
- Field18 = other.Field18;
- }
- if (other.HasField80) {
- Field80 = other.Field80;
- }
- if (other.HasField81) {
- Field81 = other.Field81;
- }
- if (other.HasField2) {
- Field2 = other.Field2;
- }
- if (other.HasField3) {
- Field3 = other.Field3;
- }
- if (other.HasField280) {
- Field280 = other.Field280;
- }
- if (other.HasField6) {
- Field6 = other.Field6;
- }
- if (other.HasField22) {
- Field22 = other.Field22;
- }
- if (other.HasField4) {
- Field4 = other.Field4;
- }
- if (other.field5_.Count != 0) {
- result.field5_.Add(other.field5_);
- }
- if (other.HasField59) {
- Field59 = other.Field59;
- }
- if (other.HasField7) {
- Field7 = other.Field7;
- }
- if (other.HasField16) {
- Field16 = other.Field16;
- }
- if (other.HasField130) {
- Field130 = other.Field130;
- }
- if (other.HasField12) {
- Field12 = other.Field12;
- }
- if (other.HasField17) {
- Field17 = other.Field17;
- }
- if (other.HasField13) {
- Field13 = other.Field13;
- }
- if (other.HasField14) {
- Field14 = other.Field14;
- }
- if (other.HasField104) {
- Field104 = other.Field104;
- }
- if (other.HasField100) {
- Field100 = other.Field100;
- }
- if (other.HasField101) {
- Field101 = other.Field101;
- }
- if (other.HasField102) {
- Field102 = other.Field102;
- }
- if (other.HasField103) {
- Field103 = other.Field103;
- }
- if (other.HasField29) {
- Field29 = other.Field29;
- }
- if (other.HasField30) {
- Field30 = other.Field30;
- }
- if (other.HasField60) {
- Field60 = other.Field60;
- }
- if (other.HasField271) {
- Field271 = other.Field271;
- }
- if (other.HasField272) {
- Field272 = other.Field272;
- }
- if (other.HasField150) {
- Field150 = other.Field150;
- }
- if (other.HasField23) {
- Field23 = other.Field23;
- }
- if (other.HasField24) {
- Field24 = other.Field24;
- }
- if (other.HasField25) {
- Field25 = other.Field25;
- }
- if (other.HasField15) {
- MergeField15(other.Field15);
- }
- if (other.HasField78) {
- Field78 = other.Field78;
- }
- if (other.HasField67) {
- Field67 = other.Field67;
- }
- if (other.HasField68) {
- Field68 = other.Field68;
- }
- if (other.HasField128) {
- Field128 = other.Field128;
- }
- if (other.HasField129) {
- Field129 = other.Field129;
- }
- if (other.HasField131) {
- Field131 = other.Field131;
- }
- 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(_speedMessage1FieldNames, field_name, global::System.StringComparer.Ordinal);
- if(field_ordinal >= 0)
- tag = _speedMessage1FieldTags[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.hasField1 = input.ReadString(ref result.field1_);
- break;
- }
- case 16: {
- result.hasField2 = input.ReadInt32(ref result.field2_);
- break;
- }
- case 24: {
- result.hasField3 = input.ReadInt32(ref result.field3_);
- break;
- }
- case 34: {
- result.hasField4 = input.ReadString(ref result.field4_);
- break;
- }
- case 42:
- case 41: {
- input.ReadFixed64Array(tag, field_name, result.field5_);
- break;
- }
- case 48: {
- result.hasField6 = input.ReadInt32(ref result.field6_);
- break;
- }
- case 58: {
- result.hasField7 = input.ReadString(ref result.field7_);
- break;
- }
- case 74: {
- result.hasField9 = input.ReadString(ref result.field9_);
- break;
- }
- case 96: {
- result.hasField12 = input.ReadBool(ref result.field12_);
- break;
- }
- case 104: {
- result.hasField13 = input.ReadBool(ref result.field13_);
- break;
- }
- case 112: {
- result.hasField14 = input.ReadBool(ref result.field14_);
- break;
- }
- case 122: {
- global::Google.ProtocolBuffers.ProtoBench.SpeedMessage1SubMessage.Builder subBuilder = global::Google.ProtocolBuffers.ProtoBench.SpeedMessage1SubMessage.CreateBuilder();
- if (result.hasField15) {
- subBuilder.MergeFrom(Field15);
- }
- input.ReadMessage(subBuilder, extensionRegistry);
- Field15 = subBuilder.BuildPartial();
- break;
- }
- case 128: {
- result.hasField16 = input.ReadInt32(ref result.field16_);
- break;
- }
- case 136: {
- result.hasField17 = input.ReadBool(ref result.field17_);
- break;
- }
- case 146: {
- result.hasField18 = input.ReadString(ref result.field18_);
- break;
- }
- case 176: {
- result.hasField22 = input.ReadInt64(ref result.field22_);
- break;
- }
- case 184: {
- result.hasField23 = input.ReadInt32(ref result.field23_);
- break;
- }
- case 192: {
- result.hasField24 = input.ReadBool(ref result.field24_);
- break;
- }
- case 200: {
- result.hasField25 = input.ReadInt32(ref result.field25_);
- break;
- }
- case 232: {
- result.hasField29 = input.ReadInt32(ref result.field29_);
- break;
- }
- case 240: {
- result.hasField30 = input.ReadBool(ref result.field30_);
- break;
- }
- case 472: {
- result.hasField59 = input.ReadBool(ref result.field59_);
- break;
- }
- case 480: {
- result.hasField60 = input.ReadInt32(ref result.field60_);
- break;
- }
- case 536: {
- result.hasField67 = input.ReadInt32(ref result.field67_);
- break;
- }
- case 544: {
- result.hasField68 = input.ReadInt32(ref result.field68_);
- break;
- }
- case 624: {
- result.hasField78 = input.ReadBool(ref result.field78_);
- break;
- }
- case 640: {
- result.hasField80 = input.ReadBool(ref result.field80_);
- break;
- }
- case 648: {
- result.hasField81 = input.ReadBool(ref result.field81_);
- break;
- }
- case 800: {
- result.hasField100 = input.ReadInt32(ref result.field100_);
- break;
- }
- case 808: {
- result.hasField101 = input.ReadInt32(ref result.field101_);
- break;
- }
- case 818: {
- result.hasField102 = input.ReadString(ref result.field102_);
- break;
- }
- case 826: {
- result.hasField103 = input.ReadString(ref result.field103_);
- break;
- }
- case 832: {
- result.hasField104 = input.ReadInt32(ref result.field104_);
- break;
- }
- case 1024: {
- result.hasField128 = input.ReadInt32(ref result.field128_);
- break;
- }
- case 1034: {
- result.hasField129 = input.ReadString(ref result.field129_);
- break;
- }
- case 1040: {
- result.hasField130 = input.ReadInt32(ref result.field130_);
- break;
- }
- case 1048: {
- result.hasField131 = input.ReadInt32(ref result.field131_);
- break;
- }
- case 1200: {
- result.hasField150 = input.ReadInt32(ref result.field150_);
- break;
- }
- case 2168: {
- result.hasField271 = input.ReadInt32(ref result.field271_);
- break;
- }
- case 2176: {
- result.hasField272 = input.ReadInt32(ref result.field272_);
- break;
- }
- case 2240: {
- result.hasField280 = input.ReadInt32(ref result.field280_);
- break;
- }
- }
- }
-
- if (unknownFields != null) {
- this.UnknownFields = unknownFields.Build();
- }
- return this;
- }
-
-
- public bool HasField1 {
- get { return result.hasField1; }
- }
- public string Field1 {
- get { return result.Field1; }
- set { SetField1(value); }
- }
- public Builder SetField1(string value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.hasField1 = true;
- result.field1_ = value;
- return this;
- }
- public Builder ClearField1() {
- PrepareBuilder();
- result.hasField1 = false;
- result.field1_ = "";
- return this;
- }
-
- public bool HasField9 {
- get { return result.hasField9; }
- }
- public string Field9 {
- get { return result.Field9; }
- set { SetField9(value); }
- }
- public Builder SetField9(string value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.hasField9 = true;
- result.field9_ = value;
- return this;
- }
- public Builder ClearField9() {
- PrepareBuilder();
- result.hasField9 = false;
- result.field9_ = "";
- return this;
- }
-
- public bool HasField18 {
- get { return result.hasField18; }
- }
- public string Field18 {
- get { return result.Field18; }
- set { SetField18(value); }
- }
- public Builder SetField18(string value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.hasField18 = true;
- result.field18_ = value;
- return this;
- }
- public Builder ClearField18() {
- PrepareBuilder();
- result.hasField18 = false;
- result.field18_ = "";
- return this;
- }
-
- public bool HasField80 {
- get { return result.hasField80; }
- }
- public bool Field80 {
- get { return result.Field80; }
- set { SetField80(value); }
- }
- public Builder SetField80(bool value) {
- PrepareBuilder();
- result.hasField80 = true;
- result.field80_ = value;
- return this;
- }
- public Builder ClearField80() {
- PrepareBuilder();
- result.hasField80 = false;
- result.field80_ = false;
- return this;
- }
-
- public bool HasField81 {
- get { return result.hasField81; }
- }
- public bool Field81 {
- get { return result.Field81; }
- set { SetField81(value); }
- }
- public Builder SetField81(bool value) {
- PrepareBuilder();
- result.hasField81 = true;
- result.field81_ = value;
- return this;
- }
- public Builder ClearField81() {
- PrepareBuilder();
- result.hasField81 = false;
- result.field81_ = true;
- return this;
- }
-
- public bool HasField2 {
- get { return result.hasField2; }
- }
- public int Field2 {
- get { return result.Field2; }
- set { SetField2(value); }
- }
- public Builder SetField2(int value) {
- PrepareBuilder();
- result.hasField2 = true;
- result.field2_ = value;
- return this;
- }
- public Builder ClearField2() {
- PrepareBuilder();
- result.hasField2 = false;
- result.field2_ = 0;
- return this;
- }
-
- public bool HasField3 {
- get { return result.hasField3; }
- }
- public int Field3 {
- get { return result.Field3; }
- set { SetField3(value); }
- }
- public Builder SetField3(int value) {
- PrepareBuilder();
- result.hasField3 = true;
- result.field3_ = value;
- return this;
- }
- public Builder ClearField3() {
- PrepareBuilder();
- result.hasField3 = false;
- result.field3_ = 0;
- return this;
- }
-
- public bool HasField280 {
- get { return result.hasField280; }
- }
- public int Field280 {
- get { return result.Field280; }
- set { SetField280(value); }
- }
- public Builder SetField280(int value) {
- PrepareBuilder();
- result.hasField280 = true;
- result.field280_ = value;
- return this;
- }
- public Builder ClearField280() {
- PrepareBuilder();
- result.hasField280 = false;
- result.field280_ = 0;
- return this;
- }
-
- public bool HasField6 {
- get { return result.hasField6; }
- }
- public int Field6 {
- get { return result.Field6; }
- set { SetField6(value); }
- }
- public Builder SetField6(int value) {
- PrepareBuilder();
- result.hasField6 = true;
- result.field6_ = value;
- return this;
- }
- public Builder ClearField6() {
- PrepareBuilder();
- result.hasField6 = false;
- result.field6_ = 0;
- return this;
- }
-
- public bool HasField22 {
- get { return result.hasField22; }
- }
- public long Field22 {
- get { return result.Field22; }
- set { SetField22(value); }
- }
- public Builder SetField22(long value) {
- PrepareBuilder();
- result.hasField22 = true;
- result.field22_ = value;
- return this;
- }
- public Builder ClearField22() {
- PrepareBuilder();
- result.hasField22 = false;
- result.field22_ = 0L;
- return this;
- }
-
- public bool HasField4 {
- get { return result.hasField4; }
- }
- public string Field4 {
- get { return result.Field4; }
- set { SetField4(value); }
- }
- public Builder SetField4(string value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.hasField4 = true;
- result.field4_ = value;
- return this;
- }
- public Builder ClearField4() {
- PrepareBuilder();
- result.hasField4 = false;
- result.field4_ = "";
- return this;
- }
-
- [global::System.CLSCompliant(false)]
- public pbc::IPopsicleList<ulong> Field5List {
- get { return PrepareBuilder().field5_; }
- }
- public int Field5Count {
- get { return result.Field5Count; }
- }
- [global::System.CLSCompliant(false)]
- public ulong GetField5(int index) {
- return result.GetField5(index);
- }
- [global::System.CLSCompliant(false)]
- public Builder SetField5(int index, ulong value) {
- PrepareBuilder();
- result.field5_[index] = value;
- return this;
- }
- [global::System.CLSCompliant(false)]
- public Builder AddField5(ulong value) {
- PrepareBuilder();
- result.field5_.Add(value);
- return this;
- }
- [global::System.CLSCompliant(false)]
- public Builder AddRangeField5(scg::IEnumerable<ulong> values) {
- PrepareBuilder();
- result.field5_.Add(values);
- return this;
- }
- public Builder ClearField5() {
- PrepareBuilder();
- result.field5_.Clear();
- return this;
- }
-
- public bool HasField59 {
- get { return result.hasField59; }
- }
- public bool Field59 {
- get { return result.Field59; }
- set { SetField59(value); }
- }
- public Builder SetField59(bool value) {
- PrepareBuilder();
- result.hasField59 = true;
- result.field59_ = value;
- return this;
- }
- public Builder ClearField59() {
- PrepareBuilder();
- result.hasField59 = false;
- result.field59_ = false;
- return this;
- }
-
- public bool HasField7 {
- get { return result.hasField7; }
- }
- public string Field7 {
- get { return result.Field7; }
- set { SetField7(value); }
- }
- public Builder SetField7(string value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.hasField7 = true;
- result.field7_ = value;
- return this;
- }
- public Builder ClearField7() {
- PrepareBuilder();
- result.hasField7 = false;
- result.field7_ = "";
- return this;
- }
-
- public bool HasField16 {
- get { return result.hasField16; }
- }
- public int Field16 {
- get { return result.Field16; }
- set { SetField16(value); }
- }
- public Builder SetField16(int value) {
- PrepareBuilder();
- result.hasField16 = true;
- result.field16_ = value;
- return this;
- }
- public Builder ClearField16() {
- PrepareBuilder();
- result.hasField16 = false;
- result.field16_ = 0;
- return this;
- }
-
- public bool HasField130 {
- get { return result.hasField130; }
- }
- public int Field130 {
- get { return result.Field130; }
- set { SetField130(value); }
- }
- public Builder SetField130(int value) {
- PrepareBuilder();
- result.hasField130 = true;
- result.field130_ = value;
- return this;
- }
- public Builder ClearField130() {
- PrepareBuilder();
- result.hasField130 = false;
- result.field130_ = 0;
- return this;
- }
-
- public bool HasField12 {
- get { return result.hasField12; }
- }
- public bool Field12 {
- get { return result.Field12; }
- set { SetField12(value); }
- }
- public Builder SetField12(bool value) {
- PrepareBuilder();
- result.hasField12 = true;
- result.field12_ = value;
- return this;
- }
- public Builder ClearField12() {
- PrepareBuilder();
- result.hasField12 = false;
- result.field12_ = true;
- return this;
- }
-
- public bool HasField17 {
- get { return result.hasField17; }
- }
- public bool Field17 {
- get { return result.Field17; }
- set { SetField17(value); }
- }
- public Builder SetField17(bool value) {
- PrepareBuilder();
- result.hasField17 = true;
- result.field17_ = value;
- return this;
- }
- public Builder ClearField17() {
- PrepareBuilder();
- result.hasField17 = false;
- result.field17_ = true;
- return this;
- }
-
- public bool HasField13 {
- get { return result.hasField13; }
- }
- public bool Field13 {
- get { return result.Field13; }
- set { SetField13(value); }
- }
- public Builder SetField13(bool value) {
- PrepareBuilder();
- result.hasField13 = true;
- result.field13_ = value;
- return this;
- }
- public Builder ClearField13() {
- PrepareBuilder();
- result.hasField13 = false;
- result.field13_ = true;
- return this;
- }
-
- public bool HasField14 {
- get { return result.hasField14; }
- }
- public bool Field14 {
- get { return result.Field14; }
- set { SetField14(value); }
- }
- public Builder SetField14(bool value) {
- PrepareBuilder();
- result.hasField14 = true;
- result.field14_ = value;
- return this;
- }
- public Builder ClearField14() {
- PrepareBuilder();
- result.hasField14 = false;
- result.field14_ = true;
- return this;
- }
-
- public bool HasField104 {
- get { return result.hasField104; }
- }
- public int Field104 {
- get { return result.Field104; }
- set { SetField104(value); }
- }
- public Builder SetField104(int value) {
- PrepareBuilder();
- result.hasField104 = true;
- result.field104_ = value;
- return this;
- }
- public Builder ClearField104() {
- PrepareBuilder();
- result.hasField104 = false;
- result.field104_ = 0;
- return this;
- }
-
- public bool HasField100 {
- get { return result.hasField100; }
- }
- public int Field100 {
- get { return result.Field100; }
- set { SetField100(value); }
- }
- public Builder SetField100(int value) {
- PrepareBuilder();
- result.hasField100 = true;
- result.field100_ = value;
- return this;
- }
- public Builder ClearField100() {
- PrepareBuilder();
- result.hasField100 = false;
- result.field100_ = 0;
- return this;
- }
-
- public bool HasField101 {
- get { return result.hasField101; }
- }
- public int Field101 {
- get { return result.Field101; }
- set { SetField101(value); }
- }
- public Builder SetField101(int value) {
- PrepareBuilder();
- result.hasField101 = true;
- result.field101_ = value;
- return this;
- }
- public Builder ClearField101() {
- PrepareBuilder();
- result.hasField101 = false;
- result.field101_ = 0;
- return this;
- }
-
- public bool HasField102 {
- get { return result.hasField102; }
- }
- public string Field102 {
- get { return result.Field102; }
- set { SetField102(value); }
- }
- public Builder SetField102(string value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.hasField102 = true;
- result.field102_ = value;
- return this;
- }
- public Builder ClearField102() {
- PrepareBuilder();
- result.hasField102 = false;
- result.field102_ = "";
- return this;
- }
-
- public bool HasField103 {
- get { return result.hasField103; }
- }
- public string Field103 {
- get { return result.Field103; }
- set { SetField103(value); }
- }
- public Builder SetField103(string value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.hasField103 = true;
- result.field103_ = value;
- return this;
- }
- public Builder ClearField103() {
- PrepareBuilder();
- result.hasField103 = false;
- result.field103_ = "";
- return this;
- }
-
- public bool HasField29 {
- get { return result.hasField29; }
- }
- public int Field29 {
- get { return result.Field29; }
- set { SetField29(value); }
- }
- public Builder SetField29(int value) {
- PrepareBuilder();
- result.hasField29 = true;
- result.field29_ = value;
- return this;
- }
- public Builder ClearField29() {
- PrepareBuilder();
- result.hasField29 = false;
- result.field29_ = 0;
- return this;
- }
-
- public bool HasField30 {
- get { return result.hasField30; }
- }
- public bool Field30 {
- get { return result.Field30; }
- set { SetField30(value); }
- }
- public Builder SetField30(bool value) {
- PrepareBuilder();
- result.hasField30 = true;
- result.field30_ = value;
- return this;
- }
- public Builder ClearField30() {
- PrepareBuilder();
- result.hasField30 = false;
- result.field30_ = false;
- return this;
- }
-
- public bool HasField60 {
- get { return result.hasField60; }
- }
- public int Field60 {
- get { return result.Field60; }
- set { SetField60(value); }
- }
- public Builder SetField60(int value) {
- PrepareBuilder();
- result.hasField60 = true;
- result.field60_ = value;
- return this;
- }
- public Builder ClearField60() {
- PrepareBuilder();
- result.hasField60 = false;
- result.field60_ = -1;
- return this;
- }
-
- public bool HasField271 {
- get { return result.hasField271; }
- }
- public int Field271 {
- get { return result.Field271; }
- set { SetField271(value); }
- }
- public Builder SetField271(int value) {
- PrepareBuilder();
- result.hasField271 = true;
- result.field271_ = value;
- return this;
- }
- public Builder ClearField271() {
- PrepareBuilder();
- result.hasField271 = false;
- result.field271_ = -1;
- return this;
- }
-
- public bool HasField272 {
- get { return result.hasField272; }
- }
- public int Field272 {
- get { return result.Field272; }
- set { SetField272(value); }
- }
- public Builder SetField272(int value) {
- PrepareBuilder();
- result.hasField272 = true;
- result.field272_ = value;
- return this;
- }
- public Builder ClearField272() {
- PrepareBuilder();
- result.hasField272 = false;
- result.field272_ = -1;
- return this;
- }
-
- public bool HasField150 {
- get { return result.hasField150; }
- }
- public int Field150 {
- get { return result.Field150; }
- set { SetField150(value); }
- }
- public Builder SetField150(int value) {
- PrepareBuilder();
- result.hasField150 = true;
- result.field150_ = value;
- return this;
- }
- public Builder ClearField150() {
- PrepareBuilder();
- result.hasField150 = false;
- result.field150_ = 0;
- return this;
- }
-
- public bool HasField23 {
- get { return result.hasField23; }
- }
- public int Field23 {
- get { return result.Field23; }
- set { SetField23(value); }
- }
- public Builder SetField23(int value) {
- PrepareBuilder();
- result.hasField23 = true;
- result.field23_ = value;
- return this;
- }
- public Builder ClearField23() {
- PrepareBuilder();
- result.hasField23 = false;
- result.field23_ = 0;
- return this;
- }
-
- public bool HasField24 {
- get { return result.hasField24; }
- }
- public bool Field24 {
- get { return result.Field24; }
- set { SetField24(value); }
- }
- public Builder SetField24(bool value) {
- PrepareBuilder();
- result.hasField24 = true;
- result.field24_ = value;
- return this;
- }
- public Builder ClearField24() {
- PrepareBuilder();
- result.hasField24 = false;
- result.field24_ = false;
- return this;
- }
-
- public bool HasField25 {
- get { return result.hasField25; }
- }
- public int Field25 {
- get { return result.Field25; }
- set { SetField25(value); }
- }
- public Builder SetField25(int value) {
- PrepareBuilder();
- result.hasField25 = true;
- result.field25_ = value;
- return this;
- }
- public Builder ClearField25() {
- PrepareBuilder();
- result.hasField25 = false;
- result.field25_ = 0;
- return this;
- }
-
- public bool HasField15 {
- get { return result.hasField15; }
- }
- public global::Google.ProtocolBuffers.ProtoBench.SpeedMessage1SubMessage Field15 {
- get { return result.Field15; }
- set { SetField15(value); }
- }
- public Builder SetField15(global::Google.ProtocolBuffers.ProtoBench.SpeedMessage1SubMessage value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.hasField15 = true;
- result.field15_ = value;
- return this;
- }
- public Builder SetField15(global::Google.ProtocolBuffers.ProtoBench.SpeedMessage1SubMessage.Builder builderForValue) {
- pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
- PrepareBuilder();
- result.hasField15 = true;
- result.field15_ = builderForValue.Build();
- return this;
- }
- public Builder MergeField15(global::Google.ProtocolBuffers.ProtoBench.SpeedMessage1SubMessage value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- if (result.hasField15 &&
- result.field15_ != global::Google.ProtocolBuffers.ProtoBench.SpeedMessage1SubMessage.DefaultInstance) {
- result.field15_ = global::Google.ProtocolBuffers.ProtoBench.SpeedMessage1SubMessage.CreateBuilder(result.field15_).MergeFrom(value).BuildPartial();
- } else {
- result.field15_ = value;
- }
- result.hasField15 = true;
- return this;
- }
- public Builder ClearField15() {
- PrepareBuilder();
- result.hasField15 = false;
- result.field15_ = null;
- return this;
- }
-
- public bool HasField78 {
- get { return result.hasField78; }
- }
- public bool Field78 {
- get { return result.Field78; }
- set { SetField78(value); }
- }
- public Builder SetField78(bool value) {
- PrepareBuilder();
- result.hasField78 = true;
- result.field78_ = value;
- return this;
- }
- public Builder ClearField78() {
- PrepareBuilder();
- result.hasField78 = false;
- result.field78_ = false;
- return this;
- }
-
- public bool HasField67 {
- get { return result.hasField67; }
- }
- public int Field67 {
- get { return result.Field67; }
- set { SetField67(value); }
- }
- public Builder SetField67(int value) {
- PrepareBuilder();
- result.hasField67 = true;
- result.field67_ = value;
- return this;
- }
- public Builder ClearField67() {
- PrepareBuilder();
- result.hasField67 = false;
- result.field67_ = 0;
- return this;
- }
-
- public bool HasField68 {
- get { return result.hasField68; }
- }
- public int Field68 {
- get { return result.Field68; }
- set { SetField68(value); }
- }
- public Builder SetField68(int value) {
- PrepareBuilder();
- result.hasField68 = true;
- result.field68_ = value;
- return this;
- }
- public Builder ClearField68() {
- PrepareBuilder();
- result.hasField68 = false;
- result.field68_ = 0;
- return this;
- }
-
- public bool HasField128 {
- get { return result.hasField128; }
- }
- public int Field128 {
- get { return result.Field128; }
- set { SetField128(value); }
- }
- public Builder SetField128(int value) {
- PrepareBuilder();
- result.hasField128 = true;
- result.field128_ = value;
- return this;
- }
- public Builder ClearField128() {
- PrepareBuilder();
- result.hasField128 = false;
- result.field128_ = 0;
- return this;
- }
-
- public bool HasField129 {
- get { return result.hasField129; }
- }
- public string Field129 {
- get { return result.Field129; }
- set { SetField129(value); }
- }
- public Builder SetField129(string value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.hasField129 = true;
- result.field129_ = value;
- return this;
- }
- public Builder ClearField129() {
- PrepareBuilder();
- result.hasField129 = false;
- result.field129_ = "xxxxxxxxxxxxxxxxxxxxx";
- return this;
- }
-
- public bool HasField131 {
- get { return result.hasField131; }
- }
- public int Field131 {
- get { return result.Field131; }
- set { SetField131(value); }
- }
- public Builder SetField131(int value) {
- PrepareBuilder();
- result.hasField131 = true;
- result.field131_ = value;
- return this;
- }
- public Builder ClearField131() {
- PrepareBuilder();
- result.hasField131 = false;
- result.field131_ = 0;
- return this;
- }
- }
- static SpeedMessage1() {
- object.ReferenceEquals(global::Google.ProtocolBuffers.ProtoBench.GoogleSpeedProtoFile.Descriptor, null);
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class SpeedMessage1SubMessage : pb::GeneratedMessage<SpeedMessage1SubMessage, SpeedMessage1SubMessage.Builder> {
- private SpeedMessage1SubMessage() { }
- private static readonly SpeedMessage1SubMessage defaultInstance = new SpeedMessage1SubMessage().MakeReadOnly();
- private static readonly string[] _speedMessage1SubMessageFieldNames = new string[] { "field1", "field12", "field13", "field14", "field15", "field16", "field19", "field2", "field20", "field203", "field204", "field205", "field206", "field207", "field21", "field22", "field23", "field28", "field3", "field300" };
- private static readonly uint[] _speedMessage1SubMessageFieldTags = new uint[] { 8, 96, 104, 112, 122, 128, 152, 16, 160, 1629, 1632, 1642, 1648, 1656, 169, 176, 184, 224, 24, 2400 };
- public static SpeedMessage1SubMessage DefaultInstance {
- get { return defaultInstance; }
- }
-
- public override SpeedMessage1SubMessage DefaultInstanceForType {
- get { return DefaultInstance; }
- }
-
- protected override SpeedMessage1SubMessage ThisMessage {
- get { return this; }
- }
-
- public static pbd::MessageDescriptor Descriptor {
- get { return global::Google.ProtocolBuffers.ProtoBench.GoogleSpeedProtoFile.internal__static_benchmarks_SpeedMessage1SubMessage__Descriptor; }
- }
-
- protected override pb::FieldAccess.FieldAccessorTable<SpeedMessage1SubMessage, SpeedMessage1SubMessage.Builder> InternalFieldAccessors {
- get { return global::Google.ProtocolBuffers.ProtoBench.GoogleSpeedProtoFile.internal__static_benchmarks_SpeedMessage1SubMessage__FieldAccessorTable; }
- }
-
- public const int Field1FieldNumber = 1;
- private bool hasField1;
- private int field1_;
- public bool HasField1 {
- get { return hasField1; }
- }
- public int Field1 {
- get { return field1_; }
- }
-
- public const int Field2FieldNumber = 2;
- private bool hasField2;
- private int field2_;
- public bool HasField2 {
- get { return hasField2; }
- }
- public int Field2 {
- get { return field2_; }
- }
-
- public const int Field3FieldNumber = 3;
- private bool hasField3;
- private int field3_;
- public bool HasField3 {
- get { return hasField3; }
- }
- public int Field3 {
- get { return field3_; }
- }
-
- public const int Field15FieldNumber = 15;
- private bool hasField15;
- private string field15_ = "";
- public bool HasField15 {
- get { return hasField15; }
- }
- public string Field15 {
- get { return field15_; }
- }
-
- public const int Field12FieldNumber = 12;
- private bool hasField12;
- private bool field12_ = true;
- public bool HasField12 {
- get { return hasField12; }
- }
- public bool Field12 {
- get { return field12_; }
- }
-
- public const int Field13FieldNumber = 13;
- private bool hasField13;
- private long field13_;
- public bool HasField13 {
- get { return hasField13; }
- }
- public long Field13 {
- get { return field13_; }
- }
-
- public const int Field14FieldNumber = 14;
- private bool hasField14;
- private long field14_;
- public bool HasField14 {
- get { return hasField14; }
- }
- public long Field14 {
- get { return field14_; }
- }
-
- public const int Field16FieldNumber = 16;
- private bool hasField16;
- private int field16_;
- public bool HasField16 {
- get { return hasField16; }
- }
- public int Field16 {
- get { return field16_; }
- }
-
- public const int Field19FieldNumber = 19;
- private bool hasField19;
- private int field19_ = 2;
- public bool HasField19 {
- get { return hasField19; }
- }
- public int Field19 {
- get { return field19_; }
- }
-
- public const int Field20FieldNumber = 20;
- private bool hasField20;
- private bool field20_ = true;
- public bool HasField20 {
- get { return hasField20; }
- }
- public bool Field20 {
- get { return field20_; }
- }
-
- public const int Field28FieldNumber = 28;
- private bool hasField28;
- private bool field28_ = true;
- public bool HasField28 {
- get { return hasField28; }
- }
- public bool Field28 {
- get { return field28_; }
- }
-
- public const int Field21FieldNumber = 21;
- private bool hasField21;
- private ulong field21_;
- public bool HasField21 {
- get { return hasField21; }
- }
- [global::System.CLSCompliant(false)]
- public ulong Field21 {
- get { return field21_; }
- }
-
- public const int Field22FieldNumber = 22;
- private bool hasField22;
- private int field22_;
- public bool HasField22 {
- get { return hasField22; }
- }
- public int Field22 {
- get { return field22_; }
- }
-
- public const int Field23FieldNumber = 23;
- private bool hasField23;
- private bool field23_;
- public bool HasField23 {
- get { return hasField23; }
- }
- public bool Field23 {
- get { return field23_; }
- }
-
- public const int Field206FieldNumber = 206;
- private bool hasField206;
- private bool field206_;
- public bool HasField206 {
- get { return hasField206; }
- }
- public bool Field206 {
- get { return field206_; }
- }
-
- public const int Field203FieldNumber = 203;
- private bool hasField203;
- private uint field203_;
- public bool HasField203 {
- get { return hasField203; }
- }
- [global::System.CLSCompliant(false)]
- public uint Field203 {
- get { return field203_; }
- }
-
- public const int Field204FieldNumber = 204;
- private bool hasField204;
- private int field204_;
- public bool HasField204 {
- get { return hasField204; }
- }
- public int Field204 {
- get { return field204_; }
- }
-
- public const int Field205FieldNumber = 205;
- private bool hasField205;
- private string field205_ = "";
- public bool HasField205 {
- get { return hasField205; }
- }
- public string Field205 {
- get { return field205_; }
- }
-
- public const int Field207FieldNumber = 207;
- private bool hasField207;
- private ulong field207_;
- public bool HasField207 {
- get { return hasField207; }
- }
- [global::System.CLSCompliant(false)]
- public ulong Field207 {
- get { return field207_; }
- }
-
- public const int Field300FieldNumber = 300;
- private bool hasField300;
- private ulong field300_;
- public bool HasField300 {
- get { return hasField300; }
- }
- [global::System.CLSCompliant(false)]
- public ulong Field300 {
- get { return field300_; }
- }
-
- public override bool IsInitialized {
- get {
- return true;
- }
- }
-
- public override void WriteTo(pb::ICodedOutputStream output) {
- CalcSerializedSize();
- string[] field_names = _speedMessage1SubMessageFieldNames;
- if (hasField1) {
- output.WriteInt32(1, field_names[0], Field1);
- }
- if (hasField2) {
- output.WriteInt32(2, field_names[7], Field2);
- }
- if (hasField3) {
- output.WriteInt32(3, field_names[18], Field3);
- }
- if (hasField12) {
- output.WriteBool(12, field_names[1], Field12);
- }
- if (hasField13) {
- output.WriteInt64(13, field_names[2], Field13);
- }
- if (hasField14) {
- output.WriteInt64(14, field_names[3], Field14);
- }
- if (hasField15) {
- output.WriteString(15, field_names[4], Field15);
- }
- if (hasField16) {
- output.WriteInt32(16, field_names[5], Field16);
- }
- if (hasField19) {
- output.WriteInt32(19, field_names[6], Field19);
- }
- if (hasField20) {
- output.WriteBool(20, field_names[8], Field20);
- }
- if (hasField21) {
- output.WriteFixed64(21, field_names[14], Field21);
- }
- if (hasField22) {
- output.WriteInt32(22, field_names[15], Field22);
- }
- if (hasField23) {
- output.WriteBool(23, field_names[16], Field23);
- }
- if (hasField28) {
- output.WriteBool(28, field_names[17], Field28);
- }
- if (hasField203) {
- output.WriteFixed32(203, field_names[9], Field203);
- }
- if (hasField204) {
- output.WriteInt32(204, field_names[10], Field204);
- }
- if (hasField205) {
- output.WriteString(205, field_names[11], Field205);
- }
- if (hasField206) {
- output.WriteBool(206, field_names[12], Field206);
- }
- if (hasField207) {
- output.WriteUInt64(207, field_names[13], Field207);
- }
- if (hasField300) {
- output.WriteUInt64(300, field_names[19], Field300);
- }
- UnknownFields.WriteTo(output);
- }
-
- private int memoizedSerializedSize = -1;
- public override int SerializedSize {
- get {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
- return CalcSerializedSize();
- }
- }
-
- private int CalcSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- if (hasField1) {
- size += pb::CodedOutputStream.ComputeInt32Size(1, Field1);
- }
- if (hasField2) {
- size += pb::CodedOutputStream.ComputeInt32Size(2, Field2);
- }
- if (hasField3) {
- size += pb::CodedOutputStream.ComputeInt32Size(3, Field3);
- }
- if (hasField15) {
- size += pb::CodedOutputStream.ComputeStringSize(15, Field15);
- }
- if (hasField12) {
- size += pb::CodedOutputStream.ComputeBoolSize(12, Field12);
- }
- if (hasField13) {
- size += pb::CodedOutputStream.ComputeInt64Size(13, Field13);
- }
- if (hasField14) {
- size += pb::CodedOutputStream.ComputeInt64Size(14, Field14);
- }
- if (hasField16) {
- size += pb::CodedOutputStream.ComputeInt32Size(16, Field16);
- }
- if (hasField19) {
- size += pb::CodedOutputStream.ComputeInt32Size(19, Field19);
- }
- if (hasField20) {
- size += pb::CodedOutputStream.ComputeBoolSize(20, Field20);
- }
- if (hasField28) {
- size += pb::CodedOutputStream.ComputeBoolSize(28, Field28);
- }
- if (hasField21) {
- size += pb::CodedOutputStream.ComputeFixed64Size(21, Field21);
- }
- if (hasField22) {
- size += pb::CodedOutputStream.ComputeInt32Size(22, Field22);
- }
- if (hasField23) {
- size += pb::CodedOutputStream.ComputeBoolSize(23, Field23);
- }
- if (hasField206) {
- size += pb::CodedOutputStream.ComputeBoolSize(206, Field206);
- }
- if (hasField203) {
- size += pb::CodedOutputStream.ComputeFixed32Size(203, Field203);
- }
- if (hasField204) {
- size += pb::CodedOutputStream.ComputeInt32Size(204, Field204);
- }
- if (hasField205) {
- size += pb::CodedOutputStream.ComputeStringSize(205, Field205);
- }
- if (hasField207) {
- size += pb::CodedOutputStream.ComputeUInt64Size(207, Field207);
- }
- if (hasField300) {
- size += pb::CodedOutputStream.ComputeUInt64Size(300, Field300);
- }
- size += UnknownFields.SerializedSize;
- memoizedSerializedSize = size;
- return size;
- }
- public static SpeedMessage1SubMessage ParseFrom(pb::ByteString data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static SpeedMessage1SubMessage ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static SpeedMessage1SubMessage ParseFrom(byte[] data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static SpeedMessage1SubMessage ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static SpeedMessage1SubMessage ParseFrom(global::System.IO.Stream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static SpeedMessage1SubMessage ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- public static SpeedMessage1SubMessage ParseDelimitedFrom(global::System.IO.Stream input) {
- return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
- }
- public static SpeedMessage1SubMessage ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
- }
- public static SpeedMessage1SubMessage ParseFrom(pb::ICodedInputStream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static SpeedMessage1SubMessage ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- private SpeedMessage1SubMessage 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(SpeedMessage1SubMessage prototype) {
- return new Builder(prototype);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class Builder : pb::GeneratedBuilder<SpeedMessage1SubMessage, Builder> {
- protected override Builder ThisBuilder {
- get { return this; }
- }
- public Builder() {
- result = DefaultInstance;
- resultIsReadOnly = true;
- }
- internal Builder(SpeedMessage1SubMessage cloneFrom) {
- result = cloneFrom;
- resultIsReadOnly = true;
- }
-
- private bool resultIsReadOnly;
- private SpeedMessage1SubMessage result;
-
- private SpeedMessage1SubMessage PrepareBuilder() {
- if (resultIsReadOnly) {
- SpeedMessage1SubMessage original = result;
- result = new SpeedMessage1SubMessage();
- resultIsReadOnly = false;
- MergeFrom(original);
- }
- return result;
- }
-
- public override bool IsInitialized {
- get { return result.IsInitialized; }
- }
-
- protected override SpeedMessage1SubMessage 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.ProtoBench.SpeedMessage1SubMessage.Descriptor; }
- }
-
- public override SpeedMessage1SubMessage DefaultInstanceForType {
- get { return global::Google.ProtocolBuffers.ProtoBench.SpeedMessage1SubMessage.DefaultInstance; }
- }
-
- public override SpeedMessage1SubMessage BuildPartial() {
- if (resultIsReadOnly) {
- return result;
- }
- resultIsReadOnly = true;
- return result.MakeReadOnly();
- }
-
- public override Builder MergeFrom(pb::IMessage other) {
- if (other is SpeedMessage1SubMessage) {
- return MergeFrom((SpeedMessage1SubMessage) other);
- } else {
- base.MergeFrom(other);
- return this;
- }
- }
-
- public override Builder MergeFrom(SpeedMessage1SubMessage other) {
- if (other == global::Google.ProtocolBuffers.ProtoBench.SpeedMessage1SubMessage.DefaultInstance) return this;
- PrepareBuilder();
- if (other.HasField1) {
- Field1 = other.Field1;
- }
- if (other.HasField2) {
- Field2 = other.Field2;
- }
- if (other.HasField3) {
- Field3 = other.Field3;
- }
- if (other.HasField15) {
- Field15 = other.Field15;
- }
- if (other.HasField12) {
- Field12 = other.Field12;
- }
- if (other.HasField13) {
- Field13 = other.Field13;
- }
- if (other.HasField14) {
- Field14 = other.Field14;
- }
- if (other.HasField16) {
- Field16 = other.Field16;
- }
- if (other.HasField19) {
- Field19 = other.Field19;
- }
- if (other.HasField20) {
- Field20 = other.Field20;
- }
- if (other.HasField28) {
- Field28 = other.Field28;
- }
- if (other.HasField21) {
- Field21 = other.Field21;
- }
- if (other.HasField22) {
- Field22 = other.Field22;
- }
- if (other.HasField23) {
- Field23 = other.Field23;
- }
- if (other.HasField206) {
- Field206 = other.Field206;
- }
- if (other.HasField203) {
- Field203 = other.Field203;
- }
- if (other.HasField204) {
- Field204 = other.Field204;
- }
- if (other.HasField205) {
- Field205 = other.Field205;
- }
- if (other.HasField207) {
- Field207 = other.Field207;
- }
- if (other.HasField300) {
- Field300 = other.Field300;
- }
- 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(_speedMessage1SubMessageFieldNames, field_name, global::System.StringComparer.Ordinal);
- if(field_ordinal >= 0)
- tag = _speedMessage1SubMessageFieldTags[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.hasField1 = input.ReadInt32(ref result.field1_);
- break;
- }
- case 16: {
- result.hasField2 = input.ReadInt32(ref result.field2_);
- break;
- }
- case 24: {
- result.hasField3 = input.ReadInt32(ref result.field3_);
- break;
- }
- case 96: {
- result.hasField12 = input.ReadBool(ref result.field12_);
- break;
- }
- case 104: {
- result.hasField13 = input.ReadInt64(ref result.field13_);
- break;
- }
- case 112: {
- result.hasField14 = input.ReadInt64(ref result.field14_);
- break;
- }
- case 122: {
- result.hasField15 = input.ReadString(ref result.field15_);
- break;
- }
- case 128: {
- result.hasField16 = input.ReadInt32(ref result.field16_);
- break;
- }
- case 152: {
- result.hasField19 = input.ReadInt32(ref result.field19_);
- break;
- }
- case 160: {
- result.hasField20 = input.ReadBool(ref result.field20_);
- break;
- }
- case 169: {
- result.hasField21 = input.ReadFixed64(ref result.field21_);
- break;
- }
- case 176: {
- result.hasField22 = input.ReadInt32(ref result.field22_);
- break;
- }
- case 184: {
- result.hasField23 = input.ReadBool(ref result.field23_);
- break;
- }
- case 224: {
- result.hasField28 = input.ReadBool(ref result.field28_);
- break;
- }
- case 1629: {
- result.hasField203 = input.ReadFixed32(ref result.field203_);
- break;
- }
- case 1632: {
- result.hasField204 = input.ReadInt32(ref result.field204_);
- break;
- }
- case 1642: {
- result.hasField205 = input.ReadString(ref result.field205_);
- break;
- }
- case 1648: {
- result.hasField206 = input.ReadBool(ref result.field206_);
- break;
- }
- case 1656: {
- result.hasField207 = input.ReadUInt64(ref result.field207_);
- break;
- }
- case 2400: {
- result.hasField300 = input.ReadUInt64(ref result.field300_);
- break;
- }
- }
- }
-
- if (unknownFields != null) {
- this.UnknownFields = unknownFields.Build();
- }
- return this;
- }
-
-
- public bool HasField1 {
- get { return result.hasField1; }
- }
- public int Field1 {
- get { return result.Field1; }
- set { SetField1(value); }
- }
- public Builder SetField1(int value) {
- PrepareBuilder();
- result.hasField1 = true;
- result.field1_ = value;
- return this;
- }
- public Builder ClearField1() {
- PrepareBuilder();
- result.hasField1 = false;
- result.field1_ = 0;
- return this;
- }
-
- public bool HasField2 {
- get { return result.hasField2; }
- }
- public int Field2 {
- get { return result.Field2; }
- set { SetField2(value); }
- }
- public Builder SetField2(int value) {
- PrepareBuilder();
- result.hasField2 = true;
- result.field2_ = value;
- return this;
- }
- public Builder ClearField2() {
- PrepareBuilder();
- result.hasField2 = false;
- result.field2_ = 0;
- return this;
- }
-
- public bool HasField3 {
- get { return result.hasField3; }
- }
- public int Field3 {
- get { return result.Field3; }
- set { SetField3(value); }
- }
- public Builder SetField3(int value) {
- PrepareBuilder();
- result.hasField3 = true;
- result.field3_ = value;
- return this;
- }
- public Builder ClearField3() {
- PrepareBuilder();
- result.hasField3 = false;
- result.field3_ = 0;
- return this;
- }
-
- public bool HasField15 {
- get { return result.hasField15; }
- }
- public string Field15 {
- get { return result.Field15; }
- set { SetField15(value); }
- }
- public Builder SetField15(string value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.hasField15 = true;
- result.field15_ = value;
- return this;
- }
- public Builder ClearField15() {
- PrepareBuilder();
- result.hasField15 = false;
- result.field15_ = "";
- return this;
- }
-
- public bool HasField12 {
- get { return result.hasField12; }
- }
- public bool Field12 {
- get { return result.Field12; }
- set { SetField12(value); }
- }
- public Builder SetField12(bool value) {
- PrepareBuilder();
- result.hasField12 = true;
- result.field12_ = value;
- return this;
- }
- public Builder ClearField12() {
- PrepareBuilder();
- result.hasField12 = false;
- result.field12_ = true;
- return this;
- }
-
- public bool HasField13 {
- get { return result.hasField13; }
- }
- public long Field13 {
- get { return result.Field13; }
- set { SetField13(value); }
- }
- public Builder SetField13(long value) {
- PrepareBuilder();
- result.hasField13 = true;
- result.field13_ = value;
- return this;
- }
- public Builder ClearField13() {
- PrepareBuilder();
- result.hasField13 = false;
- result.field13_ = 0L;
- return this;
- }
-
- public bool HasField14 {
- get { return result.hasField14; }
- }
- public long Field14 {
- get { return result.Field14; }
- set { SetField14(value); }
- }
- public Builder SetField14(long value) {
- PrepareBuilder();
- result.hasField14 = true;
- result.field14_ = value;
- return this;
- }
- public Builder ClearField14() {
- PrepareBuilder();
- result.hasField14 = false;
- result.field14_ = 0L;
- return this;
- }
-
- public bool HasField16 {
- get { return result.hasField16; }
- }
- public int Field16 {
- get { return result.Field16; }
- set { SetField16(value); }
- }
- public Builder SetField16(int value) {
- PrepareBuilder();
- result.hasField16 = true;
- result.field16_ = value;
- return this;
- }
- public Builder ClearField16() {
- PrepareBuilder();
- result.hasField16 = false;
- result.field16_ = 0;
- return this;
- }
-
- public bool HasField19 {
- get { return result.hasField19; }
- }
- public int Field19 {
- get { return result.Field19; }
- set { SetField19(value); }
- }
- public Builder SetField19(int value) {
- PrepareBuilder();
- result.hasField19 = true;
- result.field19_ = value;
- return this;
- }
- public Builder ClearField19() {
- PrepareBuilder();
- result.hasField19 = false;
- result.field19_ = 2;
- return this;
- }
-
- public bool HasField20 {
- get { return result.hasField20; }
- }
- public bool Field20 {
- get { return result.Field20; }
- set { SetField20(value); }
- }
- public Builder SetField20(bool value) {
- PrepareBuilder();
- result.hasField20 = true;
- result.field20_ = value;
- return this;
- }
- public Builder ClearField20() {
- PrepareBuilder();
- result.hasField20 = false;
- result.field20_ = true;
- return this;
- }
-
- public bool HasField28 {
- get { return result.hasField28; }
- }
- public bool Field28 {
- get { return result.Field28; }
- set { SetField28(value); }
- }
- public Builder SetField28(bool value) {
- PrepareBuilder();
- result.hasField28 = true;
- result.field28_ = value;
- return this;
- }
- public Builder ClearField28() {
- PrepareBuilder();
- result.hasField28 = false;
- result.field28_ = true;
- return this;
- }
-
- public bool HasField21 {
- get { return result.hasField21; }
- }
- [global::System.CLSCompliant(false)]
- public ulong Field21 {
- get { return result.Field21; }
- set { SetField21(value); }
- }
- [global::System.CLSCompliant(false)]
- public Builder SetField21(ulong value) {
- PrepareBuilder();
- result.hasField21 = true;
- result.field21_ = value;
- return this;
- }
- public Builder ClearField21() {
- PrepareBuilder();
- result.hasField21 = false;
- result.field21_ = 0;
- return this;
- }
-
- public bool HasField22 {
- get { return result.hasField22; }
- }
- public int Field22 {
- get { return result.Field22; }
- set { SetField22(value); }
- }
- public Builder SetField22(int value) {
- PrepareBuilder();
- result.hasField22 = true;
- result.field22_ = value;
- return this;
- }
- public Builder ClearField22() {
- PrepareBuilder();
- result.hasField22 = false;
- result.field22_ = 0;
- return this;
- }
-
- public bool HasField23 {
- get { return result.hasField23; }
- }
- public bool Field23 {
- get { return result.Field23; }
- set { SetField23(value); }
- }
- public Builder SetField23(bool value) {
- PrepareBuilder();
- result.hasField23 = true;
- result.field23_ = value;
- return this;
- }
- public Builder ClearField23() {
- PrepareBuilder();
- result.hasField23 = false;
- result.field23_ = false;
- return this;
- }
-
- public bool HasField206 {
- get { return result.hasField206; }
- }
- public bool Field206 {
- get { return result.Field206; }
- set { SetField206(value); }
- }
- public Builder SetField206(bool value) {
- PrepareBuilder();
- result.hasField206 = true;
- result.field206_ = value;
- return this;
- }
- public Builder ClearField206() {
- PrepareBuilder();
- result.hasField206 = false;
- result.field206_ = false;
- return this;
- }
-
- public bool HasField203 {
- get { return result.hasField203; }
- }
- [global::System.CLSCompliant(false)]
- public uint Field203 {
- get { return result.Field203; }
- set { SetField203(value); }
- }
- [global::System.CLSCompliant(false)]
- public Builder SetField203(uint value) {
- PrepareBuilder();
- result.hasField203 = true;
- result.field203_ = value;
- return this;
- }
- public Builder ClearField203() {
- PrepareBuilder();
- result.hasField203 = false;
- result.field203_ = 0;
- return this;
- }
-
- public bool HasField204 {
- get { return result.hasField204; }
- }
- public int Field204 {
- get { return result.Field204; }
- set { SetField204(value); }
- }
- public Builder SetField204(int value) {
- PrepareBuilder();
- result.hasField204 = true;
- result.field204_ = value;
- return this;
- }
- public Builder ClearField204() {
- PrepareBuilder();
- result.hasField204 = false;
- result.field204_ = 0;
- return this;
- }
-
- public bool HasField205 {
- get { return result.hasField205; }
- }
- public string Field205 {
- get { return result.Field205; }
- set { SetField205(value); }
- }
- public Builder SetField205(string value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.hasField205 = true;
- result.field205_ = value;
- return this;
- }
- public Builder ClearField205() {
- PrepareBuilder();
- result.hasField205 = false;
- result.field205_ = "";
- return this;
- }
-
- public bool HasField207 {
- get { return result.hasField207; }
- }
- [global::System.CLSCompliant(false)]
- public ulong Field207 {
- get { return result.Field207; }
- set { SetField207(value); }
- }
- [global::System.CLSCompliant(false)]
- public Builder SetField207(ulong value) {
- PrepareBuilder();
- result.hasField207 = true;
- result.field207_ = value;
- return this;
- }
- public Builder ClearField207() {
- PrepareBuilder();
- result.hasField207 = false;
- result.field207_ = 0UL;
- return this;
- }
-
- public bool HasField300 {
- get { return result.hasField300; }
- }
- [global::System.CLSCompliant(false)]
- public ulong Field300 {
- get { return result.Field300; }
- set { SetField300(value); }
- }
- [global::System.CLSCompliant(false)]
- public Builder SetField300(ulong value) {
- PrepareBuilder();
- result.hasField300 = true;
- result.field300_ = value;
- return this;
- }
- public Builder ClearField300() {
- PrepareBuilder();
- result.hasField300 = false;
- result.field300_ = 0UL;
- return this;
- }
- }
- static SpeedMessage1SubMessage() {
- object.ReferenceEquals(global::Google.ProtocolBuffers.ProtoBench.GoogleSpeedProtoFile.Descriptor, null);
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class SpeedMessage2 : pb::GeneratedMessage<SpeedMessage2, SpeedMessage2.Builder> {
- private SpeedMessage2() { }
- private static readonly SpeedMessage2 defaultInstance = new SpeedMessage2().MakeReadOnly();
- private static readonly string[] _speedMessage2FieldNames = new string[] { "field1", "field109", "field127", "field128", "field129", "field130", "field131", "field2", "field205", "field206", "field21", "field210", "field211", "field212", "field213", "field216", "field217", "field218", "field220", "field221", "field222", "field25", "field3", "field30", "field4", "field6", "field63", "field71", "field75", "group1" };
- private static readonly uint[] _speedMessage2FieldTags = new uint[] { 10, 872, 1018, 1026, 1032, 1040, 1048, 18, 1640, 1648, 168, 1680, 1688, 1696, 1704, 1728, 1736, 1744, 1760, 1768, 1781, 205, 24, 240, 32, 50, 504, 568, 600, 83 };
- public static SpeedMessage2 DefaultInstance {
- get { return defaultInstance; }
- }
-
- public override SpeedMessage2 DefaultInstanceForType {
- get { return DefaultInstance; }
- }
-
- protected override SpeedMessage2 ThisMessage {
- get { return this; }
- }
-
- public static pbd::MessageDescriptor Descriptor {
- get { return global::Google.ProtocolBuffers.ProtoBench.GoogleSpeedProtoFile.internal__static_benchmarks_SpeedMessage2__Descriptor; }
- }
-
- protected override pb::FieldAccess.FieldAccessorTable<SpeedMessage2, SpeedMessage2.Builder> InternalFieldAccessors {
- get { return global::Google.ProtocolBuffers.ProtoBench.GoogleSpeedProtoFile.internal__static_benchmarks_SpeedMessage2__FieldAccessorTable; }
- }
-
- #region Nested types
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public static partial class Types {
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class Group1 : pb::GeneratedMessage<Group1, Group1.Builder> {
- private Group1() { }
- private static readonly Group1 defaultInstance = new Group1().MakeReadOnly();
- private static readonly string[] _group1FieldNames = new string[] { "field11", "field12", "field13", "field14", "field15", "field16", "field20", "field22", "field24", "field26", "field27", "field28", "field29", "field31", "field5", "field73" };
- private static readonly uint[] _group1FieldTags = new uint[] { 93, 98, 106, 114, 120, 130, 160, 178, 194, 213, 218, 224, 234, 250, 40, 584 };
- public static Group1 DefaultInstance {
- get { return defaultInstance; }
- }
-
- public override Group1 DefaultInstanceForType {
- get { return DefaultInstance; }
- }
-
- protected override Group1 ThisMessage {
- get { return this; }
- }
-
- public static pbd::MessageDescriptor Descriptor {
- get { return global::Google.ProtocolBuffers.ProtoBench.GoogleSpeedProtoFile.internal__static_benchmarks_SpeedMessage2_Group1__Descriptor; }
- }
-
- protected override pb::FieldAccess.FieldAccessorTable<Group1, Group1.Builder> InternalFieldAccessors {
- get { return global::Google.ProtocolBuffers.ProtoBench.GoogleSpeedProtoFile.internal__static_benchmarks_SpeedMessage2_Group1__FieldAccessorTable; }
- }
-
- public const int Field11FieldNumber = 11;
- private bool hasField11;
- private float field11_;
- public bool HasField11 {
- get { return hasField11; }
- }
- public float Field11 {
- get { return field11_; }
- }
-
- public const int Field26FieldNumber = 26;
- private bool hasField26;
- private float field26_;
- public bool HasField26 {
- get { return hasField26; }
- }
- public float Field26 {
- get { return field26_; }
- }
-
- public const int Field12FieldNumber = 12;
- private bool hasField12;
- private string field12_ = "";
- public bool HasField12 {
- get { return hasField12; }
- }
- public string Field12 {
- get { return field12_; }
- }
-
- public const int Field13FieldNumber = 13;
- private bool hasField13;
- private string field13_ = "";
- public bool HasField13 {
- get { return hasField13; }
- }
- public string Field13 {
- get { return field13_; }
- }
-
- public const int Field14FieldNumber = 14;
- private pbc::PopsicleList<string> field14_ = new pbc::PopsicleList<string>();
- public scg::IList<string> Field14List {
- get { return pbc::Lists.AsReadOnly(field14_); }
- }
- public int Field14Count {
- get { return field14_.Count; }
- }
- public string GetField14(int index) {
- return field14_[index];
- }
-
- public const int Field15FieldNumber = 15;
- private bool hasField15;
- private ulong field15_;
- public bool HasField15 {
- get { return hasField15; }
- }
- [global::System.CLSCompliant(false)]
- public ulong Field15 {
- get { return field15_; }
- }
-
- public const int Field5FieldNumber = 5;
- private bool hasField5;
- private int field5_;
- public bool HasField5 {
- get { return hasField5; }
- }
- public int Field5 {
- get { return field5_; }
- }
-
- public const int Field27FieldNumber = 27;
- private bool hasField27;
- private string field27_ = "";
- public bool HasField27 {
- get { return hasField27; }
- }
- public string Field27 {
- get { return field27_; }
- }
-
- public const int Field28FieldNumber = 28;
- private bool hasField28;
- private int field28_;
- public bool HasField28 {
- get { return hasField28; }
- }
- public int Field28 {
- get { return field28_; }
- }
-
- public const int Field29FieldNumber = 29;
- private bool hasField29;
- private string field29_ = "";
- public bool HasField29 {
- get { return hasField29; }
- }
- public string Field29 {
- get { return field29_; }
- }
-
- public const int Field16FieldNumber = 16;
- private bool hasField16;
- private string field16_ = "";
- public bool HasField16 {
- get { return hasField16; }
- }
- public string Field16 {
- get { return field16_; }
- }
-
- public const int Field22FieldNumber = 22;
- private pbc::PopsicleList<string> field22_ = new pbc::PopsicleList<string>();
- public scg::IList<string> Field22List {
- get { return pbc::Lists.AsReadOnly(field22_); }
- }
- public int Field22Count {
- get { return field22_.Count; }
- }
- public string GetField22(int index) {
- return field22_[index];
- }
-
- public const int Field73FieldNumber = 73;
- private pbc::PopsicleList<int> field73_ = new pbc::PopsicleList<int>();
- public scg::IList<int> Field73List {
- get { return pbc::Lists.AsReadOnly(field73_); }
- }
- public int Field73Count {
- get { return field73_.Count; }
- }
- public int GetField73(int index) {
- return field73_[index];
- }
-
- public const int Field20FieldNumber = 20;
- private bool hasField20;
- private int field20_;
- public bool HasField20 {
- get { return hasField20; }
- }
- public int Field20 {
- get { return field20_; }
- }
-
- public const int Field24FieldNumber = 24;
- private bool hasField24;
- private string field24_ = "";
- public bool HasField24 {
- get { return hasField24; }
- }
- public string Field24 {
- get { return field24_; }
- }
-
- public const int Field31FieldNumber = 31;
- private bool hasField31;
- private global::Google.ProtocolBuffers.ProtoBench.SpeedMessage2GroupedMessage field31_;
- public bool HasField31 {
- get { return hasField31; }
- }
- public global::Google.ProtocolBuffers.ProtoBench.SpeedMessage2GroupedMessage Field31 {
- get { return field31_ ?? global::Google.ProtocolBuffers.ProtoBench.SpeedMessage2GroupedMessage.DefaultInstance; }
- }
-
- public override bool IsInitialized {
- get {
- if (!hasField11) return false;
- if (!hasField15) return false;
- return true;
- }
- }
-
- public override void WriteTo(pb::ICodedOutputStream output) {
- CalcSerializedSize();
- string[] field_names = _group1FieldNames;
- if (hasField5) {
- output.WriteInt32(5, field_names[14], Field5);
- }
- if (hasField11) {
- output.WriteFloat(11, field_names[0], Field11);
- }
- if (hasField12) {
- output.WriteString(12, field_names[1], Field12);
- }
- if (hasField13) {
- output.WriteString(13, field_names[2], Field13);
- }
- if (field14_.Count > 0) {
- output.WriteStringArray(14, field_names[3], field14_);
- }
- if (hasField15) {
- output.WriteUInt64(15, field_names[4], Field15);
- }
- if (hasField16) {
- output.WriteString(16, field_names[5], Field16);
- }
- if (hasField20) {
- output.WriteInt32(20, field_names[6], Field20);
- }
- if (field22_.Count > 0) {
- output.WriteStringArray(22, field_names[7], field22_);
- }
- if (hasField24) {
- output.WriteString(24, field_names[8], Field24);
- }
- if (hasField26) {
- output.WriteFloat(26, field_names[9], Field26);
- }
- if (hasField27) {
- output.WriteString(27, field_names[10], Field27);
- }
- if (hasField28) {
- output.WriteInt32(28, field_names[11], Field28);
- }
- if (hasField29) {
- output.WriteString(29, field_names[12], Field29);
- }
- if (hasField31) {
- output.WriteMessage(31, field_names[13], Field31);
- }
- if (field73_.Count > 0) {
- output.WriteInt32Array(73, field_names[15], field73_);
- }
- UnknownFields.WriteTo(output);
- }
-
- private int memoizedSerializedSize = -1;
- public override int SerializedSize {
- get {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
- return CalcSerializedSize();
- }
- }
-
- private int CalcSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- if (hasField11) {
- size += pb::CodedOutputStream.ComputeFloatSize(11, Field11);
- }
- if (hasField26) {
- size += pb::CodedOutputStream.ComputeFloatSize(26, Field26);
- }
- if (hasField12) {
- size += pb::CodedOutputStream.ComputeStringSize(12, Field12);
- }
- if (hasField13) {
- size += pb::CodedOutputStream.ComputeStringSize(13, Field13);
- }
- {
- int dataSize = 0;
- foreach (string element in Field14List) {
- dataSize += pb::CodedOutputStream.ComputeStringSizeNoTag(element);
- }
- size += dataSize;
- size += 1 * field14_.Count;
- }
- if (hasField15) {
- size += pb::CodedOutputStream.ComputeUInt64Size(15, Field15);
- }
- if (hasField5) {
- size += pb::CodedOutputStream.ComputeInt32Size(5, Field5);
- }
- if (hasField27) {
- size += pb::CodedOutputStream.ComputeStringSize(27, Field27);
- }
- if (hasField28) {
- size += pb::CodedOutputStream.ComputeInt32Size(28, Field28);
- }
- if (hasField29) {
- size += pb::CodedOutputStream.ComputeStringSize(29, Field29);
- }
- if (hasField16) {
- size += pb::CodedOutputStream.ComputeStringSize(16, Field16);
- }
- {
- int dataSize = 0;
- foreach (string element in Field22List) {
- dataSize += pb::CodedOutputStream.ComputeStringSizeNoTag(element);
- }
- size += dataSize;
- size += 2 * field22_.Count;
- }
- {
- int dataSize = 0;
- foreach (int element in Field73List) {
- dataSize += pb::CodedOutputStream.ComputeInt32SizeNoTag(element);
- }
- size += dataSize;
- size += 2 * field73_.Count;
- }
- if (hasField20) {
- size += pb::CodedOutputStream.ComputeInt32Size(20, Field20);
- }
- if (hasField24) {
- size += pb::CodedOutputStream.ComputeStringSize(24, Field24);
- }
- if (hasField31) {
- size += pb::CodedOutputStream.ComputeMessageSize(31, Field31);
- }
- size += UnknownFields.SerializedSize;
- memoizedSerializedSize = size;
- return size;
- }
- public static Group1 ParseFrom(pb::ByteString data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static Group1 ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static Group1 ParseFrom(byte[] data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static Group1 ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static Group1 ParseFrom(global::System.IO.Stream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static Group1 ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- public static Group1 ParseDelimitedFrom(global::System.IO.Stream input) {
- return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
- }
- public static Group1 ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
- }
- public static Group1 ParseFrom(pb::ICodedInputStream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static Group1 ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- private Group1 MakeReadOnly() {
- field14_.MakeReadOnly();
- field22_.MakeReadOnly();
- field73_.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(Group1 prototype) {
- return new Builder(prototype);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class Builder : pb::GeneratedBuilder<Group1, Builder> {
- protected override Builder ThisBuilder {
- get { return this; }
- }
- public Builder() {
- result = DefaultInstance;
- resultIsReadOnly = true;
- }
- internal Builder(Group1 cloneFrom) {
- result = cloneFrom;
- resultIsReadOnly = true;
- }
-
- private bool resultIsReadOnly;
- private Group1 result;
-
- private Group1 PrepareBuilder() {
- if (resultIsReadOnly) {
- Group1 original = result;
- result = new Group1();
- resultIsReadOnly = false;
- MergeFrom(original);
- }
- return result;
- }
-
- public override bool IsInitialized {
- get { return result.IsInitialized; }
- }
-
- protected override Group1 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.ProtoBench.SpeedMessage2.Types.Group1.Descriptor; }
- }
-
- public override Group1 DefaultInstanceForType {
- get { return global::Google.ProtocolBuffers.ProtoBench.SpeedMessage2.Types.Group1.DefaultInstance; }
- }
-
- public override Group1 BuildPartial() {
- if (resultIsReadOnly) {
- return result;
- }
- resultIsReadOnly = true;
- return result.MakeReadOnly();
- }
-
- public override Builder MergeFrom(pb::IMessage other) {
- if (other is Group1) {
- return MergeFrom((Group1) other);
- } else {
- base.MergeFrom(other);
- return this;
- }
- }
-
- public override Builder MergeFrom(Group1 other) {
- if (other == global::Google.ProtocolBuffers.ProtoBench.SpeedMessage2.Types.Group1.DefaultInstance) return this;
- PrepareBuilder();
- if (other.HasField11) {
- Field11 = other.Field11;
- }
- if (other.HasField26) {
- Field26 = other.Field26;
- }
- if (other.HasField12) {
- Field12 = other.Field12;
- }
- if (other.HasField13) {
- Field13 = other.Field13;
- }
- if (other.field14_.Count != 0) {
- result.field14_.Add(other.field14_);
- }
- if (other.HasField15) {
- Field15 = other.Field15;
- }
- if (other.HasField5) {
- Field5 = other.Field5;
- }
- if (other.HasField27) {
- Field27 = other.Field27;
- }
- if (other.HasField28) {
- Field28 = other.Field28;
- }
- if (other.HasField29) {
- Field29 = other.Field29;
- }
- if (other.HasField16) {
- Field16 = other.Field16;
- }
- if (other.field22_.Count != 0) {
- result.field22_.Add(other.field22_);
- }
- if (other.field73_.Count != 0) {
- result.field73_.Add(other.field73_);
- }
- if (other.HasField20) {
- Field20 = other.Field20;
- }
- if (other.HasField24) {
- Field24 = other.Field24;
- }
- if (other.HasField31) {
- MergeField31(other.Field31);
- }
- 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(_group1FieldNames, field_name, global::System.StringComparer.Ordinal);
- if(field_ordinal >= 0)
- tag = _group1FieldTags[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 40: {
- result.hasField5 = input.ReadInt32(ref result.field5_);
- break;
- }
- case 93: {
- result.hasField11 = input.ReadFloat(ref result.field11_);
- break;
- }
- case 98: {
- result.hasField12 = input.ReadString(ref result.field12_);
- break;
- }
- case 106: {
- result.hasField13 = input.ReadString(ref result.field13_);
- break;
- }
- case 114: {
- input.ReadStringArray(tag, field_name, result.field14_);
- break;
- }
- case 120: {
- result.hasField15 = input.ReadUInt64(ref result.field15_);
- break;
- }
- case 130: {
- result.hasField16 = input.ReadString(ref result.field16_);
- break;
- }
- case 160: {
- result.hasField20 = input.ReadInt32(ref result.field20_);
- break;
- }
- case 178: {
- input.ReadStringArray(tag, field_name, result.field22_);
- break;
- }
- case 194: {
- result.hasField24 = input.ReadString(ref result.field24_);
- break;
- }
- case 213: {
- result.hasField26 = input.ReadFloat(ref result.field26_);
- break;
- }
- case 218: {
- result.hasField27 = input.ReadString(ref result.field27_);
- break;
- }
- case 224: {
- result.hasField28 = input.ReadInt32(ref result.field28_);
- break;
- }
- case 234: {
- result.hasField29 = input.ReadString(ref result.field29_);
- break;
- }
- case 250: {
- global::Google.ProtocolBuffers.ProtoBench.SpeedMessage2GroupedMessage.Builder subBuilder = global::Google.ProtocolBuffers.ProtoBench.SpeedMessage2GroupedMessage.CreateBuilder();
- if (result.hasField31) {
- subBuilder.MergeFrom(Field31);
- }
- input.ReadMessage(subBuilder, extensionRegistry);
- Field31 = subBuilder.BuildPartial();
- break;
- }
- case 586:
- case 584: {
- input.ReadInt32Array(tag, field_name, result.field73_);
- break;
- }
- }
- }
-
- if (unknownFields != null) {
- this.UnknownFields = unknownFields.Build();
- }
- return this;
- }
-
-
- public bool HasField11 {
- get { return result.hasField11; }
- }
- public float Field11 {
- get { return result.Field11; }
- set { SetField11(value); }
- }
- public Builder SetField11(float value) {
- PrepareBuilder();
- result.hasField11 = true;
- result.field11_ = value;
- return this;
- }
- public Builder ClearField11() {
- PrepareBuilder();
- result.hasField11 = false;
- result.field11_ = 0F;
- return this;
- }
-
- public bool HasField26 {
- get { return result.hasField26; }
- }
- public float Field26 {
- get { return result.Field26; }
- set { SetField26(value); }
- }
- public Builder SetField26(float value) {
- PrepareBuilder();
- result.hasField26 = true;
- result.field26_ = value;
- return this;
- }
- public Builder ClearField26() {
- PrepareBuilder();
- result.hasField26 = false;
- result.field26_ = 0F;
- return this;
- }
-
- public bool HasField12 {
- get { return result.hasField12; }
- }
- public string Field12 {
- get { return result.Field12; }
- set { SetField12(value); }
- }
- public Builder SetField12(string value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.hasField12 = true;
- result.field12_ = value;
- return this;
- }
- public Builder ClearField12() {
- PrepareBuilder();
- result.hasField12 = false;
- result.field12_ = "";
- return this;
- }
-
- public bool HasField13 {
- get { return result.hasField13; }
- }
- public string Field13 {
- get { return result.Field13; }
- set { SetField13(value); }
- }
- public Builder SetField13(string value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.hasField13 = true;
- result.field13_ = value;
- return this;
- }
- public Builder ClearField13() {
- PrepareBuilder();
- result.hasField13 = false;
- result.field13_ = "";
- return this;
- }
-
- public pbc::IPopsicleList<string> Field14List {
- get { return PrepareBuilder().field14_; }
- }
- public int Field14Count {
- get { return result.Field14Count; }
- }
- public string GetField14(int index) {
- return result.GetField14(index);
- }
- public Builder SetField14(int index, string value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.field14_[index] = value;
- return this;
- }
- public Builder AddField14(string value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.field14_.Add(value);
- return this;
- }
- public Builder AddRangeField14(scg::IEnumerable<string> values) {
- PrepareBuilder();
- result.field14_.Add(values);
- return this;
- }
- public Builder ClearField14() {
- PrepareBuilder();
- result.field14_.Clear();
- return this;
- }
-
- public bool HasField15 {
- get { return result.hasField15; }
- }
- [global::System.CLSCompliant(false)]
- public ulong Field15 {
- get { return result.Field15; }
- set { SetField15(value); }
- }
- [global::System.CLSCompliant(false)]
- public Builder SetField15(ulong value) {
- PrepareBuilder();
- result.hasField15 = true;
- result.field15_ = value;
- return this;
- }
- public Builder ClearField15() {
- PrepareBuilder();
- result.hasField15 = false;
- result.field15_ = 0UL;
- return this;
- }
-
- public bool HasField5 {
- get { return result.hasField5; }
- }
- public int Field5 {
- get { return result.Field5; }
- set { SetField5(value); }
- }
- public Builder SetField5(int value) {
- PrepareBuilder();
- result.hasField5 = true;
- result.field5_ = value;
- return this;
- }
- public Builder ClearField5() {
- PrepareBuilder();
- result.hasField5 = false;
- result.field5_ = 0;
- return this;
- }
-
- public bool HasField27 {
- get { return result.hasField27; }
- }
- public string Field27 {
- get { return result.Field27; }
- set { SetField27(value); }
- }
- public Builder SetField27(string value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.hasField27 = true;
- result.field27_ = value;
- return this;
- }
- public Builder ClearField27() {
- PrepareBuilder();
- result.hasField27 = false;
- result.field27_ = "";
- return this;
- }
-
- public bool HasField28 {
- get { return result.hasField28; }
- }
- public int Field28 {
- get { return result.Field28; }
- set { SetField28(value); }
- }
- public Builder SetField28(int value) {
- PrepareBuilder();
- result.hasField28 = true;
- result.field28_ = value;
- return this;
- }
- public Builder ClearField28() {
- PrepareBuilder();
- result.hasField28 = false;
- result.field28_ = 0;
- return this;
- }
-
- public bool HasField29 {
- get { return result.hasField29; }
- }
- public string Field29 {
- get { return result.Field29; }
- set { SetField29(value); }
- }
- public Builder SetField29(string value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.hasField29 = true;
- result.field29_ = value;
- return this;
- }
- public Builder ClearField29() {
- PrepareBuilder();
- result.hasField29 = false;
- result.field29_ = "";
- return this;
- }
-
- public bool HasField16 {
- get { return result.hasField16; }
- }
- public string Field16 {
- get { return result.Field16; }
- set { SetField16(value); }
- }
- public Builder SetField16(string value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.hasField16 = true;
- result.field16_ = value;
- return this;
- }
- public Builder ClearField16() {
- PrepareBuilder();
- result.hasField16 = false;
- result.field16_ = "";
- return this;
- }
-
- public pbc::IPopsicleList<string> Field22List {
- get { return PrepareBuilder().field22_; }
- }
- public int Field22Count {
- get { return result.Field22Count; }
- }
- public string GetField22(int index) {
- return result.GetField22(index);
- }
- public Builder SetField22(int index, string value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.field22_[index] = value;
- return this;
- }
- public Builder AddField22(string value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.field22_.Add(value);
- return this;
- }
- public Builder AddRangeField22(scg::IEnumerable<string> values) {
- PrepareBuilder();
- result.field22_.Add(values);
- return this;
- }
- public Builder ClearField22() {
- PrepareBuilder();
- result.field22_.Clear();
- return this;
- }
-
- public pbc::IPopsicleList<int> Field73List {
- get { return PrepareBuilder().field73_; }
- }
- public int Field73Count {
- get { return result.Field73Count; }
- }
- public int GetField73(int index) {
- return result.GetField73(index);
- }
- public Builder SetField73(int index, int value) {
- PrepareBuilder();
- result.field73_[index] = value;
- return this;
- }
- public Builder AddField73(int value) {
- PrepareBuilder();
- result.field73_.Add(value);
- return this;
- }
- public Builder AddRangeField73(scg::IEnumerable<int> values) {
- PrepareBuilder();
- result.field73_.Add(values);
- return this;
- }
- public Builder ClearField73() {
- PrepareBuilder();
- result.field73_.Clear();
- return this;
- }
-
- public bool HasField20 {
- get { return result.hasField20; }
- }
- public int Field20 {
- get { return result.Field20; }
- set { SetField20(value); }
- }
- public Builder SetField20(int value) {
- PrepareBuilder();
- result.hasField20 = true;
- result.field20_ = value;
- return this;
- }
- public Builder ClearField20() {
- PrepareBuilder();
- result.hasField20 = false;
- result.field20_ = 0;
- return this;
- }
-
- public bool HasField24 {
- get { return result.hasField24; }
- }
- public string Field24 {
- get { return result.Field24; }
- set { SetField24(value); }
- }
- public Builder SetField24(string value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.hasField24 = true;
- result.field24_ = value;
- return this;
- }
- public Builder ClearField24() {
- PrepareBuilder();
- result.hasField24 = false;
- result.field24_ = "";
- return this;
- }
-
- public bool HasField31 {
- get { return result.hasField31; }
- }
- public global::Google.ProtocolBuffers.ProtoBench.SpeedMessage2GroupedMessage Field31 {
- get { return result.Field31; }
- set { SetField31(value); }
- }
- public Builder SetField31(global::Google.ProtocolBuffers.ProtoBench.SpeedMessage2GroupedMessage value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.hasField31 = true;
- result.field31_ = value;
- return this;
- }
- public Builder SetField31(global::Google.ProtocolBuffers.ProtoBench.SpeedMessage2GroupedMessage.Builder builderForValue) {
- pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
- PrepareBuilder();
- result.hasField31 = true;
- result.field31_ = builderForValue.Build();
- return this;
- }
- public Builder MergeField31(global::Google.ProtocolBuffers.ProtoBench.SpeedMessage2GroupedMessage value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- if (result.hasField31 &&
- result.field31_ != global::Google.ProtocolBuffers.ProtoBench.SpeedMessage2GroupedMessage.DefaultInstance) {
- result.field31_ = global::Google.ProtocolBuffers.ProtoBench.SpeedMessage2GroupedMessage.CreateBuilder(result.field31_).MergeFrom(value).BuildPartial();
- } else {
- result.field31_ = value;
- }
- result.hasField31 = true;
- return this;
- }
- public Builder ClearField31() {
- PrepareBuilder();
- result.hasField31 = false;
- result.field31_ = null;
- return this;
- }
- }
- static Group1() {
- object.ReferenceEquals(global::Google.ProtocolBuffers.ProtoBench.GoogleSpeedProtoFile.Descriptor, null);
- }
- }
-
- }
- #endregion
-
- public const int Field1FieldNumber = 1;
- private bool hasField1;
- private string field1_ = "";
- public bool HasField1 {
- get { return hasField1; }
- }
- public string Field1 {
- get { return field1_; }
- }
-
- public const int Field3FieldNumber = 3;
- private bool hasField3;
- private long field3_;
- public bool HasField3 {
- get { return hasField3; }
- }
- public long Field3 {
- get { return field3_; }
- }
-
- public const int Field4FieldNumber = 4;
- private bool hasField4;
- private long field4_;
- public bool HasField4 {
- get { return hasField4; }
- }
- public long Field4 {
- get { return field4_; }
- }
-
- public const int Field30FieldNumber = 30;
- private bool hasField30;
- private long field30_;
- public bool HasField30 {
- get { return hasField30; }
- }
- public long Field30 {
- get { return field30_; }
- }
-
- public const int Field75FieldNumber = 75;
- private bool hasField75;
- private bool field75_;
- public bool HasField75 {
- get { return hasField75; }
- }
- public bool Field75 {
- get { return field75_; }
- }
-
- public const int Field6FieldNumber = 6;
- private bool hasField6;
- private string field6_ = "";
- public bool HasField6 {
- get { return hasField6; }
- }
- public string Field6 {
- get { return field6_; }
- }
-
- public const int Field2FieldNumber = 2;
- private bool hasField2;
- private pb::ByteString field2_ = pb::ByteString.Empty;
- public bool HasField2 {
- get { return hasField2; }
- }
- public pb::ByteString Field2 {
- get { return field2_; }
- }
-
- public const int Field21FieldNumber = 21;
- private bool hasField21;
- private int field21_;
- public bool HasField21 {
- get { return hasField21; }
- }
- public int Field21 {
- get { return field21_; }
- }
-
- public const int Field71FieldNumber = 71;
- private bool hasField71;
- private int field71_;
- public bool HasField71 {
- get { return hasField71; }
- }
- public int Field71 {
- get { return field71_; }
- }
-
- public const int Field25FieldNumber = 25;
- private bool hasField25;
- private float field25_;
- public bool HasField25 {
- get { return hasField25; }
- }
- public float Field25 {
- get { return field25_; }
- }
-
- public const int Field109FieldNumber = 109;
- private bool hasField109;
- private int field109_;
- public bool HasField109 {
- get { return hasField109; }
- }
- public int Field109 {
- get { return field109_; }
- }
-
- public const int Field210FieldNumber = 210;
- private bool hasField210;
- private int field210_;
- public bool HasField210 {
- get { return hasField210; }
- }
- public int Field210 {
- get { return field210_; }
- }
-
- public const int Field211FieldNumber = 211;
- private bool hasField211;
- private int field211_;
- public bool HasField211 {
- get { return hasField211; }
- }
- public int Field211 {
- get { return field211_; }
- }
-
- public const int Field212FieldNumber = 212;
- private bool hasField212;
- private int field212_;
- public bool HasField212 {
- get { return hasField212; }
- }
- public int Field212 {
- get { return field212_; }
- }
-
- public const int Field213FieldNumber = 213;
- private bool hasField213;
- private int field213_;
- public bool HasField213 {
- get { return hasField213; }
- }
- public int Field213 {
- get { return field213_; }
- }
-
- public const int Field216FieldNumber = 216;
- private bool hasField216;
- private int field216_;
- public bool HasField216 {
- get { return hasField216; }
- }
- public int Field216 {
- get { return field216_; }
- }
-
- public const int Field217FieldNumber = 217;
- private bool hasField217;
- private int field217_;
- public bool HasField217 {
- get { return hasField217; }
- }
- public int Field217 {
- get { return field217_; }
- }
-
- public const int Field218FieldNumber = 218;
- private bool hasField218;
- private int field218_;
- public bool HasField218 {
- get { return hasField218; }
- }
- public int Field218 {
- get { return field218_; }
- }
-
- public const int Field220FieldNumber = 220;
- private bool hasField220;
- private int field220_;
- public bool HasField220 {
- get { return hasField220; }
- }
- public int Field220 {
- get { return field220_; }
- }
-
- public const int Field221FieldNumber = 221;
- private bool hasField221;
- private int field221_;
- public bool HasField221 {
- get { return hasField221; }
- }
- public int Field221 {
- get { return field221_; }
- }
-
- public const int Field222FieldNumber = 222;
- private bool hasField222;
- private float field222_;
- public bool HasField222 {
- get { return hasField222; }
- }
- public float Field222 {
- get { return field222_; }
- }
-
- public const int Field63FieldNumber = 63;
- private bool hasField63;
- private int field63_;
- public bool HasField63 {
- get { return hasField63; }
- }
- public int Field63 {
- get { return field63_; }
- }
-
- public const int Group1FieldNumber = 10;
- private pbc::PopsicleList<global::Google.ProtocolBuffers.ProtoBench.SpeedMessage2.Types.Group1> group1_ = new pbc::PopsicleList<global::Google.ProtocolBuffers.ProtoBench.SpeedMessage2.Types.Group1>();
- public scg::IList<global::Google.ProtocolBuffers.ProtoBench.SpeedMessage2.Types.Group1> Group1List {
- get { return group1_; }
- }
- public int Group1Count {
- get { return group1_.Count; }
- }
- public global::Google.ProtocolBuffers.ProtoBench.SpeedMessage2.Types.Group1 GetGroup1(int index) {
- return group1_[index];
- }
-
- public const int Field128FieldNumber = 128;
- private pbc::PopsicleList<string> field128_ = new pbc::PopsicleList<string>();
- public scg::IList<string> Field128List {
- get { return pbc::Lists.AsReadOnly(field128_); }
- }
- public int Field128Count {
- get { return field128_.Count; }
- }
- public string GetField128(int index) {
- return field128_[index];
- }
-
- public const int Field131FieldNumber = 131;
- private bool hasField131;
- private long field131_;
- public bool HasField131 {
- get { return hasField131; }
- }
- public long Field131 {
- get { return field131_; }
- }
-
- public const int Field127FieldNumber = 127;
- private pbc::PopsicleList<string> field127_ = new pbc::PopsicleList<string>();
- public scg::IList<string> Field127List {
- get { return pbc::Lists.AsReadOnly(field127_); }
- }
- public int Field127Count {
- get { return field127_.Count; }
- }
- public string GetField127(int index) {
- return field127_[index];
- }
-
- public const int Field129FieldNumber = 129;
- private bool hasField129;
- private int field129_;
- public bool HasField129 {
- get { return hasField129; }
- }
- public int Field129 {
- get { return field129_; }
- }
-
- public const int Field130FieldNumber = 130;
- private pbc::PopsicleList<long> field130_ = new pbc::PopsicleList<long>();
- public scg::IList<long> Field130List {
- get { return pbc::Lists.AsReadOnly(field130_); }
- }
- public int Field130Count {
- get { return field130_.Count; }
- }
- public long GetField130(int index) {
- return field130_[index];
- }
-
- public const int Field205FieldNumber = 205;
- private bool hasField205;
- private bool field205_;
- public bool HasField205 {
- get { return hasField205; }
- }
- public bool Field205 {
- get { return field205_; }
- }
-
- public const int Field206FieldNumber = 206;
- private bool hasField206;
- private bool field206_;
- public bool HasField206 {
- get { return hasField206; }
- }
- public bool Field206 {
- get { return field206_; }
- }
-
- public override bool IsInitialized {
- get {
- return true;
- }
- }
-
- public override void WriteTo(pb::ICodedOutputStream output) {
- CalcSerializedSize();
- string[] field_names = _speedMessage2FieldNames;
- if (hasField1) {
- output.WriteString(1, field_names[0], Field1);
- }
- if (hasField2) {
- output.WriteBytes(2, field_names[7], Field2);
- }
- if (hasField3) {
- output.WriteInt64(3, field_names[22], Field3);
- }
- if (hasField4) {
- output.WriteInt64(4, field_names[24], Field4);
- }
- if (hasField6) {
- output.WriteString(6, field_names[25], Field6);
- }
- if (group1_.Count > 0) {
- output.WriteGroupArray(10, field_names[29], group1_);
- }
- if (hasField21) {
- output.WriteInt32(21, field_names[10], Field21);
- }
- if (hasField25) {
- output.WriteFloat(25, field_names[21], Field25);
- }
- if (hasField30) {
- output.WriteInt64(30, field_names[23], Field30);
- }
- if (hasField63) {
- output.WriteInt32(63, field_names[26], Field63);
- }
- if (hasField71) {
- output.WriteInt32(71, field_names[27], Field71);
- }
- if (hasField75) {
- output.WriteBool(75, field_names[28], Field75);
- }
- if (hasField109) {
- output.WriteInt32(109, field_names[1], Field109);
- }
- if (field127_.Count > 0) {
- output.WriteStringArray(127, field_names[2], field127_);
- }
- if (field128_.Count > 0) {
- output.WriteStringArray(128, field_names[3], field128_);
- }
- if (hasField129) {
- output.WriteInt32(129, field_names[4], Field129);
- }
- if (field130_.Count > 0) {
- output.WriteInt64Array(130, field_names[5], field130_);
- }
- if (hasField131) {
- output.WriteInt64(131, field_names[6], Field131);
- }
- if (hasField205) {
- output.WriteBool(205, field_names[8], Field205);
- }
- if (hasField206) {
- output.WriteBool(206, field_names[9], Field206);
- }
- if (hasField210) {
- output.WriteInt32(210, field_names[11], Field210);
- }
- if (hasField211) {
- output.WriteInt32(211, field_names[12], Field211);
- }
- if (hasField212) {
- output.WriteInt32(212, field_names[13], Field212);
- }
- if (hasField213) {
- output.WriteInt32(213, field_names[14], Field213);
- }
- if (hasField216) {
- output.WriteInt32(216, field_names[15], Field216);
- }
- if (hasField217) {
- output.WriteInt32(217, field_names[16], Field217);
- }
- if (hasField218) {
- output.WriteInt32(218, field_names[17], Field218);
- }
- if (hasField220) {
- output.WriteInt32(220, field_names[18], Field220);
- }
- if (hasField221) {
- output.WriteInt32(221, field_names[19], Field221);
- }
- if (hasField222) {
- output.WriteFloat(222, field_names[20], Field222);
- }
- UnknownFields.WriteTo(output);
- }
-
- private int memoizedSerializedSize = -1;
- public override int SerializedSize {
- get {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
- return CalcSerializedSize();
- }
- }
-
- private int CalcSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- if (hasField1) {
- size += pb::CodedOutputStream.ComputeStringSize(1, Field1);
- }
- if (hasField3) {
- size += pb::CodedOutputStream.ComputeInt64Size(3, Field3);
- }
- if (hasField4) {
- size += pb::CodedOutputStream.ComputeInt64Size(4, Field4);
- }
- if (hasField30) {
- size += pb::CodedOutputStream.ComputeInt64Size(30, Field30);
- }
- if (hasField75) {
- size += pb::CodedOutputStream.ComputeBoolSize(75, Field75);
- }
- if (hasField6) {
- size += pb::CodedOutputStream.ComputeStringSize(6, Field6);
- }
- if (hasField2) {
- size += pb::CodedOutputStream.ComputeBytesSize(2, Field2);
- }
- if (hasField21) {
- size += pb::CodedOutputStream.ComputeInt32Size(21, Field21);
- }
- if (hasField71) {
- size += pb::CodedOutputStream.ComputeInt32Size(71, Field71);
- }
- if (hasField25) {
- size += pb::CodedOutputStream.ComputeFloatSize(25, Field25);
- }
- if (hasField109) {
- size += pb::CodedOutputStream.ComputeInt32Size(109, Field109);
- }
- if (hasField210) {
- size += pb::CodedOutputStream.ComputeInt32Size(210, Field210);
- }
- if (hasField211) {
- size += pb::CodedOutputStream.ComputeInt32Size(211, Field211);
- }
- if (hasField212) {
- size += pb::CodedOutputStream.ComputeInt32Size(212, Field212);
- }
- if (hasField213) {
- size += pb::CodedOutputStream.ComputeInt32Size(213, Field213);
- }
- if (hasField216) {
- size += pb::CodedOutputStream.ComputeInt32Size(216, Field216);
- }
- if (hasField217) {
- size += pb::CodedOutputStream.ComputeInt32Size(217, Field217);
- }
- if (hasField218) {
- size += pb::CodedOutputStream.ComputeInt32Size(218, Field218);
- }
- if (hasField220) {
- size += pb::CodedOutputStream.ComputeInt32Size(220, Field220);
- }
- if (hasField221) {
- size += pb::CodedOutputStream.ComputeInt32Size(221, Field221);
- }
- if (hasField222) {
- size += pb::CodedOutputStream.ComputeFloatSize(222, Field222);
- }
- if (hasField63) {
- size += pb::CodedOutputStream.ComputeInt32Size(63, Field63);
- }
- foreach (global::Google.ProtocolBuffers.ProtoBench.SpeedMessage2.Types.Group1 element in Group1List) {
- size += pb::CodedOutputStream.ComputeGroupSize(10, element);
- }
- {
- int dataSize = 0;
- foreach (string element in Field128List) {
- dataSize += pb::CodedOutputStream.ComputeStringSizeNoTag(element);
- }
- size += dataSize;
- size += 2 * field128_.Count;
- }
- if (hasField131) {
- size += pb::CodedOutputStream.ComputeInt64Size(131, Field131);
- }
- {
- int dataSize = 0;
- foreach (string element in Field127List) {
- dataSize += pb::CodedOutputStream.ComputeStringSizeNoTag(element);
- }
- size += dataSize;
- size += 2 * field127_.Count;
- }
- if (hasField129) {
- size += pb::CodedOutputStream.ComputeInt32Size(129, Field129);
- }
- {
- int dataSize = 0;
- foreach (long element in Field130List) {
- dataSize += pb::CodedOutputStream.ComputeInt64SizeNoTag(element);
- }
- size += dataSize;
- size += 2 * field130_.Count;
- }
- if (hasField205) {
- size += pb::CodedOutputStream.ComputeBoolSize(205, Field205);
- }
- if (hasField206) {
- size += pb::CodedOutputStream.ComputeBoolSize(206, Field206);
- }
- size += UnknownFields.SerializedSize;
- memoizedSerializedSize = size;
- return size;
- }
- public static SpeedMessage2 ParseFrom(pb::ByteString data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static SpeedMessage2 ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static SpeedMessage2 ParseFrom(byte[] data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static SpeedMessage2 ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static SpeedMessage2 ParseFrom(global::System.IO.Stream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static SpeedMessage2 ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- public static SpeedMessage2 ParseDelimitedFrom(global::System.IO.Stream input) {
- return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
- }
- public static SpeedMessage2 ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
- }
- public static SpeedMessage2 ParseFrom(pb::ICodedInputStream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static SpeedMessage2 ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- private SpeedMessage2 MakeReadOnly() {
- group1_.MakeReadOnly();
- field128_.MakeReadOnly();
- field127_.MakeReadOnly();
- field130_.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(SpeedMessage2 prototype) {
- return new Builder(prototype);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class Builder : pb::GeneratedBuilder<SpeedMessage2, Builder> {
- protected override Builder ThisBuilder {
- get { return this; }
- }
- public Builder() {
- result = DefaultInstance;
- resultIsReadOnly = true;
- }
- internal Builder(SpeedMessage2 cloneFrom) {
- result = cloneFrom;
- resultIsReadOnly = true;
- }
-
- private bool resultIsReadOnly;
- private SpeedMessage2 result;
-
- private SpeedMessage2 PrepareBuilder() {
- if (resultIsReadOnly) {
- SpeedMessage2 original = result;
- result = new SpeedMessage2();
- resultIsReadOnly = false;
- MergeFrom(original);
- }
- return result;
- }
-
- public override bool IsInitialized {
- get { return result.IsInitialized; }
- }
-
- protected override SpeedMessage2 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.ProtoBench.SpeedMessage2.Descriptor; }
- }
-
- public override SpeedMessage2 DefaultInstanceForType {
- get { return global::Google.ProtocolBuffers.ProtoBench.SpeedMessage2.DefaultInstance; }
- }
-
- public override SpeedMessage2 BuildPartial() {
- if (resultIsReadOnly) {
- return result;
- }
- resultIsReadOnly = true;
- return result.MakeReadOnly();
- }
-
- public override Builder MergeFrom(pb::IMessage other) {
- if (other is SpeedMessage2) {
- return MergeFrom((SpeedMessage2) other);
- } else {
- base.MergeFrom(other);
- return this;
- }
- }
-
- public override Builder MergeFrom(SpeedMessage2 other) {
- if (other == global::Google.ProtocolBuffers.ProtoBench.SpeedMessage2.DefaultInstance) return this;
- PrepareBuilder();
- if (other.HasField1) {
- Field1 = other.Field1;
- }
- if (other.HasField3) {
- Field3 = other.Field3;
- }
- if (other.HasField4) {
- Field4 = other.Field4;
- }
- if (other.HasField30) {
- Field30 = other.Field30;
- }
- if (other.HasField75) {
- Field75 = other.Field75;
- }
- if (other.HasField6) {
- Field6 = other.Field6;
- }
- if (other.HasField2) {
- Field2 = other.Field2;
- }
- if (other.HasField21) {
- Field21 = other.Field21;
- }
- if (other.HasField71) {
- Field71 = other.Field71;
- }
- if (other.HasField25) {
- Field25 = other.Field25;
- }
- if (other.HasField109) {
- Field109 = other.Field109;
- }
- if (other.HasField210) {
- Field210 = other.Field210;
- }
- if (other.HasField211) {
- Field211 = other.Field211;
- }
- if (other.HasField212) {
- Field212 = other.Field212;
- }
- if (other.HasField213) {
- Field213 = other.Field213;
- }
- if (other.HasField216) {
- Field216 = other.Field216;
- }
- if (other.HasField217) {
- Field217 = other.Field217;
- }
- if (other.HasField218) {
- Field218 = other.Field218;
- }
- if (other.HasField220) {
- Field220 = other.Field220;
- }
- if (other.HasField221) {
- Field221 = other.Field221;
- }
- if (other.HasField222) {
- Field222 = other.Field222;
- }
- if (other.HasField63) {
- Field63 = other.Field63;
- }
- if (other.group1_.Count != 0) {
- result.group1_.Add(other.group1_);
- }
- if (other.field128_.Count != 0) {
- result.field128_.Add(other.field128_);
- }
- if (other.HasField131) {
- Field131 = other.Field131;
- }
- if (other.field127_.Count != 0) {
- result.field127_.Add(other.field127_);
- }
- if (other.HasField129) {
- Field129 = other.Field129;
- }
- if (other.field130_.Count != 0) {
- result.field130_.Add(other.field130_);
- }
- if (other.HasField205) {
- Field205 = other.Field205;
- }
- if (other.HasField206) {
- Field206 = other.Field206;
- }
- 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(_speedMessage2FieldNames, field_name, global::System.StringComparer.Ordinal);
- if(field_ordinal >= 0)
- tag = _speedMessage2FieldTags[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.hasField1 = input.ReadString(ref result.field1_);
- break;
- }
- case 18: {
- result.hasField2 = input.ReadBytes(ref result.field2_);
- break;
- }
- case 24: {
- result.hasField3 = input.ReadInt64(ref result.field3_);
- break;
- }
- case 32: {
- result.hasField4 = input.ReadInt64(ref result.field4_);
- break;
- }
- case 50: {
- result.hasField6 = input.ReadString(ref result.field6_);
- break;
- }
- case 83: {
- input.ReadGroupArray(tag, field_name, result.group1_, global::Google.ProtocolBuffers.ProtoBench.SpeedMessage2.Types.Group1.DefaultInstance, extensionRegistry);
- break;
- }
- case 168: {
- result.hasField21 = input.ReadInt32(ref result.field21_);
- break;
- }
- case 205: {
- result.hasField25 = input.ReadFloat(ref result.field25_);
- break;
- }
- case 240: {
- result.hasField30 = input.ReadInt64(ref result.field30_);
- break;
- }
- case 504: {
- result.hasField63 = input.ReadInt32(ref result.field63_);
- break;
- }
- case 568: {
- result.hasField71 = input.ReadInt32(ref result.field71_);
- break;
- }
- case 600: {
- result.hasField75 = input.ReadBool(ref result.field75_);
- break;
- }
- case 872: {
- result.hasField109 = input.ReadInt32(ref result.field109_);
- break;
- }
- case 1018: {
- input.ReadStringArray(tag, field_name, result.field127_);
- break;
- }
- case 1026: {
- input.ReadStringArray(tag, field_name, result.field128_);
- break;
- }
- case 1032: {
- result.hasField129 = input.ReadInt32(ref result.field129_);
- break;
- }
- case 1042:
- case 1040: {
- input.ReadInt64Array(tag, field_name, result.field130_);
- break;
- }
- case 1048: {
- result.hasField131 = input.ReadInt64(ref result.field131_);
- break;
- }
- case 1640: {
- result.hasField205 = input.ReadBool(ref result.field205_);
- break;
- }
- case 1648: {
- result.hasField206 = input.ReadBool(ref result.field206_);
- break;
- }
- case 1680: {
- result.hasField210 = input.ReadInt32(ref result.field210_);
- break;
- }
- case 1688: {
- result.hasField211 = input.ReadInt32(ref result.field211_);
- break;
- }
- case 1696: {
- result.hasField212 = input.ReadInt32(ref result.field212_);
- break;
- }
- case 1704: {
- result.hasField213 = input.ReadInt32(ref result.field213_);
- break;
- }
- case 1728: {
- result.hasField216 = input.ReadInt32(ref result.field216_);
- break;
- }
- case 1736: {
- result.hasField217 = input.ReadInt32(ref result.field217_);
- break;
- }
- case 1744: {
- result.hasField218 = input.ReadInt32(ref result.field218_);
- break;
- }
- case 1760: {
- result.hasField220 = input.ReadInt32(ref result.field220_);
- break;
- }
- case 1768: {
- result.hasField221 = input.ReadInt32(ref result.field221_);
- break;
- }
- case 1781: {
- result.hasField222 = input.ReadFloat(ref result.field222_);
- break;
- }
- }
- }
-
- if (unknownFields != null) {
- this.UnknownFields = unknownFields.Build();
- }
- return this;
- }
-
-
- public bool HasField1 {
- get { return result.hasField1; }
- }
- public string Field1 {
- get { return result.Field1; }
- set { SetField1(value); }
- }
- public Builder SetField1(string value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.hasField1 = true;
- result.field1_ = value;
- return this;
- }
- public Builder ClearField1() {
- PrepareBuilder();
- result.hasField1 = false;
- result.field1_ = "";
- return this;
- }
-
- public bool HasField3 {
- get { return result.hasField3; }
- }
- public long Field3 {
- get { return result.Field3; }
- set { SetField3(value); }
- }
- public Builder SetField3(long value) {
- PrepareBuilder();
- result.hasField3 = true;
- result.field3_ = value;
- return this;
- }
- public Builder ClearField3() {
- PrepareBuilder();
- result.hasField3 = false;
- result.field3_ = 0L;
- return this;
- }
-
- public bool HasField4 {
- get { return result.hasField4; }
- }
- public long Field4 {
- get { return result.Field4; }
- set { SetField4(value); }
- }
- public Builder SetField4(long value) {
- PrepareBuilder();
- result.hasField4 = true;
- result.field4_ = value;
- return this;
- }
- public Builder ClearField4() {
- PrepareBuilder();
- result.hasField4 = false;
- result.field4_ = 0L;
- return this;
- }
-
- public bool HasField30 {
- get { return result.hasField30; }
- }
- public long Field30 {
- get { return result.Field30; }
- set { SetField30(value); }
- }
- public Builder SetField30(long value) {
- PrepareBuilder();
- result.hasField30 = true;
- result.field30_ = value;
- return this;
- }
- public Builder ClearField30() {
- PrepareBuilder();
- result.hasField30 = false;
- result.field30_ = 0L;
- return this;
- }
-
- public bool HasField75 {
- get { return result.hasField75; }
- }
- public bool Field75 {
- get { return result.Field75; }
- set { SetField75(value); }
- }
- public Builder SetField75(bool value) {
- PrepareBuilder();
- result.hasField75 = true;
- result.field75_ = value;
- return this;
- }
- public Builder ClearField75() {
- PrepareBuilder();
- result.hasField75 = false;
- result.field75_ = false;
- return this;
- }
-
- public bool HasField6 {
- get { return result.hasField6; }
- }
- public string Field6 {
- get { return result.Field6; }
- set { SetField6(value); }
- }
- public Builder SetField6(string value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.hasField6 = true;
- result.field6_ = value;
- return this;
- }
- public Builder ClearField6() {
- PrepareBuilder();
- result.hasField6 = false;
- result.field6_ = "";
- return this;
- }
-
- public bool HasField2 {
- get { return result.hasField2; }
- }
- public pb::ByteString Field2 {
- get { return result.Field2; }
- set { SetField2(value); }
- }
- public Builder SetField2(pb::ByteString value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.hasField2 = true;
- result.field2_ = value;
- return this;
- }
- public Builder ClearField2() {
- PrepareBuilder();
- result.hasField2 = false;
- result.field2_ = pb::ByteString.Empty;
- return this;
- }
-
- public bool HasField21 {
- get { return result.hasField21; }
- }
- public int Field21 {
- get { return result.Field21; }
- set { SetField21(value); }
- }
- public Builder SetField21(int value) {
- PrepareBuilder();
- result.hasField21 = true;
- result.field21_ = value;
- return this;
- }
- public Builder ClearField21() {
- PrepareBuilder();
- result.hasField21 = false;
- result.field21_ = 0;
- return this;
- }
-
- public bool HasField71 {
- get { return result.hasField71; }
- }
- public int Field71 {
- get { return result.Field71; }
- set { SetField71(value); }
- }
- public Builder SetField71(int value) {
- PrepareBuilder();
- result.hasField71 = true;
- result.field71_ = value;
- return this;
- }
- public Builder ClearField71() {
- PrepareBuilder();
- result.hasField71 = false;
- result.field71_ = 0;
- return this;
- }
-
- public bool HasField25 {
- get { return result.hasField25; }
- }
- public float Field25 {
- get { return result.Field25; }
- set { SetField25(value); }
- }
- public Builder SetField25(float value) {
- PrepareBuilder();
- result.hasField25 = true;
- result.field25_ = value;
- return this;
- }
- public Builder ClearField25() {
- PrepareBuilder();
- result.hasField25 = false;
- result.field25_ = 0F;
- return this;
- }
-
- public bool HasField109 {
- get { return result.hasField109; }
- }
- public int Field109 {
- get { return result.Field109; }
- set { SetField109(value); }
- }
- public Builder SetField109(int value) {
- PrepareBuilder();
- result.hasField109 = true;
- result.field109_ = value;
- return this;
- }
- public Builder ClearField109() {
- PrepareBuilder();
- result.hasField109 = false;
- result.field109_ = 0;
- return this;
- }
-
- public bool HasField210 {
- get { return result.hasField210; }
- }
- public int Field210 {
- get { return result.Field210; }
- set { SetField210(value); }
- }
- public Builder SetField210(int value) {
- PrepareBuilder();
- result.hasField210 = true;
- result.field210_ = value;
- return this;
- }
- public Builder ClearField210() {
- PrepareBuilder();
- result.hasField210 = false;
- result.field210_ = 0;
- return this;
- }
-
- public bool HasField211 {
- get { return result.hasField211; }
- }
- public int Field211 {
- get { return result.Field211; }
- set { SetField211(value); }
- }
- public Builder SetField211(int value) {
- PrepareBuilder();
- result.hasField211 = true;
- result.field211_ = value;
- return this;
- }
- public Builder ClearField211() {
- PrepareBuilder();
- result.hasField211 = false;
- result.field211_ = 0;
- return this;
- }
-
- public bool HasField212 {
- get { return result.hasField212; }
- }
- public int Field212 {
- get { return result.Field212; }
- set { SetField212(value); }
- }
- public Builder SetField212(int value) {
- PrepareBuilder();
- result.hasField212 = true;
- result.field212_ = value;
- return this;
- }
- public Builder ClearField212() {
- PrepareBuilder();
- result.hasField212 = false;
- result.field212_ = 0;
- return this;
- }
-
- public bool HasField213 {
- get { return result.hasField213; }
- }
- public int Field213 {
- get { return result.Field213; }
- set { SetField213(value); }
- }
- public Builder SetField213(int value) {
- PrepareBuilder();
- result.hasField213 = true;
- result.field213_ = value;
- return this;
- }
- public Builder ClearField213() {
- PrepareBuilder();
- result.hasField213 = false;
- result.field213_ = 0;
- return this;
- }
-
- public bool HasField216 {
- get { return result.hasField216; }
- }
- public int Field216 {
- get { return result.Field216; }
- set { SetField216(value); }
- }
- public Builder SetField216(int value) {
- PrepareBuilder();
- result.hasField216 = true;
- result.field216_ = value;
- return this;
- }
- public Builder ClearField216() {
- PrepareBuilder();
- result.hasField216 = false;
- result.field216_ = 0;
- return this;
- }
-
- public bool HasField217 {
- get { return result.hasField217; }
- }
- public int Field217 {
- get { return result.Field217; }
- set { SetField217(value); }
- }
- public Builder SetField217(int value) {
- PrepareBuilder();
- result.hasField217 = true;
- result.field217_ = value;
- return this;
- }
- public Builder ClearField217() {
- PrepareBuilder();
- result.hasField217 = false;
- result.field217_ = 0;
- return this;
- }
-
- public bool HasField218 {
- get { return result.hasField218; }
- }
- public int Field218 {
- get { return result.Field218; }
- set { SetField218(value); }
- }
- public Builder SetField218(int value) {
- PrepareBuilder();
- result.hasField218 = true;
- result.field218_ = value;
- return this;
- }
- public Builder ClearField218() {
- PrepareBuilder();
- result.hasField218 = false;
- result.field218_ = 0;
- return this;
- }
-
- public bool HasField220 {
- get { return result.hasField220; }
- }
- public int Field220 {
- get { return result.Field220; }
- set { SetField220(value); }
- }
- public Builder SetField220(int value) {
- PrepareBuilder();
- result.hasField220 = true;
- result.field220_ = value;
- return this;
- }
- public Builder ClearField220() {
- PrepareBuilder();
- result.hasField220 = false;
- result.field220_ = 0;
- return this;
- }
-
- public bool HasField221 {
- get { return result.hasField221; }
- }
- public int Field221 {
- get { return result.Field221; }
- set { SetField221(value); }
- }
- public Builder SetField221(int value) {
- PrepareBuilder();
- result.hasField221 = true;
- result.field221_ = value;
- return this;
- }
- public Builder ClearField221() {
- PrepareBuilder();
- result.hasField221 = false;
- result.field221_ = 0;
- return this;
- }
-
- public bool HasField222 {
- get { return result.hasField222; }
- }
- public float Field222 {
- get { return result.Field222; }
- set { SetField222(value); }
- }
- public Builder SetField222(float value) {
- PrepareBuilder();
- result.hasField222 = true;
- result.field222_ = value;
- return this;
- }
- public Builder ClearField222() {
- PrepareBuilder();
- result.hasField222 = false;
- result.field222_ = 0F;
- return this;
- }
-
- public bool HasField63 {
- get { return result.hasField63; }
- }
- public int Field63 {
- get { return result.Field63; }
- set { SetField63(value); }
- }
- public Builder SetField63(int value) {
- PrepareBuilder();
- result.hasField63 = true;
- result.field63_ = value;
- return this;
- }
- public Builder ClearField63() {
- PrepareBuilder();
- result.hasField63 = false;
- result.field63_ = 0;
- return this;
- }
-
- public pbc::IPopsicleList<global::Google.ProtocolBuffers.ProtoBench.SpeedMessage2.Types.Group1> Group1List {
- get { return PrepareBuilder().group1_; }
- }
- public int Group1Count {
- get { return result.Group1Count; }
- }
- public global::Google.ProtocolBuffers.ProtoBench.SpeedMessage2.Types.Group1 GetGroup1(int index) {
- return result.GetGroup1(index);
- }
- public Builder SetGroup1(int index, global::Google.ProtocolBuffers.ProtoBench.SpeedMessage2.Types.Group1 value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.group1_[index] = value;
- return this;
- }
- public Builder SetGroup1(int index, global::Google.ProtocolBuffers.ProtoBench.SpeedMessage2.Types.Group1.Builder builderForValue) {
- pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
- PrepareBuilder();
- result.group1_[index] = builderForValue.Build();
- return this;
- }
- public Builder AddGroup1(global::Google.ProtocolBuffers.ProtoBench.SpeedMessage2.Types.Group1 value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.group1_.Add(value);
- return this;
- }
- public Builder AddGroup1(global::Google.ProtocolBuffers.ProtoBench.SpeedMessage2.Types.Group1.Builder builderForValue) {
- pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
- PrepareBuilder();
- result.group1_.Add(builderForValue.Build());
- return this;
- }
- public Builder AddRangeGroup1(scg::IEnumerable<global::Google.ProtocolBuffers.ProtoBench.SpeedMessage2.Types.Group1> values) {
- PrepareBuilder();
- result.group1_.Add(values);
- return this;
- }
- public Builder ClearGroup1() {
- PrepareBuilder();
- result.group1_.Clear();
- return this;
- }
-
- public pbc::IPopsicleList<string> Field128List {
- get { return PrepareBuilder().field128_; }
- }
- public int Field128Count {
- get { return result.Field128Count; }
- }
- public string GetField128(int index) {
- return result.GetField128(index);
- }
- public Builder SetField128(int index, string value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.field128_[index] = value;
- return this;
- }
- public Builder AddField128(string value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.field128_.Add(value);
- return this;
- }
- public Builder AddRangeField128(scg::IEnumerable<string> values) {
- PrepareBuilder();
- result.field128_.Add(values);
- return this;
- }
- public Builder ClearField128() {
- PrepareBuilder();
- result.field128_.Clear();
- return this;
- }
-
- public bool HasField131 {
- get { return result.hasField131; }
- }
- public long Field131 {
- get { return result.Field131; }
- set { SetField131(value); }
- }
- public Builder SetField131(long value) {
- PrepareBuilder();
- result.hasField131 = true;
- result.field131_ = value;
- return this;
- }
- public Builder ClearField131() {
- PrepareBuilder();
- result.hasField131 = false;
- result.field131_ = 0L;
- return this;
- }
-
- public pbc::IPopsicleList<string> Field127List {
- get { return PrepareBuilder().field127_; }
- }
- public int Field127Count {
- get { return result.Field127Count; }
- }
- public string GetField127(int index) {
- return result.GetField127(index);
- }
- public Builder SetField127(int index, string value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.field127_[index] = value;
- return this;
- }
- public Builder AddField127(string value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.field127_.Add(value);
- return this;
- }
- public Builder AddRangeField127(scg::IEnumerable<string> values) {
- PrepareBuilder();
- result.field127_.Add(values);
- return this;
- }
- public Builder ClearField127() {
- PrepareBuilder();
- result.field127_.Clear();
- return this;
- }
-
- public bool HasField129 {
- get { return result.hasField129; }
- }
- public int Field129 {
- get { return result.Field129; }
- set { SetField129(value); }
- }
- public Builder SetField129(int value) {
- PrepareBuilder();
- result.hasField129 = true;
- result.field129_ = value;
- return this;
- }
- public Builder ClearField129() {
- PrepareBuilder();
- result.hasField129 = false;
- result.field129_ = 0;
- return this;
- }
-
- public pbc::IPopsicleList<long> Field130List {
- get { return PrepareBuilder().field130_; }
- }
- public int Field130Count {
- get { return result.Field130Count; }
- }
- public long GetField130(int index) {
- return result.GetField130(index);
- }
- public Builder SetField130(int index, long value) {
- PrepareBuilder();
- result.field130_[index] = value;
- return this;
- }
- public Builder AddField130(long value) {
- PrepareBuilder();
- result.field130_.Add(value);
- return this;
- }
- public Builder AddRangeField130(scg::IEnumerable<long> values) {
- PrepareBuilder();
- result.field130_.Add(values);
- return this;
- }
- public Builder ClearField130() {
- PrepareBuilder();
- result.field130_.Clear();
- return this;
- }
-
- public bool HasField205 {
- get { return result.hasField205; }
- }
- public bool Field205 {
- get { return result.Field205; }
- set { SetField205(value); }
- }
- public Builder SetField205(bool value) {
- PrepareBuilder();
- result.hasField205 = true;
- result.field205_ = value;
- return this;
- }
- public Builder ClearField205() {
- PrepareBuilder();
- result.hasField205 = false;
- result.field205_ = false;
- return this;
- }
-
- public bool HasField206 {
- get { return result.hasField206; }
- }
- public bool Field206 {
- get { return result.Field206; }
- set { SetField206(value); }
- }
- public Builder SetField206(bool value) {
- PrepareBuilder();
- result.hasField206 = true;
- result.field206_ = value;
- return this;
- }
- public Builder ClearField206() {
- PrepareBuilder();
- result.hasField206 = false;
- result.field206_ = false;
- return this;
- }
- }
- static SpeedMessage2() {
- object.ReferenceEquals(global::Google.ProtocolBuffers.ProtoBench.GoogleSpeedProtoFile.Descriptor, null);
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class SpeedMessage2GroupedMessage : pb::GeneratedMessage<SpeedMessage2GroupedMessage, SpeedMessage2GroupedMessage.Builder> {
- private SpeedMessage2GroupedMessage() { }
- private static readonly SpeedMessage2GroupedMessage defaultInstance = new SpeedMessage2GroupedMessage().MakeReadOnly();
- private static readonly string[] _speedMessage2GroupedMessageFieldNames = new string[] { "field1", "field10", "field11", "field2", "field3", "field4", "field5", "field6", "field7", "field8", "field9" };
- private static readonly uint[] _speedMessage2GroupedMessageFieldTags = new uint[] { 13, 85, 88, 21, 29, 32, 40, 48, 56, 69, 72 };
- public static SpeedMessage2GroupedMessage DefaultInstance {
- get { return defaultInstance; }
- }
-
- public override SpeedMessage2GroupedMessage DefaultInstanceForType {
- get { return DefaultInstance; }
- }
-
- protected override SpeedMessage2GroupedMessage ThisMessage {
- get { return this; }
- }
-
- public static pbd::MessageDescriptor Descriptor {
- get { return global::Google.ProtocolBuffers.ProtoBench.GoogleSpeedProtoFile.internal__static_benchmarks_SpeedMessage2GroupedMessage__Descriptor; }
- }
-
- protected override pb::FieldAccess.FieldAccessorTable<SpeedMessage2GroupedMessage, SpeedMessage2GroupedMessage.Builder> InternalFieldAccessors {
- get { return global::Google.ProtocolBuffers.ProtoBench.GoogleSpeedProtoFile.internal__static_benchmarks_SpeedMessage2GroupedMessage__FieldAccessorTable; }
- }
-
- public const int Field1FieldNumber = 1;
- private bool hasField1;
- private float field1_;
- public bool HasField1 {
- get { return hasField1; }
- }
- public float Field1 {
- get { return field1_; }
- }
-
- public const int Field2FieldNumber = 2;
- private bool hasField2;
- private float field2_;
- public bool HasField2 {
- get { return hasField2; }
- }
- public float Field2 {
- get { return field2_; }
- }
-
- public const int Field3FieldNumber = 3;
- private bool hasField3;
- private float field3_;
- public bool HasField3 {
- get { return hasField3; }
- }
- public float Field3 {
- get { return field3_; }
- }
-
- public const int Field4FieldNumber = 4;
- private bool hasField4;
- private bool field4_;
- public bool HasField4 {
- get { return hasField4; }
- }
- public bool Field4 {
- get { return field4_; }
- }
-
- public const int Field5FieldNumber = 5;
- private bool hasField5;
- private bool field5_;
- public bool HasField5 {
- get { return hasField5; }
- }
- public bool Field5 {
- get { return field5_; }
- }
-
- public const int Field6FieldNumber = 6;
- private bool hasField6;
- private bool field6_ = true;
- public bool HasField6 {
- get { return hasField6; }
- }
- public bool Field6 {
- get { return field6_; }
- }
-
- public const int Field7FieldNumber = 7;
- private bool hasField7;
- private bool field7_;
- public bool HasField7 {
- get { return hasField7; }
- }
- public bool Field7 {
- get { return field7_; }
- }
-
- public const int Field8FieldNumber = 8;
- private bool hasField8;
- private float field8_;
- public bool HasField8 {
- get { return hasField8; }
- }
- public float Field8 {
- get { return field8_; }
- }
-
- public const int Field9FieldNumber = 9;
- private bool hasField9;
- private bool field9_;
- public bool HasField9 {
- get { return hasField9; }
- }
- public bool Field9 {
- get { return field9_; }
- }
-
- public const int Field10FieldNumber = 10;
- private bool hasField10;
- private float field10_;
- public bool HasField10 {
- get { return hasField10; }
- }
- public float Field10 {
- get { return field10_; }
- }
-
- public const int Field11FieldNumber = 11;
- private bool hasField11;
- private long field11_;
- public bool HasField11 {
- get { return hasField11; }
- }
- public long Field11 {
- get { return field11_; }
- }
-
- public override bool IsInitialized {
- get {
- return true;
- }
- }
-
- public override void WriteTo(pb::ICodedOutputStream output) {
- CalcSerializedSize();
- string[] field_names = _speedMessage2GroupedMessageFieldNames;
- if (hasField1) {
- output.WriteFloat(1, field_names[0], Field1);
- }
- if (hasField2) {
- output.WriteFloat(2, field_names[3], Field2);
- }
- if (hasField3) {
- output.WriteFloat(3, field_names[4], Field3);
- }
- if (hasField4) {
- output.WriteBool(4, field_names[5], Field4);
- }
- if (hasField5) {
- output.WriteBool(5, field_names[6], Field5);
- }
- if (hasField6) {
- output.WriteBool(6, field_names[7], Field6);
- }
- if (hasField7) {
- output.WriteBool(7, field_names[8], Field7);
- }
- if (hasField8) {
- output.WriteFloat(8, field_names[9], Field8);
- }
- if (hasField9) {
- output.WriteBool(9, field_names[10], Field9);
- }
- if (hasField10) {
- output.WriteFloat(10, field_names[1], Field10);
- }
- if (hasField11) {
- output.WriteInt64(11, field_names[2], Field11);
- }
- UnknownFields.WriteTo(output);
- }
-
- private int memoizedSerializedSize = -1;
- public override int SerializedSize {
- get {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
- return CalcSerializedSize();
- }
- }
-
- private int CalcSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- if (hasField1) {
- size += pb::CodedOutputStream.ComputeFloatSize(1, Field1);
- }
- if (hasField2) {
- size += pb::CodedOutputStream.ComputeFloatSize(2, Field2);
- }
- if (hasField3) {
- size += pb::CodedOutputStream.ComputeFloatSize(3, Field3);
- }
- if (hasField4) {
- size += pb::CodedOutputStream.ComputeBoolSize(4, Field4);
- }
- if (hasField5) {
- size += pb::CodedOutputStream.ComputeBoolSize(5, Field5);
- }
- if (hasField6) {
- size += pb::CodedOutputStream.ComputeBoolSize(6, Field6);
- }
- if (hasField7) {
- size += pb::CodedOutputStream.ComputeBoolSize(7, Field7);
- }
- if (hasField8) {
- size += pb::CodedOutputStream.ComputeFloatSize(8, Field8);
- }
- if (hasField9) {
- size += pb::CodedOutputStream.ComputeBoolSize(9, Field9);
- }
- if (hasField10) {
- size += pb::CodedOutputStream.ComputeFloatSize(10, Field10);
- }
- if (hasField11) {
- size += pb::CodedOutputStream.ComputeInt64Size(11, Field11);
- }
- size += UnknownFields.SerializedSize;
- memoizedSerializedSize = size;
- return size;
- }
- public static SpeedMessage2GroupedMessage ParseFrom(pb::ByteString data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static SpeedMessage2GroupedMessage ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static SpeedMessage2GroupedMessage ParseFrom(byte[] data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static SpeedMessage2GroupedMessage ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static SpeedMessage2GroupedMessage ParseFrom(global::System.IO.Stream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static SpeedMessage2GroupedMessage ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- public static SpeedMessage2GroupedMessage ParseDelimitedFrom(global::System.IO.Stream input) {
- return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
- }
- public static SpeedMessage2GroupedMessage ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
- }
- public static SpeedMessage2GroupedMessage ParseFrom(pb::ICodedInputStream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static SpeedMessage2GroupedMessage ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- private SpeedMessage2GroupedMessage 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(SpeedMessage2GroupedMessage prototype) {
- return new Builder(prototype);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class Builder : pb::GeneratedBuilder<SpeedMessage2GroupedMessage, Builder> {
- protected override Builder ThisBuilder {
- get { return this; }
- }
- public Builder() {
- result = DefaultInstance;
- resultIsReadOnly = true;
- }
- internal Builder(SpeedMessage2GroupedMessage cloneFrom) {
- result = cloneFrom;
- resultIsReadOnly = true;
- }
-
- private bool resultIsReadOnly;
- private SpeedMessage2GroupedMessage result;
-
- private SpeedMessage2GroupedMessage PrepareBuilder() {
- if (resultIsReadOnly) {
- SpeedMessage2GroupedMessage original = result;
- result = new SpeedMessage2GroupedMessage();
- resultIsReadOnly = false;
- MergeFrom(original);
- }
- return result;
- }
-
- public override bool IsInitialized {
- get { return result.IsInitialized; }
- }
-
- protected override SpeedMessage2GroupedMessage 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.ProtoBench.SpeedMessage2GroupedMessage.Descriptor; }
- }
-
- public override SpeedMessage2GroupedMessage DefaultInstanceForType {
- get { return global::Google.ProtocolBuffers.ProtoBench.SpeedMessage2GroupedMessage.DefaultInstance; }
- }
-
- public override SpeedMessage2GroupedMessage BuildPartial() {
- if (resultIsReadOnly) {
- return result;
- }
- resultIsReadOnly = true;
- return result.MakeReadOnly();
- }
-
- public override Builder MergeFrom(pb::IMessage other) {
- if (other is SpeedMessage2GroupedMessage) {
- return MergeFrom((SpeedMessage2GroupedMessage) other);
- } else {
- base.MergeFrom(other);
- return this;
- }
- }
-
- public override Builder MergeFrom(SpeedMessage2GroupedMessage other) {
- if (other == global::Google.ProtocolBuffers.ProtoBench.SpeedMessage2GroupedMessage.DefaultInstance) return this;
- PrepareBuilder();
- if (other.HasField1) {
- Field1 = other.Field1;
- }
- if (other.HasField2) {
- Field2 = other.Field2;
- }
- if (other.HasField3) {
- Field3 = other.Field3;
- }
- if (other.HasField4) {
- Field4 = other.Field4;
- }
- if (other.HasField5) {
- Field5 = other.Field5;
- }
- if (other.HasField6) {
- Field6 = other.Field6;
- }
- if (other.HasField7) {
- Field7 = other.Field7;
- }
- if (other.HasField8) {
- Field8 = other.Field8;
- }
- if (other.HasField9) {
- Field9 = other.Field9;
- }
- if (other.HasField10) {
- Field10 = other.Field10;
- }
- if (other.HasField11) {
- Field11 = other.Field11;
- }
- 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(_speedMessage2GroupedMessageFieldNames, field_name, global::System.StringComparer.Ordinal);
- if(field_ordinal >= 0)
- tag = _speedMessage2GroupedMessageFieldTags[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 13: {
- result.hasField1 = input.ReadFloat(ref result.field1_);
- break;
- }
- case 21: {
- result.hasField2 = input.ReadFloat(ref result.field2_);
- break;
- }
- case 29: {
- result.hasField3 = input.ReadFloat(ref result.field3_);
- break;
- }
- case 32: {
- result.hasField4 = input.ReadBool(ref result.field4_);
- break;
- }
- case 40: {
- result.hasField5 = input.ReadBool(ref result.field5_);
- break;
- }
- case 48: {
- result.hasField6 = input.ReadBool(ref result.field6_);
- break;
- }
- case 56: {
- result.hasField7 = input.ReadBool(ref result.field7_);
- break;
- }
- case 69: {
- result.hasField8 = input.ReadFloat(ref result.field8_);
- break;
- }
- case 72: {
- result.hasField9 = input.ReadBool(ref result.field9_);
- break;
- }
- case 85: {
- result.hasField10 = input.ReadFloat(ref result.field10_);
- break;
- }
- case 88: {
- result.hasField11 = input.ReadInt64(ref result.field11_);
- break;
- }
- }
- }
-
- if (unknownFields != null) {
- this.UnknownFields = unknownFields.Build();
- }
- return this;
- }
-
-
- public bool HasField1 {
- get { return result.hasField1; }
- }
- public float Field1 {
- get { return result.Field1; }
- set { SetField1(value); }
- }
- public Builder SetField1(float value) {
- PrepareBuilder();
- result.hasField1 = true;
- result.field1_ = value;
- return this;
- }
- public Builder ClearField1() {
- PrepareBuilder();
- result.hasField1 = false;
- result.field1_ = 0F;
- return this;
- }
-
- public bool HasField2 {
- get { return result.hasField2; }
- }
- public float Field2 {
- get { return result.Field2; }
- set { SetField2(value); }
- }
- public Builder SetField2(float value) {
- PrepareBuilder();
- result.hasField2 = true;
- result.field2_ = value;
- return this;
- }
- public Builder ClearField2() {
- PrepareBuilder();
- result.hasField2 = false;
- result.field2_ = 0F;
- return this;
- }
-
- public bool HasField3 {
- get { return result.hasField3; }
- }
- public float Field3 {
- get { return result.Field3; }
- set { SetField3(value); }
- }
- public Builder SetField3(float value) {
- PrepareBuilder();
- result.hasField3 = true;
- result.field3_ = value;
- return this;
- }
- public Builder ClearField3() {
- PrepareBuilder();
- result.hasField3 = false;
- result.field3_ = 0F;
- return this;
- }
-
- public bool HasField4 {
- get { return result.hasField4; }
- }
- public bool Field4 {
- get { return result.Field4; }
- set { SetField4(value); }
- }
- public Builder SetField4(bool value) {
- PrepareBuilder();
- result.hasField4 = true;
- result.field4_ = value;
- return this;
- }
- public Builder ClearField4() {
- PrepareBuilder();
- result.hasField4 = false;
- result.field4_ = false;
- return this;
- }
-
- public bool HasField5 {
- get { return result.hasField5; }
- }
- public bool Field5 {
- get { return result.Field5; }
- set { SetField5(value); }
- }
- public Builder SetField5(bool value) {
- PrepareBuilder();
- result.hasField5 = true;
- result.field5_ = value;
- return this;
- }
- public Builder ClearField5() {
- PrepareBuilder();
- result.hasField5 = false;
- result.field5_ = false;
- return this;
- }
-
- public bool HasField6 {
- get { return result.hasField6; }
- }
- public bool Field6 {
- get { return result.Field6; }
- set { SetField6(value); }
- }
- public Builder SetField6(bool value) {
- PrepareBuilder();
- result.hasField6 = true;
- result.field6_ = value;
- return this;
- }
- public Builder ClearField6() {
- PrepareBuilder();
- result.hasField6 = false;
- result.field6_ = true;
- return this;
- }
-
- public bool HasField7 {
- get { return result.hasField7; }
- }
- public bool Field7 {
- get { return result.Field7; }
- set { SetField7(value); }
- }
- public Builder SetField7(bool value) {
- PrepareBuilder();
- result.hasField7 = true;
- result.field7_ = value;
- return this;
- }
- public Builder ClearField7() {
- PrepareBuilder();
- result.hasField7 = false;
- result.field7_ = false;
- return this;
- }
-
- public bool HasField8 {
- get { return result.hasField8; }
- }
- public float Field8 {
- get { return result.Field8; }
- set { SetField8(value); }
- }
- public Builder SetField8(float value) {
- PrepareBuilder();
- result.hasField8 = true;
- result.field8_ = value;
- return this;
- }
- public Builder ClearField8() {
- PrepareBuilder();
- result.hasField8 = false;
- result.field8_ = 0F;
- return this;
- }
-
- public bool HasField9 {
- get { return result.hasField9; }
- }
- public bool Field9 {
- get { return result.Field9; }
- set { SetField9(value); }
- }
- public Builder SetField9(bool value) {
- PrepareBuilder();
- result.hasField9 = true;
- result.field9_ = value;
- return this;
- }
- public Builder ClearField9() {
- PrepareBuilder();
- result.hasField9 = false;
- result.field9_ = false;
- return this;
- }
-
- public bool HasField10 {
- get { return result.hasField10; }
- }
- public float Field10 {
- get { return result.Field10; }
- set { SetField10(value); }
- }
- public Builder SetField10(float value) {
- PrepareBuilder();
- result.hasField10 = true;
- result.field10_ = value;
- return this;
- }
- public Builder ClearField10() {
- PrepareBuilder();
- result.hasField10 = false;
- result.field10_ = 0F;
- return this;
- }
-
- public bool HasField11 {
- get { return result.hasField11; }
- }
- public long Field11 {
- get { return result.Field11; }
- set { SetField11(value); }
- }
- public Builder SetField11(long value) {
- PrepareBuilder();
- result.hasField11 = true;
- result.field11_ = value;
- return this;
- }
- public Builder ClearField11() {
- PrepareBuilder();
- result.hasField11 = false;
- result.field11_ = 0L;
- return this;
- }
- }
- static SpeedMessage2GroupedMessage() {
- object.ReferenceEquals(global::Google.ProtocolBuffers.ProtoBench.GoogleSpeedProtoFile.Descriptor, null);
- }
- }
-
- #endregion
-
-}
-
-#endregion Designer generated code
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google_speed.proto
+#pragma warning disable 1591, 0612, 3021
+#region Designer generated code
+
+using pb = global::Google.ProtocolBuffers;
+using pbc = global::Google.ProtocolBuffers.Collections;
+using pbd = global::Google.ProtocolBuffers.Descriptors;
+using scg = global::System.Collections.Generic;
+namespace Google.ProtocolBuffers.TestProtos {
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public static partial class GoogleSpeed {
+
+ #region Extension registration
+ public static void RegisterAllExtensions(pb::ExtensionRegistry registry) {
+ }
+ #endregion
+ #region Static variables
+ internal static pbd::MessageDescriptor internal__static_benchmarks_SpeedMessage1__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.SpeedMessage1, global::Google.ProtocolBuffers.TestProtos.SpeedMessage1.Builder> internal__static_benchmarks_SpeedMessage1__FieldAccessorTable;
+ internal static pbd::MessageDescriptor internal__static_benchmarks_SpeedMessage1SubMessage__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.SpeedMessage1SubMessage, global::Google.ProtocolBuffers.TestProtos.SpeedMessage1SubMessage.Builder> internal__static_benchmarks_SpeedMessage1SubMessage__FieldAccessorTable;
+ internal static pbd::MessageDescriptor internal__static_benchmarks_SpeedMessage2__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.SpeedMessage2, global::Google.ProtocolBuffers.TestProtos.SpeedMessage2.Builder> internal__static_benchmarks_SpeedMessage2__FieldAccessorTable;
+ internal static pbd::MessageDescriptor internal__static_benchmarks_SpeedMessage2_Group1__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.SpeedMessage2.Types.Group1, global::Google.ProtocolBuffers.TestProtos.SpeedMessage2.Types.Group1.Builder> internal__static_benchmarks_SpeedMessage2_Group1__FieldAccessorTable;
+ internal static pbd::MessageDescriptor internal__static_benchmarks_SpeedMessage2GroupedMessage__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.SpeedMessage2GroupedMessage, global::Google.ProtocolBuffers.TestProtos.SpeedMessage2GroupedMessage.Builder> internal__static_benchmarks_SpeedMessage2GroupedMessage__FieldAccessorTable;
+ #endregion
+ #region Descriptor
+ public static pbd::FileDescriptor Descriptor {
+ get { return descriptor; }
+ }
+ private static pbd::FileDescriptor descriptor;
+
+ static GoogleSpeed() {
+ byte[] descriptorData = global::System.Convert.FromBase64String(
+ string.Concat(
+ "ChJnb29nbGVfc3BlZWQucHJvdG8SCmJlbmNobWFya3Mi+AYKDVNwZWVkTWVz",
+ "c2FnZTESDgoGZmllbGQxGAEgAigJEg4KBmZpZWxkORgJIAEoCRIPCgdmaWVs",
+ "ZDE4GBIgASgJEhYKB2ZpZWxkODAYUCABKAg6BWZhbHNlEhUKB2ZpZWxkODEY",
+ "USABKAg6BHRydWUSDgoGZmllbGQyGAIgAigFEg4KBmZpZWxkMxgDIAIoBRIR",
+ "CghmaWVsZDI4MBiYAiABKAUSEQoGZmllbGQ2GAYgASgFOgEwEg8KB2ZpZWxk",
+ "MjIYFiABKAMSDgoGZmllbGQ0GAQgASgJEg4KBmZpZWxkNRgFIAMoBhIWCgdm",
+ "aWVsZDU5GDsgASgIOgVmYWxzZRIOCgZmaWVsZDcYByABKAkSDwoHZmllbGQx",
+ "NhgQIAEoBRIUCghmaWVsZDEzMBiCASABKAU6ATASFQoHZmllbGQxMhgMIAEo",
+ "CDoEdHJ1ZRIVCgdmaWVsZDE3GBEgASgIOgR0cnVlEhUKB2ZpZWxkMTMYDSAB",
+ "KAg6BHRydWUSFQoHZmllbGQxNBgOIAEoCDoEdHJ1ZRITCghmaWVsZDEwNBho",
+ "IAEoBToBMBITCghmaWVsZDEwMBhkIAEoBToBMBITCghmaWVsZDEwMRhlIAEo",
+ "BToBMBIQCghmaWVsZDEwMhhmIAEoCRIQCghmaWVsZDEwMxhnIAEoCRISCgdm",
+ "aWVsZDI5GB0gASgFOgEwEhYKB2ZpZWxkMzAYHiABKAg6BWZhbHNlEhMKB2Zp",
+ "ZWxkNjAYPCABKAU6Ai0xEhUKCGZpZWxkMjcxGI8CIAEoBToCLTESFQoIZmll",
+ "bGQyNzIYkAIgASgFOgItMRIRCghmaWVsZDE1MBiWASABKAUSEgoHZmllbGQy",
+ "MxgXIAEoBToBMBIWCgdmaWVsZDI0GBggASgIOgVmYWxzZRISCgdmaWVsZDI1",
+ "GBkgASgFOgEwEjQKB2ZpZWxkMTUYDyABKAsyIy5iZW5jaG1hcmtzLlNwZWVk",
+ "TWVzc2FnZTFTdWJNZXNzYWdlEg8KB2ZpZWxkNzgYTiABKAgSEgoHZmllbGQ2",
+ "NxhDIAEoBToBMBIPCgdmaWVsZDY4GEQgASgFEhQKCGZpZWxkMTI4GIABIAEo",
+ "BToBMBIoCghmaWVsZDEyORiBASABKAk6FXh4eHh4eHh4eHh4eHh4eHh4eHh4",
+ "eBIUCghmaWVsZDEzMRiDASABKAU6ATAiogMKF1NwZWVkTWVzc2FnZTFTdWJN",
+ "ZXNzYWdlEhEKBmZpZWxkMRgBIAEoBToBMBIRCgZmaWVsZDIYAiABKAU6ATAS",
+ "EQoGZmllbGQzGAMgASgFOgEwEg8KB2ZpZWxkMTUYDyABKAkSFQoHZmllbGQx",
+ "MhgMIAEoCDoEdHJ1ZRIPCgdmaWVsZDEzGA0gASgDEg8KB2ZpZWxkMTQYDiAB",
+ "KAMSDwoHZmllbGQxNhgQIAEoBRISCgdmaWVsZDE5GBMgASgFOgEyEhUKB2Zp",
+ "ZWxkMjAYFCABKAg6BHRydWUSFQoHZmllbGQyOBgcIAEoCDoEdHJ1ZRIPCgdm",
+ "aWVsZDIxGBUgASgGEg8KB2ZpZWxkMjIYFiABKAUSFgoHZmllbGQyMxgXIAEo",
+ "CDoFZmFsc2USGAoIZmllbGQyMDYYzgEgASgIOgVmYWxzZRIRCghmaWVsZDIw",
+ "MxjLASABKAcSEQoIZmllbGQyMDQYzAEgASgFEhEKCGZpZWxkMjA1GM0BIAEo",
+ "CRIRCghmaWVsZDIwNxjPASABKAQSEQoIZmllbGQzMDAYrAIgASgEIsoHCg1T",
+ "cGVlZE1lc3NhZ2UyEg4KBmZpZWxkMRgBIAEoCRIOCgZmaWVsZDMYAyABKAMS",
+ "DgoGZmllbGQ0GAQgASgDEg8KB2ZpZWxkMzAYHiABKAMSFgoHZmllbGQ3NRhL",
+ "IAEoCDoFZmFsc2USDgoGZmllbGQ2GAYgASgJEg4KBmZpZWxkMhgCIAEoDBIS",
+ "CgdmaWVsZDIxGBUgASgFOgEwEg8KB2ZpZWxkNzEYRyABKAUSDwoHZmllbGQy",
+ "NRgZIAEoAhITCghmaWVsZDEwORhtIAEoBToBMBIUCghmaWVsZDIxMBjSASAB",
+ "KAU6ATASFAoIZmllbGQyMTEY0wEgASgFOgEwEhQKCGZpZWxkMjEyGNQBIAEo",
+ "BToBMBIUCghmaWVsZDIxMxjVASABKAU6ATASFAoIZmllbGQyMTYY2AEgASgF",
+ "OgEwEhQKCGZpZWxkMjE3GNkBIAEoBToBMBIUCghmaWVsZDIxOBjaASABKAU6",
+ "ATASFAoIZmllbGQyMjAY3AEgASgFOgEwEhQKCGZpZWxkMjIxGN0BIAEoBToB",
+ "MBIUCghmaWVsZDIyMhjeASABKAI6ATASDwoHZmllbGQ2Mxg/IAEoBRIwCgZn",
+ "cm91cDEYCiADKAoyIC5iZW5jaG1hcmtzLlNwZWVkTWVzc2FnZTIuR3JvdXAx",
+ "EhEKCGZpZWxkMTI4GIABIAMoCRIRCghmaWVsZDEzMRiDASABKAMSEAoIZmll",
+ "bGQxMjcYfyADKAkSEQoIZmllbGQxMjkYgQEgASgFEhEKCGZpZWxkMTMwGIIB",
+ "IAMoAxIYCghmaWVsZDIwNRjNASABKAg6BWZhbHNlEhgKCGZpZWxkMjA2GM4B",
+ "IAEoCDoFZmFsc2UawwIKBkdyb3VwMRIPCgdmaWVsZDExGAsgAigCEg8KB2Zp",
+ "ZWxkMjYYGiABKAISDwoHZmllbGQxMhgMIAEoCRIPCgdmaWVsZDEzGA0gASgJ",
+ "Eg8KB2ZpZWxkMTQYDiADKAkSDwoHZmllbGQxNRgPIAIoBBIOCgZmaWVsZDUY",
+ "BSABKAUSDwoHZmllbGQyNxgbIAEoCRIPCgdmaWVsZDI4GBwgASgFEg8KB2Zp",
+ "ZWxkMjkYHSABKAkSDwoHZmllbGQxNhgQIAEoCRIPCgdmaWVsZDIyGBYgAygJ",
+ "Eg8KB2ZpZWxkNzMYSSADKAUSEgoHZmllbGQyMBgUIAEoBToBMBIPCgdmaWVs",
+ "ZDI0GBggASgJEjgKB2ZpZWxkMzEYHyABKAsyJy5iZW5jaG1hcmtzLlNwZWVk",
+ "TWVzc2FnZTJHcm91cGVkTWVzc2FnZSLfAQobU3BlZWRNZXNzYWdlMkdyb3Vw",
+ "ZWRNZXNzYWdlEg4KBmZpZWxkMRgBIAEoAhIOCgZmaWVsZDIYAiABKAISEQoG",
+ "ZmllbGQzGAMgASgCOgEwEg4KBmZpZWxkNBgEIAEoCBIOCgZmaWVsZDUYBSAB",
+ "KAgSFAoGZmllbGQ2GAYgASgIOgR0cnVlEhUKBmZpZWxkNxgHIAEoCDoFZmFs",
+ "c2USDgoGZmllbGQ4GAggASgCEg4KBmZpZWxkORgJIAEoCBIPCgdmaWVsZDEw",
+ "GAogASgCEg8KB2ZpZWxkMTEYCyABKANCM0ILR29vZ2xlU3BlZWRIAaoCIUdv",
+ "b2dsZS5Qcm90b2NvbEJ1ZmZlcnMuVGVzdFByb3Rvcw=="));
+ pbd::FileDescriptor.InternalDescriptorAssigner assigner = delegate(pbd::FileDescriptor root) {
+ descriptor = root;
+ internal__static_benchmarks_SpeedMessage1__Descriptor = Descriptor.MessageTypes[0];
+ internal__static_benchmarks_SpeedMessage1__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.SpeedMessage1, global::Google.ProtocolBuffers.TestProtos.SpeedMessage1.Builder>(internal__static_benchmarks_SpeedMessage1__Descriptor,
+ new string[] { "Field1", "Field9", "Field18", "Field80", "Field81", "Field2", "Field3", "Field280", "Field6", "Field22", "Field4", "Field5", "Field59", "Field7", "Field16", "Field130", "Field12", "Field17", "Field13", "Field14", "Field104", "Field100", "Field101", "Field102", "Field103", "Field29", "Field30", "Field60", "Field271", "Field272", "Field150", "Field23", "Field24", "Field25", "Field15", "Field78", "Field67", "Field68", "Field128", "Field129", "Field131", });
+ internal__static_benchmarks_SpeedMessage1SubMessage__Descriptor = Descriptor.MessageTypes[1];
+ internal__static_benchmarks_SpeedMessage1SubMessage__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.SpeedMessage1SubMessage, global::Google.ProtocolBuffers.TestProtos.SpeedMessage1SubMessage.Builder>(internal__static_benchmarks_SpeedMessage1SubMessage__Descriptor,
+ new string[] { "Field1", "Field2", "Field3", "Field15", "Field12", "Field13", "Field14", "Field16", "Field19", "Field20", "Field28", "Field21", "Field22", "Field23", "Field206", "Field203", "Field204", "Field205", "Field207", "Field300", });
+ internal__static_benchmarks_SpeedMessage2__Descriptor = Descriptor.MessageTypes[2];
+ internal__static_benchmarks_SpeedMessage2__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.SpeedMessage2, global::Google.ProtocolBuffers.TestProtos.SpeedMessage2.Builder>(internal__static_benchmarks_SpeedMessage2__Descriptor,
+ new string[] { "Field1", "Field3", "Field4", "Field30", "Field75", "Field6", "Field2", "Field21", "Field71", "Field25", "Field109", "Field210", "Field211", "Field212", "Field213", "Field216", "Field217", "Field218", "Field220", "Field221", "Field222", "Field63", "Group1", "Field128", "Field131", "Field127", "Field129", "Field130", "Field205", "Field206", });
+ internal__static_benchmarks_SpeedMessage2_Group1__Descriptor = internal__static_benchmarks_SpeedMessage2__Descriptor.NestedTypes[0];
+ internal__static_benchmarks_SpeedMessage2_Group1__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.SpeedMessage2.Types.Group1, global::Google.ProtocolBuffers.TestProtos.SpeedMessage2.Types.Group1.Builder>(internal__static_benchmarks_SpeedMessage2_Group1__Descriptor,
+ new string[] { "Field11", "Field26", "Field12", "Field13", "Field14", "Field15", "Field5", "Field27", "Field28", "Field29", "Field16", "Field22", "Field73", "Field20", "Field24", "Field31", });
+ internal__static_benchmarks_SpeedMessage2GroupedMessage__Descriptor = Descriptor.MessageTypes[3];
+ internal__static_benchmarks_SpeedMessage2GroupedMessage__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.SpeedMessage2GroupedMessage, global::Google.ProtocolBuffers.TestProtos.SpeedMessage2GroupedMessage.Builder>(internal__static_benchmarks_SpeedMessage2GroupedMessage__Descriptor,
+ new string[] { "Field1", "Field2", "Field3", "Field4", "Field5", "Field6", "Field7", "Field8", "Field9", "Field10", "Field11", });
+ pb::ExtensionRegistry registry = pb::ExtensionRegistry.CreateInstance();
+ RegisterAllExtensions(registry);
+ return registry;
+ };
+ pbd::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData,
+ new pbd::FileDescriptor[] {
+ }, assigner);
+ }
+ #endregion
+
+ }
+ #region Messages
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class SpeedMessage1 : pb::GeneratedMessage<SpeedMessage1, SpeedMessage1.Builder> {
+ private SpeedMessage1() { }
+ private static readonly SpeedMessage1 defaultInstance = new SpeedMessage1().MakeReadOnly();
+ private static readonly string[] _speedMessage1FieldNames = new string[] { "field1", "field100", "field101", "field102", "field103", "field104", "field12", "field128", "field129", "field13", "field130", "field131", "field14", "field15", "field150", "field16", "field17", "field18", "field2", "field22", "field23", "field24", "field25", "field271", "field272", "field280", "field29", "field3", "field30", "field4", "field5", "field59", "field6", "field60", "field67", "field68", "field7", "field78", "field80", "field81", "field9" };
+ private static readonly uint[] _speedMessage1FieldTags = new uint[] { 10, 800, 808, 818, 826, 832, 96, 1024, 1034, 104, 1040, 1048, 112, 122, 1200, 128, 136, 146, 16, 176, 184, 192, 200, 2168, 2176, 2240, 232, 24, 240, 34, 41, 472, 48, 480, 536, 544, 58, 624, 640, 648, 74 };
+ public static SpeedMessage1 DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override SpeedMessage1 DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override SpeedMessage1 ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::Google.ProtocolBuffers.TestProtos.GoogleSpeed.internal__static_benchmarks_SpeedMessage1__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<SpeedMessage1, SpeedMessage1.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.GoogleSpeed.internal__static_benchmarks_SpeedMessage1__FieldAccessorTable; }
+ }
+
+ public const int Field1FieldNumber = 1;
+ private bool hasField1;
+ private string field1_ = "";
+ public bool HasField1 {
+ get { return hasField1; }
+ }
+ public string Field1 {
+ get { return field1_; }
+ }
+
+ public const int Field9FieldNumber = 9;
+ private bool hasField9;
+ private string field9_ = "";
+ public bool HasField9 {
+ get { return hasField9; }
+ }
+ public string Field9 {
+ get { return field9_; }
+ }
+
+ public const int Field18FieldNumber = 18;
+ private bool hasField18;
+ private string field18_ = "";
+ public bool HasField18 {
+ get { return hasField18; }
+ }
+ public string Field18 {
+ get { return field18_; }
+ }
+
+ public const int Field80FieldNumber = 80;
+ private bool hasField80;
+ private bool field80_;
+ public bool HasField80 {
+ get { return hasField80; }
+ }
+ public bool Field80 {
+ get { return field80_; }
+ }
+
+ public const int Field81FieldNumber = 81;
+ private bool hasField81;
+ private bool field81_ = true;
+ public bool HasField81 {
+ get { return hasField81; }
+ }
+ public bool Field81 {
+ get { return field81_; }
+ }
+
+ public const int Field2FieldNumber = 2;
+ private bool hasField2;
+ private int field2_;
+ public bool HasField2 {
+ get { return hasField2; }
+ }
+ public int Field2 {
+ get { return field2_; }
+ }
+
+ public const int Field3FieldNumber = 3;
+ private bool hasField3;
+ private int field3_;
+ public bool HasField3 {
+ get { return hasField3; }
+ }
+ public int Field3 {
+ get { return field3_; }
+ }
+
+ public const int Field280FieldNumber = 280;
+ private bool hasField280;
+ private int field280_;
+ public bool HasField280 {
+ get { return hasField280; }
+ }
+ public int Field280 {
+ get { return field280_; }
+ }
+
+ public const int Field6FieldNumber = 6;
+ private bool hasField6;
+ private int field6_;
+ public bool HasField6 {
+ get { return hasField6; }
+ }
+ public int Field6 {
+ get { return field6_; }
+ }
+
+ public const int Field22FieldNumber = 22;
+ private bool hasField22;
+ private long field22_;
+ public bool HasField22 {
+ get { return hasField22; }
+ }
+ public long Field22 {
+ get { return field22_; }
+ }
+
+ public const int Field4FieldNumber = 4;
+ private bool hasField4;
+ private string field4_ = "";
+ public bool HasField4 {
+ get { return hasField4; }
+ }
+ public string Field4 {
+ get { return field4_; }
+ }
+
+ public const int Field5FieldNumber = 5;
+ private pbc::PopsicleList<ulong> field5_ = new pbc::PopsicleList<ulong>();
+ [global::System.CLSCompliant(false)]
+ public scg::IList<ulong> Field5List {
+ get { return pbc::Lists.AsReadOnly(field5_); }
+ }
+ public int Field5Count {
+ get { return field5_.Count; }
+ }
+ [global::System.CLSCompliant(false)]
+ public ulong GetField5(int index) {
+ return field5_[index];
+ }
+
+ public const int Field59FieldNumber = 59;
+ private bool hasField59;
+ private bool field59_;
+ public bool HasField59 {
+ get { return hasField59; }
+ }
+ public bool Field59 {
+ get { return field59_; }
+ }
+
+ public const int Field7FieldNumber = 7;
+ private bool hasField7;
+ private string field7_ = "";
+ public bool HasField7 {
+ get { return hasField7; }
+ }
+ public string Field7 {
+ get { return field7_; }
+ }
+
+ public const int Field16FieldNumber = 16;
+ private bool hasField16;
+ private int field16_;
+ public bool HasField16 {
+ get { return hasField16; }
+ }
+ public int Field16 {
+ get { return field16_; }
+ }
+
+ public const int Field130FieldNumber = 130;
+ private bool hasField130;
+ private int field130_;
+ public bool HasField130 {
+ get { return hasField130; }
+ }
+ public int Field130 {
+ get { return field130_; }
+ }
+
+ public const int Field12FieldNumber = 12;
+ private bool hasField12;
+ private bool field12_ = true;
+ public bool HasField12 {
+ get { return hasField12; }
+ }
+ public bool Field12 {
+ get { return field12_; }
+ }
+
+ public const int Field17FieldNumber = 17;
+ private bool hasField17;
+ private bool field17_ = true;
+ public bool HasField17 {
+ get { return hasField17; }
+ }
+ public bool Field17 {
+ get { return field17_; }
+ }
+
+ public const int Field13FieldNumber = 13;
+ private bool hasField13;
+ private bool field13_ = true;
+ public bool HasField13 {
+ get { return hasField13; }
+ }
+ public bool Field13 {
+ get { return field13_; }
+ }
+
+ public const int Field14FieldNumber = 14;
+ private bool hasField14;
+ private bool field14_ = true;
+ public bool HasField14 {
+ get { return hasField14; }
+ }
+ public bool Field14 {
+ get { return field14_; }
+ }
+
+ public const int Field104FieldNumber = 104;
+ private bool hasField104;
+ private int field104_;
+ public bool HasField104 {
+ get { return hasField104; }
+ }
+ public int Field104 {
+ get { return field104_; }
+ }
+
+ public const int Field100FieldNumber = 100;
+ private bool hasField100;
+ private int field100_;
+ public bool HasField100 {
+ get { return hasField100; }
+ }
+ public int Field100 {
+ get { return field100_; }
+ }
+
+ public const int Field101FieldNumber = 101;
+ private bool hasField101;
+ private int field101_;
+ public bool HasField101 {
+ get { return hasField101; }
+ }
+ public int Field101 {
+ get { return field101_; }
+ }
+
+ public const int Field102FieldNumber = 102;
+ private bool hasField102;
+ private string field102_ = "";
+ public bool HasField102 {
+ get { return hasField102; }
+ }
+ public string Field102 {
+ get { return field102_; }
+ }
+
+ public const int Field103FieldNumber = 103;
+ private bool hasField103;
+ private string field103_ = "";
+ public bool HasField103 {
+ get { return hasField103; }
+ }
+ public string Field103 {
+ get { return field103_; }
+ }
+
+ public const int Field29FieldNumber = 29;
+ private bool hasField29;
+ private int field29_;
+ public bool HasField29 {
+ get { return hasField29; }
+ }
+ public int Field29 {
+ get { return field29_; }
+ }
+
+ public const int Field30FieldNumber = 30;
+ private bool hasField30;
+ private bool field30_;
+ public bool HasField30 {
+ get { return hasField30; }
+ }
+ public bool Field30 {
+ get { return field30_; }
+ }
+
+ public const int Field60FieldNumber = 60;
+ private bool hasField60;
+ private int field60_ = -1;
+ public bool HasField60 {
+ get { return hasField60; }
+ }
+ public int Field60 {
+ get { return field60_; }
+ }
+
+ public const int Field271FieldNumber = 271;
+ private bool hasField271;
+ private int field271_ = -1;
+ public bool HasField271 {
+ get { return hasField271; }
+ }
+ public int Field271 {
+ get { return field271_; }
+ }
+
+ public const int Field272FieldNumber = 272;
+ private bool hasField272;
+ private int field272_ = -1;
+ public bool HasField272 {
+ get { return hasField272; }
+ }
+ public int Field272 {
+ get { return field272_; }
+ }
+
+ public const int Field150FieldNumber = 150;
+ private bool hasField150;
+ private int field150_;
+ public bool HasField150 {
+ get { return hasField150; }
+ }
+ public int Field150 {
+ get { return field150_; }
+ }
+
+ public const int Field23FieldNumber = 23;
+ private bool hasField23;
+ private int field23_;
+ public bool HasField23 {
+ get { return hasField23; }
+ }
+ public int Field23 {
+ get { return field23_; }
+ }
+
+ public const int Field24FieldNumber = 24;
+ private bool hasField24;
+ private bool field24_;
+ public bool HasField24 {
+ get { return hasField24; }
+ }
+ public bool Field24 {
+ get { return field24_; }
+ }
+
+ public const int Field25FieldNumber = 25;
+ private bool hasField25;
+ private int field25_;
+ public bool HasField25 {
+ get { return hasField25; }
+ }
+ public int Field25 {
+ get { return field25_; }
+ }
+
+ public const int Field15FieldNumber = 15;
+ private bool hasField15;
+ private global::Google.ProtocolBuffers.TestProtos.SpeedMessage1SubMessage field15_;
+ public bool HasField15 {
+ get { return hasField15; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.SpeedMessage1SubMessage Field15 {
+ get { return field15_ ?? global::Google.ProtocolBuffers.TestProtos.SpeedMessage1SubMessage.DefaultInstance; }
+ }
+
+ public const int Field78FieldNumber = 78;
+ private bool hasField78;
+ private bool field78_;
+ public bool HasField78 {
+ get { return hasField78; }
+ }
+ public bool Field78 {
+ get { return field78_; }
+ }
+
+ public const int Field67FieldNumber = 67;
+ private bool hasField67;
+ private int field67_;
+ public bool HasField67 {
+ get { return hasField67; }
+ }
+ public int Field67 {
+ get { return field67_; }
+ }
+
+ public const int Field68FieldNumber = 68;
+ private bool hasField68;
+ private int field68_;
+ public bool HasField68 {
+ get { return hasField68; }
+ }
+ public int Field68 {
+ get { return field68_; }
+ }
+
+ public const int Field128FieldNumber = 128;
+ private bool hasField128;
+ private int field128_;
+ public bool HasField128 {
+ get { return hasField128; }
+ }
+ public int Field128 {
+ get { return field128_; }
+ }
+
+ public const int Field129FieldNumber = 129;
+ private bool hasField129;
+ private string field129_ = "xxxxxxxxxxxxxxxxxxxxx";
+ public bool HasField129 {
+ get { return hasField129; }
+ }
+ public string Field129 {
+ get { return field129_; }
+ }
+
+ public const int Field131FieldNumber = 131;
+ private bool hasField131;
+ private int field131_;
+ public bool HasField131 {
+ get { return hasField131; }
+ }
+ public int Field131 {
+ get { return field131_; }
+ }
+
+ public override bool IsInitialized {
+ get {
+ if (!hasField1) return false;
+ if (!hasField2) return false;
+ if (!hasField3) return false;
+ return true;
+ }
+ }
+
+ public override void WriteTo(pb::ICodedOutputStream output) {
+ CalcSerializedSize();
+ string[] field_names = _speedMessage1FieldNames;
+ if (hasField1) {
+ output.WriteString(1, field_names[0], Field1);
+ }
+ if (hasField2) {
+ output.WriteInt32(2, field_names[18], Field2);
+ }
+ if (hasField3) {
+ output.WriteInt32(3, field_names[27], Field3);
+ }
+ if (hasField4) {
+ output.WriteString(4, field_names[29], Field4);
+ }
+ if (field5_.Count > 0) {
+ output.WriteFixed64Array(5, field_names[30], field5_);
+ }
+ if (hasField6) {
+ output.WriteInt32(6, field_names[32], Field6);
+ }
+ if (hasField7) {
+ output.WriteString(7, field_names[36], Field7);
+ }
+ if (hasField9) {
+ output.WriteString(9, field_names[40], Field9);
+ }
+ if (hasField12) {
+ output.WriteBool(12, field_names[6], Field12);
+ }
+ if (hasField13) {
+ output.WriteBool(13, field_names[9], Field13);
+ }
+ if (hasField14) {
+ output.WriteBool(14, field_names[12], Field14);
+ }
+ if (hasField15) {
+ output.WriteMessage(15, field_names[13], Field15);
+ }
+ if (hasField16) {
+ output.WriteInt32(16, field_names[15], Field16);
+ }
+ if (hasField17) {
+ output.WriteBool(17, field_names[16], Field17);
+ }
+ if (hasField18) {
+ output.WriteString(18, field_names[17], Field18);
+ }
+ if (hasField22) {
+ output.WriteInt64(22, field_names[19], Field22);
+ }
+ if (hasField23) {
+ output.WriteInt32(23, field_names[20], Field23);
+ }
+ if (hasField24) {
+ output.WriteBool(24, field_names[21], Field24);
+ }
+ if (hasField25) {
+ output.WriteInt32(25, field_names[22], Field25);
+ }
+ if (hasField29) {
+ output.WriteInt32(29, field_names[26], Field29);
+ }
+ if (hasField30) {
+ output.WriteBool(30, field_names[28], Field30);
+ }
+ if (hasField59) {
+ output.WriteBool(59, field_names[31], Field59);
+ }
+ if (hasField60) {
+ output.WriteInt32(60, field_names[33], Field60);
+ }
+ if (hasField67) {
+ output.WriteInt32(67, field_names[34], Field67);
+ }
+ if (hasField68) {
+ output.WriteInt32(68, field_names[35], Field68);
+ }
+ if (hasField78) {
+ output.WriteBool(78, field_names[37], Field78);
+ }
+ if (hasField80) {
+ output.WriteBool(80, field_names[38], Field80);
+ }
+ if (hasField81) {
+ output.WriteBool(81, field_names[39], Field81);
+ }
+ if (hasField100) {
+ output.WriteInt32(100, field_names[1], Field100);
+ }
+ if (hasField101) {
+ output.WriteInt32(101, field_names[2], Field101);
+ }
+ if (hasField102) {
+ output.WriteString(102, field_names[3], Field102);
+ }
+ if (hasField103) {
+ output.WriteString(103, field_names[4], Field103);
+ }
+ if (hasField104) {
+ output.WriteInt32(104, field_names[5], Field104);
+ }
+ if (hasField128) {
+ output.WriteInt32(128, field_names[7], Field128);
+ }
+ if (hasField129) {
+ output.WriteString(129, field_names[8], Field129);
+ }
+ if (hasField130) {
+ output.WriteInt32(130, field_names[10], Field130);
+ }
+ if (hasField131) {
+ output.WriteInt32(131, field_names[11], Field131);
+ }
+ if (hasField150) {
+ output.WriteInt32(150, field_names[14], Field150);
+ }
+ if (hasField271) {
+ output.WriteInt32(271, field_names[23], Field271);
+ }
+ if (hasField272) {
+ output.WriteInt32(272, field_names[24], Field272);
+ }
+ if (hasField280) {
+ output.WriteInt32(280, field_names[25], Field280);
+ }
+ UnknownFields.WriteTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public override int SerializedSize {
+ get {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+ return CalcSerializedSize();
+ }
+ }
+
+ private int CalcSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (hasField1) {
+ size += pb::CodedOutputStream.ComputeStringSize(1, Field1);
+ }
+ if (hasField9) {
+ size += pb::CodedOutputStream.ComputeStringSize(9, Field9);
+ }
+ if (hasField18) {
+ size += pb::CodedOutputStream.ComputeStringSize(18, Field18);
+ }
+ if (hasField80) {
+ size += pb::CodedOutputStream.ComputeBoolSize(80, Field80);
+ }
+ if (hasField81) {
+ size += pb::CodedOutputStream.ComputeBoolSize(81, Field81);
+ }
+ if (hasField2) {
+ size += pb::CodedOutputStream.ComputeInt32Size(2, Field2);
+ }
+ if (hasField3) {
+ size += pb::CodedOutputStream.ComputeInt32Size(3, Field3);
+ }
+ if (hasField280) {
+ size += pb::CodedOutputStream.ComputeInt32Size(280, Field280);
+ }
+ if (hasField6) {
+ size += pb::CodedOutputStream.ComputeInt32Size(6, Field6);
+ }
+ if (hasField22) {
+ size += pb::CodedOutputStream.ComputeInt64Size(22, Field22);
+ }
+ if (hasField4) {
+ size += pb::CodedOutputStream.ComputeStringSize(4, Field4);
+ }
+ {
+ int dataSize = 0;
+ dataSize = 8 * field5_.Count;
+ size += dataSize;
+ size += 1 * field5_.Count;
+ }
+ if (hasField59) {
+ size += pb::CodedOutputStream.ComputeBoolSize(59, Field59);
+ }
+ if (hasField7) {
+ size += pb::CodedOutputStream.ComputeStringSize(7, Field7);
+ }
+ if (hasField16) {
+ size += pb::CodedOutputStream.ComputeInt32Size(16, Field16);
+ }
+ if (hasField130) {
+ size += pb::CodedOutputStream.ComputeInt32Size(130, Field130);
+ }
+ if (hasField12) {
+ size += pb::CodedOutputStream.ComputeBoolSize(12, Field12);
+ }
+ if (hasField17) {
+ size += pb::CodedOutputStream.ComputeBoolSize(17, Field17);
+ }
+ if (hasField13) {
+ size += pb::CodedOutputStream.ComputeBoolSize(13, Field13);
+ }
+ if (hasField14) {
+ size += pb::CodedOutputStream.ComputeBoolSize(14, Field14);
+ }
+ if (hasField104) {
+ size += pb::CodedOutputStream.ComputeInt32Size(104, Field104);
+ }
+ if (hasField100) {
+ size += pb::CodedOutputStream.ComputeInt32Size(100, Field100);
+ }
+ if (hasField101) {
+ size += pb::CodedOutputStream.ComputeInt32Size(101, Field101);
+ }
+ if (hasField102) {
+ size += pb::CodedOutputStream.ComputeStringSize(102, Field102);
+ }
+ if (hasField103) {
+ size += pb::CodedOutputStream.ComputeStringSize(103, Field103);
+ }
+ if (hasField29) {
+ size += pb::CodedOutputStream.ComputeInt32Size(29, Field29);
+ }
+ if (hasField30) {
+ size += pb::CodedOutputStream.ComputeBoolSize(30, Field30);
+ }
+ if (hasField60) {
+ size += pb::CodedOutputStream.ComputeInt32Size(60, Field60);
+ }
+ if (hasField271) {
+ size += pb::CodedOutputStream.ComputeInt32Size(271, Field271);
+ }
+ if (hasField272) {
+ size += pb::CodedOutputStream.ComputeInt32Size(272, Field272);
+ }
+ if (hasField150) {
+ size += pb::CodedOutputStream.ComputeInt32Size(150, Field150);
+ }
+ if (hasField23) {
+ size += pb::CodedOutputStream.ComputeInt32Size(23, Field23);
+ }
+ if (hasField24) {
+ size += pb::CodedOutputStream.ComputeBoolSize(24, Field24);
+ }
+ if (hasField25) {
+ size += pb::CodedOutputStream.ComputeInt32Size(25, Field25);
+ }
+ if (hasField15) {
+ size += pb::CodedOutputStream.ComputeMessageSize(15, Field15);
+ }
+ if (hasField78) {
+ size += pb::CodedOutputStream.ComputeBoolSize(78, Field78);
+ }
+ if (hasField67) {
+ size += pb::CodedOutputStream.ComputeInt32Size(67, Field67);
+ }
+ if (hasField68) {
+ size += pb::CodedOutputStream.ComputeInt32Size(68, Field68);
+ }
+ if (hasField128) {
+ size += pb::CodedOutputStream.ComputeInt32Size(128, Field128);
+ }
+ if (hasField129) {
+ size += pb::CodedOutputStream.ComputeStringSize(129, Field129);
+ }
+ if (hasField131) {
+ size += pb::CodedOutputStream.ComputeInt32Size(131, Field131);
+ }
+ size += UnknownFields.SerializedSize;
+ memoizedSerializedSize = size;
+ return size;
+ }
+ public static SpeedMessage1 ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static SpeedMessage1 ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static SpeedMessage1 ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static SpeedMessage1 ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static SpeedMessage1 ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static SpeedMessage1 ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static SpeedMessage1 ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static SpeedMessage1 ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static SpeedMessage1 ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static SpeedMessage1 ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private SpeedMessage1 MakeReadOnly() {
+ field5_.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(SpeedMessage1 prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Builder : pb::GeneratedBuilder<SpeedMessage1, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(SpeedMessage1 cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private SpeedMessage1 result;
+
+ private SpeedMessage1 PrepareBuilder() {
+ if (resultIsReadOnly) {
+ SpeedMessage1 original = result;
+ result = new SpeedMessage1();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override SpeedMessage1 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.SpeedMessage1.Descriptor; }
+ }
+
+ public override SpeedMessage1 DefaultInstanceForType {
+ get { return global::Google.ProtocolBuffers.TestProtos.SpeedMessage1.DefaultInstance; }
+ }
+
+ public override SpeedMessage1 BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+ public override Builder MergeFrom(pb::IMessage other) {
+ if (other is SpeedMessage1) {
+ return MergeFrom((SpeedMessage1) other);
+ } else {
+ base.MergeFrom(other);
+ return this;
+ }
+ }
+
+ public override Builder MergeFrom(SpeedMessage1 other) {
+ if (other == global::Google.ProtocolBuffers.TestProtos.SpeedMessage1.DefaultInstance) return this;
+ PrepareBuilder();
+ if (other.HasField1) {
+ Field1 = other.Field1;
+ }
+ if (other.HasField9) {
+ Field9 = other.Field9;
+ }
+ if (other.HasField18) {
+ Field18 = other.Field18;
+ }
+ if (other.HasField80) {
+ Field80 = other.Field80;
+ }
+ if (other.HasField81) {
+ Field81 = other.Field81;
+ }
+ if (other.HasField2) {
+ Field2 = other.Field2;
+ }
+ if (other.HasField3) {
+ Field3 = other.Field3;
+ }
+ if (other.HasField280) {
+ Field280 = other.Field280;
+ }
+ if (other.HasField6) {
+ Field6 = other.Field6;
+ }
+ if (other.HasField22) {
+ Field22 = other.Field22;
+ }
+ if (other.HasField4) {
+ Field4 = other.Field4;
+ }
+ if (other.field5_.Count != 0) {
+ result.field5_.Add(other.field5_);
+ }
+ if (other.HasField59) {
+ Field59 = other.Field59;
+ }
+ if (other.HasField7) {
+ Field7 = other.Field7;
+ }
+ if (other.HasField16) {
+ Field16 = other.Field16;
+ }
+ if (other.HasField130) {
+ Field130 = other.Field130;
+ }
+ if (other.HasField12) {
+ Field12 = other.Field12;
+ }
+ if (other.HasField17) {
+ Field17 = other.Field17;
+ }
+ if (other.HasField13) {
+ Field13 = other.Field13;
+ }
+ if (other.HasField14) {
+ Field14 = other.Field14;
+ }
+ if (other.HasField104) {
+ Field104 = other.Field104;
+ }
+ if (other.HasField100) {
+ Field100 = other.Field100;
+ }
+ if (other.HasField101) {
+ Field101 = other.Field101;
+ }
+ if (other.HasField102) {
+ Field102 = other.Field102;
+ }
+ if (other.HasField103) {
+ Field103 = other.Field103;
+ }
+ if (other.HasField29) {
+ Field29 = other.Field29;
+ }
+ if (other.HasField30) {
+ Field30 = other.Field30;
+ }
+ if (other.HasField60) {
+ Field60 = other.Field60;
+ }
+ if (other.HasField271) {
+ Field271 = other.Field271;
+ }
+ if (other.HasField272) {
+ Field272 = other.Field272;
+ }
+ if (other.HasField150) {
+ Field150 = other.Field150;
+ }
+ if (other.HasField23) {
+ Field23 = other.Field23;
+ }
+ if (other.HasField24) {
+ Field24 = other.Field24;
+ }
+ if (other.HasField25) {
+ Field25 = other.Field25;
+ }
+ if (other.HasField15) {
+ MergeField15(other.Field15);
+ }
+ if (other.HasField78) {
+ Field78 = other.Field78;
+ }
+ if (other.HasField67) {
+ Field67 = other.Field67;
+ }
+ if (other.HasField68) {
+ Field68 = other.Field68;
+ }
+ if (other.HasField128) {
+ Field128 = other.Field128;
+ }
+ if (other.HasField129) {
+ Field129 = other.Field129;
+ }
+ if (other.HasField131) {
+ Field131 = other.Field131;
+ }
+ 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(_speedMessage1FieldNames, field_name, global::System.StringComparer.Ordinal);
+ if(field_ordinal >= 0)
+ tag = _speedMessage1FieldTags[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.hasField1 = input.ReadString(ref result.field1_);
+ break;
+ }
+ case 16: {
+ result.hasField2 = input.ReadInt32(ref result.field2_);
+ break;
+ }
+ case 24: {
+ result.hasField3 = input.ReadInt32(ref result.field3_);
+ break;
+ }
+ case 34: {
+ result.hasField4 = input.ReadString(ref result.field4_);
+ break;
+ }
+ case 42:
+ case 41: {
+ input.ReadFixed64Array(tag, field_name, result.field5_);
+ break;
+ }
+ case 48: {
+ result.hasField6 = input.ReadInt32(ref result.field6_);
+ break;
+ }
+ case 58: {
+ result.hasField7 = input.ReadString(ref result.field7_);
+ break;
+ }
+ case 74: {
+ result.hasField9 = input.ReadString(ref result.field9_);
+ break;
+ }
+ case 96: {
+ result.hasField12 = input.ReadBool(ref result.field12_);
+ break;
+ }
+ case 104: {
+ result.hasField13 = input.ReadBool(ref result.field13_);
+ break;
+ }
+ case 112: {
+ result.hasField14 = input.ReadBool(ref result.field14_);
+ break;
+ }
+ case 122: {
+ global::Google.ProtocolBuffers.TestProtos.SpeedMessage1SubMessage.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.SpeedMessage1SubMessage.CreateBuilder();
+ if (result.hasField15) {
+ subBuilder.MergeFrom(Field15);
+ }
+ input.ReadMessage(subBuilder, extensionRegistry);
+ Field15 = subBuilder.BuildPartial();
+ break;
+ }
+ case 128: {
+ result.hasField16 = input.ReadInt32(ref result.field16_);
+ break;
+ }
+ case 136: {
+ result.hasField17 = input.ReadBool(ref result.field17_);
+ break;
+ }
+ case 146: {
+ result.hasField18 = input.ReadString(ref result.field18_);
+ break;
+ }
+ case 176: {
+ result.hasField22 = input.ReadInt64(ref result.field22_);
+ break;
+ }
+ case 184: {
+ result.hasField23 = input.ReadInt32(ref result.field23_);
+ break;
+ }
+ case 192: {
+ result.hasField24 = input.ReadBool(ref result.field24_);
+ break;
+ }
+ case 200: {
+ result.hasField25 = input.ReadInt32(ref result.field25_);
+ break;
+ }
+ case 232: {
+ result.hasField29 = input.ReadInt32(ref result.field29_);
+ break;
+ }
+ case 240: {
+ result.hasField30 = input.ReadBool(ref result.field30_);
+ break;
+ }
+ case 472: {
+ result.hasField59 = input.ReadBool(ref result.field59_);
+ break;
+ }
+ case 480: {
+ result.hasField60 = input.ReadInt32(ref result.field60_);
+ break;
+ }
+ case 536: {
+ result.hasField67 = input.ReadInt32(ref result.field67_);
+ break;
+ }
+ case 544: {
+ result.hasField68 = input.ReadInt32(ref result.field68_);
+ break;
+ }
+ case 624: {
+ result.hasField78 = input.ReadBool(ref result.field78_);
+ break;
+ }
+ case 640: {
+ result.hasField80 = input.ReadBool(ref result.field80_);
+ break;
+ }
+ case 648: {
+ result.hasField81 = input.ReadBool(ref result.field81_);
+ break;
+ }
+ case 800: {
+ result.hasField100 = input.ReadInt32(ref result.field100_);
+ break;
+ }
+ case 808: {
+ result.hasField101 = input.ReadInt32(ref result.field101_);
+ break;
+ }
+ case 818: {
+ result.hasField102 = input.ReadString(ref result.field102_);
+ break;
+ }
+ case 826: {
+ result.hasField103 = input.ReadString(ref result.field103_);
+ break;
+ }
+ case 832: {
+ result.hasField104 = input.ReadInt32(ref result.field104_);
+ break;
+ }
+ case 1024: {
+ result.hasField128 = input.ReadInt32(ref result.field128_);
+ break;
+ }
+ case 1034: {
+ result.hasField129 = input.ReadString(ref result.field129_);
+ break;
+ }
+ case 1040: {
+ result.hasField130 = input.ReadInt32(ref result.field130_);
+ break;
+ }
+ case 1048: {
+ result.hasField131 = input.ReadInt32(ref result.field131_);
+ break;
+ }
+ case 1200: {
+ result.hasField150 = input.ReadInt32(ref result.field150_);
+ break;
+ }
+ case 2168: {
+ result.hasField271 = input.ReadInt32(ref result.field271_);
+ break;
+ }
+ case 2176: {
+ result.hasField272 = input.ReadInt32(ref result.field272_);
+ break;
+ }
+ case 2240: {
+ result.hasField280 = input.ReadInt32(ref result.field280_);
+ break;
+ }
+ }
+ }
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
+ }
+
+
+ public bool HasField1 {
+ get { return result.hasField1; }
+ }
+ public string Field1 {
+ get { return result.Field1; }
+ set { SetField1(value); }
+ }
+ public Builder SetField1(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasField1 = true;
+ result.field1_ = value;
+ return this;
+ }
+ public Builder ClearField1() {
+ PrepareBuilder();
+ result.hasField1 = false;
+ result.field1_ = "";
+ return this;
+ }
+
+ public bool HasField9 {
+ get { return result.hasField9; }
+ }
+ public string Field9 {
+ get { return result.Field9; }
+ set { SetField9(value); }
+ }
+ public Builder SetField9(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasField9 = true;
+ result.field9_ = value;
+ return this;
+ }
+ public Builder ClearField9() {
+ PrepareBuilder();
+ result.hasField9 = false;
+ result.field9_ = "";
+ return this;
+ }
+
+ public bool HasField18 {
+ get { return result.hasField18; }
+ }
+ public string Field18 {
+ get { return result.Field18; }
+ set { SetField18(value); }
+ }
+ public Builder SetField18(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasField18 = true;
+ result.field18_ = value;
+ return this;
+ }
+ public Builder ClearField18() {
+ PrepareBuilder();
+ result.hasField18 = false;
+ result.field18_ = "";
+ return this;
+ }
+
+ public bool HasField80 {
+ get { return result.hasField80; }
+ }
+ public bool Field80 {
+ get { return result.Field80; }
+ set { SetField80(value); }
+ }
+ public Builder SetField80(bool value) {
+ PrepareBuilder();
+ result.hasField80 = true;
+ result.field80_ = value;
+ return this;
+ }
+ public Builder ClearField80() {
+ PrepareBuilder();
+ result.hasField80 = false;
+ result.field80_ = false;
+ return this;
+ }
+
+ public bool HasField81 {
+ get { return result.hasField81; }
+ }
+ public bool Field81 {
+ get { return result.Field81; }
+ set { SetField81(value); }
+ }
+ public Builder SetField81(bool value) {
+ PrepareBuilder();
+ result.hasField81 = true;
+ result.field81_ = value;
+ return this;
+ }
+ public Builder ClearField81() {
+ PrepareBuilder();
+ result.hasField81 = false;
+ result.field81_ = true;
+ return this;
+ }
+
+ public bool HasField2 {
+ get { return result.hasField2; }
+ }
+ public int Field2 {
+ get { return result.Field2; }
+ set { SetField2(value); }
+ }
+ public Builder SetField2(int value) {
+ PrepareBuilder();
+ result.hasField2 = true;
+ result.field2_ = value;
+ return this;
+ }
+ public Builder ClearField2() {
+ PrepareBuilder();
+ result.hasField2 = false;
+ result.field2_ = 0;
+ return this;
+ }
+
+ public bool HasField3 {
+ get { return result.hasField3; }
+ }
+ public int Field3 {
+ get { return result.Field3; }
+ set { SetField3(value); }
+ }
+ public Builder SetField3(int value) {
+ PrepareBuilder();
+ result.hasField3 = true;
+ result.field3_ = value;
+ return this;
+ }
+ public Builder ClearField3() {
+ PrepareBuilder();
+ result.hasField3 = false;
+ result.field3_ = 0;
+ return this;
+ }
+
+ public bool HasField280 {
+ get { return result.hasField280; }
+ }
+ public int Field280 {
+ get { return result.Field280; }
+ set { SetField280(value); }
+ }
+ public Builder SetField280(int value) {
+ PrepareBuilder();
+ result.hasField280 = true;
+ result.field280_ = value;
+ return this;
+ }
+ public Builder ClearField280() {
+ PrepareBuilder();
+ result.hasField280 = false;
+ result.field280_ = 0;
+ return this;
+ }
+
+ public bool HasField6 {
+ get { return result.hasField6; }
+ }
+ public int Field6 {
+ get { return result.Field6; }
+ set { SetField6(value); }
+ }
+ public Builder SetField6(int value) {
+ PrepareBuilder();
+ result.hasField6 = true;
+ result.field6_ = value;
+ return this;
+ }
+ public Builder ClearField6() {
+ PrepareBuilder();
+ result.hasField6 = false;
+ result.field6_ = 0;
+ return this;
+ }
+
+ public bool HasField22 {
+ get { return result.hasField22; }
+ }
+ public long Field22 {
+ get { return result.Field22; }
+ set { SetField22(value); }
+ }
+ public Builder SetField22(long value) {
+ PrepareBuilder();
+ result.hasField22 = true;
+ result.field22_ = value;
+ return this;
+ }
+ public Builder ClearField22() {
+ PrepareBuilder();
+ result.hasField22 = false;
+ result.field22_ = 0L;
+ return this;
+ }
+
+ public bool HasField4 {
+ get { return result.hasField4; }
+ }
+ public string Field4 {
+ get { return result.Field4; }
+ set { SetField4(value); }
+ }
+ public Builder SetField4(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasField4 = true;
+ result.field4_ = value;
+ return this;
+ }
+ public Builder ClearField4() {
+ PrepareBuilder();
+ result.hasField4 = false;
+ result.field4_ = "";
+ return this;
+ }
+
+ [global::System.CLSCompliant(false)]
+ public pbc::IPopsicleList<ulong> Field5List {
+ get { return PrepareBuilder().field5_; }
+ }
+ public int Field5Count {
+ get { return result.Field5Count; }
+ }
+ [global::System.CLSCompliant(false)]
+ public ulong GetField5(int index) {
+ return result.GetField5(index);
+ }
+ [global::System.CLSCompliant(false)]
+ public Builder SetField5(int index, ulong value) {
+ PrepareBuilder();
+ result.field5_[index] = value;
+ return this;
+ }
+ [global::System.CLSCompliant(false)]
+ public Builder AddField5(ulong value) {
+ PrepareBuilder();
+ result.field5_.Add(value);
+ return this;
+ }
+ [global::System.CLSCompliant(false)]
+ public Builder AddRangeField5(scg::IEnumerable<ulong> values) {
+ PrepareBuilder();
+ result.field5_.Add(values);
+ return this;
+ }
+ public Builder ClearField5() {
+ PrepareBuilder();
+ result.field5_.Clear();
+ return this;
+ }
+
+ public bool HasField59 {
+ get { return result.hasField59; }
+ }
+ public bool Field59 {
+ get { return result.Field59; }
+ set { SetField59(value); }
+ }
+ public Builder SetField59(bool value) {
+ PrepareBuilder();
+ result.hasField59 = true;
+ result.field59_ = value;
+ return this;
+ }
+ public Builder ClearField59() {
+ PrepareBuilder();
+ result.hasField59 = false;
+ result.field59_ = false;
+ return this;
+ }
+
+ public bool HasField7 {
+ get { return result.hasField7; }
+ }
+ public string Field7 {
+ get { return result.Field7; }
+ set { SetField7(value); }
+ }
+ public Builder SetField7(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasField7 = true;
+ result.field7_ = value;
+ return this;
+ }
+ public Builder ClearField7() {
+ PrepareBuilder();
+ result.hasField7 = false;
+ result.field7_ = "";
+ return this;
+ }
+
+ public bool HasField16 {
+ get { return result.hasField16; }
+ }
+ public int Field16 {
+ get { return result.Field16; }
+ set { SetField16(value); }
+ }
+ public Builder SetField16(int value) {
+ PrepareBuilder();
+ result.hasField16 = true;
+ result.field16_ = value;
+ return this;
+ }
+ public Builder ClearField16() {
+ PrepareBuilder();
+ result.hasField16 = false;
+ result.field16_ = 0;
+ return this;
+ }
+
+ public bool HasField130 {
+ get { return result.hasField130; }
+ }
+ public int Field130 {
+ get { return result.Field130; }
+ set { SetField130(value); }
+ }
+ public Builder SetField130(int value) {
+ PrepareBuilder();
+ result.hasField130 = true;
+ result.field130_ = value;
+ return this;
+ }
+ public Builder ClearField130() {
+ PrepareBuilder();
+ result.hasField130 = false;
+ result.field130_ = 0;
+ return this;
+ }
+
+ public bool HasField12 {
+ get { return result.hasField12; }
+ }
+ public bool Field12 {
+ get { return result.Field12; }
+ set { SetField12(value); }
+ }
+ public Builder SetField12(bool value) {
+ PrepareBuilder();
+ result.hasField12 = true;
+ result.field12_ = value;
+ return this;
+ }
+ public Builder ClearField12() {
+ PrepareBuilder();
+ result.hasField12 = false;
+ result.field12_ = true;
+ return this;
+ }
+
+ public bool HasField17 {
+ get { return result.hasField17; }
+ }
+ public bool Field17 {
+ get { return result.Field17; }
+ set { SetField17(value); }
+ }
+ public Builder SetField17(bool value) {
+ PrepareBuilder();
+ result.hasField17 = true;
+ result.field17_ = value;
+ return this;
+ }
+ public Builder ClearField17() {
+ PrepareBuilder();
+ result.hasField17 = false;
+ result.field17_ = true;
+ return this;
+ }
+
+ public bool HasField13 {
+ get { return result.hasField13; }
+ }
+ public bool Field13 {
+ get { return result.Field13; }
+ set { SetField13(value); }
+ }
+ public Builder SetField13(bool value) {
+ PrepareBuilder();
+ result.hasField13 = true;
+ result.field13_ = value;
+ return this;
+ }
+ public Builder ClearField13() {
+ PrepareBuilder();
+ result.hasField13 = false;
+ result.field13_ = true;
+ return this;
+ }
+
+ public bool HasField14 {
+ get { return result.hasField14; }
+ }
+ public bool Field14 {
+ get { return result.Field14; }
+ set { SetField14(value); }
+ }
+ public Builder SetField14(bool value) {
+ PrepareBuilder();
+ result.hasField14 = true;
+ result.field14_ = value;
+ return this;
+ }
+ public Builder ClearField14() {
+ PrepareBuilder();
+ result.hasField14 = false;
+ result.field14_ = true;
+ return this;
+ }
+
+ public bool HasField104 {
+ get { return result.hasField104; }
+ }
+ public int Field104 {
+ get { return result.Field104; }
+ set { SetField104(value); }
+ }
+ public Builder SetField104(int value) {
+ PrepareBuilder();
+ result.hasField104 = true;
+ result.field104_ = value;
+ return this;
+ }
+ public Builder ClearField104() {
+ PrepareBuilder();
+ result.hasField104 = false;
+ result.field104_ = 0;
+ return this;
+ }
+
+ public bool HasField100 {
+ get { return result.hasField100; }
+ }
+ public int Field100 {
+ get { return result.Field100; }
+ set { SetField100(value); }
+ }
+ public Builder SetField100(int value) {
+ PrepareBuilder();
+ result.hasField100 = true;
+ result.field100_ = value;
+ return this;
+ }
+ public Builder ClearField100() {
+ PrepareBuilder();
+ result.hasField100 = false;
+ result.field100_ = 0;
+ return this;
+ }
+
+ public bool HasField101 {
+ get { return result.hasField101; }
+ }
+ public int Field101 {
+ get { return result.Field101; }
+ set { SetField101(value); }
+ }
+ public Builder SetField101(int value) {
+ PrepareBuilder();
+ result.hasField101 = true;
+ result.field101_ = value;
+ return this;
+ }
+ public Builder ClearField101() {
+ PrepareBuilder();
+ result.hasField101 = false;
+ result.field101_ = 0;
+ return this;
+ }
+
+ public bool HasField102 {
+ get { return result.hasField102; }
+ }
+ public string Field102 {
+ get { return result.Field102; }
+ set { SetField102(value); }
+ }
+ public Builder SetField102(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasField102 = true;
+ result.field102_ = value;
+ return this;
+ }
+ public Builder ClearField102() {
+ PrepareBuilder();
+ result.hasField102 = false;
+ result.field102_ = "";
+ return this;
+ }
+
+ public bool HasField103 {
+ get { return result.hasField103; }
+ }
+ public string Field103 {
+ get { return result.Field103; }
+ set { SetField103(value); }
+ }
+ public Builder SetField103(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasField103 = true;
+ result.field103_ = value;
+ return this;
+ }
+ public Builder ClearField103() {
+ PrepareBuilder();
+ result.hasField103 = false;
+ result.field103_ = "";
+ return this;
+ }
+
+ public bool HasField29 {
+ get { return result.hasField29; }
+ }
+ public int Field29 {
+ get { return result.Field29; }
+ set { SetField29(value); }
+ }
+ public Builder SetField29(int value) {
+ PrepareBuilder();
+ result.hasField29 = true;
+ result.field29_ = value;
+ return this;
+ }
+ public Builder ClearField29() {
+ PrepareBuilder();
+ result.hasField29 = false;
+ result.field29_ = 0;
+ return this;
+ }
+
+ public bool HasField30 {
+ get { return result.hasField30; }
+ }
+ public bool Field30 {
+ get { return result.Field30; }
+ set { SetField30(value); }
+ }
+ public Builder SetField30(bool value) {
+ PrepareBuilder();
+ result.hasField30 = true;
+ result.field30_ = value;
+ return this;
+ }
+ public Builder ClearField30() {
+ PrepareBuilder();
+ result.hasField30 = false;
+ result.field30_ = false;
+ return this;
+ }
+
+ public bool HasField60 {
+ get { return result.hasField60; }
+ }
+ public int Field60 {
+ get { return result.Field60; }
+ set { SetField60(value); }
+ }
+ public Builder SetField60(int value) {
+ PrepareBuilder();
+ result.hasField60 = true;
+ result.field60_ = value;
+ return this;
+ }
+ public Builder ClearField60() {
+ PrepareBuilder();
+ result.hasField60 = false;
+ result.field60_ = -1;
+ return this;
+ }
+
+ public bool HasField271 {
+ get { return result.hasField271; }
+ }
+ public int Field271 {
+ get { return result.Field271; }
+ set { SetField271(value); }
+ }
+ public Builder SetField271(int value) {
+ PrepareBuilder();
+ result.hasField271 = true;
+ result.field271_ = value;
+ return this;
+ }
+ public Builder ClearField271() {
+ PrepareBuilder();
+ result.hasField271 = false;
+ result.field271_ = -1;
+ return this;
+ }
+
+ public bool HasField272 {
+ get { return result.hasField272; }
+ }
+ public int Field272 {
+ get { return result.Field272; }
+ set { SetField272(value); }
+ }
+ public Builder SetField272(int value) {
+ PrepareBuilder();
+ result.hasField272 = true;
+ result.field272_ = value;
+ return this;
+ }
+ public Builder ClearField272() {
+ PrepareBuilder();
+ result.hasField272 = false;
+ result.field272_ = -1;
+ return this;
+ }
+
+ public bool HasField150 {
+ get { return result.hasField150; }
+ }
+ public int Field150 {
+ get { return result.Field150; }
+ set { SetField150(value); }
+ }
+ public Builder SetField150(int value) {
+ PrepareBuilder();
+ result.hasField150 = true;
+ result.field150_ = value;
+ return this;
+ }
+ public Builder ClearField150() {
+ PrepareBuilder();
+ result.hasField150 = false;
+ result.field150_ = 0;
+ return this;
+ }
+
+ public bool HasField23 {
+ get { return result.hasField23; }
+ }
+ public int Field23 {
+ get { return result.Field23; }
+ set { SetField23(value); }
+ }
+ public Builder SetField23(int value) {
+ PrepareBuilder();
+ result.hasField23 = true;
+ result.field23_ = value;
+ return this;
+ }
+ public Builder ClearField23() {
+ PrepareBuilder();
+ result.hasField23 = false;
+ result.field23_ = 0;
+ return this;
+ }
+
+ public bool HasField24 {
+ get { return result.hasField24; }
+ }
+ public bool Field24 {
+ get { return result.Field24; }
+ set { SetField24(value); }
+ }
+ public Builder SetField24(bool value) {
+ PrepareBuilder();
+ result.hasField24 = true;
+ result.field24_ = value;
+ return this;
+ }
+ public Builder ClearField24() {
+ PrepareBuilder();
+ result.hasField24 = false;
+ result.field24_ = false;
+ return this;
+ }
+
+ public bool HasField25 {
+ get { return result.hasField25; }
+ }
+ public int Field25 {
+ get { return result.Field25; }
+ set { SetField25(value); }
+ }
+ public Builder SetField25(int value) {
+ PrepareBuilder();
+ result.hasField25 = true;
+ result.field25_ = value;
+ return this;
+ }
+ public Builder ClearField25() {
+ PrepareBuilder();
+ result.hasField25 = false;
+ result.field25_ = 0;
+ return this;
+ }
+
+ public bool HasField15 {
+ get { return result.hasField15; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.SpeedMessage1SubMessage Field15 {
+ get { return result.Field15; }
+ set { SetField15(value); }
+ }
+ public Builder SetField15(global::Google.ProtocolBuffers.TestProtos.SpeedMessage1SubMessage value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasField15 = true;
+ result.field15_ = value;
+ return this;
+ }
+ public Builder SetField15(global::Google.ProtocolBuffers.TestProtos.SpeedMessage1SubMessage.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.hasField15 = true;
+ result.field15_ = builderForValue.Build();
+ return this;
+ }
+ public Builder MergeField15(global::Google.ProtocolBuffers.TestProtos.SpeedMessage1SubMessage value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ if (result.hasField15 &&
+ result.field15_ != global::Google.ProtocolBuffers.TestProtos.SpeedMessage1SubMessage.DefaultInstance) {
+ result.field15_ = global::Google.ProtocolBuffers.TestProtos.SpeedMessage1SubMessage.CreateBuilder(result.field15_).MergeFrom(value).BuildPartial();
+ } else {
+ result.field15_ = value;
+ }
+ result.hasField15 = true;
+ return this;
+ }
+ public Builder ClearField15() {
+ PrepareBuilder();
+ result.hasField15 = false;
+ result.field15_ = null;
+ return this;
+ }
+
+ public bool HasField78 {
+ get { return result.hasField78; }
+ }
+ public bool Field78 {
+ get { return result.Field78; }
+ set { SetField78(value); }
+ }
+ public Builder SetField78(bool value) {
+ PrepareBuilder();
+ result.hasField78 = true;
+ result.field78_ = value;
+ return this;
+ }
+ public Builder ClearField78() {
+ PrepareBuilder();
+ result.hasField78 = false;
+ result.field78_ = false;
+ return this;
+ }
+
+ public bool HasField67 {
+ get { return result.hasField67; }
+ }
+ public int Field67 {
+ get { return result.Field67; }
+ set { SetField67(value); }
+ }
+ public Builder SetField67(int value) {
+ PrepareBuilder();
+ result.hasField67 = true;
+ result.field67_ = value;
+ return this;
+ }
+ public Builder ClearField67() {
+ PrepareBuilder();
+ result.hasField67 = false;
+ result.field67_ = 0;
+ return this;
+ }
+
+ public bool HasField68 {
+ get { return result.hasField68; }
+ }
+ public int Field68 {
+ get { return result.Field68; }
+ set { SetField68(value); }
+ }
+ public Builder SetField68(int value) {
+ PrepareBuilder();
+ result.hasField68 = true;
+ result.field68_ = value;
+ return this;
+ }
+ public Builder ClearField68() {
+ PrepareBuilder();
+ result.hasField68 = false;
+ result.field68_ = 0;
+ return this;
+ }
+
+ public bool HasField128 {
+ get { return result.hasField128; }
+ }
+ public int Field128 {
+ get { return result.Field128; }
+ set { SetField128(value); }
+ }
+ public Builder SetField128(int value) {
+ PrepareBuilder();
+ result.hasField128 = true;
+ result.field128_ = value;
+ return this;
+ }
+ public Builder ClearField128() {
+ PrepareBuilder();
+ result.hasField128 = false;
+ result.field128_ = 0;
+ return this;
+ }
+
+ public bool HasField129 {
+ get { return result.hasField129; }
+ }
+ public string Field129 {
+ get { return result.Field129; }
+ set { SetField129(value); }
+ }
+ public Builder SetField129(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasField129 = true;
+ result.field129_ = value;
+ return this;
+ }
+ public Builder ClearField129() {
+ PrepareBuilder();
+ result.hasField129 = false;
+ result.field129_ = "xxxxxxxxxxxxxxxxxxxxx";
+ return this;
+ }
+
+ public bool HasField131 {
+ get { return result.hasField131; }
+ }
+ public int Field131 {
+ get { return result.Field131; }
+ set { SetField131(value); }
+ }
+ public Builder SetField131(int value) {
+ PrepareBuilder();
+ result.hasField131 = true;
+ result.field131_ = value;
+ return this;
+ }
+ public Builder ClearField131() {
+ PrepareBuilder();
+ result.hasField131 = false;
+ result.field131_ = 0;
+ return this;
+ }
+ }
+ static SpeedMessage1() {
+ object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.GoogleSpeed.Descriptor, null);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class SpeedMessage1SubMessage : pb::GeneratedMessage<SpeedMessage1SubMessage, SpeedMessage1SubMessage.Builder> {
+ private SpeedMessage1SubMessage() { }
+ private static readonly SpeedMessage1SubMessage defaultInstance = new SpeedMessage1SubMessage().MakeReadOnly();
+ private static readonly string[] _speedMessage1SubMessageFieldNames = new string[] { "field1", "field12", "field13", "field14", "field15", "field16", "field19", "field2", "field20", "field203", "field204", "field205", "field206", "field207", "field21", "field22", "field23", "field28", "field3", "field300" };
+ private static readonly uint[] _speedMessage1SubMessageFieldTags = new uint[] { 8, 96, 104, 112, 122, 128, 152, 16, 160, 1629, 1632, 1642, 1648, 1656, 169, 176, 184, 224, 24, 2400 };
+ public static SpeedMessage1SubMessage DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override SpeedMessage1SubMessage DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override SpeedMessage1SubMessage ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::Google.ProtocolBuffers.TestProtos.GoogleSpeed.internal__static_benchmarks_SpeedMessage1SubMessage__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<SpeedMessage1SubMessage, SpeedMessage1SubMessage.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.GoogleSpeed.internal__static_benchmarks_SpeedMessage1SubMessage__FieldAccessorTable; }
+ }
+
+ public const int Field1FieldNumber = 1;
+ private bool hasField1;
+ private int field1_;
+ public bool HasField1 {
+ get { return hasField1; }
+ }
+ public int Field1 {
+ get { return field1_; }
+ }
+
+ public const int Field2FieldNumber = 2;
+ private bool hasField2;
+ private int field2_;
+ public bool HasField2 {
+ get { return hasField2; }
+ }
+ public int Field2 {
+ get { return field2_; }
+ }
+
+ public const int Field3FieldNumber = 3;
+ private bool hasField3;
+ private int field3_;
+ public bool HasField3 {
+ get { return hasField3; }
+ }
+ public int Field3 {
+ get { return field3_; }
+ }
+
+ public const int Field15FieldNumber = 15;
+ private bool hasField15;
+ private string field15_ = "";
+ public bool HasField15 {
+ get { return hasField15; }
+ }
+ public string Field15 {
+ get { return field15_; }
+ }
+
+ public const int Field12FieldNumber = 12;
+ private bool hasField12;
+ private bool field12_ = true;
+ public bool HasField12 {
+ get { return hasField12; }
+ }
+ public bool Field12 {
+ get { return field12_; }
+ }
+
+ public const int Field13FieldNumber = 13;
+ private bool hasField13;
+ private long field13_;
+ public bool HasField13 {
+ get { return hasField13; }
+ }
+ public long Field13 {
+ get { return field13_; }
+ }
+
+ public const int Field14FieldNumber = 14;
+ private bool hasField14;
+ private long field14_;
+ public bool HasField14 {
+ get { return hasField14; }
+ }
+ public long Field14 {
+ get { return field14_; }
+ }
+
+ public const int Field16FieldNumber = 16;
+ private bool hasField16;
+ private int field16_;
+ public bool HasField16 {
+ get { return hasField16; }
+ }
+ public int Field16 {
+ get { return field16_; }
+ }
+
+ public const int Field19FieldNumber = 19;
+ private bool hasField19;
+ private int field19_ = 2;
+ public bool HasField19 {
+ get { return hasField19; }
+ }
+ public int Field19 {
+ get { return field19_; }
+ }
+
+ public const int Field20FieldNumber = 20;
+ private bool hasField20;
+ private bool field20_ = true;
+ public bool HasField20 {
+ get { return hasField20; }
+ }
+ public bool Field20 {
+ get { return field20_; }
+ }
+
+ public const int Field28FieldNumber = 28;
+ private bool hasField28;
+ private bool field28_ = true;
+ public bool HasField28 {
+ get { return hasField28; }
+ }
+ public bool Field28 {
+ get { return field28_; }
+ }
+
+ public const int Field21FieldNumber = 21;
+ private bool hasField21;
+ private ulong field21_;
+ public bool HasField21 {
+ get { return hasField21; }
+ }
+ [global::System.CLSCompliant(false)]
+ public ulong Field21 {
+ get { return field21_; }
+ }
+
+ public const int Field22FieldNumber = 22;
+ private bool hasField22;
+ private int field22_;
+ public bool HasField22 {
+ get { return hasField22; }
+ }
+ public int Field22 {
+ get { return field22_; }
+ }
+
+ public const int Field23FieldNumber = 23;
+ private bool hasField23;
+ private bool field23_;
+ public bool HasField23 {
+ get { return hasField23; }
+ }
+ public bool Field23 {
+ get { return field23_; }
+ }
+
+ public const int Field206FieldNumber = 206;
+ private bool hasField206;
+ private bool field206_;
+ public bool HasField206 {
+ get { return hasField206; }
+ }
+ public bool Field206 {
+ get { return field206_; }
+ }
+
+ public const int Field203FieldNumber = 203;
+ private bool hasField203;
+ private uint field203_;
+ public bool HasField203 {
+ get { return hasField203; }
+ }
+ [global::System.CLSCompliant(false)]
+ public uint Field203 {
+ get { return field203_; }
+ }
+
+ public const int Field204FieldNumber = 204;
+ private bool hasField204;
+ private int field204_;
+ public bool HasField204 {
+ get { return hasField204; }
+ }
+ public int Field204 {
+ get { return field204_; }
+ }
+
+ public const int Field205FieldNumber = 205;
+ private bool hasField205;
+ private string field205_ = "";
+ public bool HasField205 {
+ get { return hasField205; }
+ }
+ public string Field205 {
+ get { return field205_; }
+ }
+
+ public const int Field207FieldNumber = 207;
+ private bool hasField207;
+ private ulong field207_;
+ public bool HasField207 {
+ get { return hasField207; }
+ }
+ [global::System.CLSCompliant(false)]
+ public ulong Field207 {
+ get { return field207_; }
+ }
+
+ public const int Field300FieldNumber = 300;
+ private bool hasField300;
+ private ulong field300_;
+ public bool HasField300 {
+ get { return hasField300; }
+ }
+ [global::System.CLSCompliant(false)]
+ public ulong Field300 {
+ get { return field300_; }
+ }
+
+ public override bool IsInitialized {
+ get {
+ return true;
+ }
+ }
+
+ public override void WriteTo(pb::ICodedOutputStream output) {
+ CalcSerializedSize();
+ string[] field_names = _speedMessage1SubMessageFieldNames;
+ if (hasField1) {
+ output.WriteInt32(1, field_names[0], Field1);
+ }
+ if (hasField2) {
+ output.WriteInt32(2, field_names[7], Field2);
+ }
+ if (hasField3) {
+ output.WriteInt32(3, field_names[18], Field3);
+ }
+ if (hasField12) {
+ output.WriteBool(12, field_names[1], Field12);
+ }
+ if (hasField13) {
+ output.WriteInt64(13, field_names[2], Field13);
+ }
+ if (hasField14) {
+ output.WriteInt64(14, field_names[3], Field14);
+ }
+ if (hasField15) {
+ output.WriteString(15, field_names[4], Field15);
+ }
+ if (hasField16) {
+ output.WriteInt32(16, field_names[5], Field16);
+ }
+ if (hasField19) {
+ output.WriteInt32(19, field_names[6], Field19);
+ }
+ if (hasField20) {
+ output.WriteBool(20, field_names[8], Field20);
+ }
+ if (hasField21) {
+ output.WriteFixed64(21, field_names[14], Field21);
+ }
+ if (hasField22) {
+ output.WriteInt32(22, field_names[15], Field22);
+ }
+ if (hasField23) {
+ output.WriteBool(23, field_names[16], Field23);
+ }
+ if (hasField28) {
+ output.WriteBool(28, field_names[17], Field28);
+ }
+ if (hasField203) {
+ output.WriteFixed32(203, field_names[9], Field203);
+ }
+ if (hasField204) {
+ output.WriteInt32(204, field_names[10], Field204);
+ }
+ if (hasField205) {
+ output.WriteString(205, field_names[11], Field205);
+ }
+ if (hasField206) {
+ output.WriteBool(206, field_names[12], Field206);
+ }
+ if (hasField207) {
+ output.WriteUInt64(207, field_names[13], Field207);
+ }
+ if (hasField300) {
+ output.WriteUInt64(300, field_names[19], Field300);
+ }
+ UnknownFields.WriteTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public override int SerializedSize {
+ get {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+ return CalcSerializedSize();
+ }
+ }
+
+ private int CalcSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (hasField1) {
+ size += pb::CodedOutputStream.ComputeInt32Size(1, Field1);
+ }
+ if (hasField2) {
+ size += pb::CodedOutputStream.ComputeInt32Size(2, Field2);
+ }
+ if (hasField3) {
+ size += pb::CodedOutputStream.ComputeInt32Size(3, Field3);
+ }
+ if (hasField15) {
+ size += pb::CodedOutputStream.ComputeStringSize(15, Field15);
+ }
+ if (hasField12) {
+ size += pb::CodedOutputStream.ComputeBoolSize(12, Field12);
+ }
+ if (hasField13) {
+ size += pb::CodedOutputStream.ComputeInt64Size(13, Field13);
+ }
+ if (hasField14) {
+ size += pb::CodedOutputStream.ComputeInt64Size(14, Field14);
+ }
+ if (hasField16) {
+ size += pb::CodedOutputStream.ComputeInt32Size(16, Field16);
+ }
+ if (hasField19) {
+ size += pb::CodedOutputStream.ComputeInt32Size(19, Field19);
+ }
+ if (hasField20) {
+ size += pb::CodedOutputStream.ComputeBoolSize(20, Field20);
+ }
+ if (hasField28) {
+ size += pb::CodedOutputStream.ComputeBoolSize(28, Field28);
+ }
+ if (hasField21) {
+ size += pb::CodedOutputStream.ComputeFixed64Size(21, Field21);
+ }
+ if (hasField22) {
+ size += pb::CodedOutputStream.ComputeInt32Size(22, Field22);
+ }
+ if (hasField23) {
+ size += pb::CodedOutputStream.ComputeBoolSize(23, Field23);
+ }
+ if (hasField206) {
+ size += pb::CodedOutputStream.ComputeBoolSize(206, Field206);
+ }
+ if (hasField203) {
+ size += pb::CodedOutputStream.ComputeFixed32Size(203, Field203);
+ }
+ if (hasField204) {
+ size += pb::CodedOutputStream.ComputeInt32Size(204, Field204);
+ }
+ if (hasField205) {
+ size += pb::CodedOutputStream.ComputeStringSize(205, Field205);
+ }
+ if (hasField207) {
+ size += pb::CodedOutputStream.ComputeUInt64Size(207, Field207);
+ }
+ if (hasField300) {
+ size += pb::CodedOutputStream.ComputeUInt64Size(300, Field300);
+ }
+ size += UnknownFields.SerializedSize;
+ memoizedSerializedSize = size;
+ return size;
+ }
+ public static SpeedMessage1SubMessage ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static SpeedMessage1SubMessage ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static SpeedMessage1SubMessage ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static SpeedMessage1SubMessage ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static SpeedMessage1SubMessage ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static SpeedMessage1SubMessage ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static SpeedMessage1SubMessage ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static SpeedMessage1SubMessage ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static SpeedMessage1SubMessage ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static SpeedMessage1SubMessage ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private SpeedMessage1SubMessage 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(SpeedMessage1SubMessage prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Builder : pb::GeneratedBuilder<SpeedMessage1SubMessage, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(SpeedMessage1SubMessage cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private SpeedMessage1SubMessage result;
+
+ private SpeedMessage1SubMessage PrepareBuilder() {
+ if (resultIsReadOnly) {
+ SpeedMessage1SubMessage original = result;
+ result = new SpeedMessage1SubMessage();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override SpeedMessage1SubMessage 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.SpeedMessage1SubMessage.Descriptor; }
+ }
+
+ public override SpeedMessage1SubMessage DefaultInstanceForType {
+ get { return global::Google.ProtocolBuffers.TestProtos.SpeedMessage1SubMessage.DefaultInstance; }
+ }
+
+ public override SpeedMessage1SubMessage BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+ public override Builder MergeFrom(pb::IMessage other) {
+ if (other is SpeedMessage1SubMessage) {
+ return MergeFrom((SpeedMessage1SubMessage) other);
+ } else {
+ base.MergeFrom(other);
+ return this;
+ }
+ }
+
+ public override Builder MergeFrom(SpeedMessage1SubMessage other) {
+ if (other == global::Google.ProtocolBuffers.TestProtos.SpeedMessage1SubMessage.DefaultInstance) return this;
+ PrepareBuilder();
+ if (other.HasField1) {
+ Field1 = other.Field1;
+ }
+ if (other.HasField2) {
+ Field2 = other.Field2;
+ }
+ if (other.HasField3) {
+ Field3 = other.Field3;
+ }
+ if (other.HasField15) {
+ Field15 = other.Field15;
+ }
+ if (other.HasField12) {
+ Field12 = other.Field12;
+ }
+ if (other.HasField13) {
+ Field13 = other.Field13;
+ }
+ if (other.HasField14) {
+ Field14 = other.Field14;
+ }
+ if (other.HasField16) {
+ Field16 = other.Field16;
+ }
+ if (other.HasField19) {
+ Field19 = other.Field19;
+ }
+ if (other.HasField20) {
+ Field20 = other.Field20;
+ }
+ if (other.HasField28) {
+ Field28 = other.Field28;
+ }
+ if (other.HasField21) {
+ Field21 = other.Field21;
+ }
+ if (other.HasField22) {
+ Field22 = other.Field22;
+ }
+ if (other.HasField23) {
+ Field23 = other.Field23;
+ }
+ if (other.HasField206) {
+ Field206 = other.Field206;
+ }
+ if (other.HasField203) {
+ Field203 = other.Field203;
+ }
+ if (other.HasField204) {
+ Field204 = other.Field204;
+ }
+ if (other.HasField205) {
+ Field205 = other.Field205;
+ }
+ if (other.HasField207) {
+ Field207 = other.Field207;
+ }
+ if (other.HasField300) {
+ Field300 = other.Field300;
+ }
+ 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(_speedMessage1SubMessageFieldNames, field_name, global::System.StringComparer.Ordinal);
+ if(field_ordinal >= 0)
+ tag = _speedMessage1SubMessageFieldTags[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.hasField1 = input.ReadInt32(ref result.field1_);
+ break;
+ }
+ case 16: {
+ result.hasField2 = input.ReadInt32(ref result.field2_);
+ break;
+ }
+ case 24: {
+ result.hasField3 = input.ReadInt32(ref result.field3_);
+ break;
+ }
+ case 96: {
+ result.hasField12 = input.ReadBool(ref result.field12_);
+ break;
+ }
+ case 104: {
+ result.hasField13 = input.ReadInt64(ref result.field13_);
+ break;
+ }
+ case 112: {
+ result.hasField14 = input.ReadInt64(ref result.field14_);
+ break;
+ }
+ case 122: {
+ result.hasField15 = input.ReadString(ref result.field15_);
+ break;
+ }
+ case 128: {
+ result.hasField16 = input.ReadInt32(ref result.field16_);
+ break;
+ }
+ case 152: {
+ result.hasField19 = input.ReadInt32(ref result.field19_);
+ break;
+ }
+ case 160: {
+ result.hasField20 = input.ReadBool(ref result.field20_);
+ break;
+ }
+ case 169: {
+ result.hasField21 = input.ReadFixed64(ref result.field21_);
+ break;
+ }
+ case 176: {
+ result.hasField22 = input.ReadInt32(ref result.field22_);
+ break;
+ }
+ case 184: {
+ result.hasField23 = input.ReadBool(ref result.field23_);
+ break;
+ }
+ case 224: {
+ result.hasField28 = input.ReadBool(ref result.field28_);
+ break;
+ }
+ case 1629: {
+ result.hasField203 = input.ReadFixed32(ref result.field203_);
+ break;
+ }
+ case 1632: {
+ result.hasField204 = input.ReadInt32(ref result.field204_);
+ break;
+ }
+ case 1642: {
+ result.hasField205 = input.ReadString(ref result.field205_);
+ break;
+ }
+ case 1648: {
+ result.hasField206 = input.ReadBool(ref result.field206_);
+ break;
+ }
+ case 1656: {
+ result.hasField207 = input.ReadUInt64(ref result.field207_);
+ break;
+ }
+ case 2400: {
+ result.hasField300 = input.ReadUInt64(ref result.field300_);
+ break;
+ }
+ }
+ }
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
+ }
+
+
+ public bool HasField1 {
+ get { return result.hasField1; }
+ }
+ public int Field1 {
+ get { return result.Field1; }
+ set { SetField1(value); }
+ }
+ public Builder SetField1(int value) {
+ PrepareBuilder();
+ result.hasField1 = true;
+ result.field1_ = value;
+ return this;
+ }
+ public Builder ClearField1() {
+ PrepareBuilder();
+ result.hasField1 = false;
+ result.field1_ = 0;
+ return this;
+ }
+
+ public bool HasField2 {
+ get { return result.hasField2; }
+ }
+ public int Field2 {
+ get { return result.Field2; }
+ set { SetField2(value); }
+ }
+ public Builder SetField2(int value) {
+ PrepareBuilder();
+ result.hasField2 = true;
+ result.field2_ = value;
+ return this;
+ }
+ public Builder ClearField2() {
+ PrepareBuilder();
+ result.hasField2 = false;
+ result.field2_ = 0;
+ return this;
+ }
+
+ public bool HasField3 {
+ get { return result.hasField3; }
+ }
+ public int Field3 {
+ get { return result.Field3; }
+ set { SetField3(value); }
+ }
+ public Builder SetField3(int value) {
+ PrepareBuilder();
+ result.hasField3 = true;
+ result.field3_ = value;
+ return this;
+ }
+ public Builder ClearField3() {
+ PrepareBuilder();
+ result.hasField3 = false;
+ result.field3_ = 0;
+ return this;
+ }
+
+ public bool HasField15 {
+ get { return result.hasField15; }
+ }
+ public string Field15 {
+ get { return result.Field15; }
+ set { SetField15(value); }
+ }
+ public Builder SetField15(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasField15 = true;
+ result.field15_ = value;
+ return this;
+ }
+ public Builder ClearField15() {
+ PrepareBuilder();
+ result.hasField15 = false;
+ result.field15_ = "";
+ return this;
+ }
+
+ public bool HasField12 {
+ get { return result.hasField12; }
+ }
+ public bool Field12 {
+ get { return result.Field12; }
+ set { SetField12(value); }
+ }
+ public Builder SetField12(bool value) {
+ PrepareBuilder();
+ result.hasField12 = true;
+ result.field12_ = value;
+ return this;
+ }
+ public Builder ClearField12() {
+ PrepareBuilder();
+ result.hasField12 = false;
+ result.field12_ = true;
+ return this;
+ }
+
+ public bool HasField13 {
+ get { return result.hasField13; }
+ }
+ public long Field13 {
+ get { return result.Field13; }
+ set { SetField13(value); }
+ }
+ public Builder SetField13(long value) {
+ PrepareBuilder();
+ result.hasField13 = true;
+ result.field13_ = value;
+ return this;
+ }
+ public Builder ClearField13() {
+ PrepareBuilder();
+ result.hasField13 = false;
+ result.field13_ = 0L;
+ return this;
+ }
+
+ public bool HasField14 {
+ get { return result.hasField14; }
+ }
+ public long Field14 {
+ get { return result.Field14; }
+ set { SetField14(value); }
+ }
+ public Builder SetField14(long value) {
+ PrepareBuilder();
+ result.hasField14 = true;
+ result.field14_ = value;
+ return this;
+ }
+ public Builder ClearField14() {
+ PrepareBuilder();
+ result.hasField14 = false;
+ result.field14_ = 0L;
+ return this;
+ }
+
+ public bool HasField16 {
+ get { return result.hasField16; }
+ }
+ public int Field16 {
+ get { return result.Field16; }
+ set { SetField16(value); }
+ }
+ public Builder SetField16(int value) {
+ PrepareBuilder();
+ result.hasField16 = true;
+ result.field16_ = value;
+ return this;
+ }
+ public Builder ClearField16() {
+ PrepareBuilder();
+ result.hasField16 = false;
+ result.field16_ = 0;
+ return this;
+ }
+
+ public bool HasField19 {
+ get { return result.hasField19; }
+ }
+ public int Field19 {
+ get { return result.Field19; }
+ set { SetField19(value); }
+ }
+ public Builder SetField19(int value) {
+ PrepareBuilder();
+ result.hasField19 = true;
+ result.field19_ = value;
+ return this;
+ }
+ public Builder ClearField19() {
+ PrepareBuilder();
+ result.hasField19 = false;
+ result.field19_ = 2;
+ return this;
+ }
+
+ public bool HasField20 {
+ get { return result.hasField20; }
+ }
+ public bool Field20 {
+ get { return result.Field20; }
+ set { SetField20(value); }
+ }
+ public Builder SetField20(bool value) {
+ PrepareBuilder();
+ result.hasField20 = true;
+ result.field20_ = value;
+ return this;
+ }
+ public Builder ClearField20() {
+ PrepareBuilder();
+ result.hasField20 = false;
+ result.field20_ = true;
+ return this;
+ }
+
+ public bool HasField28 {
+ get { return result.hasField28; }
+ }
+ public bool Field28 {
+ get { return result.Field28; }
+ set { SetField28(value); }
+ }
+ public Builder SetField28(bool value) {
+ PrepareBuilder();
+ result.hasField28 = true;
+ result.field28_ = value;
+ return this;
+ }
+ public Builder ClearField28() {
+ PrepareBuilder();
+ result.hasField28 = false;
+ result.field28_ = true;
+ return this;
+ }
+
+ public bool HasField21 {
+ get { return result.hasField21; }
+ }
+ [global::System.CLSCompliant(false)]
+ public ulong Field21 {
+ get { return result.Field21; }
+ set { SetField21(value); }
+ }
+ [global::System.CLSCompliant(false)]
+ public Builder SetField21(ulong value) {
+ PrepareBuilder();
+ result.hasField21 = true;
+ result.field21_ = value;
+ return this;
+ }
+ public Builder ClearField21() {
+ PrepareBuilder();
+ result.hasField21 = false;
+ result.field21_ = 0UL;
+ return this;
+ }
+
+ public bool HasField22 {
+ get { return result.hasField22; }
+ }
+ public int Field22 {
+ get { return result.Field22; }
+ set { SetField22(value); }
+ }
+ public Builder SetField22(int value) {
+ PrepareBuilder();
+ result.hasField22 = true;
+ result.field22_ = value;
+ return this;
+ }
+ public Builder ClearField22() {
+ PrepareBuilder();
+ result.hasField22 = false;
+ result.field22_ = 0;
+ return this;
+ }
+
+ public bool HasField23 {
+ get { return result.hasField23; }
+ }
+ public bool Field23 {
+ get { return result.Field23; }
+ set { SetField23(value); }
+ }
+ public Builder SetField23(bool value) {
+ PrepareBuilder();
+ result.hasField23 = true;
+ result.field23_ = value;
+ return this;
+ }
+ public Builder ClearField23() {
+ PrepareBuilder();
+ result.hasField23 = false;
+ result.field23_ = false;
+ return this;
+ }
+
+ public bool HasField206 {
+ get { return result.hasField206; }
+ }
+ public bool Field206 {
+ get { return result.Field206; }
+ set { SetField206(value); }
+ }
+ public Builder SetField206(bool value) {
+ PrepareBuilder();
+ result.hasField206 = true;
+ result.field206_ = value;
+ return this;
+ }
+ public Builder ClearField206() {
+ PrepareBuilder();
+ result.hasField206 = false;
+ result.field206_ = false;
+ return this;
+ }
+
+ public bool HasField203 {
+ get { return result.hasField203; }
+ }
+ [global::System.CLSCompliant(false)]
+ public uint Field203 {
+ get { return result.Field203; }
+ set { SetField203(value); }
+ }
+ [global::System.CLSCompliant(false)]
+ public Builder SetField203(uint value) {
+ PrepareBuilder();
+ result.hasField203 = true;
+ result.field203_ = value;
+ return this;
+ }
+ public Builder ClearField203() {
+ PrepareBuilder();
+ result.hasField203 = false;
+ result.field203_ = 0;
+ return this;
+ }
+
+ public bool HasField204 {
+ get { return result.hasField204; }
+ }
+ public int Field204 {
+ get { return result.Field204; }
+ set { SetField204(value); }
+ }
+ public Builder SetField204(int value) {
+ PrepareBuilder();
+ result.hasField204 = true;
+ result.field204_ = value;
+ return this;
+ }
+ public Builder ClearField204() {
+ PrepareBuilder();
+ result.hasField204 = false;
+ result.field204_ = 0;
+ return this;
+ }
+
+ public bool HasField205 {
+ get { return result.hasField205; }
+ }
+ public string Field205 {
+ get { return result.Field205; }
+ set { SetField205(value); }
+ }
+ public Builder SetField205(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasField205 = true;
+ result.field205_ = value;
+ return this;
+ }
+ public Builder ClearField205() {
+ PrepareBuilder();
+ result.hasField205 = false;
+ result.field205_ = "";
+ return this;
+ }
+
+ public bool HasField207 {
+ get { return result.hasField207; }
+ }
+ [global::System.CLSCompliant(false)]
+ public ulong Field207 {
+ get { return result.Field207; }
+ set { SetField207(value); }
+ }
+ [global::System.CLSCompliant(false)]
+ public Builder SetField207(ulong value) {
+ PrepareBuilder();
+ result.hasField207 = true;
+ result.field207_ = value;
+ return this;
+ }
+ public Builder ClearField207() {
+ PrepareBuilder();
+ result.hasField207 = false;
+ result.field207_ = 0UL;
+ return this;
+ }
+
+ public bool HasField300 {
+ get { return result.hasField300; }
+ }
+ [global::System.CLSCompliant(false)]
+ public ulong Field300 {
+ get { return result.Field300; }
+ set { SetField300(value); }
+ }
+ [global::System.CLSCompliant(false)]
+ public Builder SetField300(ulong value) {
+ PrepareBuilder();
+ result.hasField300 = true;
+ result.field300_ = value;
+ return this;
+ }
+ public Builder ClearField300() {
+ PrepareBuilder();
+ result.hasField300 = false;
+ result.field300_ = 0UL;
+ return this;
+ }
+ }
+ static SpeedMessage1SubMessage() {
+ object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.GoogleSpeed.Descriptor, null);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class SpeedMessage2 : pb::GeneratedMessage<SpeedMessage2, SpeedMessage2.Builder> {
+ private SpeedMessage2() { }
+ private static readonly SpeedMessage2 defaultInstance = new SpeedMessage2().MakeReadOnly();
+ private static readonly string[] _speedMessage2FieldNames = new string[] { "field1", "field109", "field127", "field128", "field129", "field130", "field131", "field2", "field205", "field206", "field21", "field210", "field211", "field212", "field213", "field216", "field217", "field218", "field220", "field221", "field222", "field25", "field3", "field30", "field4", "field6", "field63", "field71", "field75", "group1" };
+ private static readonly uint[] _speedMessage2FieldTags = new uint[] { 10, 872, 1018, 1026, 1032, 1040, 1048, 18, 1640, 1648, 168, 1680, 1688, 1696, 1704, 1728, 1736, 1744, 1760, 1768, 1781, 205, 24, 240, 32, 50, 504, 568, 600, 83 };
+ public static SpeedMessage2 DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override SpeedMessage2 DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override SpeedMessage2 ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::Google.ProtocolBuffers.TestProtos.GoogleSpeed.internal__static_benchmarks_SpeedMessage2__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<SpeedMessage2, SpeedMessage2.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.GoogleSpeed.internal__static_benchmarks_SpeedMessage2__FieldAccessorTable; }
+ }
+
+ #region Nested types
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public static partial class Types {
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Group1 : pb::GeneratedMessage<Group1, Group1.Builder> {
+ private Group1() { }
+ private static readonly Group1 defaultInstance = new Group1().MakeReadOnly();
+ private static readonly string[] _group1FieldNames = new string[] { "field11", "field12", "field13", "field14", "field15", "field16", "field20", "field22", "field24", "field26", "field27", "field28", "field29", "field31", "field5", "field73" };
+ private static readonly uint[] _group1FieldTags = new uint[] { 93, 98, 106, 114, 120, 130, 160, 178, 194, 213, 218, 224, 234, 250, 40, 584 };
+ public static Group1 DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override Group1 DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override Group1 ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::Google.ProtocolBuffers.TestProtos.GoogleSpeed.internal__static_benchmarks_SpeedMessage2_Group1__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<Group1, Group1.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.GoogleSpeed.internal__static_benchmarks_SpeedMessage2_Group1__FieldAccessorTable; }
+ }
+
+ public const int Field11FieldNumber = 11;
+ private bool hasField11;
+ private float field11_;
+ public bool HasField11 {
+ get { return hasField11; }
+ }
+ public float Field11 {
+ get { return field11_; }
+ }
+
+ public const int Field26FieldNumber = 26;
+ private bool hasField26;
+ private float field26_;
+ public bool HasField26 {
+ get { return hasField26; }
+ }
+ public float Field26 {
+ get { return field26_; }
+ }
+
+ public const int Field12FieldNumber = 12;
+ private bool hasField12;
+ private string field12_ = "";
+ public bool HasField12 {
+ get { return hasField12; }
+ }
+ public string Field12 {
+ get { return field12_; }
+ }
+
+ public const int Field13FieldNumber = 13;
+ private bool hasField13;
+ private string field13_ = "";
+ public bool HasField13 {
+ get { return hasField13; }
+ }
+ public string Field13 {
+ get { return field13_; }
+ }
+
+ public const int Field14FieldNumber = 14;
+ private pbc::PopsicleList<string> field14_ = new pbc::PopsicleList<string>();
+ public scg::IList<string> Field14List {
+ get { return pbc::Lists.AsReadOnly(field14_); }
+ }
+ public int Field14Count {
+ get { return field14_.Count; }
+ }
+ public string GetField14(int index) {
+ return field14_[index];
+ }
+
+ public const int Field15FieldNumber = 15;
+ private bool hasField15;
+ private ulong field15_;
+ public bool HasField15 {
+ get { return hasField15; }
+ }
+ [global::System.CLSCompliant(false)]
+ public ulong Field15 {
+ get { return field15_; }
+ }
+
+ public const int Field5FieldNumber = 5;
+ private bool hasField5;
+ private int field5_;
+ public bool HasField5 {
+ get { return hasField5; }
+ }
+ public int Field5 {
+ get { return field5_; }
+ }
+
+ public const int Field27FieldNumber = 27;
+ private bool hasField27;
+ private string field27_ = "";
+ public bool HasField27 {
+ get { return hasField27; }
+ }
+ public string Field27 {
+ get { return field27_; }
+ }
+
+ public const int Field28FieldNumber = 28;
+ private bool hasField28;
+ private int field28_;
+ public bool HasField28 {
+ get { return hasField28; }
+ }
+ public int Field28 {
+ get { return field28_; }
+ }
+
+ public const int Field29FieldNumber = 29;
+ private bool hasField29;
+ private string field29_ = "";
+ public bool HasField29 {
+ get { return hasField29; }
+ }
+ public string Field29 {
+ get { return field29_; }
+ }
+
+ public const int Field16FieldNumber = 16;
+ private bool hasField16;
+ private string field16_ = "";
+ public bool HasField16 {
+ get { return hasField16; }
+ }
+ public string Field16 {
+ get { return field16_; }
+ }
+
+ public const int Field22FieldNumber = 22;
+ private pbc::PopsicleList<string> field22_ = new pbc::PopsicleList<string>();
+ public scg::IList<string> Field22List {
+ get { return pbc::Lists.AsReadOnly(field22_); }
+ }
+ public int Field22Count {
+ get { return field22_.Count; }
+ }
+ public string GetField22(int index) {
+ return field22_[index];
+ }
+
+ public const int Field73FieldNumber = 73;
+ private pbc::PopsicleList<int> field73_ = new pbc::PopsicleList<int>();
+ public scg::IList<int> Field73List {
+ get { return pbc::Lists.AsReadOnly(field73_); }
+ }
+ public int Field73Count {
+ get { return field73_.Count; }
+ }
+ public int GetField73(int index) {
+ return field73_[index];
+ }
+
+ public const int Field20FieldNumber = 20;
+ private bool hasField20;
+ private int field20_;
+ public bool HasField20 {
+ get { return hasField20; }
+ }
+ public int Field20 {
+ get { return field20_; }
+ }
+
+ public const int Field24FieldNumber = 24;
+ private bool hasField24;
+ private string field24_ = "";
+ public bool HasField24 {
+ get { return hasField24; }
+ }
+ public string Field24 {
+ get { return field24_; }
+ }
+
+ public const int Field31FieldNumber = 31;
+ private bool hasField31;
+ private global::Google.ProtocolBuffers.TestProtos.SpeedMessage2GroupedMessage field31_;
+ public bool HasField31 {
+ get { return hasField31; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.SpeedMessage2GroupedMessage Field31 {
+ get { return field31_ ?? global::Google.ProtocolBuffers.TestProtos.SpeedMessage2GroupedMessage.DefaultInstance; }
+ }
+
+ public override bool IsInitialized {
+ get {
+ if (!hasField11) return false;
+ if (!hasField15) return false;
+ return true;
+ }
+ }
+
+ public override void WriteTo(pb::ICodedOutputStream output) {
+ CalcSerializedSize();
+ string[] field_names = _group1FieldNames;
+ if (hasField5) {
+ output.WriteInt32(5, field_names[14], Field5);
+ }
+ if (hasField11) {
+ output.WriteFloat(11, field_names[0], Field11);
+ }
+ if (hasField12) {
+ output.WriteString(12, field_names[1], Field12);
+ }
+ if (hasField13) {
+ output.WriteString(13, field_names[2], Field13);
+ }
+ if (field14_.Count > 0) {
+ output.WriteStringArray(14, field_names[3], field14_);
+ }
+ if (hasField15) {
+ output.WriteUInt64(15, field_names[4], Field15);
+ }
+ if (hasField16) {
+ output.WriteString(16, field_names[5], Field16);
+ }
+ if (hasField20) {
+ output.WriteInt32(20, field_names[6], Field20);
+ }
+ if (field22_.Count > 0) {
+ output.WriteStringArray(22, field_names[7], field22_);
+ }
+ if (hasField24) {
+ output.WriteString(24, field_names[8], Field24);
+ }
+ if (hasField26) {
+ output.WriteFloat(26, field_names[9], Field26);
+ }
+ if (hasField27) {
+ output.WriteString(27, field_names[10], Field27);
+ }
+ if (hasField28) {
+ output.WriteInt32(28, field_names[11], Field28);
+ }
+ if (hasField29) {
+ output.WriteString(29, field_names[12], Field29);
+ }
+ if (hasField31) {
+ output.WriteMessage(31, field_names[13], Field31);
+ }
+ if (field73_.Count > 0) {
+ output.WriteInt32Array(73, field_names[15], field73_);
+ }
+ UnknownFields.WriteTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public override int SerializedSize {
+ get {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+ return CalcSerializedSize();
+ }
+ }
+
+ private int CalcSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (hasField11) {
+ size += pb::CodedOutputStream.ComputeFloatSize(11, Field11);
+ }
+ if (hasField26) {
+ size += pb::CodedOutputStream.ComputeFloatSize(26, Field26);
+ }
+ if (hasField12) {
+ size += pb::CodedOutputStream.ComputeStringSize(12, Field12);
+ }
+ if (hasField13) {
+ size += pb::CodedOutputStream.ComputeStringSize(13, Field13);
+ }
+ {
+ int dataSize = 0;
+ foreach (string element in Field14List) {
+ dataSize += pb::CodedOutputStream.ComputeStringSizeNoTag(element);
+ }
+ size += dataSize;
+ size += 1 * field14_.Count;
+ }
+ if (hasField15) {
+ size += pb::CodedOutputStream.ComputeUInt64Size(15, Field15);
+ }
+ if (hasField5) {
+ size += pb::CodedOutputStream.ComputeInt32Size(5, Field5);
+ }
+ if (hasField27) {
+ size += pb::CodedOutputStream.ComputeStringSize(27, Field27);
+ }
+ if (hasField28) {
+ size += pb::CodedOutputStream.ComputeInt32Size(28, Field28);
+ }
+ if (hasField29) {
+ size += pb::CodedOutputStream.ComputeStringSize(29, Field29);
+ }
+ if (hasField16) {
+ size += pb::CodedOutputStream.ComputeStringSize(16, Field16);
+ }
+ {
+ int dataSize = 0;
+ foreach (string element in Field22List) {
+ dataSize += pb::CodedOutputStream.ComputeStringSizeNoTag(element);
+ }
+ size += dataSize;
+ size += 2 * field22_.Count;
+ }
+ {
+ int dataSize = 0;
+ foreach (int element in Field73List) {
+ dataSize += pb::CodedOutputStream.ComputeInt32SizeNoTag(element);
+ }
+ size += dataSize;
+ size += 2 * field73_.Count;
+ }
+ if (hasField20) {
+ size += pb::CodedOutputStream.ComputeInt32Size(20, Field20);
+ }
+ if (hasField24) {
+ size += pb::CodedOutputStream.ComputeStringSize(24, Field24);
+ }
+ if (hasField31) {
+ size += pb::CodedOutputStream.ComputeMessageSize(31, Field31);
+ }
+ size += UnknownFields.SerializedSize;
+ memoizedSerializedSize = size;
+ return size;
+ }
+ public static Group1 ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static Group1 ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static Group1 ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static Group1 ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static Group1 ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static Group1 ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static Group1 ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static Group1 ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static Group1 ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static Group1 ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private Group1 MakeReadOnly() {
+ field14_.MakeReadOnly();
+ field22_.MakeReadOnly();
+ field73_.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(Group1 prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Builder : pb::GeneratedBuilder<Group1, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(Group1 cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private Group1 result;
+
+ private Group1 PrepareBuilder() {
+ if (resultIsReadOnly) {
+ Group1 original = result;
+ result = new Group1();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override Group1 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.SpeedMessage2.Types.Group1.Descriptor; }
+ }
+
+ public override Group1 DefaultInstanceForType {
+ get { return global::Google.ProtocolBuffers.TestProtos.SpeedMessage2.Types.Group1.DefaultInstance; }
+ }
+
+ public override Group1 BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+ public override Builder MergeFrom(pb::IMessage other) {
+ if (other is Group1) {
+ return MergeFrom((Group1) other);
+ } else {
+ base.MergeFrom(other);
+ return this;
+ }
+ }
+
+ public override Builder MergeFrom(Group1 other) {
+ if (other == global::Google.ProtocolBuffers.TestProtos.SpeedMessage2.Types.Group1.DefaultInstance) return this;
+ PrepareBuilder();
+ if (other.HasField11) {
+ Field11 = other.Field11;
+ }
+ if (other.HasField26) {
+ Field26 = other.Field26;
+ }
+ if (other.HasField12) {
+ Field12 = other.Field12;
+ }
+ if (other.HasField13) {
+ Field13 = other.Field13;
+ }
+ if (other.field14_.Count != 0) {
+ result.field14_.Add(other.field14_);
+ }
+ if (other.HasField15) {
+ Field15 = other.Field15;
+ }
+ if (other.HasField5) {
+ Field5 = other.Field5;
+ }
+ if (other.HasField27) {
+ Field27 = other.Field27;
+ }
+ if (other.HasField28) {
+ Field28 = other.Field28;
+ }
+ if (other.HasField29) {
+ Field29 = other.Field29;
+ }
+ if (other.HasField16) {
+ Field16 = other.Field16;
+ }
+ if (other.field22_.Count != 0) {
+ result.field22_.Add(other.field22_);
+ }
+ if (other.field73_.Count != 0) {
+ result.field73_.Add(other.field73_);
+ }
+ if (other.HasField20) {
+ Field20 = other.Field20;
+ }
+ if (other.HasField24) {
+ Field24 = other.Field24;
+ }
+ if (other.HasField31) {
+ MergeField31(other.Field31);
+ }
+ 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(_group1FieldNames, field_name, global::System.StringComparer.Ordinal);
+ if(field_ordinal >= 0)
+ tag = _group1FieldTags[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 40: {
+ result.hasField5 = input.ReadInt32(ref result.field5_);
+ break;
+ }
+ case 93: {
+ result.hasField11 = input.ReadFloat(ref result.field11_);
+ break;
+ }
+ case 98: {
+ result.hasField12 = input.ReadString(ref result.field12_);
+ break;
+ }
+ case 106: {
+ result.hasField13 = input.ReadString(ref result.field13_);
+ break;
+ }
+ case 114: {
+ input.ReadStringArray(tag, field_name, result.field14_);
+ break;
+ }
+ case 120: {
+ result.hasField15 = input.ReadUInt64(ref result.field15_);
+ break;
+ }
+ case 130: {
+ result.hasField16 = input.ReadString(ref result.field16_);
+ break;
+ }
+ case 160: {
+ result.hasField20 = input.ReadInt32(ref result.field20_);
+ break;
+ }
+ case 178: {
+ input.ReadStringArray(tag, field_name, result.field22_);
+ break;
+ }
+ case 194: {
+ result.hasField24 = input.ReadString(ref result.field24_);
+ break;
+ }
+ case 213: {
+ result.hasField26 = input.ReadFloat(ref result.field26_);
+ break;
+ }
+ case 218: {
+ result.hasField27 = input.ReadString(ref result.field27_);
+ break;
+ }
+ case 224: {
+ result.hasField28 = input.ReadInt32(ref result.field28_);
+ break;
+ }
+ case 234: {
+ result.hasField29 = input.ReadString(ref result.field29_);
+ break;
+ }
+ case 250: {
+ global::Google.ProtocolBuffers.TestProtos.SpeedMessage2GroupedMessage.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.SpeedMessage2GroupedMessage.CreateBuilder();
+ if (result.hasField31) {
+ subBuilder.MergeFrom(Field31);
+ }
+ input.ReadMessage(subBuilder, extensionRegistry);
+ Field31 = subBuilder.BuildPartial();
+ break;
+ }
+ case 586:
+ case 584: {
+ input.ReadInt32Array(tag, field_name, result.field73_);
+ break;
+ }
+ }
+ }
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
+ }
+
+
+ public bool HasField11 {
+ get { return result.hasField11; }
+ }
+ public float Field11 {
+ get { return result.Field11; }
+ set { SetField11(value); }
+ }
+ public Builder SetField11(float value) {
+ PrepareBuilder();
+ result.hasField11 = true;
+ result.field11_ = value;
+ return this;
+ }
+ public Builder ClearField11() {
+ PrepareBuilder();
+ result.hasField11 = false;
+ result.field11_ = 0F;
+ return this;
+ }
+
+ public bool HasField26 {
+ get { return result.hasField26; }
+ }
+ public float Field26 {
+ get { return result.Field26; }
+ set { SetField26(value); }
+ }
+ public Builder SetField26(float value) {
+ PrepareBuilder();
+ result.hasField26 = true;
+ result.field26_ = value;
+ return this;
+ }
+ public Builder ClearField26() {
+ PrepareBuilder();
+ result.hasField26 = false;
+ result.field26_ = 0F;
+ return this;
+ }
+
+ public bool HasField12 {
+ get { return result.hasField12; }
+ }
+ public string Field12 {
+ get { return result.Field12; }
+ set { SetField12(value); }
+ }
+ public Builder SetField12(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasField12 = true;
+ result.field12_ = value;
+ return this;
+ }
+ public Builder ClearField12() {
+ PrepareBuilder();
+ result.hasField12 = false;
+ result.field12_ = "";
+ return this;
+ }
+
+ public bool HasField13 {
+ get { return result.hasField13; }
+ }
+ public string Field13 {
+ get { return result.Field13; }
+ set { SetField13(value); }
+ }
+ public Builder SetField13(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasField13 = true;
+ result.field13_ = value;
+ return this;
+ }
+ public Builder ClearField13() {
+ PrepareBuilder();
+ result.hasField13 = false;
+ result.field13_ = "";
+ return this;
+ }
+
+ public pbc::IPopsicleList<string> Field14List {
+ get { return PrepareBuilder().field14_; }
+ }
+ public int Field14Count {
+ get { return result.Field14Count; }
+ }
+ public string GetField14(int index) {
+ return result.GetField14(index);
+ }
+ public Builder SetField14(int index, string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.field14_[index] = value;
+ return this;
+ }
+ public Builder AddField14(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.field14_.Add(value);
+ return this;
+ }
+ public Builder AddRangeField14(scg::IEnumerable<string> values) {
+ PrepareBuilder();
+ result.field14_.Add(values);
+ return this;
+ }
+ public Builder ClearField14() {
+ PrepareBuilder();
+ result.field14_.Clear();
+ return this;
+ }
+
+ public bool HasField15 {
+ get { return result.hasField15; }
+ }
+ [global::System.CLSCompliant(false)]
+ public ulong Field15 {
+ get { return result.Field15; }
+ set { SetField15(value); }
+ }
+ [global::System.CLSCompliant(false)]
+ public Builder SetField15(ulong value) {
+ PrepareBuilder();
+ result.hasField15 = true;
+ result.field15_ = value;
+ return this;
+ }
+ public Builder ClearField15() {
+ PrepareBuilder();
+ result.hasField15 = false;
+ result.field15_ = 0UL;
+ return this;
+ }
+
+ public bool HasField5 {
+ get { return result.hasField5; }
+ }
+ public int Field5 {
+ get { return result.Field5; }
+ set { SetField5(value); }
+ }
+ public Builder SetField5(int value) {
+ PrepareBuilder();
+ result.hasField5 = true;
+ result.field5_ = value;
+ return this;
+ }
+ public Builder ClearField5() {
+ PrepareBuilder();
+ result.hasField5 = false;
+ result.field5_ = 0;
+ return this;
+ }
+
+ public bool HasField27 {
+ get { return result.hasField27; }
+ }
+ public string Field27 {
+ get { return result.Field27; }
+ set { SetField27(value); }
+ }
+ public Builder SetField27(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasField27 = true;
+ result.field27_ = value;
+ return this;
+ }
+ public Builder ClearField27() {
+ PrepareBuilder();
+ result.hasField27 = false;
+ result.field27_ = "";
+ return this;
+ }
+
+ public bool HasField28 {
+ get { return result.hasField28; }
+ }
+ public int Field28 {
+ get { return result.Field28; }
+ set { SetField28(value); }
+ }
+ public Builder SetField28(int value) {
+ PrepareBuilder();
+ result.hasField28 = true;
+ result.field28_ = value;
+ return this;
+ }
+ public Builder ClearField28() {
+ PrepareBuilder();
+ result.hasField28 = false;
+ result.field28_ = 0;
+ return this;
+ }
+
+ public bool HasField29 {
+ get { return result.hasField29; }
+ }
+ public string Field29 {
+ get { return result.Field29; }
+ set { SetField29(value); }
+ }
+ public Builder SetField29(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasField29 = true;
+ result.field29_ = value;
+ return this;
+ }
+ public Builder ClearField29() {
+ PrepareBuilder();
+ result.hasField29 = false;
+ result.field29_ = "";
+ return this;
+ }
+
+ public bool HasField16 {
+ get { return result.hasField16; }
+ }
+ public string Field16 {
+ get { return result.Field16; }
+ set { SetField16(value); }
+ }
+ public Builder SetField16(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasField16 = true;
+ result.field16_ = value;
+ return this;
+ }
+ public Builder ClearField16() {
+ PrepareBuilder();
+ result.hasField16 = false;
+ result.field16_ = "";
+ return this;
+ }
+
+ public pbc::IPopsicleList<string> Field22List {
+ get { return PrepareBuilder().field22_; }
+ }
+ public int Field22Count {
+ get { return result.Field22Count; }
+ }
+ public string GetField22(int index) {
+ return result.GetField22(index);
+ }
+ public Builder SetField22(int index, string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.field22_[index] = value;
+ return this;
+ }
+ public Builder AddField22(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.field22_.Add(value);
+ return this;
+ }
+ public Builder AddRangeField22(scg::IEnumerable<string> values) {
+ PrepareBuilder();
+ result.field22_.Add(values);
+ return this;
+ }
+ public Builder ClearField22() {
+ PrepareBuilder();
+ result.field22_.Clear();
+ return this;
+ }
+
+ public pbc::IPopsicleList<int> Field73List {
+ get { return PrepareBuilder().field73_; }
+ }
+ public int Field73Count {
+ get { return result.Field73Count; }
+ }
+ public int GetField73(int index) {
+ return result.GetField73(index);
+ }
+ public Builder SetField73(int index, int value) {
+ PrepareBuilder();
+ result.field73_[index] = value;
+ return this;
+ }
+ public Builder AddField73(int value) {
+ PrepareBuilder();
+ result.field73_.Add(value);
+ return this;
+ }
+ public Builder AddRangeField73(scg::IEnumerable<int> values) {
+ PrepareBuilder();
+ result.field73_.Add(values);
+ return this;
+ }
+ public Builder ClearField73() {
+ PrepareBuilder();
+ result.field73_.Clear();
+ return this;
+ }
+
+ public bool HasField20 {
+ get { return result.hasField20; }
+ }
+ public int Field20 {
+ get { return result.Field20; }
+ set { SetField20(value); }
+ }
+ public Builder SetField20(int value) {
+ PrepareBuilder();
+ result.hasField20 = true;
+ result.field20_ = value;
+ return this;
+ }
+ public Builder ClearField20() {
+ PrepareBuilder();
+ result.hasField20 = false;
+ result.field20_ = 0;
+ return this;
+ }
+
+ public bool HasField24 {
+ get { return result.hasField24; }
+ }
+ public string Field24 {
+ get { return result.Field24; }
+ set { SetField24(value); }
+ }
+ public Builder SetField24(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasField24 = true;
+ result.field24_ = value;
+ return this;
+ }
+ public Builder ClearField24() {
+ PrepareBuilder();
+ result.hasField24 = false;
+ result.field24_ = "";
+ return this;
+ }
+
+ public bool HasField31 {
+ get { return result.hasField31; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.SpeedMessage2GroupedMessage Field31 {
+ get { return result.Field31; }
+ set { SetField31(value); }
+ }
+ public Builder SetField31(global::Google.ProtocolBuffers.TestProtos.SpeedMessage2GroupedMessage value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasField31 = true;
+ result.field31_ = value;
+ return this;
+ }
+ public Builder SetField31(global::Google.ProtocolBuffers.TestProtos.SpeedMessage2GroupedMessage.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.hasField31 = true;
+ result.field31_ = builderForValue.Build();
+ return this;
+ }
+ public Builder MergeField31(global::Google.ProtocolBuffers.TestProtos.SpeedMessage2GroupedMessage value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ if (result.hasField31 &&
+ result.field31_ != global::Google.ProtocolBuffers.TestProtos.SpeedMessage2GroupedMessage.DefaultInstance) {
+ result.field31_ = global::Google.ProtocolBuffers.TestProtos.SpeedMessage2GroupedMessage.CreateBuilder(result.field31_).MergeFrom(value).BuildPartial();
+ } else {
+ result.field31_ = value;
+ }
+ result.hasField31 = true;
+ return this;
+ }
+ public Builder ClearField31() {
+ PrepareBuilder();
+ result.hasField31 = false;
+ result.field31_ = null;
+ return this;
+ }
+ }
+ static Group1() {
+ object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.GoogleSpeed.Descriptor, null);
+ }
+ }
+
+ }
+ #endregion
+
+ public const int Field1FieldNumber = 1;
+ private bool hasField1;
+ private string field1_ = "";
+ public bool HasField1 {
+ get { return hasField1; }
+ }
+ public string Field1 {
+ get { return field1_; }
+ }
+
+ public const int Field3FieldNumber = 3;
+ private bool hasField3;
+ private long field3_;
+ public bool HasField3 {
+ get { return hasField3; }
+ }
+ public long Field3 {
+ get { return field3_; }
+ }
+
+ public const int Field4FieldNumber = 4;
+ private bool hasField4;
+ private long field4_;
+ public bool HasField4 {
+ get { return hasField4; }
+ }
+ public long Field4 {
+ get { return field4_; }
+ }
+
+ public const int Field30FieldNumber = 30;
+ private bool hasField30;
+ private long field30_;
+ public bool HasField30 {
+ get { return hasField30; }
+ }
+ public long Field30 {
+ get { return field30_; }
+ }
+
+ public const int Field75FieldNumber = 75;
+ private bool hasField75;
+ private bool field75_;
+ public bool HasField75 {
+ get { return hasField75; }
+ }
+ public bool Field75 {
+ get { return field75_; }
+ }
+
+ public const int Field6FieldNumber = 6;
+ private bool hasField6;
+ private string field6_ = "";
+ public bool HasField6 {
+ get { return hasField6; }
+ }
+ public string Field6 {
+ get { return field6_; }
+ }
+
+ public const int Field2FieldNumber = 2;
+ private bool hasField2;
+ private pb::ByteString field2_ = pb::ByteString.Empty;
+ public bool HasField2 {
+ get { return hasField2; }
+ }
+ public pb::ByteString Field2 {
+ get { return field2_; }
+ }
+
+ public const int Field21FieldNumber = 21;
+ private bool hasField21;
+ private int field21_;
+ public bool HasField21 {
+ get { return hasField21; }
+ }
+ public int Field21 {
+ get { return field21_; }
+ }
+
+ public const int Field71FieldNumber = 71;
+ private bool hasField71;
+ private int field71_;
+ public bool HasField71 {
+ get { return hasField71; }
+ }
+ public int Field71 {
+ get { return field71_; }
+ }
+
+ public const int Field25FieldNumber = 25;
+ private bool hasField25;
+ private float field25_;
+ public bool HasField25 {
+ get { return hasField25; }
+ }
+ public float Field25 {
+ get { return field25_; }
+ }
+
+ public const int Field109FieldNumber = 109;
+ private bool hasField109;
+ private int field109_;
+ public bool HasField109 {
+ get { return hasField109; }
+ }
+ public int Field109 {
+ get { return field109_; }
+ }
+
+ public const int Field210FieldNumber = 210;
+ private bool hasField210;
+ private int field210_;
+ public bool HasField210 {
+ get { return hasField210; }
+ }
+ public int Field210 {
+ get { return field210_; }
+ }
+
+ public const int Field211FieldNumber = 211;
+ private bool hasField211;
+ private int field211_;
+ public bool HasField211 {
+ get { return hasField211; }
+ }
+ public int Field211 {
+ get { return field211_; }
+ }
+
+ public const int Field212FieldNumber = 212;
+ private bool hasField212;
+ private int field212_;
+ public bool HasField212 {
+ get { return hasField212; }
+ }
+ public int Field212 {
+ get { return field212_; }
+ }
+
+ public const int Field213FieldNumber = 213;
+ private bool hasField213;
+ private int field213_;
+ public bool HasField213 {
+ get { return hasField213; }
+ }
+ public int Field213 {
+ get { return field213_; }
+ }
+
+ public const int Field216FieldNumber = 216;
+ private bool hasField216;
+ private int field216_;
+ public bool HasField216 {
+ get { return hasField216; }
+ }
+ public int Field216 {
+ get { return field216_; }
+ }
+
+ public const int Field217FieldNumber = 217;
+ private bool hasField217;
+ private int field217_;
+ public bool HasField217 {
+ get { return hasField217; }
+ }
+ public int Field217 {
+ get { return field217_; }
+ }
+
+ public const int Field218FieldNumber = 218;
+ private bool hasField218;
+ private int field218_;
+ public bool HasField218 {
+ get { return hasField218; }
+ }
+ public int Field218 {
+ get { return field218_; }
+ }
+
+ public const int Field220FieldNumber = 220;
+ private bool hasField220;
+ private int field220_;
+ public bool HasField220 {
+ get { return hasField220; }
+ }
+ public int Field220 {
+ get { return field220_; }
+ }
+
+ public const int Field221FieldNumber = 221;
+ private bool hasField221;
+ private int field221_;
+ public bool HasField221 {
+ get { return hasField221; }
+ }
+ public int Field221 {
+ get { return field221_; }
+ }
+
+ public const int Field222FieldNumber = 222;
+ private bool hasField222;
+ private float field222_;
+ public bool HasField222 {
+ get { return hasField222; }
+ }
+ public float Field222 {
+ get { return field222_; }
+ }
+
+ public const int Field63FieldNumber = 63;
+ private bool hasField63;
+ private int field63_;
+ public bool HasField63 {
+ get { return hasField63; }
+ }
+ public int Field63 {
+ get { return field63_; }
+ }
+
+ public const int Group1FieldNumber = 10;
+ private pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.SpeedMessage2.Types.Group1> group1_ = new pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.SpeedMessage2.Types.Group1>();
+ public scg::IList<global::Google.ProtocolBuffers.TestProtos.SpeedMessage2.Types.Group1> Group1List {
+ get { return group1_; }
+ }
+ public int Group1Count {
+ get { return group1_.Count; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.SpeedMessage2.Types.Group1 GetGroup1(int index) {
+ return group1_[index];
+ }
+
+ public const int Field128FieldNumber = 128;
+ private pbc::PopsicleList<string> field128_ = new pbc::PopsicleList<string>();
+ public scg::IList<string> Field128List {
+ get { return pbc::Lists.AsReadOnly(field128_); }
+ }
+ public int Field128Count {
+ get { return field128_.Count; }
+ }
+ public string GetField128(int index) {
+ return field128_[index];
+ }
+
+ public const int Field131FieldNumber = 131;
+ private bool hasField131;
+ private long field131_;
+ public bool HasField131 {
+ get { return hasField131; }
+ }
+ public long Field131 {
+ get { return field131_; }
+ }
+
+ public const int Field127FieldNumber = 127;
+ private pbc::PopsicleList<string> field127_ = new pbc::PopsicleList<string>();
+ public scg::IList<string> Field127List {
+ get { return pbc::Lists.AsReadOnly(field127_); }
+ }
+ public int Field127Count {
+ get { return field127_.Count; }
+ }
+ public string GetField127(int index) {
+ return field127_[index];
+ }
+
+ public const int Field129FieldNumber = 129;
+ private bool hasField129;
+ private int field129_;
+ public bool HasField129 {
+ get { return hasField129; }
+ }
+ public int Field129 {
+ get { return field129_; }
+ }
+
+ public const int Field130FieldNumber = 130;
+ private pbc::PopsicleList<long> field130_ = new pbc::PopsicleList<long>();
+ public scg::IList<long> Field130List {
+ get { return pbc::Lists.AsReadOnly(field130_); }
+ }
+ public int Field130Count {
+ get { return field130_.Count; }
+ }
+ public long GetField130(int index) {
+ return field130_[index];
+ }
+
+ public const int Field205FieldNumber = 205;
+ private bool hasField205;
+ private bool field205_;
+ public bool HasField205 {
+ get { return hasField205; }
+ }
+ public bool Field205 {
+ get { return field205_; }
+ }
+
+ public const int Field206FieldNumber = 206;
+ private bool hasField206;
+ private bool field206_;
+ public bool HasField206 {
+ get { return hasField206; }
+ }
+ public bool Field206 {
+ get { return field206_; }
+ }
+
+ public override bool IsInitialized {
+ get {
+ return true;
+ }
+ }
+
+ public override void WriteTo(pb::ICodedOutputStream output) {
+ CalcSerializedSize();
+ string[] field_names = _speedMessage2FieldNames;
+ if (hasField1) {
+ output.WriteString(1, field_names[0], Field1);
+ }
+ if (hasField2) {
+ output.WriteBytes(2, field_names[7], Field2);
+ }
+ if (hasField3) {
+ output.WriteInt64(3, field_names[22], Field3);
+ }
+ if (hasField4) {
+ output.WriteInt64(4, field_names[24], Field4);
+ }
+ if (hasField6) {
+ output.WriteString(6, field_names[25], Field6);
+ }
+ if (group1_.Count > 0) {
+ output.WriteGroupArray(10, field_names[29], group1_);
+ }
+ if (hasField21) {
+ output.WriteInt32(21, field_names[10], Field21);
+ }
+ if (hasField25) {
+ output.WriteFloat(25, field_names[21], Field25);
+ }
+ if (hasField30) {
+ output.WriteInt64(30, field_names[23], Field30);
+ }
+ if (hasField63) {
+ output.WriteInt32(63, field_names[26], Field63);
+ }
+ if (hasField71) {
+ output.WriteInt32(71, field_names[27], Field71);
+ }
+ if (hasField75) {
+ output.WriteBool(75, field_names[28], Field75);
+ }
+ if (hasField109) {
+ output.WriteInt32(109, field_names[1], Field109);
+ }
+ if (field127_.Count > 0) {
+ output.WriteStringArray(127, field_names[2], field127_);
+ }
+ if (field128_.Count > 0) {
+ output.WriteStringArray(128, field_names[3], field128_);
+ }
+ if (hasField129) {
+ output.WriteInt32(129, field_names[4], Field129);
+ }
+ if (field130_.Count > 0) {
+ output.WriteInt64Array(130, field_names[5], field130_);
+ }
+ if (hasField131) {
+ output.WriteInt64(131, field_names[6], Field131);
+ }
+ if (hasField205) {
+ output.WriteBool(205, field_names[8], Field205);
+ }
+ if (hasField206) {
+ output.WriteBool(206, field_names[9], Field206);
+ }
+ if (hasField210) {
+ output.WriteInt32(210, field_names[11], Field210);
+ }
+ if (hasField211) {
+ output.WriteInt32(211, field_names[12], Field211);
+ }
+ if (hasField212) {
+ output.WriteInt32(212, field_names[13], Field212);
+ }
+ if (hasField213) {
+ output.WriteInt32(213, field_names[14], Field213);
+ }
+ if (hasField216) {
+ output.WriteInt32(216, field_names[15], Field216);
+ }
+ if (hasField217) {
+ output.WriteInt32(217, field_names[16], Field217);
+ }
+ if (hasField218) {
+ output.WriteInt32(218, field_names[17], Field218);
+ }
+ if (hasField220) {
+ output.WriteInt32(220, field_names[18], Field220);
+ }
+ if (hasField221) {
+ output.WriteInt32(221, field_names[19], Field221);
+ }
+ if (hasField222) {
+ output.WriteFloat(222, field_names[20], Field222);
+ }
+ UnknownFields.WriteTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public override int SerializedSize {
+ get {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+ return CalcSerializedSize();
+ }
+ }
+
+ private int CalcSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (hasField1) {
+ size += pb::CodedOutputStream.ComputeStringSize(1, Field1);
+ }
+ if (hasField3) {
+ size += pb::CodedOutputStream.ComputeInt64Size(3, Field3);
+ }
+ if (hasField4) {
+ size += pb::CodedOutputStream.ComputeInt64Size(4, Field4);
+ }
+ if (hasField30) {
+ size += pb::CodedOutputStream.ComputeInt64Size(30, Field30);
+ }
+ if (hasField75) {
+ size += pb::CodedOutputStream.ComputeBoolSize(75, Field75);
+ }
+ if (hasField6) {
+ size += pb::CodedOutputStream.ComputeStringSize(6, Field6);
+ }
+ if (hasField2) {
+ size += pb::CodedOutputStream.ComputeBytesSize(2, Field2);
+ }
+ if (hasField21) {
+ size += pb::CodedOutputStream.ComputeInt32Size(21, Field21);
+ }
+ if (hasField71) {
+ size += pb::CodedOutputStream.ComputeInt32Size(71, Field71);
+ }
+ if (hasField25) {
+ size += pb::CodedOutputStream.ComputeFloatSize(25, Field25);
+ }
+ if (hasField109) {
+ size += pb::CodedOutputStream.ComputeInt32Size(109, Field109);
+ }
+ if (hasField210) {
+ size += pb::CodedOutputStream.ComputeInt32Size(210, Field210);
+ }
+ if (hasField211) {
+ size += pb::CodedOutputStream.ComputeInt32Size(211, Field211);
+ }
+ if (hasField212) {
+ size += pb::CodedOutputStream.ComputeInt32Size(212, Field212);
+ }
+ if (hasField213) {
+ size += pb::CodedOutputStream.ComputeInt32Size(213, Field213);
+ }
+ if (hasField216) {
+ size += pb::CodedOutputStream.ComputeInt32Size(216, Field216);
+ }
+ if (hasField217) {
+ size += pb::CodedOutputStream.ComputeInt32Size(217, Field217);
+ }
+ if (hasField218) {
+ size += pb::CodedOutputStream.ComputeInt32Size(218, Field218);
+ }
+ if (hasField220) {
+ size += pb::CodedOutputStream.ComputeInt32Size(220, Field220);
+ }
+ if (hasField221) {
+ size += pb::CodedOutputStream.ComputeInt32Size(221, Field221);
+ }
+ if (hasField222) {
+ size += pb::CodedOutputStream.ComputeFloatSize(222, Field222);
+ }
+ if (hasField63) {
+ size += pb::CodedOutputStream.ComputeInt32Size(63, Field63);
+ }
+ foreach (global::Google.ProtocolBuffers.TestProtos.SpeedMessage2.Types.Group1 element in Group1List) {
+ size += pb::CodedOutputStream.ComputeGroupSize(10, element);
+ }
+ {
+ int dataSize = 0;
+ foreach (string element in Field128List) {
+ dataSize += pb::CodedOutputStream.ComputeStringSizeNoTag(element);
+ }
+ size += dataSize;
+ size += 2 * field128_.Count;
+ }
+ if (hasField131) {
+ size += pb::CodedOutputStream.ComputeInt64Size(131, Field131);
+ }
+ {
+ int dataSize = 0;
+ foreach (string element in Field127List) {
+ dataSize += pb::CodedOutputStream.ComputeStringSizeNoTag(element);
+ }
+ size += dataSize;
+ size += 2 * field127_.Count;
+ }
+ if (hasField129) {
+ size += pb::CodedOutputStream.ComputeInt32Size(129, Field129);
+ }
+ {
+ int dataSize = 0;
+ foreach (long element in Field130List) {
+ dataSize += pb::CodedOutputStream.ComputeInt64SizeNoTag(element);
+ }
+ size += dataSize;
+ size += 2 * field130_.Count;
+ }
+ if (hasField205) {
+ size += pb::CodedOutputStream.ComputeBoolSize(205, Field205);
+ }
+ if (hasField206) {
+ size += pb::CodedOutputStream.ComputeBoolSize(206, Field206);
+ }
+ size += UnknownFields.SerializedSize;
+ memoizedSerializedSize = size;
+ return size;
+ }
+ public static SpeedMessage2 ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static SpeedMessage2 ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static SpeedMessage2 ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static SpeedMessage2 ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static SpeedMessage2 ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static SpeedMessage2 ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static SpeedMessage2 ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static SpeedMessage2 ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static SpeedMessage2 ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static SpeedMessage2 ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private SpeedMessage2 MakeReadOnly() {
+ group1_.MakeReadOnly();
+ field128_.MakeReadOnly();
+ field127_.MakeReadOnly();
+ field130_.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(SpeedMessage2 prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Builder : pb::GeneratedBuilder<SpeedMessage2, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(SpeedMessage2 cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private SpeedMessage2 result;
+
+ private SpeedMessage2 PrepareBuilder() {
+ if (resultIsReadOnly) {
+ SpeedMessage2 original = result;
+ result = new SpeedMessage2();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override SpeedMessage2 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.SpeedMessage2.Descriptor; }
+ }
+
+ public override SpeedMessage2 DefaultInstanceForType {
+ get { return global::Google.ProtocolBuffers.TestProtos.SpeedMessage2.DefaultInstance; }
+ }
+
+ public override SpeedMessage2 BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+ public override Builder MergeFrom(pb::IMessage other) {
+ if (other is SpeedMessage2) {
+ return MergeFrom((SpeedMessage2) other);
+ } else {
+ base.MergeFrom(other);
+ return this;
+ }
+ }
+
+ public override Builder MergeFrom(SpeedMessage2 other) {
+ if (other == global::Google.ProtocolBuffers.TestProtos.SpeedMessage2.DefaultInstance) return this;
+ PrepareBuilder();
+ if (other.HasField1) {
+ Field1 = other.Field1;
+ }
+ if (other.HasField3) {
+ Field3 = other.Field3;
+ }
+ if (other.HasField4) {
+ Field4 = other.Field4;
+ }
+ if (other.HasField30) {
+ Field30 = other.Field30;
+ }
+ if (other.HasField75) {
+ Field75 = other.Field75;
+ }
+ if (other.HasField6) {
+ Field6 = other.Field6;
+ }
+ if (other.HasField2) {
+ Field2 = other.Field2;
+ }
+ if (other.HasField21) {
+ Field21 = other.Field21;
+ }
+ if (other.HasField71) {
+ Field71 = other.Field71;
+ }
+ if (other.HasField25) {
+ Field25 = other.Field25;
+ }
+ if (other.HasField109) {
+ Field109 = other.Field109;
+ }
+ if (other.HasField210) {
+ Field210 = other.Field210;
+ }
+ if (other.HasField211) {
+ Field211 = other.Field211;
+ }
+ if (other.HasField212) {
+ Field212 = other.Field212;
+ }
+ if (other.HasField213) {
+ Field213 = other.Field213;
+ }
+ if (other.HasField216) {
+ Field216 = other.Field216;
+ }
+ if (other.HasField217) {
+ Field217 = other.Field217;
+ }
+ if (other.HasField218) {
+ Field218 = other.Field218;
+ }
+ if (other.HasField220) {
+ Field220 = other.Field220;
+ }
+ if (other.HasField221) {
+ Field221 = other.Field221;
+ }
+ if (other.HasField222) {
+ Field222 = other.Field222;
+ }
+ if (other.HasField63) {
+ Field63 = other.Field63;
+ }
+ if (other.group1_.Count != 0) {
+ result.group1_.Add(other.group1_);
+ }
+ if (other.field128_.Count != 0) {
+ result.field128_.Add(other.field128_);
+ }
+ if (other.HasField131) {
+ Field131 = other.Field131;
+ }
+ if (other.field127_.Count != 0) {
+ result.field127_.Add(other.field127_);
+ }
+ if (other.HasField129) {
+ Field129 = other.Field129;
+ }
+ if (other.field130_.Count != 0) {
+ result.field130_.Add(other.field130_);
+ }
+ if (other.HasField205) {
+ Field205 = other.Field205;
+ }
+ if (other.HasField206) {
+ Field206 = other.Field206;
+ }
+ 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(_speedMessage2FieldNames, field_name, global::System.StringComparer.Ordinal);
+ if(field_ordinal >= 0)
+ tag = _speedMessage2FieldTags[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.hasField1 = input.ReadString(ref result.field1_);
+ break;
+ }
+ case 18: {
+ result.hasField2 = input.ReadBytes(ref result.field2_);
+ break;
+ }
+ case 24: {
+ result.hasField3 = input.ReadInt64(ref result.field3_);
+ break;
+ }
+ case 32: {
+ result.hasField4 = input.ReadInt64(ref result.field4_);
+ break;
+ }
+ case 50: {
+ result.hasField6 = input.ReadString(ref result.field6_);
+ break;
+ }
+ case 83: {
+ input.ReadGroupArray(tag, field_name, result.group1_, global::Google.ProtocolBuffers.TestProtos.SpeedMessage2.Types.Group1.DefaultInstance, extensionRegistry);
+ break;
+ }
+ case 168: {
+ result.hasField21 = input.ReadInt32(ref result.field21_);
+ break;
+ }
+ case 205: {
+ result.hasField25 = input.ReadFloat(ref result.field25_);
+ break;
+ }
+ case 240: {
+ result.hasField30 = input.ReadInt64(ref result.field30_);
+ break;
+ }
+ case 504: {
+ result.hasField63 = input.ReadInt32(ref result.field63_);
+ break;
+ }
+ case 568: {
+ result.hasField71 = input.ReadInt32(ref result.field71_);
+ break;
+ }
+ case 600: {
+ result.hasField75 = input.ReadBool(ref result.field75_);
+ break;
+ }
+ case 872: {
+ result.hasField109 = input.ReadInt32(ref result.field109_);
+ break;
+ }
+ case 1018: {
+ input.ReadStringArray(tag, field_name, result.field127_);
+ break;
+ }
+ case 1026: {
+ input.ReadStringArray(tag, field_name, result.field128_);
+ break;
+ }
+ case 1032: {
+ result.hasField129 = input.ReadInt32(ref result.field129_);
+ break;
+ }
+ case 1042:
+ case 1040: {
+ input.ReadInt64Array(tag, field_name, result.field130_);
+ break;
+ }
+ case 1048: {
+ result.hasField131 = input.ReadInt64(ref result.field131_);
+ break;
+ }
+ case 1640: {
+ result.hasField205 = input.ReadBool(ref result.field205_);
+ break;
+ }
+ case 1648: {
+ result.hasField206 = input.ReadBool(ref result.field206_);
+ break;
+ }
+ case 1680: {
+ result.hasField210 = input.ReadInt32(ref result.field210_);
+ break;
+ }
+ case 1688: {
+ result.hasField211 = input.ReadInt32(ref result.field211_);
+ break;
+ }
+ case 1696: {
+ result.hasField212 = input.ReadInt32(ref result.field212_);
+ break;
+ }
+ case 1704: {
+ result.hasField213 = input.ReadInt32(ref result.field213_);
+ break;
+ }
+ case 1728: {
+ result.hasField216 = input.ReadInt32(ref result.field216_);
+ break;
+ }
+ case 1736: {
+ result.hasField217 = input.ReadInt32(ref result.field217_);
+ break;
+ }
+ case 1744: {
+ result.hasField218 = input.ReadInt32(ref result.field218_);
+ break;
+ }
+ case 1760: {
+ result.hasField220 = input.ReadInt32(ref result.field220_);
+ break;
+ }
+ case 1768: {
+ result.hasField221 = input.ReadInt32(ref result.field221_);
+ break;
+ }
+ case 1781: {
+ result.hasField222 = input.ReadFloat(ref result.field222_);
+ break;
+ }
+ }
+ }
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
+ }
+
+
+ public bool HasField1 {
+ get { return result.hasField1; }
+ }
+ public string Field1 {
+ get { return result.Field1; }
+ set { SetField1(value); }
+ }
+ public Builder SetField1(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasField1 = true;
+ result.field1_ = value;
+ return this;
+ }
+ public Builder ClearField1() {
+ PrepareBuilder();
+ result.hasField1 = false;
+ result.field1_ = "";
+ return this;
+ }
+
+ public bool HasField3 {
+ get { return result.hasField3; }
+ }
+ public long Field3 {
+ get { return result.Field3; }
+ set { SetField3(value); }
+ }
+ public Builder SetField3(long value) {
+ PrepareBuilder();
+ result.hasField3 = true;
+ result.field3_ = value;
+ return this;
+ }
+ public Builder ClearField3() {
+ PrepareBuilder();
+ result.hasField3 = false;
+ result.field3_ = 0L;
+ return this;
+ }
+
+ public bool HasField4 {
+ get { return result.hasField4; }
+ }
+ public long Field4 {
+ get { return result.Field4; }
+ set { SetField4(value); }
+ }
+ public Builder SetField4(long value) {
+ PrepareBuilder();
+ result.hasField4 = true;
+ result.field4_ = value;
+ return this;
+ }
+ public Builder ClearField4() {
+ PrepareBuilder();
+ result.hasField4 = false;
+ result.field4_ = 0L;
+ return this;
+ }
+
+ public bool HasField30 {
+ get { return result.hasField30; }
+ }
+ public long Field30 {
+ get { return result.Field30; }
+ set { SetField30(value); }
+ }
+ public Builder SetField30(long value) {
+ PrepareBuilder();
+ result.hasField30 = true;
+ result.field30_ = value;
+ return this;
+ }
+ public Builder ClearField30() {
+ PrepareBuilder();
+ result.hasField30 = false;
+ result.field30_ = 0L;
+ return this;
+ }
+
+ public bool HasField75 {
+ get { return result.hasField75; }
+ }
+ public bool Field75 {
+ get { return result.Field75; }
+ set { SetField75(value); }
+ }
+ public Builder SetField75(bool value) {
+ PrepareBuilder();
+ result.hasField75 = true;
+ result.field75_ = value;
+ return this;
+ }
+ public Builder ClearField75() {
+ PrepareBuilder();
+ result.hasField75 = false;
+ result.field75_ = false;
+ return this;
+ }
+
+ public bool HasField6 {
+ get { return result.hasField6; }
+ }
+ public string Field6 {
+ get { return result.Field6; }
+ set { SetField6(value); }
+ }
+ public Builder SetField6(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasField6 = true;
+ result.field6_ = value;
+ return this;
+ }
+ public Builder ClearField6() {
+ PrepareBuilder();
+ result.hasField6 = false;
+ result.field6_ = "";
+ return this;
+ }
+
+ public bool HasField2 {
+ get { return result.hasField2; }
+ }
+ public pb::ByteString Field2 {
+ get { return result.Field2; }
+ set { SetField2(value); }
+ }
+ public Builder SetField2(pb::ByteString value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasField2 = true;
+ result.field2_ = value;
+ return this;
+ }
+ public Builder ClearField2() {
+ PrepareBuilder();
+ result.hasField2 = false;
+ result.field2_ = pb::ByteString.Empty;
+ return this;
+ }
+
+ public bool HasField21 {
+ get { return result.hasField21; }
+ }
+ public int Field21 {
+ get { return result.Field21; }
+ set { SetField21(value); }
+ }
+ public Builder SetField21(int value) {
+ PrepareBuilder();
+ result.hasField21 = true;
+ result.field21_ = value;
+ return this;
+ }
+ public Builder ClearField21() {
+ PrepareBuilder();
+ result.hasField21 = false;
+ result.field21_ = 0;
+ return this;
+ }
+
+ public bool HasField71 {
+ get { return result.hasField71; }
+ }
+ public int Field71 {
+ get { return result.Field71; }
+ set { SetField71(value); }
+ }
+ public Builder SetField71(int value) {
+ PrepareBuilder();
+ result.hasField71 = true;
+ result.field71_ = value;
+ return this;
+ }
+ public Builder ClearField71() {
+ PrepareBuilder();
+ result.hasField71 = false;
+ result.field71_ = 0;
+ return this;
+ }
+
+ public bool HasField25 {
+ get { return result.hasField25; }
+ }
+ public float Field25 {
+ get { return result.Field25; }
+ set { SetField25(value); }
+ }
+ public Builder SetField25(float value) {
+ PrepareBuilder();
+ result.hasField25 = true;
+ result.field25_ = value;
+ return this;
+ }
+ public Builder ClearField25() {
+ PrepareBuilder();
+ result.hasField25 = false;
+ result.field25_ = 0F;
+ return this;
+ }
+
+ public bool HasField109 {
+ get { return result.hasField109; }
+ }
+ public int Field109 {
+ get { return result.Field109; }
+ set { SetField109(value); }
+ }
+ public Builder SetField109(int value) {
+ PrepareBuilder();
+ result.hasField109 = true;
+ result.field109_ = value;
+ return this;
+ }
+ public Builder ClearField109() {
+ PrepareBuilder();
+ result.hasField109 = false;
+ result.field109_ = 0;
+ return this;
+ }
+
+ public bool HasField210 {
+ get { return result.hasField210; }
+ }
+ public int Field210 {
+ get { return result.Field210; }
+ set { SetField210(value); }
+ }
+ public Builder SetField210(int value) {
+ PrepareBuilder();
+ result.hasField210 = true;
+ result.field210_ = value;
+ return this;
+ }
+ public Builder ClearField210() {
+ PrepareBuilder();
+ result.hasField210 = false;
+ result.field210_ = 0;
+ return this;
+ }
+
+ public bool HasField211 {
+ get { return result.hasField211; }
+ }
+ public int Field211 {
+ get { return result.Field211; }
+ set { SetField211(value); }
+ }
+ public Builder SetField211(int value) {
+ PrepareBuilder();
+ result.hasField211 = true;
+ result.field211_ = value;
+ return this;
+ }
+ public Builder ClearField211() {
+ PrepareBuilder();
+ result.hasField211 = false;
+ result.field211_ = 0;
+ return this;
+ }
+
+ public bool HasField212 {
+ get { return result.hasField212; }
+ }
+ public int Field212 {
+ get { return result.Field212; }
+ set { SetField212(value); }
+ }
+ public Builder SetField212(int value) {
+ PrepareBuilder();
+ result.hasField212 = true;
+ result.field212_ = value;
+ return this;
+ }
+ public Builder ClearField212() {
+ PrepareBuilder();
+ result.hasField212 = false;
+ result.field212_ = 0;
+ return this;
+ }
+
+ public bool HasField213 {
+ get { return result.hasField213; }
+ }
+ public int Field213 {
+ get { return result.Field213; }
+ set { SetField213(value); }
+ }
+ public Builder SetField213(int value) {
+ PrepareBuilder();
+ result.hasField213 = true;
+ result.field213_ = value;
+ return this;
+ }
+ public Builder ClearField213() {
+ PrepareBuilder();
+ result.hasField213 = false;
+ result.field213_ = 0;
+ return this;
+ }
+
+ public bool HasField216 {
+ get { return result.hasField216; }
+ }
+ public int Field216 {
+ get { return result.Field216; }
+ set { SetField216(value); }
+ }
+ public Builder SetField216(int value) {
+ PrepareBuilder();
+ result.hasField216 = true;
+ result.field216_ = value;
+ return this;
+ }
+ public Builder ClearField216() {
+ PrepareBuilder();
+ result.hasField216 = false;
+ result.field216_ = 0;
+ return this;
+ }
+
+ public bool HasField217 {
+ get { return result.hasField217; }
+ }
+ public int Field217 {
+ get { return result.Field217; }
+ set { SetField217(value); }
+ }
+ public Builder SetField217(int value) {
+ PrepareBuilder();
+ result.hasField217 = true;
+ result.field217_ = value;
+ return this;
+ }
+ public Builder ClearField217() {
+ PrepareBuilder();
+ result.hasField217 = false;
+ result.field217_ = 0;
+ return this;
+ }
+
+ public bool HasField218 {
+ get { return result.hasField218; }
+ }
+ public int Field218 {
+ get { return result.Field218; }
+ set { SetField218(value); }
+ }
+ public Builder SetField218(int value) {
+ PrepareBuilder();
+ result.hasField218 = true;
+ result.field218_ = value;
+ return this;
+ }
+ public Builder ClearField218() {
+ PrepareBuilder();
+ result.hasField218 = false;
+ result.field218_ = 0;
+ return this;
+ }
+
+ public bool HasField220 {
+ get { return result.hasField220; }
+ }
+ public int Field220 {
+ get { return result.Field220; }
+ set { SetField220(value); }
+ }
+ public Builder SetField220(int value) {
+ PrepareBuilder();
+ result.hasField220 = true;
+ result.field220_ = value;
+ return this;
+ }
+ public Builder ClearField220() {
+ PrepareBuilder();
+ result.hasField220 = false;
+ result.field220_ = 0;
+ return this;
+ }
+
+ public bool HasField221 {
+ get { return result.hasField221; }
+ }
+ public int Field221 {
+ get { return result.Field221; }
+ set { SetField221(value); }
+ }
+ public Builder SetField221(int value) {
+ PrepareBuilder();
+ result.hasField221 = true;
+ result.field221_ = value;
+ return this;
+ }
+ public Builder ClearField221() {
+ PrepareBuilder();
+ result.hasField221 = false;
+ result.field221_ = 0;
+ return this;
+ }
+
+ public bool HasField222 {
+ get { return result.hasField222; }
+ }
+ public float Field222 {
+ get { return result.Field222; }
+ set { SetField222(value); }
+ }
+ public Builder SetField222(float value) {
+ PrepareBuilder();
+ result.hasField222 = true;
+ result.field222_ = value;
+ return this;
+ }
+ public Builder ClearField222() {
+ PrepareBuilder();
+ result.hasField222 = false;
+ result.field222_ = 0F;
+ return this;
+ }
+
+ public bool HasField63 {
+ get { return result.hasField63; }
+ }
+ public int Field63 {
+ get { return result.Field63; }
+ set { SetField63(value); }
+ }
+ public Builder SetField63(int value) {
+ PrepareBuilder();
+ result.hasField63 = true;
+ result.field63_ = value;
+ return this;
+ }
+ public Builder ClearField63() {
+ PrepareBuilder();
+ result.hasField63 = false;
+ result.field63_ = 0;
+ return this;
+ }
+
+ public pbc::IPopsicleList<global::Google.ProtocolBuffers.TestProtos.SpeedMessage2.Types.Group1> Group1List {
+ get { return PrepareBuilder().group1_; }
+ }
+ public int Group1Count {
+ get { return result.Group1Count; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.SpeedMessage2.Types.Group1 GetGroup1(int index) {
+ return result.GetGroup1(index);
+ }
+ public Builder SetGroup1(int index, global::Google.ProtocolBuffers.TestProtos.SpeedMessage2.Types.Group1 value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.group1_[index] = value;
+ return this;
+ }
+ public Builder SetGroup1(int index, global::Google.ProtocolBuffers.TestProtos.SpeedMessage2.Types.Group1.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.group1_[index] = builderForValue.Build();
+ return this;
+ }
+ public Builder AddGroup1(global::Google.ProtocolBuffers.TestProtos.SpeedMessage2.Types.Group1 value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.group1_.Add(value);
+ return this;
+ }
+ public Builder AddGroup1(global::Google.ProtocolBuffers.TestProtos.SpeedMessage2.Types.Group1.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.group1_.Add(builderForValue.Build());
+ return this;
+ }
+ public Builder AddRangeGroup1(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.SpeedMessage2.Types.Group1> values) {
+ PrepareBuilder();
+ result.group1_.Add(values);
+ return this;
+ }
+ public Builder ClearGroup1() {
+ PrepareBuilder();
+ result.group1_.Clear();
+ return this;
+ }
+
+ public pbc::IPopsicleList<string> Field128List {
+ get { return PrepareBuilder().field128_; }
+ }
+ public int Field128Count {
+ get { return result.Field128Count; }
+ }
+ public string GetField128(int index) {
+ return result.GetField128(index);
+ }
+ public Builder SetField128(int index, string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.field128_[index] = value;
+ return this;
+ }
+ public Builder AddField128(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.field128_.Add(value);
+ return this;
+ }
+ public Builder AddRangeField128(scg::IEnumerable<string> values) {
+ PrepareBuilder();
+ result.field128_.Add(values);
+ return this;
+ }
+ public Builder ClearField128() {
+ PrepareBuilder();
+ result.field128_.Clear();
+ return this;
+ }
+
+ public bool HasField131 {
+ get { return result.hasField131; }
+ }
+ public long Field131 {
+ get { return result.Field131; }
+ set { SetField131(value); }
+ }
+ public Builder SetField131(long value) {
+ PrepareBuilder();
+ result.hasField131 = true;
+ result.field131_ = value;
+ return this;
+ }
+ public Builder ClearField131() {
+ PrepareBuilder();
+ result.hasField131 = false;
+ result.field131_ = 0L;
+ return this;
+ }
+
+ public pbc::IPopsicleList<string> Field127List {
+ get { return PrepareBuilder().field127_; }
+ }
+ public int Field127Count {
+ get { return result.Field127Count; }
+ }
+ public string GetField127(int index) {
+ return result.GetField127(index);
+ }
+ public Builder SetField127(int index, string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.field127_[index] = value;
+ return this;
+ }
+ public Builder AddField127(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.field127_.Add(value);
+ return this;
+ }
+ public Builder AddRangeField127(scg::IEnumerable<string> values) {
+ PrepareBuilder();
+ result.field127_.Add(values);
+ return this;
+ }
+ public Builder ClearField127() {
+ PrepareBuilder();
+ result.field127_.Clear();
+ return this;
+ }
+
+ public bool HasField129 {
+ get { return result.hasField129; }
+ }
+ public int Field129 {
+ get { return result.Field129; }
+ set { SetField129(value); }
+ }
+ public Builder SetField129(int value) {
+ PrepareBuilder();
+ result.hasField129 = true;
+ result.field129_ = value;
+ return this;
+ }
+ public Builder ClearField129() {
+ PrepareBuilder();
+ result.hasField129 = false;
+ result.field129_ = 0;
+ return this;
+ }
+
+ public pbc::IPopsicleList<long> Field130List {
+ get { return PrepareBuilder().field130_; }
+ }
+ public int Field130Count {
+ get { return result.Field130Count; }
+ }
+ public long GetField130(int index) {
+ return result.GetField130(index);
+ }
+ public Builder SetField130(int index, long value) {
+ PrepareBuilder();
+ result.field130_[index] = value;
+ return this;
+ }
+ public Builder AddField130(long value) {
+ PrepareBuilder();
+ result.field130_.Add(value);
+ return this;
+ }
+ public Builder AddRangeField130(scg::IEnumerable<long> values) {
+ PrepareBuilder();
+ result.field130_.Add(values);
+ return this;
+ }
+ public Builder ClearField130() {
+ PrepareBuilder();
+ result.field130_.Clear();
+ return this;
+ }
+
+ public bool HasField205 {
+ get { return result.hasField205; }
+ }
+ public bool Field205 {
+ get { return result.Field205; }
+ set { SetField205(value); }
+ }
+ public Builder SetField205(bool value) {
+ PrepareBuilder();
+ result.hasField205 = true;
+ result.field205_ = value;
+ return this;
+ }
+ public Builder ClearField205() {
+ PrepareBuilder();
+ result.hasField205 = false;
+ result.field205_ = false;
+ return this;
+ }
+
+ public bool HasField206 {
+ get { return result.hasField206; }
+ }
+ public bool Field206 {
+ get { return result.Field206; }
+ set { SetField206(value); }
+ }
+ public Builder SetField206(bool value) {
+ PrepareBuilder();
+ result.hasField206 = true;
+ result.field206_ = value;
+ return this;
+ }
+ public Builder ClearField206() {
+ PrepareBuilder();
+ result.hasField206 = false;
+ result.field206_ = false;
+ return this;
+ }
+ }
+ static SpeedMessage2() {
+ object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.GoogleSpeed.Descriptor, null);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class SpeedMessage2GroupedMessage : pb::GeneratedMessage<SpeedMessage2GroupedMessage, SpeedMessage2GroupedMessage.Builder> {
+ private SpeedMessage2GroupedMessage() { }
+ private static readonly SpeedMessage2GroupedMessage defaultInstance = new SpeedMessage2GroupedMessage().MakeReadOnly();
+ private static readonly string[] _speedMessage2GroupedMessageFieldNames = new string[] { "field1", "field10", "field11", "field2", "field3", "field4", "field5", "field6", "field7", "field8", "field9" };
+ private static readonly uint[] _speedMessage2GroupedMessageFieldTags = new uint[] { 13, 85, 88, 21, 29, 32, 40, 48, 56, 69, 72 };
+ public static SpeedMessage2GroupedMessage DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override SpeedMessage2GroupedMessage DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override SpeedMessage2GroupedMessage ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::Google.ProtocolBuffers.TestProtos.GoogleSpeed.internal__static_benchmarks_SpeedMessage2GroupedMessage__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<SpeedMessage2GroupedMessage, SpeedMessage2GroupedMessage.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.GoogleSpeed.internal__static_benchmarks_SpeedMessage2GroupedMessage__FieldAccessorTable; }
+ }
+
+ public const int Field1FieldNumber = 1;
+ private bool hasField1;
+ private float field1_;
+ public bool HasField1 {
+ get { return hasField1; }
+ }
+ public float Field1 {
+ get { return field1_; }
+ }
+
+ public const int Field2FieldNumber = 2;
+ private bool hasField2;
+ private float field2_;
+ public bool HasField2 {
+ get { return hasField2; }
+ }
+ public float Field2 {
+ get { return field2_; }
+ }
+
+ public const int Field3FieldNumber = 3;
+ private bool hasField3;
+ private float field3_;
+ public bool HasField3 {
+ get { return hasField3; }
+ }
+ public float Field3 {
+ get { return field3_; }
+ }
+
+ public const int Field4FieldNumber = 4;
+ private bool hasField4;
+ private bool field4_;
+ public bool HasField4 {
+ get { return hasField4; }
+ }
+ public bool Field4 {
+ get { return field4_; }
+ }
+
+ public const int Field5FieldNumber = 5;
+ private bool hasField5;
+ private bool field5_;
+ public bool HasField5 {
+ get { return hasField5; }
+ }
+ public bool Field5 {
+ get { return field5_; }
+ }
+
+ public const int Field6FieldNumber = 6;
+ private bool hasField6;
+ private bool field6_ = true;
+ public bool HasField6 {
+ get { return hasField6; }
+ }
+ public bool Field6 {
+ get { return field6_; }
+ }
+
+ public const int Field7FieldNumber = 7;
+ private bool hasField7;
+ private bool field7_;
+ public bool HasField7 {
+ get { return hasField7; }
+ }
+ public bool Field7 {
+ get { return field7_; }
+ }
+
+ public const int Field8FieldNumber = 8;
+ private bool hasField8;
+ private float field8_;
+ public bool HasField8 {
+ get { return hasField8; }
+ }
+ public float Field8 {
+ get { return field8_; }
+ }
+
+ public const int Field9FieldNumber = 9;
+ private bool hasField9;
+ private bool field9_;
+ public bool HasField9 {
+ get { return hasField9; }
+ }
+ public bool Field9 {
+ get { return field9_; }
+ }
+
+ public const int Field10FieldNumber = 10;
+ private bool hasField10;
+ private float field10_;
+ public bool HasField10 {
+ get { return hasField10; }
+ }
+ public float Field10 {
+ get { return field10_; }
+ }
+
+ public const int Field11FieldNumber = 11;
+ private bool hasField11;
+ private long field11_;
+ public bool HasField11 {
+ get { return hasField11; }
+ }
+ public long Field11 {
+ get { return field11_; }
+ }
+
+ public override bool IsInitialized {
+ get {
+ return true;
+ }
+ }
+
+ public override void WriteTo(pb::ICodedOutputStream output) {
+ CalcSerializedSize();
+ string[] field_names = _speedMessage2GroupedMessageFieldNames;
+ if (hasField1) {
+ output.WriteFloat(1, field_names[0], Field1);
+ }
+ if (hasField2) {
+ output.WriteFloat(2, field_names[3], Field2);
+ }
+ if (hasField3) {
+ output.WriteFloat(3, field_names[4], Field3);
+ }
+ if (hasField4) {
+ output.WriteBool(4, field_names[5], Field4);
+ }
+ if (hasField5) {
+ output.WriteBool(5, field_names[6], Field5);
+ }
+ if (hasField6) {
+ output.WriteBool(6, field_names[7], Field6);
+ }
+ if (hasField7) {
+ output.WriteBool(7, field_names[8], Field7);
+ }
+ if (hasField8) {
+ output.WriteFloat(8, field_names[9], Field8);
+ }
+ if (hasField9) {
+ output.WriteBool(9, field_names[10], Field9);
+ }
+ if (hasField10) {
+ output.WriteFloat(10, field_names[1], Field10);
+ }
+ if (hasField11) {
+ output.WriteInt64(11, field_names[2], Field11);
+ }
+ UnknownFields.WriteTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public override int SerializedSize {
+ get {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+ return CalcSerializedSize();
+ }
+ }
+
+ private int CalcSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (hasField1) {
+ size += pb::CodedOutputStream.ComputeFloatSize(1, Field1);
+ }
+ if (hasField2) {
+ size += pb::CodedOutputStream.ComputeFloatSize(2, Field2);
+ }
+ if (hasField3) {
+ size += pb::CodedOutputStream.ComputeFloatSize(3, Field3);
+ }
+ if (hasField4) {
+ size += pb::CodedOutputStream.ComputeBoolSize(4, Field4);
+ }
+ if (hasField5) {
+ size += pb::CodedOutputStream.ComputeBoolSize(5, Field5);
+ }
+ if (hasField6) {
+ size += pb::CodedOutputStream.ComputeBoolSize(6, Field6);
+ }
+ if (hasField7) {
+ size += pb::CodedOutputStream.ComputeBoolSize(7, Field7);
+ }
+ if (hasField8) {
+ size += pb::CodedOutputStream.ComputeFloatSize(8, Field8);
+ }
+ if (hasField9) {
+ size += pb::CodedOutputStream.ComputeBoolSize(9, Field9);
+ }
+ if (hasField10) {
+ size += pb::CodedOutputStream.ComputeFloatSize(10, Field10);
+ }
+ if (hasField11) {
+ size += pb::CodedOutputStream.ComputeInt64Size(11, Field11);
+ }
+ size += UnknownFields.SerializedSize;
+ memoizedSerializedSize = size;
+ return size;
+ }
+ public static SpeedMessage2GroupedMessage ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static SpeedMessage2GroupedMessage ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static SpeedMessage2GroupedMessage ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static SpeedMessage2GroupedMessage ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static SpeedMessage2GroupedMessage ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static SpeedMessage2GroupedMessage ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static SpeedMessage2GroupedMessage ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static SpeedMessage2GroupedMessage ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static SpeedMessage2GroupedMessage ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static SpeedMessage2GroupedMessage ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private SpeedMessage2GroupedMessage 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(SpeedMessage2GroupedMessage prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Builder : pb::GeneratedBuilder<SpeedMessage2GroupedMessage, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(SpeedMessage2GroupedMessage cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private SpeedMessage2GroupedMessage result;
+
+ private SpeedMessage2GroupedMessage PrepareBuilder() {
+ if (resultIsReadOnly) {
+ SpeedMessage2GroupedMessage original = result;
+ result = new SpeedMessage2GroupedMessage();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override SpeedMessage2GroupedMessage 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.SpeedMessage2GroupedMessage.Descriptor; }
+ }
+
+ public override SpeedMessage2GroupedMessage DefaultInstanceForType {
+ get { return global::Google.ProtocolBuffers.TestProtos.SpeedMessage2GroupedMessage.DefaultInstance; }
+ }
+
+ public override SpeedMessage2GroupedMessage BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+ public override Builder MergeFrom(pb::IMessage other) {
+ if (other is SpeedMessage2GroupedMessage) {
+ return MergeFrom((SpeedMessage2GroupedMessage) other);
+ } else {
+ base.MergeFrom(other);
+ return this;
+ }
+ }
+
+ public override Builder MergeFrom(SpeedMessage2GroupedMessage other) {
+ if (other == global::Google.ProtocolBuffers.TestProtos.SpeedMessage2GroupedMessage.DefaultInstance) return this;
+ PrepareBuilder();
+ if (other.HasField1) {
+ Field1 = other.Field1;
+ }
+ if (other.HasField2) {
+ Field2 = other.Field2;
+ }
+ if (other.HasField3) {
+ Field3 = other.Field3;
+ }
+ if (other.HasField4) {
+ Field4 = other.Field4;
+ }
+ if (other.HasField5) {
+ Field5 = other.Field5;
+ }
+ if (other.HasField6) {
+ Field6 = other.Field6;
+ }
+ if (other.HasField7) {
+ Field7 = other.Field7;
+ }
+ if (other.HasField8) {
+ Field8 = other.Field8;
+ }
+ if (other.HasField9) {
+ Field9 = other.Field9;
+ }
+ if (other.HasField10) {
+ Field10 = other.Field10;
+ }
+ if (other.HasField11) {
+ Field11 = other.Field11;
+ }
+ 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(_speedMessage2GroupedMessageFieldNames, field_name, global::System.StringComparer.Ordinal);
+ if(field_ordinal >= 0)
+ tag = _speedMessage2GroupedMessageFieldTags[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 13: {
+ result.hasField1 = input.ReadFloat(ref result.field1_);
+ break;
+ }
+ case 21: {
+ result.hasField2 = input.ReadFloat(ref result.field2_);
+ break;
+ }
+ case 29: {
+ result.hasField3 = input.ReadFloat(ref result.field3_);
+ break;
+ }
+ case 32: {
+ result.hasField4 = input.ReadBool(ref result.field4_);
+ break;
+ }
+ case 40: {
+ result.hasField5 = input.ReadBool(ref result.field5_);
+ break;
+ }
+ case 48: {
+ result.hasField6 = input.ReadBool(ref result.field6_);
+ break;
+ }
+ case 56: {
+ result.hasField7 = input.ReadBool(ref result.field7_);
+ break;
+ }
+ case 69: {
+ result.hasField8 = input.ReadFloat(ref result.field8_);
+ break;
+ }
+ case 72: {
+ result.hasField9 = input.ReadBool(ref result.field9_);
+ break;
+ }
+ case 85: {
+ result.hasField10 = input.ReadFloat(ref result.field10_);
+ break;
+ }
+ case 88: {
+ result.hasField11 = input.ReadInt64(ref result.field11_);
+ break;
+ }
+ }
+ }
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
+ }
+
+
+ public bool HasField1 {
+ get { return result.hasField1; }
+ }
+ public float Field1 {
+ get { return result.Field1; }
+ set { SetField1(value); }
+ }
+ public Builder SetField1(float value) {
+ PrepareBuilder();
+ result.hasField1 = true;
+ result.field1_ = value;
+ return this;
+ }
+ public Builder ClearField1() {
+ PrepareBuilder();
+ result.hasField1 = false;
+ result.field1_ = 0F;
+ return this;
+ }
+
+ public bool HasField2 {
+ get { return result.hasField2; }
+ }
+ public float Field2 {
+ get { return result.Field2; }
+ set { SetField2(value); }
+ }
+ public Builder SetField2(float value) {
+ PrepareBuilder();
+ result.hasField2 = true;
+ result.field2_ = value;
+ return this;
+ }
+ public Builder ClearField2() {
+ PrepareBuilder();
+ result.hasField2 = false;
+ result.field2_ = 0F;
+ return this;
+ }
+
+ public bool HasField3 {
+ get { return result.hasField3; }
+ }
+ public float Field3 {
+ get { return result.Field3; }
+ set { SetField3(value); }
+ }
+ public Builder SetField3(float value) {
+ PrepareBuilder();
+ result.hasField3 = true;
+ result.field3_ = value;
+ return this;
+ }
+ public Builder ClearField3() {
+ PrepareBuilder();
+ result.hasField3 = false;
+ result.field3_ = 0F;
+ return this;
+ }
+
+ public bool HasField4 {
+ get { return result.hasField4; }
+ }
+ public bool Field4 {
+ get { return result.Field4; }
+ set { SetField4(value); }
+ }
+ public Builder SetField4(bool value) {
+ PrepareBuilder();
+ result.hasField4 = true;
+ result.field4_ = value;
+ return this;
+ }
+ public Builder ClearField4() {
+ PrepareBuilder();
+ result.hasField4 = false;
+ result.field4_ = false;
+ return this;
+ }
+
+ public bool HasField5 {
+ get { return result.hasField5; }
+ }
+ public bool Field5 {
+ get { return result.Field5; }
+ set { SetField5(value); }
+ }
+ public Builder SetField5(bool value) {
+ PrepareBuilder();
+ result.hasField5 = true;
+ result.field5_ = value;
+ return this;
+ }
+ public Builder ClearField5() {
+ PrepareBuilder();
+ result.hasField5 = false;
+ result.field5_ = false;
+ return this;
+ }
+
+ public bool HasField6 {
+ get { return result.hasField6; }
+ }
+ public bool Field6 {
+ get { return result.Field6; }
+ set { SetField6(value); }
+ }
+ public Builder SetField6(bool value) {
+ PrepareBuilder();
+ result.hasField6 = true;
+ result.field6_ = value;
+ return this;
+ }
+ public Builder ClearField6() {
+ PrepareBuilder();
+ result.hasField6 = false;
+ result.field6_ = true;
+ return this;
+ }
+
+ public bool HasField7 {
+ get { return result.hasField7; }
+ }
+ public bool Field7 {
+ get { return result.Field7; }
+ set { SetField7(value); }
+ }
+ public Builder SetField7(bool value) {
+ PrepareBuilder();
+ result.hasField7 = true;
+ result.field7_ = value;
+ return this;
+ }
+ public Builder ClearField7() {
+ PrepareBuilder();
+ result.hasField7 = false;
+ result.field7_ = false;
+ return this;
+ }
+
+ public bool HasField8 {
+ get { return result.hasField8; }
+ }
+ public float Field8 {
+ get { return result.Field8; }
+ set { SetField8(value); }
+ }
+ public Builder SetField8(float value) {
+ PrepareBuilder();
+ result.hasField8 = true;
+ result.field8_ = value;
+ return this;
+ }
+ public Builder ClearField8() {
+ PrepareBuilder();
+ result.hasField8 = false;
+ result.field8_ = 0F;
+ return this;
+ }
+
+ public bool HasField9 {
+ get { return result.hasField9; }
+ }
+ public bool Field9 {
+ get { return result.Field9; }
+ set { SetField9(value); }
+ }
+ public Builder SetField9(bool value) {
+ PrepareBuilder();
+ result.hasField9 = true;
+ result.field9_ = value;
+ return this;
+ }
+ public Builder ClearField9() {
+ PrepareBuilder();
+ result.hasField9 = false;
+ result.field9_ = false;
+ return this;
+ }
+
+ public bool HasField10 {
+ get { return result.hasField10; }
+ }
+ public float Field10 {
+ get { return result.Field10; }
+ set { SetField10(value); }
+ }
+ public Builder SetField10(float value) {
+ PrepareBuilder();
+ result.hasField10 = true;
+ result.field10_ = value;
+ return this;
+ }
+ public Builder ClearField10() {
+ PrepareBuilder();
+ result.hasField10 = false;
+ result.field10_ = 0F;
+ return this;
+ }
+
+ public bool HasField11 {
+ get { return result.hasField11; }
+ }
+ public long Field11 {
+ get { return result.Field11; }
+ set { SetField11(value); }
+ }
+ public Builder SetField11(long value) {
+ PrepareBuilder();
+ result.hasField11 = true;
+ result.field11_ = value;
+ return this;
+ }
+ public Builder ClearField11() {
+ PrepareBuilder();
+ result.hasField11 = false;
+ result.field11_ = 0L;
+ return this;
+ }
+ }
+ static SpeedMessage2GroupedMessage() {
+ object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.GoogleSpeed.Descriptor, null);
+ }
+ }
+
+ #endregion
+
+}
+
+#endregion Designer generated code
diff --git a/csharp/src/ProtoBench/Properties/AssemblyInfo.cs b/csharp/src/ProtoBench/Properties/AssemblyInfo.cs
index 8600c13..cdffc5e 100644
--- a/csharp/src/ProtoBench/Properties/AssemblyInfo.cs
+++ b/csharp/src/ProtoBench/Properties/AssemblyInfo.cs
@@ -15,7 +15,6 @@
[assembly: AssemblyCopyright("Copyright © 2009")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
-[assembly: CLSCompliant(true)]
// Version information for an assembly consists of the following four values:
//
diff --git a/csharp/src/ProtoBench/ProtoBench.csproj b/csharp/src/ProtoBench/ProtoBench.csproj
index 9df4774..280a54a 100644
--- a/csharp/src/ProtoBench/ProtoBench.csproj
+++ b/csharp/src/ProtoBench/ProtoBench.csproj
@@ -1,8 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
- <EnvironmentFlavor>CLIENTPROFILE</EnvironmentFlavor>
- <EnvironmentTemplate>NET35</EnvironmentTemplate>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
@@ -12,15 +10,16 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Google.ProtocolBuffers.ProtoBench</RootNamespace>
<AssemblyName>ProtoBench</AssemblyName>
- <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
+ <TargetFrameworkProfile>Client</TargetFrameworkProfile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
- <OutputPath>bin\NET35\Debug</OutputPath>
- <IntermediateOutputPath>obj\NET35\Debug\</IntermediateOutputPath>
+ <OutputPath>bin\Debug</OutputPath>
+ <IntermediateOutputPath>obj\Debug\</IntermediateOutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
@@ -31,8 +30,8 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
- <OutputPath>bin\NET35\Release</OutputPath>
- <IntermediateOutputPath>obj\NET35\Release\</IntermediateOutputPath>
+ <OutputPath>bin\Release</OutputPath>
+ <IntermediateOutputPath>obj\Release\</IntermediateOutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
@@ -45,17 +44,16 @@
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Runtime.Serialization" />
- <Reference Include="System.ServiceModel" />
- <Reference Include="System.ServiceModel.Web" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
+ <Compile Include="GoogleSize.cs" />
+ <Compile Include="GoogleSpeed.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
- <Compile Include="TestProtos\GoogleSizeProtoFile.cs" />
- <Compile Include="TestProtos\GoogleSpeedProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestImportProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestProtoFile.cs" />
+ <Compile Include="Unittest.cs" />
+ <Compile Include="UnittestImport.cs" />
+ <Compile Include="UnittestImportPublic.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\ProtocolBuffers.Serialization\ProtocolBuffers.Serialization.csproj">
@@ -70,6 +68,7 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
+ <None Include="app.config" />
<None Include="google_message1.dat">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
@@ -77,6 +76,9 @@
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
+ <ItemGroup>
+ <Folder Include="TestProtos\" />
+ </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
diff --git a/csharp/src/ProtoBench/TestProtos/UnitTestProtoFile.cs b/csharp/src/ProtoBench/TestProtos/UnitTestProtoFile.cs
deleted file mode 100644
index dd31c67..0000000
--- a/csharp/src/ProtoBench/TestProtos/UnitTestProtoFile.cs
+++ /dev/null
@@ -1,21602 +0,0 @@
-// Generated by ProtoGen, Version=2.4.1.555, Culture=neutral, PublicKeyToken=55f7125234beb589. DO NOT EDIT!
-#pragma warning disable 1591, 0612, 3021
-#region Designer generated code
-
-using pb = global::Google.ProtocolBuffers;
-using pbc = global::Google.ProtocolBuffers.Collections;
-using pbd = global::Google.ProtocolBuffers.Descriptors;
-using scg = global::System.Collections.Generic;
-namespace Google.ProtocolBuffers.TestProtos {
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public static partial class UnitTestProtoFile {
-
- #region Extension registration
- public static void RegisterAllExtensions(pb::ExtensionRegistry registry) {
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.OptionalInt32Extension);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.OptionalInt64Extension);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.OptionalUint32Extension);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.OptionalUint64Extension);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.OptionalSint32Extension);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.OptionalSint64Extension);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.OptionalFixed32Extension);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.OptionalFixed64Extension);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.OptionalSfixed32Extension);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.OptionalSfixed64Extension);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.OptionalFloatExtension);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.OptionalDoubleExtension);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.OptionalBoolExtension);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.OptionalStringExtension);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.OptionalBytesExtension);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.OptionalGroupExtension);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.OptionalNestedMessageExtension);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.OptionalForeignMessageExtension);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.OptionalImportMessageExtension);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.OptionalNestedEnumExtension);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.OptionalForeignEnumExtension);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.OptionalImportEnumExtension);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.OptionalStringPieceExtension);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.OptionalCordExtension);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.RepeatedInt32Extension);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.RepeatedInt64Extension);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.RepeatedUint32Extension);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.RepeatedUint64Extension);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.RepeatedSint32Extension);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.RepeatedSint64Extension);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.RepeatedFixed32Extension);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.RepeatedFixed64Extension);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.RepeatedSfixed32Extension);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.RepeatedSfixed64Extension);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.RepeatedFloatExtension);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.RepeatedDoubleExtension);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.RepeatedBoolExtension);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.RepeatedStringExtension);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.RepeatedBytesExtension);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.RepeatedGroupExtension);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.RepeatedNestedMessageExtension);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.RepeatedForeignMessageExtension);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.RepeatedImportMessageExtension);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.RepeatedNestedEnumExtension);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.RepeatedForeignEnumExtension);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.RepeatedImportEnumExtension);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.RepeatedStringPieceExtension);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.RepeatedCordExtension);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.DefaultInt32Extension);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.DefaultInt64Extension);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.DefaultUint32Extension);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.DefaultUint64Extension);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.DefaultSint32Extension);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.DefaultSint64Extension);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.DefaultFixed32Extension);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.DefaultFixed64Extension);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.DefaultSfixed32Extension);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.DefaultSfixed64Extension);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.DefaultFloatExtension);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.DefaultDoubleExtension);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.DefaultBoolExtension);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.DefaultStringExtension);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.DefaultBytesExtension);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.DefaultNestedEnumExtension);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.DefaultForeignEnumExtension);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.DefaultImportEnumExtension);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.DefaultStringPieceExtension);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.DefaultCordExtension);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.MyExtensionString);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.MyExtensionInt);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.PackedInt32Extension);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.PackedInt64Extension);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.PackedUint32Extension);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.PackedUint64Extension);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.PackedSint32Extension);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.PackedSint64Extension);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.PackedFixed32Extension);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.PackedFixed64Extension);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.PackedSfixed32Extension);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.PackedSfixed64Extension);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.PackedFloatExtension);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.PackedDoubleExtension);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.PackedBoolExtension);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.PackedEnumExtension);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.TestNestedExtension.Test);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.TestRequired.Single);
- registry.Add(global::Google.ProtocolBuffers.TestProtos.TestRequired.Multi);
- }
- #endregion
- #region Extensions
- public const int OptionalInt32ExtensionFieldNumber = 1;
- public static pb::GeneratedExtensionBase<int> OptionalInt32Extension;
- public const int OptionalInt64ExtensionFieldNumber = 2;
- public static pb::GeneratedExtensionBase<long> OptionalInt64Extension;
- public const int OptionalUint32ExtensionFieldNumber = 3;
- [global::System.CLSCompliant(false)]
- public static pb::GeneratedExtensionBase<uint> OptionalUint32Extension;
- public const int OptionalUint64ExtensionFieldNumber = 4;
- [global::System.CLSCompliant(false)]
- public static pb::GeneratedExtensionBase<ulong> OptionalUint64Extension;
- public const int OptionalSint32ExtensionFieldNumber = 5;
- public static pb::GeneratedExtensionBase<int> OptionalSint32Extension;
- public const int OptionalSint64ExtensionFieldNumber = 6;
- public static pb::GeneratedExtensionBase<long> OptionalSint64Extension;
- public const int OptionalFixed32ExtensionFieldNumber = 7;
- [global::System.CLSCompliant(false)]
- public static pb::GeneratedExtensionBase<uint> OptionalFixed32Extension;
- public const int OptionalFixed64ExtensionFieldNumber = 8;
- [global::System.CLSCompliant(false)]
- public static pb::GeneratedExtensionBase<ulong> OptionalFixed64Extension;
- public const int OptionalSfixed32ExtensionFieldNumber = 9;
- public static pb::GeneratedExtensionBase<int> OptionalSfixed32Extension;
- public const int OptionalSfixed64ExtensionFieldNumber = 10;
- public static pb::GeneratedExtensionBase<long> OptionalSfixed64Extension;
- public const int OptionalFloatExtensionFieldNumber = 11;
- public static pb::GeneratedExtensionBase<float> OptionalFloatExtension;
- public const int OptionalDoubleExtensionFieldNumber = 12;
- public static pb::GeneratedExtensionBase<double> OptionalDoubleExtension;
- public const int OptionalBoolExtensionFieldNumber = 13;
- public static pb::GeneratedExtensionBase<bool> OptionalBoolExtension;
- public const int OptionalStringExtensionFieldNumber = 14;
- public static pb::GeneratedExtensionBase<string> OptionalStringExtension;
- public const int OptionalBytesExtensionFieldNumber = 15;
- public static pb::GeneratedExtensionBase<pb::ByteString> OptionalBytesExtension;
- public const int OptionalGroupExtensionFieldNumber = 16;
- public static pb::GeneratedExtensionBase<global::Google.ProtocolBuffers.TestProtos.OptionalGroup_extension> OptionalGroupExtension;
- public const int OptionalNestedMessageExtensionFieldNumber = 18;
- public static pb::GeneratedExtensionBase<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage> OptionalNestedMessageExtension;
- public const int OptionalForeignMessageExtensionFieldNumber = 19;
- public static pb::GeneratedExtensionBase<global::Google.ProtocolBuffers.TestProtos.ForeignMessage> OptionalForeignMessageExtension;
- public const int OptionalImportMessageExtensionFieldNumber = 20;
- public static pb::GeneratedExtensionBase<global::Google.ProtocolBuffers.TestProtos.ImportMessage> OptionalImportMessageExtension;
- public const int OptionalNestedEnumExtensionFieldNumber = 21;
- public static pb::GeneratedExtensionBase<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedEnum> OptionalNestedEnumExtension;
- public const int OptionalForeignEnumExtensionFieldNumber = 22;
- public static pb::GeneratedExtensionBase<global::Google.ProtocolBuffers.TestProtos.ForeignEnum> OptionalForeignEnumExtension;
- public const int OptionalImportEnumExtensionFieldNumber = 23;
- public static pb::GeneratedExtensionBase<global::Google.ProtocolBuffers.TestProtos.ImportEnum> OptionalImportEnumExtension;
- public const int OptionalStringPieceExtensionFieldNumber = 24;
- public static pb::GeneratedExtensionBase<string> OptionalStringPieceExtension;
- public const int OptionalCordExtensionFieldNumber = 25;
- public static pb::GeneratedExtensionBase<string> OptionalCordExtension;
- public const int RepeatedInt32ExtensionFieldNumber = 31;
- public static pb::GeneratedExtensionBase<scg::IList<int>> RepeatedInt32Extension;
- public const int RepeatedInt64ExtensionFieldNumber = 32;
- public static pb::GeneratedExtensionBase<scg::IList<long>> RepeatedInt64Extension;
- public const int RepeatedUint32ExtensionFieldNumber = 33;
- [global::System.CLSCompliant(false)]
- public static pb::GeneratedExtensionBase<scg::IList<uint>> RepeatedUint32Extension;
- public const int RepeatedUint64ExtensionFieldNumber = 34;
- [global::System.CLSCompliant(false)]
- public static pb::GeneratedExtensionBase<scg::IList<ulong>> RepeatedUint64Extension;
- public const int RepeatedSint32ExtensionFieldNumber = 35;
- public static pb::GeneratedExtensionBase<scg::IList<int>> RepeatedSint32Extension;
- public const int RepeatedSint64ExtensionFieldNumber = 36;
- public static pb::GeneratedExtensionBase<scg::IList<long>> RepeatedSint64Extension;
- public const int RepeatedFixed32ExtensionFieldNumber = 37;
- [global::System.CLSCompliant(false)]
- public static pb::GeneratedExtensionBase<scg::IList<uint>> RepeatedFixed32Extension;
- public const int RepeatedFixed64ExtensionFieldNumber = 38;
- [global::System.CLSCompliant(false)]
- public static pb::GeneratedExtensionBase<scg::IList<ulong>> RepeatedFixed64Extension;
- public const int RepeatedSfixed32ExtensionFieldNumber = 39;
- public static pb::GeneratedExtensionBase<scg::IList<int>> RepeatedSfixed32Extension;
- public const int RepeatedSfixed64ExtensionFieldNumber = 40;
- public static pb::GeneratedExtensionBase<scg::IList<long>> RepeatedSfixed64Extension;
- public const int RepeatedFloatExtensionFieldNumber = 41;
- public static pb::GeneratedExtensionBase<scg::IList<float>> RepeatedFloatExtension;
- public const int RepeatedDoubleExtensionFieldNumber = 42;
- public static pb::GeneratedExtensionBase<scg::IList<double>> RepeatedDoubleExtension;
- public const int RepeatedBoolExtensionFieldNumber = 43;
- public static pb::GeneratedExtensionBase<scg::IList<bool>> RepeatedBoolExtension;
- public const int RepeatedStringExtensionFieldNumber = 44;
- public static pb::GeneratedExtensionBase<scg::IList<string>> RepeatedStringExtension;
- public const int RepeatedBytesExtensionFieldNumber = 45;
- public static pb::GeneratedExtensionBase<scg::IList<pb::ByteString>> RepeatedBytesExtension;
- public const int RepeatedGroupExtensionFieldNumber = 46;
- public static pb::GeneratedExtensionBase<scg::IList<global::Google.ProtocolBuffers.TestProtos.RepeatedGroup_extension>> RepeatedGroupExtension;
- public const int RepeatedNestedMessageExtensionFieldNumber = 48;
- public static pb::GeneratedExtensionBase<scg::IList<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage>> RepeatedNestedMessageExtension;
- public const int RepeatedForeignMessageExtensionFieldNumber = 49;
- public static pb::GeneratedExtensionBase<scg::IList<global::Google.ProtocolBuffers.TestProtos.ForeignMessage>> RepeatedForeignMessageExtension;
- public const int RepeatedImportMessageExtensionFieldNumber = 50;
- public static pb::GeneratedExtensionBase<scg::IList<global::Google.ProtocolBuffers.TestProtos.ImportMessage>> RepeatedImportMessageExtension;
- public const int RepeatedNestedEnumExtensionFieldNumber = 51;
- public static pb::GeneratedExtensionBase<scg::IList<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedEnum>> RepeatedNestedEnumExtension;
- public const int RepeatedForeignEnumExtensionFieldNumber = 52;
- public static pb::GeneratedExtensionBase<scg::IList<global::Google.ProtocolBuffers.TestProtos.ForeignEnum>> RepeatedForeignEnumExtension;
- public const int RepeatedImportEnumExtensionFieldNumber = 53;
- public static pb::GeneratedExtensionBase<scg::IList<global::Google.ProtocolBuffers.TestProtos.ImportEnum>> RepeatedImportEnumExtension;
- public const int RepeatedStringPieceExtensionFieldNumber = 54;
- public static pb::GeneratedExtensionBase<scg::IList<string>> RepeatedStringPieceExtension;
- public const int RepeatedCordExtensionFieldNumber = 55;
- public static pb::GeneratedExtensionBase<scg::IList<string>> RepeatedCordExtension;
- public const int DefaultInt32ExtensionFieldNumber = 61;
- public static pb::GeneratedExtensionBase<int> DefaultInt32Extension;
- public const int DefaultInt64ExtensionFieldNumber = 62;
- public static pb::GeneratedExtensionBase<long> DefaultInt64Extension;
- public const int DefaultUint32ExtensionFieldNumber = 63;
- [global::System.CLSCompliant(false)]
- public static pb::GeneratedExtensionBase<uint> DefaultUint32Extension;
- public const int DefaultUint64ExtensionFieldNumber = 64;
- [global::System.CLSCompliant(false)]
- public static pb::GeneratedExtensionBase<ulong> DefaultUint64Extension;
- public const int DefaultSint32ExtensionFieldNumber = 65;
- public static pb::GeneratedExtensionBase<int> DefaultSint32Extension;
- public const int DefaultSint64ExtensionFieldNumber = 66;
- public static pb::GeneratedExtensionBase<long> DefaultSint64Extension;
- public const int DefaultFixed32ExtensionFieldNumber = 67;
- [global::System.CLSCompliant(false)]
- public static pb::GeneratedExtensionBase<uint> DefaultFixed32Extension;
- public const int DefaultFixed64ExtensionFieldNumber = 68;
- [global::System.CLSCompliant(false)]
- public static pb::GeneratedExtensionBase<ulong> DefaultFixed64Extension;
- public const int DefaultSfixed32ExtensionFieldNumber = 69;
- public static pb::GeneratedExtensionBase<int> DefaultSfixed32Extension;
- public const int DefaultSfixed64ExtensionFieldNumber = 70;
- public static pb::GeneratedExtensionBase<long> DefaultSfixed64Extension;
- public const int DefaultFloatExtensionFieldNumber = 71;
- public static pb::GeneratedExtensionBase<float> DefaultFloatExtension;
- public const int DefaultDoubleExtensionFieldNumber = 72;
- public static pb::GeneratedExtensionBase<double> DefaultDoubleExtension;
- public const int DefaultBoolExtensionFieldNumber = 73;
- public static pb::GeneratedExtensionBase<bool> DefaultBoolExtension;
- public const int DefaultStringExtensionFieldNumber = 74;
- public static pb::GeneratedExtensionBase<string> DefaultStringExtension;
- public const int DefaultBytesExtensionFieldNumber = 75;
- public static pb::GeneratedExtensionBase<pb::ByteString> DefaultBytesExtension;
- public const int DefaultNestedEnumExtensionFieldNumber = 81;
- public static pb::GeneratedExtensionBase<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedEnum> DefaultNestedEnumExtension;
- public const int DefaultForeignEnumExtensionFieldNumber = 82;
- public static pb::GeneratedExtensionBase<global::Google.ProtocolBuffers.TestProtos.ForeignEnum> DefaultForeignEnumExtension;
- public const int DefaultImportEnumExtensionFieldNumber = 83;
- public static pb::GeneratedExtensionBase<global::Google.ProtocolBuffers.TestProtos.ImportEnum> DefaultImportEnumExtension;
- public const int DefaultStringPieceExtensionFieldNumber = 84;
- public static pb::GeneratedExtensionBase<string> DefaultStringPieceExtension;
- public const int DefaultCordExtensionFieldNumber = 85;
- public static pb::GeneratedExtensionBase<string> DefaultCordExtension;
- public const int MyExtensionStringFieldNumber = 50;
- public static pb::GeneratedExtensionBase<string> MyExtensionString;
- public const int MyExtensionIntFieldNumber = 5;
- public static pb::GeneratedExtensionBase<int> MyExtensionInt;
- public const int PackedInt32ExtensionFieldNumber = 90;
- public static pb::GeneratedExtensionBase<scg::IList<int>> PackedInt32Extension;
- public const int PackedInt64ExtensionFieldNumber = 91;
- public static pb::GeneratedExtensionBase<scg::IList<long>> PackedInt64Extension;
- public const int PackedUint32ExtensionFieldNumber = 92;
- [global::System.CLSCompliant(false)]
- public static pb::GeneratedExtensionBase<scg::IList<uint>> PackedUint32Extension;
- public const int PackedUint64ExtensionFieldNumber = 93;
- [global::System.CLSCompliant(false)]
- public static pb::GeneratedExtensionBase<scg::IList<ulong>> PackedUint64Extension;
- public const int PackedSint32ExtensionFieldNumber = 94;
- public static pb::GeneratedExtensionBase<scg::IList<int>> PackedSint32Extension;
- public const int PackedSint64ExtensionFieldNumber = 95;
- public static pb::GeneratedExtensionBase<scg::IList<long>> PackedSint64Extension;
- public const int PackedFixed32ExtensionFieldNumber = 96;
- [global::System.CLSCompliant(false)]
- public static pb::GeneratedExtensionBase<scg::IList<uint>> PackedFixed32Extension;
- public const int PackedFixed64ExtensionFieldNumber = 97;
- [global::System.CLSCompliant(false)]
- public static pb::GeneratedExtensionBase<scg::IList<ulong>> PackedFixed64Extension;
- public const int PackedSfixed32ExtensionFieldNumber = 98;
- public static pb::GeneratedExtensionBase<scg::IList<int>> PackedSfixed32Extension;
- public const int PackedSfixed64ExtensionFieldNumber = 99;
- public static pb::GeneratedExtensionBase<scg::IList<long>> PackedSfixed64Extension;
- public const int PackedFloatExtensionFieldNumber = 100;
- public static pb::GeneratedExtensionBase<scg::IList<float>> PackedFloatExtension;
- public const int PackedDoubleExtensionFieldNumber = 101;
- public static pb::GeneratedExtensionBase<scg::IList<double>> PackedDoubleExtension;
- public const int PackedBoolExtensionFieldNumber = 102;
- public static pb::GeneratedExtensionBase<scg::IList<bool>> PackedBoolExtension;
- public const int PackedEnumExtensionFieldNumber = 103;
- public static pb::GeneratedExtensionBase<scg::IList<global::Google.ProtocolBuffers.TestProtos.ForeignEnum>> PackedEnumExtension;
- #endregion
-
- #region Static variables
- internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestAllTypes__Descriptor;
- internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestAllTypes, global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Builder> internal__static_protobuf_unittest_TestAllTypes__FieldAccessorTable;
- internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestAllTypes_NestedMessage__Descriptor;
- internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage, global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage.Builder> internal__static_protobuf_unittest_TestAllTypes_NestedMessage__FieldAccessorTable;
- internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestAllTypes_OptionalGroup__Descriptor;
- internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.OptionalGroup, global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.OptionalGroup.Builder> internal__static_protobuf_unittest_TestAllTypes_OptionalGroup__FieldAccessorTable;
- internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestAllTypes_RepeatedGroup__Descriptor;
- internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.RepeatedGroup, global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.RepeatedGroup.Builder> internal__static_protobuf_unittest_TestAllTypes_RepeatedGroup__FieldAccessorTable;
- internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestDeprecatedFields__Descriptor;
- internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestDeprecatedFields, global::Google.ProtocolBuffers.TestProtos.TestDeprecatedFields.Builder> internal__static_protobuf_unittest_TestDeprecatedFields__FieldAccessorTable;
- internal static pbd::MessageDescriptor internal__static_protobuf_unittest_ForeignMessage__Descriptor;
- internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.ForeignMessage, global::Google.ProtocolBuffers.TestProtos.ForeignMessage.Builder> internal__static_protobuf_unittest_ForeignMessage__FieldAccessorTable;
- internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestAllExtensions__Descriptor;
- internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestAllExtensions, global::Google.ProtocolBuffers.TestProtos.TestAllExtensions.Builder> internal__static_protobuf_unittest_TestAllExtensions__FieldAccessorTable;
- internal static pbd::MessageDescriptor internal__static_protobuf_unittest_OptionalGroup_extension__Descriptor;
- internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.OptionalGroup_extension, global::Google.ProtocolBuffers.TestProtos.OptionalGroup_extension.Builder> internal__static_protobuf_unittest_OptionalGroup_extension__FieldAccessorTable;
- internal static pbd::MessageDescriptor internal__static_protobuf_unittest_RepeatedGroup_extension__Descriptor;
- internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.RepeatedGroup_extension, global::Google.ProtocolBuffers.TestProtos.RepeatedGroup_extension.Builder> internal__static_protobuf_unittest_RepeatedGroup_extension__FieldAccessorTable;
- internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestNestedExtension__Descriptor;
- internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestNestedExtension, global::Google.ProtocolBuffers.TestProtos.TestNestedExtension.Builder> internal__static_protobuf_unittest_TestNestedExtension__FieldAccessorTable;
- internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestRequired__Descriptor;
- internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestRequired, global::Google.ProtocolBuffers.TestProtos.TestRequired.Builder> internal__static_protobuf_unittest_TestRequired__FieldAccessorTable;
- internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestRequiredForeign__Descriptor;
- internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestRequiredForeign, global::Google.ProtocolBuffers.TestProtos.TestRequiredForeign.Builder> internal__static_protobuf_unittest_TestRequiredForeign__FieldAccessorTable;
- internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestForeignNested__Descriptor;
- internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestForeignNested, global::Google.ProtocolBuffers.TestProtos.TestForeignNested.Builder> internal__static_protobuf_unittest_TestForeignNested__FieldAccessorTable;
- internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestEmptyMessage__Descriptor;
- internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestEmptyMessage, global::Google.ProtocolBuffers.TestProtos.TestEmptyMessage.Builder> internal__static_protobuf_unittest_TestEmptyMessage__FieldAccessorTable;
- internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestEmptyMessageWithExtensions__Descriptor;
- internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestEmptyMessageWithExtensions, global::Google.ProtocolBuffers.TestProtos.TestEmptyMessageWithExtensions.Builder> internal__static_protobuf_unittest_TestEmptyMessageWithExtensions__FieldAccessorTable;
- internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestMultipleExtensionRanges__Descriptor;
- internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestMultipleExtensionRanges, global::Google.ProtocolBuffers.TestProtos.TestMultipleExtensionRanges.Builder> internal__static_protobuf_unittest_TestMultipleExtensionRanges__FieldAccessorTable;
- internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestReallyLargeTagNumber__Descriptor;
- internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestReallyLargeTagNumber, global::Google.ProtocolBuffers.TestProtos.TestReallyLargeTagNumber.Builder> internal__static_protobuf_unittest_TestReallyLargeTagNumber__FieldAccessorTable;
- internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestRecursiveMessage__Descriptor;
- internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestRecursiveMessage, global::Google.ProtocolBuffers.TestProtos.TestRecursiveMessage.Builder> internal__static_protobuf_unittest_TestRecursiveMessage__FieldAccessorTable;
- internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestMutualRecursionA__Descriptor;
- internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestMutualRecursionA, global::Google.ProtocolBuffers.TestProtos.TestMutualRecursionA.Builder> internal__static_protobuf_unittest_TestMutualRecursionA__FieldAccessorTable;
- internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestMutualRecursionB__Descriptor;
- internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestMutualRecursionB, global::Google.ProtocolBuffers.TestProtos.TestMutualRecursionB.Builder> internal__static_protobuf_unittest_TestMutualRecursionB__FieldAccessorTable;
- internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestDupFieldNumber__Descriptor;
- internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestDupFieldNumber, global::Google.ProtocolBuffers.TestProtos.TestDupFieldNumber.Builder> internal__static_protobuf_unittest_TestDupFieldNumber__FieldAccessorTable;
- internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestDupFieldNumber_Foo__Descriptor;
- internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestDupFieldNumber.Types.Foo, global::Google.ProtocolBuffers.TestProtos.TestDupFieldNumber.Types.Foo.Builder> internal__static_protobuf_unittest_TestDupFieldNumber_Foo__FieldAccessorTable;
- internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestDupFieldNumber_Bar__Descriptor;
- internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestDupFieldNumber.Types.Bar, global::Google.ProtocolBuffers.TestProtos.TestDupFieldNumber.Types.Bar.Builder> internal__static_protobuf_unittest_TestDupFieldNumber_Bar__FieldAccessorTable;
- internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestNestedMessageHasBits__Descriptor;
- internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestNestedMessageHasBits, global::Google.ProtocolBuffers.TestProtos.TestNestedMessageHasBits.Builder> internal__static_protobuf_unittest_TestNestedMessageHasBits__FieldAccessorTable;
- internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestNestedMessageHasBits_NestedMessage__Descriptor;
- internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestNestedMessageHasBits.Types.NestedMessage, global::Google.ProtocolBuffers.TestProtos.TestNestedMessageHasBits.Types.NestedMessage.Builder> internal__static_protobuf_unittest_TestNestedMessageHasBits_NestedMessage__FieldAccessorTable;
- internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestCamelCaseFieldNames__Descriptor;
- internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestCamelCaseFieldNames, global::Google.ProtocolBuffers.TestProtos.TestCamelCaseFieldNames.Builder> internal__static_protobuf_unittest_TestCamelCaseFieldNames__FieldAccessorTable;
- internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestFieldOrderings__Descriptor;
- internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestFieldOrderings, global::Google.ProtocolBuffers.TestProtos.TestFieldOrderings.Builder> internal__static_protobuf_unittest_TestFieldOrderings__FieldAccessorTable;
- internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestExtremeDefaultValues__Descriptor;
- internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestExtremeDefaultValues, global::Google.ProtocolBuffers.TestProtos.TestExtremeDefaultValues.Builder> internal__static_protobuf_unittest_TestExtremeDefaultValues__FieldAccessorTable;
- internal static pbd::MessageDescriptor internal__static_protobuf_unittest_SparseEnumMessage__Descriptor;
- internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.SparseEnumMessage, global::Google.ProtocolBuffers.TestProtos.SparseEnumMessage.Builder> internal__static_protobuf_unittest_SparseEnumMessage__FieldAccessorTable;
- internal static pbd::MessageDescriptor internal__static_protobuf_unittest_OneString__Descriptor;
- internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.OneString, global::Google.ProtocolBuffers.TestProtos.OneString.Builder> internal__static_protobuf_unittest_OneString__FieldAccessorTable;
- internal static pbd::MessageDescriptor internal__static_protobuf_unittest_OneBytes__Descriptor;
- internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.OneBytes, global::Google.ProtocolBuffers.TestProtos.OneBytes.Builder> internal__static_protobuf_unittest_OneBytes__FieldAccessorTable;
- internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestPackedTypes__Descriptor;
- internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestPackedTypes, global::Google.ProtocolBuffers.TestProtos.TestPackedTypes.Builder> internal__static_protobuf_unittest_TestPackedTypes__FieldAccessorTable;
- internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestUnpackedTypes__Descriptor;
- internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestUnpackedTypes, global::Google.ProtocolBuffers.TestProtos.TestUnpackedTypes.Builder> internal__static_protobuf_unittest_TestUnpackedTypes__FieldAccessorTable;
- internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestPackedExtensions__Descriptor;
- internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestPackedExtensions, global::Google.ProtocolBuffers.TestProtos.TestPackedExtensions.Builder> internal__static_protobuf_unittest_TestPackedExtensions__FieldAccessorTable;
- internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestDynamicExtensions__Descriptor;
- internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestDynamicExtensions, global::Google.ProtocolBuffers.TestProtos.TestDynamicExtensions.Builder> internal__static_protobuf_unittest_TestDynamicExtensions__FieldAccessorTable;
- internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestDynamicExtensions_DynamicMessageType__Descriptor;
- internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestDynamicExtensions.Types.DynamicMessageType, global::Google.ProtocolBuffers.TestProtos.TestDynamicExtensions.Types.DynamicMessageType.Builder> internal__static_protobuf_unittest_TestDynamicExtensions_DynamicMessageType__FieldAccessorTable;
- internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestRepeatedScalarDifferentTagSizes__Descriptor;
- internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestRepeatedScalarDifferentTagSizes, global::Google.ProtocolBuffers.TestProtos.TestRepeatedScalarDifferentTagSizes.Builder> internal__static_protobuf_unittest_TestRepeatedScalarDifferentTagSizes__FieldAccessorTable;
- internal static pbd::MessageDescriptor internal__static_protobuf_unittest_FooRequest__Descriptor;
- internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.FooRequest, global::Google.ProtocolBuffers.TestProtos.FooRequest.Builder> internal__static_protobuf_unittest_FooRequest__FieldAccessorTable;
- internal static pbd::MessageDescriptor internal__static_protobuf_unittest_FooResponse__Descriptor;
- internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.FooResponse, global::Google.ProtocolBuffers.TestProtos.FooResponse.Builder> internal__static_protobuf_unittest_FooResponse__FieldAccessorTable;
- internal static pbd::MessageDescriptor internal__static_protobuf_unittest_BarRequest__Descriptor;
- internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.BarRequest, global::Google.ProtocolBuffers.TestProtos.BarRequest.Builder> internal__static_protobuf_unittest_BarRequest__FieldAccessorTable;
- internal static pbd::MessageDescriptor internal__static_protobuf_unittest_BarResponse__Descriptor;
- internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.BarResponse, global::Google.ProtocolBuffers.TestProtos.BarResponse.Builder> internal__static_protobuf_unittest_BarResponse__FieldAccessorTable;
- #endregion
- #region Descriptor
- public static pbd::FileDescriptor Descriptor {
- get { return descriptor; }
- }
- private static pbd::FileDescriptor descriptor;
-
- static UnitTestProtoFile() {
- byte[] descriptorData = global::System.Convert.FromBase64String(
- string.Concat(
- "Ch5nb29nbGUvcHJvdG9idWYvdW5pdHRlc3QucHJvdG8SEXByb3RvYnVmX3Vu",
- "aXR0ZXN0GiRnb29nbGUvcHJvdG9idWYvY3NoYXJwX29wdGlvbnMucHJvdG8a",
- "JWdvb2dsZS9wcm90b2J1Zi91bml0dGVzdF9pbXBvcnQucHJvdG8iuxUKDFRl",
- "c3RBbGxUeXBlcxIWCg5vcHRpb25hbF9pbnQzMhgBIAEoBRIWCg5vcHRpb25h",
- "bF9pbnQ2NBgCIAEoAxIXCg9vcHRpb25hbF91aW50MzIYAyABKA0SFwoPb3B0",
- "aW9uYWxfdWludDY0GAQgASgEEhcKD29wdGlvbmFsX3NpbnQzMhgFIAEoERIX",
- "Cg9vcHRpb25hbF9zaW50NjQYBiABKBISGAoQb3B0aW9uYWxfZml4ZWQzMhgH",
- "IAEoBxIYChBvcHRpb25hbF9maXhlZDY0GAggASgGEhkKEW9wdGlvbmFsX3Nm",
- "aXhlZDMyGAkgASgPEhkKEW9wdGlvbmFsX3NmaXhlZDY0GAogASgQEhYKDm9w",
- "dGlvbmFsX2Zsb2F0GAsgASgCEhcKD29wdGlvbmFsX2RvdWJsZRgMIAEoARIV",
- "Cg1vcHRpb25hbF9ib29sGA0gASgIEhcKD29wdGlvbmFsX3N0cmluZxgOIAEo",
- "CRIWCg5vcHRpb25hbF9ieXRlcxgPIAEoDBJECg1vcHRpb25hbGdyb3VwGBAg",
- "ASgKMi0ucHJvdG9idWZfdW5pdHRlc3QuVGVzdEFsbFR5cGVzLk9wdGlvbmFs",
- "R3JvdXASTgoXb3B0aW9uYWxfbmVzdGVkX21lc3NhZ2UYEiABKAsyLS5wcm90",
- "b2J1Zl91bml0dGVzdC5UZXN0QWxsVHlwZXMuTmVzdGVkTWVzc2FnZRJDChhv",
- "cHRpb25hbF9mb3JlaWduX21lc3NhZ2UYEyABKAsyIS5wcm90b2J1Zl91bml0",
- "dGVzdC5Gb3JlaWduTWVzc2FnZRJIChdvcHRpb25hbF9pbXBvcnRfbWVzc2Fn",
- "ZRgUIAEoCzInLnByb3RvYnVmX3VuaXR0ZXN0X2ltcG9ydC5JbXBvcnRNZXNz",
- "YWdlEkgKFG9wdGlvbmFsX25lc3RlZF9lbnVtGBUgASgOMioucHJvdG9idWZf",
- "dW5pdHRlc3QuVGVzdEFsbFR5cGVzLk5lc3RlZEVudW0SPQoVb3B0aW9uYWxf",
- "Zm9yZWlnbl9lbnVtGBYgASgOMh4ucHJvdG9idWZfdW5pdHRlc3QuRm9yZWln",
- "bkVudW0SQgoUb3B0aW9uYWxfaW1wb3J0X2VudW0YFyABKA4yJC5wcm90b2J1",
- "Zl91bml0dGVzdF9pbXBvcnQuSW1wb3J0RW51bRIhChVvcHRpb25hbF9zdHJp",
- "bmdfcGllY2UYGCABKAlCAggCEhkKDW9wdGlvbmFsX2NvcmQYGSABKAlCAggB",
- "EhYKDnJlcGVhdGVkX2ludDMyGB8gAygFEhYKDnJlcGVhdGVkX2ludDY0GCAg",
- "AygDEhcKD3JlcGVhdGVkX3VpbnQzMhghIAMoDRIXCg9yZXBlYXRlZF91aW50",
- "NjQYIiADKAQSFwoPcmVwZWF0ZWRfc2ludDMyGCMgAygREhcKD3JlcGVhdGVk",
- "X3NpbnQ2NBgkIAMoEhIYChByZXBlYXRlZF9maXhlZDMyGCUgAygHEhgKEHJl",
- "cGVhdGVkX2ZpeGVkNjQYJiADKAYSGQoRcmVwZWF0ZWRfc2ZpeGVkMzIYJyAD",
- "KA8SGQoRcmVwZWF0ZWRfc2ZpeGVkNjQYKCADKBASFgoOcmVwZWF0ZWRfZmxv",
- "YXQYKSADKAISFwoPcmVwZWF0ZWRfZG91YmxlGCogAygBEhUKDXJlcGVhdGVk",
- "X2Jvb2wYKyADKAgSFwoPcmVwZWF0ZWRfc3RyaW5nGCwgAygJEhYKDnJlcGVh",
- "dGVkX2J5dGVzGC0gAygMEkQKDXJlcGVhdGVkZ3JvdXAYLiADKAoyLS5wcm90",
- "b2J1Zl91bml0dGVzdC5UZXN0QWxsVHlwZXMuUmVwZWF0ZWRHcm91cBJOChdy",
- "ZXBlYXRlZF9uZXN0ZWRfbWVzc2FnZRgwIAMoCzItLnByb3RvYnVmX3VuaXR0",
- "ZXN0LlRlc3RBbGxUeXBlcy5OZXN0ZWRNZXNzYWdlEkMKGHJlcGVhdGVkX2Zv",
- "cmVpZ25fbWVzc2FnZRgxIAMoCzIhLnByb3RvYnVmX3VuaXR0ZXN0LkZvcmVp",
- "Z25NZXNzYWdlEkgKF3JlcGVhdGVkX2ltcG9ydF9tZXNzYWdlGDIgAygLMicu",
- "cHJvdG9idWZfdW5pdHRlc3RfaW1wb3J0LkltcG9ydE1lc3NhZ2USSAoUcmVw",
- "ZWF0ZWRfbmVzdGVkX2VudW0YMyADKA4yKi5wcm90b2J1Zl91bml0dGVzdC5U",
- "ZXN0QWxsVHlwZXMuTmVzdGVkRW51bRI9ChVyZXBlYXRlZF9mb3JlaWduX2Vu",
- "dW0YNCADKA4yHi5wcm90b2J1Zl91bml0dGVzdC5Gb3JlaWduRW51bRJCChRy",
- "ZXBlYXRlZF9pbXBvcnRfZW51bRg1IAMoDjIkLnByb3RvYnVmX3VuaXR0ZXN0",
- "X2ltcG9ydC5JbXBvcnRFbnVtEiEKFXJlcGVhdGVkX3N0cmluZ19waWVjZRg2",
- "IAMoCUICCAISGQoNcmVwZWF0ZWRfY29yZBg3IAMoCUICCAESGQoNZGVmYXVs",
- "dF9pbnQzMhg9IAEoBToCNDESGQoNZGVmYXVsdF9pbnQ2NBg+IAEoAzoCNDIS",
- "GgoOZGVmYXVsdF91aW50MzIYPyABKA06AjQzEhoKDmRlZmF1bHRfdWludDY0",
- "GEAgASgEOgI0NBIbCg5kZWZhdWx0X3NpbnQzMhhBIAEoEToDLTQ1EhoKDmRl",
- "ZmF1bHRfc2ludDY0GEIgASgSOgI0NhIbCg9kZWZhdWx0X2ZpeGVkMzIYQyAB",
- "KAc6AjQ3EhsKD2RlZmF1bHRfZml4ZWQ2NBhEIAEoBjoCNDgSHAoQZGVmYXVs",
- "dF9zZml4ZWQzMhhFIAEoDzoCNDkSHQoQZGVmYXVsdF9zZml4ZWQ2NBhGIAEo",
- "EDoDLTUwEhsKDWRlZmF1bHRfZmxvYXQYRyABKAI6BDUxLjUSHQoOZGVmYXVs",
- "dF9kb3VibGUYSCABKAE6BTUyMDAwEhoKDGRlZmF1bHRfYm9vbBhJIAEoCDoE",
- "dHJ1ZRIdCg5kZWZhdWx0X3N0cmluZxhKIAEoCToFaGVsbG8SHAoNZGVmYXVs",
- "dF9ieXRlcxhLIAEoDDoFd29ybGQSTAoTZGVmYXVsdF9uZXN0ZWRfZW51bRhR",
- "IAEoDjIqLnByb3RvYnVmX3VuaXR0ZXN0LlRlc3RBbGxUeXBlcy5OZXN0ZWRF",
- "bnVtOgNCQVISSQoUZGVmYXVsdF9mb3JlaWduX2VudW0YUiABKA4yHi5wcm90",
- "b2J1Zl91bml0dGVzdC5Gb3JlaWduRW51bToLRk9SRUlHTl9CQVISTQoTZGVm",
- "YXVsdF9pbXBvcnRfZW51bRhTIAEoDjIkLnByb3RvYnVmX3VuaXR0ZXN0X2lt",
- "cG9ydC5JbXBvcnRFbnVtOgpJTVBPUlRfQkFSEiUKFGRlZmF1bHRfc3RyaW5n",
- "X3BpZWNlGFQgASgJOgNhYmNCAggCEh0KDGRlZmF1bHRfY29yZBhVIAEoCToD",
- "MTIzQgIIARobCg1OZXN0ZWRNZXNzYWdlEgoKAmJiGAEgASgFGhoKDU9wdGlv",
- "bmFsR3JvdXASCQoBYRgRIAEoBRoaCg1SZXBlYXRlZEdyb3VwEgkKAWEYLyAB",
- "KAUiJwoKTmVzdGVkRW51bRIHCgNGT08QARIHCgNCQVIQAhIHCgNCQVoQAyI0",
- "ChRUZXN0RGVwcmVjYXRlZEZpZWxkcxIcChBkZXByZWNhdGVkX2ludDMyGAEg",
- "ASgFQgIYASIbCg5Gb3JlaWduTWVzc2FnZRIJCgFjGAEgASgFIh0KEVRlc3RB",
- "bGxFeHRlbnNpb25zKggIARCAgICAAiIkChdPcHRpb25hbEdyb3VwX2V4dGVu",
- "c2lvbhIJCgFhGBEgASgFIiQKF1JlcGVhdGVkR3JvdXBfZXh0ZW5zaW9uEgkK",
- "AWEYLyABKAUiUAoTVGVzdE5lc3RlZEV4dGVuc2lvbjI5CgR0ZXN0EiQucHJv",
- "dG9idWZfdW5pdHRlc3QuVGVzdEFsbEV4dGVuc2lvbnMY6gcgASgJOgR0ZXN0",
- "ItUFCgxUZXN0UmVxdWlyZWQSCQoBYRgBIAIoBRIOCgZkdW1teTIYAiABKAUS",
- "CQoBYhgDIAIoBRIOCgZkdW1teTQYBCABKAUSDgoGZHVtbXk1GAUgASgFEg4K",
- "BmR1bW15NhgGIAEoBRIOCgZkdW1teTcYByABKAUSDgoGZHVtbXk4GAggASgF",
- "Eg4KBmR1bW15ORgJIAEoBRIPCgdkdW1teTEwGAogASgFEg8KB2R1bW15MTEY",
- "CyABKAUSDwoHZHVtbXkxMhgMIAEoBRIPCgdkdW1teTEzGA0gASgFEg8KB2R1",
- "bW15MTQYDiABKAUSDwoHZHVtbXkxNRgPIAEoBRIPCgdkdW1teTE2GBAgASgF",
- "Eg8KB2R1bW15MTcYESABKAUSDwoHZHVtbXkxOBgSIAEoBRIPCgdkdW1teTE5",
- "GBMgASgFEg8KB2R1bW15MjAYFCABKAUSDwoHZHVtbXkyMRgVIAEoBRIPCgdk",
- "dW1teTIyGBYgASgFEg8KB2R1bW15MjMYFyABKAUSDwoHZHVtbXkyNBgYIAEo",
- "BRIPCgdkdW1teTI1GBkgASgFEg8KB2R1bW15MjYYGiABKAUSDwoHZHVtbXky",
- "NxgbIAEoBRIPCgdkdW1teTI4GBwgASgFEg8KB2R1bW15MjkYHSABKAUSDwoH",
- "ZHVtbXkzMBgeIAEoBRIPCgdkdW1teTMxGB8gASgFEg8KB2R1bW15MzIYICAB",
- "KAUSCQoBYxghIAIoBTJWCgZzaW5nbGUSJC5wcm90b2J1Zl91bml0dGVzdC5U",
- "ZXN0QWxsRXh0ZW5zaW9ucxjoByABKAsyHy5wcm90b2J1Zl91bml0dGVzdC5U",
- "ZXN0UmVxdWlyZWQyVQoFbXVsdGkSJC5wcm90b2J1Zl91bml0dGVzdC5UZXN0",
- "QWxsRXh0ZW5zaW9ucxjpByADKAsyHy5wcm90b2J1Zl91bml0dGVzdC5UZXN0",
- "UmVxdWlyZWQimgEKE1Rlc3RSZXF1aXJlZEZvcmVpZ24SOQoQb3B0aW9uYWxf",
- "bWVzc2FnZRgBIAEoCzIfLnByb3RvYnVmX3VuaXR0ZXN0LlRlc3RSZXF1aXJl",
- "ZBI5ChByZXBlYXRlZF9tZXNzYWdlGAIgAygLMh8ucHJvdG9idWZfdW5pdHRl",
- "c3QuVGVzdFJlcXVpcmVkEg0KBWR1bW15GAMgASgFIloKEVRlc3RGb3JlaWdu",
- "TmVzdGVkEkUKDmZvcmVpZ25fbmVzdGVkGAEgASgLMi0ucHJvdG9idWZfdW5p",
- "dHRlc3QuVGVzdEFsbFR5cGVzLk5lc3RlZE1lc3NhZ2UiEgoQVGVzdEVtcHR5",
- "TWVzc2FnZSIqCh5UZXN0RW1wdHlNZXNzYWdlV2l0aEV4dGVuc2lvbnMqCAgB",
- "EICAgIACIjcKG1Rlc3RNdWx0aXBsZUV4dGVuc2lvblJhbmdlcyoECCoQKyoG",
- "CK8gEJQhKgoIgIAEEICAgIACIjQKGFRlc3RSZWFsbHlMYXJnZVRhZ051bWJl",
- "chIJCgFhGAEgASgFEg0KAmJiGP///38gASgFIlUKFFRlc3RSZWN1cnNpdmVN",
- "ZXNzYWdlEjIKAWEYASABKAsyJy5wcm90b2J1Zl91bml0dGVzdC5UZXN0UmVj",
- "dXJzaXZlTWVzc2FnZRIJCgFpGAIgASgFIksKFFRlc3RNdXR1YWxSZWN1cnNp",
- "b25BEjMKAmJiGAEgASgLMicucHJvdG9idWZfdW5pdHRlc3QuVGVzdE11dHVh",
- "bFJlY3Vyc2lvbkIiYgoUVGVzdE11dHVhbFJlY3Vyc2lvbkISMgoBYRgBIAEo",
- "CzInLnByb3RvYnVmX3VuaXR0ZXN0LlRlc3RNdXR1YWxSZWN1cnNpb25BEhYK",
- "Dm9wdGlvbmFsX2ludDMyGAIgASgFIrMBChJUZXN0RHVwRmllbGROdW1iZXIS",
- "CQoBYRgBIAEoBRI2CgNmb28YAiABKAoyKS5wcm90b2J1Zl91bml0dGVzdC5U",
- "ZXN0RHVwRmllbGROdW1iZXIuRm9vEjYKA2JhchgDIAEoCjIpLnByb3RvYnVm",
- "X3VuaXR0ZXN0LlRlc3REdXBGaWVsZE51bWJlci5CYXIaEAoDRm9vEgkKAWEY",
- "ASABKAUaEAoDQmFyEgkKAWEYASABKAUigAIKGFRlc3ROZXN0ZWRNZXNzYWdl",
- "SGFzQml0cxJaChdvcHRpb25hbF9uZXN0ZWRfbWVzc2FnZRgBIAEoCzI5LnBy",
- "b3RvYnVmX3VuaXR0ZXN0LlRlc3ROZXN0ZWRNZXNzYWdlSGFzQml0cy5OZXN0",
- "ZWRNZXNzYWdlGocBCg1OZXN0ZWRNZXNzYWdlEiQKHG5lc3RlZG1lc3NhZ2Vf",
- "cmVwZWF0ZWRfaW50MzIYASADKAUSUAolbmVzdGVkbWVzc2FnZV9yZXBlYXRl",
- "ZF9mb3JlaWdubWVzc2FnZRgCIAMoCzIhLnByb3RvYnVmX3VuaXR0ZXN0LkZv",
- "cmVpZ25NZXNzYWdlIuUDChdUZXN0Q2FtZWxDYXNlRmllbGROYW1lcxIWCg5Q",
- "cmltaXRpdmVGaWVsZBgBIAEoBRITCgtTdHJpbmdGaWVsZBgCIAEoCRIxCglF",
- "bnVtRmllbGQYAyABKA4yHi5wcm90b2J1Zl91bml0dGVzdC5Gb3JlaWduRW51",
- "bRI3CgxNZXNzYWdlRmllbGQYBCABKAsyIS5wcm90b2J1Zl91bml0dGVzdC5G",
- "b3JlaWduTWVzc2FnZRIcChBTdHJpbmdQaWVjZUZpZWxkGAUgASgJQgIIAhIV",
- "CglDb3JkRmllbGQYBiABKAlCAggBEh4KFlJlcGVhdGVkUHJpbWl0aXZlRmll",
- "bGQYByADKAUSGwoTUmVwZWF0ZWRTdHJpbmdGaWVsZBgIIAMoCRI5ChFSZXBl",
- "YXRlZEVudW1GaWVsZBgJIAMoDjIeLnByb3RvYnVmX3VuaXR0ZXN0LkZvcmVp",
- "Z25FbnVtEj8KFFJlcGVhdGVkTWVzc2FnZUZpZWxkGAogAygLMiEucHJvdG9i",
- "dWZfdW5pdHRlc3QuRm9yZWlnbk1lc3NhZ2USJAoYUmVwZWF0ZWRTdHJpbmdQ",
- "aWVjZUZpZWxkGAsgAygJQgIIAhIdChFSZXBlYXRlZENvcmRGaWVsZBgMIAMo",
- "CUICCAEiVQoSVGVzdEZpZWxkT3JkZXJpbmdzEhEKCW15X3N0cmluZxgLIAEo",
- "CRIOCgZteV9pbnQYASABKAMSEAoIbXlfZmxvYXQYZSABKAIqBAgCEAsqBAgM",
- "EGUiowUKGFRlc3RFeHRyZW1lRGVmYXVsdFZhbHVlcxI/Cg1lc2NhcGVkX2J5",
- "dGVzGAEgASgMOihcMDAwXDAwMVwwMDdcMDEwXDAxNFxuXHJcdFwwMTNcXFwn",
- "XCJcMzc2EiAKDGxhcmdlX3VpbnQzMhgCIAEoDToKNDI5NDk2NzI5NRIqCgxs",
- "YXJnZV91aW50NjQYAyABKAQ6FDE4NDQ2NzQ0MDczNzA5NTUxNjE1EiAKC3Nt",
- "YWxsX2ludDMyGAQgASgFOgstMjE0NzQ4MzY0NxIpCgtzbWFsbF9pbnQ2NBgF",
- "IAEoAzoULTkyMjMzNzIwMzY4NTQ3NzU4MDcSGAoLdXRmOF9zdHJpbmcYBiAB",
- "KAk6A+GItBIVCgp6ZXJvX2Zsb2F0GAcgASgCOgEwEhQKCW9uZV9mbG9hdBgI",
- "IAEoAjoBMRIYCgtzbWFsbF9mbG9hdBgJIAEoAjoDMS41Eh4KEm5lZ2F0aXZl",
- "X29uZV9mbG9hdBgKIAEoAjoCLTESHAoObmVnYXRpdmVfZmxvYXQYCyABKAI6",
- "BC0xLjUSGwoLbGFyZ2VfZmxvYXQYDCABKAI6BjJlKzAwOBIlChRzbWFsbF9u",
- "ZWdhdGl2ZV9mbG9hdBgNIAEoAjoHLThlLTAyOBIXCgppbmZfZG91YmxlGA4g",
- "ASgBOgNpbmYSHAoObmVnX2luZl9kb3VibGUYDyABKAE6BC1pbmYSFwoKbmFu",
- "X2RvdWJsZRgQIAEoAToDbmFuEhYKCWluZl9mbG9hdBgRIAEoAjoDaW5mEhsK",
- "DW5lZ19pbmZfZmxvYXQYEiABKAI6BC1pbmYSFgoJbmFuX2Zsb2F0GBMgASgC",
- "OgNuYW4SKwoMY3BwX3RyaWdyYXBoGBQgASgJOhU/ID8gPz8gPz8gPz8/ID8/",
- "LyA/Py0iSwoRU3BhcnNlRW51bU1lc3NhZ2USNgoLc3BhcnNlX2VudW0YASAB",
- "KA4yIS5wcm90b2J1Zl91bml0dGVzdC5UZXN0U3BhcnNlRW51bSIZCglPbmVT",
- "dHJpbmcSDAoEZGF0YRgBIAEoCSIYCghPbmVCeXRlcxIMCgRkYXRhGAEgASgM",
- "IqoDCg9UZXN0UGFja2VkVHlwZXMSGAoMcGFja2VkX2ludDMyGFogAygFQgIQ",
- "ARIYCgxwYWNrZWRfaW50NjQYWyADKANCAhABEhkKDXBhY2tlZF91aW50MzIY",
- "XCADKA1CAhABEhkKDXBhY2tlZF91aW50NjQYXSADKARCAhABEhkKDXBhY2tl",
- "ZF9zaW50MzIYXiADKBFCAhABEhkKDXBhY2tlZF9zaW50NjQYXyADKBJCAhAB",
- "EhoKDnBhY2tlZF9maXhlZDMyGGAgAygHQgIQARIaCg5wYWNrZWRfZml4ZWQ2",
- "NBhhIAMoBkICEAESGwoPcGFja2VkX3NmaXhlZDMyGGIgAygPQgIQARIbCg9w",
- "YWNrZWRfc2ZpeGVkNjQYYyADKBBCAhABEhgKDHBhY2tlZF9mbG9hdBhkIAMo",
- "AkICEAESGQoNcGFja2VkX2RvdWJsZRhlIAMoAUICEAESFwoLcGFja2VkX2Jv",
- "b2wYZiADKAhCAhABEjcKC3BhY2tlZF9lbnVtGGcgAygOMh4ucHJvdG9idWZf",
- "dW5pdHRlc3QuRm9yZWlnbkVudW1CAhABIsgDChFUZXN0VW5wYWNrZWRUeXBl",
- "cxIaCg51bnBhY2tlZF9pbnQzMhhaIAMoBUICEAASGgoOdW5wYWNrZWRfaW50",
- "NjQYWyADKANCAhAAEhsKD3VucGFja2VkX3VpbnQzMhhcIAMoDUICEAASGwoP",
- "dW5wYWNrZWRfdWludDY0GF0gAygEQgIQABIbCg91bnBhY2tlZF9zaW50MzIY",
- "XiADKBFCAhAAEhsKD3VucGFja2VkX3NpbnQ2NBhfIAMoEkICEAASHAoQdW5w",
- "YWNrZWRfZml4ZWQzMhhgIAMoB0ICEAASHAoQdW5wYWNrZWRfZml4ZWQ2NBhh",
- "IAMoBkICEAASHQoRdW5wYWNrZWRfc2ZpeGVkMzIYYiADKA9CAhAAEh0KEXVu",
- "cGFja2VkX3NmaXhlZDY0GGMgAygQQgIQABIaCg51bnBhY2tlZF9mbG9hdBhk",
- "IAMoAkICEAASGwoPdW5wYWNrZWRfZG91YmxlGGUgAygBQgIQABIZCg11bnBh",
- "Y2tlZF9ib29sGGYgAygIQgIQABI5Cg11bnBhY2tlZF9lbnVtGGcgAygOMh4u",
- "cHJvdG9idWZfdW5pdHRlc3QuRm9yZWlnbkVudW1CAhAAIiAKFFRlc3RQYWNr",
- "ZWRFeHRlbnNpb25zKggIARCAgICAAiKZBAoVVGVzdER5bmFtaWNFeHRlbnNp",
- "b25zEhkKEHNjYWxhcl9leHRlbnNpb24Y0A8gASgHEjcKDmVudW1fZXh0ZW5z",
- "aW9uGNEPIAEoDjIeLnByb3RvYnVmX3VuaXR0ZXN0LkZvcmVpZ25FbnVtElkK",
- "FmR5bmFtaWNfZW51bV9leHRlbnNpb24Y0g8gASgOMjgucHJvdG9idWZfdW5p",
- "dHRlc3QuVGVzdER5bmFtaWNFeHRlbnNpb25zLkR5bmFtaWNFbnVtVHlwZRI9",
- "ChFtZXNzYWdlX2V4dGVuc2lvbhjTDyABKAsyIS5wcm90b2J1Zl91bml0dGVz",
- "dC5Gb3JlaWduTWVzc2FnZRJfChlkeW5hbWljX21lc3NhZ2VfZXh0ZW5zaW9u",
- "GNQPIAEoCzI7LnByb3RvYnVmX3VuaXR0ZXN0LlRlc3REeW5hbWljRXh0ZW5z",
- "aW9ucy5EeW5hbWljTWVzc2FnZVR5cGUSGwoScmVwZWF0ZWRfZXh0ZW5zaW9u",
- "GNUPIAMoCRIdChBwYWNrZWRfZXh0ZW5zaW9uGNYPIAMoEUICEAEaLAoSRHlu",
- "YW1pY01lc3NhZ2VUeXBlEhYKDWR5bmFtaWNfZmllbGQYtBAgASgFIkcKD0R5",
- "bmFtaWNFbnVtVHlwZRIQCgtEWU5BTUlDX0ZPTxCYERIQCgtEWU5BTUlDX0JB",
- "UhCZERIQCgtEWU5BTUlDX0JBWhCaESLAAQojVGVzdFJlcGVhdGVkU2NhbGFy",
- "RGlmZmVyZW50VGFnU2l6ZXMSGAoQcmVwZWF0ZWRfZml4ZWQzMhgMIAMoBxIW",
- "Cg5yZXBlYXRlZF9pbnQzMhgNIAMoBRIZChByZXBlYXRlZF9maXhlZDY0GP4P",
- "IAMoBhIXCg5yZXBlYXRlZF9pbnQ2NBj/DyADKAMSGAoOcmVwZWF0ZWRfZmxv",
- "YXQY/v8PIAMoAhIZCg9yZXBlYXRlZF91aW50NjQY//8PIAMoBCIMCgpGb29S",
- "ZXF1ZXN0Ig0KC0Zvb1Jlc3BvbnNlIgwKCkJhclJlcXVlc3QiDQoLQmFyUmVz",
- "cG9uc2UqQAoLRm9yZWlnbkVudW0SDwoLRk9SRUlHTl9GT08QBBIPCgtGT1JF",
- "SUdOX0JBUhAFEg8KC0ZPUkVJR05fQkFaEAYqRwoUVGVzdEVudW1XaXRoRHVw",
- "VmFsdWUSCAoERk9PMRABEggKBEJBUjEQAhIHCgNCQVoQAxIICgRGT08yEAES",
- "CAoEQkFSMhACKokBCg5UZXN0U3BhcnNlRW51bRIMCghTUEFSU0VfQRB7Eg4K",
- "CFNQQVJTRV9CEKbnAxIPCghTUEFSU0VfQxCysYAGEhUKCFNQQVJTRV9EEPH/",
- "/////////wESFQoIU1BBUlNFX0UQtN78////////ARIMCghTUEFSU0VfRhAA",
- "EgwKCFNQQVJTRV9HEAIymQEKC1Rlc3RTZXJ2aWNlEkQKA0ZvbxIdLnByb3Rv",
- "YnVmX3VuaXR0ZXN0LkZvb1JlcXVlc3QaHi5wcm90b2J1Zl91bml0dGVzdC5G",
- "b29SZXNwb25zZRJECgNCYXISHS5wcm90b2J1Zl91bml0dGVzdC5CYXJSZXF1",
- "ZXN0Gh4ucHJvdG9idWZfdW5pdHRlc3QuQmFyUmVzcG9uc2U6RgoYb3B0aW9u",
- "YWxfaW50MzJfZXh0ZW5zaW9uEiQucHJvdG9idWZfdW5pdHRlc3QuVGVzdEFs",
- "bEV4dGVuc2lvbnMYASABKAU6RgoYb3B0aW9uYWxfaW50NjRfZXh0ZW5zaW9u",
- "EiQucHJvdG9idWZfdW5pdHRlc3QuVGVzdEFsbEV4dGVuc2lvbnMYAiABKAM6",
- "RwoZb3B0aW9uYWxfdWludDMyX2V4dGVuc2lvbhIkLnByb3RvYnVmX3VuaXR0",
- "ZXN0LlRlc3RBbGxFeHRlbnNpb25zGAMgASgNOkcKGW9wdGlvbmFsX3VpbnQ2",
- "NF9leHRlbnNpb24SJC5wcm90b2J1Zl91bml0dGVzdC5UZXN0QWxsRXh0ZW5z",
- "aW9ucxgEIAEoBDpHChlvcHRpb25hbF9zaW50MzJfZXh0ZW5zaW9uEiQucHJv",
- "dG9idWZfdW5pdHRlc3QuVGVzdEFsbEV4dGVuc2lvbnMYBSABKBE6RwoZb3B0",
- "aW9uYWxfc2ludDY0X2V4dGVuc2lvbhIkLnByb3RvYnVmX3VuaXR0ZXN0LlRl",
- "c3RBbGxFeHRlbnNpb25zGAYgASgSOkgKGm9wdGlvbmFsX2ZpeGVkMzJfZXh0",
- "ZW5zaW9uEiQucHJvdG9idWZfdW5pdHRlc3QuVGVzdEFsbEV4dGVuc2lvbnMY",
- "ByABKAc6SAoab3B0aW9uYWxfZml4ZWQ2NF9leHRlbnNpb24SJC5wcm90b2J1",
- "Zl91bml0dGVzdC5UZXN0QWxsRXh0ZW5zaW9ucxgIIAEoBjpJChtvcHRpb25h",
- "bF9zZml4ZWQzMl9leHRlbnNpb24SJC5wcm90b2J1Zl91bml0dGVzdC5UZXN0",
- "QWxsRXh0ZW5zaW9ucxgJIAEoDzpJChtvcHRpb25hbF9zZml4ZWQ2NF9leHRl",
- "bnNpb24SJC5wcm90b2J1Zl91bml0dGVzdC5UZXN0QWxsRXh0ZW5zaW9ucxgK",
- "IAEoEDpGChhvcHRpb25hbF9mbG9hdF9leHRlbnNpb24SJC5wcm90b2J1Zl91",
- "bml0dGVzdC5UZXN0QWxsRXh0ZW5zaW9ucxgLIAEoAjpHChlvcHRpb25hbF9k",
- "b3VibGVfZXh0ZW5zaW9uEiQucHJvdG9idWZfdW5pdHRlc3QuVGVzdEFsbEV4",
- "dGVuc2lvbnMYDCABKAE6RQoXb3B0aW9uYWxfYm9vbF9leHRlbnNpb24SJC5w",
- "cm90b2J1Zl91bml0dGVzdC5UZXN0QWxsRXh0ZW5zaW9ucxgNIAEoCDpHChlv",
- "cHRpb25hbF9zdHJpbmdfZXh0ZW5zaW9uEiQucHJvdG9idWZfdW5pdHRlc3Qu",
- "VGVzdEFsbEV4dGVuc2lvbnMYDiABKAk6RgoYb3B0aW9uYWxfYnl0ZXNfZXh0",
- "ZW5zaW9uEiQucHJvdG9idWZfdW5pdHRlc3QuVGVzdEFsbEV4dGVuc2lvbnMY",
- "DyABKAw6cQoXb3B0aW9uYWxncm91cF9leHRlbnNpb24SJC5wcm90b2J1Zl91",
- "bml0dGVzdC5UZXN0QWxsRXh0ZW5zaW9ucxgQIAEoCjIqLnByb3RvYnVmX3Vu",
- "aXR0ZXN0Lk9wdGlvbmFsR3JvdXBfZXh0ZW5zaW9uOn4KIW9wdGlvbmFsX25l",
- "c3RlZF9tZXNzYWdlX2V4dGVuc2lvbhIkLnByb3RvYnVmX3VuaXR0ZXN0LlRl",
- "c3RBbGxFeHRlbnNpb25zGBIgASgLMi0ucHJvdG9idWZfdW5pdHRlc3QuVGVz",
- "dEFsbFR5cGVzLk5lc3RlZE1lc3NhZ2U6cwoib3B0aW9uYWxfZm9yZWlnbl9t",
- "ZXNzYWdlX2V4dGVuc2lvbhIkLnByb3RvYnVmX3VuaXR0ZXN0LlRlc3RBbGxF",
- "eHRlbnNpb25zGBMgASgLMiEucHJvdG9idWZfdW5pdHRlc3QuRm9yZWlnbk1l",
- "c3NhZ2U6eAohb3B0aW9uYWxfaW1wb3J0X21lc3NhZ2VfZXh0ZW5zaW9uEiQu",
- "cHJvdG9idWZfdW5pdHRlc3QuVGVzdEFsbEV4dGVuc2lvbnMYFCABKAsyJy5w",
- "cm90b2J1Zl91bml0dGVzdF9pbXBvcnQuSW1wb3J0TWVzc2FnZTp4Ch5vcHRp",
- "b25hbF9uZXN0ZWRfZW51bV9leHRlbnNpb24SJC5wcm90b2J1Zl91bml0dGVz",
- "dC5UZXN0QWxsRXh0ZW5zaW9ucxgVIAEoDjIqLnByb3RvYnVmX3VuaXR0ZXN0",
- "LlRlc3RBbGxUeXBlcy5OZXN0ZWRFbnVtOm0KH29wdGlvbmFsX2ZvcmVpZ25f",
- "ZW51bV9leHRlbnNpb24SJC5wcm90b2J1Zl91bml0dGVzdC5UZXN0QWxsRXh0",
- "ZW5zaW9ucxgWIAEoDjIeLnByb3RvYnVmX3VuaXR0ZXN0LkZvcmVpZ25FbnVt",
- "OnIKHm9wdGlvbmFsX2ltcG9ydF9lbnVtX2V4dGVuc2lvbhIkLnByb3RvYnVm",
- "X3VuaXR0ZXN0LlRlc3RBbGxFeHRlbnNpb25zGBcgASgOMiQucHJvdG9idWZf",
- "dW5pdHRlc3RfaW1wb3J0LkltcG9ydEVudW06UQofb3B0aW9uYWxfc3RyaW5n",
- "X3BpZWNlX2V4dGVuc2lvbhIkLnByb3RvYnVmX3VuaXR0ZXN0LlRlc3RBbGxF",
- "eHRlbnNpb25zGBggASgJQgIIAjpJChdvcHRpb25hbF9jb3JkX2V4dGVuc2lv",
- "bhIkLnByb3RvYnVmX3VuaXR0ZXN0LlRlc3RBbGxFeHRlbnNpb25zGBkgASgJ",
- "QgIIATpGChhyZXBlYXRlZF9pbnQzMl9leHRlbnNpb24SJC5wcm90b2J1Zl91",
- "bml0dGVzdC5UZXN0QWxsRXh0ZW5zaW9ucxgfIAMoBTpGChhyZXBlYXRlZF9p",
- "bnQ2NF9leHRlbnNpb24SJC5wcm90b2J1Zl91bml0dGVzdC5UZXN0QWxsRXh0",
- "ZW5zaW9ucxggIAMoAzpHChlyZXBlYXRlZF91aW50MzJfZXh0ZW5zaW9uEiQu",
- "cHJvdG9idWZfdW5pdHRlc3QuVGVzdEFsbEV4dGVuc2lvbnMYISADKA06RwoZ",
- "cmVwZWF0ZWRfdWludDY0X2V4dGVuc2lvbhIkLnByb3RvYnVmX3VuaXR0ZXN0",
- "LlRlc3RBbGxFeHRlbnNpb25zGCIgAygEOkcKGXJlcGVhdGVkX3NpbnQzMl9l",
- "eHRlbnNpb24SJC5wcm90b2J1Zl91bml0dGVzdC5UZXN0QWxsRXh0ZW5zaW9u",
- "cxgjIAMoETpHChlyZXBlYXRlZF9zaW50NjRfZXh0ZW5zaW9uEiQucHJvdG9i",
- "dWZfdW5pdHRlc3QuVGVzdEFsbEV4dGVuc2lvbnMYJCADKBI6SAoacmVwZWF0",
- "ZWRfZml4ZWQzMl9leHRlbnNpb24SJC5wcm90b2J1Zl91bml0dGVzdC5UZXN0",
- "QWxsRXh0ZW5zaW9ucxglIAMoBzpIChpyZXBlYXRlZF9maXhlZDY0X2V4dGVu",
- "c2lvbhIkLnByb3RvYnVmX3VuaXR0ZXN0LlRlc3RBbGxFeHRlbnNpb25zGCYg",
- "AygGOkkKG3JlcGVhdGVkX3NmaXhlZDMyX2V4dGVuc2lvbhIkLnByb3RvYnVm",
- "X3VuaXR0ZXN0LlRlc3RBbGxFeHRlbnNpb25zGCcgAygPOkkKG3JlcGVhdGVk",
- "X3NmaXhlZDY0X2V4dGVuc2lvbhIkLnByb3RvYnVmX3VuaXR0ZXN0LlRlc3RB",
- "bGxFeHRlbnNpb25zGCggAygQOkYKGHJlcGVhdGVkX2Zsb2F0X2V4dGVuc2lv",
- "bhIkLnByb3RvYnVmX3VuaXR0ZXN0LlRlc3RBbGxFeHRlbnNpb25zGCkgAygC",
- "OkcKGXJlcGVhdGVkX2RvdWJsZV9leHRlbnNpb24SJC5wcm90b2J1Zl91bml0",
- "dGVzdC5UZXN0QWxsRXh0ZW5zaW9ucxgqIAMoATpFChdyZXBlYXRlZF9ib29s",
- "X2V4dGVuc2lvbhIkLnByb3RvYnVmX3VuaXR0ZXN0LlRlc3RBbGxFeHRlbnNp",
- "b25zGCsgAygIOkcKGXJlcGVhdGVkX3N0cmluZ19leHRlbnNpb24SJC5wcm90",
- "b2J1Zl91bml0dGVzdC5UZXN0QWxsRXh0ZW5zaW9ucxgsIAMoCTpGChhyZXBl",
- "YXRlZF9ieXRlc19leHRlbnNpb24SJC5wcm90b2J1Zl91bml0dGVzdC5UZXN0",
- "QWxsRXh0ZW5zaW9ucxgtIAMoDDpxChdyZXBlYXRlZGdyb3VwX2V4dGVuc2lv",
- "bhIkLnByb3RvYnVmX3VuaXR0ZXN0LlRlc3RBbGxFeHRlbnNpb25zGC4gAygK",
- "MioucHJvdG9idWZfdW5pdHRlc3QuUmVwZWF0ZWRHcm91cF9leHRlbnNpb246",
- "fgohcmVwZWF0ZWRfbmVzdGVkX21lc3NhZ2VfZXh0ZW5zaW9uEiQucHJvdG9i",
- "dWZfdW5pdHRlc3QuVGVzdEFsbEV4dGVuc2lvbnMYMCADKAsyLS5wcm90b2J1",
- "Zl91bml0dGVzdC5UZXN0QWxsVHlwZXMuTmVzdGVkTWVzc2FnZTpzCiJyZXBl",
- "YXRlZF9mb3JlaWduX21lc3NhZ2VfZXh0ZW5zaW9uEiQucHJvdG9idWZfdW5p",
- "dHRlc3QuVGVzdEFsbEV4dGVuc2lvbnMYMSADKAsyIS5wcm90b2J1Zl91bml0",
- "dGVzdC5Gb3JlaWduTWVzc2FnZTp4CiFyZXBlYXRlZF9pbXBvcnRfbWVzc2Fn",
- "ZV9leHRlbnNpb24SJC5wcm90b2J1Zl91bml0dGVzdC5UZXN0QWxsRXh0ZW5z",
- "aW9ucxgyIAMoCzInLnByb3RvYnVmX3VuaXR0ZXN0X2ltcG9ydC5JbXBvcnRN",
- "ZXNzYWdlOngKHnJlcGVhdGVkX25lc3RlZF9lbnVtX2V4dGVuc2lvbhIkLnBy",
- "b3RvYnVmX3VuaXR0ZXN0LlRlc3RBbGxFeHRlbnNpb25zGDMgAygOMioucHJv",
- "dG9idWZfdW5pdHRlc3QuVGVzdEFsbFR5cGVzLk5lc3RlZEVudW06bQofcmVw",
- "ZWF0ZWRfZm9yZWlnbl9lbnVtX2V4dGVuc2lvbhIkLnByb3RvYnVmX3VuaXR0",
- "ZXN0LlRlc3RBbGxFeHRlbnNpb25zGDQgAygOMh4ucHJvdG9idWZfdW5pdHRl",
- "c3QuRm9yZWlnbkVudW06cgoecmVwZWF0ZWRfaW1wb3J0X2VudW1fZXh0ZW5z",
- "aW9uEiQucHJvdG9idWZfdW5pdHRlc3QuVGVzdEFsbEV4dGVuc2lvbnMYNSAD",
- "KA4yJC5wcm90b2J1Zl91bml0dGVzdF9pbXBvcnQuSW1wb3J0RW51bTpRCh9y",
- "ZXBlYXRlZF9zdHJpbmdfcGllY2VfZXh0ZW5zaW9uEiQucHJvdG9idWZfdW5p",
- "dHRlc3QuVGVzdEFsbEV4dGVuc2lvbnMYNiADKAlCAggCOkkKF3JlcGVhdGVk",
- "X2NvcmRfZXh0ZW5zaW9uEiQucHJvdG9idWZfdW5pdHRlc3QuVGVzdEFsbEV4",
- "dGVuc2lvbnMYNyADKAlCAggBOkkKF2RlZmF1bHRfaW50MzJfZXh0ZW5zaW9u",
- "EiQucHJvdG9idWZfdW5pdHRlc3QuVGVzdEFsbEV4dGVuc2lvbnMYPSABKAU6",
- "AjQxOkkKF2RlZmF1bHRfaW50NjRfZXh0ZW5zaW9uEiQucHJvdG9idWZfdW5p",
- "dHRlc3QuVGVzdEFsbEV4dGVuc2lvbnMYPiABKAM6AjQyOkoKGGRlZmF1bHRf",
- "dWludDMyX2V4dGVuc2lvbhIkLnByb3RvYnVmX3VuaXR0ZXN0LlRlc3RBbGxF",
- "eHRlbnNpb25zGD8gASgNOgI0MzpKChhkZWZhdWx0X3VpbnQ2NF9leHRlbnNp",
- "b24SJC5wcm90b2J1Zl91bml0dGVzdC5UZXN0QWxsRXh0ZW5zaW9ucxhAIAEo",
- "BDoCNDQ6SwoYZGVmYXVsdF9zaW50MzJfZXh0ZW5zaW9uEiQucHJvdG9idWZf",
- "dW5pdHRlc3QuVGVzdEFsbEV4dGVuc2lvbnMYQSABKBE6Ay00NTpKChhkZWZh",
- "dWx0X3NpbnQ2NF9leHRlbnNpb24SJC5wcm90b2J1Zl91bml0dGVzdC5UZXN0",
- "QWxsRXh0ZW5zaW9ucxhCIAEoEjoCNDY6SwoZZGVmYXVsdF9maXhlZDMyX2V4",
- "dGVuc2lvbhIkLnByb3RvYnVmX3VuaXR0ZXN0LlRlc3RBbGxFeHRlbnNpb25z",
- "GEMgASgHOgI0NzpLChlkZWZhdWx0X2ZpeGVkNjRfZXh0ZW5zaW9uEiQucHJv",
- "dG9idWZfdW5pdHRlc3QuVGVzdEFsbEV4dGVuc2lvbnMYRCABKAY6AjQ4OkwK",
- "GmRlZmF1bHRfc2ZpeGVkMzJfZXh0ZW5zaW9uEiQucHJvdG9idWZfdW5pdHRl",
- "c3QuVGVzdEFsbEV4dGVuc2lvbnMYRSABKA86AjQ5Ok0KGmRlZmF1bHRfc2Zp",
- "eGVkNjRfZXh0ZW5zaW9uEiQucHJvdG9idWZfdW5pdHRlc3QuVGVzdEFsbEV4",
- "dGVuc2lvbnMYRiABKBA6Ay01MDpLChdkZWZhdWx0X2Zsb2F0X2V4dGVuc2lv",
- "bhIkLnByb3RvYnVmX3VuaXR0ZXN0LlRlc3RBbGxFeHRlbnNpb25zGEcgASgC",
- "OgQ1MS41Ok0KGGRlZmF1bHRfZG91YmxlX2V4dGVuc2lvbhIkLnByb3RvYnVm",
- "X3VuaXR0ZXN0LlRlc3RBbGxFeHRlbnNpb25zGEggASgBOgU1MjAwMDpKChZk",
- "ZWZhdWx0X2Jvb2xfZXh0ZW5zaW9uEiQucHJvdG9idWZfdW5pdHRlc3QuVGVz",
- "dEFsbEV4dGVuc2lvbnMYSSABKAg6BHRydWU6TQoYZGVmYXVsdF9zdHJpbmdf",
- "ZXh0ZW5zaW9uEiQucHJvdG9idWZfdW5pdHRlc3QuVGVzdEFsbEV4dGVuc2lv",
- "bnMYSiABKAk6BWhlbGxvOkwKF2RlZmF1bHRfYnl0ZXNfZXh0ZW5zaW9uEiQu",
- "cHJvdG9idWZfdW5pdHRlc3QuVGVzdEFsbEV4dGVuc2lvbnMYSyABKAw6BXdv",
- "cmxkOnwKHWRlZmF1bHRfbmVzdGVkX2VudW1fZXh0ZW5zaW9uEiQucHJvdG9i",
- "dWZfdW5pdHRlc3QuVGVzdEFsbEV4dGVuc2lvbnMYUSABKA4yKi5wcm90b2J1",
- "Zl91bml0dGVzdC5UZXN0QWxsVHlwZXMuTmVzdGVkRW51bToDQkFSOnkKHmRl",
- "ZmF1bHRfZm9yZWlnbl9lbnVtX2V4dGVuc2lvbhIkLnByb3RvYnVmX3VuaXR0",
- "ZXN0LlRlc3RBbGxFeHRlbnNpb25zGFIgASgOMh4ucHJvdG9idWZfdW5pdHRl",
- "c3QuRm9yZWlnbkVudW06C0ZPUkVJR05fQkFSOn0KHWRlZmF1bHRfaW1wb3J0",
- "X2VudW1fZXh0ZW5zaW9uEiQucHJvdG9idWZfdW5pdHRlc3QuVGVzdEFsbEV4",
- "dGVuc2lvbnMYUyABKA4yJC5wcm90b2J1Zl91bml0dGVzdF9pbXBvcnQuSW1w",
- "b3J0RW51bToKSU1QT1JUX0JBUjpVCh5kZWZhdWx0X3N0cmluZ19waWVjZV9l",
- "eHRlbnNpb24SJC5wcm90b2J1Zl91bml0dGVzdC5UZXN0QWxsRXh0ZW5zaW9u",
- "cxhUIAEoCToDYWJjQgIIAjpNChZkZWZhdWx0X2NvcmRfZXh0ZW5zaW9uEiQu",
- "cHJvdG9idWZfdW5pdHRlc3QuVGVzdEFsbEV4dGVuc2lvbnMYVSABKAk6AzEy",
- "M0ICCAE6QgoTbXlfZXh0ZW5zaW9uX3N0cmluZxIlLnByb3RvYnVmX3VuaXR0",
- "ZXN0LlRlc3RGaWVsZE9yZGVyaW5ncxgyIAEoCTo/ChBteV9leHRlbnNpb25f",
- "aW50EiUucHJvdG9idWZfdW5pdHRlc3QuVGVzdEZpZWxkT3JkZXJpbmdzGAUg",
- "ASgFOksKFnBhY2tlZF9pbnQzMl9leHRlbnNpb24SJy5wcm90b2J1Zl91bml0",
- "dGVzdC5UZXN0UGFja2VkRXh0ZW5zaW9ucxhaIAMoBUICEAE6SwoWcGFja2Vk",
- "X2ludDY0X2V4dGVuc2lvbhInLnByb3RvYnVmX3VuaXR0ZXN0LlRlc3RQYWNr",
- "ZWRFeHRlbnNpb25zGFsgAygDQgIQATpMChdwYWNrZWRfdWludDMyX2V4dGVu",
- "c2lvbhInLnByb3RvYnVmX3VuaXR0ZXN0LlRlc3RQYWNrZWRFeHRlbnNpb25z",
- "GFwgAygNQgIQATpMChdwYWNrZWRfdWludDY0X2V4dGVuc2lvbhInLnByb3Rv",
- "YnVmX3VuaXR0ZXN0LlRlc3RQYWNrZWRFeHRlbnNpb25zGF0gAygEQgIQATpM",
- "ChdwYWNrZWRfc2ludDMyX2V4dGVuc2lvbhInLnByb3RvYnVmX3VuaXR0ZXN0",
- "LlRlc3RQYWNrZWRFeHRlbnNpb25zGF4gAygRQgIQATpMChdwYWNrZWRfc2lu",
- "dDY0X2V4dGVuc2lvbhInLnByb3RvYnVmX3VuaXR0ZXN0LlRlc3RQYWNrZWRF",
- "eHRlbnNpb25zGF8gAygSQgIQATpNChhwYWNrZWRfZml4ZWQzMl9leHRlbnNp",
- "b24SJy5wcm90b2J1Zl91bml0dGVzdC5UZXN0UGFja2VkRXh0ZW5zaW9ucxhg",
- "IAMoB0ICEAE6TQoYcGFja2VkX2ZpeGVkNjRfZXh0ZW5zaW9uEicucHJvdG9i",
- "dWZfdW5pdHRlc3QuVGVzdFBhY2tlZEV4dGVuc2lvbnMYYSADKAZCAhABOk4K",
- "GXBhY2tlZF9zZml4ZWQzMl9leHRlbnNpb24SJy5wcm90b2J1Zl91bml0dGVz",
- "dC5UZXN0UGFja2VkRXh0ZW5zaW9ucxhiIAMoD0ICEAE6TgoZcGFja2VkX3Nm",
- "aXhlZDY0X2V4dGVuc2lvbhInLnByb3RvYnVmX3VuaXR0ZXN0LlRlc3RQYWNr",
- "ZWRFeHRlbnNpb25zGGMgAygQQgIQATpLChZwYWNrZWRfZmxvYXRfZXh0ZW5z",
- "aW9uEicucHJvdG9idWZfdW5pdHRlc3QuVGVzdFBhY2tlZEV4dGVuc2lvbnMY",
- "ZCADKAJCAhABOkwKF3BhY2tlZF9kb3VibGVfZXh0ZW5zaW9uEicucHJvdG9i",
- "dWZfdW5pdHRlc3QuVGVzdFBhY2tlZEV4dGVuc2lvbnMYZSADKAFCAhABOkoK",
- "FXBhY2tlZF9ib29sX2V4dGVuc2lvbhInLnByb3RvYnVmX3VuaXR0ZXN0LlRl",
- "c3RQYWNrZWRFeHRlbnNpb25zGGYgAygIQgIQATpqChVwYWNrZWRfZW51bV9l",
- "eHRlbnNpb24SJy5wcm90b2J1Zl91bml0dGVzdC5UZXN0UGFja2VkRXh0ZW5z",
- "aW9ucxhnIAMoDjIeLnByb3RvYnVmX3VuaXR0ZXN0LkZvcmVpZ25FbnVtQgIQ",
- "AUJTQg1Vbml0dGVzdFByb3RvSAGAAQGIAQGQAQHCPjYKIUdvb2dsZS5Qcm90",
- "b2NvbEJ1ZmZlcnMuVGVzdFByb3RvcxIRVW5pdFRlc3RQcm90b0ZpbGU="));
- pbd::FileDescriptor.InternalDescriptorAssigner assigner = delegate(pbd::FileDescriptor root) {
- descriptor = root;
- internal__static_protobuf_unittest_TestAllTypes__Descriptor = Descriptor.MessageTypes[0];
- internal__static_protobuf_unittest_TestAllTypes__FieldAccessorTable =
- new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestAllTypes, global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Builder>(internal__static_protobuf_unittest_TestAllTypes__Descriptor,
- new string[] { "OptionalInt32", "OptionalInt64", "OptionalUint32", "OptionalUint64", "OptionalSint32", "OptionalSint64", "OptionalFixed32", "OptionalFixed64", "OptionalSfixed32", "OptionalSfixed64", "OptionalFloat", "OptionalDouble", "OptionalBool", "OptionalString", "OptionalBytes", "OptionalGroup", "OptionalNestedMessage", "OptionalForeignMessage", "OptionalImportMessage", "OptionalNestedEnum", "OptionalForeignEnum", "OptionalImportEnum", "OptionalStringPiece", "OptionalCord", "RepeatedInt32", "RepeatedInt64", "RepeatedUint32", "RepeatedUint64", "RepeatedSint32", "RepeatedSint64", "RepeatedFixed32", "RepeatedFixed64", "RepeatedSfixed32", "RepeatedSfixed64", "RepeatedFloat", "RepeatedDouble", "RepeatedBool", "RepeatedString", "RepeatedBytes", "RepeatedGroup", "RepeatedNestedMessage", "RepeatedForeignMessage", "RepeatedImportMessage", "RepeatedNestedEnum", "RepeatedForeignEnum", "RepeatedImportEnum", "RepeatedStringPiece", "RepeatedCord", "DefaultInt32", "DefaultInt64", "DefaultUint32", "DefaultUint64", "DefaultSint32", "DefaultSint64", "DefaultFixed32", "DefaultFixed64", "DefaultSfixed32", "DefaultSfixed64", "DefaultFloat", "DefaultDouble", "DefaultBool", "DefaultString", "DefaultBytes", "DefaultNestedEnum", "DefaultForeignEnum", "DefaultImportEnum", "DefaultStringPiece", "DefaultCord", });
- internal__static_protobuf_unittest_TestAllTypes_NestedMessage__Descriptor = internal__static_protobuf_unittest_TestAllTypes__Descriptor.NestedTypes[0];
- internal__static_protobuf_unittest_TestAllTypes_NestedMessage__FieldAccessorTable =
- new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage, global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage.Builder>(internal__static_protobuf_unittest_TestAllTypes_NestedMessage__Descriptor,
- new string[] { "Bb", });
- internal__static_protobuf_unittest_TestAllTypes_OptionalGroup__Descriptor = internal__static_protobuf_unittest_TestAllTypes__Descriptor.NestedTypes[1];
- internal__static_protobuf_unittest_TestAllTypes_OptionalGroup__FieldAccessorTable =
- new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.OptionalGroup, global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.OptionalGroup.Builder>(internal__static_protobuf_unittest_TestAllTypes_OptionalGroup__Descriptor,
- new string[] { "A", });
- internal__static_protobuf_unittest_TestAllTypes_RepeatedGroup__Descriptor = internal__static_protobuf_unittest_TestAllTypes__Descriptor.NestedTypes[2];
- internal__static_protobuf_unittest_TestAllTypes_RepeatedGroup__FieldAccessorTable =
- new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.RepeatedGroup, global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.RepeatedGroup.Builder>(internal__static_protobuf_unittest_TestAllTypes_RepeatedGroup__Descriptor,
- new string[] { "A", });
- internal__static_protobuf_unittest_TestDeprecatedFields__Descriptor = Descriptor.MessageTypes[1];
- internal__static_protobuf_unittest_TestDeprecatedFields__FieldAccessorTable =
- new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestDeprecatedFields, global::Google.ProtocolBuffers.TestProtos.TestDeprecatedFields.Builder>(internal__static_protobuf_unittest_TestDeprecatedFields__Descriptor,
- new string[] { "DeprecatedInt32", });
- internal__static_protobuf_unittest_ForeignMessage__Descriptor = Descriptor.MessageTypes[2];
- internal__static_protobuf_unittest_ForeignMessage__FieldAccessorTable =
- new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.ForeignMessage, global::Google.ProtocolBuffers.TestProtos.ForeignMessage.Builder>(internal__static_protobuf_unittest_ForeignMessage__Descriptor,
- new string[] { "C", });
- internal__static_protobuf_unittest_TestAllExtensions__Descriptor = Descriptor.MessageTypes[3];
- internal__static_protobuf_unittest_TestAllExtensions__FieldAccessorTable =
- new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestAllExtensions, global::Google.ProtocolBuffers.TestProtos.TestAllExtensions.Builder>(internal__static_protobuf_unittest_TestAllExtensions__Descriptor,
- new string[] { });
- internal__static_protobuf_unittest_OptionalGroup_extension__Descriptor = Descriptor.MessageTypes[4];
- internal__static_protobuf_unittest_OptionalGroup_extension__FieldAccessorTable =
- new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.OptionalGroup_extension, global::Google.ProtocolBuffers.TestProtos.OptionalGroup_extension.Builder>(internal__static_protobuf_unittest_OptionalGroup_extension__Descriptor,
- new string[] { "A", });
- internal__static_protobuf_unittest_RepeatedGroup_extension__Descriptor = Descriptor.MessageTypes[5];
- internal__static_protobuf_unittest_RepeatedGroup_extension__FieldAccessorTable =
- new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.RepeatedGroup_extension, global::Google.ProtocolBuffers.TestProtos.RepeatedGroup_extension.Builder>(internal__static_protobuf_unittest_RepeatedGroup_extension__Descriptor,
- new string[] { "A", });
- internal__static_protobuf_unittest_TestNestedExtension__Descriptor = Descriptor.MessageTypes[6];
- internal__static_protobuf_unittest_TestNestedExtension__FieldAccessorTable =
- new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestNestedExtension, global::Google.ProtocolBuffers.TestProtos.TestNestedExtension.Builder>(internal__static_protobuf_unittest_TestNestedExtension__Descriptor,
- new string[] { });
- global::Google.ProtocolBuffers.TestProtos.TestNestedExtension.Test = pb::GeneratedSingleExtension<string>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.TestNestedExtension.Descriptor.Extensions[0]);
- internal__static_protobuf_unittest_TestRequired__Descriptor = Descriptor.MessageTypes[7];
- internal__static_protobuf_unittest_TestRequired__FieldAccessorTable =
- new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestRequired, global::Google.ProtocolBuffers.TestProtos.TestRequired.Builder>(internal__static_protobuf_unittest_TestRequired__Descriptor,
- new string[] { "A", "Dummy2", "B", "Dummy4", "Dummy5", "Dummy6", "Dummy7", "Dummy8", "Dummy9", "Dummy10", "Dummy11", "Dummy12", "Dummy13", "Dummy14", "Dummy15", "Dummy16", "Dummy17", "Dummy18", "Dummy19", "Dummy20", "Dummy21", "Dummy22", "Dummy23", "Dummy24", "Dummy25", "Dummy26", "Dummy27", "Dummy28", "Dummy29", "Dummy30", "Dummy31", "Dummy32", "C", });
- global::Google.ProtocolBuffers.TestProtos.TestRequired.Single = pb::GeneratedSingleExtension<global::Google.ProtocolBuffers.TestProtos.TestRequired>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.TestRequired.Descriptor.Extensions[0]);
- global::Google.ProtocolBuffers.TestProtos.TestRequired.Multi = pb::GeneratedRepeatExtension<global::Google.ProtocolBuffers.TestProtos.TestRequired>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.TestRequired.Descriptor.Extensions[1]);
- internal__static_protobuf_unittest_TestRequiredForeign__Descriptor = Descriptor.MessageTypes[8];
- internal__static_protobuf_unittest_TestRequiredForeign__FieldAccessorTable =
- new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestRequiredForeign, global::Google.ProtocolBuffers.TestProtos.TestRequiredForeign.Builder>(internal__static_protobuf_unittest_TestRequiredForeign__Descriptor,
- new string[] { "OptionalMessage", "RepeatedMessage", "Dummy", });
- internal__static_protobuf_unittest_TestForeignNested__Descriptor = Descriptor.MessageTypes[9];
- internal__static_protobuf_unittest_TestForeignNested__FieldAccessorTable =
- new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestForeignNested, global::Google.ProtocolBuffers.TestProtos.TestForeignNested.Builder>(internal__static_protobuf_unittest_TestForeignNested__Descriptor,
- new string[] { "ForeignNested", });
- internal__static_protobuf_unittest_TestEmptyMessage__Descriptor = Descriptor.MessageTypes[10];
- internal__static_protobuf_unittest_TestEmptyMessage__FieldAccessorTable =
- new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestEmptyMessage, global::Google.ProtocolBuffers.TestProtos.TestEmptyMessage.Builder>(internal__static_protobuf_unittest_TestEmptyMessage__Descriptor,
- new string[] { });
- internal__static_protobuf_unittest_TestEmptyMessageWithExtensions__Descriptor = Descriptor.MessageTypes[11];
- internal__static_protobuf_unittest_TestEmptyMessageWithExtensions__FieldAccessorTable =
- new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestEmptyMessageWithExtensions, global::Google.ProtocolBuffers.TestProtos.TestEmptyMessageWithExtensions.Builder>(internal__static_protobuf_unittest_TestEmptyMessageWithExtensions__Descriptor,
- new string[] { });
- internal__static_protobuf_unittest_TestMultipleExtensionRanges__Descriptor = Descriptor.MessageTypes[12];
- internal__static_protobuf_unittest_TestMultipleExtensionRanges__FieldAccessorTable =
- new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestMultipleExtensionRanges, global::Google.ProtocolBuffers.TestProtos.TestMultipleExtensionRanges.Builder>(internal__static_protobuf_unittest_TestMultipleExtensionRanges__Descriptor,
- new string[] { });
- internal__static_protobuf_unittest_TestReallyLargeTagNumber__Descriptor = Descriptor.MessageTypes[13];
- internal__static_protobuf_unittest_TestReallyLargeTagNumber__FieldAccessorTable =
- new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestReallyLargeTagNumber, global::Google.ProtocolBuffers.TestProtos.TestReallyLargeTagNumber.Builder>(internal__static_protobuf_unittest_TestReallyLargeTagNumber__Descriptor,
- new string[] { "A", "Bb", });
- internal__static_protobuf_unittest_TestRecursiveMessage__Descriptor = Descriptor.MessageTypes[14];
- internal__static_protobuf_unittest_TestRecursiveMessage__FieldAccessorTable =
- new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestRecursiveMessage, global::Google.ProtocolBuffers.TestProtos.TestRecursiveMessage.Builder>(internal__static_protobuf_unittest_TestRecursiveMessage__Descriptor,
- new string[] { "A", "I", });
- internal__static_protobuf_unittest_TestMutualRecursionA__Descriptor = Descriptor.MessageTypes[15];
- internal__static_protobuf_unittest_TestMutualRecursionA__FieldAccessorTable =
- new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestMutualRecursionA, global::Google.ProtocolBuffers.TestProtos.TestMutualRecursionA.Builder>(internal__static_protobuf_unittest_TestMutualRecursionA__Descriptor,
- new string[] { "Bb", });
- internal__static_protobuf_unittest_TestMutualRecursionB__Descriptor = Descriptor.MessageTypes[16];
- internal__static_protobuf_unittest_TestMutualRecursionB__FieldAccessorTable =
- new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestMutualRecursionB, global::Google.ProtocolBuffers.TestProtos.TestMutualRecursionB.Builder>(internal__static_protobuf_unittest_TestMutualRecursionB__Descriptor,
- new string[] { "A", "OptionalInt32", });
- internal__static_protobuf_unittest_TestDupFieldNumber__Descriptor = Descriptor.MessageTypes[17];
- internal__static_protobuf_unittest_TestDupFieldNumber__FieldAccessorTable =
- new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestDupFieldNumber, global::Google.ProtocolBuffers.TestProtos.TestDupFieldNumber.Builder>(internal__static_protobuf_unittest_TestDupFieldNumber__Descriptor,
- new string[] { "A", "Foo", "Bar", });
- internal__static_protobuf_unittest_TestDupFieldNumber_Foo__Descriptor = internal__static_protobuf_unittest_TestDupFieldNumber__Descriptor.NestedTypes[0];
- internal__static_protobuf_unittest_TestDupFieldNumber_Foo__FieldAccessorTable =
- new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestDupFieldNumber.Types.Foo, global::Google.ProtocolBuffers.TestProtos.TestDupFieldNumber.Types.Foo.Builder>(internal__static_protobuf_unittest_TestDupFieldNumber_Foo__Descriptor,
- new string[] { "A", });
- internal__static_protobuf_unittest_TestDupFieldNumber_Bar__Descriptor = internal__static_protobuf_unittest_TestDupFieldNumber__Descriptor.NestedTypes[1];
- internal__static_protobuf_unittest_TestDupFieldNumber_Bar__FieldAccessorTable =
- new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestDupFieldNumber.Types.Bar, global::Google.ProtocolBuffers.TestProtos.TestDupFieldNumber.Types.Bar.Builder>(internal__static_protobuf_unittest_TestDupFieldNumber_Bar__Descriptor,
- new string[] { "A", });
- internal__static_protobuf_unittest_TestNestedMessageHasBits__Descriptor = Descriptor.MessageTypes[18];
- internal__static_protobuf_unittest_TestNestedMessageHasBits__FieldAccessorTable =
- new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestNestedMessageHasBits, global::Google.ProtocolBuffers.TestProtos.TestNestedMessageHasBits.Builder>(internal__static_protobuf_unittest_TestNestedMessageHasBits__Descriptor,
- new string[] { "OptionalNestedMessage", });
- internal__static_protobuf_unittest_TestNestedMessageHasBits_NestedMessage__Descriptor = internal__static_protobuf_unittest_TestNestedMessageHasBits__Descriptor.NestedTypes[0];
- internal__static_protobuf_unittest_TestNestedMessageHasBits_NestedMessage__FieldAccessorTable =
- new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestNestedMessageHasBits.Types.NestedMessage, global::Google.ProtocolBuffers.TestProtos.TestNestedMessageHasBits.Types.NestedMessage.Builder>(internal__static_protobuf_unittest_TestNestedMessageHasBits_NestedMessage__Descriptor,
- new string[] { "NestedmessageRepeatedInt32", "NestedmessageRepeatedForeignmessage", });
- internal__static_protobuf_unittest_TestCamelCaseFieldNames__Descriptor = Descriptor.MessageTypes[19];
- internal__static_protobuf_unittest_TestCamelCaseFieldNames__FieldAccessorTable =
- new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestCamelCaseFieldNames, global::Google.ProtocolBuffers.TestProtos.TestCamelCaseFieldNames.Builder>(internal__static_protobuf_unittest_TestCamelCaseFieldNames__Descriptor,
- new string[] { "PrimitiveField", "StringField", "EnumField", "MessageField", "StringPieceField", "CordField", "RepeatedPrimitiveField", "RepeatedStringField", "RepeatedEnumField", "RepeatedMessageField", "RepeatedStringPieceField", "RepeatedCordField", });
- internal__static_protobuf_unittest_TestFieldOrderings__Descriptor = Descriptor.MessageTypes[20];
- internal__static_protobuf_unittest_TestFieldOrderings__FieldAccessorTable =
- new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestFieldOrderings, global::Google.ProtocolBuffers.TestProtos.TestFieldOrderings.Builder>(internal__static_protobuf_unittest_TestFieldOrderings__Descriptor,
- new string[] { "MyString", "MyInt", "MyFloat", });
- internal__static_protobuf_unittest_TestExtremeDefaultValues__Descriptor = Descriptor.MessageTypes[21];
- internal__static_protobuf_unittest_TestExtremeDefaultValues__FieldAccessorTable =
- new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestExtremeDefaultValues, global::Google.ProtocolBuffers.TestProtos.TestExtremeDefaultValues.Builder>(internal__static_protobuf_unittest_TestExtremeDefaultValues__Descriptor,
- new string[] { "EscapedBytes", "LargeUint32", "LargeUint64", "SmallInt32", "SmallInt64", "Utf8String", "ZeroFloat", "OneFloat", "SmallFloat", "NegativeOneFloat", "NegativeFloat", "LargeFloat", "SmallNegativeFloat", "InfDouble", "NegInfDouble", "NanDouble", "InfFloat", "NegInfFloat", "NanFloat", "CppTrigraph", });
- internal__static_protobuf_unittest_SparseEnumMessage__Descriptor = Descriptor.MessageTypes[22];
- internal__static_protobuf_unittest_SparseEnumMessage__FieldAccessorTable =
- new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.SparseEnumMessage, global::Google.ProtocolBuffers.TestProtos.SparseEnumMessage.Builder>(internal__static_protobuf_unittest_SparseEnumMessage__Descriptor,
- new string[] { "SparseEnum", });
- internal__static_protobuf_unittest_OneString__Descriptor = Descriptor.MessageTypes[23];
- internal__static_protobuf_unittest_OneString__FieldAccessorTable =
- new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.OneString, global::Google.ProtocolBuffers.TestProtos.OneString.Builder>(internal__static_protobuf_unittest_OneString__Descriptor,
- new string[] { "Data", });
- internal__static_protobuf_unittest_OneBytes__Descriptor = Descriptor.MessageTypes[24];
- internal__static_protobuf_unittest_OneBytes__FieldAccessorTable =
- new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.OneBytes, global::Google.ProtocolBuffers.TestProtos.OneBytes.Builder>(internal__static_protobuf_unittest_OneBytes__Descriptor,
- new string[] { "Data", });
- internal__static_protobuf_unittest_TestPackedTypes__Descriptor = Descriptor.MessageTypes[25];
- internal__static_protobuf_unittest_TestPackedTypes__FieldAccessorTable =
- new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestPackedTypes, global::Google.ProtocolBuffers.TestProtos.TestPackedTypes.Builder>(internal__static_protobuf_unittest_TestPackedTypes__Descriptor,
- new string[] { "PackedInt32", "PackedInt64", "PackedUint32", "PackedUint64", "PackedSint32", "PackedSint64", "PackedFixed32", "PackedFixed64", "PackedSfixed32", "PackedSfixed64", "PackedFloat", "PackedDouble", "PackedBool", "PackedEnum", });
- internal__static_protobuf_unittest_TestUnpackedTypes__Descriptor = Descriptor.MessageTypes[26];
- internal__static_protobuf_unittest_TestUnpackedTypes__FieldAccessorTable =
- new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestUnpackedTypes, global::Google.ProtocolBuffers.TestProtos.TestUnpackedTypes.Builder>(internal__static_protobuf_unittest_TestUnpackedTypes__Descriptor,
- new string[] { "UnpackedInt32", "UnpackedInt64", "UnpackedUint32", "UnpackedUint64", "UnpackedSint32", "UnpackedSint64", "UnpackedFixed32", "UnpackedFixed64", "UnpackedSfixed32", "UnpackedSfixed64", "UnpackedFloat", "UnpackedDouble", "UnpackedBool", "UnpackedEnum", });
- internal__static_protobuf_unittest_TestPackedExtensions__Descriptor = Descriptor.MessageTypes[27];
- internal__static_protobuf_unittest_TestPackedExtensions__FieldAccessorTable =
- new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestPackedExtensions, global::Google.ProtocolBuffers.TestProtos.TestPackedExtensions.Builder>(internal__static_protobuf_unittest_TestPackedExtensions__Descriptor,
- new string[] { });
- internal__static_protobuf_unittest_TestDynamicExtensions__Descriptor = Descriptor.MessageTypes[28];
- internal__static_protobuf_unittest_TestDynamicExtensions__FieldAccessorTable =
- new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestDynamicExtensions, global::Google.ProtocolBuffers.TestProtos.TestDynamicExtensions.Builder>(internal__static_protobuf_unittest_TestDynamicExtensions__Descriptor,
- new string[] { "ScalarExtension", "EnumExtension", "DynamicEnumExtension", "MessageExtension", "DynamicMessageExtension", "RepeatedExtension", "PackedExtension", });
- internal__static_protobuf_unittest_TestDynamicExtensions_DynamicMessageType__Descriptor = internal__static_protobuf_unittest_TestDynamicExtensions__Descriptor.NestedTypes[0];
- internal__static_protobuf_unittest_TestDynamicExtensions_DynamicMessageType__FieldAccessorTable =
- new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestDynamicExtensions.Types.DynamicMessageType, global::Google.ProtocolBuffers.TestProtos.TestDynamicExtensions.Types.DynamicMessageType.Builder>(internal__static_protobuf_unittest_TestDynamicExtensions_DynamicMessageType__Descriptor,
- new string[] { "DynamicField", });
- internal__static_protobuf_unittest_TestRepeatedScalarDifferentTagSizes__Descriptor = Descriptor.MessageTypes[29];
- internal__static_protobuf_unittest_TestRepeatedScalarDifferentTagSizes__FieldAccessorTable =
- new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestRepeatedScalarDifferentTagSizes, global::Google.ProtocolBuffers.TestProtos.TestRepeatedScalarDifferentTagSizes.Builder>(internal__static_protobuf_unittest_TestRepeatedScalarDifferentTagSizes__Descriptor,
- new string[] { "RepeatedFixed32", "RepeatedInt32", "RepeatedFixed64", "RepeatedInt64", "RepeatedFloat", "RepeatedUint64", });
- internal__static_protobuf_unittest_FooRequest__Descriptor = Descriptor.MessageTypes[30];
- internal__static_protobuf_unittest_FooRequest__FieldAccessorTable =
- new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.FooRequest, global::Google.ProtocolBuffers.TestProtos.FooRequest.Builder>(internal__static_protobuf_unittest_FooRequest__Descriptor,
- new string[] { });
- internal__static_protobuf_unittest_FooResponse__Descriptor = Descriptor.MessageTypes[31];
- internal__static_protobuf_unittest_FooResponse__FieldAccessorTable =
- new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.FooResponse, global::Google.ProtocolBuffers.TestProtos.FooResponse.Builder>(internal__static_protobuf_unittest_FooResponse__Descriptor,
- new string[] { });
- internal__static_protobuf_unittest_BarRequest__Descriptor = Descriptor.MessageTypes[32];
- internal__static_protobuf_unittest_BarRequest__FieldAccessorTable =
- new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.BarRequest, global::Google.ProtocolBuffers.TestProtos.BarRequest.Builder>(internal__static_protobuf_unittest_BarRequest__Descriptor,
- new string[] { });
- internal__static_protobuf_unittest_BarResponse__Descriptor = Descriptor.MessageTypes[33];
- internal__static_protobuf_unittest_BarResponse__FieldAccessorTable =
- new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.BarResponse, global::Google.ProtocolBuffers.TestProtos.BarResponse.Builder>(internal__static_protobuf_unittest_BarResponse__Descriptor,
- new string[] { });
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.OptionalInt32Extension = pb::GeneratedSingleExtension<int>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[0]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.OptionalInt64Extension = pb::GeneratedSingleExtension<long>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[1]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.OptionalUint32Extension = pb::GeneratedSingleExtension<uint>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[2]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.OptionalUint64Extension = pb::GeneratedSingleExtension<ulong>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[3]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.OptionalSint32Extension = pb::GeneratedSingleExtension<int>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[4]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.OptionalSint64Extension = pb::GeneratedSingleExtension<long>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[5]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.OptionalFixed32Extension = pb::GeneratedSingleExtension<uint>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[6]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.OptionalFixed64Extension = pb::GeneratedSingleExtension<ulong>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[7]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.OptionalSfixed32Extension = pb::GeneratedSingleExtension<int>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[8]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.OptionalSfixed64Extension = pb::GeneratedSingleExtension<long>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[9]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.OptionalFloatExtension = pb::GeneratedSingleExtension<float>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[10]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.OptionalDoubleExtension = pb::GeneratedSingleExtension<double>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[11]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.OptionalBoolExtension = pb::GeneratedSingleExtension<bool>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[12]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.OptionalStringExtension = pb::GeneratedSingleExtension<string>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[13]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.OptionalBytesExtension = pb::GeneratedSingleExtension<pb::ByteString>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[14]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.OptionalGroupExtension = pb::GeneratedSingleExtension<global::Google.ProtocolBuffers.TestProtos.OptionalGroup_extension>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[15]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.OptionalNestedMessageExtension = pb::GeneratedSingleExtension<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[16]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.OptionalForeignMessageExtension = pb::GeneratedSingleExtension<global::Google.ProtocolBuffers.TestProtos.ForeignMessage>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[17]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.OptionalImportMessageExtension = pb::GeneratedSingleExtension<global::Google.ProtocolBuffers.TestProtos.ImportMessage>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[18]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.OptionalNestedEnumExtension = pb::GeneratedSingleExtension<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedEnum>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[19]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.OptionalForeignEnumExtension = pb::GeneratedSingleExtension<global::Google.ProtocolBuffers.TestProtos.ForeignEnum>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[20]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.OptionalImportEnumExtension = pb::GeneratedSingleExtension<global::Google.ProtocolBuffers.TestProtos.ImportEnum>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[21]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.OptionalStringPieceExtension = pb::GeneratedSingleExtension<string>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[22]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.OptionalCordExtension = pb::GeneratedSingleExtension<string>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[23]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.RepeatedInt32Extension = pb::GeneratedRepeatExtension<int>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[24]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.RepeatedInt64Extension = pb::GeneratedRepeatExtension<long>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[25]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.RepeatedUint32Extension = pb::GeneratedRepeatExtension<uint>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[26]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.RepeatedUint64Extension = pb::GeneratedRepeatExtension<ulong>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[27]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.RepeatedSint32Extension = pb::GeneratedRepeatExtension<int>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[28]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.RepeatedSint64Extension = pb::GeneratedRepeatExtension<long>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[29]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.RepeatedFixed32Extension = pb::GeneratedRepeatExtension<uint>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[30]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.RepeatedFixed64Extension = pb::GeneratedRepeatExtension<ulong>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[31]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.RepeatedSfixed32Extension = pb::GeneratedRepeatExtension<int>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[32]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.RepeatedSfixed64Extension = pb::GeneratedRepeatExtension<long>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[33]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.RepeatedFloatExtension = pb::GeneratedRepeatExtension<float>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[34]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.RepeatedDoubleExtension = pb::GeneratedRepeatExtension<double>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[35]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.RepeatedBoolExtension = pb::GeneratedRepeatExtension<bool>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[36]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.RepeatedStringExtension = pb::GeneratedRepeatExtension<string>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[37]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.RepeatedBytesExtension = pb::GeneratedRepeatExtension<pb::ByteString>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[38]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.RepeatedGroupExtension = pb::GeneratedRepeatExtension<global::Google.ProtocolBuffers.TestProtos.RepeatedGroup_extension>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[39]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.RepeatedNestedMessageExtension = pb::GeneratedRepeatExtension<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[40]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.RepeatedForeignMessageExtension = pb::GeneratedRepeatExtension<global::Google.ProtocolBuffers.TestProtos.ForeignMessage>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[41]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.RepeatedImportMessageExtension = pb::GeneratedRepeatExtension<global::Google.ProtocolBuffers.TestProtos.ImportMessage>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[42]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.RepeatedNestedEnumExtension = pb::GeneratedRepeatExtension<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedEnum>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[43]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.RepeatedForeignEnumExtension = pb::GeneratedRepeatExtension<global::Google.ProtocolBuffers.TestProtos.ForeignEnum>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[44]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.RepeatedImportEnumExtension = pb::GeneratedRepeatExtension<global::Google.ProtocolBuffers.TestProtos.ImportEnum>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[45]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.RepeatedStringPieceExtension = pb::GeneratedRepeatExtension<string>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[46]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.RepeatedCordExtension = pb::GeneratedRepeatExtension<string>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[47]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.DefaultInt32Extension = pb::GeneratedSingleExtension<int>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[48]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.DefaultInt64Extension = pb::GeneratedSingleExtension<long>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[49]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.DefaultUint32Extension = pb::GeneratedSingleExtension<uint>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[50]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.DefaultUint64Extension = pb::GeneratedSingleExtension<ulong>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[51]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.DefaultSint32Extension = pb::GeneratedSingleExtension<int>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[52]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.DefaultSint64Extension = pb::GeneratedSingleExtension<long>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[53]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.DefaultFixed32Extension = pb::GeneratedSingleExtension<uint>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[54]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.DefaultFixed64Extension = pb::GeneratedSingleExtension<ulong>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[55]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.DefaultSfixed32Extension = pb::GeneratedSingleExtension<int>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[56]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.DefaultSfixed64Extension = pb::GeneratedSingleExtension<long>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[57]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.DefaultFloatExtension = pb::GeneratedSingleExtension<float>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[58]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.DefaultDoubleExtension = pb::GeneratedSingleExtension<double>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[59]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.DefaultBoolExtension = pb::GeneratedSingleExtension<bool>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[60]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.DefaultStringExtension = pb::GeneratedSingleExtension<string>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[61]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.DefaultBytesExtension = pb::GeneratedSingleExtension<pb::ByteString>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[62]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.DefaultNestedEnumExtension = pb::GeneratedSingleExtension<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedEnum>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[63]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.DefaultForeignEnumExtension = pb::GeneratedSingleExtension<global::Google.ProtocolBuffers.TestProtos.ForeignEnum>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[64]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.DefaultImportEnumExtension = pb::GeneratedSingleExtension<global::Google.ProtocolBuffers.TestProtos.ImportEnum>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[65]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.DefaultStringPieceExtension = pb::GeneratedSingleExtension<string>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[66]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.DefaultCordExtension = pb::GeneratedSingleExtension<string>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[67]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.MyExtensionString = pb::GeneratedSingleExtension<string>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[68]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.MyExtensionInt = pb::GeneratedSingleExtension<int>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[69]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.PackedInt32Extension = pb::GeneratedRepeatExtension<int>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[70]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.PackedInt64Extension = pb::GeneratedRepeatExtension<long>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[71]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.PackedUint32Extension = pb::GeneratedRepeatExtension<uint>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[72]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.PackedUint64Extension = pb::GeneratedRepeatExtension<ulong>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[73]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.PackedSint32Extension = pb::GeneratedRepeatExtension<int>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[74]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.PackedSint64Extension = pb::GeneratedRepeatExtension<long>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[75]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.PackedFixed32Extension = pb::GeneratedRepeatExtension<uint>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[76]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.PackedFixed64Extension = pb::GeneratedRepeatExtension<ulong>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[77]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.PackedSfixed32Extension = pb::GeneratedRepeatExtension<int>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[78]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.PackedSfixed64Extension = pb::GeneratedRepeatExtension<long>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[79]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.PackedFloatExtension = pb::GeneratedRepeatExtension<float>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[80]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.PackedDoubleExtension = pb::GeneratedRepeatExtension<double>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[81]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.PackedBoolExtension = pb::GeneratedRepeatExtension<bool>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[82]);
- global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.PackedEnumExtension = pb::GeneratedRepeatExtension<global::Google.ProtocolBuffers.TestProtos.ForeignEnum>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor.Extensions[83]);
- pb::ExtensionRegistry registry = pb::ExtensionRegistry.CreateInstance();
- RegisterAllExtensions(registry);
- global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.RegisterAllExtensions(registry);
- global::Google.ProtocolBuffers.TestProtos.UnitTestImportProtoFile.RegisterAllExtensions(registry);
- return registry;
- };
- pbd::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData,
- new pbd::FileDescriptor[] {
- global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.Descriptor,
- global::Google.ProtocolBuffers.TestProtos.UnitTestImportProtoFile.Descriptor,
- }, assigner);
- }
- #endregion
-
- }
- #region Enums
- public enum ForeignEnum {
- FOREIGN_FOO = 4,
- FOREIGN_BAR = 5,
- FOREIGN_BAZ = 6,
- }
-
- public enum TestEnumWithDupValue {
- FOO1 = 1,
- BAR1 = 2,
- BAZ = 3,
- FOO2 = 1,
- BAR2 = 2,
- }
-
- public enum TestSparseEnum {
- SPARSE_A = 123,
- SPARSE_B = 62374,
- SPARSE_C = 12589234,
- SPARSE_D = -15,
- SPARSE_E = -53452,
- SPARSE_F = 0,
- SPARSE_G = 2,
- }
-
- #endregion
-
- #region Messages
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class TestAllTypes : pb::GeneratedMessage<TestAllTypes, TestAllTypes.Builder> {
- private TestAllTypes() { }
- private static readonly TestAllTypes defaultInstance = new TestAllTypes().MakeReadOnly();
- private static readonly string[] _testAllTypesFieldNames = new string[] { "default_bool", "default_bytes", "default_cord", "default_double", "default_fixed32", "default_fixed64", "default_float", "default_foreign_enum", "default_import_enum", "default_int32", "default_int64", "default_nested_enum", "default_sfixed32", "default_sfixed64", "default_sint32", "default_sint64", "default_string", "default_string_piece", "default_uint32", "default_uint64", "optional_bool", "optional_bytes", "optional_cord", "optional_double", "optional_fixed32", "optional_fixed64", "optional_float", "optional_foreign_enum", "optional_foreign_message", "optional_import_enum", "optional_import_message", "optional_int32", "optional_int64", "optional_nested_enum", "optional_nested_message", "optional_sfixed32", "optional_sfixed64", "optional_sint32", "optional_sint64", "optional_string", "optional_string_piece", "optional_uint32", "optional_uint64", "optionalgroup", "repeated_bool", "repeated_bytes", "repeated_cord", "repeated_double", "repeated_fixed32", "repeated_fixed64", "repeated_float", "repeated_foreign_enum", "repeated_foreign_message", "repeated_import_enum", "repeated_import_message", "repeated_int32", "repeated_int64", "repeated_nested_enum", "repeated_nested_message", "repeated_sfixed32", "repeated_sfixed64", "repeated_sint32", "repeated_sint64", "repeated_string", "repeated_string_piece", "repeated_uint32", "repeated_uint64", "repeatedgroup" };
- private static readonly uint[] _testAllTypesFieldTags = new uint[] { 584, 602, 682, 577, 541, 545, 573, 656, 664, 488, 496, 648, 557, 561, 520, 528, 594, 674, 504, 512, 104, 122, 202, 97, 61, 65, 93, 176, 154, 184, 162, 8, 16, 168, 146, 77, 81, 40, 48, 114, 194, 24, 32, 131, 344, 362, 442, 337, 301, 305, 333, 416, 394, 424, 402, 248, 256, 408, 386, 317, 321, 280, 288, 354, 434, 264, 272, 371 };
- public static TestAllTypes DefaultInstance {
- get { return defaultInstance; }
- }
-
- public override TestAllTypes DefaultInstanceForType {
- get { return DefaultInstance; }
- }
-
- protected override TestAllTypes ThisMessage {
- get { return this; }
- }
-
- public static pbd::MessageDescriptor Descriptor {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.internal__static_protobuf_unittest_TestAllTypes__Descriptor; }
- }
-
- protected override pb::FieldAccess.FieldAccessorTable<TestAllTypes, TestAllTypes.Builder> InternalFieldAccessors {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.internal__static_protobuf_unittest_TestAllTypes__FieldAccessorTable; }
- }
-
- #region Nested types
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public static partial class Types {
- public enum NestedEnum {
- FOO = 1,
- BAR = 2,
- BAZ = 3,
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class NestedMessage : pb::GeneratedMessage<NestedMessage, NestedMessage.Builder> {
- private NestedMessage() { }
- private static readonly NestedMessage defaultInstance = new NestedMessage().MakeReadOnly();
- private static readonly string[] _nestedMessageFieldNames = new string[] { "bb" };
- private static readonly uint[] _nestedMessageFieldTags = new uint[] { 8 };
- public static NestedMessage DefaultInstance {
- get { return defaultInstance; }
- }
-
- public override NestedMessage DefaultInstanceForType {
- get { return DefaultInstance; }
- }
-
- protected override NestedMessage ThisMessage {
- get { return this; }
- }
-
- public static pbd::MessageDescriptor Descriptor {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.internal__static_protobuf_unittest_TestAllTypes_NestedMessage__Descriptor; }
- }
-
- protected override pb::FieldAccess.FieldAccessorTable<NestedMessage, NestedMessage.Builder> InternalFieldAccessors {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.internal__static_protobuf_unittest_TestAllTypes_NestedMessage__FieldAccessorTable; }
- }
-
- public const int BbFieldNumber = 1;
- private bool hasBb;
- private int bb_;
- public bool HasBb {
- get { return hasBb; }
- }
- public int Bb {
- get { return bb_; }
- }
-
- public override bool IsInitialized {
- get {
- return true;
- }
- }
-
- public override void WriteTo(pb::ICodedOutputStream output) {
- CalcSerializedSize();
- string[] field_names = _nestedMessageFieldNames;
- if (hasBb) {
- output.WriteInt32(1, field_names[0], Bb);
- }
- UnknownFields.WriteTo(output);
- }
-
- private int memoizedSerializedSize = -1;
- public override int SerializedSize {
- get {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
- return CalcSerializedSize();
- }
- }
-
- private int CalcSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- if (hasBb) {
- size += pb::CodedOutputStream.ComputeInt32Size(1, Bb);
- }
- size += UnknownFields.SerializedSize;
- memoizedSerializedSize = size;
- return size;
- }
- public static NestedMessage ParseFrom(pb::ByteString data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static NestedMessage ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static NestedMessage ParseFrom(byte[] data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static NestedMessage ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static NestedMessage ParseFrom(global::System.IO.Stream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static NestedMessage ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- public static NestedMessage ParseDelimitedFrom(global::System.IO.Stream input) {
- return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
- }
- public static NestedMessage ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
- }
- public static NestedMessage ParseFrom(pb::ICodedInputStream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static NestedMessage ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- private NestedMessage 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(NestedMessage prototype) {
- return new Builder(prototype);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class Builder : pb::GeneratedBuilder<NestedMessage, Builder> {
- protected override Builder ThisBuilder {
- get { return this; }
- }
- public Builder() {
- result = DefaultInstance;
- resultIsReadOnly = true;
- }
- internal Builder(NestedMessage cloneFrom) {
- result = cloneFrom;
- resultIsReadOnly = true;
- }
-
- private bool resultIsReadOnly;
- private NestedMessage result;
-
- private NestedMessage PrepareBuilder() {
- if (resultIsReadOnly) {
- NestedMessage original = result;
- result = new NestedMessage();
- resultIsReadOnly = false;
- MergeFrom(original);
- }
- return result;
- }
-
- public override bool IsInitialized {
- get { return result.IsInitialized; }
- }
-
- protected override NestedMessage 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.TestAllTypes.Types.NestedMessage.Descriptor; }
- }
-
- public override NestedMessage DefaultInstanceForType {
- get { return global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage.DefaultInstance; }
- }
-
- public override NestedMessage BuildPartial() {
- if (resultIsReadOnly) {
- return result;
- }
- resultIsReadOnly = true;
- return result.MakeReadOnly();
- }
-
- public override Builder MergeFrom(pb::IMessage other) {
- if (other is NestedMessage) {
- return MergeFrom((NestedMessage) other);
- } else {
- base.MergeFrom(other);
- return this;
- }
- }
-
- public override Builder MergeFrom(NestedMessage other) {
- if (other == global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage.DefaultInstance) return this;
- PrepareBuilder();
- if (other.HasBb) {
- Bb = other.Bb;
- }
- 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(_nestedMessageFieldNames, field_name, global::System.StringComparer.Ordinal);
- if(field_ordinal >= 0)
- tag = _nestedMessageFieldTags[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.hasBb = input.ReadInt32(ref result.bb_);
- break;
- }
- }
- }
-
- if (unknownFields != null) {
- this.UnknownFields = unknownFields.Build();
- }
- return this;
- }
-
-
- public bool HasBb {
- get { return result.hasBb; }
- }
- public int Bb {
- get { return result.Bb; }
- set { SetBb(value); }
- }
- public Builder SetBb(int value) {
- PrepareBuilder();
- result.hasBb = true;
- result.bb_ = value;
- return this;
- }
- public Builder ClearBb() {
- PrepareBuilder();
- result.hasBb = false;
- result.bb_ = 0;
- return this;
- }
- }
- static NestedMessage() {
- object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor, null);
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class OptionalGroup : pb::GeneratedMessage<OptionalGroup, OptionalGroup.Builder> {
- private OptionalGroup() { }
- private static readonly OptionalGroup defaultInstance = new OptionalGroup().MakeReadOnly();
- private static readonly string[] _optionalGroupFieldNames = new string[] { "a" };
- private static readonly uint[] _optionalGroupFieldTags = new uint[] { 136 };
- public static OptionalGroup DefaultInstance {
- get { return defaultInstance; }
- }
-
- public override OptionalGroup DefaultInstanceForType {
- get { return DefaultInstance; }
- }
-
- protected override OptionalGroup ThisMessage {
- get { return this; }
- }
-
- public static pbd::MessageDescriptor Descriptor {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.internal__static_protobuf_unittest_TestAllTypes_OptionalGroup__Descriptor; }
- }
-
- protected override pb::FieldAccess.FieldAccessorTable<OptionalGroup, OptionalGroup.Builder> InternalFieldAccessors {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.internal__static_protobuf_unittest_TestAllTypes_OptionalGroup__FieldAccessorTable; }
- }
-
- public const int AFieldNumber = 17;
- private bool hasA;
- private int a_;
- public bool HasA {
- get { return hasA; }
- }
- public int A {
- get { return a_; }
- }
-
- public override bool IsInitialized {
- get {
- return true;
- }
- }
-
- public override void WriteTo(pb::ICodedOutputStream output) {
- CalcSerializedSize();
- string[] field_names = _optionalGroupFieldNames;
- if (hasA) {
- output.WriteInt32(17, field_names[0], A);
- }
- UnknownFields.WriteTo(output);
- }
-
- private int memoizedSerializedSize = -1;
- public override int SerializedSize {
- get {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
- return CalcSerializedSize();
- }
- }
-
- private int CalcSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- if (hasA) {
- size += pb::CodedOutputStream.ComputeInt32Size(17, A);
- }
- size += UnknownFields.SerializedSize;
- memoizedSerializedSize = size;
- return size;
- }
- public static OptionalGroup ParseFrom(pb::ByteString data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static OptionalGroup ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static OptionalGroup ParseFrom(byte[] data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static OptionalGroup ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static OptionalGroup ParseFrom(global::System.IO.Stream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static OptionalGroup ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- public static OptionalGroup ParseDelimitedFrom(global::System.IO.Stream input) {
- return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
- }
- public static OptionalGroup ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
- }
- public static OptionalGroup ParseFrom(pb::ICodedInputStream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static OptionalGroup ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- private OptionalGroup 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(OptionalGroup prototype) {
- return new Builder(prototype);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class Builder : pb::GeneratedBuilder<OptionalGroup, Builder> {
- protected override Builder ThisBuilder {
- get { return this; }
- }
- public Builder() {
- result = DefaultInstance;
- resultIsReadOnly = true;
- }
- internal Builder(OptionalGroup cloneFrom) {
- result = cloneFrom;
- resultIsReadOnly = true;
- }
-
- private bool resultIsReadOnly;
- private OptionalGroup result;
-
- private OptionalGroup PrepareBuilder() {
- if (resultIsReadOnly) {
- OptionalGroup original = result;
- result = new OptionalGroup();
- resultIsReadOnly = false;
- MergeFrom(original);
- }
- return result;
- }
-
- public override bool IsInitialized {
- get { return result.IsInitialized; }
- }
-
- protected override OptionalGroup 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.TestAllTypes.Types.OptionalGroup.Descriptor; }
- }
-
- public override OptionalGroup DefaultInstanceForType {
- get { return global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.OptionalGroup.DefaultInstance; }
- }
-
- public override OptionalGroup BuildPartial() {
- if (resultIsReadOnly) {
- return result;
- }
- resultIsReadOnly = true;
- return result.MakeReadOnly();
- }
-
- public override Builder MergeFrom(pb::IMessage other) {
- if (other is OptionalGroup) {
- return MergeFrom((OptionalGroup) other);
- } else {
- base.MergeFrom(other);
- return this;
- }
- }
-
- public override Builder MergeFrom(OptionalGroup other) {
- if (other == global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.OptionalGroup.DefaultInstance) return this;
- PrepareBuilder();
- if (other.HasA) {
- A = other.A;
- }
- 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(_optionalGroupFieldNames, field_name, global::System.StringComparer.Ordinal);
- if(field_ordinal >= 0)
- tag = _optionalGroupFieldTags[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 136: {
- result.hasA = input.ReadInt32(ref result.a_);
- break;
- }
- }
- }
-
- if (unknownFields != null) {
- this.UnknownFields = unknownFields.Build();
- }
- return this;
- }
-
-
- public bool HasA {
- get { return result.hasA; }
- }
- public int A {
- get { return result.A; }
- set { SetA(value); }
- }
- public Builder SetA(int value) {
- PrepareBuilder();
- result.hasA = true;
- result.a_ = value;
- return this;
- }
- public Builder ClearA() {
- PrepareBuilder();
- result.hasA = false;
- result.a_ = 0;
- return this;
- }
- }
- static OptionalGroup() {
- object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor, null);
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class RepeatedGroup : pb::GeneratedMessage<RepeatedGroup, RepeatedGroup.Builder> {
- private RepeatedGroup() { }
- private static readonly RepeatedGroup defaultInstance = new RepeatedGroup().MakeReadOnly();
- private static readonly string[] _repeatedGroupFieldNames = new string[] { "a" };
- private static readonly uint[] _repeatedGroupFieldTags = new uint[] { 376 };
- public static RepeatedGroup DefaultInstance {
- get { return defaultInstance; }
- }
-
- public override RepeatedGroup DefaultInstanceForType {
- get { return DefaultInstance; }
- }
-
- protected override RepeatedGroup ThisMessage {
- get { return this; }
- }
-
- public static pbd::MessageDescriptor Descriptor {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.internal__static_protobuf_unittest_TestAllTypes_RepeatedGroup__Descriptor; }
- }
-
- protected override pb::FieldAccess.FieldAccessorTable<RepeatedGroup, RepeatedGroup.Builder> InternalFieldAccessors {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.internal__static_protobuf_unittest_TestAllTypes_RepeatedGroup__FieldAccessorTable; }
- }
-
- public const int AFieldNumber = 47;
- private bool hasA;
- private int a_;
- public bool HasA {
- get { return hasA; }
- }
- public int A {
- get { return a_; }
- }
-
- public override bool IsInitialized {
- get {
- return true;
- }
- }
-
- public override void WriteTo(pb::ICodedOutputStream output) {
- CalcSerializedSize();
- string[] field_names = _repeatedGroupFieldNames;
- if (hasA) {
- output.WriteInt32(47, field_names[0], A);
- }
- UnknownFields.WriteTo(output);
- }
-
- private int memoizedSerializedSize = -1;
- public override int SerializedSize {
- get {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
- return CalcSerializedSize();
- }
- }
-
- private int CalcSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- if (hasA) {
- size += pb::CodedOutputStream.ComputeInt32Size(47, A);
- }
- size += UnknownFields.SerializedSize;
- memoizedSerializedSize = size;
- return size;
- }
- public static RepeatedGroup ParseFrom(pb::ByteString data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static RepeatedGroup ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static RepeatedGroup ParseFrom(byte[] data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static RepeatedGroup ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static RepeatedGroup ParseFrom(global::System.IO.Stream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static RepeatedGroup ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- public static RepeatedGroup ParseDelimitedFrom(global::System.IO.Stream input) {
- return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
- }
- public static RepeatedGroup ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
- }
- public static RepeatedGroup ParseFrom(pb::ICodedInputStream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static RepeatedGroup ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- private RepeatedGroup 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(RepeatedGroup prototype) {
- return new Builder(prototype);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class Builder : pb::GeneratedBuilder<RepeatedGroup, Builder> {
- protected override Builder ThisBuilder {
- get { return this; }
- }
- public Builder() {
- result = DefaultInstance;
- resultIsReadOnly = true;
- }
- internal Builder(RepeatedGroup cloneFrom) {
- result = cloneFrom;
- resultIsReadOnly = true;
- }
-
- private bool resultIsReadOnly;
- private RepeatedGroup result;
-
- private RepeatedGroup PrepareBuilder() {
- if (resultIsReadOnly) {
- RepeatedGroup original = result;
- result = new RepeatedGroup();
- resultIsReadOnly = false;
- MergeFrom(original);
- }
- return result;
- }
-
- public override bool IsInitialized {
- get { return result.IsInitialized; }
- }
-
- protected override RepeatedGroup 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.TestAllTypes.Types.RepeatedGroup.Descriptor; }
- }
-
- public override RepeatedGroup DefaultInstanceForType {
- get { return global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.RepeatedGroup.DefaultInstance; }
- }
-
- public override RepeatedGroup BuildPartial() {
- if (resultIsReadOnly) {
- return result;
- }
- resultIsReadOnly = true;
- return result.MakeReadOnly();
- }
-
- public override Builder MergeFrom(pb::IMessage other) {
- if (other is RepeatedGroup) {
- return MergeFrom((RepeatedGroup) other);
- } else {
- base.MergeFrom(other);
- return this;
- }
- }
-
- public override Builder MergeFrom(RepeatedGroup other) {
- if (other == global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.RepeatedGroup.DefaultInstance) return this;
- PrepareBuilder();
- if (other.HasA) {
- A = other.A;
- }
- 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(_repeatedGroupFieldNames, field_name, global::System.StringComparer.Ordinal);
- if(field_ordinal >= 0)
- tag = _repeatedGroupFieldTags[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 376: {
- result.hasA = input.ReadInt32(ref result.a_);
- break;
- }
- }
- }
-
- if (unknownFields != null) {
- this.UnknownFields = unknownFields.Build();
- }
- return this;
- }
-
-
- public bool HasA {
- get { return result.hasA; }
- }
- public int A {
- get { return result.A; }
- set { SetA(value); }
- }
- public Builder SetA(int value) {
- PrepareBuilder();
- result.hasA = true;
- result.a_ = value;
- return this;
- }
- public Builder ClearA() {
- PrepareBuilder();
- result.hasA = false;
- result.a_ = 0;
- return this;
- }
- }
- static RepeatedGroup() {
- object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor, null);
- }
- }
-
- }
- #endregion
-
- public const int OptionalInt32FieldNumber = 1;
- private bool hasOptionalInt32;
- private int optionalInt32_;
- public bool HasOptionalInt32 {
- get { return hasOptionalInt32; }
- }
- public int OptionalInt32 {
- get { return optionalInt32_; }
- }
-
- public const int OptionalInt64FieldNumber = 2;
- private bool hasOptionalInt64;
- private long optionalInt64_;
- public bool HasOptionalInt64 {
- get { return hasOptionalInt64; }
- }
- public long OptionalInt64 {
- get { return optionalInt64_; }
- }
-
- public const int OptionalUint32FieldNumber = 3;
- private bool hasOptionalUint32;
- private uint optionalUint32_;
- public bool HasOptionalUint32 {
- get { return hasOptionalUint32; }
- }
- [global::System.CLSCompliant(false)]
- public uint OptionalUint32 {
- get { return optionalUint32_; }
- }
-
- public const int OptionalUint64FieldNumber = 4;
- private bool hasOptionalUint64;
- private ulong optionalUint64_;
- public bool HasOptionalUint64 {
- get { return hasOptionalUint64; }
- }
- [global::System.CLSCompliant(false)]
- public ulong OptionalUint64 {
- get { return optionalUint64_; }
- }
-
- public const int OptionalSint32FieldNumber = 5;
- private bool hasOptionalSint32;
- private int optionalSint32_;
- public bool HasOptionalSint32 {
- get { return hasOptionalSint32; }
- }
- public int OptionalSint32 {
- get { return optionalSint32_; }
- }
-
- public const int OptionalSint64FieldNumber = 6;
- private bool hasOptionalSint64;
- private long optionalSint64_;
- public bool HasOptionalSint64 {
- get { return hasOptionalSint64; }
- }
- public long OptionalSint64 {
- get { return optionalSint64_; }
- }
-
- public const int OptionalFixed32FieldNumber = 7;
- private bool hasOptionalFixed32;
- private uint optionalFixed32_;
- public bool HasOptionalFixed32 {
- get { return hasOptionalFixed32; }
- }
- [global::System.CLSCompliant(false)]
- public uint OptionalFixed32 {
- get { return optionalFixed32_; }
- }
-
- public const int OptionalFixed64FieldNumber = 8;
- private bool hasOptionalFixed64;
- private ulong optionalFixed64_;
- public bool HasOptionalFixed64 {
- get { return hasOptionalFixed64; }
- }
- [global::System.CLSCompliant(false)]
- public ulong OptionalFixed64 {
- get { return optionalFixed64_; }
- }
-
- public const int OptionalSfixed32FieldNumber = 9;
- private bool hasOptionalSfixed32;
- private int optionalSfixed32_;
- public bool HasOptionalSfixed32 {
- get { return hasOptionalSfixed32; }
- }
- public int OptionalSfixed32 {
- get { return optionalSfixed32_; }
- }
-
- public const int OptionalSfixed64FieldNumber = 10;
- private bool hasOptionalSfixed64;
- private long optionalSfixed64_;
- public bool HasOptionalSfixed64 {
- get { return hasOptionalSfixed64; }
- }
- public long OptionalSfixed64 {
- get { return optionalSfixed64_; }
- }
-
- public const int OptionalFloatFieldNumber = 11;
- private bool hasOptionalFloat;
- private float optionalFloat_;
- public bool HasOptionalFloat {
- get { return hasOptionalFloat; }
- }
- public float OptionalFloat {
- get { return optionalFloat_; }
- }
-
- public const int OptionalDoubleFieldNumber = 12;
- private bool hasOptionalDouble;
- private double optionalDouble_;
- public bool HasOptionalDouble {
- get { return hasOptionalDouble; }
- }
- public double OptionalDouble {
- get { return optionalDouble_; }
- }
-
- public const int OptionalBoolFieldNumber = 13;
- private bool hasOptionalBool;
- private bool optionalBool_;
- public bool HasOptionalBool {
- get { return hasOptionalBool; }
- }
- public bool OptionalBool {
- get { return optionalBool_; }
- }
-
- public const int OptionalStringFieldNumber = 14;
- private bool hasOptionalString;
- private string optionalString_ = "";
- public bool HasOptionalString {
- get { return hasOptionalString; }
- }
- public string OptionalString {
- get { return optionalString_; }
- }
-
- public const int OptionalBytesFieldNumber = 15;
- private bool hasOptionalBytes;
- private pb::ByteString optionalBytes_ = pb::ByteString.Empty;
- public bool HasOptionalBytes {
- get { return hasOptionalBytes; }
- }
- public pb::ByteString OptionalBytes {
- get { return optionalBytes_; }
- }
-
- public const int OptionalGroupFieldNumber = 16;
- private bool hasOptionalGroup;
- private global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.OptionalGroup optionalGroup_;
- public bool HasOptionalGroup {
- get { return hasOptionalGroup; }
- }
- public global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.OptionalGroup OptionalGroup {
- get { return optionalGroup_ ?? global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.OptionalGroup.DefaultInstance; }
- }
-
- public const int OptionalNestedMessageFieldNumber = 18;
- private bool hasOptionalNestedMessage;
- private global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage optionalNestedMessage_;
- public bool HasOptionalNestedMessage {
- get { return hasOptionalNestedMessage; }
- }
- public global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage OptionalNestedMessage {
- get { return optionalNestedMessage_ ?? global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage.DefaultInstance; }
- }
-
- public const int OptionalForeignMessageFieldNumber = 19;
- private bool hasOptionalForeignMessage;
- private global::Google.ProtocolBuffers.TestProtos.ForeignMessage optionalForeignMessage_;
- public bool HasOptionalForeignMessage {
- get { return hasOptionalForeignMessage; }
- }
- public global::Google.ProtocolBuffers.TestProtos.ForeignMessage OptionalForeignMessage {
- get { return optionalForeignMessage_ ?? global::Google.ProtocolBuffers.TestProtos.ForeignMessage.DefaultInstance; }
- }
-
- public const int OptionalImportMessageFieldNumber = 20;
- private bool hasOptionalImportMessage;
- private global::Google.ProtocolBuffers.TestProtos.ImportMessage optionalImportMessage_;
- public bool HasOptionalImportMessage {
- get { return hasOptionalImportMessage; }
- }
- public global::Google.ProtocolBuffers.TestProtos.ImportMessage OptionalImportMessage {
- get { return optionalImportMessage_ ?? global::Google.ProtocolBuffers.TestProtos.ImportMessage.DefaultInstance; }
- }
-
- public const int OptionalNestedEnumFieldNumber = 21;
- private bool hasOptionalNestedEnum;
- private global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedEnum optionalNestedEnum_ = global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedEnum.FOO;
- public bool HasOptionalNestedEnum {
- get { return hasOptionalNestedEnum; }
- }
- public global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedEnum OptionalNestedEnum {
- get { return optionalNestedEnum_; }
- }
-
- public const int OptionalForeignEnumFieldNumber = 22;
- private bool hasOptionalForeignEnum;
- private global::Google.ProtocolBuffers.TestProtos.ForeignEnum optionalForeignEnum_ = global::Google.ProtocolBuffers.TestProtos.ForeignEnum.FOREIGN_FOO;
- public bool HasOptionalForeignEnum {
- get { return hasOptionalForeignEnum; }
- }
- public global::Google.ProtocolBuffers.TestProtos.ForeignEnum OptionalForeignEnum {
- get { return optionalForeignEnum_; }
- }
-
- public const int OptionalImportEnumFieldNumber = 23;
- private bool hasOptionalImportEnum;
- private global::Google.ProtocolBuffers.TestProtos.ImportEnum optionalImportEnum_ = global::Google.ProtocolBuffers.TestProtos.ImportEnum.IMPORT_FOO;
- public bool HasOptionalImportEnum {
- get { return hasOptionalImportEnum; }
- }
- public global::Google.ProtocolBuffers.TestProtos.ImportEnum OptionalImportEnum {
- get { return optionalImportEnum_; }
- }
-
- public const int OptionalStringPieceFieldNumber = 24;
- private bool hasOptionalStringPiece;
- private string optionalStringPiece_ = "";
- public bool HasOptionalStringPiece {
- get { return hasOptionalStringPiece; }
- }
- public string OptionalStringPiece {
- get { return optionalStringPiece_; }
- }
-
- public const int OptionalCordFieldNumber = 25;
- private bool hasOptionalCord;
- private string optionalCord_ = "";
- public bool HasOptionalCord {
- get { return hasOptionalCord; }
- }
- public string OptionalCord {
- get { return optionalCord_; }
- }
-
- public const int RepeatedInt32FieldNumber = 31;
- private pbc::PopsicleList<int> repeatedInt32_ = new pbc::PopsicleList<int>();
- public scg::IList<int> RepeatedInt32List {
- get { return pbc::Lists.AsReadOnly(repeatedInt32_); }
- }
- public int RepeatedInt32Count {
- get { return repeatedInt32_.Count; }
- }
- public int GetRepeatedInt32(int index) {
- return repeatedInt32_[index];
- }
-
- public const int RepeatedInt64FieldNumber = 32;
- private pbc::PopsicleList<long> repeatedInt64_ = new pbc::PopsicleList<long>();
- public scg::IList<long> RepeatedInt64List {
- get { return pbc::Lists.AsReadOnly(repeatedInt64_); }
- }
- public int RepeatedInt64Count {
- get { return repeatedInt64_.Count; }
- }
- public long GetRepeatedInt64(int index) {
- return repeatedInt64_[index];
- }
-
- public const int RepeatedUint32FieldNumber = 33;
- private pbc::PopsicleList<uint> repeatedUint32_ = new pbc::PopsicleList<uint>();
- [global::System.CLSCompliant(false)]
- public scg::IList<uint> RepeatedUint32List {
- get { return pbc::Lists.AsReadOnly(repeatedUint32_); }
- }
- public int RepeatedUint32Count {
- get { return repeatedUint32_.Count; }
- }
- [global::System.CLSCompliant(false)]
- public uint GetRepeatedUint32(int index) {
- return repeatedUint32_[index];
- }
-
- public const int RepeatedUint64FieldNumber = 34;
- private pbc::PopsicleList<ulong> repeatedUint64_ = new pbc::PopsicleList<ulong>();
- [global::System.CLSCompliant(false)]
- public scg::IList<ulong> RepeatedUint64List {
- get { return pbc::Lists.AsReadOnly(repeatedUint64_); }
- }
- public int RepeatedUint64Count {
- get { return repeatedUint64_.Count; }
- }
- [global::System.CLSCompliant(false)]
- public ulong GetRepeatedUint64(int index) {
- return repeatedUint64_[index];
- }
-
- public const int RepeatedSint32FieldNumber = 35;
- private pbc::PopsicleList<int> repeatedSint32_ = new pbc::PopsicleList<int>();
- public scg::IList<int> RepeatedSint32List {
- get { return pbc::Lists.AsReadOnly(repeatedSint32_); }
- }
- public int RepeatedSint32Count {
- get { return repeatedSint32_.Count; }
- }
- public int GetRepeatedSint32(int index) {
- return repeatedSint32_[index];
- }
-
- public const int RepeatedSint64FieldNumber = 36;
- private pbc::PopsicleList<long> repeatedSint64_ = new pbc::PopsicleList<long>();
- public scg::IList<long> RepeatedSint64List {
- get { return pbc::Lists.AsReadOnly(repeatedSint64_); }
- }
- public int RepeatedSint64Count {
- get { return repeatedSint64_.Count; }
- }
- public long GetRepeatedSint64(int index) {
- return repeatedSint64_[index];
- }
-
- public const int RepeatedFixed32FieldNumber = 37;
- private pbc::PopsicleList<uint> repeatedFixed32_ = new pbc::PopsicleList<uint>();
- [global::System.CLSCompliant(false)]
- public scg::IList<uint> RepeatedFixed32List {
- get { return pbc::Lists.AsReadOnly(repeatedFixed32_); }
- }
- public int RepeatedFixed32Count {
- get { return repeatedFixed32_.Count; }
- }
- [global::System.CLSCompliant(false)]
- public uint GetRepeatedFixed32(int index) {
- return repeatedFixed32_[index];
- }
-
- public const int RepeatedFixed64FieldNumber = 38;
- private pbc::PopsicleList<ulong> repeatedFixed64_ = new pbc::PopsicleList<ulong>();
- [global::System.CLSCompliant(false)]
- public scg::IList<ulong> RepeatedFixed64List {
- get { return pbc::Lists.AsReadOnly(repeatedFixed64_); }
- }
- public int RepeatedFixed64Count {
- get { return repeatedFixed64_.Count; }
- }
- [global::System.CLSCompliant(false)]
- public ulong GetRepeatedFixed64(int index) {
- return repeatedFixed64_[index];
- }
-
- public const int RepeatedSfixed32FieldNumber = 39;
- private pbc::PopsicleList<int> repeatedSfixed32_ = new pbc::PopsicleList<int>();
- public scg::IList<int> RepeatedSfixed32List {
- get { return pbc::Lists.AsReadOnly(repeatedSfixed32_); }
- }
- public int RepeatedSfixed32Count {
- get { return repeatedSfixed32_.Count; }
- }
- public int GetRepeatedSfixed32(int index) {
- return repeatedSfixed32_[index];
- }
-
- public const int RepeatedSfixed64FieldNumber = 40;
- private pbc::PopsicleList<long> repeatedSfixed64_ = new pbc::PopsicleList<long>();
- public scg::IList<long> RepeatedSfixed64List {
- get { return pbc::Lists.AsReadOnly(repeatedSfixed64_); }
- }
- public int RepeatedSfixed64Count {
- get { return repeatedSfixed64_.Count; }
- }
- public long GetRepeatedSfixed64(int index) {
- return repeatedSfixed64_[index];
- }
-
- public const int RepeatedFloatFieldNumber = 41;
- private pbc::PopsicleList<float> repeatedFloat_ = new pbc::PopsicleList<float>();
- public scg::IList<float> RepeatedFloatList {
- get { return pbc::Lists.AsReadOnly(repeatedFloat_); }
- }
- public int RepeatedFloatCount {
- get { return repeatedFloat_.Count; }
- }
- public float GetRepeatedFloat(int index) {
- return repeatedFloat_[index];
- }
-
- public const int RepeatedDoubleFieldNumber = 42;
- private pbc::PopsicleList<double> repeatedDouble_ = new pbc::PopsicleList<double>();
- public scg::IList<double> RepeatedDoubleList {
- get { return pbc::Lists.AsReadOnly(repeatedDouble_); }
- }
- public int RepeatedDoubleCount {
- get { return repeatedDouble_.Count; }
- }
- public double GetRepeatedDouble(int index) {
- return repeatedDouble_[index];
- }
-
- public const int RepeatedBoolFieldNumber = 43;
- private pbc::PopsicleList<bool> repeatedBool_ = new pbc::PopsicleList<bool>();
- public scg::IList<bool> RepeatedBoolList {
- get { return pbc::Lists.AsReadOnly(repeatedBool_); }
- }
- public int RepeatedBoolCount {
- get { return repeatedBool_.Count; }
- }
- public bool GetRepeatedBool(int index) {
- return repeatedBool_[index];
- }
-
- public const int RepeatedStringFieldNumber = 44;
- private pbc::PopsicleList<string> repeatedString_ = new pbc::PopsicleList<string>();
- public scg::IList<string> RepeatedStringList {
- get { return pbc::Lists.AsReadOnly(repeatedString_); }
- }
- public int RepeatedStringCount {
- get { return repeatedString_.Count; }
- }
- public string GetRepeatedString(int index) {
- return repeatedString_[index];
- }
-
- public const int RepeatedBytesFieldNumber = 45;
- private pbc::PopsicleList<pb::ByteString> repeatedBytes_ = new pbc::PopsicleList<pb::ByteString>();
- public scg::IList<pb::ByteString> RepeatedBytesList {
- get { return pbc::Lists.AsReadOnly(repeatedBytes_); }
- }
- public int RepeatedBytesCount {
- get { return repeatedBytes_.Count; }
- }
- public pb::ByteString GetRepeatedBytes(int index) {
- return repeatedBytes_[index];
- }
-
- public const int RepeatedGroupFieldNumber = 46;
- private pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.RepeatedGroup> repeatedGroup_ = new pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.RepeatedGroup>();
- public scg::IList<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.RepeatedGroup> RepeatedGroupList {
- get { return repeatedGroup_; }
- }
- public int RepeatedGroupCount {
- get { return repeatedGroup_.Count; }
- }
- public global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.RepeatedGroup GetRepeatedGroup(int index) {
- return repeatedGroup_[index];
- }
-
- public const int RepeatedNestedMessageFieldNumber = 48;
- private pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage> repeatedNestedMessage_ = new pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage>();
- public scg::IList<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage> RepeatedNestedMessageList {
- get { return repeatedNestedMessage_; }
- }
- public int RepeatedNestedMessageCount {
- get { return repeatedNestedMessage_.Count; }
- }
- public global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage GetRepeatedNestedMessage(int index) {
- return repeatedNestedMessage_[index];
- }
-
- public const int RepeatedForeignMessageFieldNumber = 49;
- private pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.ForeignMessage> repeatedForeignMessage_ = new pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.ForeignMessage>();
- public scg::IList<global::Google.ProtocolBuffers.TestProtos.ForeignMessage> RepeatedForeignMessageList {
- get { return repeatedForeignMessage_; }
- }
- public int RepeatedForeignMessageCount {
- get { return repeatedForeignMessage_.Count; }
- }
- public global::Google.ProtocolBuffers.TestProtos.ForeignMessage GetRepeatedForeignMessage(int index) {
- return repeatedForeignMessage_[index];
- }
-
- public const int RepeatedImportMessageFieldNumber = 50;
- private pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.ImportMessage> repeatedImportMessage_ = new pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.ImportMessage>();
- public scg::IList<global::Google.ProtocolBuffers.TestProtos.ImportMessage> RepeatedImportMessageList {
- get { return repeatedImportMessage_; }
- }
- public int RepeatedImportMessageCount {
- get { return repeatedImportMessage_.Count; }
- }
- public global::Google.ProtocolBuffers.TestProtos.ImportMessage GetRepeatedImportMessage(int index) {
- return repeatedImportMessage_[index];
- }
-
- public const int RepeatedNestedEnumFieldNumber = 51;
- private pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedEnum> repeatedNestedEnum_ = new pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedEnum>();
- public scg::IList<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedEnum> RepeatedNestedEnumList {
- get { return pbc::Lists.AsReadOnly(repeatedNestedEnum_); }
- }
- public int RepeatedNestedEnumCount {
- get { return repeatedNestedEnum_.Count; }
- }
- public global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedEnum GetRepeatedNestedEnum(int index) {
- return repeatedNestedEnum_[index];
- }
-
- public const int RepeatedForeignEnumFieldNumber = 52;
- private pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.ForeignEnum> repeatedForeignEnum_ = new pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.ForeignEnum>();
- public scg::IList<global::Google.ProtocolBuffers.TestProtos.ForeignEnum> RepeatedForeignEnumList {
- get { return pbc::Lists.AsReadOnly(repeatedForeignEnum_); }
- }
- public int RepeatedForeignEnumCount {
- get { return repeatedForeignEnum_.Count; }
- }
- public global::Google.ProtocolBuffers.TestProtos.ForeignEnum GetRepeatedForeignEnum(int index) {
- return repeatedForeignEnum_[index];
- }
-
- public const int RepeatedImportEnumFieldNumber = 53;
- private pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.ImportEnum> repeatedImportEnum_ = new pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.ImportEnum>();
- public scg::IList<global::Google.ProtocolBuffers.TestProtos.ImportEnum> RepeatedImportEnumList {
- get { return pbc::Lists.AsReadOnly(repeatedImportEnum_); }
- }
- public int RepeatedImportEnumCount {
- get { return repeatedImportEnum_.Count; }
- }
- public global::Google.ProtocolBuffers.TestProtos.ImportEnum GetRepeatedImportEnum(int index) {
- return repeatedImportEnum_[index];
- }
-
- public const int RepeatedStringPieceFieldNumber = 54;
- private pbc::PopsicleList<string> repeatedStringPiece_ = new pbc::PopsicleList<string>();
- public scg::IList<string> RepeatedStringPieceList {
- get { return pbc::Lists.AsReadOnly(repeatedStringPiece_); }
- }
- public int RepeatedStringPieceCount {
- get { return repeatedStringPiece_.Count; }
- }
- public string GetRepeatedStringPiece(int index) {
- return repeatedStringPiece_[index];
- }
-
- public const int RepeatedCordFieldNumber = 55;
- private pbc::PopsicleList<string> repeatedCord_ = new pbc::PopsicleList<string>();
- public scg::IList<string> RepeatedCordList {
- get { return pbc::Lists.AsReadOnly(repeatedCord_); }
- }
- public int RepeatedCordCount {
- get { return repeatedCord_.Count; }
- }
- public string GetRepeatedCord(int index) {
- return repeatedCord_[index];
- }
-
- public const int DefaultInt32FieldNumber = 61;
- private bool hasDefaultInt32;
- private int defaultInt32_ = 41;
- public bool HasDefaultInt32 {
- get { return hasDefaultInt32; }
- }
- public int DefaultInt32 {
- get { return defaultInt32_; }
- }
-
- public const int DefaultInt64FieldNumber = 62;
- private bool hasDefaultInt64;
- private long defaultInt64_ = 42L;
- public bool HasDefaultInt64 {
- get { return hasDefaultInt64; }
- }
- public long DefaultInt64 {
- get { return defaultInt64_; }
- }
-
- public const int DefaultUint32FieldNumber = 63;
- private bool hasDefaultUint32;
- private uint defaultUint32_ = 43;
- public bool HasDefaultUint32 {
- get { return hasDefaultUint32; }
- }
- [global::System.CLSCompliant(false)]
- public uint DefaultUint32 {
- get { return defaultUint32_; }
- }
-
- public const int DefaultUint64FieldNumber = 64;
- private bool hasDefaultUint64;
- private ulong defaultUint64_ = 44UL;
- public bool HasDefaultUint64 {
- get { return hasDefaultUint64; }
- }
- [global::System.CLSCompliant(false)]
- public ulong DefaultUint64 {
- get { return defaultUint64_; }
- }
-
- public const int DefaultSint32FieldNumber = 65;
- private bool hasDefaultSint32;
- private int defaultSint32_ = -45;
- public bool HasDefaultSint32 {
- get { return hasDefaultSint32; }
- }
- public int DefaultSint32 {
- get { return defaultSint32_; }
- }
-
- public const int DefaultSint64FieldNumber = 66;
- private bool hasDefaultSint64;
- private long defaultSint64_ = 46;
- public bool HasDefaultSint64 {
- get { return hasDefaultSint64; }
- }
- public long DefaultSint64 {
- get { return defaultSint64_; }
- }
-
- public const int DefaultFixed32FieldNumber = 67;
- private bool hasDefaultFixed32;
- private uint defaultFixed32_ = 47;
- public bool HasDefaultFixed32 {
- get { return hasDefaultFixed32; }
- }
- [global::System.CLSCompliant(false)]
- public uint DefaultFixed32 {
- get { return defaultFixed32_; }
- }
-
- public const int DefaultFixed64FieldNumber = 68;
- private bool hasDefaultFixed64;
- private ulong defaultFixed64_ = 48;
- public bool HasDefaultFixed64 {
- get { return hasDefaultFixed64; }
- }
- [global::System.CLSCompliant(false)]
- public ulong DefaultFixed64 {
- get { return defaultFixed64_; }
- }
-
- public const int DefaultSfixed32FieldNumber = 69;
- private bool hasDefaultSfixed32;
- private int defaultSfixed32_ = 49;
- public bool HasDefaultSfixed32 {
- get { return hasDefaultSfixed32; }
- }
- public int DefaultSfixed32 {
- get { return defaultSfixed32_; }
- }
-
- public const int DefaultSfixed64FieldNumber = 70;
- private bool hasDefaultSfixed64;
- private long defaultSfixed64_ = -50;
- public bool HasDefaultSfixed64 {
- get { return hasDefaultSfixed64; }
- }
- public long DefaultSfixed64 {
- get { return defaultSfixed64_; }
- }
-
- public const int DefaultFloatFieldNumber = 71;
- private bool hasDefaultFloat;
- private float defaultFloat_ = 51.5F;
- public bool HasDefaultFloat {
- get { return hasDefaultFloat; }
- }
- public float DefaultFloat {
- get { return defaultFloat_; }
- }
-
- public const int DefaultDoubleFieldNumber = 72;
- private bool hasDefaultDouble;
- private double defaultDouble_ = 52000D;
- public bool HasDefaultDouble {
- get { return hasDefaultDouble; }
- }
- public double DefaultDouble {
- get { return defaultDouble_; }
- }
-
- public const int DefaultBoolFieldNumber = 73;
- private bool hasDefaultBool;
- private bool defaultBool_ = true;
- public bool HasDefaultBool {
- get { return hasDefaultBool; }
- }
- public bool DefaultBool {
- get { return defaultBool_; }
- }
-
- public const int DefaultStringFieldNumber = 74;
- private bool hasDefaultString;
- private string defaultString_ = "hello";
- public bool HasDefaultString {
- get { return hasDefaultString; }
- }
- public string DefaultString {
- get { return defaultString_; }
- }
-
- public const int DefaultBytesFieldNumber = 75;
- private bool hasDefaultBytes;
- private pb::ByteString defaultBytes_ = (pb::ByteString) global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Descriptor.Fields[62].DefaultValue;
- public bool HasDefaultBytes {
- get { return hasDefaultBytes; }
- }
- public pb::ByteString DefaultBytes {
- get { return defaultBytes_; }
- }
-
- public const int DefaultNestedEnumFieldNumber = 81;
- private bool hasDefaultNestedEnum;
- private global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedEnum defaultNestedEnum_ = global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedEnum.BAR;
- public bool HasDefaultNestedEnum {
- get { return hasDefaultNestedEnum; }
- }
- public global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedEnum DefaultNestedEnum {
- get { return defaultNestedEnum_; }
- }
-
- public const int DefaultForeignEnumFieldNumber = 82;
- private bool hasDefaultForeignEnum;
- private global::Google.ProtocolBuffers.TestProtos.ForeignEnum defaultForeignEnum_ = global::Google.ProtocolBuffers.TestProtos.ForeignEnum.FOREIGN_BAR;
- public bool HasDefaultForeignEnum {
- get { return hasDefaultForeignEnum; }
- }
- public global::Google.ProtocolBuffers.TestProtos.ForeignEnum DefaultForeignEnum {
- get { return defaultForeignEnum_; }
- }
-
- public const int DefaultImportEnumFieldNumber = 83;
- private bool hasDefaultImportEnum;
- private global::Google.ProtocolBuffers.TestProtos.ImportEnum defaultImportEnum_ = global::Google.ProtocolBuffers.TestProtos.ImportEnum.IMPORT_BAR;
- public bool HasDefaultImportEnum {
- get { return hasDefaultImportEnum; }
- }
- public global::Google.ProtocolBuffers.TestProtos.ImportEnum DefaultImportEnum {
- get { return defaultImportEnum_; }
- }
-
- public const int DefaultStringPieceFieldNumber = 84;
- private bool hasDefaultStringPiece;
- private string defaultStringPiece_ = "abc";
- public bool HasDefaultStringPiece {
- get { return hasDefaultStringPiece; }
- }
- public string DefaultStringPiece {
- get { return defaultStringPiece_; }
- }
-
- public const int DefaultCordFieldNumber = 85;
- private bool hasDefaultCord;
- private string defaultCord_ = "123";
- public bool HasDefaultCord {
- get { return hasDefaultCord; }
- }
- public string DefaultCord {
- get { return defaultCord_; }
- }
-
- public override bool IsInitialized {
- get {
- return true;
- }
- }
-
- public override void WriteTo(pb::ICodedOutputStream output) {
- CalcSerializedSize();
- string[] field_names = _testAllTypesFieldNames;
- if (hasOptionalInt32) {
- output.WriteInt32(1, field_names[31], OptionalInt32);
- }
- if (hasOptionalInt64) {
- output.WriteInt64(2, field_names[32], OptionalInt64);
- }
- if (hasOptionalUint32) {
- output.WriteUInt32(3, field_names[41], OptionalUint32);
- }
- if (hasOptionalUint64) {
- output.WriteUInt64(4, field_names[42], OptionalUint64);
- }
- if (hasOptionalSint32) {
- output.WriteSInt32(5, field_names[37], OptionalSint32);
- }
- if (hasOptionalSint64) {
- output.WriteSInt64(6, field_names[38], OptionalSint64);
- }
- if (hasOptionalFixed32) {
- output.WriteFixed32(7, field_names[24], OptionalFixed32);
- }
- if (hasOptionalFixed64) {
- output.WriteFixed64(8, field_names[25], OptionalFixed64);
- }
- if (hasOptionalSfixed32) {
- output.WriteSFixed32(9, field_names[35], OptionalSfixed32);
- }
- if (hasOptionalSfixed64) {
- output.WriteSFixed64(10, field_names[36], OptionalSfixed64);
- }
- if (hasOptionalFloat) {
- output.WriteFloat(11, field_names[26], OptionalFloat);
- }
- if (hasOptionalDouble) {
- output.WriteDouble(12, field_names[23], OptionalDouble);
- }
- if (hasOptionalBool) {
- output.WriteBool(13, field_names[20], OptionalBool);
- }
- if (hasOptionalString) {
- output.WriteString(14, field_names[39], OptionalString);
- }
- if (hasOptionalBytes) {
- output.WriteBytes(15, field_names[21], OptionalBytes);
- }
- if (hasOptionalGroup) {
- output.WriteGroup(16, field_names[43], OptionalGroup);
- }
- if (hasOptionalNestedMessage) {
- output.WriteMessage(18, field_names[34], OptionalNestedMessage);
- }
- if (hasOptionalForeignMessage) {
- output.WriteMessage(19, field_names[28], OptionalForeignMessage);
- }
- if (hasOptionalImportMessage) {
- output.WriteMessage(20, field_names[30], OptionalImportMessage);
- }
- if (hasOptionalNestedEnum) {
- output.WriteEnum(21, field_names[33], (int) OptionalNestedEnum, OptionalNestedEnum);
- }
- if (hasOptionalForeignEnum) {
- output.WriteEnum(22, field_names[27], (int) OptionalForeignEnum, OptionalForeignEnum);
- }
- if (hasOptionalImportEnum) {
- output.WriteEnum(23, field_names[29], (int) OptionalImportEnum, OptionalImportEnum);
- }
- if (hasOptionalStringPiece) {
- output.WriteString(24, field_names[40], OptionalStringPiece);
- }
- if (hasOptionalCord) {
- output.WriteString(25, field_names[22], OptionalCord);
- }
- if (repeatedInt32_.Count > 0) {
- output.WriteInt32Array(31, field_names[55], repeatedInt32_);
- }
- if (repeatedInt64_.Count > 0) {
- output.WriteInt64Array(32, field_names[56], repeatedInt64_);
- }
- if (repeatedUint32_.Count > 0) {
- output.WriteUInt32Array(33, field_names[65], repeatedUint32_);
- }
- if (repeatedUint64_.Count > 0) {
- output.WriteUInt64Array(34, field_names[66], repeatedUint64_);
- }
- if (repeatedSint32_.Count > 0) {
- output.WriteSInt32Array(35, field_names[61], repeatedSint32_);
- }
- if (repeatedSint64_.Count > 0) {
- output.WriteSInt64Array(36, field_names[62], repeatedSint64_);
- }
- if (repeatedFixed32_.Count > 0) {
- output.WriteFixed32Array(37, field_names[48], repeatedFixed32_);
- }
- if (repeatedFixed64_.Count > 0) {
- output.WriteFixed64Array(38, field_names[49], repeatedFixed64_);
- }
- if (repeatedSfixed32_.Count > 0) {
- output.WriteSFixed32Array(39, field_names[59], repeatedSfixed32_);
- }
- if (repeatedSfixed64_.Count > 0) {
- output.WriteSFixed64Array(40, field_names[60], repeatedSfixed64_);
- }
- if (repeatedFloat_.Count > 0) {
- output.WriteFloatArray(41, field_names[50], repeatedFloat_);
- }
- if (repeatedDouble_.Count > 0) {
- output.WriteDoubleArray(42, field_names[47], repeatedDouble_);
- }
- if (repeatedBool_.Count > 0) {
- output.WriteBoolArray(43, field_names[44], repeatedBool_);
- }
- if (repeatedString_.Count > 0) {
- output.WriteStringArray(44, field_names[63], repeatedString_);
- }
- if (repeatedBytes_.Count > 0) {
- output.WriteBytesArray(45, field_names[45], repeatedBytes_);
- }
- if (repeatedGroup_.Count > 0) {
- output.WriteGroupArray(46, field_names[67], repeatedGroup_);
- }
- if (repeatedNestedMessage_.Count > 0) {
- output.WriteMessageArray(48, field_names[58], repeatedNestedMessage_);
- }
- if (repeatedForeignMessage_.Count > 0) {
- output.WriteMessageArray(49, field_names[52], repeatedForeignMessage_);
- }
- if (repeatedImportMessage_.Count > 0) {
- output.WriteMessageArray(50, field_names[54], repeatedImportMessage_);
- }
- if (repeatedNestedEnum_.Count > 0) {
- output.WriteEnumArray(51, field_names[57], repeatedNestedEnum_);
- }
- if (repeatedForeignEnum_.Count > 0) {
- output.WriteEnumArray(52, field_names[51], repeatedForeignEnum_);
- }
- if (repeatedImportEnum_.Count > 0) {
- output.WriteEnumArray(53, field_names[53], repeatedImportEnum_);
- }
- if (repeatedStringPiece_.Count > 0) {
- output.WriteStringArray(54, field_names[64], repeatedStringPiece_);
- }
- if (repeatedCord_.Count > 0) {
- output.WriteStringArray(55, field_names[46], repeatedCord_);
- }
- if (hasDefaultInt32) {
- output.WriteInt32(61, field_names[9], DefaultInt32);
- }
- if (hasDefaultInt64) {
- output.WriteInt64(62, field_names[10], DefaultInt64);
- }
- if (hasDefaultUint32) {
- output.WriteUInt32(63, field_names[18], DefaultUint32);
- }
- if (hasDefaultUint64) {
- output.WriteUInt64(64, field_names[19], DefaultUint64);
- }
- if (hasDefaultSint32) {
- output.WriteSInt32(65, field_names[14], DefaultSint32);
- }
- if (hasDefaultSint64) {
- output.WriteSInt64(66, field_names[15], DefaultSint64);
- }
- if (hasDefaultFixed32) {
- output.WriteFixed32(67, field_names[4], DefaultFixed32);
- }
- if (hasDefaultFixed64) {
- output.WriteFixed64(68, field_names[5], DefaultFixed64);
- }
- if (hasDefaultSfixed32) {
- output.WriteSFixed32(69, field_names[12], DefaultSfixed32);
- }
- if (hasDefaultSfixed64) {
- output.WriteSFixed64(70, field_names[13], DefaultSfixed64);
- }
- if (hasDefaultFloat) {
- output.WriteFloat(71, field_names[6], DefaultFloat);
- }
- if (hasDefaultDouble) {
- output.WriteDouble(72, field_names[3], DefaultDouble);
- }
- if (hasDefaultBool) {
- output.WriteBool(73, field_names[0], DefaultBool);
- }
- if (hasDefaultString) {
- output.WriteString(74, field_names[16], DefaultString);
- }
- if (hasDefaultBytes) {
- output.WriteBytes(75, field_names[1], DefaultBytes);
- }
- if (hasDefaultNestedEnum) {
- output.WriteEnum(81, field_names[11], (int) DefaultNestedEnum, DefaultNestedEnum);
- }
- if (hasDefaultForeignEnum) {
- output.WriteEnum(82, field_names[7], (int) DefaultForeignEnum, DefaultForeignEnum);
- }
- if (hasDefaultImportEnum) {
- output.WriteEnum(83, field_names[8], (int) DefaultImportEnum, DefaultImportEnum);
- }
- if (hasDefaultStringPiece) {
- output.WriteString(84, field_names[17], DefaultStringPiece);
- }
- if (hasDefaultCord) {
- output.WriteString(85, field_names[2], DefaultCord);
- }
- UnknownFields.WriteTo(output);
- }
-
- private int memoizedSerializedSize = -1;
- public override int SerializedSize {
- get {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
- return CalcSerializedSize();
- }
- }
-
- private int CalcSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- if (hasOptionalInt32) {
- size += pb::CodedOutputStream.ComputeInt32Size(1, OptionalInt32);
- }
- if (hasOptionalInt64) {
- size += pb::CodedOutputStream.ComputeInt64Size(2, OptionalInt64);
- }
- if (hasOptionalUint32) {
- size += pb::CodedOutputStream.ComputeUInt32Size(3, OptionalUint32);
- }
- if (hasOptionalUint64) {
- size += pb::CodedOutputStream.ComputeUInt64Size(4, OptionalUint64);
- }
- if (hasOptionalSint32) {
- size += pb::CodedOutputStream.ComputeSInt32Size(5, OptionalSint32);
- }
- if (hasOptionalSint64) {
- size += pb::CodedOutputStream.ComputeSInt64Size(6, OptionalSint64);
- }
- if (hasOptionalFixed32) {
- size += pb::CodedOutputStream.ComputeFixed32Size(7, OptionalFixed32);
- }
- if (hasOptionalFixed64) {
- size += pb::CodedOutputStream.ComputeFixed64Size(8, OptionalFixed64);
- }
- if (hasOptionalSfixed32) {
- size += pb::CodedOutputStream.ComputeSFixed32Size(9, OptionalSfixed32);
- }
- if (hasOptionalSfixed64) {
- size += pb::CodedOutputStream.ComputeSFixed64Size(10, OptionalSfixed64);
- }
- if (hasOptionalFloat) {
- size += pb::CodedOutputStream.ComputeFloatSize(11, OptionalFloat);
- }
- if (hasOptionalDouble) {
- size += pb::CodedOutputStream.ComputeDoubleSize(12, OptionalDouble);
- }
- if (hasOptionalBool) {
- size += pb::CodedOutputStream.ComputeBoolSize(13, OptionalBool);
- }
- if (hasOptionalString) {
- size += pb::CodedOutputStream.ComputeStringSize(14, OptionalString);
- }
- if (hasOptionalBytes) {
- size += pb::CodedOutputStream.ComputeBytesSize(15, OptionalBytes);
- }
- if (hasOptionalGroup) {
- size += pb::CodedOutputStream.ComputeGroupSize(16, OptionalGroup);
- }
- if (hasOptionalNestedMessage) {
- size += pb::CodedOutputStream.ComputeMessageSize(18, OptionalNestedMessage);
- }
- if (hasOptionalForeignMessage) {
- size += pb::CodedOutputStream.ComputeMessageSize(19, OptionalForeignMessage);
- }
- if (hasOptionalImportMessage) {
- size += pb::CodedOutputStream.ComputeMessageSize(20, OptionalImportMessage);
- }
- if (hasOptionalNestedEnum) {
- size += pb::CodedOutputStream.ComputeEnumSize(21, (int) OptionalNestedEnum);
- }
- if (hasOptionalForeignEnum) {
- size += pb::CodedOutputStream.ComputeEnumSize(22, (int) OptionalForeignEnum);
- }
- if (hasOptionalImportEnum) {
- size += pb::CodedOutputStream.ComputeEnumSize(23, (int) OptionalImportEnum);
- }
- if (hasOptionalStringPiece) {
- size += pb::CodedOutputStream.ComputeStringSize(24, OptionalStringPiece);
- }
- if (hasOptionalCord) {
- size += pb::CodedOutputStream.ComputeStringSize(25, OptionalCord);
- }
- {
- int dataSize = 0;
- foreach (int element in RepeatedInt32List) {
- dataSize += pb::CodedOutputStream.ComputeInt32SizeNoTag(element);
- }
- size += dataSize;
- size += 2 * repeatedInt32_.Count;
- }
- {
- int dataSize = 0;
- foreach (long element in RepeatedInt64List) {
- dataSize += pb::CodedOutputStream.ComputeInt64SizeNoTag(element);
- }
- size += dataSize;
- size += 2 * repeatedInt64_.Count;
- }
- {
- int dataSize = 0;
- foreach (uint element in RepeatedUint32List) {
- dataSize += pb::CodedOutputStream.ComputeUInt32SizeNoTag(element);
- }
- size += dataSize;
- size += 2 * repeatedUint32_.Count;
- }
- {
- int dataSize = 0;
- foreach (ulong element in RepeatedUint64List) {
- dataSize += pb::CodedOutputStream.ComputeUInt64SizeNoTag(element);
- }
- size += dataSize;
- size += 2 * repeatedUint64_.Count;
- }
- {
- int dataSize = 0;
- foreach (int element in RepeatedSint32List) {
- dataSize += pb::CodedOutputStream.ComputeSInt32SizeNoTag(element);
- }
- size += dataSize;
- size += 2 * repeatedSint32_.Count;
- }
- {
- int dataSize = 0;
- foreach (long element in RepeatedSint64List) {
- dataSize += pb::CodedOutputStream.ComputeSInt64SizeNoTag(element);
- }
- size += dataSize;
- size += 2 * repeatedSint64_.Count;
- }
- {
- int dataSize = 0;
- dataSize = 4 * repeatedFixed32_.Count;
- size += dataSize;
- size += 2 * repeatedFixed32_.Count;
- }
- {
- int dataSize = 0;
- dataSize = 8 * repeatedFixed64_.Count;
- size += dataSize;
- size += 2 * repeatedFixed64_.Count;
- }
- {
- int dataSize = 0;
- dataSize = 4 * repeatedSfixed32_.Count;
- size += dataSize;
- size += 2 * repeatedSfixed32_.Count;
- }
- {
- int dataSize = 0;
- dataSize = 8 * repeatedSfixed64_.Count;
- size += dataSize;
- size += 2 * repeatedSfixed64_.Count;
- }
- {
- int dataSize = 0;
- dataSize = 4 * repeatedFloat_.Count;
- size += dataSize;
- size += 2 * repeatedFloat_.Count;
- }
- {
- int dataSize = 0;
- dataSize = 8 * repeatedDouble_.Count;
- size += dataSize;
- size += 2 * repeatedDouble_.Count;
- }
- {
- int dataSize = 0;
- dataSize = 1 * repeatedBool_.Count;
- size += dataSize;
- size += 2 * repeatedBool_.Count;
- }
- {
- int dataSize = 0;
- foreach (string element in RepeatedStringList) {
- dataSize += pb::CodedOutputStream.ComputeStringSizeNoTag(element);
- }
- size += dataSize;
- size += 2 * repeatedString_.Count;
- }
- {
- int dataSize = 0;
- foreach (pb::ByteString element in RepeatedBytesList) {
- dataSize += pb::CodedOutputStream.ComputeBytesSizeNoTag(element);
- }
- size += dataSize;
- size += 2 * repeatedBytes_.Count;
- }
- foreach (global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.RepeatedGroup element in RepeatedGroupList) {
- size += pb::CodedOutputStream.ComputeGroupSize(46, element);
- }
- foreach (global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage element in RepeatedNestedMessageList) {
- size += pb::CodedOutputStream.ComputeMessageSize(48, element);
- }
- foreach (global::Google.ProtocolBuffers.TestProtos.ForeignMessage element in RepeatedForeignMessageList) {
- size += pb::CodedOutputStream.ComputeMessageSize(49, element);
- }
- foreach (global::Google.ProtocolBuffers.TestProtos.ImportMessage element in RepeatedImportMessageList) {
- size += pb::CodedOutputStream.ComputeMessageSize(50, element);
- }
- {
- int dataSize = 0;
- if (repeatedNestedEnum_.Count > 0) {
- foreach (global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedEnum element in repeatedNestedEnum_) {
- dataSize += pb::CodedOutputStream.ComputeEnumSizeNoTag((int) element);
- }
- size += dataSize;
- size += 2 * repeatedNestedEnum_.Count;
- }
- }
- {
- int dataSize = 0;
- if (repeatedForeignEnum_.Count > 0) {
- foreach (global::Google.ProtocolBuffers.TestProtos.ForeignEnum element in repeatedForeignEnum_) {
- dataSize += pb::CodedOutputStream.ComputeEnumSizeNoTag((int) element);
- }
- size += dataSize;
- size += 2 * repeatedForeignEnum_.Count;
- }
- }
- {
- int dataSize = 0;
- if (repeatedImportEnum_.Count > 0) {
- foreach (global::Google.ProtocolBuffers.TestProtos.ImportEnum element in repeatedImportEnum_) {
- dataSize += pb::CodedOutputStream.ComputeEnumSizeNoTag((int) element);
- }
- size += dataSize;
- size += 2 * repeatedImportEnum_.Count;
- }
- }
- {
- int dataSize = 0;
- foreach (string element in RepeatedStringPieceList) {
- dataSize += pb::CodedOutputStream.ComputeStringSizeNoTag(element);
- }
- size += dataSize;
- size += 2 * repeatedStringPiece_.Count;
- }
- {
- int dataSize = 0;
- foreach (string element in RepeatedCordList) {
- dataSize += pb::CodedOutputStream.ComputeStringSizeNoTag(element);
- }
- size += dataSize;
- size += 2 * repeatedCord_.Count;
- }
- if (hasDefaultInt32) {
- size += pb::CodedOutputStream.ComputeInt32Size(61, DefaultInt32);
- }
- if (hasDefaultInt64) {
- size += pb::CodedOutputStream.ComputeInt64Size(62, DefaultInt64);
- }
- if (hasDefaultUint32) {
- size += pb::CodedOutputStream.ComputeUInt32Size(63, DefaultUint32);
- }
- if (hasDefaultUint64) {
- size += pb::CodedOutputStream.ComputeUInt64Size(64, DefaultUint64);
- }
- if (hasDefaultSint32) {
- size += pb::CodedOutputStream.ComputeSInt32Size(65, DefaultSint32);
- }
- if (hasDefaultSint64) {
- size += pb::CodedOutputStream.ComputeSInt64Size(66, DefaultSint64);
- }
- if (hasDefaultFixed32) {
- size += pb::CodedOutputStream.ComputeFixed32Size(67, DefaultFixed32);
- }
- if (hasDefaultFixed64) {
- size += pb::CodedOutputStream.ComputeFixed64Size(68, DefaultFixed64);
- }
- if (hasDefaultSfixed32) {
- size += pb::CodedOutputStream.ComputeSFixed32Size(69, DefaultSfixed32);
- }
- if (hasDefaultSfixed64) {
- size += pb::CodedOutputStream.ComputeSFixed64Size(70, DefaultSfixed64);
- }
- if (hasDefaultFloat) {
- size += pb::CodedOutputStream.ComputeFloatSize(71, DefaultFloat);
- }
- if (hasDefaultDouble) {
- size += pb::CodedOutputStream.ComputeDoubleSize(72, DefaultDouble);
- }
- if (hasDefaultBool) {
- size += pb::CodedOutputStream.ComputeBoolSize(73, DefaultBool);
- }
- if (hasDefaultString) {
- size += pb::CodedOutputStream.ComputeStringSize(74, DefaultString);
- }
- if (hasDefaultBytes) {
- size += pb::CodedOutputStream.ComputeBytesSize(75, DefaultBytes);
- }
- if (hasDefaultNestedEnum) {
- size += pb::CodedOutputStream.ComputeEnumSize(81, (int) DefaultNestedEnum);
- }
- if (hasDefaultForeignEnum) {
- size += pb::CodedOutputStream.ComputeEnumSize(82, (int) DefaultForeignEnum);
- }
- if (hasDefaultImportEnum) {
- size += pb::CodedOutputStream.ComputeEnumSize(83, (int) DefaultImportEnum);
- }
- if (hasDefaultStringPiece) {
- size += pb::CodedOutputStream.ComputeStringSize(84, DefaultStringPiece);
- }
- if (hasDefaultCord) {
- size += pb::CodedOutputStream.ComputeStringSize(85, DefaultCord);
- }
- size += UnknownFields.SerializedSize;
- memoizedSerializedSize = size;
- return size;
- }
- public static TestAllTypes ParseFrom(pb::ByteString data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static TestAllTypes ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static TestAllTypes ParseFrom(byte[] data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static TestAllTypes ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static TestAllTypes ParseFrom(global::System.IO.Stream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static TestAllTypes ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- public static TestAllTypes ParseDelimitedFrom(global::System.IO.Stream input) {
- return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
- }
- public static TestAllTypes ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
- }
- public static TestAllTypes ParseFrom(pb::ICodedInputStream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static TestAllTypes ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- private TestAllTypes MakeReadOnly() {
- repeatedInt32_.MakeReadOnly();
- repeatedInt64_.MakeReadOnly();
- repeatedUint32_.MakeReadOnly();
- repeatedUint64_.MakeReadOnly();
- repeatedSint32_.MakeReadOnly();
- repeatedSint64_.MakeReadOnly();
- repeatedFixed32_.MakeReadOnly();
- repeatedFixed64_.MakeReadOnly();
- repeatedSfixed32_.MakeReadOnly();
- repeatedSfixed64_.MakeReadOnly();
- repeatedFloat_.MakeReadOnly();
- repeatedDouble_.MakeReadOnly();
- repeatedBool_.MakeReadOnly();
- repeatedString_.MakeReadOnly();
- repeatedBytes_.MakeReadOnly();
- repeatedGroup_.MakeReadOnly();
- repeatedNestedMessage_.MakeReadOnly();
- repeatedForeignMessage_.MakeReadOnly();
- repeatedImportMessage_.MakeReadOnly();
- repeatedNestedEnum_.MakeReadOnly();
- repeatedForeignEnum_.MakeReadOnly();
- repeatedImportEnum_.MakeReadOnly();
- repeatedStringPiece_.MakeReadOnly();
- repeatedCord_.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(TestAllTypes prototype) {
- return new Builder(prototype);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class Builder : pb::GeneratedBuilder<TestAllTypes, Builder> {
- protected override Builder ThisBuilder {
- get { return this; }
- }
- public Builder() {
- result = DefaultInstance;
- resultIsReadOnly = true;
- }
- internal Builder(TestAllTypes cloneFrom) {
- result = cloneFrom;
- resultIsReadOnly = true;
- }
-
- private bool resultIsReadOnly;
- private TestAllTypes result;
-
- private TestAllTypes PrepareBuilder() {
- if (resultIsReadOnly) {
- TestAllTypes original = result;
- result = new TestAllTypes();
- resultIsReadOnly = false;
- MergeFrom(original);
- }
- return result;
- }
-
- public override bool IsInitialized {
- get { return result.IsInitialized; }
- }
-
- protected override TestAllTypes 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.TestAllTypes.Descriptor; }
- }
-
- public override TestAllTypes DefaultInstanceForType {
- get { return global::Google.ProtocolBuffers.TestProtos.TestAllTypes.DefaultInstance; }
- }
-
- public override TestAllTypes BuildPartial() {
- if (resultIsReadOnly) {
- return result;
- }
- resultIsReadOnly = true;
- return result.MakeReadOnly();
- }
-
- public override Builder MergeFrom(pb::IMessage other) {
- if (other is TestAllTypes) {
- return MergeFrom((TestAllTypes) other);
- } else {
- base.MergeFrom(other);
- return this;
- }
- }
-
- public override Builder MergeFrom(TestAllTypes other) {
- if (other == global::Google.ProtocolBuffers.TestProtos.TestAllTypes.DefaultInstance) return this;
- PrepareBuilder();
- if (other.HasOptionalInt32) {
- OptionalInt32 = other.OptionalInt32;
- }
- if (other.HasOptionalInt64) {
- OptionalInt64 = other.OptionalInt64;
- }
- if (other.HasOptionalUint32) {
- OptionalUint32 = other.OptionalUint32;
- }
- if (other.HasOptionalUint64) {
- OptionalUint64 = other.OptionalUint64;
- }
- if (other.HasOptionalSint32) {
- OptionalSint32 = other.OptionalSint32;
- }
- if (other.HasOptionalSint64) {
- OptionalSint64 = other.OptionalSint64;
- }
- if (other.HasOptionalFixed32) {
- OptionalFixed32 = other.OptionalFixed32;
- }
- if (other.HasOptionalFixed64) {
- OptionalFixed64 = other.OptionalFixed64;
- }
- if (other.HasOptionalSfixed32) {
- OptionalSfixed32 = other.OptionalSfixed32;
- }
- if (other.HasOptionalSfixed64) {
- OptionalSfixed64 = other.OptionalSfixed64;
- }
- if (other.HasOptionalFloat) {
- OptionalFloat = other.OptionalFloat;
- }
- if (other.HasOptionalDouble) {
- OptionalDouble = other.OptionalDouble;
- }
- if (other.HasOptionalBool) {
- OptionalBool = other.OptionalBool;
- }
- if (other.HasOptionalString) {
- OptionalString = other.OptionalString;
- }
- if (other.HasOptionalBytes) {
- OptionalBytes = other.OptionalBytes;
- }
- if (other.HasOptionalGroup) {
- MergeOptionalGroup(other.OptionalGroup);
- }
- if (other.HasOptionalNestedMessage) {
- MergeOptionalNestedMessage(other.OptionalNestedMessage);
- }
- if (other.HasOptionalForeignMessage) {
- MergeOptionalForeignMessage(other.OptionalForeignMessage);
- }
- if (other.HasOptionalImportMessage) {
- MergeOptionalImportMessage(other.OptionalImportMessage);
- }
- if (other.HasOptionalNestedEnum) {
- OptionalNestedEnum = other.OptionalNestedEnum;
- }
- if (other.HasOptionalForeignEnum) {
- OptionalForeignEnum = other.OptionalForeignEnum;
- }
- if (other.HasOptionalImportEnum) {
- OptionalImportEnum = other.OptionalImportEnum;
- }
- if (other.HasOptionalStringPiece) {
- OptionalStringPiece = other.OptionalStringPiece;
- }
- if (other.HasOptionalCord) {
- OptionalCord = other.OptionalCord;
- }
- if (other.repeatedInt32_.Count != 0) {
- result.repeatedInt32_.Add(other.repeatedInt32_);
- }
- if (other.repeatedInt64_.Count != 0) {
- result.repeatedInt64_.Add(other.repeatedInt64_);
- }
- if (other.repeatedUint32_.Count != 0) {
- result.repeatedUint32_.Add(other.repeatedUint32_);
- }
- if (other.repeatedUint64_.Count != 0) {
- result.repeatedUint64_.Add(other.repeatedUint64_);
- }
- if (other.repeatedSint32_.Count != 0) {
- result.repeatedSint32_.Add(other.repeatedSint32_);
- }
- if (other.repeatedSint64_.Count != 0) {
- result.repeatedSint64_.Add(other.repeatedSint64_);
- }
- if (other.repeatedFixed32_.Count != 0) {
- result.repeatedFixed32_.Add(other.repeatedFixed32_);
- }
- if (other.repeatedFixed64_.Count != 0) {
- result.repeatedFixed64_.Add(other.repeatedFixed64_);
- }
- if (other.repeatedSfixed32_.Count != 0) {
- result.repeatedSfixed32_.Add(other.repeatedSfixed32_);
- }
- if (other.repeatedSfixed64_.Count != 0) {
- result.repeatedSfixed64_.Add(other.repeatedSfixed64_);
- }
- if (other.repeatedFloat_.Count != 0) {
- result.repeatedFloat_.Add(other.repeatedFloat_);
- }
- if (other.repeatedDouble_.Count != 0) {
- result.repeatedDouble_.Add(other.repeatedDouble_);
- }
- if (other.repeatedBool_.Count != 0) {
- result.repeatedBool_.Add(other.repeatedBool_);
- }
- if (other.repeatedString_.Count != 0) {
- result.repeatedString_.Add(other.repeatedString_);
- }
- if (other.repeatedBytes_.Count != 0) {
- result.repeatedBytes_.Add(other.repeatedBytes_);
- }
- if (other.repeatedGroup_.Count != 0) {
- result.repeatedGroup_.Add(other.repeatedGroup_);
- }
- if (other.repeatedNestedMessage_.Count != 0) {
- result.repeatedNestedMessage_.Add(other.repeatedNestedMessage_);
- }
- if (other.repeatedForeignMessage_.Count != 0) {
- result.repeatedForeignMessage_.Add(other.repeatedForeignMessage_);
- }
- if (other.repeatedImportMessage_.Count != 0) {
- result.repeatedImportMessage_.Add(other.repeatedImportMessage_);
- }
- if (other.repeatedNestedEnum_.Count != 0) {
- result.repeatedNestedEnum_.Add(other.repeatedNestedEnum_);
- }
- if (other.repeatedForeignEnum_.Count != 0) {
- result.repeatedForeignEnum_.Add(other.repeatedForeignEnum_);
- }
- if (other.repeatedImportEnum_.Count != 0) {
- result.repeatedImportEnum_.Add(other.repeatedImportEnum_);
- }
- if (other.repeatedStringPiece_.Count != 0) {
- result.repeatedStringPiece_.Add(other.repeatedStringPiece_);
- }
- if (other.repeatedCord_.Count != 0) {
- result.repeatedCord_.Add(other.repeatedCord_);
- }
- if (other.HasDefaultInt32) {
- DefaultInt32 = other.DefaultInt32;
- }
- if (other.HasDefaultInt64) {
- DefaultInt64 = other.DefaultInt64;
- }
- if (other.HasDefaultUint32) {
- DefaultUint32 = other.DefaultUint32;
- }
- if (other.HasDefaultUint64) {
- DefaultUint64 = other.DefaultUint64;
- }
- if (other.HasDefaultSint32) {
- DefaultSint32 = other.DefaultSint32;
- }
- if (other.HasDefaultSint64) {
- DefaultSint64 = other.DefaultSint64;
- }
- if (other.HasDefaultFixed32) {
- DefaultFixed32 = other.DefaultFixed32;
- }
- if (other.HasDefaultFixed64) {
- DefaultFixed64 = other.DefaultFixed64;
- }
- if (other.HasDefaultSfixed32) {
- DefaultSfixed32 = other.DefaultSfixed32;
- }
- if (other.HasDefaultSfixed64) {
- DefaultSfixed64 = other.DefaultSfixed64;
- }
- if (other.HasDefaultFloat) {
- DefaultFloat = other.DefaultFloat;
- }
- if (other.HasDefaultDouble) {
- DefaultDouble = other.DefaultDouble;
- }
- if (other.HasDefaultBool) {
- DefaultBool = other.DefaultBool;
- }
- if (other.HasDefaultString) {
- DefaultString = other.DefaultString;
- }
- if (other.HasDefaultBytes) {
- DefaultBytes = other.DefaultBytes;
- }
- if (other.HasDefaultNestedEnum) {
- DefaultNestedEnum = other.DefaultNestedEnum;
- }
- if (other.HasDefaultForeignEnum) {
- DefaultForeignEnum = other.DefaultForeignEnum;
- }
- if (other.HasDefaultImportEnum) {
- DefaultImportEnum = other.DefaultImportEnum;
- }
- if (other.HasDefaultStringPiece) {
- DefaultStringPiece = other.DefaultStringPiece;
- }
- if (other.HasDefaultCord) {
- DefaultCord = other.DefaultCord;
- }
- 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(_testAllTypesFieldNames, field_name, global::System.StringComparer.Ordinal);
- if(field_ordinal >= 0)
- tag = _testAllTypesFieldTags[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.hasOptionalInt32 = input.ReadInt32(ref result.optionalInt32_);
- break;
- }
- case 16: {
- result.hasOptionalInt64 = input.ReadInt64(ref result.optionalInt64_);
- break;
- }
- case 24: {
- result.hasOptionalUint32 = input.ReadUInt32(ref result.optionalUint32_);
- break;
- }
- case 32: {
- result.hasOptionalUint64 = input.ReadUInt64(ref result.optionalUint64_);
- break;
- }
- case 40: {
- result.hasOptionalSint32 = input.ReadSInt32(ref result.optionalSint32_);
- break;
- }
- case 48: {
- result.hasOptionalSint64 = input.ReadSInt64(ref result.optionalSint64_);
- break;
- }
- case 61: {
- result.hasOptionalFixed32 = input.ReadFixed32(ref result.optionalFixed32_);
- break;
- }
- case 65: {
- result.hasOptionalFixed64 = input.ReadFixed64(ref result.optionalFixed64_);
- break;
- }
- case 77: {
- result.hasOptionalSfixed32 = input.ReadSFixed32(ref result.optionalSfixed32_);
- break;
- }
- case 81: {
- result.hasOptionalSfixed64 = input.ReadSFixed64(ref result.optionalSfixed64_);
- break;
- }
- case 93: {
- result.hasOptionalFloat = input.ReadFloat(ref result.optionalFloat_);
- break;
- }
- case 97: {
- result.hasOptionalDouble = input.ReadDouble(ref result.optionalDouble_);
- break;
- }
- case 104: {
- result.hasOptionalBool = input.ReadBool(ref result.optionalBool_);
- break;
- }
- case 114: {
- result.hasOptionalString = input.ReadString(ref result.optionalString_);
- break;
- }
- case 122: {
- result.hasOptionalBytes = input.ReadBytes(ref result.optionalBytes_);
- break;
- }
- case 131: {
- global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.OptionalGroup.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.OptionalGroup.CreateBuilder();
- if (result.hasOptionalGroup) {
- subBuilder.MergeFrom(OptionalGroup);
- }
- input.ReadGroup(16, subBuilder, extensionRegistry);
- OptionalGroup = subBuilder.BuildPartial();
- break;
- }
- case 146: {
- global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage.CreateBuilder();
- if (result.hasOptionalNestedMessage) {
- subBuilder.MergeFrom(OptionalNestedMessage);
- }
- input.ReadMessage(subBuilder, extensionRegistry);
- OptionalNestedMessage = subBuilder.BuildPartial();
- break;
- }
- case 154: {
- global::Google.ProtocolBuffers.TestProtos.ForeignMessage.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.ForeignMessage.CreateBuilder();
- if (result.hasOptionalForeignMessage) {
- subBuilder.MergeFrom(OptionalForeignMessage);
- }
- input.ReadMessage(subBuilder, extensionRegistry);
- OptionalForeignMessage = subBuilder.BuildPartial();
- break;
- }
- case 162: {
- global::Google.ProtocolBuffers.TestProtos.ImportMessage.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.ImportMessage.CreateBuilder();
- if (result.hasOptionalImportMessage) {
- subBuilder.MergeFrom(OptionalImportMessage);
- }
- input.ReadMessage(subBuilder, extensionRegistry);
- OptionalImportMessage = subBuilder.BuildPartial();
- break;
- }
- case 168: {
- object unknown;
- if(input.ReadEnum(ref result.optionalNestedEnum_, out unknown)) {
- result.hasOptionalNestedEnum = true;
- } else if(unknown is int) {
- if (unknownFields == null) {
- unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
- }
- unknownFields.MergeVarintField(21, (ulong)(int)unknown);
- }
- break;
- }
- case 176: {
- object unknown;
- if(input.ReadEnum(ref result.optionalForeignEnum_, out unknown)) {
- result.hasOptionalForeignEnum = true;
- } else if(unknown is int) {
- if (unknownFields == null) {
- unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
- }
- unknownFields.MergeVarintField(22, (ulong)(int)unknown);
- }
- break;
- }
- case 184: {
- object unknown;
- if(input.ReadEnum(ref result.optionalImportEnum_, out unknown)) {
- result.hasOptionalImportEnum = true;
- } else if(unknown is int) {
- if (unknownFields == null) {
- unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
- }
- unknownFields.MergeVarintField(23, (ulong)(int)unknown);
- }
- break;
- }
- case 194: {
- result.hasOptionalStringPiece = input.ReadString(ref result.optionalStringPiece_);
- break;
- }
- case 202: {
- result.hasOptionalCord = input.ReadString(ref result.optionalCord_);
- break;
- }
- case 250:
- case 248: {
- input.ReadInt32Array(tag, field_name, result.repeatedInt32_);
- break;
- }
- case 258:
- case 256: {
- input.ReadInt64Array(tag, field_name, result.repeatedInt64_);
- break;
- }
- case 266:
- case 264: {
- input.ReadUInt32Array(tag, field_name, result.repeatedUint32_);
- break;
- }
- case 274:
- case 272: {
- input.ReadUInt64Array(tag, field_name, result.repeatedUint64_);
- break;
- }
- case 282:
- case 280: {
- input.ReadSInt32Array(tag, field_name, result.repeatedSint32_);
- break;
- }
- case 290:
- case 288: {
- input.ReadSInt64Array(tag, field_name, result.repeatedSint64_);
- break;
- }
- case 298:
- case 301: {
- input.ReadFixed32Array(tag, field_name, result.repeatedFixed32_);
- break;
- }
- case 306:
- case 305: {
- input.ReadFixed64Array(tag, field_name, result.repeatedFixed64_);
- break;
- }
- case 314:
- case 317: {
- input.ReadSFixed32Array(tag, field_name, result.repeatedSfixed32_);
- break;
- }
- case 322:
- case 321: {
- input.ReadSFixed64Array(tag, field_name, result.repeatedSfixed64_);
- break;
- }
- case 330:
- case 333: {
- input.ReadFloatArray(tag, field_name, result.repeatedFloat_);
- break;
- }
- case 338:
- case 337: {
- input.ReadDoubleArray(tag, field_name, result.repeatedDouble_);
- break;
- }
- case 346:
- case 344: {
- input.ReadBoolArray(tag, field_name, result.repeatedBool_);
- break;
- }
- case 354: {
- input.ReadStringArray(tag, field_name, result.repeatedString_);
- break;
- }
- case 362: {
- input.ReadBytesArray(tag, field_name, result.repeatedBytes_);
- break;
- }
- case 371: {
- input.ReadGroupArray(tag, field_name, result.repeatedGroup_, global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.RepeatedGroup.DefaultInstance, extensionRegistry);
- break;
- }
- case 386: {
- input.ReadMessageArray(tag, field_name, result.repeatedNestedMessage_, global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage.DefaultInstance, extensionRegistry);
- break;
- }
- case 394: {
- input.ReadMessageArray(tag, field_name, result.repeatedForeignMessage_, global::Google.ProtocolBuffers.TestProtos.ForeignMessage.DefaultInstance, extensionRegistry);
- break;
- }
- case 402: {
- input.ReadMessageArray(tag, field_name, result.repeatedImportMessage_, global::Google.ProtocolBuffers.TestProtos.ImportMessage.DefaultInstance, extensionRegistry);
- break;
- }
- case 410:
- case 408: {
- scg::ICollection<object> unknownItems;
- input.ReadEnumArray<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedEnum>(tag, field_name, result.repeatedNestedEnum_, out unknownItems);
- if (unknownItems != null) {
- if (unknownFields == null) {
- unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
- }
- foreach (object rawValue in unknownItems)
- if (rawValue is int)
- unknownFields.MergeVarintField(51, (ulong)(int)rawValue);
- }
- break;
- }
- case 418:
- case 416: {
- scg::ICollection<object> unknownItems;
- input.ReadEnumArray<global::Google.ProtocolBuffers.TestProtos.ForeignEnum>(tag, field_name, result.repeatedForeignEnum_, out unknownItems);
- if (unknownItems != null) {
- if (unknownFields == null) {
- unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
- }
- foreach (object rawValue in unknownItems)
- if (rawValue is int)
- unknownFields.MergeVarintField(52, (ulong)(int)rawValue);
- }
- break;
- }
- case 426:
- case 424: {
- scg::ICollection<object> unknownItems;
- input.ReadEnumArray<global::Google.ProtocolBuffers.TestProtos.ImportEnum>(tag, field_name, result.repeatedImportEnum_, out unknownItems);
- if (unknownItems != null) {
- if (unknownFields == null) {
- unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
- }
- foreach (object rawValue in unknownItems)
- if (rawValue is int)
- unknownFields.MergeVarintField(53, (ulong)(int)rawValue);
- }
- break;
- }
- case 434: {
- input.ReadStringArray(tag, field_name, result.repeatedStringPiece_);
- break;
- }
- case 442: {
- input.ReadStringArray(tag, field_name, result.repeatedCord_);
- break;
- }
- case 488: {
- result.hasDefaultInt32 = input.ReadInt32(ref result.defaultInt32_);
- break;
- }
- case 496: {
- result.hasDefaultInt64 = input.ReadInt64(ref result.defaultInt64_);
- break;
- }
- case 504: {
- result.hasDefaultUint32 = input.ReadUInt32(ref result.defaultUint32_);
- break;
- }
- case 512: {
- result.hasDefaultUint64 = input.ReadUInt64(ref result.defaultUint64_);
- break;
- }
- case 520: {
- result.hasDefaultSint32 = input.ReadSInt32(ref result.defaultSint32_);
- break;
- }
- case 528: {
- result.hasDefaultSint64 = input.ReadSInt64(ref result.defaultSint64_);
- break;
- }
- case 541: {
- result.hasDefaultFixed32 = input.ReadFixed32(ref result.defaultFixed32_);
- break;
- }
- case 545: {
- result.hasDefaultFixed64 = input.ReadFixed64(ref result.defaultFixed64_);
- break;
- }
- case 557: {
- result.hasDefaultSfixed32 = input.ReadSFixed32(ref result.defaultSfixed32_);
- break;
- }
- case 561: {
- result.hasDefaultSfixed64 = input.ReadSFixed64(ref result.defaultSfixed64_);
- break;
- }
- case 573: {
- result.hasDefaultFloat = input.ReadFloat(ref result.defaultFloat_);
- break;
- }
- case 577: {
- result.hasDefaultDouble = input.ReadDouble(ref result.defaultDouble_);
- break;
- }
- case 584: {
- result.hasDefaultBool = input.ReadBool(ref result.defaultBool_);
- break;
- }
- case 594: {
- result.hasDefaultString = input.ReadString(ref result.defaultString_);
- break;
- }
- case 602: {
- result.hasDefaultBytes = input.ReadBytes(ref result.defaultBytes_);
- break;
- }
- case 648: {
- object unknown;
- if(input.ReadEnum(ref result.defaultNestedEnum_, out unknown)) {
- result.hasDefaultNestedEnum = true;
- } else if(unknown is int) {
- if (unknownFields == null) {
- unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
- }
- unknownFields.MergeVarintField(81, (ulong)(int)unknown);
- }
- break;
- }
- case 656: {
- object unknown;
- if(input.ReadEnum(ref result.defaultForeignEnum_, out unknown)) {
- result.hasDefaultForeignEnum = true;
- } else if(unknown is int) {
- if (unknownFields == null) {
- unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
- }
- unknownFields.MergeVarintField(82, (ulong)(int)unknown);
- }
- break;
- }
- case 664: {
- object unknown;
- if(input.ReadEnum(ref result.defaultImportEnum_, out unknown)) {
- result.hasDefaultImportEnum = true;
- } else if(unknown is int) {
- if (unknownFields == null) {
- unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
- }
- unknownFields.MergeVarintField(83, (ulong)(int)unknown);
- }
- break;
- }
- case 674: {
- result.hasDefaultStringPiece = input.ReadString(ref result.defaultStringPiece_);
- break;
- }
- case 682: {
- result.hasDefaultCord = input.ReadString(ref result.defaultCord_);
- break;
- }
- }
- }
-
- if (unknownFields != null) {
- this.UnknownFields = unknownFields.Build();
- }
- return this;
- }
-
-
- public bool HasOptionalInt32 {
- get { return result.hasOptionalInt32; }
- }
- public int OptionalInt32 {
- get { return result.OptionalInt32; }
- set { SetOptionalInt32(value); }
- }
- public Builder SetOptionalInt32(int value) {
- PrepareBuilder();
- result.hasOptionalInt32 = true;
- result.optionalInt32_ = value;
- return this;
- }
- public Builder ClearOptionalInt32() {
- PrepareBuilder();
- result.hasOptionalInt32 = false;
- result.optionalInt32_ = 0;
- return this;
- }
-
- public bool HasOptionalInt64 {
- get { return result.hasOptionalInt64; }
- }
- public long OptionalInt64 {
- get { return result.OptionalInt64; }
- set { SetOptionalInt64(value); }
- }
- public Builder SetOptionalInt64(long value) {
- PrepareBuilder();
- result.hasOptionalInt64 = true;
- result.optionalInt64_ = value;
- return this;
- }
- public Builder ClearOptionalInt64() {
- PrepareBuilder();
- result.hasOptionalInt64 = false;
- result.optionalInt64_ = 0L;
- return this;
- }
-
- public bool HasOptionalUint32 {
- get { return result.hasOptionalUint32; }
- }
- [global::System.CLSCompliant(false)]
- public uint OptionalUint32 {
- get { return result.OptionalUint32; }
- set { SetOptionalUint32(value); }
- }
- [global::System.CLSCompliant(false)]
- public Builder SetOptionalUint32(uint value) {
- PrepareBuilder();
- result.hasOptionalUint32 = true;
- result.optionalUint32_ = value;
- return this;
- }
- public Builder ClearOptionalUint32() {
- PrepareBuilder();
- result.hasOptionalUint32 = false;
- result.optionalUint32_ = 0;
- return this;
- }
-
- public bool HasOptionalUint64 {
- get { return result.hasOptionalUint64; }
- }
- [global::System.CLSCompliant(false)]
- public ulong OptionalUint64 {
- get { return result.OptionalUint64; }
- set { SetOptionalUint64(value); }
- }
- [global::System.CLSCompliant(false)]
- public Builder SetOptionalUint64(ulong value) {
- PrepareBuilder();
- result.hasOptionalUint64 = true;
- result.optionalUint64_ = value;
- return this;
- }
- public Builder ClearOptionalUint64() {
- PrepareBuilder();
- result.hasOptionalUint64 = false;
- result.optionalUint64_ = 0UL;
- return this;
- }
-
- public bool HasOptionalSint32 {
- get { return result.hasOptionalSint32; }
- }
- public int OptionalSint32 {
- get { return result.OptionalSint32; }
- set { SetOptionalSint32(value); }
- }
- public Builder SetOptionalSint32(int value) {
- PrepareBuilder();
- result.hasOptionalSint32 = true;
- result.optionalSint32_ = value;
- return this;
- }
- public Builder ClearOptionalSint32() {
- PrepareBuilder();
- result.hasOptionalSint32 = false;
- result.optionalSint32_ = 0;
- return this;
- }
-
- public bool HasOptionalSint64 {
- get { return result.hasOptionalSint64; }
- }
- public long OptionalSint64 {
- get { return result.OptionalSint64; }
- set { SetOptionalSint64(value); }
- }
- public Builder SetOptionalSint64(long value) {
- PrepareBuilder();
- result.hasOptionalSint64 = true;
- result.optionalSint64_ = value;
- return this;
- }
- public Builder ClearOptionalSint64() {
- PrepareBuilder();
- result.hasOptionalSint64 = false;
- result.optionalSint64_ = 0;
- return this;
- }
-
- public bool HasOptionalFixed32 {
- get { return result.hasOptionalFixed32; }
- }
- [global::System.CLSCompliant(false)]
- public uint OptionalFixed32 {
- get { return result.OptionalFixed32; }
- set { SetOptionalFixed32(value); }
- }
- [global::System.CLSCompliant(false)]
- public Builder SetOptionalFixed32(uint value) {
- PrepareBuilder();
- result.hasOptionalFixed32 = true;
- result.optionalFixed32_ = value;
- return this;
- }
- public Builder ClearOptionalFixed32() {
- PrepareBuilder();
- result.hasOptionalFixed32 = false;
- result.optionalFixed32_ = 0;
- return this;
- }
-
- public bool HasOptionalFixed64 {
- get { return result.hasOptionalFixed64; }
- }
- [global::System.CLSCompliant(false)]
- public ulong OptionalFixed64 {
- get { return result.OptionalFixed64; }
- set { SetOptionalFixed64(value); }
- }
- [global::System.CLSCompliant(false)]
- public Builder SetOptionalFixed64(ulong value) {
- PrepareBuilder();
- result.hasOptionalFixed64 = true;
- result.optionalFixed64_ = value;
- return this;
- }
- public Builder ClearOptionalFixed64() {
- PrepareBuilder();
- result.hasOptionalFixed64 = false;
- result.optionalFixed64_ = 0;
- return this;
- }
-
- public bool HasOptionalSfixed32 {
- get { return result.hasOptionalSfixed32; }
- }
- public int OptionalSfixed32 {
- get { return result.OptionalSfixed32; }
- set { SetOptionalSfixed32(value); }
- }
- public Builder SetOptionalSfixed32(int value) {
- PrepareBuilder();
- result.hasOptionalSfixed32 = true;
- result.optionalSfixed32_ = value;
- return this;
- }
- public Builder ClearOptionalSfixed32() {
- PrepareBuilder();
- result.hasOptionalSfixed32 = false;
- result.optionalSfixed32_ = 0;
- return this;
- }
-
- public bool HasOptionalSfixed64 {
- get { return result.hasOptionalSfixed64; }
- }
- public long OptionalSfixed64 {
- get { return result.OptionalSfixed64; }
- set { SetOptionalSfixed64(value); }
- }
- public Builder SetOptionalSfixed64(long value) {
- PrepareBuilder();
- result.hasOptionalSfixed64 = true;
- result.optionalSfixed64_ = value;
- return this;
- }
- public Builder ClearOptionalSfixed64() {
- PrepareBuilder();
- result.hasOptionalSfixed64 = false;
- result.optionalSfixed64_ = 0;
- return this;
- }
-
- public bool HasOptionalFloat {
- get { return result.hasOptionalFloat; }
- }
- public float OptionalFloat {
- get { return result.OptionalFloat; }
- set { SetOptionalFloat(value); }
- }
- public Builder SetOptionalFloat(float value) {
- PrepareBuilder();
- result.hasOptionalFloat = true;
- result.optionalFloat_ = value;
- return this;
- }
- public Builder ClearOptionalFloat() {
- PrepareBuilder();
- result.hasOptionalFloat = false;
- result.optionalFloat_ = 0F;
- return this;
- }
-
- public bool HasOptionalDouble {
- get { return result.hasOptionalDouble; }
- }
- public double OptionalDouble {
- get { return result.OptionalDouble; }
- set { SetOptionalDouble(value); }
- }
- public Builder SetOptionalDouble(double value) {
- PrepareBuilder();
- result.hasOptionalDouble = true;
- result.optionalDouble_ = value;
- return this;
- }
- public Builder ClearOptionalDouble() {
- PrepareBuilder();
- result.hasOptionalDouble = false;
- result.optionalDouble_ = 0D;
- return this;
- }
-
- public bool HasOptionalBool {
- get { return result.hasOptionalBool; }
- }
- public bool OptionalBool {
- get { return result.OptionalBool; }
- set { SetOptionalBool(value); }
- }
- public Builder SetOptionalBool(bool value) {
- PrepareBuilder();
- result.hasOptionalBool = true;
- result.optionalBool_ = value;
- return this;
- }
- public Builder ClearOptionalBool() {
- PrepareBuilder();
- result.hasOptionalBool = false;
- result.optionalBool_ = false;
- return this;
- }
-
- public bool HasOptionalString {
- get { return result.hasOptionalString; }
- }
- public string OptionalString {
- get { return result.OptionalString; }
- set { SetOptionalString(value); }
- }
- public Builder SetOptionalString(string value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.hasOptionalString = true;
- result.optionalString_ = value;
- return this;
- }
- public Builder ClearOptionalString() {
- PrepareBuilder();
- result.hasOptionalString = false;
- result.optionalString_ = "";
- return this;
- }
-
- public bool HasOptionalBytes {
- get { return result.hasOptionalBytes; }
- }
- public pb::ByteString OptionalBytes {
- get { return result.OptionalBytes; }
- set { SetOptionalBytes(value); }
- }
- public Builder SetOptionalBytes(pb::ByteString value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.hasOptionalBytes = true;
- result.optionalBytes_ = value;
- return this;
- }
- public Builder ClearOptionalBytes() {
- PrepareBuilder();
- result.hasOptionalBytes = false;
- result.optionalBytes_ = pb::ByteString.Empty;
- return this;
- }
-
- public bool HasOptionalGroup {
- get { return result.hasOptionalGroup; }
- }
- public global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.OptionalGroup OptionalGroup {
- get { return result.OptionalGroup; }
- set { SetOptionalGroup(value); }
- }
- public Builder SetOptionalGroup(global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.OptionalGroup value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.hasOptionalGroup = true;
- result.optionalGroup_ = value;
- return this;
- }
- public Builder SetOptionalGroup(global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.OptionalGroup.Builder builderForValue) {
- pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
- PrepareBuilder();
- result.hasOptionalGroup = true;
- result.optionalGroup_ = builderForValue.Build();
- return this;
- }
- public Builder MergeOptionalGroup(global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.OptionalGroup value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- if (result.hasOptionalGroup &&
- result.optionalGroup_ != global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.OptionalGroup.DefaultInstance) {
- result.optionalGroup_ = global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.OptionalGroup.CreateBuilder(result.optionalGroup_).MergeFrom(value).BuildPartial();
- } else {
- result.optionalGroup_ = value;
- }
- result.hasOptionalGroup = true;
- return this;
- }
- public Builder ClearOptionalGroup() {
- PrepareBuilder();
- result.hasOptionalGroup = false;
- result.optionalGroup_ = null;
- return this;
- }
-
- public bool HasOptionalNestedMessage {
- get { return result.hasOptionalNestedMessage; }
- }
- public global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage OptionalNestedMessage {
- get { return result.OptionalNestedMessage; }
- set { SetOptionalNestedMessage(value); }
- }
- public Builder SetOptionalNestedMessage(global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.hasOptionalNestedMessage = true;
- result.optionalNestedMessage_ = value;
- return this;
- }
- public Builder SetOptionalNestedMessage(global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage.Builder builderForValue) {
- pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
- PrepareBuilder();
- result.hasOptionalNestedMessage = true;
- result.optionalNestedMessage_ = builderForValue.Build();
- return this;
- }
- public Builder MergeOptionalNestedMessage(global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- if (result.hasOptionalNestedMessage &&
- result.optionalNestedMessage_ != global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage.DefaultInstance) {
- result.optionalNestedMessage_ = global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage.CreateBuilder(result.optionalNestedMessage_).MergeFrom(value).BuildPartial();
- } else {
- result.optionalNestedMessage_ = value;
- }
- result.hasOptionalNestedMessage = true;
- return this;
- }
- public Builder ClearOptionalNestedMessage() {
- PrepareBuilder();
- result.hasOptionalNestedMessage = false;
- result.optionalNestedMessage_ = null;
- return this;
- }
-
- public bool HasOptionalForeignMessage {
- get { return result.hasOptionalForeignMessage; }
- }
- public global::Google.ProtocolBuffers.TestProtos.ForeignMessage OptionalForeignMessage {
- get { return result.OptionalForeignMessage; }
- set { SetOptionalForeignMessage(value); }
- }
- public Builder SetOptionalForeignMessage(global::Google.ProtocolBuffers.TestProtos.ForeignMessage value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.hasOptionalForeignMessage = true;
- result.optionalForeignMessage_ = value;
- return this;
- }
- public Builder SetOptionalForeignMessage(global::Google.ProtocolBuffers.TestProtos.ForeignMessage.Builder builderForValue) {
- pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
- PrepareBuilder();
- result.hasOptionalForeignMessage = true;
- result.optionalForeignMessage_ = builderForValue.Build();
- return this;
- }
- public Builder MergeOptionalForeignMessage(global::Google.ProtocolBuffers.TestProtos.ForeignMessage value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- if (result.hasOptionalForeignMessage &&
- result.optionalForeignMessage_ != global::Google.ProtocolBuffers.TestProtos.ForeignMessage.DefaultInstance) {
- result.optionalForeignMessage_ = global::Google.ProtocolBuffers.TestProtos.ForeignMessage.CreateBuilder(result.optionalForeignMessage_).MergeFrom(value).BuildPartial();
- } else {
- result.optionalForeignMessage_ = value;
- }
- result.hasOptionalForeignMessage = true;
- return this;
- }
- public Builder ClearOptionalForeignMessage() {
- PrepareBuilder();
- result.hasOptionalForeignMessage = false;
- result.optionalForeignMessage_ = null;
- return this;
- }
-
- public bool HasOptionalImportMessage {
- get { return result.hasOptionalImportMessage; }
- }
- public global::Google.ProtocolBuffers.TestProtos.ImportMessage OptionalImportMessage {
- get { return result.OptionalImportMessage; }
- set { SetOptionalImportMessage(value); }
- }
- public Builder SetOptionalImportMessage(global::Google.ProtocolBuffers.TestProtos.ImportMessage value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.hasOptionalImportMessage = true;
- result.optionalImportMessage_ = value;
- return this;
- }
- public Builder SetOptionalImportMessage(global::Google.ProtocolBuffers.TestProtos.ImportMessage.Builder builderForValue) {
- pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
- PrepareBuilder();
- result.hasOptionalImportMessage = true;
- result.optionalImportMessage_ = builderForValue.Build();
- return this;
- }
- public Builder MergeOptionalImportMessage(global::Google.ProtocolBuffers.TestProtos.ImportMessage value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- if (result.hasOptionalImportMessage &&
- result.optionalImportMessage_ != global::Google.ProtocolBuffers.TestProtos.ImportMessage.DefaultInstance) {
- result.optionalImportMessage_ = global::Google.ProtocolBuffers.TestProtos.ImportMessage.CreateBuilder(result.optionalImportMessage_).MergeFrom(value).BuildPartial();
- } else {
- result.optionalImportMessage_ = value;
- }
- result.hasOptionalImportMessage = true;
- return this;
- }
- public Builder ClearOptionalImportMessage() {
- PrepareBuilder();
- result.hasOptionalImportMessage = false;
- result.optionalImportMessage_ = null;
- return this;
- }
-
- public bool HasOptionalNestedEnum {
- get { return result.hasOptionalNestedEnum; }
- }
- public global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedEnum OptionalNestedEnum {
- get { return result.OptionalNestedEnum; }
- set { SetOptionalNestedEnum(value); }
- }
- public Builder SetOptionalNestedEnum(global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedEnum value) {
- PrepareBuilder();
- result.hasOptionalNestedEnum = true;
- result.optionalNestedEnum_ = value;
- return this;
- }
- public Builder ClearOptionalNestedEnum() {
- PrepareBuilder();
- result.hasOptionalNestedEnum = false;
- result.optionalNestedEnum_ = global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedEnum.FOO;
- return this;
- }
-
- public bool HasOptionalForeignEnum {
- get { return result.hasOptionalForeignEnum; }
- }
- public global::Google.ProtocolBuffers.TestProtos.ForeignEnum OptionalForeignEnum {
- get { return result.OptionalForeignEnum; }
- set { SetOptionalForeignEnum(value); }
- }
- public Builder SetOptionalForeignEnum(global::Google.ProtocolBuffers.TestProtos.ForeignEnum value) {
- PrepareBuilder();
- result.hasOptionalForeignEnum = true;
- result.optionalForeignEnum_ = value;
- return this;
- }
- public Builder ClearOptionalForeignEnum() {
- PrepareBuilder();
- result.hasOptionalForeignEnum = false;
- result.optionalForeignEnum_ = global::Google.ProtocolBuffers.TestProtos.ForeignEnum.FOREIGN_FOO;
- return this;
- }
-
- public bool HasOptionalImportEnum {
- get { return result.hasOptionalImportEnum; }
- }
- public global::Google.ProtocolBuffers.TestProtos.ImportEnum OptionalImportEnum {
- get { return result.OptionalImportEnum; }
- set { SetOptionalImportEnum(value); }
- }
- public Builder SetOptionalImportEnum(global::Google.ProtocolBuffers.TestProtos.ImportEnum value) {
- PrepareBuilder();
- result.hasOptionalImportEnum = true;
- result.optionalImportEnum_ = value;
- return this;
- }
- public Builder ClearOptionalImportEnum() {
- PrepareBuilder();
- result.hasOptionalImportEnum = false;
- result.optionalImportEnum_ = global::Google.ProtocolBuffers.TestProtos.ImportEnum.IMPORT_FOO;
- return this;
- }
-
- public bool HasOptionalStringPiece {
- get { return result.hasOptionalStringPiece; }
- }
- public string OptionalStringPiece {
- get { return result.OptionalStringPiece; }
- set { SetOptionalStringPiece(value); }
- }
- public Builder SetOptionalStringPiece(string value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.hasOptionalStringPiece = true;
- result.optionalStringPiece_ = value;
- return this;
- }
- public Builder ClearOptionalStringPiece() {
- PrepareBuilder();
- result.hasOptionalStringPiece = false;
- result.optionalStringPiece_ = "";
- return this;
- }
-
- public bool HasOptionalCord {
- get { return result.hasOptionalCord; }
- }
- public string OptionalCord {
- get { return result.OptionalCord; }
- set { SetOptionalCord(value); }
- }
- public Builder SetOptionalCord(string value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.hasOptionalCord = true;
- result.optionalCord_ = value;
- return this;
- }
- public Builder ClearOptionalCord() {
- PrepareBuilder();
- result.hasOptionalCord = false;
- result.optionalCord_ = "";
- return this;
- }
-
- public pbc::IPopsicleList<int> RepeatedInt32List {
- get { return PrepareBuilder().repeatedInt32_; }
- }
- public int RepeatedInt32Count {
- get { return result.RepeatedInt32Count; }
- }
- public int GetRepeatedInt32(int index) {
- return result.GetRepeatedInt32(index);
- }
- public Builder SetRepeatedInt32(int index, int value) {
- PrepareBuilder();
- result.repeatedInt32_[index] = value;
- return this;
- }
- public Builder AddRepeatedInt32(int value) {
- PrepareBuilder();
- result.repeatedInt32_.Add(value);
- return this;
- }
- public Builder AddRangeRepeatedInt32(scg::IEnumerable<int> values) {
- PrepareBuilder();
- result.repeatedInt32_.Add(values);
- return this;
- }
- public Builder ClearRepeatedInt32() {
- PrepareBuilder();
- result.repeatedInt32_.Clear();
- return this;
- }
-
- public pbc::IPopsicleList<long> RepeatedInt64List {
- get { return PrepareBuilder().repeatedInt64_; }
- }
- public int RepeatedInt64Count {
- get { return result.RepeatedInt64Count; }
- }
- public long GetRepeatedInt64(int index) {
- return result.GetRepeatedInt64(index);
- }
- public Builder SetRepeatedInt64(int index, long value) {
- PrepareBuilder();
- result.repeatedInt64_[index] = value;
- return this;
- }
- public Builder AddRepeatedInt64(long value) {
- PrepareBuilder();
- result.repeatedInt64_.Add(value);
- return this;
- }
- public Builder AddRangeRepeatedInt64(scg::IEnumerable<long> values) {
- PrepareBuilder();
- result.repeatedInt64_.Add(values);
- return this;
- }
- public Builder ClearRepeatedInt64() {
- PrepareBuilder();
- result.repeatedInt64_.Clear();
- return this;
- }
-
- [global::System.CLSCompliant(false)]
- public pbc::IPopsicleList<uint> RepeatedUint32List {
- get { return PrepareBuilder().repeatedUint32_; }
- }
- public int RepeatedUint32Count {
- get { return result.RepeatedUint32Count; }
- }
- [global::System.CLSCompliant(false)]
- public uint GetRepeatedUint32(int index) {
- return result.GetRepeatedUint32(index);
- }
- [global::System.CLSCompliant(false)]
- public Builder SetRepeatedUint32(int index, uint value) {
- PrepareBuilder();
- result.repeatedUint32_[index] = value;
- return this;
- }
- [global::System.CLSCompliant(false)]
- public Builder AddRepeatedUint32(uint value) {
- PrepareBuilder();
- result.repeatedUint32_.Add(value);
- return this;
- }
- [global::System.CLSCompliant(false)]
- public Builder AddRangeRepeatedUint32(scg::IEnumerable<uint> values) {
- PrepareBuilder();
- result.repeatedUint32_.Add(values);
- return this;
- }
- public Builder ClearRepeatedUint32() {
- PrepareBuilder();
- result.repeatedUint32_.Clear();
- return this;
- }
-
- [global::System.CLSCompliant(false)]
- public pbc::IPopsicleList<ulong> RepeatedUint64List {
- get { return PrepareBuilder().repeatedUint64_; }
- }
- public int RepeatedUint64Count {
- get { return result.RepeatedUint64Count; }
- }
- [global::System.CLSCompliant(false)]
- public ulong GetRepeatedUint64(int index) {
- return result.GetRepeatedUint64(index);
- }
- [global::System.CLSCompliant(false)]
- public Builder SetRepeatedUint64(int index, ulong value) {
- PrepareBuilder();
- result.repeatedUint64_[index] = value;
- return this;
- }
- [global::System.CLSCompliant(false)]
- public Builder AddRepeatedUint64(ulong value) {
- PrepareBuilder();
- result.repeatedUint64_.Add(value);
- return this;
- }
- [global::System.CLSCompliant(false)]
- public Builder AddRangeRepeatedUint64(scg::IEnumerable<ulong> values) {
- PrepareBuilder();
- result.repeatedUint64_.Add(values);
- return this;
- }
- public Builder ClearRepeatedUint64() {
- PrepareBuilder();
- result.repeatedUint64_.Clear();
- return this;
- }
-
- public pbc::IPopsicleList<int> RepeatedSint32List {
- get { return PrepareBuilder().repeatedSint32_; }
- }
- public int RepeatedSint32Count {
- get { return result.RepeatedSint32Count; }
- }
- public int GetRepeatedSint32(int index) {
- return result.GetRepeatedSint32(index);
- }
- public Builder SetRepeatedSint32(int index, int value) {
- PrepareBuilder();
- result.repeatedSint32_[index] = value;
- return this;
- }
- public Builder AddRepeatedSint32(int value) {
- PrepareBuilder();
- result.repeatedSint32_.Add(value);
- return this;
- }
- public Builder AddRangeRepeatedSint32(scg::IEnumerable<int> values) {
- PrepareBuilder();
- result.repeatedSint32_.Add(values);
- return this;
- }
- public Builder ClearRepeatedSint32() {
- PrepareBuilder();
- result.repeatedSint32_.Clear();
- return this;
- }
-
- public pbc::IPopsicleList<long> RepeatedSint64List {
- get { return PrepareBuilder().repeatedSint64_; }
- }
- public int RepeatedSint64Count {
- get { return result.RepeatedSint64Count; }
- }
- public long GetRepeatedSint64(int index) {
- return result.GetRepeatedSint64(index);
- }
- public Builder SetRepeatedSint64(int index, long value) {
- PrepareBuilder();
- result.repeatedSint64_[index] = value;
- return this;
- }
- public Builder AddRepeatedSint64(long value) {
- PrepareBuilder();
- result.repeatedSint64_.Add(value);
- return this;
- }
- public Builder AddRangeRepeatedSint64(scg::IEnumerable<long> values) {
- PrepareBuilder();
- result.repeatedSint64_.Add(values);
- return this;
- }
- public Builder ClearRepeatedSint64() {
- PrepareBuilder();
- result.repeatedSint64_.Clear();
- return this;
- }
-
- [global::System.CLSCompliant(false)]
- public pbc::IPopsicleList<uint> RepeatedFixed32List {
- get { return PrepareBuilder().repeatedFixed32_; }
- }
- public int RepeatedFixed32Count {
- get { return result.RepeatedFixed32Count; }
- }
- [global::System.CLSCompliant(false)]
- public uint GetRepeatedFixed32(int index) {
- return result.GetRepeatedFixed32(index);
- }
- [global::System.CLSCompliant(false)]
- public Builder SetRepeatedFixed32(int index, uint value) {
- PrepareBuilder();
- result.repeatedFixed32_[index] = value;
- return this;
- }
- [global::System.CLSCompliant(false)]
- public Builder AddRepeatedFixed32(uint value) {
- PrepareBuilder();
- result.repeatedFixed32_.Add(value);
- return this;
- }
- [global::System.CLSCompliant(false)]
- public Builder AddRangeRepeatedFixed32(scg::IEnumerable<uint> values) {
- PrepareBuilder();
- result.repeatedFixed32_.Add(values);
- return this;
- }
- public Builder ClearRepeatedFixed32() {
- PrepareBuilder();
- result.repeatedFixed32_.Clear();
- return this;
- }
-
- [global::System.CLSCompliant(false)]
- public pbc::IPopsicleList<ulong> RepeatedFixed64List {
- get { return PrepareBuilder().repeatedFixed64_; }
- }
- public int RepeatedFixed64Count {
- get { return result.RepeatedFixed64Count; }
- }
- [global::System.CLSCompliant(false)]
- public ulong GetRepeatedFixed64(int index) {
- return result.GetRepeatedFixed64(index);
- }
- [global::System.CLSCompliant(false)]
- public Builder SetRepeatedFixed64(int index, ulong value) {
- PrepareBuilder();
- result.repeatedFixed64_[index] = value;
- return this;
- }
- [global::System.CLSCompliant(false)]
- public Builder AddRepeatedFixed64(ulong value) {
- PrepareBuilder();
- result.repeatedFixed64_.Add(value);
- return this;
- }
- [global::System.CLSCompliant(false)]
- public Builder AddRangeRepeatedFixed64(scg::IEnumerable<ulong> values) {
- PrepareBuilder();
- result.repeatedFixed64_.Add(values);
- return this;
- }
- public Builder ClearRepeatedFixed64() {
- PrepareBuilder();
- result.repeatedFixed64_.Clear();
- return this;
- }
-
- public pbc::IPopsicleList<int> RepeatedSfixed32List {
- get { return PrepareBuilder().repeatedSfixed32_; }
- }
- public int RepeatedSfixed32Count {
- get { return result.RepeatedSfixed32Count; }
- }
- public int GetRepeatedSfixed32(int index) {
- return result.GetRepeatedSfixed32(index);
- }
- public Builder SetRepeatedSfixed32(int index, int value) {
- PrepareBuilder();
- result.repeatedSfixed32_[index] = value;
- return this;
- }
- public Builder AddRepeatedSfixed32(int value) {
- PrepareBuilder();
- result.repeatedSfixed32_.Add(value);
- return this;
- }
- public Builder AddRangeRepeatedSfixed32(scg::IEnumerable<int> values) {
- PrepareBuilder();
- result.repeatedSfixed32_.Add(values);
- return this;
- }
- public Builder ClearRepeatedSfixed32() {
- PrepareBuilder();
- result.repeatedSfixed32_.Clear();
- return this;
- }
-
- public pbc::IPopsicleList<long> RepeatedSfixed64List {
- get { return PrepareBuilder().repeatedSfixed64_; }
- }
- public int RepeatedSfixed64Count {
- get { return result.RepeatedSfixed64Count; }
- }
- public long GetRepeatedSfixed64(int index) {
- return result.GetRepeatedSfixed64(index);
- }
- public Builder SetRepeatedSfixed64(int index, long value) {
- PrepareBuilder();
- result.repeatedSfixed64_[index] = value;
- return this;
- }
- public Builder AddRepeatedSfixed64(long value) {
- PrepareBuilder();
- result.repeatedSfixed64_.Add(value);
- return this;
- }
- public Builder AddRangeRepeatedSfixed64(scg::IEnumerable<long> values) {
- PrepareBuilder();
- result.repeatedSfixed64_.Add(values);
- return this;
- }
- public Builder ClearRepeatedSfixed64() {
- PrepareBuilder();
- result.repeatedSfixed64_.Clear();
- return this;
- }
-
- public pbc::IPopsicleList<float> RepeatedFloatList {
- get { return PrepareBuilder().repeatedFloat_; }
- }
- public int RepeatedFloatCount {
- get { return result.RepeatedFloatCount; }
- }
- public float GetRepeatedFloat(int index) {
- return result.GetRepeatedFloat(index);
- }
- public Builder SetRepeatedFloat(int index, float value) {
- PrepareBuilder();
- result.repeatedFloat_[index] = value;
- return this;
- }
- public Builder AddRepeatedFloat(float value) {
- PrepareBuilder();
- result.repeatedFloat_.Add(value);
- return this;
- }
- public Builder AddRangeRepeatedFloat(scg::IEnumerable<float> values) {
- PrepareBuilder();
- result.repeatedFloat_.Add(values);
- return this;
- }
- public Builder ClearRepeatedFloat() {
- PrepareBuilder();
- result.repeatedFloat_.Clear();
- return this;
- }
-
- public pbc::IPopsicleList<double> RepeatedDoubleList {
- get { return PrepareBuilder().repeatedDouble_; }
- }
- public int RepeatedDoubleCount {
- get { return result.RepeatedDoubleCount; }
- }
- public double GetRepeatedDouble(int index) {
- return result.GetRepeatedDouble(index);
- }
- public Builder SetRepeatedDouble(int index, double value) {
- PrepareBuilder();
- result.repeatedDouble_[index] = value;
- return this;
- }
- public Builder AddRepeatedDouble(double value) {
- PrepareBuilder();
- result.repeatedDouble_.Add(value);
- return this;
- }
- public Builder AddRangeRepeatedDouble(scg::IEnumerable<double> values) {
- PrepareBuilder();
- result.repeatedDouble_.Add(values);
- return this;
- }
- public Builder ClearRepeatedDouble() {
- PrepareBuilder();
- result.repeatedDouble_.Clear();
- return this;
- }
-
- public pbc::IPopsicleList<bool> RepeatedBoolList {
- get { return PrepareBuilder().repeatedBool_; }
- }
- public int RepeatedBoolCount {
- get { return result.RepeatedBoolCount; }
- }
- public bool GetRepeatedBool(int index) {
- return result.GetRepeatedBool(index);
- }
- public Builder SetRepeatedBool(int index, bool value) {
- PrepareBuilder();
- result.repeatedBool_[index] = value;
- return this;
- }
- public Builder AddRepeatedBool(bool value) {
- PrepareBuilder();
- result.repeatedBool_.Add(value);
- return this;
- }
- public Builder AddRangeRepeatedBool(scg::IEnumerable<bool> values) {
- PrepareBuilder();
- result.repeatedBool_.Add(values);
- return this;
- }
- public Builder ClearRepeatedBool() {
- PrepareBuilder();
- result.repeatedBool_.Clear();
- return this;
- }
-
- public pbc::IPopsicleList<string> RepeatedStringList {
- get { return PrepareBuilder().repeatedString_; }
- }
- public int RepeatedStringCount {
- get { return result.RepeatedStringCount; }
- }
- public string GetRepeatedString(int index) {
- return result.GetRepeatedString(index);
- }
- public Builder SetRepeatedString(int index, string value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.repeatedString_[index] = value;
- return this;
- }
- public Builder AddRepeatedString(string value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.repeatedString_.Add(value);
- return this;
- }
- public Builder AddRangeRepeatedString(scg::IEnumerable<string> values) {
- PrepareBuilder();
- result.repeatedString_.Add(values);
- return this;
- }
- public Builder ClearRepeatedString() {
- PrepareBuilder();
- result.repeatedString_.Clear();
- return this;
- }
-
- public pbc::IPopsicleList<pb::ByteString> RepeatedBytesList {
- get { return PrepareBuilder().repeatedBytes_; }
- }
- public int RepeatedBytesCount {
- get { return result.RepeatedBytesCount; }
- }
- public pb::ByteString GetRepeatedBytes(int index) {
- return result.GetRepeatedBytes(index);
- }
- public Builder SetRepeatedBytes(int index, pb::ByteString value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.repeatedBytes_[index] = value;
- return this;
- }
- public Builder AddRepeatedBytes(pb::ByteString value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.repeatedBytes_.Add(value);
- return this;
- }
- public Builder AddRangeRepeatedBytes(scg::IEnumerable<pb::ByteString> values) {
- PrepareBuilder();
- result.repeatedBytes_.Add(values);
- return this;
- }
- public Builder ClearRepeatedBytes() {
- PrepareBuilder();
- result.repeatedBytes_.Clear();
- return this;
- }
-
- public pbc::IPopsicleList<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.RepeatedGroup> RepeatedGroupList {
- get { return PrepareBuilder().repeatedGroup_; }
- }
- public int RepeatedGroupCount {
- get { return result.RepeatedGroupCount; }
- }
- public global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.RepeatedGroup GetRepeatedGroup(int index) {
- return result.GetRepeatedGroup(index);
- }
- public Builder SetRepeatedGroup(int index, global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.RepeatedGroup value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.repeatedGroup_[index] = value;
- return this;
- }
- public Builder SetRepeatedGroup(int index, global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.RepeatedGroup.Builder builderForValue) {
- pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
- PrepareBuilder();
- result.repeatedGroup_[index] = builderForValue.Build();
- return this;
- }
- public Builder AddRepeatedGroup(global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.RepeatedGroup value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.repeatedGroup_.Add(value);
- return this;
- }
- public Builder AddRepeatedGroup(global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.RepeatedGroup.Builder builderForValue) {
- pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
- PrepareBuilder();
- result.repeatedGroup_.Add(builderForValue.Build());
- return this;
- }
- public Builder AddRangeRepeatedGroup(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.RepeatedGroup> values) {
- PrepareBuilder();
- result.repeatedGroup_.Add(values);
- return this;
- }
- public Builder ClearRepeatedGroup() {
- PrepareBuilder();
- result.repeatedGroup_.Clear();
- return this;
- }
-
- public pbc::IPopsicleList<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage> RepeatedNestedMessageList {
- get { return PrepareBuilder().repeatedNestedMessage_; }
- }
- public int RepeatedNestedMessageCount {
- get { return result.RepeatedNestedMessageCount; }
- }
- public global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage GetRepeatedNestedMessage(int index) {
- return result.GetRepeatedNestedMessage(index);
- }
- public Builder SetRepeatedNestedMessage(int index, global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.repeatedNestedMessage_[index] = value;
- return this;
- }
- public Builder SetRepeatedNestedMessage(int index, global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage.Builder builderForValue) {
- pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
- PrepareBuilder();
- result.repeatedNestedMessage_[index] = builderForValue.Build();
- return this;
- }
- public Builder AddRepeatedNestedMessage(global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.repeatedNestedMessage_.Add(value);
- return this;
- }
- public Builder AddRepeatedNestedMessage(global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage.Builder builderForValue) {
- pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
- PrepareBuilder();
- result.repeatedNestedMessage_.Add(builderForValue.Build());
- return this;
- }
- public Builder AddRangeRepeatedNestedMessage(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage> values) {
- PrepareBuilder();
- result.repeatedNestedMessage_.Add(values);
- return this;
- }
- public Builder ClearRepeatedNestedMessage() {
- PrepareBuilder();
- result.repeatedNestedMessage_.Clear();
- return this;
- }
-
- public pbc::IPopsicleList<global::Google.ProtocolBuffers.TestProtos.ForeignMessage> RepeatedForeignMessageList {
- get { return PrepareBuilder().repeatedForeignMessage_; }
- }
- public int RepeatedForeignMessageCount {
- get { return result.RepeatedForeignMessageCount; }
- }
- public global::Google.ProtocolBuffers.TestProtos.ForeignMessage GetRepeatedForeignMessage(int index) {
- return result.GetRepeatedForeignMessage(index);
- }
- public Builder SetRepeatedForeignMessage(int index, global::Google.ProtocolBuffers.TestProtos.ForeignMessage value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.repeatedForeignMessage_[index] = value;
- return this;
- }
- public Builder SetRepeatedForeignMessage(int index, global::Google.ProtocolBuffers.TestProtos.ForeignMessage.Builder builderForValue) {
- pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
- PrepareBuilder();
- result.repeatedForeignMessage_[index] = builderForValue.Build();
- return this;
- }
- public Builder AddRepeatedForeignMessage(global::Google.ProtocolBuffers.TestProtos.ForeignMessage value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.repeatedForeignMessage_.Add(value);
- return this;
- }
- public Builder AddRepeatedForeignMessage(global::Google.ProtocolBuffers.TestProtos.ForeignMessage.Builder builderForValue) {
- pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
- PrepareBuilder();
- result.repeatedForeignMessage_.Add(builderForValue.Build());
- return this;
- }
- public Builder AddRangeRepeatedForeignMessage(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.ForeignMessage> values) {
- PrepareBuilder();
- result.repeatedForeignMessage_.Add(values);
- return this;
- }
- public Builder ClearRepeatedForeignMessage() {
- PrepareBuilder();
- result.repeatedForeignMessage_.Clear();
- return this;
- }
-
- public pbc::IPopsicleList<global::Google.ProtocolBuffers.TestProtos.ImportMessage> RepeatedImportMessageList {
- get { return PrepareBuilder().repeatedImportMessage_; }
- }
- public int RepeatedImportMessageCount {
- get { return result.RepeatedImportMessageCount; }
- }
- public global::Google.ProtocolBuffers.TestProtos.ImportMessage GetRepeatedImportMessage(int index) {
- return result.GetRepeatedImportMessage(index);
- }
- public Builder SetRepeatedImportMessage(int index, global::Google.ProtocolBuffers.TestProtos.ImportMessage value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.repeatedImportMessage_[index] = value;
- return this;
- }
- public Builder SetRepeatedImportMessage(int index, global::Google.ProtocolBuffers.TestProtos.ImportMessage.Builder builderForValue) {
- pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
- PrepareBuilder();
- result.repeatedImportMessage_[index] = builderForValue.Build();
- return this;
- }
- public Builder AddRepeatedImportMessage(global::Google.ProtocolBuffers.TestProtos.ImportMessage value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.repeatedImportMessage_.Add(value);
- return this;
- }
- public Builder AddRepeatedImportMessage(global::Google.ProtocolBuffers.TestProtos.ImportMessage.Builder builderForValue) {
- pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
- PrepareBuilder();
- result.repeatedImportMessage_.Add(builderForValue.Build());
- return this;
- }
- public Builder AddRangeRepeatedImportMessage(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.ImportMessage> values) {
- PrepareBuilder();
- result.repeatedImportMessage_.Add(values);
- return this;
- }
- public Builder ClearRepeatedImportMessage() {
- PrepareBuilder();
- result.repeatedImportMessage_.Clear();
- return this;
- }
-
- public pbc::IPopsicleList<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedEnum> RepeatedNestedEnumList {
- get { return PrepareBuilder().repeatedNestedEnum_; }
- }
- public int RepeatedNestedEnumCount {
- get { return result.RepeatedNestedEnumCount; }
- }
- public global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedEnum GetRepeatedNestedEnum(int index) {
- return result.GetRepeatedNestedEnum(index);
- }
- public Builder SetRepeatedNestedEnum(int index, global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedEnum value) {
- PrepareBuilder();
- result.repeatedNestedEnum_[index] = value;
- return this;
- }
- public Builder AddRepeatedNestedEnum(global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedEnum value) {
- PrepareBuilder();
- result.repeatedNestedEnum_.Add(value);
- return this;
- }
- public Builder AddRangeRepeatedNestedEnum(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedEnum> values) {
- PrepareBuilder();
- result.repeatedNestedEnum_.Add(values);
- return this;
- }
- public Builder ClearRepeatedNestedEnum() {
- PrepareBuilder();
- result.repeatedNestedEnum_.Clear();
- return this;
- }
-
- public pbc::IPopsicleList<global::Google.ProtocolBuffers.TestProtos.ForeignEnum> RepeatedForeignEnumList {
- get { return PrepareBuilder().repeatedForeignEnum_; }
- }
- public int RepeatedForeignEnumCount {
- get { return result.RepeatedForeignEnumCount; }
- }
- public global::Google.ProtocolBuffers.TestProtos.ForeignEnum GetRepeatedForeignEnum(int index) {
- return result.GetRepeatedForeignEnum(index);
- }
- public Builder SetRepeatedForeignEnum(int index, global::Google.ProtocolBuffers.TestProtos.ForeignEnum value) {
- PrepareBuilder();
- result.repeatedForeignEnum_[index] = value;
- return this;
- }
- public Builder AddRepeatedForeignEnum(global::Google.ProtocolBuffers.TestProtos.ForeignEnum value) {
- PrepareBuilder();
- result.repeatedForeignEnum_.Add(value);
- return this;
- }
- public Builder AddRangeRepeatedForeignEnum(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.ForeignEnum> values) {
- PrepareBuilder();
- result.repeatedForeignEnum_.Add(values);
- return this;
- }
- public Builder ClearRepeatedForeignEnum() {
- PrepareBuilder();
- result.repeatedForeignEnum_.Clear();
- return this;
- }
-
- public pbc::IPopsicleList<global::Google.ProtocolBuffers.TestProtos.ImportEnum> RepeatedImportEnumList {
- get { return PrepareBuilder().repeatedImportEnum_; }
- }
- public int RepeatedImportEnumCount {
- get { return result.RepeatedImportEnumCount; }
- }
- public global::Google.ProtocolBuffers.TestProtos.ImportEnum GetRepeatedImportEnum(int index) {
- return result.GetRepeatedImportEnum(index);
- }
- public Builder SetRepeatedImportEnum(int index, global::Google.ProtocolBuffers.TestProtos.ImportEnum value) {
- PrepareBuilder();
- result.repeatedImportEnum_[index] = value;
- return this;
- }
- public Builder AddRepeatedImportEnum(global::Google.ProtocolBuffers.TestProtos.ImportEnum value) {
- PrepareBuilder();
- result.repeatedImportEnum_.Add(value);
- return this;
- }
- public Builder AddRangeRepeatedImportEnum(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.ImportEnum> values) {
- PrepareBuilder();
- result.repeatedImportEnum_.Add(values);
- return this;
- }
- public Builder ClearRepeatedImportEnum() {
- PrepareBuilder();
- result.repeatedImportEnum_.Clear();
- return this;
- }
-
- public pbc::IPopsicleList<string> RepeatedStringPieceList {
- get { return PrepareBuilder().repeatedStringPiece_; }
- }
- public int RepeatedStringPieceCount {
- get { return result.RepeatedStringPieceCount; }
- }
- public string GetRepeatedStringPiece(int index) {
- return result.GetRepeatedStringPiece(index);
- }
- public Builder SetRepeatedStringPiece(int index, string value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.repeatedStringPiece_[index] = value;
- return this;
- }
- public Builder AddRepeatedStringPiece(string value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.repeatedStringPiece_.Add(value);
- return this;
- }
- public Builder AddRangeRepeatedStringPiece(scg::IEnumerable<string> values) {
- PrepareBuilder();
- result.repeatedStringPiece_.Add(values);
- return this;
- }
- public Builder ClearRepeatedStringPiece() {
- PrepareBuilder();
- result.repeatedStringPiece_.Clear();
- return this;
- }
-
- public pbc::IPopsicleList<string> RepeatedCordList {
- get { return PrepareBuilder().repeatedCord_; }
- }
- public int RepeatedCordCount {
- get { return result.RepeatedCordCount; }
- }
- public string GetRepeatedCord(int index) {
- return result.GetRepeatedCord(index);
- }
- public Builder SetRepeatedCord(int index, string value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.repeatedCord_[index] = value;
- return this;
- }
- public Builder AddRepeatedCord(string value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.repeatedCord_.Add(value);
- return this;
- }
- public Builder AddRangeRepeatedCord(scg::IEnumerable<string> values) {
- PrepareBuilder();
- result.repeatedCord_.Add(values);
- return this;
- }
- public Builder ClearRepeatedCord() {
- PrepareBuilder();
- result.repeatedCord_.Clear();
- return this;
- }
-
- public bool HasDefaultInt32 {
- get { return result.hasDefaultInt32; }
- }
- public int DefaultInt32 {
- get { return result.DefaultInt32; }
- set { SetDefaultInt32(value); }
- }
- public Builder SetDefaultInt32(int value) {
- PrepareBuilder();
- result.hasDefaultInt32 = true;
- result.defaultInt32_ = value;
- return this;
- }
- public Builder ClearDefaultInt32() {
- PrepareBuilder();
- result.hasDefaultInt32 = false;
- result.defaultInt32_ = 41;
- return this;
- }
-
- public bool HasDefaultInt64 {
- get { return result.hasDefaultInt64; }
- }
- public long DefaultInt64 {
- get { return result.DefaultInt64; }
- set { SetDefaultInt64(value); }
- }
- public Builder SetDefaultInt64(long value) {
- PrepareBuilder();
- result.hasDefaultInt64 = true;
- result.defaultInt64_ = value;
- return this;
- }
- public Builder ClearDefaultInt64() {
- PrepareBuilder();
- result.hasDefaultInt64 = false;
- result.defaultInt64_ = 42L;
- return this;
- }
-
- public bool HasDefaultUint32 {
- get { return result.hasDefaultUint32; }
- }
- [global::System.CLSCompliant(false)]
- public uint DefaultUint32 {
- get { return result.DefaultUint32; }
- set { SetDefaultUint32(value); }
- }
- [global::System.CLSCompliant(false)]
- public Builder SetDefaultUint32(uint value) {
- PrepareBuilder();
- result.hasDefaultUint32 = true;
- result.defaultUint32_ = value;
- return this;
- }
- public Builder ClearDefaultUint32() {
- PrepareBuilder();
- result.hasDefaultUint32 = false;
- result.defaultUint32_ = 43;
- return this;
- }
-
- public bool HasDefaultUint64 {
- get { return result.hasDefaultUint64; }
- }
- [global::System.CLSCompliant(false)]
- public ulong DefaultUint64 {
- get { return result.DefaultUint64; }
- set { SetDefaultUint64(value); }
- }
- [global::System.CLSCompliant(false)]
- public Builder SetDefaultUint64(ulong value) {
- PrepareBuilder();
- result.hasDefaultUint64 = true;
- result.defaultUint64_ = value;
- return this;
- }
- public Builder ClearDefaultUint64() {
- PrepareBuilder();
- result.hasDefaultUint64 = false;
- result.defaultUint64_ = 44UL;
- return this;
- }
-
- public bool HasDefaultSint32 {
- get { return result.hasDefaultSint32; }
- }
- public int DefaultSint32 {
- get { return result.DefaultSint32; }
- set { SetDefaultSint32(value); }
- }
- public Builder SetDefaultSint32(int value) {
- PrepareBuilder();
- result.hasDefaultSint32 = true;
- result.defaultSint32_ = value;
- return this;
- }
- public Builder ClearDefaultSint32() {
- PrepareBuilder();
- result.hasDefaultSint32 = false;
- result.defaultSint32_ = -45;
- return this;
- }
-
- public bool HasDefaultSint64 {
- get { return result.hasDefaultSint64; }
- }
- public long DefaultSint64 {
- get { return result.DefaultSint64; }
- set { SetDefaultSint64(value); }
- }
- public Builder SetDefaultSint64(long value) {
- PrepareBuilder();
- result.hasDefaultSint64 = true;
- result.defaultSint64_ = value;
- return this;
- }
- public Builder ClearDefaultSint64() {
- PrepareBuilder();
- result.hasDefaultSint64 = false;
- result.defaultSint64_ = 46;
- return this;
- }
-
- public bool HasDefaultFixed32 {
- get { return result.hasDefaultFixed32; }
- }
- [global::System.CLSCompliant(false)]
- public uint DefaultFixed32 {
- get { return result.DefaultFixed32; }
- set { SetDefaultFixed32(value); }
- }
- [global::System.CLSCompliant(false)]
- public Builder SetDefaultFixed32(uint value) {
- PrepareBuilder();
- result.hasDefaultFixed32 = true;
- result.defaultFixed32_ = value;
- return this;
- }
- public Builder ClearDefaultFixed32() {
- PrepareBuilder();
- result.hasDefaultFixed32 = false;
- result.defaultFixed32_ = 47;
- return this;
- }
-
- public bool HasDefaultFixed64 {
- get { return result.hasDefaultFixed64; }
- }
- [global::System.CLSCompliant(false)]
- public ulong DefaultFixed64 {
- get { return result.DefaultFixed64; }
- set { SetDefaultFixed64(value); }
- }
- [global::System.CLSCompliant(false)]
- public Builder SetDefaultFixed64(ulong value) {
- PrepareBuilder();
- result.hasDefaultFixed64 = true;
- result.defaultFixed64_ = value;
- return this;
- }
- public Builder ClearDefaultFixed64() {
- PrepareBuilder();
- result.hasDefaultFixed64 = false;
- result.defaultFixed64_ = 48;
- return this;
- }
-
- public bool HasDefaultSfixed32 {
- get { return result.hasDefaultSfixed32; }
- }
- public int DefaultSfixed32 {
- get { return result.DefaultSfixed32; }
- set { SetDefaultSfixed32(value); }
- }
- public Builder SetDefaultSfixed32(int value) {
- PrepareBuilder();
- result.hasDefaultSfixed32 = true;
- result.defaultSfixed32_ = value;
- return this;
- }
- public Builder ClearDefaultSfixed32() {
- PrepareBuilder();
- result.hasDefaultSfixed32 = false;
- result.defaultSfixed32_ = 49;
- return this;
- }
-
- public bool HasDefaultSfixed64 {
- get { return result.hasDefaultSfixed64; }
- }
- public long DefaultSfixed64 {
- get { return result.DefaultSfixed64; }
- set { SetDefaultSfixed64(value); }
- }
- public Builder SetDefaultSfixed64(long value) {
- PrepareBuilder();
- result.hasDefaultSfixed64 = true;
- result.defaultSfixed64_ = value;
- return this;
- }
- public Builder ClearDefaultSfixed64() {
- PrepareBuilder();
- result.hasDefaultSfixed64 = false;
- result.defaultSfixed64_ = -50;
- return this;
- }
-
- public bool HasDefaultFloat {
- get { return result.hasDefaultFloat; }
- }
- public float DefaultFloat {
- get { return result.DefaultFloat; }
- set { SetDefaultFloat(value); }
- }
- public Builder SetDefaultFloat(float value) {
- PrepareBuilder();
- result.hasDefaultFloat = true;
- result.defaultFloat_ = value;
- return this;
- }
- public Builder ClearDefaultFloat() {
- PrepareBuilder();
- result.hasDefaultFloat = false;
- result.defaultFloat_ = 51.5F;
- return this;
- }
-
- public bool HasDefaultDouble {
- get { return result.hasDefaultDouble; }
- }
- public double DefaultDouble {
- get { return result.DefaultDouble; }
- set { SetDefaultDouble(value); }
- }
- public Builder SetDefaultDouble(double value) {
- PrepareBuilder();
- result.hasDefaultDouble = true;
- result.defaultDouble_ = value;
- return this;
- }
- public Builder ClearDefaultDouble() {
- PrepareBuilder();
- result.hasDefaultDouble = false;
- result.defaultDouble_ = 52000D;
- return this;
- }
-
- public bool HasDefaultBool {
- get { return result.hasDefaultBool; }
- }
- public bool DefaultBool {
- get { return result.DefaultBool; }
- set { SetDefaultBool(value); }
- }
- public Builder SetDefaultBool(bool value) {
- PrepareBuilder();
- result.hasDefaultBool = true;
- result.defaultBool_ = value;
- return this;
- }
- public Builder ClearDefaultBool() {
- PrepareBuilder();
- result.hasDefaultBool = false;
- result.defaultBool_ = true;
- return this;
- }
-
- public bool HasDefaultString {
- get { return result.hasDefaultString; }
- }
- public string DefaultString {
- get { return result.DefaultString; }
- set { SetDefaultString(value); }
- }
- public Builder SetDefaultString(string value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.hasDefaultString = true;
- result.defaultString_ = value;
- return this;
- }
- public Builder ClearDefaultString() {
- PrepareBuilder();
- result.hasDefaultString = false;
- result.defaultString_ = "hello";
- return this;
- }
-
- public bool HasDefaultBytes {
- get { return result.hasDefaultBytes; }
- }
- public pb::ByteString DefaultBytes {
- get { return result.DefaultBytes; }
- set { SetDefaultBytes(value); }
- }
- public Builder SetDefaultBytes(pb::ByteString value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.hasDefaultBytes = true;
- result.defaultBytes_ = value;
- return this;
- }
- public Builder ClearDefaultBytes() {
- PrepareBuilder();
- result.hasDefaultBytes = false;
- result.defaultBytes_ = (pb::ByteString) global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Descriptor.Fields[62].DefaultValue;
- return this;
- }
-
- public bool HasDefaultNestedEnum {
- get { return result.hasDefaultNestedEnum; }
- }
- public global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedEnum DefaultNestedEnum {
- get { return result.DefaultNestedEnum; }
- set { SetDefaultNestedEnum(value); }
- }
- public Builder SetDefaultNestedEnum(global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedEnum value) {
- PrepareBuilder();
- result.hasDefaultNestedEnum = true;
- result.defaultNestedEnum_ = value;
- return this;
- }
- public Builder ClearDefaultNestedEnum() {
- PrepareBuilder();
- result.hasDefaultNestedEnum = false;
- result.defaultNestedEnum_ = global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedEnum.BAR;
- return this;
- }
-
- public bool HasDefaultForeignEnum {
- get { return result.hasDefaultForeignEnum; }
- }
- public global::Google.ProtocolBuffers.TestProtos.ForeignEnum DefaultForeignEnum {
- get { return result.DefaultForeignEnum; }
- set { SetDefaultForeignEnum(value); }
- }
- public Builder SetDefaultForeignEnum(global::Google.ProtocolBuffers.TestProtos.ForeignEnum value) {
- PrepareBuilder();
- result.hasDefaultForeignEnum = true;
- result.defaultForeignEnum_ = value;
- return this;
- }
- public Builder ClearDefaultForeignEnum() {
- PrepareBuilder();
- result.hasDefaultForeignEnum = false;
- result.defaultForeignEnum_ = global::Google.ProtocolBuffers.TestProtos.ForeignEnum.FOREIGN_BAR;
- return this;
- }
-
- public bool HasDefaultImportEnum {
- get { return result.hasDefaultImportEnum; }
- }
- public global::Google.ProtocolBuffers.TestProtos.ImportEnum DefaultImportEnum {
- get { return result.DefaultImportEnum; }
- set { SetDefaultImportEnum(value); }
- }
- public Builder SetDefaultImportEnum(global::Google.ProtocolBuffers.TestProtos.ImportEnum value) {
- PrepareBuilder();
- result.hasDefaultImportEnum = true;
- result.defaultImportEnum_ = value;
- return this;
- }
- public Builder ClearDefaultImportEnum() {
- PrepareBuilder();
- result.hasDefaultImportEnum = false;
- result.defaultImportEnum_ = global::Google.ProtocolBuffers.TestProtos.ImportEnum.IMPORT_BAR;
- return this;
- }
-
- public bool HasDefaultStringPiece {
- get { return result.hasDefaultStringPiece; }
- }
- public string DefaultStringPiece {
- get { return result.DefaultStringPiece; }
- set { SetDefaultStringPiece(value); }
- }
- public Builder SetDefaultStringPiece(string value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.hasDefaultStringPiece = true;
- result.defaultStringPiece_ = value;
- return this;
- }
- public Builder ClearDefaultStringPiece() {
- PrepareBuilder();
- result.hasDefaultStringPiece = false;
- result.defaultStringPiece_ = "abc";
- return this;
- }
-
- public bool HasDefaultCord {
- get { return result.hasDefaultCord; }
- }
- public string DefaultCord {
- get { return result.DefaultCord; }
- set { SetDefaultCord(value); }
- }
- public Builder SetDefaultCord(string value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.hasDefaultCord = true;
- result.defaultCord_ = value;
- return this;
- }
- public Builder ClearDefaultCord() {
- PrepareBuilder();
- result.hasDefaultCord = false;
- result.defaultCord_ = "123";
- return this;
- }
- }
- static TestAllTypes() {
- object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor, null);
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class TestDeprecatedFields : pb::GeneratedMessage<TestDeprecatedFields, TestDeprecatedFields.Builder> {
- private TestDeprecatedFields() { }
- private static readonly TestDeprecatedFields defaultInstance = new TestDeprecatedFields().MakeReadOnly();
- private static readonly string[] _testDeprecatedFieldsFieldNames = new string[] { "deprecated_int32" };
- private static readonly uint[] _testDeprecatedFieldsFieldTags = new uint[] { 8 };
- public static TestDeprecatedFields DefaultInstance {
- get { return defaultInstance; }
- }
-
- public override TestDeprecatedFields DefaultInstanceForType {
- get { return DefaultInstance; }
- }
-
- protected override TestDeprecatedFields ThisMessage {
- get { return this; }
- }
-
- public static pbd::MessageDescriptor Descriptor {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.internal__static_protobuf_unittest_TestDeprecatedFields__Descriptor; }
- }
-
- protected override pb::FieldAccess.FieldAccessorTable<TestDeprecatedFields, TestDeprecatedFields.Builder> InternalFieldAccessors {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.internal__static_protobuf_unittest_TestDeprecatedFields__FieldAccessorTable; }
- }
-
- public const int DeprecatedInt32FieldNumber = 1;
- private bool hasDeprecatedInt32;
- private int deprecatedInt32_;
- [global::System.ObsoleteAttribute()]
- public bool HasDeprecatedInt32 {
- get { return hasDeprecatedInt32; }
- }
- [global::System.ObsoleteAttribute()]
- public int DeprecatedInt32 {
- get { return deprecatedInt32_; }
- }
-
- public override bool IsInitialized {
- get {
- return true;
- }
- }
-
- public override void WriteTo(pb::ICodedOutputStream output) {
- CalcSerializedSize();
- string[] field_names = _testDeprecatedFieldsFieldNames;
- if (hasDeprecatedInt32) {
- output.WriteInt32(1, field_names[0], DeprecatedInt32);
- }
- UnknownFields.WriteTo(output);
- }
-
- private int memoizedSerializedSize = -1;
- public override int SerializedSize {
- get {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
- return CalcSerializedSize();
- }
- }
-
- private int CalcSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- if (hasDeprecatedInt32) {
- size += pb::CodedOutputStream.ComputeInt32Size(1, DeprecatedInt32);
- }
- size += UnknownFields.SerializedSize;
- memoizedSerializedSize = size;
- return size;
- }
- public static TestDeprecatedFields ParseFrom(pb::ByteString data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static TestDeprecatedFields ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static TestDeprecatedFields ParseFrom(byte[] data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static TestDeprecatedFields ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static TestDeprecatedFields ParseFrom(global::System.IO.Stream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static TestDeprecatedFields ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- public static TestDeprecatedFields ParseDelimitedFrom(global::System.IO.Stream input) {
- return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
- }
- public static TestDeprecatedFields ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
- }
- public static TestDeprecatedFields ParseFrom(pb::ICodedInputStream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static TestDeprecatedFields ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- private TestDeprecatedFields 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(TestDeprecatedFields prototype) {
- return new Builder(prototype);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class Builder : pb::GeneratedBuilder<TestDeprecatedFields, Builder> {
- protected override Builder ThisBuilder {
- get { return this; }
- }
- public Builder() {
- result = DefaultInstance;
- resultIsReadOnly = true;
- }
- internal Builder(TestDeprecatedFields cloneFrom) {
- result = cloneFrom;
- resultIsReadOnly = true;
- }
-
- private bool resultIsReadOnly;
- private TestDeprecatedFields result;
-
- private TestDeprecatedFields PrepareBuilder() {
- if (resultIsReadOnly) {
- TestDeprecatedFields original = result;
- result = new TestDeprecatedFields();
- resultIsReadOnly = false;
- MergeFrom(original);
- }
- return result;
- }
-
- public override bool IsInitialized {
- get { return result.IsInitialized; }
- }
-
- protected override TestDeprecatedFields 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.TestDeprecatedFields.Descriptor; }
- }
-
- public override TestDeprecatedFields DefaultInstanceForType {
- get { return global::Google.ProtocolBuffers.TestProtos.TestDeprecatedFields.DefaultInstance; }
- }
-
- public override TestDeprecatedFields BuildPartial() {
- if (resultIsReadOnly) {
- return result;
- }
- resultIsReadOnly = true;
- return result.MakeReadOnly();
- }
-
- public override Builder MergeFrom(pb::IMessage other) {
- if (other is TestDeprecatedFields) {
- return MergeFrom((TestDeprecatedFields) other);
- } else {
- base.MergeFrom(other);
- return this;
- }
- }
-
- public override Builder MergeFrom(TestDeprecatedFields other) {
- if (other == global::Google.ProtocolBuffers.TestProtos.TestDeprecatedFields.DefaultInstance) return this;
- PrepareBuilder();
- if (other.HasDeprecatedInt32) {
- DeprecatedInt32 = other.DeprecatedInt32;
- }
- 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(_testDeprecatedFieldsFieldNames, field_name, global::System.StringComparer.Ordinal);
- if(field_ordinal >= 0)
- tag = _testDeprecatedFieldsFieldTags[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.hasDeprecatedInt32 = input.ReadInt32(ref result.deprecatedInt32_);
- break;
- }
- }
- }
-
- if (unknownFields != null) {
- this.UnknownFields = unknownFields.Build();
- }
- return this;
- }
-
-
- [global::System.ObsoleteAttribute()]
- public bool HasDeprecatedInt32 {
- get { return result.hasDeprecatedInt32; }
- }
- [global::System.ObsoleteAttribute()]
- public int DeprecatedInt32 {
- get { return result.DeprecatedInt32; }
- set { SetDeprecatedInt32(value); }
- }
- [global::System.ObsoleteAttribute()]
- public Builder SetDeprecatedInt32(int value) {
- PrepareBuilder();
- result.hasDeprecatedInt32 = true;
- result.deprecatedInt32_ = value;
- return this;
- }
- [global::System.ObsoleteAttribute()]
- public Builder ClearDeprecatedInt32() {
- PrepareBuilder();
- result.hasDeprecatedInt32 = false;
- result.deprecatedInt32_ = 0;
- return this;
- }
- }
- static TestDeprecatedFields() {
- object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor, null);
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class ForeignMessage : pb::GeneratedMessage<ForeignMessage, ForeignMessage.Builder> {
- private ForeignMessage() { }
- private static readonly ForeignMessage defaultInstance = new ForeignMessage().MakeReadOnly();
- private static readonly string[] _foreignMessageFieldNames = new string[] { "c" };
- private static readonly uint[] _foreignMessageFieldTags = new uint[] { 8 };
- public static ForeignMessage DefaultInstance {
- get { return defaultInstance; }
- }
-
- public override ForeignMessage DefaultInstanceForType {
- get { return DefaultInstance; }
- }
-
- protected override ForeignMessage ThisMessage {
- get { return this; }
- }
-
- public static pbd::MessageDescriptor Descriptor {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.internal__static_protobuf_unittest_ForeignMessage__Descriptor; }
- }
-
- protected override pb::FieldAccess.FieldAccessorTable<ForeignMessage, ForeignMessage.Builder> InternalFieldAccessors {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.internal__static_protobuf_unittest_ForeignMessage__FieldAccessorTable; }
- }
-
- public const int CFieldNumber = 1;
- private bool hasC;
- private int c_;
- public bool HasC {
- get { return hasC; }
- }
- public int C {
- get { return c_; }
- }
-
- public override bool IsInitialized {
- get {
- return true;
- }
- }
-
- public override void WriteTo(pb::ICodedOutputStream output) {
- CalcSerializedSize();
- string[] field_names = _foreignMessageFieldNames;
- if (hasC) {
- output.WriteInt32(1, field_names[0], C);
- }
- UnknownFields.WriteTo(output);
- }
-
- private int memoizedSerializedSize = -1;
- public override int SerializedSize {
- get {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
- return CalcSerializedSize();
- }
- }
-
- private int CalcSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- if (hasC) {
- size += pb::CodedOutputStream.ComputeInt32Size(1, C);
- }
- size += UnknownFields.SerializedSize;
- memoizedSerializedSize = size;
- return size;
- }
- public static ForeignMessage ParseFrom(pb::ByteString data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static ForeignMessage ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static ForeignMessage ParseFrom(byte[] data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static ForeignMessage ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static ForeignMessage ParseFrom(global::System.IO.Stream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static ForeignMessage ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- public static ForeignMessage ParseDelimitedFrom(global::System.IO.Stream input) {
- return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
- }
- public static ForeignMessage ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
- }
- public static ForeignMessage ParseFrom(pb::ICodedInputStream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static ForeignMessage ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- private ForeignMessage 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(ForeignMessage prototype) {
- return new Builder(prototype);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class Builder : pb::GeneratedBuilder<ForeignMessage, Builder> {
- protected override Builder ThisBuilder {
- get { return this; }
- }
- public Builder() {
- result = DefaultInstance;
- resultIsReadOnly = true;
- }
- internal Builder(ForeignMessage cloneFrom) {
- result = cloneFrom;
- resultIsReadOnly = true;
- }
-
- private bool resultIsReadOnly;
- private ForeignMessage result;
-
- private ForeignMessage PrepareBuilder() {
- if (resultIsReadOnly) {
- ForeignMessage original = result;
- result = new ForeignMessage();
- resultIsReadOnly = false;
- MergeFrom(original);
- }
- return result;
- }
-
- public override bool IsInitialized {
- get { return result.IsInitialized; }
- }
-
- protected override ForeignMessage 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.ForeignMessage.Descriptor; }
- }
-
- public override ForeignMessage DefaultInstanceForType {
- get { return global::Google.ProtocolBuffers.TestProtos.ForeignMessage.DefaultInstance; }
- }
-
- public override ForeignMessage BuildPartial() {
- if (resultIsReadOnly) {
- return result;
- }
- resultIsReadOnly = true;
- return result.MakeReadOnly();
- }
-
- public override Builder MergeFrom(pb::IMessage other) {
- if (other is ForeignMessage) {
- return MergeFrom((ForeignMessage) other);
- } else {
- base.MergeFrom(other);
- return this;
- }
- }
-
- public override Builder MergeFrom(ForeignMessage other) {
- if (other == global::Google.ProtocolBuffers.TestProtos.ForeignMessage.DefaultInstance) return this;
- PrepareBuilder();
- if (other.HasC) {
- C = other.C;
- }
- 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(_foreignMessageFieldNames, field_name, global::System.StringComparer.Ordinal);
- if(field_ordinal >= 0)
- tag = _foreignMessageFieldTags[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.hasC = input.ReadInt32(ref result.c_);
- break;
- }
- }
- }
-
- if (unknownFields != null) {
- this.UnknownFields = unknownFields.Build();
- }
- return this;
- }
-
-
- public bool HasC {
- get { return result.hasC; }
- }
- public int C {
- get { return result.C; }
- set { SetC(value); }
- }
- public Builder SetC(int value) {
- PrepareBuilder();
- result.hasC = true;
- result.c_ = value;
- return this;
- }
- public Builder ClearC() {
- PrepareBuilder();
- result.hasC = false;
- result.c_ = 0;
- return this;
- }
- }
- static ForeignMessage() {
- object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor, null);
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class TestAllExtensions : pb::ExtendableMessage<TestAllExtensions, TestAllExtensions.Builder> {
- private TestAllExtensions() { }
- private static readonly TestAllExtensions defaultInstance = new TestAllExtensions().MakeReadOnly();
- private static readonly string[] _testAllExtensionsFieldNames = new string[] { };
- private static readonly uint[] _testAllExtensionsFieldTags = new uint[] { };
- public static TestAllExtensions DefaultInstance {
- get { return defaultInstance; }
- }
-
- public override TestAllExtensions DefaultInstanceForType {
- get { return DefaultInstance; }
- }
-
- protected override TestAllExtensions ThisMessage {
- get { return this; }
- }
-
- public static pbd::MessageDescriptor Descriptor {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.internal__static_protobuf_unittest_TestAllExtensions__Descriptor; }
- }
-
- protected override pb::FieldAccess.FieldAccessorTable<TestAllExtensions, TestAllExtensions.Builder> InternalFieldAccessors {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.internal__static_protobuf_unittest_TestAllExtensions__FieldAccessorTable; }
- }
-
- public override bool IsInitialized {
- get {
- if (!ExtensionsAreInitialized) return false;
- return true;
- }
- }
-
- public override void WriteTo(pb::ICodedOutputStream output) {
- CalcSerializedSize();
- string[] field_names = _testAllExtensionsFieldNames;
- pb::ExtendableMessage<TestAllExtensions, TestAllExtensions.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;
- return CalcSerializedSize();
- }
- }
-
- private int CalcSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- size += ExtensionsSerializedSize;
- size += UnknownFields.SerializedSize;
- memoizedSerializedSize = size;
- return size;
- }
- public static TestAllExtensions ParseFrom(pb::ByteString data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static TestAllExtensions ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static TestAllExtensions ParseFrom(byte[] data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static TestAllExtensions ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static TestAllExtensions ParseFrom(global::System.IO.Stream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static TestAllExtensions ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- public static TestAllExtensions ParseDelimitedFrom(global::System.IO.Stream input) {
- return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
- }
- public static TestAllExtensions ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
- }
- public static TestAllExtensions ParseFrom(pb::ICodedInputStream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static TestAllExtensions ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- private TestAllExtensions 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(TestAllExtensions prototype) {
- return new Builder(prototype);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class Builder : pb::ExtendableBuilder<TestAllExtensions, Builder> {
- protected override Builder ThisBuilder {
- get { return this; }
- }
- public Builder() {
- result = DefaultInstance;
- resultIsReadOnly = true;
- }
- internal Builder(TestAllExtensions cloneFrom) {
- result = cloneFrom;
- resultIsReadOnly = true;
- }
-
- private bool resultIsReadOnly;
- private TestAllExtensions result;
-
- private TestAllExtensions PrepareBuilder() {
- if (resultIsReadOnly) {
- TestAllExtensions original = result;
- result = new TestAllExtensions();
- resultIsReadOnly = false;
- MergeFrom(original);
- }
- return result;
- }
-
- public override bool IsInitialized {
- get { return result.IsInitialized; }
- }
-
- protected override TestAllExtensions 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.TestAllExtensions.Descriptor; }
- }
-
- public override TestAllExtensions DefaultInstanceForType {
- get { return global::Google.ProtocolBuffers.TestProtos.TestAllExtensions.DefaultInstance; }
- }
-
- public override TestAllExtensions BuildPartial() {
- if (resultIsReadOnly) {
- return result;
- }
- resultIsReadOnly = true;
- return result.MakeReadOnly();
- }
-
- public override Builder MergeFrom(pb::IMessage other) {
- if (other is TestAllExtensions) {
- return MergeFrom((TestAllExtensions) other);
- } else {
- base.MergeFrom(other);
- return this;
- }
- }
-
- public override Builder MergeFrom(TestAllExtensions other) {
- if (other == global::Google.ProtocolBuffers.TestProtos.TestAllExtensions.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(_testAllExtensionsFieldNames, field_name, global::System.StringComparer.Ordinal);
- if(field_ordinal >= 0)
- tag = _testAllExtensionsFieldTags[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 TestAllExtensions() {
- object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor, null);
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class OptionalGroup_extension : pb::GeneratedMessage<OptionalGroup_extension, OptionalGroup_extension.Builder> {
- private OptionalGroup_extension() { }
- private static readonly OptionalGroup_extension defaultInstance = new OptionalGroup_extension().MakeReadOnly();
- private static readonly string[] _optionalGroupExtensionFieldNames = new string[] { "a" };
- private static readonly uint[] _optionalGroupExtensionFieldTags = new uint[] { 136 };
- public static OptionalGroup_extension DefaultInstance {
- get { return defaultInstance; }
- }
-
- public override OptionalGroup_extension DefaultInstanceForType {
- get { return DefaultInstance; }
- }
-
- protected override OptionalGroup_extension ThisMessage {
- get { return this; }
- }
-
- public static pbd::MessageDescriptor Descriptor {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.internal__static_protobuf_unittest_OptionalGroup_extension__Descriptor; }
- }
-
- protected override pb::FieldAccess.FieldAccessorTable<OptionalGroup_extension, OptionalGroup_extension.Builder> InternalFieldAccessors {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.internal__static_protobuf_unittest_OptionalGroup_extension__FieldAccessorTable; }
- }
-
- public const int AFieldNumber = 17;
- private bool hasA;
- private int a_;
- public bool HasA {
- get { return hasA; }
- }
- public int A {
- get { return a_; }
- }
-
- public override bool IsInitialized {
- get {
- return true;
- }
- }
-
- public override void WriteTo(pb::ICodedOutputStream output) {
- CalcSerializedSize();
- string[] field_names = _optionalGroupExtensionFieldNames;
- if (hasA) {
- output.WriteInt32(17, field_names[0], A);
- }
- UnknownFields.WriteTo(output);
- }
-
- private int memoizedSerializedSize = -1;
- public override int SerializedSize {
- get {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
- return CalcSerializedSize();
- }
- }
-
- private int CalcSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- if (hasA) {
- size += pb::CodedOutputStream.ComputeInt32Size(17, A);
- }
- size += UnknownFields.SerializedSize;
- memoizedSerializedSize = size;
- return size;
- }
- public static OptionalGroup_extension ParseFrom(pb::ByteString data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static OptionalGroup_extension ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static OptionalGroup_extension ParseFrom(byte[] data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static OptionalGroup_extension ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static OptionalGroup_extension ParseFrom(global::System.IO.Stream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static OptionalGroup_extension ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- public static OptionalGroup_extension ParseDelimitedFrom(global::System.IO.Stream input) {
- return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
- }
- public static OptionalGroup_extension ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
- }
- public static OptionalGroup_extension ParseFrom(pb::ICodedInputStream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static OptionalGroup_extension ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- private OptionalGroup_extension 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(OptionalGroup_extension prototype) {
- return new Builder(prototype);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class Builder : pb::GeneratedBuilder<OptionalGroup_extension, Builder> {
- protected override Builder ThisBuilder {
- get { return this; }
- }
- public Builder() {
- result = DefaultInstance;
- resultIsReadOnly = true;
- }
- internal Builder(OptionalGroup_extension cloneFrom) {
- result = cloneFrom;
- resultIsReadOnly = true;
- }
-
- private bool resultIsReadOnly;
- private OptionalGroup_extension result;
-
- private OptionalGroup_extension PrepareBuilder() {
- if (resultIsReadOnly) {
- OptionalGroup_extension original = result;
- result = new OptionalGroup_extension();
- resultIsReadOnly = false;
- MergeFrom(original);
- }
- return result;
- }
-
- public override bool IsInitialized {
- get { return result.IsInitialized; }
- }
-
- protected override OptionalGroup_extension 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.OptionalGroup_extension.Descriptor; }
- }
-
- public override OptionalGroup_extension DefaultInstanceForType {
- get { return global::Google.ProtocolBuffers.TestProtos.OptionalGroup_extension.DefaultInstance; }
- }
-
- public override OptionalGroup_extension BuildPartial() {
- if (resultIsReadOnly) {
- return result;
- }
- resultIsReadOnly = true;
- return result.MakeReadOnly();
- }
-
- public override Builder MergeFrom(pb::IMessage other) {
- if (other is OptionalGroup_extension) {
- return MergeFrom((OptionalGroup_extension) other);
- } else {
- base.MergeFrom(other);
- return this;
- }
- }
-
- public override Builder MergeFrom(OptionalGroup_extension other) {
- if (other == global::Google.ProtocolBuffers.TestProtos.OptionalGroup_extension.DefaultInstance) return this;
- PrepareBuilder();
- if (other.HasA) {
- A = other.A;
- }
- 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(_optionalGroupExtensionFieldNames, field_name, global::System.StringComparer.Ordinal);
- if(field_ordinal >= 0)
- tag = _optionalGroupExtensionFieldTags[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 136: {
- result.hasA = input.ReadInt32(ref result.a_);
- break;
- }
- }
- }
-
- if (unknownFields != null) {
- this.UnknownFields = unknownFields.Build();
- }
- return this;
- }
-
-
- public bool HasA {
- get { return result.hasA; }
- }
- public int A {
- get { return result.A; }
- set { SetA(value); }
- }
- public Builder SetA(int value) {
- PrepareBuilder();
- result.hasA = true;
- result.a_ = value;
- return this;
- }
- public Builder ClearA() {
- PrepareBuilder();
- result.hasA = false;
- result.a_ = 0;
- return this;
- }
- }
- static OptionalGroup_extension() {
- object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor, null);
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class RepeatedGroup_extension : pb::GeneratedMessage<RepeatedGroup_extension, RepeatedGroup_extension.Builder> {
- private RepeatedGroup_extension() { }
- private static readonly RepeatedGroup_extension defaultInstance = new RepeatedGroup_extension().MakeReadOnly();
- private static readonly string[] _repeatedGroupExtensionFieldNames = new string[] { "a" };
- private static readonly uint[] _repeatedGroupExtensionFieldTags = new uint[] { 376 };
- public static RepeatedGroup_extension DefaultInstance {
- get { return defaultInstance; }
- }
-
- public override RepeatedGroup_extension DefaultInstanceForType {
- get { return DefaultInstance; }
- }
-
- protected override RepeatedGroup_extension ThisMessage {
- get { return this; }
- }
-
- public static pbd::MessageDescriptor Descriptor {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.internal__static_protobuf_unittest_RepeatedGroup_extension__Descriptor; }
- }
-
- protected override pb::FieldAccess.FieldAccessorTable<RepeatedGroup_extension, RepeatedGroup_extension.Builder> InternalFieldAccessors {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.internal__static_protobuf_unittest_RepeatedGroup_extension__FieldAccessorTable; }
- }
-
- public const int AFieldNumber = 47;
- private bool hasA;
- private int a_;
- public bool HasA {
- get { return hasA; }
- }
- public int A {
- get { return a_; }
- }
-
- public override bool IsInitialized {
- get {
- return true;
- }
- }
-
- public override void WriteTo(pb::ICodedOutputStream output) {
- CalcSerializedSize();
- string[] field_names = _repeatedGroupExtensionFieldNames;
- if (hasA) {
- output.WriteInt32(47, field_names[0], A);
- }
- UnknownFields.WriteTo(output);
- }
-
- private int memoizedSerializedSize = -1;
- public override int SerializedSize {
- get {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
- return CalcSerializedSize();
- }
- }
-
- private int CalcSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- if (hasA) {
- size += pb::CodedOutputStream.ComputeInt32Size(47, A);
- }
- size += UnknownFields.SerializedSize;
- memoizedSerializedSize = size;
- return size;
- }
- public static RepeatedGroup_extension ParseFrom(pb::ByteString data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static RepeatedGroup_extension ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static RepeatedGroup_extension ParseFrom(byte[] data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static RepeatedGroup_extension ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static RepeatedGroup_extension ParseFrom(global::System.IO.Stream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static RepeatedGroup_extension ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- public static RepeatedGroup_extension ParseDelimitedFrom(global::System.IO.Stream input) {
- return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
- }
- public static RepeatedGroup_extension ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
- }
- public static RepeatedGroup_extension ParseFrom(pb::ICodedInputStream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static RepeatedGroup_extension ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- private RepeatedGroup_extension 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(RepeatedGroup_extension prototype) {
- return new Builder(prototype);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class Builder : pb::GeneratedBuilder<RepeatedGroup_extension, Builder> {
- protected override Builder ThisBuilder {
- get { return this; }
- }
- public Builder() {
- result = DefaultInstance;
- resultIsReadOnly = true;
- }
- internal Builder(RepeatedGroup_extension cloneFrom) {
- result = cloneFrom;
- resultIsReadOnly = true;
- }
-
- private bool resultIsReadOnly;
- private RepeatedGroup_extension result;
-
- private RepeatedGroup_extension PrepareBuilder() {
- if (resultIsReadOnly) {
- RepeatedGroup_extension original = result;
- result = new RepeatedGroup_extension();
- resultIsReadOnly = false;
- MergeFrom(original);
- }
- return result;
- }
-
- public override bool IsInitialized {
- get { return result.IsInitialized; }
- }
-
- protected override RepeatedGroup_extension 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.RepeatedGroup_extension.Descriptor; }
- }
-
- public override RepeatedGroup_extension DefaultInstanceForType {
- get { return global::Google.ProtocolBuffers.TestProtos.RepeatedGroup_extension.DefaultInstance; }
- }
-
- public override RepeatedGroup_extension BuildPartial() {
- if (resultIsReadOnly) {
- return result;
- }
- resultIsReadOnly = true;
- return result.MakeReadOnly();
- }
-
- public override Builder MergeFrom(pb::IMessage other) {
- if (other is RepeatedGroup_extension) {
- return MergeFrom((RepeatedGroup_extension) other);
- } else {
- base.MergeFrom(other);
- return this;
- }
- }
-
- public override Builder MergeFrom(RepeatedGroup_extension other) {
- if (other == global::Google.ProtocolBuffers.TestProtos.RepeatedGroup_extension.DefaultInstance) return this;
- PrepareBuilder();
- if (other.HasA) {
- A = other.A;
- }
- 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(_repeatedGroupExtensionFieldNames, field_name, global::System.StringComparer.Ordinal);
- if(field_ordinal >= 0)
- tag = _repeatedGroupExtensionFieldTags[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 376: {
- result.hasA = input.ReadInt32(ref result.a_);
- break;
- }
- }
- }
-
- if (unknownFields != null) {
- this.UnknownFields = unknownFields.Build();
- }
- return this;
- }
-
-
- public bool HasA {
- get { return result.hasA; }
- }
- public int A {
- get { return result.A; }
- set { SetA(value); }
- }
- public Builder SetA(int value) {
- PrepareBuilder();
- result.hasA = true;
- result.a_ = value;
- return this;
- }
- public Builder ClearA() {
- PrepareBuilder();
- result.hasA = false;
- result.a_ = 0;
- return this;
- }
- }
- static RepeatedGroup_extension() {
- object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor, null);
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class TestNestedExtension : pb::GeneratedMessage<TestNestedExtension, TestNestedExtension.Builder> {
- private TestNestedExtension() { }
- private static readonly TestNestedExtension defaultInstance = new TestNestedExtension().MakeReadOnly();
- private static readonly string[] _testNestedExtensionFieldNames = new string[] { };
- private static readonly uint[] _testNestedExtensionFieldTags = new uint[] { };
- public static TestNestedExtension DefaultInstance {
- get { return defaultInstance; }
- }
-
- public override TestNestedExtension DefaultInstanceForType {
- get { return DefaultInstance; }
- }
-
- protected override TestNestedExtension ThisMessage {
- get { return this; }
- }
-
- public static pbd::MessageDescriptor Descriptor {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.internal__static_protobuf_unittest_TestNestedExtension__Descriptor; }
- }
-
- protected override pb::FieldAccess.FieldAccessorTable<TestNestedExtension, TestNestedExtension.Builder> InternalFieldAccessors {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.internal__static_protobuf_unittest_TestNestedExtension__FieldAccessorTable; }
- }
-
- public const int TestFieldNumber = 1002;
- public static pb::GeneratedExtensionBase<string> Test;
- public override bool IsInitialized {
- get {
- return true;
- }
- }
-
- public override void WriteTo(pb::ICodedOutputStream output) {
- CalcSerializedSize();
- string[] field_names = _testNestedExtensionFieldNames;
- UnknownFields.WriteTo(output);
- }
-
- private int memoizedSerializedSize = -1;
- public override int SerializedSize {
- get {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
- return CalcSerializedSize();
- }
- }
-
- private int CalcSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- size += UnknownFields.SerializedSize;
- memoizedSerializedSize = size;
- return size;
- }
- public static TestNestedExtension ParseFrom(pb::ByteString data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static TestNestedExtension ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static TestNestedExtension ParseFrom(byte[] data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static TestNestedExtension ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static TestNestedExtension ParseFrom(global::System.IO.Stream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static TestNestedExtension ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- public static TestNestedExtension ParseDelimitedFrom(global::System.IO.Stream input) {
- return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
- }
- public static TestNestedExtension ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
- }
- public static TestNestedExtension ParseFrom(pb::ICodedInputStream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static TestNestedExtension ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- private TestNestedExtension 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(TestNestedExtension prototype) {
- return new Builder(prototype);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class Builder : pb::GeneratedBuilder<TestNestedExtension, Builder> {
- protected override Builder ThisBuilder {
- get { return this; }
- }
- public Builder() {
- result = DefaultInstance;
- resultIsReadOnly = true;
- }
- internal Builder(TestNestedExtension cloneFrom) {
- result = cloneFrom;
- resultIsReadOnly = true;
- }
-
- private bool resultIsReadOnly;
- private TestNestedExtension result;
-
- private TestNestedExtension PrepareBuilder() {
- if (resultIsReadOnly) {
- TestNestedExtension original = result;
- result = new TestNestedExtension();
- resultIsReadOnly = false;
- MergeFrom(original);
- }
- return result;
- }
-
- public override bool IsInitialized {
- get { return result.IsInitialized; }
- }
-
- protected override TestNestedExtension 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.TestNestedExtension.Descriptor; }
- }
-
- public override TestNestedExtension DefaultInstanceForType {
- get { return global::Google.ProtocolBuffers.TestProtos.TestNestedExtension.DefaultInstance; }
- }
-
- public override TestNestedExtension BuildPartial() {
- if (resultIsReadOnly) {
- return result;
- }
- resultIsReadOnly = true;
- return result.MakeReadOnly();
- }
-
- public override Builder MergeFrom(pb::IMessage other) {
- if (other is TestNestedExtension) {
- return MergeFrom((TestNestedExtension) other);
- } else {
- base.MergeFrom(other);
- return this;
- }
- }
-
- public override Builder MergeFrom(TestNestedExtension other) {
- if (other == global::Google.ProtocolBuffers.TestProtos.TestNestedExtension.DefaultInstance) return this;
- PrepareBuilder();
- this.MergeUnknownFields(other.UnknownFields);
- return this;
- }
-
- public override Builder MergeFrom(pb::ICodedInputStream input) {
- return MergeFrom(input, pb::ExtensionRegistry.Empty);
- }
-
- public override Builder MergeFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
- PrepareBuilder();
- pb::UnknownFieldSet.Builder unknownFields = null;
- uint tag;
- string field_name;
- while (input.ReadTag(out tag, out field_name)) {
- if(tag == 0 && field_name != null) {
- int field_ordinal = global::System.Array.BinarySearch(_testNestedExtensionFieldNames, field_name, global::System.StringComparer.Ordinal);
- if(field_ordinal >= 0)
- tag = _testNestedExtensionFieldTags[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 TestNestedExtension() {
- object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor, null);
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class TestRequired : pb::GeneratedMessage<TestRequired, TestRequired.Builder> {
- private TestRequired() { }
- private static readonly TestRequired defaultInstance = new TestRequired().MakeReadOnly();
- private static readonly string[] _testRequiredFieldNames = new string[] { "a", "b", "c", "dummy10", "dummy11", "dummy12", "dummy13", "dummy14", "dummy15", "dummy16", "dummy17", "dummy18", "dummy19", "dummy2", "dummy20", "dummy21", "dummy22", "dummy23", "dummy24", "dummy25", "dummy26", "dummy27", "dummy28", "dummy29", "dummy30", "dummy31", "dummy32", "dummy4", "dummy5", "dummy6", "dummy7", "dummy8", "dummy9" };
- private static readonly uint[] _testRequiredFieldTags = new uint[] { 8, 24, 264, 80, 88, 96, 104, 112, 120, 128, 136, 144, 152, 16, 160, 168, 176, 184, 192, 200, 208, 216, 224, 232, 240, 248, 256, 32, 40, 48, 56, 64, 72 };
- public static TestRequired DefaultInstance {
- get { return defaultInstance; }
- }
-
- public override TestRequired DefaultInstanceForType {
- get { return DefaultInstance; }
- }
-
- protected override TestRequired ThisMessage {
- get { return this; }
- }
-
- public static pbd::MessageDescriptor Descriptor {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.internal__static_protobuf_unittest_TestRequired__Descriptor; }
- }
-
- protected override pb::FieldAccess.FieldAccessorTable<TestRequired, TestRequired.Builder> InternalFieldAccessors {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.internal__static_protobuf_unittest_TestRequired__FieldAccessorTable; }
- }
-
- public const int SingleFieldNumber = 1000;
- public static pb::GeneratedExtensionBase<global::Google.ProtocolBuffers.TestProtos.TestRequired> Single;
- public const int MultiFieldNumber = 1001;
- public static pb::GeneratedExtensionBase<scg::IList<global::Google.ProtocolBuffers.TestProtos.TestRequired>> Multi;
- public const int AFieldNumber = 1;
- private bool hasA;
- private int a_;
- public bool HasA {
- get { return hasA; }
- }
- public int A {
- get { return a_; }
- }
-
- public const int Dummy2FieldNumber = 2;
- private bool hasDummy2;
- private int dummy2_;
- public bool HasDummy2 {
- get { return hasDummy2; }
- }
- public int Dummy2 {
- get { return dummy2_; }
- }
-
- public const int BFieldNumber = 3;
- private bool hasB;
- private int b_;
- public bool HasB {
- get { return hasB; }
- }
- public int B {
- get { return b_; }
- }
-
- public const int Dummy4FieldNumber = 4;
- private bool hasDummy4;
- private int dummy4_;
- public bool HasDummy4 {
- get { return hasDummy4; }
- }
- public int Dummy4 {
- get { return dummy4_; }
- }
-
- public const int Dummy5FieldNumber = 5;
- private bool hasDummy5;
- private int dummy5_;
- public bool HasDummy5 {
- get { return hasDummy5; }
- }
- public int Dummy5 {
- get { return dummy5_; }
- }
-
- public const int Dummy6FieldNumber = 6;
- private bool hasDummy6;
- private int dummy6_;
- public bool HasDummy6 {
- get { return hasDummy6; }
- }
- public int Dummy6 {
- get { return dummy6_; }
- }
-
- public const int Dummy7FieldNumber = 7;
- private bool hasDummy7;
- private int dummy7_;
- public bool HasDummy7 {
- get { return hasDummy7; }
- }
- public int Dummy7 {
- get { return dummy7_; }
- }
-
- public const int Dummy8FieldNumber = 8;
- private bool hasDummy8;
- private int dummy8_;
- public bool HasDummy8 {
- get { return hasDummy8; }
- }
- public int Dummy8 {
- get { return dummy8_; }
- }
-
- public const int Dummy9FieldNumber = 9;
- private bool hasDummy9;
- private int dummy9_;
- public bool HasDummy9 {
- get { return hasDummy9; }
- }
- public int Dummy9 {
- get { return dummy9_; }
- }
-
- public const int Dummy10FieldNumber = 10;
- private bool hasDummy10;
- private int dummy10_;
- public bool HasDummy10 {
- get { return hasDummy10; }
- }
- public int Dummy10 {
- get { return dummy10_; }
- }
-
- public const int Dummy11FieldNumber = 11;
- private bool hasDummy11;
- private int dummy11_;
- public bool HasDummy11 {
- get { return hasDummy11; }
- }
- public int Dummy11 {
- get { return dummy11_; }
- }
-
- public const int Dummy12FieldNumber = 12;
- private bool hasDummy12;
- private int dummy12_;
- public bool HasDummy12 {
- get { return hasDummy12; }
- }
- public int Dummy12 {
- get { return dummy12_; }
- }
-
- public const int Dummy13FieldNumber = 13;
- private bool hasDummy13;
- private int dummy13_;
- public bool HasDummy13 {
- get { return hasDummy13; }
- }
- public int Dummy13 {
- get { return dummy13_; }
- }
-
- public const int Dummy14FieldNumber = 14;
- private bool hasDummy14;
- private int dummy14_;
- public bool HasDummy14 {
- get { return hasDummy14; }
- }
- public int Dummy14 {
- get { return dummy14_; }
- }
-
- public const int Dummy15FieldNumber = 15;
- private bool hasDummy15;
- private int dummy15_;
- public bool HasDummy15 {
- get { return hasDummy15; }
- }
- public int Dummy15 {
- get { return dummy15_; }
- }
-
- public const int Dummy16FieldNumber = 16;
- private bool hasDummy16;
- private int dummy16_;
- public bool HasDummy16 {
- get { return hasDummy16; }
- }
- public int Dummy16 {
- get { return dummy16_; }
- }
-
- public const int Dummy17FieldNumber = 17;
- private bool hasDummy17;
- private int dummy17_;
- public bool HasDummy17 {
- get { return hasDummy17; }
- }
- public int Dummy17 {
- get { return dummy17_; }
- }
-
- public const int Dummy18FieldNumber = 18;
- private bool hasDummy18;
- private int dummy18_;
- public bool HasDummy18 {
- get { return hasDummy18; }
- }
- public int Dummy18 {
- get { return dummy18_; }
- }
-
- public const int Dummy19FieldNumber = 19;
- private bool hasDummy19;
- private int dummy19_;
- public bool HasDummy19 {
- get { return hasDummy19; }
- }
- public int Dummy19 {
- get { return dummy19_; }
- }
-
- public const int Dummy20FieldNumber = 20;
- private bool hasDummy20;
- private int dummy20_;
- public bool HasDummy20 {
- get { return hasDummy20; }
- }
- public int Dummy20 {
- get { return dummy20_; }
- }
-
- public const int Dummy21FieldNumber = 21;
- private bool hasDummy21;
- private int dummy21_;
- public bool HasDummy21 {
- get { return hasDummy21; }
- }
- public int Dummy21 {
- get { return dummy21_; }
- }
-
- public const int Dummy22FieldNumber = 22;
- private bool hasDummy22;
- private int dummy22_;
- public bool HasDummy22 {
- get { return hasDummy22; }
- }
- public int Dummy22 {
- get { return dummy22_; }
- }
-
- public const int Dummy23FieldNumber = 23;
- private bool hasDummy23;
- private int dummy23_;
- public bool HasDummy23 {
- get { return hasDummy23; }
- }
- public int Dummy23 {
- get { return dummy23_; }
- }
-
- public const int Dummy24FieldNumber = 24;
- private bool hasDummy24;
- private int dummy24_;
- public bool HasDummy24 {
- get { return hasDummy24; }
- }
- public int Dummy24 {
- get { return dummy24_; }
- }
-
- public const int Dummy25FieldNumber = 25;
- private bool hasDummy25;
- private int dummy25_;
- public bool HasDummy25 {
- get { return hasDummy25; }
- }
- public int Dummy25 {
- get { return dummy25_; }
- }
-
- public const int Dummy26FieldNumber = 26;
- private bool hasDummy26;
- private int dummy26_;
- public bool HasDummy26 {
- get { return hasDummy26; }
- }
- public int Dummy26 {
- get { return dummy26_; }
- }
-
- public const int Dummy27FieldNumber = 27;
- private bool hasDummy27;
- private int dummy27_;
- public bool HasDummy27 {
- get { return hasDummy27; }
- }
- public int Dummy27 {
- get { return dummy27_; }
- }
-
- public const int Dummy28FieldNumber = 28;
- private bool hasDummy28;
- private int dummy28_;
- public bool HasDummy28 {
- get { return hasDummy28; }
- }
- public int Dummy28 {
- get { return dummy28_; }
- }
-
- public const int Dummy29FieldNumber = 29;
- private bool hasDummy29;
- private int dummy29_;
- public bool HasDummy29 {
- get { return hasDummy29; }
- }
- public int Dummy29 {
- get { return dummy29_; }
- }
-
- public const int Dummy30FieldNumber = 30;
- private bool hasDummy30;
- private int dummy30_;
- public bool HasDummy30 {
- get { return hasDummy30; }
- }
- public int Dummy30 {
- get { return dummy30_; }
- }
-
- public const int Dummy31FieldNumber = 31;
- private bool hasDummy31;
- private int dummy31_;
- public bool HasDummy31 {
- get { return hasDummy31; }
- }
- public int Dummy31 {
- get { return dummy31_; }
- }
-
- public const int Dummy32FieldNumber = 32;
- private bool hasDummy32;
- private int dummy32_;
- public bool HasDummy32 {
- get { return hasDummy32; }
- }
- public int Dummy32 {
- get { return dummy32_; }
- }
-
- public const int CFieldNumber = 33;
- private bool hasC;
- private int c_;
- public bool HasC {
- get { return hasC; }
- }
- public int C {
- get { return c_; }
- }
-
- public override bool IsInitialized {
- get {
- if (!hasA) return false;
- if (!hasB) return false;
- if (!hasC) return false;
- return true;
- }
- }
-
- public override void WriteTo(pb::ICodedOutputStream output) {
- CalcSerializedSize();
- string[] field_names = _testRequiredFieldNames;
- if (hasA) {
- output.WriteInt32(1, field_names[0], A);
- }
- if (hasDummy2) {
- output.WriteInt32(2, field_names[13], Dummy2);
- }
- if (hasB) {
- output.WriteInt32(3, field_names[1], B);
- }
- if (hasDummy4) {
- output.WriteInt32(4, field_names[27], Dummy4);
- }
- if (hasDummy5) {
- output.WriteInt32(5, field_names[28], Dummy5);
- }
- if (hasDummy6) {
- output.WriteInt32(6, field_names[29], Dummy6);
- }
- if (hasDummy7) {
- output.WriteInt32(7, field_names[30], Dummy7);
- }
- if (hasDummy8) {
- output.WriteInt32(8, field_names[31], Dummy8);
- }
- if (hasDummy9) {
- output.WriteInt32(9, field_names[32], Dummy9);
- }
- if (hasDummy10) {
- output.WriteInt32(10, field_names[3], Dummy10);
- }
- if (hasDummy11) {
- output.WriteInt32(11, field_names[4], Dummy11);
- }
- if (hasDummy12) {
- output.WriteInt32(12, field_names[5], Dummy12);
- }
- if (hasDummy13) {
- output.WriteInt32(13, field_names[6], Dummy13);
- }
- if (hasDummy14) {
- output.WriteInt32(14, field_names[7], Dummy14);
- }
- if (hasDummy15) {
- output.WriteInt32(15, field_names[8], Dummy15);
- }
- if (hasDummy16) {
- output.WriteInt32(16, field_names[9], Dummy16);
- }
- if (hasDummy17) {
- output.WriteInt32(17, field_names[10], Dummy17);
- }
- if (hasDummy18) {
- output.WriteInt32(18, field_names[11], Dummy18);
- }
- if (hasDummy19) {
- output.WriteInt32(19, field_names[12], Dummy19);
- }
- if (hasDummy20) {
- output.WriteInt32(20, field_names[14], Dummy20);
- }
- if (hasDummy21) {
- output.WriteInt32(21, field_names[15], Dummy21);
- }
- if (hasDummy22) {
- output.WriteInt32(22, field_names[16], Dummy22);
- }
- if (hasDummy23) {
- output.WriteInt32(23, field_names[17], Dummy23);
- }
- if (hasDummy24) {
- output.WriteInt32(24, field_names[18], Dummy24);
- }
- if (hasDummy25) {
- output.WriteInt32(25, field_names[19], Dummy25);
- }
- if (hasDummy26) {
- output.WriteInt32(26, field_names[20], Dummy26);
- }
- if (hasDummy27) {
- output.WriteInt32(27, field_names[21], Dummy27);
- }
- if (hasDummy28) {
- output.WriteInt32(28, field_names[22], Dummy28);
- }
- if (hasDummy29) {
- output.WriteInt32(29, field_names[23], Dummy29);
- }
- if (hasDummy30) {
- output.WriteInt32(30, field_names[24], Dummy30);
- }
- if (hasDummy31) {
- output.WriteInt32(31, field_names[25], Dummy31);
- }
- if (hasDummy32) {
- output.WriteInt32(32, field_names[26], Dummy32);
- }
- if (hasC) {
- output.WriteInt32(33, field_names[2], C);
- }
- UnknownFields.WriteTo(output);
- }
-
- private int memoizedSerializedSize = -1;
- public override int SerializedSize {
- get {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
- return CalcSerializedSize();
- }
- }
-
- private int CalcSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- if (hasA) {
- size += pb::CodedOutputStream.ComputeInt32Size(1, A);
- }
- if (hasDummy2) {
- size += pb::CodedOutputStream.ComputeInt32Size(2, Dummy2);
- }
- if (hasB) {
- size += pb::CodedOutputStream.ComputeInt32Size(3, B);
- }
- if (hasDummy4) {
- size += pb::CodedOutputStream.ComputeInt32Size(4, Dummy4);
- }
- if (hasDummy5) {
- size += pb::CodedOutputStream.ComputeInt32Size(5, Dummy5);
- }
- if (hasDummy6) {
- size += pb::CodedOutputStream.ComputeInt32Size(6, Dummy6);
- }
- if (hasDummy7) {
- size += pb::CodedOutputStream.ComputeInt32Size(7, Dummy7);
- }
- if (hasDummy8) {
- size += pb::CodedOutputStream.ComputeInt32Size(8, Dummy8);
- }
- if (hasDummy9) {
- size += pb::CodedOutputStream.ComputeInt32Size(9, Dummy9);
- }
- if (hasDummy10) {
- size += pb::CodedOutputStream.ComputeInt32Size(10, Dummy10);
- }
- if (hasDummy11) {
- size += pb::CodedOutputStream.ComputeInt32Size(11, Dummy11);
- }
- if (hasDummy12) {
- size += pb::CodedOutputStream.ComputeInt32Size(12, Dummy12);
- }
- if (hasDummy13) {
- size += pb::CodedOutputStream.ComputeInt32Size(13, Dummy13);
- }
- if (hasDummy14) {
- size += pb::CodedOutputStream.ComputeInt32Size(14, Dummy14);
- }
- if (hasDummy15) {
- size += pb::CodedOutputStream.ComputeInt32Size(15, Dummy15);
- }
- if (hasDummy16) {
- size += pb::CodedOutputStream.ComputeInt32Size(16, Dummy16);
- }
- if (hasDummy17) {
- size += pb::CodedOutputStream.ComputeInt32Size(17, Dummy17);
- }
- if (hasDummy18) {
- size += pb::CodedOutputStream.ComputeInt32Size(18, Dummy18);
- }
- if (hasDummy19) {
- size += pb::CodedOutputStream.ComputeInt32Size(19, Dummy19);
- }
- if (hasDummy20) {
- size += pb::CodedOutputStream.ComputeInt32Size(20, Dummy20);
- }
- if (hasDummy21) {
- size += pb::CodedOutputStream.ComputeInt32Size(21, Dummy21);
- }
- if (hasDummy22) {
- size += pb::CodedOutputStream.ComputeInt32Size(22, Dummy22);
- }
- if (hasDummy23) {
- size += pb::CodedOutputStream.ComputeInt32Size(23, Dummy23);
- }
- if (hasDummy24) {
- size += pb::CodedOutputStream.ComputeInt32Size(24, Dummy24);
- }
- if (hasDummy25) {
- size += pb::CodedOutputStream.ComputeInt32Size(25, Dummy25);
- }
- if (hasDummy26) {
- size += pb::CodedOutputStream.ComputeInt32Size(26, Dummy26);
- }
- if (hasDummy27) {
- size += pb::CodedOutputStream.ComputeInt32Size(27, Dummy27);
- }
- if (hasDummy28) {
- size += pb::CodedOutputStream.ComputeInt32Size(28, Dummy28);
- }
- if (hasDummy29) {
- size += pb::CodedOutputStream.ComputeInt32Size(29, Dummy29);
- }
- if (hasDummy30) {
- size += pb::CodedOutputStream.ComputeInt32Size(30, Dummy30);
- }
- if (hasDummy31) {
- size += pb::CodedOutputStream.ComputeInt32Size(31, Dummy31);
- }
- if (hasDummy32) {
- size += pb::CodedOutputStream.ComputeInt32Size(32, Dummy32);
- }
- if (hasC) {
- size += pb::CodedOutputStream.ComputeInt32Size(33, C);
- }
- size += UnknownFields.SerializedSize;
- memoizedSerializedSize = size;
- return size;
- }
- public static TestRequired ParseFrom(pb::ByteString data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static TestRequired ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static TestRequired ParseFrom(byte[] data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static TestRequired ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static TestRequired ParseFrom(global::System.IO.Stream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static TestRequired ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- public static TestRequired ParseDelimitedFrom(global::System.IO.Stream input) {
- return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
- }
- public static TestRequired ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
- }
- public static TestRequired ParseFrom(pb::ICodedInputStream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static TestRequired ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- private TestRequired 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(TestRequired prototype) {
- return new Builder(prototype);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class Builder : pb::GeneratedBuilder<TestRequired, Builder> {
- protected override Builder ThisBuilder {
- get { return this; }
- }
- public Builder() {
- result = DefaultInstance;
- resultIsReadOnly = true;
- }
- internal Builder(TestRequired cloneFrom) {
- result = cloneFrom;
- resultIsReadOnly = true;
- }
-
- private bool resultIsReadOnly;
- private TestRequired result;
-
- private TestRequired PrepareBuilder() {
- if (resultIsReadOnly) {
- TestRequired original = result;
- result = new TestRequired();
- resultIsReadOnly = false;
- MergeFrom(original);
- }
- return result;
- }
-
- public override bool IsInitialized {
- get { return result.IsInitialized; }
- }
-
- protected override TestRequired 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.TestRequired.Descriptor; }
- }
-
- public override TestRequired DefaultInstanceForType {
- get { return global::Google.ProtocolBuffers.TestProtos.TestRequired.DefaultInstance; }
- }
-
- public override TestRequired BuildPartial() {
- if (resultIsReadOnly) {
- return result;
- }
- resultIsReadOnly = true;
- return result.MakeReadOnly();
- }
-
- public override Builder MergeFrom(pb::IMessage other) {
- if (other is TestRequired) {
- return MergeFrom((TestRequired) other);
- } else {
- base.MergeFrom(other);
- return this;
- }
- }
-
- public override Builder MergeFrom(TestRequired other) {
- if (other == global::Google.ProtocolBuffers.TestProtos.TestRequired.DefaultInstance) return this;
- PrepareBuilder();
- if (other.HasA) {
- A = other.A;
- }
- if (other.HasDummy2) {
- Dummy2 = other.Dummy2;
- }
- if (other.HasB) {
- B = other.B;
- }
- if (other.HasDummy4) {
- Dummy4 = other.Dummy4;
- }
- if (other.HasDummy5) {
- Dummy5 = other.Dummy5;
- }
- if (other.HasDummy6) {
- Dummy6 = other.Dummy6;
- }
- if (other.HasDummy7) {
- Dummy7 = other.Dummy7;
- }
- if (other.HasDummy8) {
- Dummy8 = other.Dummy8;
- }
- if (other.HasDummy9) {
- Dummy9 = other.Dummy9;
- }
- if (other.HasDummy10) {
- Dummy10 = other.Dummy10;
- }
- if (other.HasDummy11) {
- Dummy11 = other.Dummy11;
- }
- if (other.HasDummy12) {
- Dummy12 = other.Dummy12;
- }
- if (other.HasDummy13) {
- Dummy13 = other.Dummy13;
- }
- if (other.HasDummy14) {
- Dummy14 = other.Dummy14;
- }
- if (other.HasDummy15) {
- Dummy15 = other.Dummy15;
- }
- if (other.HasDummy16) {
- Dummy16 = other.Dummy16;
- }
- if (other.HasDummy17) {
- Dummy17 = other.Dummy17;
- }
- if (other.HasDummy18) {
- Dummy18 = other.Dummy18;
- }
- if (other.HasDummy19) {
- Dummy19 = other.Dummy19;
- }
- if (other.HasDummy20) {
- Dummy20 = other.Dummy20;
- }
- if (other.HasDummy21) {
- Dummy21 = other.Dummy21;
- }
- if (other.HasDummy22) {
- Dummy22 = other.Dummy22;
- }
- if (other.HasDummy23) {
- Dummy23 = other.Dummy23;
- }
- if (other.HasDummy24) {
- Dummy24 = other.Dummy24;
- }
- if (other.HasDummy25) {
- Dummy25 = other.Dummy25;
- }
- if (other.HasDummy26) {
- Dummy26 = other.Dummy26;
- }
- if (other.HasDummy27) {
- Dummy27 = other.Dummy27;
- }
- if (other.HasDummy28) {
- Dummy28 = other.Dummy28;
- }
- if (other.HasDummy29) {
- Dummy29 = other.Dummy29;
- }
- if (other.HasDummy30) {
- Dummy30 = other.Dummy30;
- }
- if (other.HasDummy31) {
- Dummy31 = other.Dummy31;
- }
- if (other.HasDummy32) {
- Dummy32 = other.Dummy32;
- }
- if (other.HasC) {
- C = other.C;
- }
- 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(_testRequiredFieldNames, field_name, global::System.StringComparer.Ordinal);
- if(field_ordinal >= 0)
- tag = _testRequiredFieldTags[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.hasA = input.ReadInt32(ref result.a_);
- break;
- }
- case 16: {
- result.hasDummy2 = input.ReadInt32(ref result.dummy2_);
- break;
- }
- case 24: {
- result.hasB = input.ReadInt32(ref result.b_);
- break;
- }
- case 32: {
- result.hasDummy4 = input.ReadInt32(ref result.dummy4_);
- break;
- }
- case 40: {
- result.hasDummy5 = input.ReadInt32(ref result.dummy5_);
- break;
- }
- case 48: {
- result.hasDummy6 = input.ReadInt32(ref result.dummy6_);
- break;
- }
- case 56: {
- result.hasDummy7 = input.ReadInt32(ref result.dummy7_);
- break;
- }
- case 64: {
- result.hasDummy8 = input.ReadInt32(ref result.dummy8_);
- break;
- }
- case 72: {
- result.hasDummy9 = input.ReadInt32(ref result.dummy9_);
- break;
- }
- case 80: {
- result.hasDummy10 = input.ReadInt32(ref result.dummy10_);
- break;
- }
- case 88: {
- result.hasDummy11 = input.ReadInt32(ref result.dummy11_);
- break;
- }
- case 96: {
- result.hasDummy12 = input.ReadInt32(ref result.dummy12_);
- break;
- }
- case 104: {
- result.hasDummy13 = input.ReadInt32(ref result.dummy13_);
- break;
- }
- case 112: {
- result.hasDummy14 = input.ReadInt32(ref result.dummy14_);
- break;
- }
- case 120: {
- result.hasDummy15 = input.ReadInt32(ref result.dummy15_);
- break;
- }
- case 128: {
- result.hasDummy16 = input.ReadInt32(ref result.dummy16_);
- break;
- }
- case 136: {
- result.hasDummy17 = input.ReadInt32(ref result.dummy17_);
- break;
- }
- case 144: {
- result.hasDummy18 = input.ReadInt32(ref result.dummy18_);
- break;
- }
- case 152: {
- result.hasDummy19 = input.ReadInt32(ref result.dummy19_);
- break;
- }
- case 160: {
- result.hasDummy20 = input.ReadInt32(ref result.dummy20_);
- break;
- }
- case 168: {
- result.hasDummy21 = input.ReadInt32(ref result.dummy21_);
- break;
- }
- case 176: {
- result.hasDummy22 = input.ReadInt32(ref result.dummy22_);
- break;
- }
- case 184: {
- result.hasDummy23 = input.ReadInt32(ref result.dummy23_);
- break;
- }
- case 192: {
- result.hasDummy24 = input.ReadInt32(ref result.dummy24_);
- break;
- }
- case 200: {
- result.hasDummy25 = input.ReadInt32(ref result.dummy25_);
- break;
- }
- case 208: {
- result.hasDummy26 = input.ReadInt32(ref result.dummy26_);
- break;
- }
- case 216: {
- result.hasDummy27 = input.ReadInt32(ref result.dummy27_);
- break;
- }
- case 224: {
- result.hasDummy28 = input.ReadInt32(ref result.dummy28_);
- break;
- }
- case 232: {
- result.hasDummy29 = input.ReadInt32(ref result.dummy29_);
- break;
- }
- case 240: {
- result.hasDummy30 = input.ReadInt32(ref result.dummy30_);
- break;
- }
- case 248: {
- result.hasDummy31 = input.ReadInt32(ref result.dummy31_);
- break;
- }
- case 256: {
- result.hasDummy32 = input.ReadInt32(ref result.dummy32_);
- break;
- }
- case 264: {
- result.hasC = input.ReadInt32(ref result.c_);
- break;
- }
- }
- }
-
- if (unknownFields != null) {
- this.UnknownFields = unknownFields.Build();
- }
- return this;
- }
-
-
- public bool HasA {
- get { return result.hasA; }
- }
- public int A {
- get { return result.A; }
- set { SetA(value); }
- }
- public Builder SetA(int value) {
- PrepareBuilder();
- result.hasA = true;
- result.a_ = value;
- return this;
- }
- public Builder ClearA() {
- PrepareBuilder();
- result.hasA = false;
- result.a_ = 0;
- return this;
- }
-
- public bool HasDummy2 {
- get { return result.hasDummy2; }
- }
- public int Dummy2 {
- get { return result.Dummy2; }
- set { SetDummy2(value); }
- }
- public Builder SetDummy2(int value) {
- PrepareBuilder();
- result.hasDummy2 = true;
- result.dummy2_ = value;
- return this;
- }
- public Builder ClearDummy2() {
- PrepareBuilder();
- result.hasDummy2 = false;
- result.dummy2_ = 0;
- return this;
- }
-
- public bool HasB {
- get { return result.hasB; }
- }
- public int B {
- get { return result.B; }
- set { SetB(value); }
- }
- public Builder SetB(int value) {
- PrepareBuilder();
- result.hasB = true;
- result.b_ = value;
- return this;
- }
- public Builder ClearB() {
- PrepareBuilder();
- result.hasB = false;
- result.b_ = 0;
- return this;
- }
-
- public bool HasDummy4 {
- get { return result.hasDummy4; }
- }
- public int Dummy4 {
- get { return result.Dummy4; }
- set { SetDummy4(value); }
- }
- public Builder SetDummy4(int value) {
- PrepareBuilder();
- result.hasDummy4 = true;
- result.dummy4_ = value;
- return this;
- }
- public Builder ClearDummy4() {
- PrepareBuilder();
- result.hasDummy4 = false;
- result.dummy4_ = 0;
- return this;
- }
-
- public bool HasDummy5 {
- get { return result.hasDummy5; }
- }
- public int Dummy5 {
- get { return result.Dummy5; }
- set { SetDummy5(value); }
- }
- public Builder SetDummy5(int value) {
- PrepareBuilder();
- result.hasDummy5 = true;
- result.dummy5_ = value;
- return this;
- }
- public Builder ClearDummy5() {
- PrepareBuilder();
- result.hasDummy5 = false;
- result.dummy5_ = 0;
- return this;
- }
-
- public bool HasDummy6 {
- get { return result.hasDummy6; }
- }
- public int Dummy6 {
- get { return result.Dummy6; }
- set { SetDummy6(value); }
- }
- public Builder SetDummy6(int value) {
- PrepareBuilder();
- result.hasDummy6 = true;
- result.dummy6_ = value;
- return this;
- }
- public Builder ClearDummy6() {
- PrepareBuilder();
- result.hasDummy6 = false;
- result.dummy6_ = 0;
- return this;
- }
-
- public bool HasDummy7 {
- get { return result.hasDummy7; }
- }
- public int Dummy7 {
- get { return result.Dummy7; }
- set { SetDummy7(value); }
- }
- public Builder SetDummy7(int value) {
- PrepareBuilder();
- result.hasDummy7 = true;
- result.dummy7_ = value;
- return this;
- }
- public Builder ClearDummy7() {
- PrepareBuilder();
- result.hasDummy7 = false;
- result.dummy7_ = 0;
- return this;
- }
-
- public bool HasDummy8 {
- get { return result.hasDummy8; }
- }
- public int Dummy8 {
- get { return result.Dummy8; }
- set { SetDummy8(value); }
- }
- public Builder SetDummy8(int value) {
- PrepareBuilder();
- result.hasDummy8 = true;
- result.dummy8_ = value;
- return this;
- }
- public Builder ClearDummy8() {
- PrepareBuilder();
- result.hasDummy8 = false;
- result.dummy8_ = 0;
- return this;
- }
-
- public bool HasDummy9 {
- get { return result.hasDummy9; }
- }
- public int Dummy9 {
- get { return result.Dummy9; }
- set { SetDummy9(value); }
- }
- public Builder SetDummy9(int value) {
- PrepareBuilder();
- result.hasDummy9 = true;
- result.dummy9_ = value;
- return this;
- }
- public Builder ClearDummy9() {
- PrepareBuilder();
- result.hasDummy9 = false;
- result.dummy9_ = 0;
- return this;
- }
-
- public bool HasDummy10 {
- get { return result.hasDummy10; }
- }
- public int Dummy10 {
- get { return result.Dummy10; }
- set { SetDummy10(value); }
- }
- public Builder SetDummy10(int value) {
- PrepareBuilder();
- result.hasDummy10 = true;
- result.dummy10_ = value;
- return this;
- }
- public Builder ClearDummy10() {
- PrepareBuilder();
- result.hasDummy10 = false;
- result.dummy10_ = 0;
- return this;
- }
-
- public bool HasDummy11 {
- get { return result.hasDummy11; }
- }
- public int Dummy11 {
- get { return result.Dummy11; }
- set { SetDummy11(value); }
- }
- public Builder SetDummy11(int value) {
- PrepareBuilder();
- result.hasDummy11 = true;
- result.dummy11_ = value;
- return this;
- }
- public Builder ClearDummy11() {
- PrepareBuilder();
- result.hasDummy11 = false;
- result.dummy11_ = 0;
- return this;
- }
-
- public bool HasDummy12 {
- get { return result.hasDummy12; }
- }
- public int Dummy12 {
- get { return result.Dummy12; }
- set { SetDummy12(value); }
- }
- public Builder SetDummy12(int value) {
- PrepareBuilder();
- result.hasDummy12 = true;
- result.dummy12_ = value;
- return this;
- }
- public Builder ClearDummy12() {
- PrepareBuilder();
- result.hasDummy12 = false;
- result.dummy12_ = 0;
- return this;
- }
-
- public bool HasDummy13 {
- get { return result.hasDummy13; }
- }
- public int Dummy13 {
- get { return result.Dummy13; }
- set { SetDummy13(value); }
- }
- public Builder SetDummy13(int value) {
- PrepareBuilder();
- result.hasDummy13 = true;
- result.dummy13_ = value;
- return this;
- }
- public Builder ClearDummy13() {
- PrepareBuilder();
- result.hasDummy13 = false;
- result.dummy13_ = 0;
- return this;
- }
-
- public bool HasDummy14 {
- get { return result.hasDummy14; }
- }
- public int Dummy14 {
- get { return result.Dummy14; }
- set { SetDummy14(value); }
- }
- public Builder SetDummy14(int value) {
- PrepareBuilder();
- result.hasDummy14 = true;
- result.dummy14_ = value;
- return this;
- }
- public Builder ClearDummy14() {
- PrepareBuilder();
- result.hasDummy14 = false;
- result.dummy14_ = 0;
- return this;
- }
-
- public bool HasDummy15 {
- get { return result.hasDummy15; }
- }
- public int Dummy15 {
- get { return result.Dummy15; }
- set { SetDummy15(value); }
- }
- public Builder SetDummy15(int value) {
- PrepareBuilder();
- result.hasDummy15 = true;
- result.dummy15_ = value;
- return this;
- }
- public Builder ClearDummy15() {
- PrepareBuilder();
- result.hasDummy15 = false;
- result.dummy15_ = 0;
- return this;
- }
-
- public bool HasDummy16 {
- get { return result.hasDummy16; }
- }
- public int Dummy16 {
- get { return result.Dummy16; }
- set { SetDummy16(value); }
- }
- public Builder SetDummy16(int value) {
- PrepareBuilder();
- result.hasDummy16 = true;
- result.dummy16_ = value;
- return this;
- }
- public Builder ClearDummy16() {
- PrepareBuilder();
- result.hasDummy16 = false;
- result.dummy16_ = 0;
- return this;
- }
-
- public bool HasDummy17 {
- get { return result.hasDummy17; }
- }
- public int Dummy17 {
- get { return result.Dummy17; }
- set { SetDummy17(value); }
- }
- public Builder SetDummy17(int value) {
- PrepareBuilder();
- result.hasDummy17 = true;
- result.dummy17_ = value;
- return this;
- }
- public Builder ClearDummy17() {
- PrepareBuilder();
- result.hasDummy17 = false;
- result.dummy17_ = 0;
- return this;
- }
-
- public bool HasDummy18 {
- get { return result.hasDummy18; }
- }
- public int Dummy18 {
- get { return result.Dummy18; }
- set { SetDummy18(value); }
- }
- public Builder SetDummy18(int value) {
- PrepareBuilder();
- result.hasDummy18 = true;
- result.dummy18_ = value;
- return this;
- }
- public Builder ClearDummy18() {
- PrepareBuilder();
- result.hasDummy18 = false;
- result.dummy18_ = 0;
- return this;
- }
-
- public bool HasDummy19 {
- get { return result.hasDummy19; }
- }
- public int Dummy19 {
- get { return result.Dummy19; }
- set { SetDummy19(value); }
- }
- public Builder SetDummy19(int value) {
- PrepareBuilder();
- result.hasDummy19 = true;
- result.dummy19_ = value;
- return this;
- }
- public Builder ClearDummy19() {
- PrepareBuilder();
- result.hasDummy19 = false;
- result.dummy19_ = 0;
- return this;
- }
-
- public bool HasDummy20 {
- get { return result.hasDummy20; }
- }
- public int Dummy20 {
- get { return result.Dummy20; }
- set { SetDummy20(value); }
- }
- public Builder SetDummy20(int value) {
- PrepareBuilder();
- result.hasDummy20 = true;
- result.dummy20_ = value;
- return this;
- }
- public Builder ClearDummy20() {
- PrepareBuilder();
- result.hasDummy20 = false;
- result.dummy20_ = 0;
- return this;
- }
-
- public bool HasDummy21 {
- get { return result.hasDummy21; }
- }
- public int Dummy21 {
- get { return result.Dummy21; }
- set { SetDummy21(value); }
- }
- public Builder SetDummy21(int value) {
- PrepareBuilder();
- result.hasDummy21 = true;
- result.dummy21_ = value;
- return this;
- }
- public Builder ClearDummy21() {
- PrepareBuilder();
- result.hasDummy21 = false;
- result.dummy21_ = 0;
- return this;
- }
-
- public bool HasDummy22 {
- get { return result.hasDummy22; }
- }
- public int Dummy22 {
- get { return result.Dummy22; }
- set { SetDummy22(value); }
- }
- public Builder SetDummy22(int value) {
- PrepareBuilder();
- result.hasDummy22 = true;
- result.dummy22_ = value;
- return this;
- }
- public Builder ClearDummy22() {
- PrepareBuilder();
- result.hasDummy22 = false;
- result.dummy22_ = 0;
- return this;
- }
-
- public bool HasDummy23 {
- get { return result.hasDummy23; }
- }
- public int Dummy23 {
- get { return result.Dummy23; }
- set { SetDummy23(value); }
- }
- public Builder SetDummy23(int value) {
- PrepareBuilder();
- result.hasDummy23 = true;
- result.dummy23_ = value;
- return this;
- }
- public Builder ClearDummy23() {
- PrepareBuilder();
- result.hasDummy23 = false;
- result.dummy23_ = 0;
- return this;
- }
-
- public bool HasDummy24 {
- get { return result.hasDummy24; }
- }
- public int Dummy24 {
- get { return result.Dummy24; }
- set { SetDummy24(value); }
- }
- public Builder SetDummy24(int value) {
- PrepareBuilder();
- result.hasDummy24 = true;
- result.dummy24_ = value;
- return this;
- }
- public Builder ClearDummy24() {
- PrepareBuilder();
- result.hasDummy24 = false;
- result.dummy24_ = 0;
- return this;
- }
-
- public bool HasDummy25 {
- get { return result.hasDummy25; }
- }
- public int Dummy25 {
- get { return result.Dummy25; }
- set { SetDummy25(value); }
- }
- public Builder SetDummy25(int value) {
- PrepareBuilder();
- result.hasDummy25 = true;
- result.dummy25_ = value;
- return this;
- }
- public Builder ClearDummy25() {
- PrepareBuilder();
- result.hasDummy25 = false;
- result.dummy25_ = 0;
- return this;
- }
-
- public bool HasDummy26 {
- get { return result.hasDummy26; }
- }
- public int Dummy26 {
- get { return result.Dummy26; }
- set { SetDummy26(value); }
- }
- public Builder SetDummy26(int value) {
- PrepareBuilder();
- result.hasDummy26 = true;
- result.dummy26_ = value;
- return this;
- }
- public Builder ClearDummy26() {
- PrepareBuilder();
- result.hasDummy26 = false;
- result.dummy26_ = 0;
- return this;
- }
-
- public bool HasDummy27 {
- get { return result.hasDummy27; }
- }
- public int Dummy27 {
- get { return result.Dummy27; }
- set { SetDummy27(value); }
- }
- public Builder SetDummy27(int value) {
- PrepareBuilder();
- result.hasDummy27 = true;
- result.dummy27_ = value;
- return this;
- }
- public Builder ClearDummy27() {
- PrepareBuilder();
- result.hasDummy27 = false;
- result.dummy27_ = 0;
- return this;
- }
-
- public bool HasDummy28 {
- get { return result.hasDummy28; }
- }
- public int Dummy28 {
- get { return result.Dummy28; }
- set { SetDummy28(value); }
- }
- public Builder SetDummy28(int value) {
- PrepareBuilder();
- result.hasDummy28 = true;
- result.dummy28_ = value;
- return this;
- }
- public Builder ClearDummy28() {
- PrepareBuilder();
- result.hasDummy28 = false;
- result.dummy28_ = 0;
- return this;
- }
-
- public bool HasDummy29 {
- get { return result.hasDummy29; }
- }
- public int Dummy29 {
- get { return result.Dummy29; }
- set { SetDummy29(value); }
- }
- public Builder SetDummy29(int value) {
- PrepareBuilder();
- result.hasDummy29 = true;
- result.dummy29_ = value;
- return this;
- }
- public Builder ClearDummy29() {
- PrepareBuilder();
- result.hasDummy29 = false;
- result.dummy29_ = 0;
- return this;
- }
-
- public bool HasDummy30 {
- get { return result.hasDummy30; }
- }
- public int Dummy30 {
- get { return result.Dummy30; }
- set { SetDummy30(value); }
- }
- public Builder SetDummy30(int value) {
- PrepareBuilder();
- result.hasDummy30 = true;
- result.dummy30_ = value;
- return this;
- }
- public Builder ClearDummy30() {
- PrepareBuilder();
- result.hasDummy30 = false;
- result.dummy30_ = 0;
- return this;
- }
-
- public bool HasDummy31 {
- get { return result.hasDummy31; }
- }
- public int Dummy31 {
- get { return result.Dummy31; }
- set { SetDummy31(value); }
- }
- public Builder SetDummy31(int value) {
- PrepareBuilder();
- result.hasDummy31 = true;
- result.dummy31_ = value;
- return this;
- }
- public Builder ClearDummy31() {
- PrepareBuilder();
- result.hasDummy31 = false;
- result.dummy31_ = 0;
- return this;
- }
-
- public bool HasDummy32 {
- get { return result.hasDummy32; }
- }
- public int Dummy32 {
- get { return result.Dummy32; }
- set { SetDummy32(value); }
- }
- public Builder SetDummy32(int value) {
- PrepareBuilder();
- result.hasDummy32 = true;
- result.dummy32_ = value;
- return this;
- }
- public Builder ClearDummy32() {
- PrepareBuilder();
- result.hasDummy32 = false;
- result.dummy32_ = 0;
- return this;
- }
-
- public bool HasC {
- get { return result.hasC; }
- }
- public int C {
- get { return result.C; }
- set { SetC(value); }
- }
- public Builder SetC(int value) {
- PrepareBuilder();
- result.hasC = true;
- result.c_ = value;
- return this;
- }
- public Builder ClearC() {
- PrepareBuilder();
- result.hasC = false;
- result.c_ = 0;
- return this;
- }
- }
- static TestRequired() {
- object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor, null);
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class TestRequiredForeign : pb::GeneratedMessage<TestRequiredForeign, TestRequiredForeign.Builder> {
- private TestRequiredForeign() { }
- private static readonly TestRequiredForeign defaultInstance = new TestRequiredForeign().MakeReadOnly();
- private static readonly string[] _testRequiredForeignFieldNames = new string[] { "dummy", "optional_message", "repeated_message" };
- private static readonly uint[] _testRequiredForeignFieldTags = new uint[] { 24, 10, 18 };
- public static TestRequiredForeign DefaultInstance {
- get { return defaultInstance; }
- }
-
- public override TestRequiredForeign DefaultInstanceForType {
- get { return DefaultInstance; }
- }
-
- protected override TestRequiredForeign ThisMessage {
- get { return this; }
- }
-
- public static pbd::MessageDescriptor Descriptor {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.internal__static_protobuf_unittest_TestRequiredForeign__Descriptor; }
- }
-
- protected override pb::FieldAccess.FieldAccessorTable<TestRequiredForeign, TestRequiredForeign.Builder> InternalFieldAccessors {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.internal__static_protobuf_unittest_TestRequiredForeign__FieldAccessorTable; }
- }
-
- public const int OptionalMessageFieldNumber = 1;
- private bool hasOptionalMessage;
- private global::Google.ProtocolBuffers.TestProtos.TestRequired optionalMessage_;
- public bool HasOptionalMessage {
- get { return hasOptionalMessage; }
- }
- public global::Google.ProtocolBuffers.TestProtos.TestRequired OptionalMessage {
- get { return optionalMessage_ ?? global::Google.ProtocolBuffers.TestProtos.TestRequired.DefaultInstance; }
- }
-
- public const int RepeatedMessageFieldNumber = 2;
- private pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.TestRequired> repeatedMessage_ = new pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.TestRequired>();
- public scg::IList<global::Google.ProtocolBuffers.TestProtos.TestRequired> RepeatedMessageList {
- get { return repeatedMessage_; }
- }
- public int RepeatedMessageCount {
- get { return repeatedMessage_.Count; }
- }
- public global::Google.ProtocolBuffers.TestProtos.TestRequired GetRepeatedMessage(int index) {
- return repeatedMessage_[index];
- }
-
- public const int DummyFieldNumber = 3;
- private bool hasDummy;
- private int dummy_;
- public bool HasDummy {
- get { return hasDummy; }
- }
- public int Dummy {
- get { return dummy_; }
- }
-
- public override bool IsInitialized {
- get {
- if (HasOptionalMessage) {
- if (!OptionalMessage.IsInitialized) return false;
- }
- foreach (global::Google.ProtocolBuffers.TestProtos.TestRequired element in RepeatedMessageList) {
- if (!element.IsInitialized) return false;
- }
- return true;
- }
- }
-
- public override void WriteTo(pb::ICodedOutputStream output) {
- CalcSerializedSize();
- string[] field_names = _testRequiredForeignFieldNames;
- if (hasOptionalMessage) {
- output.WriteMessage(1, field_names[1], OptionalMessage);
- }
- if (repeatedMessage_.Count > 0) {
- output.WriteMessageArray(2, field_names[2], repeatedMessage_);
- }
- if (hasDummy) {
- output.WriteInt32(3, field_names[0], Dummy);
- }
- UnknownFields.WriteTo(output);
- }
-
- private int memoizedSerializedSize = -1;
- public override int SerializedSize {
- get {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
- return CalcSerializedSize();
- }
- }
-
- private int CalcSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- if (hasOptionalMessage) {
- size += pb::CodedOutputStream.ComputeMessageSize(1, OptionalMessage);
- }
- foreach (global::Google.ProtocolBuffers.TestProtos.TestRequired element in RepeatedMessageList) {
- size += pb::CodedOutputStream.ComputeMessageSize(2, element);
- }
- if (hasDummy) {
- size += pb::CodedOutputStream.ComputeInt32Size(3, Dummy);
- }
- size += UnknownFields.SerializedSize;
- memoizedSerializedSize = size;
- return size;
- }
- public static TestRequiredForeign ParseFrom(pb::ByteString data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static TestRequiredForeign ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static TestRequiredForeign ParseFrom(byte[] data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static TestRequiredForeign ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static TestRequiredForeign ParseFrom(global::System.IO.Stream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static TestRequiredForeign ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- public static TestRequiredForeign ParseDelimitedFrom(global::System.IO.Stream input) {
- return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
- }
- public static TestRequiredForeign ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
- }
- public static TestRequiredForeign ParseFrom(pb::ICodedInputStream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static TestRequiredForeign ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- private TestRequiredForeign MakeReadOnly() {
- repeatedMessage_.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(TestRequiredForeign prototype) {
- return new Builder(prototype);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class Builder : pb::GeneratedBuilder<TestRequiredForeign, Builder> {
- protected override Builder ThisBuilder {
- get { return this; }
- }
- public Builder() {
- result = DefaultInstance;
- resultIsReadOnly = true;
- }
- internal Builder(TestRequiredForeign cloneFrom) {
- result = cloneFrom;
- resultIsReadOnly = true;
- }
-
- private bool resultIsReadOnly;
- private TestRequiredForeign result;
-
- private TestRequiredForeign PrepareBuilder() {
- if (resultIsReadOnly) {
- TestRequiredForeign original = result;
- result = new TestRequiredForeign();
- resultIsReadOnly = false;
- MergeFrom(original);
- }
- return result;
- }
-
- public override bool IsInitialized {
- get { return result.IsInitialized; }
- }
-
- protected override TestRequiredForeign 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.TestRequiredForeign.Descriptor; }
- }
-
- public override TestRequiredForeign DefaultInstanceForType {
- get { return global::Google.ProtocolBuffers.TestProtos.TestRequiredForeign.DefaultInstance; }
- }
-
- public override TestRequiredForeign BuildPartial() {
- if (resultIsReadOnly) {
- return result;
- }
- resultIsReadOnly = true;
- return result.MakeReadOnly();
- }
-
- public override Builder MergeFrom(pb::IMessage other) {
- if (other is TestRequiredForeign) {
- return MergeFrom((TestRequiredForeign) other);
- } else {
- base.MergeFrom(other);
- return this;
- }
- }
-
- public override Builder MergeFrom(TestRequiredForeign other) {
- if (other == global::Google.ProtocolBuffers.TestProtos.TestRequiredForeign.DefaultInstance) return this;
- PrepareBuilder();
- if (other.HasOptionalMessage) {
- MergeOptionalMessage(other.OptionalMessage);
- }
- if (other.repeatedMessage_.Count != 0) {
- result.repeatedMessage_.Add(other.repeatedMessage_);
- }
- if (other.HasDummy) {
- Dummy = other.Dummy;
- }
- 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(_testRequiredForeignFieldNames, field_name, global::System.StringComparer.Ordinal);
- if(field_ordinal >= 0)
- tag = _testRequiredForeignFieldTags[field_ordinal];
- else {
- if (unknownFields == null) {
- unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
- }
- ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
- continue;
- }
- }
- switch (tag) {
- case 0: {
- throw pb::InvalidProtocolBufferException.InvalidTag();
- }
- default: {
- if (pb::WireFormat.IsEndGroupTag(tag)) {
- if (unknownFields != null) {
- this.UnknownFields = unknownFields.Build();
- }
- return this;
- }
- if (unknownFields == null) {
- unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
- }
- ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
- break;
- }
- case 10: {
- global::Google.ProtocolBuffers.TestProtos.TestRequired.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.TestRequired.CreateBuilder();
- if (result.hasOptionalMessage) {
- subBuilder.MergeFrom(OptionalMessage);
- }
- input.ReadMessage(subBuilder, extensionRegistry);
- OptionalMessage = subBuilder.BuildPartial();
- break;
- }
- case 18: {
- input.ReadMessageArray(tag, field_name, result.repeatedMessage_, global::Google.ProtocolBuffers.TestProtos.TestRequired.DefaultInstance, extensionRegistry);
- break;
- }
- case 24: {
- result.hasDummy = input.ReadInt32(ref result.dummy_);
- break;
- }
- }
- }
-
- if (unknownFields != null) {
- this.UnknownFields = unknownFields.Build();
- }
- return this;
- }
-
-
- public bool HasOptionalMessage {
- get { return result.hasOptionalMessage; }
- }
- public global::Google.ProtocolBuffers.TestProtos.TestRequired OptionalMessage {
- get { return result.OptionalMessage; }
- set { SetOptionalMessage(value); }
- }
- public Builder SetOptionalMessage(global::Google.ProtocolBuffers.TestProtos.TestRequired value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.hasOptionalMessage = true;
- result.optionalMessage_ = value;
- return this;
- }
- public Builder SetOptionalMessage(global::Google.ProtocolBuffers.TestProtos.TestRequired.Builder builderForValue) {
- pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
- PrepareBuilder();
- result.hasOptionalMessage = true;
- result.optionalMessage_ = builderForValue.Build();
- return this;
- }
- public Builder MergeOptionalMessage(global::Google.ProtocolBuffers.TestProtos.TestRequired value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- if (result.hasOptionalMessage &&
- result.optionalMessage_ != global::Google.ProtocolBuffers.TestProtos.TestRequired.DefaultInstance) {
- result.optionalMessage_ = global::Google.ProtocolBuffers.TestProtos.TestRequired.CreateBuilder(result.optionalMessage_).MergeFrom(value).BuildPartial();
- } else {
- result.optionalMessage_ = value;
- }
- result.hasOptionalMessage = true;
- return this;
- }
- public Builder ClearOptionalMessage() {
- PrepareBuilder();
- result.hasOptionalMessage = false;
- result.optionalMessage_ = null;
- return this;
- }
-
- public pbc::IPopsicleList<global::Google.ProtocolBuffers.TestProtos.TestRequired> RepeatedMessageList {
- get { return PrepareBuilder().repeatedMessage_; }
- }
- public int RepeatedMessageCount {
- get { return result.RepeatedMessageCount; }
- }
- public global::Google.ProtocolBuffers.TestProtos.TestRequired GetRepeatedMessage(int index) {
- return result.GetRepeatedMessage(index);
- }
- public Builder SetRepeatedMessage(int index, global::Google.ProtocolBuffers.TestProtos.TestRequired value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.repeatedMessage_[index] = value;
- return this;
- }
- public Builder SetRepeatedMessage(int index, global::Google.ProtocolBuffers.TestProtos.TestRequired.Builder builderForValue) {
- pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
- PrepareBuilder();
- result.repeatedMessage_[index] = builderForValue.Build();
- return this;
- }
- public Builder AddRepeatedMessage(global::Google.ProtocolBuffers.TestProtos.TestRequired value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.repeatedMessage_.Add(value);
- return this;
- }
- public Builder AddRepeatedMessage(global::Google.ProtocolBuffers.TestProtos.TestRequired.Builder builderForValue) {
- pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
- PrepareBuilder();
- result.repeatedMessage_.Add(builderForValue.Build());
- return this;
- }
- public Builder AddRangeRepeatedMessage(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.TestRequired> values) {
- PrepareBuilder();
- result.repeatedMessage_.Add(values);
- return this;
- }
- public Builder ClearRepeatedMessage() {
- PrepareBuilder();
- result.repeatedMessage_.Clear();
- return this;
- }
-
- public bool HasDummy {
- get { return result.hasDummy; }
- }
- public int Dummy {
- get { return result.Dummy; }
- set { SetDummy(value); }
- }
- public Builder SetDummy(int value) {
- PrepareBuilder();
- result.hasDummy = true;
- result.dummy_ = value;
- return this;
- }
- public Builder ClearDummy() {
- PrepareBuilder();
- result.hasDummy = false;
- result.dummy_ = 0;
- return this;
- }
- }
- static TestRequiredForeign() {
- object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor, null);
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class TestForeignNested : pb::GeneratedMessage<TestForeignNested, TestForeignNested.Builder> {
- private TestForeignNested() { }
- private static readonly TestForeignNested defaultInstance = new TestForeignNested().MakeReadOnly();
- private static readonly string[] _testForeignNestedFieldNames = new string[] { "foreign_nested" };
- private static readonly uint[] _testForeignNestedFieldTags = new uint[] { 10 };
- public static TestForeignNested DefaultInstance {
- get { return defaultInstance; }
- }
-
- public override TestForeignNested DefaultInstanceForType {
- get { return DefaultInstance; }
- }
-
- protected override TestForeignNested ThisMessage {
- get { return this; }
- }
-
- public static pbd::MessageDescriptor Descriptor {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.internal__static_protobuf_unittest_TestForeignNested__Descriptor; }
- }
-
- protected override pb::FieldAccess.FieldAccessorTable<TestForeignNested, TestForeignNested.Builder> InternalFieldAccessors {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.internal__static_protobuf_unittest_TestForeignNested__FieldAccessorTable; }
- }
-
- public const int ForeignNestedFieldNumber = 1;
- private bool hasForeignNested;
- private global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage foreignNested_;
- public bool HasForeignNested {
- get { return hasForeignNested; }
- }
- public global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage ForeignNested {
- get { return foreignNested_ ?? global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage.DefaultInstance; }
- }
-
- public override bool IsInitialized {
- get {
- return true;
- }
- }
-
- public override void WriteTo(pb::ICodedOutputStream output) {
- CalcSerializedSize();
- string[] field_names = _testForeignNestedFieldNames;
- if (hasForeignNested) {
- output.WriteMessage(1, field_names[0], ForeignNested);
- }
- UnknownFields.WriteTo(output);
- }
-
- private int memoizedSerializedSize = -1;
- public override int SerializedSize {
- get {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
- return CalcSerializedSize();
- }
- }
-
- private int CalcSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- if (hasForeignNested) {
- size += pb::CodedOutputStream.ComputeMessageSize(1, ForeignNested);
- }
- size += UnknownFields.SerializedSize;
- memoizedSerializedSize = size;
- return size;
- }
- public static TestForeignNested ParseFrom(pb::ByteString data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static TestForeignNested ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static TestForeignNested ParseFrom(byte[] data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static TestForeignNested ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static TestForeignNested ParseFrom(global::System.IO.Stream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static TestForeignNested ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- public static TestForeignNested ParseDelimitedFrom(global::System.IO.Stream input) {
- return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
- }
- public static TestForeignNested ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
- }
- public static TestForeignNested ParseFrom(pb::ICodedInputStream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static TestForeignNested ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- private TestForeignNested 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(TestForeignNested prototype) {
- return new Builder(prototype);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class Builder : pb::GeneratedBuilder<TestForeignNested, Builder> {
- protected override Builder ThisBuilder {
- get { return this; }
- }
- public Builder() {
- result = DefaultInstance;
- resultIsReadOnly = true;
- }
- internal Builder(TestForeignNested cloneFrom) {
- result = cloneFrom;
- resultIsReadOnly = true;
- }
-
- private bool resultIsReadOnly;
- private TestForeignNested result;
-
- private TestForeignNested PrepareBuilder() {
- if (resultIsReadOnly) {
- TestForeignNested original = result;
- result = new TestForeignNested();
- resultIsReadOnly = false;
- MergeFrom(original);
- }
- return result;
- }
-
- public override bool IsInitialized {
- get { return result.IsInitialized; }
- }
-
- protected override TestForeignNested 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.TestForeignNested.Descriptor; }
- }
-
- public override TestForeignNested DefaultInstanceForType {
- get { return global::Google.ProtocolBuffers.TestProtos.TestForeignNested.DefaultInstance; }
- }
-
- public override TestForeignNested BuildPartial() {
- if (resultIsReadOnly) {
- return result;
- }
- resultIsReadOnly = true;
- return result.MakeReadOnly();
- }
-
- public override Builder MergeFrom(pb::IMessage other) {
- if (other is TestForeignNested) {
- return MergeFrom((TestForeignNested) other);
- } else {
- base.MergeFrom(other);
- return this;
- }
- }
-
- public override Builder MergeFrom(TestForeignNested other) {
- if (other == global::Google.ProtocolBuffers.TestProtos.TestForeignNested.DefaultInstance) return this;
- PrepareBuilder();
- if (other.HasForeignNested) {
- MergeForeignNested(other.ForeignNested);
- }
- 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(_testForeignNestedFieldNames, field_name, global::System.StringComparer.Ordinal);
- if(field_ordinal >= 0)
- tag = _testForeignNestedFieldTags[field_ordinal];
- else {
- if (unknownFields == null) {
- unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
- }
- ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
- continue;
- }
- }
- switch (tag) {
- case 0: {
- throw pb::InvalidProtocolBufferException.InvalidTag();
- }
- default: {
- if (pb::WireFormat.IsEndGroupTag(tag)) {
- if (unknownFields != null) {
- this.UnknownFields = unknownFields.Build();
- }
- return this;
- }
- if (unknownFields == null) {
- unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
- }
- ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
- break;
- }
- case 10: {
- global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage.CreateBuilder();
- if (result.hasForeignNested) {
- subBuilder.MergeFrom(ForeignNested);
- }
- input.ReadMessage(subBuilder, extensionRegistry);
- ForeignNested = subBuilder.BuildPartial();
- break;
- }
- }
- }
-
- if (unknownFields != null) {
- this.UnknownFields = unknownFields.Build();
- }
- return this;
- }
-
-
- public bool HasForeignNested {
- get { return result.hasForeignNested; }
- }
- public global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage ForeignNested {
- get { return result.ForeignNested; }
- set { SetForeignNested(value); }
- }
- public Builder SetForeignNested(global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.hasForeignNested = true;
- result.foreignNested_ = value;
- return this;
- }
- public Builder SetForeignNested(global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage.Builder builderForValue) {
- pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
- PrepareBuilder();
- result.hasForeignNested = true;
- result.foreignNested_ = builderForValue.Build();
- return this;
- }
- public Builder MergeForeignNested(global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- if (result.hasForeignNested &&
- result.foreignNested_ != global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage.DefaultInstance) {
- result.foreignNested_ = global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage.CreateBuilder(result.foreignNested_).MergeFrom(value).BuildPartial();
- } else {
- result.foreignNested_ = value;
- }
- result.hasForeignNested = true;
- return this;
- }
- public Builder ClearForeignNested() {
- PrepareBuilder();
- result.hasForeignNested = false;
- result.foreignNested_ = null;
- return this;
- }
- }
- static TestForeignNested() {
- object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor, null);
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class TestEmptyMessage : pb::GeneratedMessage<TestEmptyMessage, TestEmptyMessage.Builder> {
- private TestEmptyMessage() { }
- private static readonly TestEmptyMessage defaultInstance = new TestEmptyMessage().MakeReadOnly();
- private static readonly string[] _testEmptyMessageFieldNames = new string[] { };
- private static readonly uint[] _testEmptyMessageFieldTags = new uint[] { };
- public static TestEmptyMessage DefaultInstance {
- get { return defaultInstance; }
- }
-
- public override TestEmptyMessage DefaultInstanceForType {
- get { return DefaultInstance; }
- }
-
- protected override TestEmptyMessage ThisMessage {
- get { return this; }
- }
-
- public static pbd::MessageDescriptor Descriptor {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.internal__static_protobuf_unittest_TestEmptyMessage__Descriptor; }
- }
-
- protected override pb::FieldAccess.FieldAccessorTable<TestEmptyMessage, TestEmptyMessage.Builder> InternalFieldAccessors {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.internal__static_protobuf_unittest_TestEmptyMessage__FieldAccessorTable; }
- }
-
- public override bool IsInitialized {
- get {
- return true;
- }
- }
-
- public override void WriteTo(pb::ICodedOutputStream output) {
- CalcSerializedSize();
- string[] field_names = _testEmptyMessageFieldNames;
- UnknownFields.WriteTo(output);
- }
-
- private int memoizedSerializedSize = -1;
- public override int SerializedSize {
- get {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
- return CalcSerializedSize();
- }
- }
-
- private int CalcSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- size += UnknownFields.SerializedSize;
- memoizedSerializedSize = size;
- return size;
- }
- public static TestEmptyMessage ParseFrom(pb::ByteString data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static TestEmptyMessage ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static TestEmptyMessage ParseFrom(byte[] data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static TestEmptyMessage ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static TestEmptyMessage ParseFrom(global::System.IO.Stream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static TestEmptyMessage ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- public static TestEmptyMessage ParseDelimitedFrom(global::System.IO.Stream input) {
- return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
- }
- public static TestEmptyMessage ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
- }
- public static TestEmptyMessage ParseFrom(pb::ICodedInputStream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static TestEmptyMessage ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- private TestEmptyMessage 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(TestEmptyMessage prototype) {
- return new Builder(prototype);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class Builder : pb::GeneratedBuilder<TestEmptyMessage, Builder> {
- protected override Builder ThisBuilder {
- get { return this; }
- }
- public Builder() {
- result = DefaultInstance;
- resultIsReadOnly = true;
- }
- internal Builder(TestEmptyMessage cloneFrom) {
- result = cloneFrom;
- resultIsReadOnly = true;
- }
-
- private bool resultIsReadOnly;
- private TestEmptyMessage result;
-
- private TestEmptyMessage PrepareBuilder() {
- if (resultIsReadOnly) {
- TestEmptyMessage original = result;
- result = new TestEmptyMessage();
- resultIsReadOnly = false;
- MergeFrom(original);
- }
- return result;
- }
-
- public override bool IsInitialized {
- get { return result.IsInitialized; }
- }
-
- protected override TestEmptyMessage 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.TestEmptyMessage.Descriptor; }
- }
-
- public override TestEmptyMessage DefaultInstanceForType {
- get { return global::Google.ProtocolBuffers.TestProtos.TestEmptyMessage.DefaultInstance; }
- }
-
- public override TestEmptyMessage BuildPartial() {
- if (resultIsReadOnly) {
- return result;
- }
- resultIsReadOnly = true;
- return result.MakeReadOnly();
- }
-
- public override Builder MergeFrom(pb::IMessage other) {
- if (other is TestEmptyMessage) {
- return MergeFrom((TestEmptyMessage) other);
- } else {
- base.MergeFrom(other);
- return this;
- }
- }
-
- public override Builder MergeFrom(TestEmptyMessage other) {
- if (other == global::Google.ProtocolBuffers.TestProtos.TestEmptyMessage.DefaultInstance) return this;
- PrepareBuilder();
- this.MergeUnknownFields(other.UnknownFields);
- return this;
- }
-
- public override Builder MergeFrom(pb::ICodedInputStream input) {
- return MergeFrom(input, pb::ExtensionRegistry.Empty);
- }
-
- public override Builder MergeFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
- PrepareBuilder();
- pb::UnknownFieldSet.Builder unknownFields = null;
- uint tag;
- string field_name;
- while (input.ReadTag(out tag, out field_name)) {
- if(tag == 0 && field_name != null) {
- int field_ordinal = global::System.Array.BinarySearch(_testEmptyMessageFieldNames, field_name, global::System.StringComparer.Ordinal);
- if(field_ordinal >= 0)
- tag = _testEmptyMessageFieldTags[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 TestEmptyMessage() {
- object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor, null);
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class TestEmptyMessageWithExtensions : pb::ExtendableMessage<TestEmptyMessageWithExtensions, TestEmptyMessageWithExtensions.Builder> {
- private TestEmptyMessageWithExtensions() { }
- private static readonly TestEmptyMessageWithExtensions defaultInstance = new TestEmptyMessageWithExtensions().MakeReadOnly();
- private static readonly string[] _testEmptyMessageWithExtensionsFieldNames = new string[] { };
- private static readonly uint[] _testEmptyMessageWithExtensionsFieldTags = new uint[] { };
- public static TestEmptyMessageWithExtensions DefaultInstance {
- get { return defaultInstance; }
- }
-
- public override TestEmptyMessageWithExtensions DefaultInstanceForType {
- get { return DefaultInstance; }
- }
-
- protected override TestEmptyMessageWithExtensions ThisMessage {
- get { return this; }
- }
-
- public static pbd::MessageDescriptor Descriptor {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.internal__static_protobuf_unittest_TestEmptyMessageWithExtensions__Descriptor; }
- }
-
- protected override pb::FieldAccess.FieldAccessorTable<TestEmptyMessageWithExtensions, TestEmptyMessageWithExtensions.Builder> InternalFieldAccessors {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.internal__static_protobuf_unittest_TestEmptyMessageWithExtensions__FieldAccessorTable; }
- }
-
- public override bool IsInitialized {
- get {
- if (!ExtensionsAreInitialized) return false;
- return true;
- }
- }
-
- public override void WriteTo(pb::ICodedOutputStream output) {
- CalcSerializedSize();
- string[] field_names = _testEmptyMessageWithExtensionsFieldNames;
- pb::ExtendableMessage<TestEmptyMessageWithExtensions, TestEmptyMessageWithExtensions.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;
- return CalcSerializedSize();
- }
- }
-
- private int CalcSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- size += ExtensionsSerializedSize;
- size += UnknownFields.SerializedSize;
- memoizedSerializedSize = size;
- return size;
- }
- public static TestEmptyMessageWithExtensions ParseFrom(pb::ByteString data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static TestEmptyMessageWithExtensions ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static TestEmptyMessageWithExtensions ParseFrom(byte[] data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static TestEmptyMessageWithExtensions ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static TestEmptyMessageWithExtensions ParseFrom(global::System.IO.Stream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static TestEmptyMessageWithExtensions ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- public static TestEmptyMessageWithExtensions ParseDelimitedFrom(global::System.IO.Stream input) {
- return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
- }
- public static TestEmptyMessageWithExtensions ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
- }
- public static TestEmptyMessageWithExtensions ParseFrom(pb::ICodedInputStream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static TestEmptyMessageWithExtensions ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- private TestEmptyMessageWithExtensions 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(TestEmptyMessageWithExtensions prototype) {
- return new Builder(prototype);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class Builder : pb::ExtendableBuilder<TestEmptyMessageWithExtensions, Builder> {
- protected override Builder ThisBuilder {
- get { return this; }
- }
- public Builder() {
- result = DefaultInstance;
- resultIsReadOnly = true;
- }
- internal Builder(TestEmptyMessageWithExtensions cloneFrom) {
- result = cloneFrom;
- resultIsReadOnly = true;
- }
-
- private bool resultIsReadOnly;
- private TestEmptyMessageWithExtensions result;
-
- private TestEmptyMessageWithExtensions PrepareBuilder() {
- if (resultIsReadOnly) {
- TestEmptyMessageWithExtensions original = result;
- result = new TestEmptyMessageWithExtensions();
- resultIsReadOnly = false;
- MergeFrom(original);
- }
- return result;
- }
-
- public override bool IsInitialized {
- get { return result.IsInitialized; }
- }
-
- protected override TestEmptyMessageWithExtensions 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.TestEmptyMessageWithExtensions.Descriptor; }
- }
-
- public override TestEmptyMessageWithExtensions DefaultInstanceForType {
- get { return global::Google.ProtocolBuffers.TestProtos.TestEmptyMessageWithExtensions.DefaultInstance; }
- }
-
- public override TestEmptyMessageWithExtensions BuildPartial() {
- if (resultIsReadOnly) {
- return result;
- }
- resultIsReadOnly = true;
- return result.MakeReadOnly();
- }
-
- public override Builder MergeFrom(pb::IMessage other) {
- if (other is TestEmptyMessageWithExtensions) {
- return MergeFrom((TestEmptyMessageWithExtensions) other);
- } else {
- base.MergeFrom(other);
- return this;
- }
- }
-
- public override Builder MergeFrom(TestEmptyMessageWithExtensions other) {
- if (other == global::Google.ProtocolBuffers.TestProtos.TestEmptyMessageWithExtensions.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(_testEmptyMessageWithExtensionsFieldNames, field_name, global::System.StringComparer.Ordinal);
- if(field_ordinal >= 0)
- tag = _testEmptyMessageWithExtensionsFieldTags[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 TestEmptyMessageWithExtensions() {
- object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor, null);
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class TestMultipleExtensionRanges : pb::ExtendableMessage<TestMultipleExtensionRanges, TestMultipleExtensionRanges.Builder> {
- private TestMultipleExtensionRanges() { }
- private static readonly TestMultipleExtensionRanges defaultInstance = new TestMultipleExtensionRanges().MakeReadOnly();
- private static readonly string[] _testMultipleExtensionRangesFieldNames = new string[] { };
- private static readonly uint[] _testMultipleExtensionRangesFieldTags = new uint[] { };
- public static TestMultipleExtensionRanges DefaultInstance {
- get { return defaultInstance; }
- }
-
- public override TestMultipleExtensionRanges DefaultInstanceForType {
- get { return DefaultInstance; }
- }
-
- protected override TestMultipleExtensionRanges ThisMessage {
- get { return this; }
- }
-
- public static pbd::MessageDescriptor Descriptor {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.internal__static_protobuf_unittest_TestMultipleExtensionRanges__Descriptor; }
- }
-
- protected override pb::FieldAccess.FieldAccessorTable<TestMultipleExtensionRanges, TestMultipleExtensionRanges.Builder> InternalFieldAccessors {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.internal__static_protobuf_unittest_TestMultipleExtensionRanges__FieldAccessorTable; }
- }
-
- public override bool IsInitialized {
- get {
- if (!ExtensionsAreInitialized) return false;
- return true;
- }
- }
-
- public override void WriteTo(pb::ICodedOutputStream output) {
- CalcSerializedSize();
- string[] field_names = _testMultipleExtensionRangesFieldNames;
- pb::ExtendableMessage<TestMultipleExtensionRanges, TestMultipleExtensionRanges.Builder>.ExtensionWriter extensionWriter = CreateExtensionWriter(this);
- extensionWriter.WriteUntil(43, output);
- extensionWriter.WriteUntil(4244, output);
- extensionWriter.WriteUntil(536870912, output);
- UnknownFields.WriteTo(output);
- }
-
- private int memoizedSerializedSize = -1;
- public override int SerializedSize {
- get {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
- return CalcSerializedSize();
- }
- }
-
- private int CalcSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- size += ExtensionsSerializedSize;
- size += UnknownFields.SerializedSize;
- memoizedSerializedSize = size;
- return size;
- }
- public static TestMultipleExtensionRanges ParseFrom(pb::ByteString data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static TestMultipleExtensionRanges ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static TestMultipleExtensionRanges ParseFrom(byte[] data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static TestMultipleExtensionRanges ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static TestMultipleExtensionRanges ParseFrom(global::System.IO.Stream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static TestMultipleExtensionRanges ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- public static TestMultipleExtensionRanges ParseDelimitedFrom(global::System.IO.Stream input) {
- return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
- }
- public static TestMultipleExtensionRanges ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
- }
- public static TestMultipleExtensionRanges ParseFrom(pb::ICodedInputStream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static TestMultipleExtensionRanges ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- private TestMultipleExtensionRanges 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(TestMultipleExtensionRanges prototype) {
- return new Builder(prototype);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class Builder : pb::ExtendableBuilder<TestMultipleExtensionRanges, Builder> {
- protected override Builder ThisBuilder {
- get { return this; }
- }
- public Builder() {
- result = DefaultInstance;
- resultIsReadOnly = true;
- }
- internal Builder(TestMultipleExtensionRanges cloneFrom) {
- result = cloneFrom;
- resultIsReadOnly = true;
- }
-
- private bool resultIsReadOnly;
- private TestMultipleExtensionRanges result;
-
- private TestMultipleExtensionRanges PrepareBuilder() {
- if (resultIsReadOnly) {
- TestMultipleExtensionRanges original = result;
- result = new TestMultipleExtensionRanges();
- resultIsReadOnly = false;
- MergeFrom(original);
- }
- return result;
- }
-
- public override bool IsInitialized {
- get { return result.IsInitialized; }
- }
-
- protected override TestMultipleExtensionRanges 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.TestMultipleExtensionRanges.Descriptor; }
- }
-
- public override TestMultipleExtensionRanges DefaultInstanceForType {
- get { return global::Google.ProtocolBuffers.TestProtos.TestMultipleExtensionRanges.DefaultInstance; }
- }
-
- public override TestMultipleExtensionRanges BuildPartial() {
- if (resultIsReadOnly) {
- return result;
- }
- resultIsReadOnly = true;
- return result.MakeReadOnly();
- }
-
- public override Builder MergeFrom(pb::IMessage other) {
- if (other is TestMultipleExtensionRanges) {
- return MergeFrom((TestMultipleExtensionRanges) other);
- } else {
- base.MergeFrom(other);
- return this;
- }
- }
-
- public override Builder MergeFrom(TestMultipleExtensionRanges other) {
- if (other == global::Google.ProtocolBuffers.TestProtos.TestMultipleExtensionRanges.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(_testMultipleExtensionRangesFieldNames, field_name, global::System.StringComparer.Ordinal);
- if(field_ordinal >= 0)
- tag = _testMultipleExtensionRangesFieldTags[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 TestMultipleExtensionRanges() {
- object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor, null);
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class TestReallyLargeTagNumber : pb::GeneratedMessage<TestReallyLargeTagNumber, TestReallyLargeTagNumber.Builder> {
- private TestReallyLargeTagNumber() { }
- private static readonly TestReallyLargeTagNumber defaultInstance = new TestReallyLargeTagNumber().MakeReadOnly();
- private static readonly string[] _testReallyLargeTagNumberFieldNames = new string[] { "a", "bb" };
- private static readonly uint[] _testReallyLargeTagNumberFieldTags = new uint[] { 8, 2147483640 };
- public static TestReallyLargeTagNumber DefaultInstance {
- get { return defaultInstance; }
- }
-
- public override TestReallyLargeTagNumber DefaultInstanceForType {
- get { return DefaultInstance; }
- }
-
- protected override TestReallyLargeTagNumber ThisMessage {
- get { return this; }
- }
-
- public static pbd::MessageDescriptor Descriptor {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.internal__static_protobuf_unittest_TestReallyLargeTagNumber__Descriptor; }
- }
-
- protected override pb::FieldAccess.FieldAccessorTable<TestReallyLargeTagNumber, TestReallyLargeTagNumber.Builder> InternalFieldAccessors {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.internal__static_protobuf_unittest_TestReallyLargeTagNumber__FieldAccessorTable; }
- }
-
- public const int AFieldNumber = 1;
- private bool hasA;
- private int a_;
- public bool HasA {
- get { return hasA; }
- }
- public int A {
- get { return a_; }
- }
-
- public const int BbFieldNumber = 268435455;
- private bool hasBb;
- private int bb_;
- public bool HasBb {
- get { return hasBb; }
- }
- public int Bb {
- get { return bb_; }
- }
-
- public override bool IsInitialized {
- get {
- return true;
- }
- }
-
- public override void WriteTo(pb::ICodedOutputStream output) {
- CalcSerializedSize();
- string[] field_names = _testReallyLargeTagNumberFieldNames;
- if (hasA) {
- output.WriteInt32(1, field_names[0], A);
- }
- if (hasBb) {
- output.WriteInt32(268435455, field_names[1], Bb);
- }
- UnknownFields.WriteTo(output);
- }
-
- private int memoizedSerializedSize = -1;
- public override int SerializedSize {
- get {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
- return CalcSerializedSize();
- }
- }
-
- private int CalcSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- if (hasA) {
- size += pb::CodedOutputStream.ComputeInt32Size(1, A);
- }
- if (hasBb) {
- size += pb::CodedOutputStream.ComputeInt32Size(268435455, Bb);
- }
- size += UnknownFields.SerializedSize;
- memoizedSerializedSize = size;
- return size;
- }
- public static TestReallyLargeTagNumber ParseFrom(pb::ByteString data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static TestReallyLargeTagNumber ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static TestReallyLargeTagNumber ParseFrom(byte[] data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static TestReallyLargeTagNumber ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static TestReallyLargeTagNumber ParseFrom(global::System.IO.Stream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static TestReallyLargeTagNumber ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- public static TestReallyLargeTagNumber ParseDelimitedFrom(global::System.IO.Stream input) {
- return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
- }
- public static TestReallyLargeTagNumber ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
- }
- public static TestReallyLargeTagNumber ParseFrom(pb::ICodedInputStream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static TestReallyLargeTagNumber ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- private TestReallyLargeTagNumber 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(TestReallyLargeTagNumber prototype) {
- return new Builder(prototype);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class Builder : pb::GeneratedBuilder<TestReallyLargeTagNumber, Builder> {
- protected override Builder ThisBuilder {
- get { return this; }
- }
- public Builder() {
- result = DefaultInstance;
- resultIsReadOnly = true;
- }
- internal Builder(TestReallyLargeTagNumber cloneFrom) {
- result = cloneFrom;
- resultIsReadOnly = true;
- }
-
- private bool resultIsReadOnly;
- private TestReallyLargeTagNumber result;
-
- private TestReallyLargeTagNumber PrepareBuilder() {
- if (resultIsReadOnly) {
- TestReallyLargeTagNumber original = result;
- result = new TestReallyLargeTagNumber();
- resultIsReadOnly = false;
- MergeFrom(original);
- }
- return result;
- }
-
- public override bool IsInitialized {
- get { return result.IsInitialized; }
- }
-
- protected override TestReallyLargeTagNumber 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.TestReallyLargeTagNumber.Descriptor; }
- }
-
- public override TestReallyLargeTagNumber DefaultInstanceForType {
- get { return global::Google.ProtocolBuffers.TestProtos.TestReallyLargeTagNumber.DefaultInstance; }
- }
-
- public override TestReallyLargeTagNumber BuildPartial() {
- if (resultIsReadOnly) {
- return result;
- }
- resultIsReadOnly = true;
- return result.MakeReadOnly();
- }
-
- public override Builder MergeFrom(pb::IMessage other) {
- if (other is TestReallyLargeTagNumber) {
- return MergeFrom((TestReallyLargeTagNumber) other);
- } else {
- base.MergeFrom(other);
- return this;
- }
- }
-
- public override Builder MergeFrom(TestReallyLargeTagNumber other) {
- if (other == global::Google.ProtocolBuffers.TestProtos.TestReallyLargeTagNumber.DefaultInstance) return this;
- PrepareBuilder();
- if (other.HasA) {
- A = other.A;
- }
- if (other.HasBb) {
- Bb = other.Bb;
- }
- 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(_testReallyLargeTagNumberFieldNames, field_name, global::System.StringComparer.Ordinal);
- if(field_ordinal >= 0)
- tag = _testReallyLargeTagNumberFieldTags[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.hasA = input.ReadInt32(ref result.a_);
- break;
- }
- case 2147483640: {
- result.hasBb = input.ReadInt32(ref result.bb_);
- break;
- }
- }
- }
-
- if (unknownFields != null) {
- this.UnknownFields = unknownFields.Build();
- }
- return this;
- }
-
-
- public bool HasA {
- get { return result.hasA; }
- }
- public int A {
- get { return result.A; }
- set { SetA(value); }
- }
- public Builder SetA(int value) {
- PrepareBuilder();
- result.hasA = true;
- result.a_ = value;
- return this;
- }
- public Builder ClearA() {
- PrepareBuilder();
- result.hasA = false;
- result.a_ = 0;
- return this;
- }
-
- public bool HasBb {
- get { return result.hasBb; }
- }
- public int Bb {
- get { return result.Bb; }
- set { SetBb(value); }
- }
- public Builder SetBb(int value) {
- PrepareBuilder();
- result.hasBb = true;
- result.bb_ = value;
- return this;
- }
- public Builder ClearBb() {
- PrepareBuilder();
- result.hasBb = false;
- result.bb_ = 0;
- return this;
- }
- }
- static TestReallyLargeTagNumber() {
- object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor, null);
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class TestRecursiveMessage : pb::GeneratedMessage<TestRecursiveMessage, TestRecursiveMessage.Builder> {
- private TestRecursiveMessage() { }
- private static readonly TestRecursiveMessage defaultInstance = new TestRecursiveMessage().MakeReadOnly();
- private static readonly string[] _testRecursiveMessageFieldNames = new string[] { "a", "i" };
- private static readonly uint[] _testRecursiveMessageFieldTags = new uint[] { 10, 16 };
- public static TestRecursiveMessage DefaultInstance {
- get { return defaultInstance; }
- }
-
- public override TestRecursiveMessage DefaultInstanceForType {
- get { return DefaultInstance; }
- }
-
- protected override TestRecursiveMessage ThisMessage {
- get { return this; }
- }
-
- public static pbd::MessageDescriptor Descriptor {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.internal__static_protobuf_unittest_TestRecursiveMessage__Descriptor; }
- }
-
- protected override pb::FieldAccess.FieldAccessorTable<TestRecursiveMessage, TestRecursiveMessage.Builder> InternalFieldAccessors {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.internal__static_protobuf_unittest_TestRecursiveMessage__FieldAccessorTable; }
- }
-
- public const int AFieldNumber = 1;
- private bool hasA;
- private global::Google.ProtocolBuffers.TestProtos.TestRecursiveMessage a_;
- public bool HasA {
- get { return hasA; }
- }
- public global::Google.ProtocolBuffers.TestProtos.TestRecursiveMessage A {
- get { return a_ ?? global::Google.ProtocolBuffers.TestProtos.TestRecursiveMessage.DefaultInstance; }
- }
-
- public const int IFieldNumber = 2;
- private bool hasI;
- private int i_;
- public bool HasI {
- get { return hasI; }
- }
- public int I {
- get { return i_; }
- }
-
- public override bool IsInitialized {
- get {
- return true;
- }
- }
-
- public override void WriteTo(pb::ICodedOutputStream output) {
- CalcSerializedSize();
- string[] field_names = _testRecursiveMessageFieldNames;
- if (hasA) {
- output.WriteMessage(1, field_names[0], A);
- }
- if (hasI) {
- output.WriteInt32(2, field_names[1], I);
- }
- UnknownFields.WriteTo(output);
- }
-
- private int memoizedSerializedSize = -1;
- public override int SerializedSize {
- get {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
- return CalcSerializedSize();
- }
- }
-
- private int CalcSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- if (hasA) {
- size += pb::CodedOutputStream.ComputeMessageSize(1, A);
- }
- if (hasI) {
- size += pb::CodedOutputStream.ComputeInt32Size(2, I);
- }
- size += UnknownFields.SerializedSize;
- memoizedSerializedSize = size;
- return size;
- }
- public static TestRecursiveMessage ParseFrom(pb::ByteString data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static TestRecursiveMessage ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static TestRecursiveMessage ParseFrom(byte[] data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static TestRecursiveMessage ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static TestRecursiveMessage ParseFrom(global::System.IO.Stream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static TestRecursiveMessage ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- public static TestRecursiveMessage ParseDelimitedFrom(global::System.IO.Stream input) {
- return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
- }
- public static TestRecursiveMessage ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
- }
- public static TestRecursiveMessage ParseFrom(pb::ICodedInputStream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static TestRecursiveMessage ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- private TestRecursiveMessage 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(TestRecursiveMessage prototype) {
- return new Builder(prototype);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class Builder : pb::GeneratedBuilder<TestRecursiveMessage, Builder> {
- protected override Builder ThisBuilder {
- get { return this; }
- }
- public Builder() {
- result = DefaultInstance;
- resultIsReadOnly = true;
- }
- internal Builder(TestRecursiveMessage cloneFrom) {
- result = cloneFrom;
- resultIsReadOnly = true;
- }
-
- private bool resultIsReadOnly;
- private TestRecursiveMessage result;
-
- private TestRecursiveMessage PrepareBuilder() {
- if (resultIsReadOnly) {
- TestRecursiveMessage original = result;
- result = new TestRecursiveMessage();
- resultIsReadOnly = false;
- MergeFrom(original);
- }
- return result;
- }
-
- public override bool IsInitialized {
- get { return result.IsInitialized; }
- }
-
- protected override TestRecursiveMessage 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.TestRecursiveMessage.Descriptor; }
- }
-
- public override TestRecursiveMessage DefaultInstanceForType {
- get { return global::Google.ProtocolBuffers.TestProtos.TestRecursiveMessage.DefaultInstance; }
- }
-
- public override TestRecursiveMessage BuildPartial() {
- if (resultIsReadOnly) {
- return result;
- }
- resultIsReadOnly = true;
- return result.MakeReadOnly();
- }
-
- public override Builder MergeFrom(pb::IMessage other) {
- if (other is TestRecursiveMessage) {
- return MergeFrom((TestRecursiveMessage) other);
- } else {
- base.MergeFrom(other);
- return this;
- }
- }
-
- public override Builder MergeFrom(TestRecursiveMessage other) {
- if (other == global::Google.ProtocolBuffers.TestProtos.TestRecursiveMessage.DefaultInstance) return this;
- PrepareBuilder();
- if (other.HasA) {
- MergeA(other.A);
- }
- if (other.HasI) {
- I = other.I;
- }
- 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(_testRecursiveMessageFieldNames, field_name, global::System.StringComparer.Ordinal);
- if(field_ordinal >= 0)
- tag = _testRecursiveMessageFieldTags[field_ordinal];
- else {
- if (unknownFields == null) {
- unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
- }
- ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
- continue;
- }
- }
- switch (tag) {
- case 0: {
- throw pb::InvalidProtocolBufferException.InvalidTag();
- }
- default: {
- if (pb::WireFormat.IsEndGroupTag(tag)) {
- if (unknownFields != null) {
- this.UnknownFields = unknownFields.Build();
- }
- return this;
- }
- if (unknownFields == null) {
- unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
- }
- ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
- break;
- }
- case 10: {
- global::Google.ProtocolBuffers.TestProtos.TestRecursiveMessage.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.TestRecursiveMessage.CreateBuilder();
- if (result.hasA) {
- subBuilder.MergeFrom(A);
- }
- input.ReadMessage(subBuilder, extensionRegistry);
- A = subBuilder.BuildPartial();
- break;
- }
- case 16: {
- result.hasI = input.ReadInt32(ref result.i_);
- break;
- }
- }
- }
-
- if (unknownFields != null) {
- this.UnknownFields = unknownFields.Build();
- }
- return this;
- }
-
-
- public bool HasA {
- get { return result.hasA; }
- }
- public global::Google.ProtocolBuffers.TestProtos.TestRecursiveMessage A {
- get { return result.A; }
- set { SetA(value); }
- }
- public Builder SetA(global::Google.ProtocolBuffers.TestProtos.TestRecursiveMessage value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.hasA = true;
- result.a_ = value;
- return this;
- }
- public Builder SetA(global::Google.ProtocolBuffers.TestProtos.TestRecursiveMessage.Builder builderForValue) {
- pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
- PrepareBuilder();
- result.hasA = true;
- result.a_ = builderForValue.Build();
- return this;
- }
- public Builder MergeA(global::Google.ProtocolBuffers.TestProtos.TestRecursiveMessage value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- if (result.hasA &&
- result.a_ != global::Google.ProtocolBuffers.TestProtos.TestRecursiveMessage.DefaultInstance) {
- result.a_ = global::Google.ProtocolBuffers.TestProtos.TestRecursiveMessage.CreateBuilder(result.a_).MergeFrom(value).BuildPartial();
- } else {
- result.a_ = value;
- }
- result.hasA = true;
- return this;
- }
- public Builder ClearA() {
- PrepareBuilder();
- result.hasA = false;
- result.a_ = null;
- 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;
- }
- }
- static TestRecursiveMessage() {
- object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor, null);
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class TestMutualRecursionA : pb::GeneratedMessage<TestMutualRecursionA, TestMutualRecursionA.Builder> {
- private TestMutualRecursionA() { }
- private static readonly TestMutualRecursionA defaultInstance = new TestMutualRecursionA().MakeReadOnly();
- private static readonly string[] _testMutualRecursionAFieldNames = new string[] { "bb" };
- private static readonly uint[] _testMutualRecursionAFieldTags = new uint[] { 10 };
- public static TestMutualRecursionA DefaultInstance {
- get { return defaultInstance; }
- }
-
- public override TestMutualRecursionA DefaultInstanceForType {
- get { return DefaultInstance; }
- }
-
- protected override TestMutualRecursionA ThisMessage {
- get { return this; }
- }
-
- public static pbd::MessageDescriptor Descriptor {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.internal__static_protobuf_unittest_TestMutualRecursionA__Descriptor; }
- }
-
- protected override pb::FieldAccess.FieldAccessorTable<TestMutualRecursionA, TestMutualRecursionA.Builder> InternalFieldAccessors {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.internal__static_protobuf_unittest_TestMutualRecursionA__FieldAccessorTable; }
- }
-
- public const int BbFieldNumber = 1;
- private bool hasBb;
- private global::Google.ProtocolBuffers.TestProtos.TestMutualRecursionB bb_;
- public bool HasBb {
- get { return hasBb; }
- }
- public global::Google.ProtocolBuffers.TestProtos.TestMutualRecursionB Bb {
- get { return bb_ ?? global::Google.ProtocolBuffers.TestProtos.TestMutualRecursionB.DefaultInstance; }
- }
-
- public override bool IsInitialized {
- get {
- return true;
- }
- }
-
- public override void WriteTo(pb::ICodedOutputStream output) {
- CalcSerializedSize();
- string[] field_names = _testMutualRecursionAFieldNames;
- if (hasBb) {
- output.WriteMessage(1, field_names[0], Bb);
- }
- UnknownFields.WriteTo(output);
- }
-
- private int memoizedSerializedSize = -1;
- public override int SerializedSize {
- get {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
- return CalcSerializedSize();
- }
- }
-
- private int CalcSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- if (hasBb) {
- size += pb::CodedOutputStream.ComputeMessageSize(1, Bb);
- }
- size += UnknownFields.SerializedSize;
- memoizedSerializedSize = size;
- return size;
- }
- public static TestMutualRecursionA ParseFrom(pb::ByteString data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static TestMutualRecursionA ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static TestMutualRecursionA ParseFrom(byte[] data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static TestMutualRecursionA ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static TestMutualRecursionA ParseFrom(global::System.IO.Stream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static TestMutualRecursionA ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- public static TestMutualRecursionA ParseDelimitedFrom(global::System.IO.Stream input) {
- return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
- }
- public static TestMutualRecursionA ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
- }
- public static TestMutualRecursionA ParseFrom(pb::ICodedInputStream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static TestMutualRecursionA ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- private TestMutualRecursionA 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(TestMutualRecursionA prototype) {
- return new Builder(prototype);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class Builder : pb::GeneratedBuilder<TestMutualRecursionA, Builder> {
- protected override Builder ThisBuilder {
- get { return this; }
- }
- public Builder() {
- result = DefaultInstance;
- resultIsReadOnly = true;
- }
- internal Builder(TestMutualRecursionA cloneFrom) {
- result = cloneFrom;
- resultIsReadOnly = true;
- }
-
- private bool resultIsReadOnly;
- private TestMutualRecursionA result;
-
- private TestMutualRecursionA PrepareBuilder() {
- if (resultIsReadOnly) {
- TestMutualRecursionA original = result;
- result = new TestMutualRecursionA();
- resultIsReadOnly = false;
- MergeFrom(original);
- }
- return result;
- }
-
- public override bool IsInitialized {
- get { return result.IsInitialized; }
- }
-
- protected override TestMutualRecursionA 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.TestMutualRecursionA.Descriptor; }
- }
-
- public override TestMutualRecursionA DefaultInstanceForType {
- get { return global::Google.ProtocolBuffers.TestProtos.TestMutualRecursionA.DefaultInstance; }
- }
-
- public override TestMutualRecursionA BuildPartial() {
- if (resultIsReadOnly) {
- return result;
- }
- resultIsReadOnly = true;
- return result.MakeReadOnly();
- }
-
- public override Builder MergeFrom(pb::IMessage other) {
- if (other is TestMutualRecursionA) {
- return MergeFrom((TestMutualRecursionA) other);
- } else {
- base.MergeFrom(other);
- return this;
- }
- }
-
- public override Builder MergeFrom(TestMutualRecursionA other) {
- if (other == global::Google.ProtocolBuffers.TestProtos.TestMutualRecursionA.DefaultInstance) return this;
- PrepareBuilder();
- if (other.HasBb) {
- MergeBb(other.Bb);
- }
- 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(_testMutualRecursionAFieldNames, field_name, global::System.StringComparer.Ordinal);
- if(field_ordinal >= 0)
- tag = _testMutualRecursionAFieldTags[field_ordinal];
- else {
- if (unknownFields == null) {
- unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
- }
- ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
- continue;
- }
- }
- switch (tag) {
- case 0: {
- throw pb::InvalidProtocolBufferException.InvalidTag();
- }
- default: {
- if (pb::WireFormat.IsEndGroupTag(tag)) {
- if (unknownFields != null) {
- this.UnknownFields = unknownFields.Build();
- }
- return this;
- }
- if (unknownFields == null) {
- unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
- }
- ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
- break;
- }
- case 10: {
- global::Google.ProtocolBuffers.TestProtos.TestMutualRecursionB.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.TestMutualRecursionB.CreateBuilder();
- if (result.hasBb) {
- subBuilder.MergeFrom(Bb);
- }
- input.ReadMessage(subBuilder, extensionRegistry);
- Bb = subBuilder.BuildPartial();
- break;
- }
- }
- }
-
- if (unknownFields != null) {
- this.UnknownFields = unknownFields.Build();
- }
- return this;
- }
-
-
- public bool HasBb {
- get { return result.hasBb; }
- }
- public global::Google.ProtocolBuffers.TestProtos.TestMutualRecursionB Bb {
- get { return result.Bb; }
- set { SetBb(value); }
- }
- public Builder SetBb(global::Google.ProtocolBuffers.TestProtos.TestMutualRecursionB value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.hasBb = true;
- result.bb_ = value;
- return this;
- }
- public Builder SetBb(global::Google.ProtocolBuffers.TestProtos.TestMutualRecursionB.Builder builderForValue) {
- pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
- PrepareBuilder();
- result.hasBb = true;
- result.bb_ = builderForValue.Build();
- return this;
- }
- public Builder MergeBb(global::Google.ProtocolBuffers.TestProtos.TestMutualRecursionB value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- if (result.hasBb &&
- result.bb_ != global::Google.ProtocolBuffers.TestProtos.TestMutualRecursionB.DefaultInstance) {
- result.bb_ = global::Google.ProtocolBuffers.TestProtos.TestMutualRecursionB.CreateBuilder(result.bb_).MergeFrom(value).BuildPartial();
- } else {
- result.bb_ = value;
- }
- result.hasBb = true;
- return this;
- }
- public Builder ClearBb() {
- PrepareBuilder();
- result.hasBb = false;
- result.bb_ = null;
- return this;
- }
- }
- static TestMutualRecursionA() {
- object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor, null);
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class TestMutualRecursionB : pb::GeneratedMessage<TestMutualRecursionB, TestMutualRecursionB.Builder> {
- private TestMutualRecursionB() { }
- private static readonly TestMutualRecursionB defaultInstance = new TestMutualRecursionB().MakeReadOnly();
- private static readonly string[] _testMutualRecursionBFieldNames = new string[] { "a", "optional_int32" };
- private static readonly uint[] _testMutualRecursionBFieldTags = new uint[] { 10, 16 };
- public static TestMutualRecursionB DefaultInstance {
- get { return defaultInstance; }
- }
-
- public override TestMutualRecursionB DefaultInstanceForType {
- get { return DefaultInstance; }
- }
-
- protected override TestMutualRecursionB ThisMessage {
- get { return this; }
- }
-
- public static pbd::MessageDescriptor Descriptor {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.internal__static_protobuf_unittest_TestMutualRecursionB__Descriptor; }
- }
-
- protected override pb::FieldAccess.FieldAccessorTable<TestMutualRecursionB, TestMutualRecursionB.Builder> InternalFieldAccessors {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.internal__static_protobuf_unittest_TestMutualRecursionB__FieldAccessorTable; }
- }
-
- public const int AFieldNumber = 1;
- private bool hasA;
- private global::Google.ProtocolBuffers.TestProtos.TestMutualRecursionA a_;
- public bool HasA {
- get { return hasA; }
- }
- public global::Google.ProtocolBuffers.TestProtos.TestMutualRecursionA A {
- get { return a_ ?? global::Google.ProtocolBuffers.TestProtos.TestMutualRecursionA.DefaultInstance; }
- }
-
- public const int OptionalInt32FieldNumber = 2;
- private bool hasOptionalInt32;
- private int optionalInt32_;
- public bool HasOptionalInt32 {
- get { return hasOptionalInt32; }
- }
- public int OptionalInt32 {
- get { return optionalInt32_; }
- }
-
- public override bool IsInitialized {
- get {
- return true;
- }
- }
-
- public override void WriteTo(pb::ICodedOutputStream output) {
- CalcSerializedSize();
- string[] field_names = _testMutualRecursionBFieldNames;
- if (hasA) {
- output.WriteMessage(1, field_names[0], A);
- }
- if (hasOptionalInt32) {
- output.WriteInt32(2, field_names[1], OptionalInt32);
- }
- UnknownFields.WriteTo(output);
- }
-
- private int memoizedSerializedSize = -1;
- public override int SerializedSize {
- get {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
- return CalcSerializedSize();
- }
- }
-
- private int CalcSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- if (hasA) {
- size += pb::CodedOutputStream.ComputeMessageSize(1, A);
- }
- if (hasOptionalInt32) {
- size += pb::CodedOutputStream.ComputeInt32Size(2, OptionalInt32);
- }
- size += UnknownFields.SerializedSize;
- memoizedSerializedSize = size;
- return size;
- }
- public static TestMutualRecursionB ParseFrom(pb::ByteString data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static TestMutualRecursionB ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static TestMutualRecursionB ParseFrom(byte[] data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static TestMutualRecursionB ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static TestMutualRecursionB ParseFrom(global::System.IO.Stream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static TestMutualRecursionB ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- public static TestMutualRecursionB ParseDelimitedFrom(global::System.IO.Stream input) {
- return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
- }
- public static TestMutualRecursionB ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
- }
- public static TestMutualRecursionB ParseFrom(pb::ICodedInputStream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static TestMutualRecursionB ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- private TestMutualRecursionB 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(TestMutualRecursionB prototype) {
- return new Builder(prototype);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class Builder : pb::GeneratedBuilder<TestMutualRecursionB, Builder> {
- protected override Builder ThisBuilder {
- get { return this; }
- }
- public Builder() {
- result = DefaultInstance;
- resultIsReadOnly = true;
- }
- internal Builder(TestMutualRecursionB cloneFrom) {
- result = cloneFrom;
- resultIsReadOnly = true;
- }
-
- private bool resultIsReadOnly;
- private TestMutualRecursionB result;
-
- private TestMutualRecursionB PrepareBuilder() {
- if (resultIsReadOnly) {
- TestMutualRecursionB original = result;
- result = new TestMutualRecursionB();
- resultIsReadOnly = false;
- MergeFrom(original);
- }
- return result;
- }
-
- public override bool IsInitialized {
- get { return result.IsInitialized; }
- }
-
- protected override TestMutualRecursionB 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.TestMutualRecursionB.Descriptor; }
- }
-
- public override TestMutualRecursionB DefaultInstanceForType {
- get { return global::Google.ProtocolBuffers.TestProtos.TestMutualRecursionB.DefaultInstance; }
- }
-
- public override TestMutualRecursionB BuildPartial() {
- if (resultIsReadOnly) {
- return result;
- }
- resultIsReadOnly = true;
- return result.MakeReadOnly();
- }
-
- public override Builder MergeFrom(pb::IMessage other) {
- if (other is TestMutualRecursionB) {
- return MergeFrom((TestMutualRecursionB) other);
- } else {
- base.MergeFrom(other);
- return this;
- }
- }
-
- public override Builder MergeFrom(TestMutualRecursionB other) {
- if (other == global::Google.ProtocolBuffers.TestProtos.TestMutualRecursionB.DefaultInstance) return this;
- PrepareBuilder();
- if (other.HasA) {
- MergeA(other.A);
- }
- if (other.HasOptionalInt32) {
- OptionalInt32 = other.OptionalInt32;
- }
- 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(_testMutualRecursionBFieldNames, field_name, global::System.StringComparer.Ordinal);
- if(field_ordinal >= 0)
- tag = _testMutualRecursionBFieldTags[field_ordinal];
- else {
- if (unknownFields == null) {
- unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
- }
- ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
- continue;
- }
- }
- switch (tag) {
- case 0: {
- throw pb::InvalidProtocolBufferException.InvalidTag();
- }
- default: {
- if (pb::WireFormat.IsEndGroupTag(tag)) {
- if (unknownFields != null) {
- this.UnknownFields = unknownFields.Build();
- }
- return this;
- }
- if (unknownFields == null) {
- unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
- }
- ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
- break;
- }
- case 10: {
- global::Google.ProtocolBuffers.TestProtos.TestMutualRecursionA.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.TestMutualRecursionA.CreateBuilder();
- if (result.hasA) {
- subBuilder.MergeFrom(A);
- }
- input.ReadMessage(subBuilder, extensionRegistry);
- A = subBuilder.BuildPartial();
- break;
- }
- case 16: {
- result.hasOptionalInt32 = input.ReadInt32(ref result.optionalInt32_);
- break;
- }
- }
- }
-
- if (unknownFields != null) {
- this.UnknownFields = unknownFields.Build();
- }
- return this;
- }
-
-
- public bool HasA {
- get { return result.hasA; }
- }
- public global::Google.ProtocolBuffers.TestProtos.TestMutualRecursionA A {
- get { return result.A; }
- set { SetA(value); }
- }
- public Builder SetA(global::Google.ProtocolBuffers.TestProtos.TestMutualRecursionA value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.hasA = true;
- result.a_ = value;
- return this;
- }
- public Builder SetA(global::Google.ProtocolBuffers.TestProtos.TestMutualRecursionA.Builder builderForValue) {
- pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
- PrepareBuilder();
- result.hasA = true;
- result.a_ = builderForValue.Build();
- return this;
- }
- public Builder MergeA(global::Google.ProtocolBuffers.TestProtos.TestMutualRecursionA value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- if (result.hasA &&
- result.a_ != global::Google.ProtocolBuffers.TestProtos.TestMutualRecursionA.DefaultInstance) {
- result.a_ = global::Google.ProtocolBuffers.TestProtos.TestMutualRecursionA.CreateBuilder(result.a_).MergeFrom(value).BuildPartial();
- } else {
- result.a_ = value;
- }
- result.hasA = true;
- return this;
- }
- public Builder ClearA() {
- PrepareBuilder();
- result.hasA = false;
- result.a_ = null;
- return this;
- }
-
- public bool HasOptionalInt32 {
- get { return result.hasOptionalInt32; }
- }
- public int OptionalInt32 {
- get { return result.OptionalInt32; }
- set { SetOptionalInt32(value); }
- }
- public Builder SetOptionalInt32(int value) {
- PrepareBuilder();
- result.hasOptionalInt32 = true;
- result.optionalInt32_ = value;
- return this;
- }
- public Builder ClearOptionalInt32() {
- PrepareBuilder();
- result.hasOptionalInt32 = false;
- result.optionalInt32_ = 0;
- return this;
- }
- }
- static TestMutualRecursionB() {
- object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor, null);
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class TestDupFieldNumber : pb::GeneratedMessage<TestDupFieldNumber, TestDupFieldNumber.Builder> {
- private TestDupFieldNumber() { }
- private static readonly TestDupFieldNumber defaultInstance = new TestDupFieldNumber().MakeReadOnly();
- private static readonly string[] _testDupFieldNumberFieldNames = new string[] { "a", "bar", "foo" };
- private static readonly uint[] _testDupFieldNumberFieldTags = new uint[] { 8, 27, 19 };
- public static TestDupFieldNumber DefaultInstance {
- get { return defaultInstance; }
- }
-
- public override TestDupFieldNumber DefaultInstanceForType {
- get { return DefaultInstance; }
- }
-
- protected override TestDupFieldNumber ThisMessage {
- get { return this; }
- }
-
- public static pbd::MessageDescriptor Descriptor {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.internal__static_protobuf_unittest_TestDupFieldNumber__Descriptor; }
- }
-
- protected override pb::FieldAccess.FieldAccessorTable<TestDupFieldNumber, TestDupFieldNumber.Builder> InternalFieldAccessors {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.internal__static_protobuf_unittest_TestDupFieldNumber__FieldAccessorTable; }
- }
-
- #region Nested types
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public static partial class Types {
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class Foo : pb::GeneratedMessage<Foo, Foo.Builder> {
- private Foo() { }
- private static readonly Foo defaultInstance = new Foo().MakeReadOnly();
- private static readonly string[] _fooFieldNames = new string[] { "a" };
- private static readonly uint[] _fooFieldTags = new uint[] { 8 };
- public static Foo DefaultInstance {
- get { return defaultInstance; }
- }
-
- public override Foo DefaultInstanceForType {
- get { return DefaultInstance; }
- }
-
- protected override Foo ThisMessage {
- get { return this; }
- }
-
- public static pbd::MessageDescriptor Descriptor {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.internal__static_protobuf_unittest_TestDupFieldNumber_Foo__Descriptor; }
- }
-
- protected override pb::FieldAccess.FieldAccessorTable<Foo, Foo.Builder> InternalFieldAccessors {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.internal__static_protobuf_unittest_TestDupFieldNumber_Foo__FieldAccessorTable; }
- }
-
- public const int AFieldNumber = 1;
- private bool hasA;
- private int a_;
- public bool HasA {
- get { return hasA; }
- }
- public int A {
- get { return a_; }
- }
-
- public override bool IsInitialized {
- get {
- return true;
- }
- }
-
- public override void WriteTo(pb::ICodedOutputStream output) {
- CalcSerializedSize();
- string[] field_names = _fooFieldNames;
- if (hasA) {
- output.WriteInt32(1, field_names[0], A);
- }
- UnknownFields.WriteTo(output);
- }
-
- private int memoizedSerializedSize = -1;
- public override int SerializedSize {
- get {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
- return CalcSerializedSize();
- }
- }
-
- private int CalcSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- if (hasA) {
- size += pb::CodedOutputStream.ComputeInt32Size(1, A);
- }
- size += UnknownFields.SerializedSize;
- memoizedSerializedSize = size;
- return size;
- }
- public static Foo ParseFrom(pb::ByteString data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static Foo ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static Foo ParseFrom(byte[] data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static Foo ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static Foo ParseFrom(global::System.IO.Stream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static Foo ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- public static Foo ParseDelimitedFrom(global::System.IO.Stream input) {
- return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
- }
- public static Foo ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
- }
- public static Foo ParseFrom(pb::ICodedInputStream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static Foo ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- private Foo 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(Foo prototype) {
- return new Builder(prototype);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class Builder : pb::GeneratedBuilder<Foo, Builder> {
- protected override Builder ThisBuilder {
- get { return this; }
- }
- public Builder() {
- result = DefaultInstance;
- resultIsReadOnly = true;
- }
- internal Builder(Foo cloneFrom) {
- result = cloneFrom;
- resultIsReadOnly = true;
- }
-
- private bool resultIsReadOnly;
- private Foo result;
-
- private Foo PrepareBuilder() {
- if (resultIsReadOnly) {
- Foo original = result;
- result = new Foo();
- resultIsReadOnly = false;
- MergeFrom(original);
- }
- return result;
- }
-
- public override bool IsInitialized {
- get { return result.IsInitialized; }
- }
-
- protected override Foo 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.TestDupFieldNumber.Types.Foo.Descriptor; }
- }
-
- public override Foo DefaultInstanceForType {
- get { return global::Google.ProtocolBuffers.TestProtos.TestDupFieldNumber.Types.Foo.DefaultInstance; }
- }
-
- public override Foo BuildPartial() {
- if (resultIsReadOnly) {
- return result;
- }
- resultIsReadOnly = true;
- return result.MakeReadOnly();
- }
-
- public override Builder MergeFrom(pb::IMessage other) {
- if (other is Foo) {
- return MergeFrom((Foo) other);
- } else {
- base.MergeFrom(other);
- return this;
- }
- }
-
- public override Builder MergeFrom(Foo other) {
- if (other == global::Google.ProtocolBuffers.TestProtos.TestDupFieldNumber.Types.Foo.DefaultInstance) return this;
- PrepareBuilder();
- if (other.HasA) {
- A = other.A;
- }
- 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(_fooFieldNames, field_name, global::System.StringComparer.Ordinal);
- if(field_ordinal >= 0)
- tag = _fooFieldTags[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.hasA = input.ReadInt32(ref result.a_);
- break;
- }
- }
- }
-
- if (unknownFields != null) {
- this.UnknownFields = unknownFields.Build();
- }
- return this;
- }
-
-
- public bool HasA {
- get { return result.hasA; }
- }
- public int A {
- get { return result.A; }
- set { SetA(value); }
- }
- public Builder SetA(int value) {
- PrepareBuilder();
- result.hasA = true;
- result.a_ = value;
- return this;
- }
- public Builder ClearA() {
- PrepareBuilder();
- result.hasA = false;
- result.a_ = 0;
- return this;
- }
- }
- static Foo() {
- object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor, null);
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class Bar : pb::GeneratedMessage<Bar, Bar.Builder> {
- private Bar() { }
- private static readonly Bar defaultInstance = new Bar().MakeReadOnly();
- private static readonly string[] _barFieldNames = new string[] { "a" };
- private static readonly uint[] _barFieldTags = new uint[] { 8 };
- public static Bar DefaultInstance {
- get { return defaultInstance; }
- }
-
- public override Bar DefaultInstanceForType {
- get { return DefaultInstance; }
- }
-
- protected override Bar ThisMessage {
- get { return this; }
- }
-
- public static pbd::MessageDescriptor Descriptor {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.internal__static_protobuf_unittest_TestDupFieldNumber_Bar__Descriptor; }
- }
-
- protected override pb::FieldAccess.FieldAccessorTable<Bar, Bar.Builder> InternalFieldAccessors {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.internal__static_protobuf_unittest_TestDupFieldNumber_Bar__FieldAccessorTable; }
- }
-
- public const int AFieldNumber = 1;
- private bool hasA;
- private int a_;
- public bool HasA {
- get { return hasA; }
- }
- public int A {
- get { return a_; }
- }
-
- public override bool IsInitialized {
- get {
- return true;
- }
- }
-
- public override void WriteTo(pb::ICodedOutputStream output) {
- CalcSerializedSize();
- string[] field_names = _barFieldNames;
- if (hasA) {
- output.WriteInt32(1, field_names[0], A);
- }
- UnknownFields.WriteTo(output);
- }
-
- private int memoizedSerializedSize = -1;
- public override int SerializedSize {
- get {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
- return CalcSerializedSize();
- }
- }
-
- private int CalcSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- if (hasA) {
- size += pb::CodedOutputStream.ComputeInt32Size(1, A);
- }
- size += UnknownFields.SerializedSize;
- memoizedSerializedSize = size;
- return size;
- }
- public static Bar ParseFrom(pb::ByteString data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static Bar ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static Bar ParseFrom(byte[] data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static Bar ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static Bar ParseFrom(global::System.IO.Stream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static Bar ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- public static Bar ParseDelimitedFrom(global::System.IO.Stream input) {
- return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
- }
- public static Bar ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
- }
- public static Bar ParseFrom(pb::ICodedInputStream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static Bar ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- private Bar 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(Bar prototype) {
- return new Builder(prototype);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class Builder : pb::GeneratedBuilder<Bar, Builder> {
- protected override Builder ThisBuilder {
- get { return this; }
- }
- public Builder() {
- result = DefaultInstance;
- resultIsReadOnly = true;
- }
- internal Builder(Bar cloneFrom) {
- result = cloneFrom;
- resultIsReadOnly = true;
- }
-
- private bool resultIsReadOnly;
- private Bar result;
-
- private Bar PrepareBuilder() {
- if (resultIsReadOnly) {
- Bar original = result;
- result = new Bar();
- resultIsReadOnly = false;
- MergeFrom(original);
- }
- return result;
- }
-
- public override bool IsInitialized {
- get { return result.IsInitialized; }
- }
-
- protected override Bar 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.TestDupFieldNumber.Types.Bar.Descriptor; }
- }
-
- public override Bar DefaultInstanceForType {
- get { return global::Google.ProtocolBuffers.TestProtos.TestDupFieldNumber.Types.Bar.DefaultInstance; }
- }
-
- public override Bar BuildPartial() {
- if (resultIsReadOnly) {
- return result;
- }
- resultIsReadOnly = true;
- return result.MakeReadOnly();
- }
-
- public override Builder MergeFrom(pb::IMessage other) {
- if (other is Bar) {
- return MergeFrom((Bar) other);
- } else {
- base.MergeFrom(other);
- return this;
- }
- }
-
- public override Builder MergeFrom(Bar other) {
- if (other == global::Google.ProtocolBuffers.TestProtos.TestDupFieldNumber.Types.Bar.DefaultInstance) return this;
- PrepareBuilder();
- if (other.HasA) {
- A = other.A;
- }
- 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(_barFieldNames, field_name, global::System.StringComparer.Ordinal);
- if(field_ordinal >= 0)
- tag = _barFieldTags[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.hasA = input.ReadInt32(ref result.a_);
- break;
- }
- }
- }
-
- if (unknownFields != null) {
- this.UnknownFields = unknownFields.Build();
- }
- return this;
- }
-
-
- public bool HasA {
- get { return result.hasA; }
- }
- public int A {
- get { return result.A; }
- set { SetA(value); }
- }
- public Builder SetA(int value) {
- PrepareBuilder();
- result.hasA = true;
- result.a_ = value;
- return this;
- }
- public Builder ClearA() {
- PrepareBuilder();
- result.hasA = false;
- result.a_ = 0;
- return this;
- }
- }
- static Bar() {
- object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor, null);
- }
- }
-
- }
- #endregion
-
- public const int AFieldNumber = 1;
- private bool hasA;
- private int a_;
- public bool HasA {
- get { return hasA; }
- }
- public int A {
- get { return a_; }
- }
-
- public const int FooFieldNumber = 2;
- private bool hasFoo;
- private global::Google.ProtocolBuffers.TestProtos.TestDupFieldNumber.Types.Foo foo_;
- public bool HasFoo {
- get { return hasFoo; }
- }
- public global::Google.ProtocolBuffers.TestProtos.TestDupFieldNumber.Types.Foo Foo {
- get { return foo_ ?? global::Google.ProtocolBuffers.TestProtos.TestDupFieldNumber.Types.Foo.DefaultInstance; }
- }
-
- public const int BarFieldNumber = 3;
- private bool hasBar;
- private global::Google.ProtocolBuffers.TestProtos.TestDupFieldNumber.Types.Bar bar_;
- public bool HasBar {
- get { return hasBar; }
- }
- public global::Google.ProtocolBuffers.TestProtos.TestDupFieldNumber.Types.Bar Bar {
- get { return bar_ ?? global::Google.ProtocolBuffers.TestProtos.TestDupFieldNumber.Types.Bar.DefaultInstance; }
- }
-
- public override bool IsInitialized {
- get {
- return true;
- }
- }
-
- public override void WriteTo(pb::ICodedOutputStream output) {
- CalcSerializedSize();
- string[] field_names = _testDupFieldNumberFieldNames;
- if (hasA) {
- output.WriteInt32(1, field_names[0], A);
- }
- if (hasFoo) {
- output.WriteGroup(2, field_names[2], Foo);
- }
- if (hasBar) {
- output.WriteGroup(3, field_names[1], Bar);
- }
- UnknownFields.WriteTo(output);
- }
-
- private int memoizedSerializedSize = -1;
- public override int SerializedSize {
- get {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
- return CalcSerializedSize();
- }
- }
-
- private int CalcSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- if (hasA) {
- size += pb::CodedOutputStream.ComputeInt32Size(1, A);
- }
- if (hasFoo) {
- size += pb::CodedOutputStream.ComputeGroupSize(2, Foo);
- }
- if (hasBar) {
- size += pb::CodedOutputStream.ComputeGroupSize(3, Bar);
- }
- size += UnknownFields.SerializedSize;
- memoizedSerializedSize = size;
- return size;
- }
- public static TestDupFieldNumber ParseFrom(pb::ByteString data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static TestDupFieldNumber ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static TestDupFieldNumber ParseFrom(byte[] data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static TestDupFieldNumber ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static TestDupFieldNumber ParseFrom(global::System.IO.Stream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static TestDupFieldNumber ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- public static TestDupFieldNumber ParseDelimitedFrom(global::System.IO.Stream input) {
- return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
- }
- public static TestDupFieldNumber ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
- }
- public static TestDupFieldNumber ParseFrom(pb::ICodedInputStream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static TestDupFieldNumber ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- private TestDupFieldNumber 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(TestDupFieldNumber prototype) {
- return new Builder(prototype);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class Builder : pb::GeneratedBuilder<TestDupFieldNumber, Builder> {
- protected override Builder ThisBuilder {
- get { return this; }
- }
- public Builder() {
- result = DefaultInstance;
- resultIsReadOnly = true;
- }
- internal Builder(TestDupFieldNumber cloneFrom) {
- result = cloneFrom;
- resultIsReadOnly = true;
- }
-
- private bool resultIsReadOnly;
- private TestDupFieldNumber result;
-
- private TestDupFieldNumber PrepareBuilder() {
- if (resultIsReadOnly) {
- TestDupFieldNumber original = result;
- result = new TestDupFieldNumber();
- resultIsReadOnly = false;
- MergeFrom(original);
- }
- return result;
- }
-
- public override bool IsInitialized {
- get { return result.IsInitialized; }
- }
-
- protected override TestDupFieldNumber 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.TestDupFieldNumber.Descriptor; }
- }
-
- public override TestDupFieldNumber DefaultInstanceForType {
- get { return global::Google.ProtocolBuffers.TestProtos.TestDupFieldNumber.DefaultInstance; }
- }
-
- public override TestDupFieldNumber BuildPartial() {
- if (resultIsReadOnly) {
- return result;
- }
- resultIsReadOnly = true;
- return result.MakeReadOnly();
- }
-
- public override Builder MergeFrom(pb::IMessage other) {
- if (other is TestDupFieldNumber) {
- return MergeFrom((TestDupFieldNumber) other);
- } else {
- base.MergeFrom(other);
- return this;
- }
- }
-
- public override Builder MergeFrom(TestDupFieldNumber other) {
- if (other == global::Google.ProtocolBuffers.TestProtos.TestDupFieldNumber.DefaultInstance) return this;
- PrepareBuilder();
- if (other.HasA) {
- A = other.A;
- }
- if (other.HasFoo) {
- MergeFoo(other.Foo);
- }
- if (other.HasBar) {
- MergeBar(other.Bar);
- }
- 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(_testDupFieldNumberFieldNames, field_name, global::System.StringComparer.Ordinal);
- if(field_ordinal >= 0)
- tag = _testDupFieldNumberFieldTags[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.hasA = input.ReadInt32(ref result.a_);
- break;
- }
- case 19: {
- global::Google.ProtocolBuffers.TestProtos.TestDupFieldNumber.Types.Foo.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.TestDupFieldNumber.Types.Foo.CreateBuilder();
- if (result.hasFoo) {
- subBuilder.MergeFrom(Foo);
- }
- input.ReadGroup(2, subBuilder, extensionRegistry);
- Foo = subBuilder.BuildPartial();
- break;
- }
- case 27: {
- global::Google.ProtocolBuffers.TestProtos.TestDupFieldNumber.Types.Bar.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.TestDupFieldNumber.Types.Bar.CreateBuilder();
- if (result.hasBar) {
- subBuilder.MergeFrom(Bar);
- }
- input.ReadGroup(3, subBuilder, extensionRegistry);
- Bar = subBuilder.BuildPartial();
- break;
- }
- }
- }
-
- if (unknownFields != null) {
- this.UnknownFields = unknownFields.Build();
- }
- return this;
- }
-
-
- public bool HasA {
- get { return result.hasA; }
- }
- public int A {
- get { return result.A; }
- set { SetA(value); }
- }
- public Builder SetA(int value) {
- PrepareBuilder();
- result.hasA = true;
- result.a_ = value;
- return this;
- }
- public Builder ClearA() {
- PrepareBuilder();
- result.hasA = false;
- result.a_ = 0;
- return this;
- }
-
- public bool HasFoo {
- get { return result.hasFoo; }
- }
- public global::Google.ProtocolBuffers.TestProtos.TestDupFieldNumber.Types.Foo Foo {
- get { return result.Foo; }
- set { SetFoo(value); }
- }
- public Builder SetFoo(global::Google.ProtocolBuffers.TestProtos.TestDupFieldNumber.Types.Foo value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.hasFoo = true;
- result.foo_ = value;
- return this;
- }
- public Builder SetFoo(global::Google.ProtocolBuffers.TestProtos.TestDupFieldNumber.Types.Foo.Builder builderForValue) {
- pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
- PrepareBuilder();
- result.hasFoo = true;
- result.foo_ = builderForValue.Build();
- return this;
- }
- public Builder MergeFoo(global::Google.ProtocolBuffers.TestProtos.TestDupFieldNumber.Types.Foo value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- if (result.hasFoo &&
- result.foo_ != global::Google.ProtocolBuffers.TestProtos.TestDupFieldNumber.Types.Foo.DefaultInstance) {
- result.foo_ = global::Google.ProtocolBuffers.TestProtos.TestDupFieldNumber.Types.Foo.CreateBuilder(result.foo_).MergeFrom(value).BuildPartial();
- } else {
- result.foo_ = value;
- }
- result.hasFoo = true;
- return this;
- }
- public Builder ClearFoo() {
- PrepareBuilder();
- result.hasFoo = false;
- result.foo_ = null;
- return this;
- }
-
- public bool HasBar {
- get { return result.hasBar; }
- }
- public global::Google.ProtocolBuffers.TestProtos.TestDupFieldNumber.Types.Bar Bar {
- get { return result.Bar; }
- set { SetBar(value); }
- }
- public Builder SetBar(global::Google.ProtocolBuffers.TestProtos.TestDupFieldNumber.Types.Bar value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.hasBar = true;
- result.bar_ = value;
- return this;
- }
- public Builder SetBar(global::Google.ProtocolBuffers.TestProtos.TestDupFieldNumber.Types.Bar.Builder builderForValue) {
- pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
- PrepareBuilder();
- result.hasBar = true;
- result.bar_ = builderForValue.Build();
- return this;
- }
- public Builder MergeBar(global::Google.ProtocolBuffers.TestProtos.TestDupFieldNumber.Types.Bar value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- if (result.hasBar &&
- result.bar_ != global::Google.ProtocolBuffers.TestProtos.TestDupFieldNumber.Types.Bar.DefaultInstance) {
- result.bar_ = global::Google.ProtocolBuffers.TestProtos.TestDupFieldNumber.Types.Bar.CreateBuilder(result.bar_).MergeFrom(value).BuildPartial();
- } else {
- result.bar_ = value;
- }
- result.hasBar = true;
- return this;
- }
- public Builder ClearBar() {
- PrepareBuilder();
- result.hasBar = false;
- result.bar_ = null;
- return this;
- }
- }
- static TestDupFieldNumber() {
- object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor, null);
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class TestNestedMessageHasBits : pb::GeneratedMessage<TestNestedMessageHasBits, TestNestedMessageHasBits.Builder> {
- private TestNestedMessageHasBits() { }
- private static readonly TestNestedMessageHasBits defaultInstance = new TestNestedMessageHasBits().MakeReadOnly();
- private static readonly string[] _testNestedMessageHasBitsFieldNames = new string[] { "optional_nested_message" };
- private static readonly uint[] _testNestedMessageHasBitsFieldTags = new uint[] { 10 };
- public static TestNestedMessageHasBits DefaultInstance {
- get { return defaultInstance; }
- }
-
- public override TestNestedMessageHasBits DefaultInstanceForType {
- get { return DefaultInstance; }
- }
-
- protected override TestNestedMessageHasBits ThisMessage {
- get { return this; }
- }
-
- public static pbd::MessageDescriptor Descriptor {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.internal__static_protobuf_unittest_TestNestedMessageHasBits__Descriptor; }
- }
-
- protected override pb::FieldAccess.FieldAccessorTable<TestNestedMessageHasBits, TestNestedMessageHasBits.Builder> InternalFieldAccessors {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.internal__static_protobuf_unittest_TestNestedMessageHasBits__FieldAccessorTable; }
- }
-
- #region Nested types
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public static partial class Types {
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class NestedMessage : pb::GeneratedMessage<NestedMessage, NestedMessage.Builder> {
- private NestedMessage() { }
- private static readonly NestedMessage defaultInstance = new NestedMessage().MakeReadOnly();
- private static readonly string[] _nestedMessageFieldNames = new string[] { "nestedmessage_repeated_foreignmessage", "nestedmessage_repeated_int32" };
- private static readonly uint[] _nestedMessageFieldTags = new uint[] { 18, 8 };
- public static NestedMessage DefaultInstance {
- get { return defaultInstance; }
- }
-
- public override NestedMessage DefaultInstanceForType {
- get { return DefaultInstance; }
- }
-
- protected override NestedMessage ThisMessage {
- get { return this; }
- }
-
- public static pbd::MessageDescriptor Descriptor {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.internal__static_protobuf_unittest_TestNestedMessageHasBits_NestedMessage__Descriptor; }
- }
-
- protected override pb::FieldAccess.FieldAccessorTable<NestedMessage, NestedMessage.Builder> InternalFieldAccessors {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.internal__static_protobuf_unittest_TestNestedMessageHasBits_NestedMessage__FieldAccessorTable; }
- }
-
- public const int NestedmessageRepeatedInt32FieldNumber = 1;
- private pbc::PopsicleList<int> nestedmessageRepeatedInt32_ = new pbc::PopsicleList<int>();
- public scg::IList<int> NestedmessageRepeatedInt32List {
- get { return pbc::Lists.AsReadOnly(nestedmessageRepeatedInt32_); }
- }
- public int NestedmessageRepeatedInt32Count {
- get { return nestedmessageRepeatedInt32_.Count; }
- }
- public int GetNestedmessageRepeatedInt32(int index) {
- return nestedmessageRepeatedInt32_[index];
- }
-
- public const int NestedmessageRepeatedForeignmessageFieldNumber = 2;
- private pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.ForeignMessage> nestedmessageRepeatedForeignmessage_ = new pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.ForeignMessage>();
- public scg::IList<global::Google.ProtocolBuffers.TestProtos.ForeignMessage> NestedmessageRepeatedForeignmessageList {
- get { return nestedmessageRepeatedForeignmessage_; }
- }
- public int NestedmessageRepeatedForeignmessageCount {
- get { return nestedmessageRepeatedForeignmessage_.Count; }
- }
- public global::Google.ProtocolBuffers.TestProtos.ForeignMessage GetNestedmessageRepeatedForeignmessage(int index) {
- return nestedmessageRepeatedForeignmessage_[index];
- }
-
- public override bool IsInitialized {
- get {
- return true;
- }
- }
-
- public override void WriteTo(pb::ICodedOutputStream output) {
- CalcSerializedSize();
- string[] field_names = _nestedMessageFieldNames;
- if (nestedmessageRepeatedInt32_.Count > 0) {
- output.WriteInt32Array(1, field_names[1], nestedmessageRepeatedInt32_);
- }
- if (nestedmessageRepeatedForeignmessage_.Count > 0) {
- output.WriteMessageArray(2, field_names[0], nestedmessageRepeatedForeignmessage_);
- }
- UnknownFields.WriteTo(output);
- }
-
- private int memoizedSerializedSize = -1;
- public override int SerializedSize {
- get {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
- return CalcSerializedSize();
- }
- }
-
- private int CalcSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- {
- int dataSize = 0;
- foreach (int element in NestedmessageRepeatedInt32List) {
- dataSize += pb::CodedOutputStream.ComputeInt32SizeNoTag(element);
- }
- size += dataSize;
- size += 1 * nestedmessageRepeatedInt32_.Count;
- }
- foreach (global::Google.ProtocolBuffers.TestProtos.ForeignMessage element in NestedmessageRepeatedForeignmessageList) {
- size += pb::CodedOutputStream.ComputeMessageSize(2, element);
- }
- size += UnknownFields.SerializedSize;
- memoizedSerializedSize = size;
- return size;
- }
- public static NestedMessage ParseFrom(pb::ByteString data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static NestedMessage ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static NestedMessage ParseFrom(byte[] data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static NestedMessage ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static NestedMessage ParseFrom(global::System.IO.Stream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static NestedMessage ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- public static NestedMessage ParseDelimitedFrom(global::System.IO.Stream input) {
- return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
- }
- public static NestedMessage ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
- }
- public static NestedMessage ParseFrom(pb::ICodedInputStream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static NestedMessage ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- private NestedMessage MakeReadOnly() {
- nestedmessageRepeatedInt32_.MakeReadOnly();
- nestedmessageRepeatedForeignmessage_.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(NestedMessage prototype) {
- return new Builder(prototype);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class Builder : pb::GeneratedBuilder<NestedMessage, Builder> {
- protected override Builder ThisBuilder {
- get { return this; }
- }
- public Builder() {
- result = DefaultInstance;
- resultIsReadOnly = true;
- }
- internal Builder(NestedMessage cloneFrom) {
- result = cloneFrom;
- resultIsReadOnly = true;
- }
-
- private bool resultIsReadOnly;
- private NestedMessage result;
-
- private NestedMessage PrepareBuilder() {
- if (resultIsReadOnly) {
- NestedMessage original = result;
- result = new NestedMessage();
- resultIsReadOnly = false;
- MergeFrom(original);
- }
- return result;
- }
-
- public override bool IsInitialized {
- get { return result.IsInitialized; }
- }
-
- protected override NestedMessage 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.TestNestedMessageHasBits.Types.NestedMessage.Descriptor; }
- }
-
- public override NestedMessage DefaultInstanceForType {
- get { return global::Google.ProtocolBuffers.TestProtos.TestNestedMessageHasBits.Types.NestedMessage.DefaultInstance; }
- }
-
- public override NestedMessage BuildPartial() {
- if (resultIsReadOnly) {
- return result;
- }
- resultIsReadOnly = true;
- return result.MakeReadOnly();
- }
-
- public override Builder MergeFrom(pb::IMessage other) {
- if (other is NestedMessage) {
- return MergeFrom((NestedMessage) other);
- } else {
- base.MergeFrom(other);
- return this;
- }
- }
-
- public override Builder MergeFrom(NestedMessage other) {
- if (other == global::Google.ProtocolBuffers.TestProtos.TestNestedMessageHasBits.Types.NestedMessage.DefaultInstance) return this;
- PrepareBuilder();
- if (other.nestedmessageRepeatedInt32_.Count != 0) {
- result.nestedmessageRepeatedInt32_.Add(other.nestedmessageRepeatedInt32_);
- }
- if (other.nestedmessageRepeatedForeignmessage_.Count != 0) {
- result.nestedmessageRepeatedForeignmessage_.Add(other.nestedmessageRepeatedForeignmessage_);
- }
- 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(_nestedMessageFieldNames, field_name, global::System.StringComparer.Ordinal);
- if(field_ordinal >= 0)
- tag = _nestedMessageFieldTags[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.nestedmessageRepeatedInt32_);
- break;
- }
- case 18: {
- input.ReadMessageArray(tag, field_name, result.nestedmessageRepeatedForeignmessage_, global::Google.ProtocolBuffers.TestProtos.ForeignMessage.DefaultInstance, extensionRegistry);
- break;
- }
- }
- }
-
- if (unknownFields != null) {
- this.UnknownFields = unknownFields.Build();
- }
- return this;
- }
-
-
- public pbc::IPopsicleList<int> NestedmessageRepeatedInt32List {
- get { return PrepareBuilder().nestedmessageRepeatedInt32_; }
- }
- public int NestedmessageRepeatedInt32Count {
- get { return result.NestedmessageRepeatedInt32Count; }
- }
- public int GetNestedmessageRepeatedInt32(int index) {
- return result.GetNestedmessageRepeatedInt32(index);
- }
- public Builder SetNestedmessageRepeatedInt32(int index, int value) {
- PrepareBuilder();
- result.nestedmessageRepeatedInt32_[index] = value;
- return this;
- }
- public Builder AddNestedmessageRepeatedInt32(int value) {
- PrepareBuilder();
- result.nestedmessageRepeatedInt32_.Add(value);
- return this;
- }
- public Builder AddRangeNestedmessageRepeatedInt32(scg::IEnumerable<int> values) {
- PrepareBuilder();
- result.nestedmessageRepeatedInt32_.Add(values);
- return this;
- }
- public Builder ClearNestedmessageRepeatedInt32() {
- PrepareBuilder();
- result.nestedmessageRepeatedInt32_.Clear();
- return this;
- }
-
- public pbc::IPopsicleList<global::Google.ProtocolBuffers.TestProtos.ForeignMessage> NestedmessageRepeatedForeignmessageList {
- get { return PrepareBuilder().nestedmessageRepeatedForeignmessage_; }
- }
- public int NestedmessageRepeatedForeignmessageCount {
- get { return result.NestedmessageRepeatedForeignmessageCount; }
- }
- public global::Google.ProtocolBuffers.TestProtos.ForeignMessage GetNestedmessageRepeatedForeignmessage(int index) {
- return result.GetNestedmessageRepeatedForeignmessage(index);
- }
- public Builder SetNestedmessageRepeatedForeignmessage(int index, global::Google.ProtocolBuffers.TestProtos.ForeignMessage value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.nestedmessageRepeatedForeignmessage_[index] = value;
- return this;
- }
- public Builder SetNestedmessageRepeatedForeignmessage(int index, global::Google.ProtocolBuffers.TestProtos.ForeignMessage.Builder builderForValue) {
- pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
- PrepareBuilder();
- result.nestedmessageRepeatedForeignmessage_[index] = builderForValue.Build();
- return this;
- }
- public Builder AddNestedmessageRepeatedForeignmessage(global::Google.ProtocolBuffers.TestProtos.ForeignMessage value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.nestedmessageRepeatedForeignmessage_.Add(value);
- return this;
- }
- public Builder AddNestedmessageRepeatedForeignmessage(global::Google.ProtocolBuffers.TestProtos.ForeignMessage.Builder builderForValue) {
- pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
- PrepareBuilder();
- result.nestedmessageRepeatedForeignmessage_.Add(builderForValue.Build());
- return this;
- }
- public Builder AddRangeNestedmessageRepeatedForeignmessage(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.ForeignMessage> values) {
- PrepareBuilder();
- result.nestedmessageRepeatedForeignmessage_.Add(values);
- return this;
- }
- public Builder ClearNestedmessageRepeatedForeignmessage() {
- PrepareBuilder();
- result.nestedmessageRepeatedForeignmessage_.Clear();
- return this;
- }
- }
- static NestedMessage() {
- object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor, null);
- }
- }
-
- }
- #endregion
-
- public const int OptionalNestedMessageFieldNumber = 1;
- private bool hasOptionalNestedMessage;
- private global::Google.ProtocolBuffers.TestProtos.TestNestedMessageHasBits.Types.NestedMessage optionalNestedMessage_;
- public bool HasOptionalNestedMessage {
- get { return hasOptionalNestedMessage; }
- }
- public global::Google.ProtocolBuffers.TestProtos.TestNestedMessageHasBits.Types.NestedMessage OptionalNestedMessage {
- get { return optionalNestedMessage_ ?? global::Google.ProtocolBuffers.TestProtos.TestNestedMessageHasBits.Types.NestedMessage.DefaultInstance; }
- }
-
- public override bool IsInitialized {
- get {
- return true;
- }
- }
-
- public override void WriteTo(pb::ICodedOutputStream output) {
- CalcSerializedSize();
- string[] field_names = _testNestedMessageHasBitsFieldNames;
- if (hasOptionalNestedMessage) {
- output.WriteMessage(1, field_names[0], OptionalNestedMessage);
- }
- UnknownFields.WriteTo(output);
- }
-
- private int memoizedSerializedSize = -1;
- public override int SerializedSize {
- get {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
- return CalcSerializedSize();
- }
- }
-
- private int CalcSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- if (hasOptionalNestedMessage) {
- size += pb::CodedOutputStream.ComputeMessageSize(1, OptionalNestedMessage);
- }
- size += UnknownFields.SerializedSize;
- memoizedSerializedSize = size;
- return size;
- }
- public static TestNestedMessageHasBits ParseFrom(pb::ByteString data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static TestNestedMessageHasBits ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static TestNestedMessageHasBits ParseFrom(byte[] data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static TestNestedMessageHasBits ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static TestNestedMessageHasBits ParseFrom(global::System.IO.Stream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static TestNestedMessageHasBits ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- public static TestNestedMessageHasBits ParseDelimitedFrom(global::System.IO.Stream input) {
- return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
- }
- public static TestNestedMessageHasBits ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
- }
- public static TestNestedMessageHasBits ParseFrom(pb::ICodedInputStream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static TestNestedMessageHasBits ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- private TestNestedMessageHasBits 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(TestNestedMessageHasBits prototype) {
- return new Builder(prototype);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class Builder : pb::GeneratedBuilder<TestNestedMessageHasBits, Builder> {
- protected override Builder ThisBuilder {
- get { return this; }
- }
- public Builder() {
- result = DefaultInstance;
- resultIsReadOnly = true;
- }
- internal Builder(TestNestedMessageHasBits cloneFrom) {
- result = cloneFrom;
- resultIsReadOnly = true;
- }
-
- private bool resultIsReadOnly;
- private TestNestedMessageHasBits result;
-
- private TestNestedMessageHasBits PrepareBuilder() {
- if (resultIsReadOnly) {
- TestNestedMessageHasBits original = result;
- result = new TestNestedMessageHasBits();
- resultIsReadOnly = false;
- MergeFrom(original);
- }
- return result;
- }
-
- public override bool IsInitialized {
- get { return result.IsInitialized; }
- }
-
- protected override TestNestedMessageHasBits 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.TestNestedMessageHasBits.Descriptor; }
- }
-
- public override TestNestedMessageHasBits DefaultInstanceForType {
- get { return global::Google.ProtocolBuffers.TestProtos.TestNestedMessageHasBits.DefaultInstance; }
- }
-
- public override TestNestedMessageHasBits BuildPartial() {
- if (resultIsReadOnly) {
- return result;
- }
- resultIsReadOnly = true;
- return result.MakeReadOnly();
- }
-
- public override Builder MergeFrom(pb::IMessage other) {
- if (other is TestNestedMessageHasBits) {
- return MergeFrom((TestNestedMessageHasBits) other);
- } else {
- base.MergeFrom(other);
- return this;
- }
- }
-
- public override Builder MergeFrom(TestNestedMessageHasBits other) {
- if (other == global::Google.ProtocolBuffers.TestProtos.TestNestedMessageHasBits.DefaultInstance) return this;
- PrepareBuilder();
- if (other.HasOptionalNestedMessage) {
- MergeOptionalNestedMessage(other.OptionalNestedMessage);
- }
- 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(_testNestedMessageHasBitsFieldNames, field_name, global::System.StringComparer.Ordinal);
- if(field_ordinal >= 0)
- tag = _testNestedMessageHasBitsFieldTags[field_ordinal];
- else {
- if (unknownFields == null) {
- unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
- }
- ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
- continue;
- }
- }
- switch (tag) {
- case 0: {
- throw pb::InvalidProtocolBufferException.InvalidTag();
- }
- default: {
- if (pb::WireFormat.IsEndGroupTag(tag)) {
- if (unknownFields != null) {
- this.UnknownFields = unknownFields.Build();
- }
- return this;
- }
- if (unknownFields == null) {
- unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
- }
- ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
- break;
- }
- case 10: {
- global::Google.ProtocolBuffers.TestProtos.TestNestedMessageHasBits.Types.NestedMessage.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.TestNestedMessageHasBits.Types.NestedMessage.CreateBuilder();
- if (result.hasOptionalNestedMessage) {
- subBuilder.MergeFrom(OptionalNestedMessage);
- }
- input.ReadMessage(subBuilder, extensionRegistry);
- OptionalNestedMessage = subBuilder.BuildPartial();
- break;
- }
- }
- }
-
- if (unknownFields != null) {
- this.UnknownFields = unknownFields.Build();
- }
- return this;
- }
-
-
- public bool HasOptionalNestedMessage {
- get { return result.hasOptionalNestedMessage; }
- }
- public global::Google.ProtocolBuffers.TestProtos.TestNestedMessageHasBits.Types.NestedMessage OptionalNestedMessage {
- get { return result.OptionalNestedMessage; }
- set { SetOptionalNestedMessage(value); }
- }
- public Builder SetOptionalNestedMessage(global::Google.ProtocolBuffers.TestProtos.TestNestedMessageHasBits.Types.NestedMessage value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.hasOptionalNestedMessage = true;
- result.optionalNestedMessage_ = value;
- return this;
- }
- public Builder SetOptionalNestedMessage(global::Google.ProtocolBuffers.TestProtos.TestNestedMessageHasBits.Types.NestedMessage.Builder builderForValue) {
- pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
- PrepareBuilder();
- result.hasOptionalNestedMessage = true;
- result.optionalNestedMessage_ = builderForValue.Build();
- return this;
- }
- public Builder MergeOptionalNestedMessage(global::Google.ProtocolBuffers.TestProtos.TestNestedMessageHasBits.Types.NestedMessage value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- if (result.hasOptionalNestedMessage &&
- result.optionalNestedMessage_ != global::Google.ProtocolBuffers.TestProtos.TestNestedMessageHasBits.Types.NestedMessage.DefaultInstance) {
- result.optionalNestedMessage_ = global::Google.ProtocolBuffers.TestProtos.TestNestedMessageHasBits.Types.NestedMessage.CreateBuilder(result.optionalNestedMessage_).MergeFrom(value).BuildPartial();
- } else {
- result.optionalNestedMessage_ = value;
- }
- result.hasOptionalNestedMessage = true;
- return this;
- }
- public Builder ClearOptionalNestedMessage() {
- PrepareBuilder();
- result.hasOptionalNestedMessage = false;
- result.optionalNestedMessage_ = null;
- return this;
- }
- }
- static TestNestedMessageHasBits() {
- object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor, null);
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class TestCamelCaseFieldNames : pb::GeneratedMessage<TestCamelCaseFieldNames, TestCamelCaseFieldNames.Builder> {
- private TestCamelCaseFieldNames() { }
- private static readonly TestCamelCaseFieldNames defaultInstance = new TestCamelCaseFieldNames().MakeReadOnly();
- private static readonly string[] _testCamelCaseFieldNamesFieldNames = new string[] { "CordField", "EnumField", "MessageField", "PrimitiveField", "RepeatedCordField", "RepeatedEnumField", "RepeatedMessageField", "RepeatedPrimitiveField", "RepeatedStringField", "RepeatedStringPieceField", "StringField", "StringPieceField" };
- private static readonly uint[] _testCamelCaseFieldNamesFieldTags = new uint[] { 50, 24, 34, 8, 98, 72, 82, 56, 66, 90, 18, 42 };
- public static TestCamelCaseFieldNames DefaultInstance {
- get { return defaultInstance; }
- }
-
- public override TestCamelCaseFieldNames DefaultInstanceForType {
- get { return DefaultInstance; }
- }
-
- protected override TestCamelCaseFieldNames ThisMessage {
- get { return this; }
- }
-
- public static pbd::MessageDescriptor Descriptor {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.internal__static_protobuf_unittest_TestCamelCaseFieldNames__Descriptor; }
- }
-
- protected override pb::FieldAccess.FieldAccessorTable<TestCamelCaseFieldNames, TestCamelCaseFieldNames.Builder> InternalFieldAccessors {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.internal__static_protobuf_unittest_TestCamelCaseFieldNames__FieldAccessorTable; }
- }
-
- public const int PrimitiveFieldFieldNumber = 1;
- private bool hasPrimitiveField;
- private int primitiveField_;
- public bool HasPrimitiveField {
- get { return hasPrimitiveField; }
- }
- public int PrimitiveField {
- get { return primitiveField_; }
- }
-
- public const int StringFieldFieldNumber = 2;
- private bool hasStringField;
- private string stringField_ = "";
- public bool HasStringField {
- get { return hasStringField; }
- }
- public string StringField {
- get { return stringField_; }
- }
-
- public const int EnumFieldFieldNumber = 3;
- private bool hasEnumField;
- private global::Google.ProtocolBuffers.TestProtos.ForeignEnum enumField_ = global::Google.ProtocolBuffers.TestProtos.ForeignEnum.FOREIGN_FOO;
- public bool HasEnumField {
- get { return hasEnumField; }
- }
- public global::Google.ProtocolBuffers.TestProtos.ForeignEnum EnumField {
- get { return enumField_; }
- }
-
- public const int MessageFieldFieldNumber = 4;
- private bool hasMessageField;
- private global::Google.ProtocolBuffers.TestProtos.ForeignMessage messageField_;
- public bool HasMessageField {
- get { return hasMessageField; }
- }
- public global::Google.ProtocolBuffers.TestProtos.ForeignMessage MessageField {
- get { return messageField_ ?? global::Google.ProtocolBuffers.TestProtos.ForeignMessage.DefaultInstance; }
- }
-
- public const int StringPieceFieldFieldNumber = 5;
- private bool hasStringPieceField;
- private string stringPieceField_ = "";
- public bool HasStringPieceField {
- get { return hasStringPieceField; }
- }
- public string StringPieceField {
- get { return stringPieceField_; }
- }
-
- public const int CordFieldFieldNumber = 6;
- private bool hasCordField;
- private string cordField_ = "";
- public bool HasCordField {
- get { return hasCordField; }
- }
- public string CordField {
- get { return cordField_; }
- }
-
- public const int RepeatedPrimitiveFieldFieldNumber = 7;
- private pbc::PopsicleList<int> repeatedPrimitiveField_ = new pbc::PopsicleList<int>();
- public scg::IList<int> RepeatedPrimitiveFieldList {
- get { return pbc::Lists.AsReadOnly(repeatedPrimitiveField_); }
- }
- public int RepeatedPrimitiveFieldCount {
- get { return repeatedPrimitiveField_.Count; }
- }
- public int GetRepeatedPrimitiveField(int index) {
- return repeatedPrimitiveField_[index];
- }
-
- public const int RepeatedStringFieldFieldNumber = 8;
- private pbc::PopsicleList<string> repeatedStringField_ = new pbc::PopsicleList<string>();
- public scg::IList<string> RepeatedStringFieldList {
- get { return pbc::Lists.AsReadOnly(repeatedStringField_); }
- }
- public int RepeatedStringFieldCount {
- get { return repeatedStringField_.Count; }
- }
- public string GetRepeatedStringField(int index) {
- return repeatedStringField_[index];
- }
-
- public const int RepeatedEnumFieldFieldNumber = 9;
- private pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.ForeignEnum> repeatedEnumField_ = new pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.ForeignEnum>();
- public scg::IList<global::Google.ProtocolBuffers.TestProtos.ForeignEnum> RepeatedEnumFieldList {
- get { return pbc::Lists.AsReadOnly(repeatedEnumField_); }
- }
- public int RepeatedEnumFieldCount {
- get { return repeatedEnumField_.Count; }
- }
- public global::Google.ProtocolBuffers.TestProtos.ForeignEnum GetRepeatedEnumField(int index) {
- return repeatedEnumField_[index];
- }
-
- public const int RepeatedMessageFieldFieldNumber = 10;
- private pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.ForeignMessage> repeatedMessageField_ = new pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.ForeignMessage>();
- public scg::IList<global::Google.ProtocolBuffers.TestProtos.ForeignMessage> RepeatedMessageFieldList {
- get { return repeatedMessageField_; }
- }
- public int RepeatedMessageFieldCount {
- get { return repeatedMessageField_.Count; }
- }
- public global::Google.ProtocolBuffers.TestProtos.ForeignMessage GetRepeatedMessageField(int index) {
- return repeatedMessageField_[index];
- }
-
- public const int RepeatedStringPieceFieldFieldNumber = 11;
- private pbc::PopsicleList<string> repeatedStringPieceField_ = new pbc::PopsicleList<string>();
- public scg::IList<string> RepeatedStringPieceFieldList {
- get { return pbc::Lists.AsReadOnly(repeatedStringPieceField_); }
- }
- public int RepeatedStringPieceFieldCount {
- get { return repeatedStringPieceField_.Count; }
- }
- public string GetRepeatedStringPieceField(int index) {
- return repeatedStringPieceField_[index];
- }
-
- public const int RepeatedCordFieldFieldNumber = 12;
- private pbc::PopsicleList<string> repeatedCordField_ = new pbc::PopsicleList<string>();
- public scg::IList<string> RepeatedCordFieldList {
- get { return pbc::Lists.AsReadOnly(repeatedCordField_); }
- }
- public int RepeatedCordFieldCount {
- get { return repeatedCordField_.Count; }
- }
- public string GetRepeatedCordField(int index) {
- return repeatedCordField_[index];
- }
-
- public override bool IsInitialized {
- get {
- return true;
- }
- }
-
- public override void WriteTo(pb::ICodedOutputStream output) {
- CalcSerializedSize();
- string[] field_names = _testCamelCaseFieldNamesFieldNames;
- if (hasPrimitiveField) {
- output.WriteInt32(1, field_names[3], PrimitiveField);
- }
- if (hasStringField) {
- output.WriteString(2, field_names[10], StringField);
- }
- if (hasEnumField) {
- output.WriteEnum(3, field_names[1], (int) EnumField, EnumField);
- }
- if (hasMessageField) {
- output.WriteMessage(4, field_names[2], MessageField);
- }
- if (hasStringPieceField) {
- output.WriteString(5, field_names[11], StringPieceField);
- }
- if (hasCordField) {
- output.WriteString(6, field_names[0], CordField);
- }
- if (repeatedPrimitiveField_.Count > 0) {
- output.WriteInt32Array(7, field_names[7], repeatedPrimitiveField_);
- }
- if (repeatedStringField_.Count > 0) {
- output.WriteStringArray(8, field_names[8], repeatedStringField_);
- }
- if (repeatedEnumField_.Count > 0) {
- output.WriteEnumArray(9, field_names[5], repeatedEnumField_);
- }
- if (repeatedMessageField_.Count > 0) {
- output.WriteMessageArray(10, field_names[6], repeatedMessageField_);
- }
- if (repeatedStringPieceField_.Count > 0) {
- output.WriteStringArray(11, field_names[9], repeatedStringPieceField_);
- }
- if (repeatedCordField_.Count > 0) {
- output.WriteStringArray(12, field_names[4], repeatedCordField_);
- }
- UnknownFields.WriteTo(output);
- }
-
- private int memoizedSerializedSize = -1;
- public override int SerializedSize {
- get {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
- return CalcSerializedSize();
- }
- }
-
- private int CalcSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- if (hasPrimitiveField) {
- size += pb::CodedOutputStream.ComputeInt32Size(1, PrimitiveField);
- }
- if (hasStringField) {
- size += pb::CodedOutputStream.ComputeStringSize(2, StringField);
- }
- if (hasEnumField) {
- size += pb::CodedOutputStream.ComputeEnumSize(3, (int) EnumField);
- }
- if (hasMessageField) {
- size += pb::CodedOutputStream.ComputeMessageSize(4, MessageField);
- }
- if (hasStringPieceField) {
- size += pb::CodedOutputStream.ComputeStringSize(5, StringPieceField);
- }
- if (hasCordField) {
- size += pb::CodedOutputStream.ComputeStringSize(6, CordField);
- }
- {
- int dataSize = 0;
- foreach (int element in RepeatedPrimitiveFieldList) {
- dataSize += pb::CodedOutputStream.ComputeInt32SizeNoTag(element);
- }
- size += dataSize;
- size += 1 * repeatedPrimitiveField_.Count;
- }
- {
- int dataSize = 0;
- foreach (string element in RepeatedStringFieldList) {
- dataSize += pb::CodedOutputStream.ComputeStringSizeNoTag(element);
- }
- size += dataSize;
- size += 1 * repeatedStringField_.Count;
- }
- {
- int dataSize = 0;
- if (repeatedEnumField_.Count > 0) {
- foreach (global::Google.ProtocolBuffers.TestProtos.ForeignEnum element in repeatedEnumField_) {
- dataSize += pb::CodedOutputStream.ComputeEnumSizeNoTag((int) element);
- }
- size += dataSize;
- size += 1 * repeatedEnumField_.Count;
- }
- }
- foreach (global::Google.ProtocolBuffers.TestProtos.ForeignMessage element in RepeatedMessageFieldList) {
- size += pb::CodedOutputStream.ComputeMessageSize(10, element);
- }
- {
- int dataSize = 0;
- foreach (string element in RepeatedStringPieceFieldList) {
- dataSize += pb::CodedOutputStream.ComputeStringSizeNoTag(element);
- }
- size += dataSize;
- size += 1 * repeatedStringPieceField_.Count;
- }
- {
- int dataSize = 0;
- foreach (string element in RepeatedCordFieldList) {
- dataSize += pb::CodedOutputStream.ComputeStringSizeNoTag(element);
- }
- size += dataSize;
- size += 1 * repeatedCordField_.Count;
- }
- size += UnknownFields.SerializedSize;
- memoizedSerializedSize = size;
- return size;
- }
- public static TestCamelCaseFieldNames ParseFrom(pb::ByteString data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static TestCamelCaseFieldNames ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static TestCamelCaseFieldNames ParseFrom(byte[] data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static TestCamelCaseFieldNames ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static TestCamelCaseFieldNames ParseFrom(global::System.IO.Stream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static TestCamelCaseFieldNames ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- public static TestCamelCaseFieldNames ParseDelimitedFrom(global::System.IO.Stream input) {
- return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
- }
- public static TestCamelCaseFieldNames ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
- }
- public static TestCamelCaseFieldNames ParseFrom(pb::ICodedInputStream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static TestCamelCaseFieldNames ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- private TestCamelCaseFieldNames MakeReadOnly() {
- repeatedPrimitiveField_.MakeReadOnly();
- repeatedStringField_.MakeReadOnly();
- repeatedEnumField_.MakeReadOnly();
- repeatedMessageField_.MakeReadOnly();
- repeatedStringPieceField_.MakeReadOnly();
- repeatedCordField_.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(TestCamelCaseFieldNames prototype) {
- return new Builder(prototype);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class Builder : pb::GeneratedBuilder<TestCamelCaseFieldNames, Builder> {
- protected override Builder ThisBuilder {
- get { return this; }
- }
- public Builder() {
- result = DefaultInstance;
- resultIsReadOnly = true;
- }
- internal Builder(TestCamelCaseFieldNames cloneFrom) {
- result = cloneFrom;
- resultIsReadOnly = true;
- }
-
- private bool resultIsReadOnly;
- private TestCamelCaseFieldNames result;
-
- private TestCamelCaseFieldNames PrepareBuilder() {
- if (resultIsReadOnly) {
- TestCamelCaseFieldNames original = result;
- result = new TestCamelCaseFieldNames();
- resultIsReadOnly = false;
- MergeFrom(original);
- }
- return result;
- }
-
- public override bool IsInitialized {
- get { return result.IsInitialized; }
- }
-
- protected override TestCamelCaseFieldNames 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.TestCamelCaseFieldNames.Descriptor; }
- }
-
- public override TestCamelCaseFieldNames DefaultInstanceForType {
- get { return global::Google.ProtocolBuffers.TestProtos.TestCamelCaseFieldNames.DefaultInstance; }
- }
-
- public override TestCamelCaseFieldNames BuildPartial() {
- if (resultIsReadOnly) {
- return result;
- }
- resultIsReadOnly = true;
- return result.MakeReadOnly();
- }
-
- public override Builder MergeFrom(pb::IMessage other) {
- if (other is TestCamelCaseFieldNames) {
- return MergeFrom((TestCamelCaseFieldNames) other);
- } else {
- base.MergeFrom(other);
- return this;
- }
- }
-
- public override Builder MergeFrom(TestCamelCaseFieldNames other) {
- if (other == global::Google.ProtocolBuffers.TestProtos.TestCamelCaseFieldNames.DefaultInstance) return this;
- PrepareBuilder();
- if (other.HasPrimitiveField) {
- PrimitiveField = other.PrimitiveField;
- }
- if (other.HasStringField) {
- StringField = other.StringField;
- }
- if (other.HasEnumField) {
- EnumField = other.EnumField;
- }
- if (other.HasMessageField) {
- MergeMessageField(other.MessageField);
- }
- if (other.HasStringPieceField) {
- StringPieceField = other.StringPieceField;
- }
- if (other.HasCordField) {
- CordField = other.CordField;
- }
- if (other.repeatedPrimitiveField_.Count != 0) {
- result.repeatedPrimitiveField_.Add(other.repeatedPrimitiveField_);
- }
- if (other.repeatedStringField_.Count != 0) {
- result.repeatedStringField_.Add(other.repeatedStringField_);
- }
- if (other.repeatedEnumField_.Count != 0) {
- result.repeatedEnumField_.Add(other.repeatedEnumField_);
- }
- if (other.repeatedMessageField_.Count != 0) {
- result.repeatedMessageField_.Add(other.repeatedMessageField_);
- }
- if (other.repeatedStringPieceField_.Count != 0) {
- result.repeatedStringPieceField_.Add(other.repeatedStringPieceField_);
- }
- if (other.repeatedCordField_.Count != 0) {
- result.repeatedCordField_.Add(other.repeatedCordField_);
- }
- 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(_testCamelCaseFieldNamesFieldNames, field_name, global::System.StringComparer.Ordinal);
- if(field_ordinal >= 0)
- tag = _testCamelCaseFieldNamesFieldTags[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.hasPrimitiveField = input.ReadInt32(ref result.primitiveField_);
- break;
- }
- case 18: {
- result.hasStringField = input.ReadString(ref result.stringField_);
- break;
- }
- case 24: {
- object unknown;
- if(input.ReadEnum(ref result.enumField_, out unknown)) {
- result.hasEnumField = true;
- } else if(unknown is int) {
- if (unknownFields == null) {
- unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
- }
- unknownFields.MergeVarintField(3, (ulong)(int)unknown);
- }
- break;
- }
- case 34: {
- global::Google.ProtocolBuffers.TestProtos.ForeignMessage.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.ForeignMessage.CreateBuilder();
- if (result.hasMessageField) {
- subBuilder.MergeFrom(MessageField);
- }
- input.ReadMessage(subBuilder, extensionRegistry);
- MessageField = subBuilder.BuildPartial();
- break;
- }
- case 42: {
- result.hasStringPieceField = input.ReadString(ref result.stringPieceField_);
- break;
- }
- case 50: {
- result.hasCordField = input.ReadString(ref result.cordField_);
- break;
- }
- case 58:
- case 56: {
- input.ReadInt32Array(tag, field_name, result.repeatedPrimitiveField_);
- break;
- }
- case 66: {
- input.ReadStringArray(tag, field_name, result.repeatedStringField_);
- break;
- }
- case 74:
- case 72: {
- scg::ICollection<object> unknownItems;
- input.ReadEnumArray<global::Google.ProtocolBuffers.TestProtos.ForeignEnum>(tag, field_name, result.repeatedEnumField_, out unknownItems);
- if (unknownItems != null) {
- if (unknownFields == null) {
- unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
- }
- foreach (object rawValue in unknownItems)
- if (rawValue is int)
- unknownFields.MergeVarintField(9, (ulong)(int)rawValue);
- }
- break;
- }
- case 82: {
- input.ReadMessageArray(tag, field_name, result.repeatedMessageField_, global::Google.ProtocolBuffers.TestProtos.ForeignMessage.DefaultInstance, extensionRegistry);
- break;
- }
- case 90: {
- input.ReadStringArray(tag, field_name, result.repeatedStringPieceField_);
- break;
- }
- case 98: {
- input.ReadStringArray(tag, field_name, result.repeatedCordField_);
- break;
- }
- }
- }
-
- if (unknownFields != null) {
- this.UnknownFields = unknownFields.Build();
- }
- return this;
- }
-
-
- public bool HasPrimitiveField {
- get { return result.hasPrimitiveField; }
- }
- public int PrimitiveField {
- get { return result.PrimitiveField; }
- set { SetPrimitiveField(value); }
- }
- public Builder SetPrimitiveField(int value) {
- PrepareBuilder();
- result.hasPrimitiveField = true;
- result.primitiveField_ = value;
- return this;
- }
- public Builder ClearPrimitiveField() {
- PrepareBuilder();
- result.hasPrimitiveField = false;
- result.primitiveField_ = 0;
- return this;
- }
-
- public bool HasStringField {
- get { return result.hasStringField; }
- }
- public string StringField {
- get { return result.StringField; }
- set { SetStringField(value); }
- }
- public Builder SetStringField(string value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.hasStringField = true;
- result.stringField_ = value;
- return this;
- }
- public Builder ClearStringField() {
- PrepareBuilder();
- result.hasStringField = false;
- result.stringField_ = "";
- return this;
- }
-
- public bool HasEnumField {
- get { return result.hasEnumField; }
- }
- public global::Google.ProtocolBuffers.TestProtos.ForeignEnum EnumField {
- get { return result.EnumField; }
- set { SetEnumField(value); }
- }
- public Builder SetEnumField(global::Google.ProtocolBuffers.TestProtos.ForeignEnum value) {
- PrepareBuilder();
- result.hasEnumField = true;
- result.enumField_ = value;
- return this;
- }
- public Builder ClearEnumField() {
- PrepareBuilder();
- result.hasEnumField = false;
- result.enumField_ = global::Google.ProtocolBuffers.TestProtos.ForeignEnum.FOREIGN_FOO;
- return this;
- }
-
- public bool HasMessageField {
- get { return result.hasMessageField; }
- }
- public global::Google.ProtocolBuffers.TestProtos.ForeignMessage MessageField {
- get { return result.MessageField; }
- set { SetMessageField(value); }
- }
- public Builder SetMessageField(global::Google.ProtocolBuffers.TestProtos.ForeignMessage value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.hasMessageField = true;
- result.messageField_ = value;
- return this;
- }
- public Builder SetMessageField(global::Google.ProtocolBuffers.TestProtos.ForeignMessage.Builder builderForValue) {
- pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
- PrepareBuilder();
- result.hasMessageField = true;
- result.messageField_ = builderForValue.Build();
- return this;
- }
- public Builder MergeMessageField(global::Google.ProtocolBuffers.TestProtos.ForeignMessage value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- if (result.hasMessageField &&
- result.messageField_ != global::Google.ProtocolBuffers.TestProtos.ForeignMessage.DefaultInstance) {
- result.messageField_ = global::Google.ProtocolBuffers.TestProtos.ForeignMessage.CreateBuilder(result.messageField_).MergeFrom(value).BuildPartial();
- } else {
- result.messageField_ = value;
- }
- result.hasMessageField = true;
- return this;
- }
- public Builder ClearMessageField() {
- PrepareBuilder();
- result.hasMessageField = false;
- result.messageField_ = null;
- return this;
- }
-
- public bool HasStringPieceField {
- get { return result.hasStringPieceField; }
- }
- public string StringPieceField {
- get { return result.StringPieceField; }
- set { SetStringPieceField(value); }
- }
- public Builder SetStringPieceField(string value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.hasStringPieceField = true;
- result.stringPieceField_ = value;
- return this;
- }
- public Builder ClearStringPieceField() {
- PrepareBuilder();
- result.hasStringPieceField = false;
- result.stringPieceField_ = "";
- return this;
- }
-
- public bool HasCordField {
- get { return result.hasCordField; }
- }
- public string CordField {
- get { return result.CordField; }
- set { SetCordField(value); }
- }
- public Builder SetCordField(string value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.hasCordField = true;
- result.cordField_ = value;
- return this;
- }
- public Builder ClearCordField() {
- PrepareBuilder();
- result.hasCordField = false;
- result.cordField_ = "";
- return this;
- }
-
- public pbc::IPopsicleList<int> RepeatedPrimitiveFieldList {
- get { return PrepareBuilder().repeatedPrimitiveField_; }
- }
- public int RepeatedPrimitiveFieldCount {
- get { return result.RepeatedPrimitiveFieldCount; }
- }
- public int GetRepeatedPrimitiveField(int index) {
- return result.GetRepeatedPrimitiveField(index);
- }
- public Builder SetRepeatedPrimitiveField(int index, int value) {
- PrepareBuilder();
- result.repeatedPrimitiveField_[index] = value;
- return this;
- }
- public Builder AddRepeatedPrimitiveField(int value) {
- PrepareBuilder();
- result.repeatedPrimitiveField_.Add(value);
- return this;
- }
- public Builder AddRangeRepeatedPrimitiveField(scg::IEnumerable<int> values) {
- PrepareBuilder();
- result.repeatedPrimitiveField_.Add(values);
- return this;
- }
- public Builder ClearRepeatedPrimitiveField() {
- PrepareBuilder();
- result.repeatedPrimitiveField_.Clear();
- return this;
- }
-
- public pbc::IPopsicleList<string> RepeatedStringFieldList {
- get { return PrepareBuilder().repeatedStringField_; }
- }
- public int RepeatedStringFieldCount {
- get { return result.RepeatedStringFieldCount; }
- }
- public string GetRepeatedStringField(int index) {
- return result.GetRepeatedStringField(index);
- }
- public Builder SetRepeatedStringField(int index, string value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.repeatedStringField_[index] = value;
- return this;
- }
- public Builder AddRepeatedStringField(string value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.repeatedStringField_.Add(value);
- return this;
- }
- public Builder AddRangeRepeatedStringField(scg::IEnumerable<string> values) {
- PrepareBuilder();
- result.repeatedStringField_.Add(values);
- return this;
- }
- public Builder ClearRepeatedStringField() {
- PrepareBuilder();
- result.repeatedStringField_.Clear();
- return this;
- }
-
- public pbc::IPopsicleList<global::Google.ProtocolBuffers.TestProtos.ForeignEnum> RepeatedEnumFieldList {
- get { return PrepareBuilder().repeatedEnumField_; }
- }
- public int RepeatedEnumFieldCount {
- get { return result.RepeatedEnumFieldCount; }
- }
- public global::Google.ProtocolBuffers.TestProtos.ForeignEnum GetRepeatedEnumField(int index) {
- return result.GetRepeatedEnumField(index);
- }
- public Builder SetRepeatedEnumField(int index, global::Google.ProtocolBuffers.TestProtos.ForeignEnum value) {
- PrepareBuilder();
- result.repeatedEnumField_[index] = value;
- return this;
- }
- public Builder AddRepeatedEnumField(global::Google.ProtocolBuffers.TestProtos.ForeignEnum value) {
- PrepareBuilder();
- result.repeatedEnumField_.Add(value);
- return this;
- }
- public Builder AddRangeRepeatedEnumField(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.ForeignEnum> values) {
- PrepareBuilder();
- result.repeatedEnumField_.Add(values);
- return this;
- }
- public Builder ClearRepeatedEnumField() {
- PrepareBuilder();
- result.repeatedEnumField_.Clear();
- return this;
- }
-
- public pbc::IPopsicleList<global::Google.ProtocolBuffers.TestProtos.ForeignMessage> RepeatedMessageFieldList {
- get { return PrepareBuilder().repeatedMessageField_; }
- }
- public int RepeatedMessageFieldCount {
- get { return result.RepeatedMessageFieldCount; }
- }
- public global::Google.ProtocolBuffers.TestProtos.ForeignMessage GetRepeatedMessageField(int index) {
- return result.GetRepeatedMessageField(index);
- }
- public Builder SetRepeatedMessageField(int index, global::Google.ProtocolBuffers.TestProtos.ForeignMessage value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.repeatedMessageField_[index] = value;
- return this;
- }
- public Builder SetRepeatedMessageField(int index, global::Google.ProtocolBuffers.TestProtos.ForeignMessage.Builder builderForValue) {
- pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
- PrepareBuilder();
- result.repeatedMessageField_[index] = builderForValue.Build();
- return this;
- }
- public Builder AddRepeatedMessageField(global::Google.ProtocolBuffers.TestProtos.ForeignMessage value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.repeatedMessageField_.Add(value);
- return this;
- }
- public Builder AddRepeatedMessageField(global::Google.ProtocolBuffers.TestProtos.ForeignMessage.Builder builderForValue) {
- pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
- PrepareBuilder();
- result.repeatedMessageField_.Add(builderForValue.Build());
- return this;
- }
- public Builder AddRangeRepeatedMessageField(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.ForeignMessage> values) {
- PrepareBuilder();
- result.repeatedMessageField_.Add(values);
- return this;
- }
- public Builder ClearRepeatedMessageField() {
- PrepareBuilder();
- result.repeatedMessageField_.Clear();
- return this;
- }
-
- public pbc::IPopsicleList<string> RepeatedStringPieceFieldList {
- get { return PrepareBuilder().repeatedStringPieceField_; }
- }
- public int RepeatedStringPieceFieldCount {
- get { return result.RepeatedStringPieceFieldCount; }
- }
- public string GetRepeatedStringPieceField(int index) {
- return result.GetRepeatedStringPieceField(index);
- }
- public Builder SetRepeatedStringPieceField(int index, string value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.repeatedStringPieceField_[index] = value;
- return this;
- }
- public Builder AddRepeatedStringPieceField(string value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.repeatedStringPieceField_.Add(value);
- return this;
- }
- public Builder AddRangeRepeatedStringPieceField(scg::IEnumerable<string> values) {
- PrepareBuilder();
- result.repeatedStringPieceField_.Add(values);
- return this;
- }
- public Builder ClearRepeatedStringPieceField() {
- PrepareBuilder();
- result.repeatedStringPieceField_.Clear();
- return this;
- }
-
- public pbc::IPopsicleList<string> RepeatedCordFieldList {
- get { return PrepareBuilder().repeatedCordField_; }
- }
- public int RepeatedCordFieldCount {
- get { return result.RepeatedCordFieldCount; }
- }
- public string GetRepeatedCordField(int index) {
- return result.GetRepeatedCordField(index);
- }
- public Builder SetRepeatedCordField(int index, string value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.repeatedCordField_[index] = value;
- return this;
- }
- public Builder AddRepeatedCordField(string value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.repeatedCordField_.Add(value);
- return this;
- }
- public Builder AddRangeRepeatedCordField(scg::IEnumerable<string> values) {
- PrepareBuilder();
- result.repeatedCordField_.Add(values);
- return this;
- }
- public Builder ClearRepeatedCordField() {
- PrepareBuilder();
- result.repeatedCordField_.Clear();
- return this;
- }
- }
- static TestCamelCaseFieldNames() {
- object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor, null);
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class TestFieldOrderings : pb::ExtendableMessage<TestFieldOrderings, TestFieldOrderings.Builder> {
- private TestFieldOrderings() { }
- private static readonly TestFieldOrderings defaultInstance = new TestFieldOrderings().MakeReadOnly();
- private static readonly string[] _testFieldOrderingsFieldNames = new string[] { "my_float", "my_int", "my_string" };
- private static readonly uint[] _testFieldOrderingsFieldTags = new uint[] { 813, 8, 90 };
- public static TestFieldOrderings DefaultInstance {
- get { return defaultInstance; }
- }
-
- public override TestFieldOrderings DefaultInstanceForType {
- get { return DefaultInstance; }
- }
-
- protected override TestFieldOrderings ThisMessage {
- get { return this; }
- }
-
- public static pbd::MessageDescriptor Descriptor {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.internal__static_protobuf_unittest_TestFieldOrderings__Descriptor; }
- }
-
- protected override pb::FieldAccess.FieldAccessorTable<TestFieldOrderings, TestFieldOrderings.Builder> InternalFieldAccessors {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.internal__static_protobuf_unittest_TestFieldOrderings__FieldAccessorTable; }
- }
-
- public const int MyStringFieldNumber = 11;
- private bool hasMyString;
- private string myString_ = "";
- public bool HasMyString {
- get { return hasMyString; }
- }
- public string MyString {
- get { return myString_; }
- }
-
- public const int MyIntFieldNumber = 1;
- private bool hasMyInt;
- private long myInt_;
- public bool HasMyInt {
- get { return hasMyInt; }
- }
- public long MyInt {
- get { return myInt_; }
- }
-
- public const int MyFloatFieldNumber = 101;
- private bool hasMyFloat;
- private float myFloat_;
- public bool HasMyFloat {
- get { return hasMyFloat; }
- }
- public float MyFloat {
- get { return myFloat_; }
- }
-
- public override bool IsInitialized {
- get {
- if (!ExtensionsAreInitialized) return false;
- return true;
- }
- }
-
- public override void WriteTo(pb::ICodedOutputStream output) {
- CalcSerializedSize();
- string[] field_names = _testFieldOrderingsFieldNames;
- pb::ExtendableMessage<TestFieldOrderings, TestFieldOrderings.Builder>.ExtensionWriter extensionWriter = CreateExtensionWriter(this);
- if (hasMyInt) {
- output.WriteInt64(1, field_names[1], MyInt);
- }
- extensionWriter.WriteUntil(11, output);
- if (hasMyString) {
- output.WriteString(11, field_names[2], MyString);
- }
- extensionWriter.WriteUntil(101, output);
- if (hasMyFloat) {
- output.WriteFloat(101, field_names[0], MyFloat);
- }
- UnknownFields.WriteTo(output);
- }
-
- private int memoizedSerializedSize = -1;
- public override int SerializedSize {
- get {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
- return CalcSerializedSize();
- }
- }
-
- private int CalcSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- if (hasMyString) {
- size += pb::CodedOutputStream.ComputeStringSize(11, MyString);
- }
- if (hasMyInt) {
- size += pb::CodedOutputStream.ComputeInt64Size(1, MyInt);
- }
- if (hasMyFloat) {
- size += pb::CodedOutputStream.ComputeFloatSize(101, MyFloat);
- }
- size += ExtensionsSerializedSize;
- size += UnknownFields.SerializedSize;
- memoizedSerializedSize = size;
- return size;
- }
- public static TestFieldOrderings ParseFrom(pb::ByteString data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static TestFieldOrderings ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static TestFieldOrderings ParseFrom(byte[] data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static TestFieldOrderings ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static TestFieldOrderings ParseFrom(global::System.IO.Stream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static TestFieldOrderings ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- public static TestFieldOrderings ParseDelimitedFrom(global::System.IO.Stream input) {
- return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
- }
- public static TestFieldOrderings ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
- }
- public static TestFieldOrderings ParseFrom(pb::ICodedInputStream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static TestFieldOrderings ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- private TestFieldOrderings 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(TestFieldOrderings prototype) {
- return new Builder(prototype);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class Builder : pb::ExtendableBuilder<TestFieldOrderings, Builder> {
- protected override Builder ThisBuilder {
- get { return this; }
- }
- public Builder() {
- result = DefaultInstance;
- resultIsReadOnly = true;
- }
- internal Builder(TestFieldOrderings cloneFrom) {
- result = cloneFrom;
- resultIsReadOnly = true;
- }
-
- private bool resultIsReadOnly;
- private TestFieldOrderings result;
-
- private TestFieldOrderings PrepareBuilder() {
- if (resultIsReadOnly) {
- TestFieldOrderings original = result;
- result = new TestFieldOrderings();
- resultIsReadOnly = false;
- MergeFrom(original);
- }
- return result;
- }
-
- public override bool IsInitialized {
- get { return result.IsInitialized; }
- }
-
- protected override TestFieldOrderings 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.TestFieldOrderings.Descriptor; }
- }
-
- public override TestFieldOrderings DefaultInstanceForType {
- get { return global::Google.ProtocolBuffers.TestProtos.TestFieldOrderings.DefaultInstance; }
- }
-
- public override TestFieldOrderings BuildPartial() {
- if (resultIsReadOnly) {
- return result;
- }
- resultIsReadOnly = true;
- return result.MakeReadOnly();
- }
-
- public override Builder MergeFrom(pb::IMessage other) {
- if (other is TestFieldOrderings) {
- return MergeFrom((TestFieldOrderings) other);
- } else {
- base.MergeFrom(other);
- return this;
- }
- }
-
- public override Builder MergeFrom(TestFieldOrderings other) {
- if (other == global::Google.ProtocolBuffers.TestProtos.TestFieldOrderings.DefaultInstance) return this;
- PrepareBuilder();
- if (other.HasMyString) {
- MyString = other.MyString;
- }
- if (other.HasMyInt) {
- MyInt = other.MyInt;
- }
- if (other.HasMyFloat) {
- MyFloat = other.MyFloat;
- }
- 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(_testFieldOrderingsFieldNames, field_name, global::System.StringComparer.Ordinal);
- if(field_ordinal >= 0)
- tag = _testFieldOrderingsFieldTags[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.hasMyInt = input.ReadInt64(ref result.myInt_);
- break;
- }
- case 90: {
- result.hasMyString = input.ReadString(ref result.myString_);
- break;
- }
- case 813: {
- result.hasMyFloat = input.ReadFloat(ref result.myFloat_);
- break;
- }
- }
- }
-
- if (unknownFields != null) {
- this.UnknownFields = unknownFields.Build();
- }
- return this;
- }
-
-
- public bool HasMyString {
- get { return result.hasMyString; }
- }
- public string MyString {
- get { return result.MyString; }
- set { SetMyString(value); }
- }
- public Builder SetMyString(string value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.hasMyString = true;
- result.myString_ = value;
- return this;
- }
- public Builder ClearMyString() {
- PrepareBuilder();
- result.hasMyString = false;
- result.myString_ = "";
- return this;
- }
-
- public bool HasMyInt {
- get { return result.hasMyInt; }
- }
- public long MyInt {
- get { return result.MyInt; }
- set { SetMyInt(value); }
- }
- public Builder SetMyInt(long value) {
- PrepareBuilder();
- result.hasMyInt = true;
- result.myInt_ = value;
- return this;
- }
- public Builder ClearMyInt() {
- PrepareBuilder();
- result.hasMyInt = false;
- result.myInt_ = 0L;
- return this;
- }
-
- public bool HasMyFloat {
- get { return result.hasMyFloat; }
- }
- public float MyFloat {
- get { return result.MyFloat; }
- set { SetMyFloat(value); }
- }
- public Builder SetMyFloat(float value) {
- PrepareBuilder();
- result.hasMyFloat = true;
- result.myFloat_ = value;
- return this;
- }
- public Builder ClearMyFloat() {
- PrepareBuilder();
- result.hasMyFloat = false;
- result.myFloat_ = 0F;
- return this;
- }
- }
- static TestFieldOrderings() {
- object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor, null);
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class TestExtremeDefaultValues : pb::GeneratedMessage<TestExtremeDefaultValues, TestExtremeDefaultValues.Builder> {
- private TestExtremeDefaultValues() { }
- private static readonly TestExtremeDefaultValues defaultInstance = new TestExtremeDefaultValues().MakeReadOnly();
- private static readonly string[] _testExtremeDefaultValuesFieldNames = new string[] { "cpp_trigraph", "escaped_bytes", "inf_double", "inf_float", "large_float", "large_uint32", "large_uint64", "nan_double", "nan_float", "neg_inf_double", "neg_inf_float", "negative_float", "negative_one_float", "one_float", "small_float", "small_int32", "small_int64", "small_negative_float", "utf8_string", "zero_float" };
- private static readonly uint[] _testExtremeDefaultValuesFieldTags = new uint[] { 162, 10, 113, 141, 101, 16, 24, 129, 157, 121, 149, 93, 85, 69, 77, 32, 40, 109, 50, 61 };
- public static TestExtremeDefaultValues DefaultInstance {
- get { return defaultInstance; }
- }
-
- public override TestExtremeDefaultValues DefaultInstanceForType {
- get { return DefaultInstance; }
- }
-
- protected override TestExtremeDefaultValues ThisMessage {
- get { return this; }
- }
-
- public static pbd::MessageDescriptor Descriptor {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.internal__static_protobuf_unittest_TestExtremeDefaultValues__Descriptor; }
- }
-
- protected override pb::FieldAccess.FieldAccessorTable<TestExtremeDefaultValues, TestExtremeDefaultValues.Builder> InternalFieldAccessors {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.internal__static_protobuf_unittest_TestExtremeDefaultValues__FieldAccessorTable; }
- }
-
- public const int EscapedBytesFieldNumber = 1;
- private bool hasEscapedBytes;
- private pb::ByteString escapedBytes_ = (pb::ByteString) global::Google.ProtocolBuffers.TestProtos.TestExtremeDefaultValues.Descriptor.Fields[0].DefaultValue;
- public bool HasEscapedBytes {
- get { return hasEscapedBytes; }
- }
- public pb::ByteString EscapedBytes {
- get { return escapedBytes_; }
- }
-
- public const int LargeUint32FieldNumber = 2;
- private bool hasLargeUint32;
- private uint largeUint32_ = 4294967295;
- public bool HasLargeUint32 {
- get { return hasLargeUint32; }
- }
- [global::System.CLSCompliant(false)]
- public uint LargeUint32 {
- get { return largeUint32_; }
- }
-
- public const int LargeUint64FieldNumber = 3;
- private bool hasLargeUint64;
- private ulong largeUint64_ = 18446744073709551615UL;
- public bool HasLargeUint64 {
- get { return hasLargeUint64; }
- }
- [global::System.CLSCompliant(false)]
- public ulong LargeUint64 {
- get { return largeUint64_; }
- }
-
- public const int SmallInt32FieldNumber = 4;
- private bool hasSmallInt32;
- private int smallInt32_ = -2147483647;
- public bool HasSmallInt32 {
- get { return hasSmallInt32; }
- }
- public int SmallInt32 {
- get { return smallInt32_; }
- }
-
- public const int SmallInt64FieldNumber = 5;
- private bool hasSmallInt64;
- private long smallInt64_ = -9223372036854775807L;
- public bool HasSmallInt64 {
- get { return hasSmallInt64; }
- }
- public long SmallInt64 {
- get { return smallInt64_; }
- }
-
- public const int Utf8StringFieldNumber = 6;
- private bool hasUtf8String;
- private string utf8String_ = (string) global::Google.ProtocolBuffers.TestProtos.TestExtremeDefaultValues.Descriptor.Fields[5].DefaultValue;
- public bool HasUtf8String {
- get { return hasUtf8String; }
- }
- public string Utf8String {
- get { return utf8String_; }
- }
-
- public const int ZeroFloatFieldNumber = 7;
- private bool hasZeroFloat;
- private float zeroFloat_;
- public bool HasZeroFloat {
- get { return hasZeroFloat; }
- }
- public float ZeroFloat {
- get { return zeroFloat_; }
- }
-
- public const int OneFloatFieldNumber = 8;
- private bool hasOneFloat;
- private float oneFloat_ = 1F;
- public bool HasOneFloat {
- get { return hasOneFloat; }
- }
- public float OneFloat {
- get { return oneFloat_; }
- }
-
- public const int SmallFloatFieldNumber = 9;
- private bool hasSmallFloat;
- private float smallFloat_ = 1.5F;
- public bool HasSmallFloat {
- get { return hasSmallFloat; }
- }
- public float SmallFloat {
- get { return smallFloat_; }
- }
-
- public const int NegativeOneFloatFieldNumber = 10;
- private bool hasNegativeOneFloat;
- private float negativeOneFloat_ = -1F;
- public bool HasNegativeOneFloat {
- get { return hasNegativeOneFloat; }
- }
- public float NegativeOneFloat {
- get { return negativeOneFloat_; }
- }
-
- public const int NegativeFloatFieldNumber = 11;
- private bool hasNegativeFloat;
- private float negativeFloat_ = -1.5F;
- public bool HasNegativeFloat {
- get { return hasNegativeFloat; }
- }
- public float NegativeFloat {
- get { return negativeFloat_; }
- }
-
- public const int LargeFloatFieldNumber = 12;
- private bool hasLargeFloat;
- private float largeFloat_ = 2E+08F;
- public bool HasLargeFloat {
- get { return hasLargeFloat; }
- }
- public float LargeFloat {
- get { return largeFloat_; }
- }
-
- public const int SmallNegativeFloatFieldNumber = 13;
- private bool hasSmallNegativeFloat;
- private float smallNegativeFloat_ = -8E-28F;
- public bool HasSmallNegativeFloat {
- get { return hasSmallNegativeFloat; }
- }
- public float SmallNegativeFloat {
- get { return smallNegativeFloat_; }
- }
-
- public const int InfDoubleFieldNumber = 14;
- private bool hasInfDouble;
- private double infDouble_ = double.PositiveInfinity;
- public bool HasInfDouble {
- get { return hasInfDouble; }
- }
- public double InfDouble {
- get { return infDouble_; }
- }
-
- public const int NegInfDoubleFieldNumber = 15;
- private bool hasNegInfDouble;
- private double negInfDouble_ = double.NegativeInfinity;
- public bool HasNegInfDouble {
- get { return hasNegInfDouble; }
- }
- public double NegInfDouble {
- get { return negInfDouble_; }
- }
-
- public const int NanDoubleFieldNumber = 16;
- private bool hasNanDouble;
- private double nanDouble_ = double.NaN;
- public bool HasNanDouble {
- get { return hasNanDouble; }
- }
- public double NanDouble {
- get { return nanDouble_; }
- }
-
- public const int InfFloatFieldNumber = 17;
- private bool hasInfFloat;
- private float infFloat_ = float.PositiveInfinity;
- public bool HasInfFloat {
- get { return hasInfFloat; }
- }
- public float InfFloat {
- get { return infFloat_; }
- }
-
- public const int NegInfFloatFieldNumber = 18;
- private bool hasNegInfFloat;
- private float negInfFloat_ = float.NegativeInfinity;
- public bool HasNegInfFloat {
- get { return hasNegInfFloat; }
- }
- public float NegInfFloat {
- get { return negInfFloat_; }
- }
-
- public const int NanFloatFieldNumber = 19;
- private bool hasNanFloat;
- private float nanFloat_ = float.NaN;
- public bool HasNanFloat {
- get { return hasNanFloat; }
- }
- public float NanFloat {
- get { return nanFloat_; }
- }
-
- public const int CppTrigraphFieldNumber = 20;
- private bool hasCppTrigraph;
- private string cppTrigraph_ = "? ? ?? ?? ??? ??/ ??-";
- public bool HasCppTrigraph {
- get { return hasCppTrigraph; }
- }
- public string CppTrigraph {
- get { return cppTrigraph_; }
- }
-
- public override bool IsInitialized {
- get {
- return true;
- }
- }
-
- public override void WriteTo(pb::ICodedOutputStream output) {
- CalcSerializedSize();
- string[] field_names = _testExtremeDefaultValuesFieldNames;
- if (hasEscapedBytes) {
- output.WriteBytes(1, field_names[1], EscapedBytes);
- }
- if (hasLargeUint32) {
- output.WriteUInt32(2, field_names[5], LargeUint32);
- }
- if (hasLargeUint64) {
- output.WriteUInt64(3, field_names[6], LargeUint64);
- }
- if (hasSmallInt32) {
- output.WriteInt32(4, field_names[15], SmallInt32);
- }
- if (hasSmallInt64) {
- output.WriteInt64(5, field_names[16], SmallInt64);
- }
- if (hasUtf8String) {
- output.WriteString(6, field_names[18], Utf8String);
- }
- if (hasZeroFloat) {
- output.WriteFloat(7, field_names[19], ZeroFloat);
- }
- if (hasOneFloat) {
- output.WriteFloat(8, field_names[13], OneFloat);
- }
- if (hasSmallFloat) {
- output.WriteFloat(9, field_names[14], SmallFloat);
- }
- if (hasNegativeOneFloat) {
- output.WriteFloat(10, field_names[12], NegativeOneFloat);
- }
- if (hasNegativeFloat) {
- output.WriteFloat(11, field_names[11], NegativeFloat);
- }
- if (hasLargeFloat) {
- output.WriteFloat(12, field_names[4], LargeFloat);
- }
- if (hasSmallNegativeFloat) {
- output.WriteFloat(13, field_names[17], SmallNegativeFloat);
- }
- if (hasInfDouble) {
- output.WriteDouble(14, field_names[2], InfDouble);
- }
- if (hasNegInfDouble) {
- output.WriteDouble(15, field_names[9], NegInfDouble);
- }
- if (hasNanDouble) {
- output.WriteDouble(16, field_names[7], NanDouble);
- }
- if (hasInfFloat) {
- output.WriteFloat(17, field_names[3], InfFloat);
- }
- if (hasNegInfFloat) {
- output.WriteFloat(18, field_names[10], NegInfFloat);
- }
- if (hasNanFloat) {
- output.WriteFloat(19, field_names[8], NanFloat);
- }
- if (hasCppTrigraph) {
- output.WriteString(20, field_names[0], CppTrigraph);
- }
- UnknownFields.WriteTo(output);
- }
-
- private int memoizedSerializedSize = -1;
- public override int SerializedSize {
- get {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
- return CalcSerializedSize();
- }
- }
-
- private int CalcSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- if (hasEscapedBytes) {
- size += pb::CodedOutputStream.ComputeBytesSize(1, EscapedBytes);
- }
- if (hasLargeUint32) {
- size += pb::CodedOutputStream.ComputeUInt32Size(2, LargeUint32);
- }
- if (hasLargeUint64) {
- size += pb::CodedOutputStream.ComputeUInt64Size(3, LargeUint64);
- }
- if (hasSmallInt32) {
- size += pb::CodedOutputStream.ComputeInt32Size(4, SmallInt32);
- }
- if (hasSmallInt64) {
- size += pb::CodedOutputStream.ComputeInt64Size(5, SmallInt64);
- }
- if (hasUtf8String) {
- size += pb::CodedOutputStream.ComputeStringSize(6, Utf8String);
- }
- if (hasZeroFloat) {
- size += pb::CodedOutputStream.ComputeFloatSize(7, ZeroFloat);
- }
- if (hasOneFloat) {
- size += pb::CodedOutputStream.ComputeFloatSize(8, OneFloat);
- }
- if (hasSmallFloat) {
- size += pb::CodedOutputStream.ComputeFloatSize(9, SmallFloat);
- }
- if (hasNegativeOneFloat) {
- size += pb::CodedOutputStream.ComputeFloatSize(10, NegativeOneFloat);
- }
- if (hasNegativeFloat) {
- size += pb::CodedOutputStream.ComputeFloatSize(11, NegativeFloat);
- }
- if (hasLargeFloat) {
- size += pb::CodedOutputStream.ComputeFloatSize(12, LargeFloat);
- }
- if (hasSmallNegativeFloat) {
- size += pb::CodedOutputStream.ComputeFloatSize(13, SmallNegativeFloat);
- }
- if (hasInfDouble) {
- size += pb::CodedOutputStream.ComputeDoubleSize(14, InfDouble);
- }
- if (hasNegInfDouble) {
- size += pb::CodedOutputStream.ComputeDoubleSize(15, NegInfDouble);
- }
- if (hasNanDouble) {
- size += pb::CodedOutputStream.ComputeDoubleSize(16, NanDouble);
- }
- if (hasInfFloat) {
- size += pb::CodedOutputStream.ComputeFloatSize(17, InfFloat);
- }
- if (hasNegInfFloat) {
- size += pb::CodedOutputStream.ComputeFloatSize(18, NegInfFloat);
- }
- if (hasNanFloat) {
- size += pb::CodedOutputStream.ComputeFloatSize(19, NanFloat);
- }
- if (hasCppTrigraph) {
- size += pb::CodedOutputStream.ComputeStringSize(20, CppTrigraph);
- }
- size += UnknownFields.SerializedSize;
- memoizedSerializedSize = size;
- return size;
- }
- public static TestExtremeDefaultValues ParseFrom(pb::ByteString data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static TestExtremeDefaultValues ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static TestExtremeDefaultValues ParseFrom(byte[] data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static TestExtremeDefaultValues ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static TestExtremeDefaultValues ParseFrom(global::System.IO.Stream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static TestExtremeDefaultValues ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- public static TestExtremeDefaultValues ParseDelimitedFrom(global::System.IO.Stream input) {
- return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
- }
- public static TestExtremeDefaultValues ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
- }
- public static TestExtremeDefaultValues ParseFrom(pb::ICodedInputStream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static TestExtremeDefaultValues ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- private TestExtremeDefaultValues 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(TestExtremeDefaultValues prototype) {
- return new Builder(prototype);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class Builder : pb::GeneratedBuilder<TestExtremeDefaultValues, Builder> {
- protected override Builder ThisBuilder {
- get { return this; }
- }
- public Builder() {
- result = DefaultInstance;
- resultIsReadOnly = true;
- }
- internal Builder(TestExtremeDefaultValues cloneFrom) {
- result = cloneFrom;
- resultIsReadOnly = true;
- }
-
- private bool resultIsReadOnly;
- private TestExtremeDefaultValues result;
-
- private TestExtremeDefaultValues PrepareBuilder() {
- if (resultIsReadOnly) {
- TestExtremeDefaultValues original = result;
- result = new TestExtremeDefaultValues();
- resultIsReadOnly = false;
- MergeFrom(original);
- }
- return result;
- }
-
- public override bool IsInitialized {
- get { return result.IsInitialized; }
- }
-
- protected override TestExtremeDefaultValues 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.TestExtremeDefaultValues.Descriptor; }
- }
-
- public override TestExtremeDefaultValues DefaultInstanceForType {
- get { return global::Google.ProtocolBuffers.TestProtos.TestExtremeDefaultValues.DefaultInstance; }
- }
-
- public override TestExtremeDefaultValues BuildPartial() {
- if (resultIsReadOnly) {
- return result;
- }
- resultIsReadOnly = true;
- return result.MakeReadOnly();
- }
-
- public override Builder MergeFrom(pb::IMessage other) {
- if (other is TestExtremeDefaultValues) {
- return MergeFrom((TestExtremeDefaultValues) other);
- } else {
- base.MergeFrom(other);
- return this;
- }
- }
-
- public override Builder MergeFrom(TestExtremeDefaultValues other) {
- if (other == global::Google.ProtocolBuffers.TestProtos.TestExtremeDefaultValues.DefaultInstance) return this;
- PrepareBuilder();
- if (other.HasEscapedBytes) {
- EscapedBytes = other.EscapedBytes;
- }
- if (other.HasLargeUint32) {
- LargeUint32 = other.LargeUint32;
- }
- if (other.HasLargeUint64) {
- LargeUint64 = other.LargeUint64;
- }
- if (other.HasSmallInt32) {
- SmallInt32 = other.SmallInt32;
- }
- if (other.HasSmallInt64) {
- SmallInt64 = other.SmallInt64;
- }
- if (other.HasUtf8String) {
- Utf8String = other.Utf8String;
- }
- if (other.HasZeroFloat) {
- ZeroFloat = other.ZeroFloat;
- }
- if (other.HasOneFloat) {
- OneFloat = other.OneFloat;
- }
- if (other.HasSmallFloat) {
- SmallFloat = other.SmallFloat;
- }
- if (other.HasNegativeOneFloat) {
- NegativeOneFloat = other.NegativeOneFloat;
- }
- if (other.HasNegativeFloat) {
- NegativeFloat = other.NegativeFloat;
- }
- if (other.HasLargeFloat) {
- LargeFloat = other.LargeFloat;
- }
- if (other.HasSmallNegativeFloat) {
- SmallNegativeFloat = other.SmallNegativeFloat;
- }
- if (other.HasInfDouble) {
- InfDouble = other.InfDouble;
- }
- if (other.HasNegInfDouble) {
- NegInfDouble = other.NegInfDouble;
- }
- if (other.HasNanDouble) {
- NanDouble = other.NanDouble;
- }
- if (other.HasInfFloat) {
- InfFloat = other.InfFloat;
- }
- if (other.HasNegInfFloat) {
- NegInfFloat = other.NegInfFloat;
- }
- if (other.HasNanFloat) {
- NanFloat = other.NanFloat;
- }
- if (other.HasCppTrigraph) {
- CppTrigraph = other.CppTrigraph;
- }
- 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(_testExtremeDefaultValuesFieldNames, field_name, global::System.StringComparer.Ordinal);
- if(field_ordinal >= 0)
- tag = _testExtremeDefaultValuesFieldTags[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.hasEscapedBytes = input.ReadBytes(ref result.escapedBytes_);
- break;
- }
- case 16: {
- result.hasLargeUint32 = input.ReadUInt32(ref result.largeUint32_);
- break;
- }
- case 24: {
- result.hasLargeUint64 = input.ReadUInt64(ref result.largeUint64_);
- break;
- }
- case 32: {
- result.hasSmallInt32 = input.ReadInt32(ref result.smallInt32_);
- break;
- }
- case 40: {
- result.hasSmallInt64 = input.ReadInt64(ref result.smallInt64_);
- break;
- }
- case 50: {
- result.hasUtf8String = input.ReadString(ref result.utf8String_);
- break;
- }
- case 61: {
- result.hasZeroFloat = input.ReadFloat(ref result.zeroFloat_);
- break;
- }
- case 69: {
- result.hasOneFloat = input.ReadFloat(ref result.oneFloat_);
- break;
- }
- case 77: {
- result.hasSmallFloat = input.ReadFloat(ref result.smallFloat_);
- break;
- }
- case 85: {
- result.hasNegativeOneFloat = input.ReadFloat(ref result.negativeOneFloat_);
- break;
- }
- case 93: {
- result.hasNegativeFloat = input.ReadFloat(ref result.negativeFloat_);
- break;
- }
- case 101: {
- result.hasLargeFloat = input.ReadFloat(ref result.largeFloat_);
- break;
- }
- case 109: {
- result.hasSmallNegativeFloat = input.ReadFloat(ref result.smallNegativeFloat_);
- break;
- }
- case 113: {
- result.hasInfDouble = input.ReadDouble(ref result.infDouble_);
- break;
- }
- case 121: {
- result.hasNegInfDouble = input.ReadDouble(ref result.negInfDouble_);
- break;
- }
- case 129: {
- result.hasNanDouble = input.ReadDouble(ref result.nanDouble_);
- break;
- }
- case 141: {
- result.hasInfFloat = input.ReadFloat(ref result.infFloat_);
- break;
- }
- case 149: {
- result.hasNegInfFloat = input.ReadFloat(ref result.negInfFloat_);
- break;
- }
- case 157: {
- result.hasNanFloat = input.ReadFloat(ref result.nanFloat_);
- break;
- }
- case 162: {
- result.hasCppTrigraph = input.ReadString(ref result.cppTrigraph_);
- break;
- }
- }
- }
-
- if (unknownFields != null) {
- this.UnknownFields = unknownFields.Build();
- }
- return this;
- }
-
-
- public bool HasEscapedBytes {
- get { return result.hasEscapedBytes; }
- }
- public pb::ByteString EscapedBytes {
- get { return result.EscapedBytes; }
- set { SetEscapedBytes(value); }
- }
- public Builder SetEscapedBytes(pb::ByteString value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.hasEscapedBytes = true;
- result.escapedBytes_ = value;
- return this;
- }
- public Builder ClearEscapedBytes() {
- PrepareBuilder();
- result.hasEscapedBytes = false;
- result.escapedBytes_ = (pb::ByteString) global::Google.ProtocolBuffers.TestProtos.TestExtremeDefaultValues.Descriptor.Fields[0].DefaultValue;
- return this;
- }
-
- public bool HasLargeUint32 {
- get { return result.hasLargeUint32; }
- }
- [global::System.CLSCompliant(false)]
- public uint LargeUint32 {
- get { return result.LargeUint32; }
- set { SetLargeUint32(value); }
- }
- [global::System.CLSCompliant(false)]
- public Builder SetLargeUint32(uint value) {
- PrepareBuilder();
- result.hasLargeUint32 = true;
- result.largeUint32_ = value;
- return this;
- }
- public Builder ClearLargeUint32() {
- PrepareBuilder();
- result.hasLargeUint32 = false;
- result.largeUint32_ = 4294967295;
- return this;
- }
-
- public bool HasLargeUint64 {
- get { return result.hasLargeUint64; }
- }
- [global::System.CLSCompliant(false)]
- public ulong LargeUint64 {
- get { return result.LargeUint64; }
- set { SetLargeUint64(value); }
- }
- [global::System.CLSCompliant(false)]
- public Builder SetLargeUint64(ulong value) {
- PrepareBuilder();
- result.hasLargeUint64 = true;
- result.largeUint64_ = value;
- return this;
- }
- public Builder ClearLargeUint64() {
- PrepareBuilder();
- result.hasLargeUint64 = false;
- result.largeUint64_ = 18446744073709551615UL;
- return this;
- }
-
- public bool HasSmallInt32 {
- get { return result.hasSmallInt32; }
- }
- public int SmallInt32 {
- get { return result.SmallInt32; }
- set { SetSmallInt32(value); }
- }
- public Builder SetSmallInt32(int value) {
- PrepareBuilder();
- result.hasSmallInt32 = true;
- result.smallInt32_ = value;
- return this;
- }
- public Builder ClearSmallInt32() {
- PrepareBuilder();
- result.hasSmallInt32 = false;
- result.smallInt32_ = -2147483647;
- return this;
- }
-
- public bool HasSmallInt64 {
- get { return result.hasSmallInt64; }
- }
- public long SmallInt64 {
- get { return result.SmallInt64; }
- set { SetSmallInt64(value); }
- }
- public Builder SetSmallInt64(long value) {
- PrepareBuilder();
- result.hasSmallInt64 = true;
- result.smallInt64_ = value;
- return this;
- }
- public Builder ClearSmallInt64() {
- PrepareBuilder();
- result.hasSmallInt64 = false;
- result.smallInt64_ = -9223372036854775807L;
- return this;
- }
-
- public bool HasUtf8String {
- get { return result.hasUtf8String; }
- }
- public string Utf8String {
- get { return result.Utf8String; }
- set { SetUtf8String(value); }
- }
- public Builder SetUtf8String(string value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.hasUtf8String = true;
- result.utf8String_ = value;
- return this;
- }
- public Builder ClearUtf8String() {
- PrepareBuilder();
- result.hasUtf8String = false;
- result.utf8String_ = (string) global::Google.ProtocolBuffers.TestProtos.TestExtremeDefaultValues.Descriptor.Fields[5].DefaultValue;
- return this;
- }
-
- public bool HasZeroFloat {
- get { return result.hasZeroFloat; }
- }
- public float ZeroFloat {
- get { return result.ZeroFloat; }
- set { SetZeroFloat(value); }
- }
- public Builder SetZeroFloat(float value) {
- PrepareBuilder();
- result.hasZeroFloat = true;
- result.zeroFloat_ = value;
- return this;
- }
- public Builder ClearZeroFloat() {
- PrepareBuilder();
- result.hasZeroFloat = false;
- result.zeroFloat_ = 0F;
- return this;
- }
-
- public bool HasOneFloat {
- get { return result.hasOneFloat; }
- }
- public float OneFloat {
- get { return result.OneFloat; }
- set { SetOneFloat(value); }
- }
- public Builder SetOneFloat(float value) {
- PrepareBuilder();
- result.hasOneFloat = true;
- result.oneFloat_ = value;
- return this;
- }
- public Builder ClearOneFloat() {
- PrepareBuilder();
- result.hasOneFloat = false;
- result.oneFloat_ = 1F;
- return this;
- }
-
- public bool HasSmallFloat {
- get { return result.hasSmallFloat; }
- }
- public float SmallFloat {
- get { return result.SmallFloat; }
- set { SetSmallFloat(value); }
- }
- public Builder SetSmallFloat(float value) {
- PrepareBuilder();
- result.hasSmallFloat = true;
- result.smallFloat_ = value;
- return this;
- }
- public Builder ClearSmallFloat() {
- PrepareBuilder();
- result.hasSmallFloat = false;
- result.smallFloat_ = 1.5F;
- return this;
- }
-
- public bool HasNegativeOneFloat {
- get { return result.hasNegativeOneFloat; }
- }
- public float NegativeOneFloat {
- get { return result.NegativeOneFloat; }
- set { SetNegativeOneFloat(value); }
- }
- public Builder SetNegativeOneFloat(float value) {
- PrepareBuilder();
- result.hasNegativeOneFloat = true;
- result.negativeOneFloat_ = value;
- return this;
- }
- public Builder ClearNegativeOneFloat() {
- PrepareBuilder();
- result.hasNegativeOneFloat = false;
- result.negativeOneFloat_ = -1F;
- return this;
- }
-
- public bool HasNegativeFloat {
- get { return result.hasNegativeFloat; }
- }
- public float NegativeFloat {
- get { return result.NegativeFloat; }
- set { SetNegativeFloat(value); }
- }
- public Builder SetNegativeFloat(float value) {
- PrepareBuilder();
- result.hasNegativeFloat = true;
- result.negativeFloat_ = value;
- return this;
- }
- public Builder ClearNegativeFloat() {
- PrepareBuilder();
- result.hasNegativeFloat = false;
- result.negativeFloat_ = -1.5F;
- return this;
- }
-
- public bool HasLargeFloat {
- get { return result.hasLargeFloat; }
- }
- public float LargeFloat {
- get { return result.LargeFloat; }
- set { SetLargeFloat(value); }
- }
- public Builder SetLargeFloat(float value) {
- PrepareBuilder();
- result.hasLargeFloat = true;
- result.largeFloat_ = value;
- return this;
- }
- public Builder ClearLargeFloat() {
- PrepareBuilder();
- result.hasLargeFloat = false;
- result.largeFloat_ = 2E+08F;
- return this;
- }
-
- public bool HasSmallNegativeFloat {
- get { return result.hasSmallNegativeFloat; }
- }
- public float SmallNegativeFloat {
- get { return result.SmallNegativeFloat; }
- set { SetSmallNegativeFloat(value); }
- }
- public Builder SetSmallNegativeFloat(float value) {
- PrepareBuilder();
- result.hasSmallNegativeFloat = true;
- result.smallNegativeFloat_ = value;
- return this;
- }
- public Builder ClearSmallNegativeFloat() {
- PrepareBuilder();
- result.hasSmallNegativeFloat = false;
- result.smallNegativeFloat_ = -8E-28F;
- return this;
- }
-
- public bool HasInfDouble {
- get { return result.hasInfDouble; }
- }
- public double InfDouble {
- get { return result.InfDouble; }
- set { SetInfDouble(value); }
- }
- public Builder SetInfDouble(double value) {
- PrepareBuilder();
- result.hasInfDouble = true;
- result.infDouble_ = value;
- return this;
- }
- public Builder ClearInfDouble() {
- PrepareBuilder();
- result.hasInfDouble = false;
- result.infDouble_ = double.PositiveInfinity;
- return this;
- }
-
- public bool HasNegInfDouble {
- get { return result.hasNegInfDouble; }
- }
- public double NegInfDouble {
- get { return result.NegInfDouble; }
- set { SetNegInfDouble(value); }
- }
- public Builder SetNegInfDouble(double value) {
- PrepareBuilder();
- result.hasNegInfDouble = true;
- result.negInfDouble_ = value;
- return this;
- }
- public Builder ClearNegInfDouble() {
- PrepareBuilder();
- result.hasNegInfDouble = false;
- result.negInfDouble_ = double.NegativeInfinity;
- return this;
- }
-
- public bool HasNanDouble {
- get { return result.hasNanDouble; }
- }
- public double NanDouble {
- get { return result.NanDouble; }
- set { SetNanDouble(value); }
- }
- public Builder SetNanDouble(double value) {
- PrepareBuilder();
- result.hasNanDouble = true;
- result.nanDouble_ = value;
- return this;
- }
- public Builder ClearNanDouble() {
- PrepareBuilder();
- result.hasNanDouble = false;
- result.nanDouble_ = double.NaN;
- return this;
- }
-
- public bool HasInfFloat {
- get { return result.hasInfFloat; }
- }
- public float InfFloat {
- get { return result.InfFloat; }
- set { SetInfFloat(value); }
- }
- public Builder SetInfFloat(float value) {
- PrepareBuilder();
- result.hasInfFloat = true;
- result.infFloat_ = value;
- return this;
- }
- public Builder ClearInfFloat() {
- PrepareBuilder();
- result.hasInfFloat = false;
- result.infFloat_ = float.PositiveInfinity;
- return this;
- }
-
- public bool HasNegInfFloat {
- get { return result.hasNegInfFloat; }
- }
- public float NegInfFloat {
- get { return result.NegInfFloat; }
- set { SetNegInfFloat(value); }
- }
- public Builder SetNegInfFloat(float value) {
- PrepareBuilder();
- result.hasNegInfFloat = true;
- result.negInfFloat_ = value;
- return this;
- }
- public Builder ClearNegInfFloat() {
- PrepareBuilder();
- result.hasNegInfFloat = false;
- result.negInfFloat_ = float.NegativeInfinity;
- return this;
- }
-
- public bool HasNanFloat {
- get { return result.hasNanFloat; }
- }
- public float NanFloat {
- get { return result.NanFloat; }
- set { SetNanFloat(value); }
- }
- public Builder SetNanFloat(float value) {
- PrepareBuilder();
- result.hasNanFloat = true;
- result.nanFloat_ = value;
- return this;
- }
- public Builder ClearNanFloat() {
- PrepareBuilder();
- result.hasNanFloat = false;
- result.nanFloat_ = float.NaN;
- return this;
- }
-
- public bool HasCppTrigraph {
- get { return result.hasCppTrigraph; }
- }
- public string CppTrigraph {
- get { return result.CppTrigraph; }
- set { SetCppTrigraph(value); }
- }
- public Builder SetCppTrigraph(string value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.hasCppTrigraph = true;
- result.cppTrigraph_ = value;
- return this;
- }
- public Builder ClearCppTrigraph() {
- PrepareBuilder();
- result.hasCppTrigraph = false;
- result.cppTrigraph_ = "? ? ?? ?? ??? ??/ ??-";
- return this;
- }
- }
- static TestExtremeDefaultValues() {
- object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor, null);
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class SparseEnumMessage : pb::GeneratedMessage<SparseEnumMessage, SparseEnumMessage.Builder> {
- private SparseEnumMessage() { }
- private static readonly SparseEnumMessage defaultInstance = new SparseEnumMessage().MakeReadOnly();
- private static readonly string[] _sparseEnumMessageFieldNames = new string[] { "sparse_enum" };
- private static readonly uint[] _sparseEnumMessageFieldTags = new uint[] { 8 };
- public static SparseEnumMessage DefaultInstance {
- get { return defaultInstance; }
- }
-
- public override SparseEnumMessage DefaultInstanceForType {
- get { return DefaultInstance; }
- }
-
- protected override SparseEnumMessage ThisMessage {
- get { return this; }
- }
-
- public static pbd::MessageDescriptor Descriptor {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.internal__static_protobuf_unittest_SparseEnumMessage__Descriptor; }
- }
-
- protected override pb::FieldAccess.FieldAccessorTable<SparseEnumMessage, SparseEnumMessage.Builder> InternalFieldAccessors {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.internal__static_protobuf_unittest_SparseEnumMessage__FieldAccessorTable; }
- }
-
- public const int SparseEnumFieldNumber = 1;
- private bool hasSparseEnum;
- private global::Google.ProtocolBuffers.TestProtos.TestSparseEnum sparseEnum_ = global::Google.ProtocolBuffers.TestProtos.TestSparseEnum.SPARSE_A;
- public bool HasSparseEnum {
- get { return hasSparseEnum; }
- }
- public global::Google.ProtocolBuffers.TestProtos.TestSparseEnum SparseEnum {
- get { return sparseEnum_; }
- }
-
- public override bool IsInitialized {
- get {
- return true;
- }
- }
-
- public override void WriteTo(pb::ICodedOutputStream output) {
- CalcSerializedSize();
- string[] field_names = _sparseEnumMessageFieldNames;
- if (hasSparseEnum) {
- output.WriteEnum(1, field_names[0], (int) SparseEnum, SparseEnum);
- }
- UnknownFields.WriteTo(output);
- }
-
- private int memoizedSerializedSize = -1;
- public override int SerializedSize {
- get {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
- return CalcSerializedSize();
- }
- }
-
- private int CalcSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- if (hasSparseEnum) {
- size += pb::CodedOutputStream.ComputeEnumSize(1, (int) SparseEnum);
- }
- size += UnknownFields.SerializedSize;
- memoizedSerializedSize = size;
- return size;
- }
- public static SparseEnumMessage ParseFrom(pb::ByteString data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static SparseEnumMessage ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static SparseEnumMessage ParseFrom(byte[] data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static SparseEnumMessage ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static SparseEnumMessage ParseFrom(global::System.IO.Stream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static SparseEnumMessage ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- public static SparseEnumMessage ParseDelimitedFrom(global::System.IO.Stream input) {
- return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
- }
- public static SparseEnumMessage ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
- }
- public static SparseEnumMessage ParseFrom(pb::ICodedInputStream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static SparseEnumMessage ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- private SparseEnumMessage 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(SparseEnumMessage prototype) {
- return new Builder(prototype);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class Builder : pb::GeneratedBuilder<SparseEnumMessage, Builder> {
- protected override Builder ThisBuilder {
- get { return this; }
- }
- public Builder() {
- result = DefaultInstance;
- resultIsReadOnly = true;
- }
- internal Builder(SparseEnumMessage cloneFrom) {
- result = cloneFrom;
- resultIsReadOnly = true;
- }
-
- private bool resultIsReadOnly;
- private SparseEnumMessage result;
-
- private SparseEnumMessage PrepareBuilder() {
- if (resultIsReadOnly) {
- SparseEnumMessage original = result;
- result = new SparseEnumMessage();
- resultIsReadOnly = false;
- MergeFrom(original);
- }
- return result;
- }
-
- public override bool IsInitialized {
- get { return result.IsInitialized; }
- }
-
- protected override SparseEnumMessage 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.SparseEnumMessage.Descriptor; }
- }
-
- public override SparseEnumMessage DefaultInstanceForType {
- get { return global::Google.ProtocolBuffers.TestProtos.SparseEnumMessage.DefaultInstance; }
- }
-
- public override SparseEnumMessage BuildPartial() {
- if (resultIsReadOnly) {
- return result;
- }
- resultIsReadOnly = true;
- return result.MakeReadOnly();
- }
-
- public override Builder MergeFrom(pb::IMessage other) {
- if (other is SparseEnumMessage) {
- return MergeFrom((SparseEnumMessage) other);
- } else {
- base.MergeFrom(other);
- return this;
- }
- }
-
- public override Builder MergeFrom(SparseEnumMessage other) {
- if (other == global::Google.ProtocolBuffers.TestProtos.SparseEnumMessage.DefaultInstance) return this;
- PrepareBuilder();
- if (other.HasSparseEnum) {
- SparseEnum = other.SparseEnum;
- }
- 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(_sparseEnumMessageFieldNames, field_name, global::System.StringComparer.Ordinal);
- if(field_ordinal >= 0)
- tag = _sparseEnumMessageFieldTags[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: {
- object unknown;
- if(input.ReadEnum(ref result.sparseEnum_, out unknown)) {
- result.hasSparseEnum = true;
- } else if(unknown is int) {
- if (unknownFields == null) {
- unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
- }
- unknownFields.MergeVarintField(1, (ulong)(int)unknown);
- }
- break;
- }
- }
- }
-
- if (unknownFields != null) {
- this.UnknownFields = unknownFields.Build();
- }
- return this;
- }
-
-
- public bool HasSparseEnum {
- get { return result.hasSparseEnum; }
- }
- public global::Google.ProtocolBuffers.TestProtos.TestSparseEnum SparseEnum {
- get { return result.SparseEnum; }
- set { SetSparseEnum(value); }
- }
- public Builder SetSparseEnum(global::Google.ProtocolBuffers.TestProtos.TestSparseEnum value) {
- PrepareBuilder();
- result.hasSparseEnum = true;
- result.sparseEnum_ = value;
- return this;
- }
- public Builder ClearSparseEnum() {
- PrepareBuilder();
- result.hasSparseEnum = false;
- result.sparseEnum_ = global::Google.ProtocolBuffers.TestProtos.TestSparseEnum.SPARSE_A;
- return this;
- }
- }
- static SparseEnumMessage() {
- object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor, null);
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class OneString : pb::GeneratedMessage<OneString, OneString.Builder> {
- private OneString() { }
- private static readonly OneString defaultInstance = new OneString().MakeReadOnly();
- private static readonly string[] _oneStringFieldNames = new string[] { "data" };
- private static readonly uint[] _oneStringFieldTags = new uint[] { 10 };
- public static OneString DefaultInstance {
- get { return defaultInstance; }
- }
-
- public override OneString DefaultInstanceForType {
- get { return DefaultInstance; }
- }
-
- protected override OneString ThisMessage {
- get { return this; }
- }
-
- public static pbd::MessageDescriptor Descriptor {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.internal__static_protobuf_unittest_OneString__Descriptor; }
- }
-
- protected override pb::FieldAccess.FieldAccessorTable<OneString, OneString.Builder> InternalFieldAccessors {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.internal__static_protobuf_unittest_OneString__FieldAccessorTable; }
- }
-
- public const int DataFieldNumber = 1;
- private bool hasData;
- private string data_ = "";
- public bool HasData {
- get { return hasData; }
- }
- public string Data {
- get { return data_; }
- }
-
- public override bool IsInitialized {
- get {
- return true;
- }
- }
-
- public override void WriteTo(pb::ICodedOutputStream output) {
- CalcSerializedSize();
- string[] field_names = _oneStringFieldNames;
- if (hasData) {
- output.WriteString(1, field_names[0], Data);
- }
- UnknownFields.WriteTo(output);
- }
-
- private int memoizedSerializedSize = -1;
- public override int SerializedSize {
- get {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
- return CalcSerializedSize();
- }
- }
-
- private int CalcSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- if (hasData) {
- size += pb::CodedOutputStream.ComputeStringSize(1, Data);
- }
- size += UnknownFields.SerializedSize;
- memoizedSerializedSize = size;
- return size;
- }
- public static OneString ParseFrom(pb::ByteString data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static OneString ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static OneString ParseFrom(byte[] data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static OneString ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static OneString ParseFrom(global::System.IO.Stream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static OneString ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- public static OneString ParseDelimitedFrom(global::System.IO.Stream input) {
- return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
- }
- public static OneString ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
- }
- public static OneString ParseFrom(pb::ICodedInputStream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static OneString ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- private OneString 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(OneString prototype) {
- return new Builder(prototype);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class Builder : pb::GeneratedBuilder<OneString, Builder> {
- protected override Builder ThisBuilder {
- get { return this; }
- }
- public Builder() {
- result = DefaultInstance;
- resultIsReadOnly = true;
- }
- internal Builder(OneString cloneFrom) {
- result = cloneFrom;
- resultIsReadOnly = true;
- }
-
- private bool resultIsReadOnly;
- private OneString result;
-
- private OneString PrepareBuilder() {
- if (resultIsReadOnly) {
- OneString original = result;
- result = new OneString();
- resultIsReadOnly = false;
- MergeFrom(original);
- }
- return result;
- }
-
- public override bool IsInitialized {
- get { return result.IsInitialized; }
- }
-
- protected override OneString 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.OneString.Descriptor; }
- }
-
- public override OneString DefaultInstanceForType {
- get { return global::Google.ProtocolBuffers.TestProtos.OneString.DefaultInstance; }
- }
-
- public override OneString BuildPartial() {
- if (resultIsReadOnly) {
- return result;
- }
- resultIsReadOnly = true;
- return result.MakeReadOnly();
- }
-
- public override Builder MergeFrom(pb::IMessage other) {
- if (other is OneString) {
- return MergeFrom((OneString) other);
- } else {
- base.MergeFrom(other);
- return this;
- }
- }
-
- public override Builder MergeFrom(OneString other) {
- if (other == global::Google.ProtocolBuffers.TestProtos.OneString.DefaultInstance) return this;
- PrepareBuilder();
- if (other.HasData) {
- Data = other.Data;
- }
- 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(_oneStringFieldNames, field_name, global::System.StringComparer.Ordinal);
- if(field_ordinal >= 0)
- tag = _oneStringFieldTags[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.hasData = input.ReadString(ref result.data_);
- break;
- }
- }
- }
-
- if (unknownFields != null) {
- this.UnknownFields = unknownFields.Build();
- }
- return this;
- }
-
-
- public bool HasData {
- get { return result.hasData; }
- }
- public string Data {
- get { return result.Data; }
- set { SetData(value); }
- }
- public Builder SetData(string value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.hasData = true;
- result.data_ = value;
- return this;
- }
- public Builder ClearData() {
- PrepareBuilder();
- result.hasData = false;
- result.data_ = "";
- return this;
- }
- }
- static OneString() {
- object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor, null);
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class OneBytes : pb::GeneratedMessage<OneBytes, OneBytes.Builder> {
- private OneBytes() { }
- private static readonly OneBytes defaultInstance = new OneBytes().MakeReadOnly();
- private static readonly string[] _oneBytesFieldNames = new string[] { "data" };
- private static readonly uint[] _oneBytesFieldTags = new uint[] { 10 };
- public static OneBytes DefaultInstance {
- get { return defaultInstance; }
- }
-
- public override OneBytes DefaultInstanceForType {
- get { return DefaultInstance; }
- }
-
- protected override OneBytes ThisMessage {
- get { return this; }
- }
-
- public static pbd::MessageDescriptor Descriptor {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.internal__static_protobuf_unittest_OneBytes__Descriptor; }
- }
-
- protected override pb::FieldAccess.FieldAccessorTable<OneBytes, OneBytes.Builder> InternalFieldAccessors {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.internal__static_protobuf_unittest_OneBytes__FieldAccessorTable; }
- }
-
- public const int DataFieldNumber = 1;
- private bool hasData;
- private pb::ByteString data_ = pb::ByteString.Empty;
- public bool HasData {
- get { return hasData; }
- }
- public pb::ByteString Data {
- get { return data_; }
- }
-
- public override bool IsInitialized {
- get {
- return true;
- }
- }
-
- public override void WriteTo(pb::ICodedOutputStream output) {
- CalcSerializedSize();
- string[] field_names = _oneBytesFieldNames;
- if (hasData) {
- output.WriteBytes(1, field_names[0], Data);
- }
- UnknownFields.WriteTo(output);
- }
-
- private int memoizedSerializedSize = -1;
- public override int SerializedSize {
- get {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
- return CalcSerializedSize();
- }
- }
-
- private int CalcSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- if (hasData) {
- size += pb::CodedOutputStream.ComputeBytesSize(1, Data);
- }
- size += UnknownFields.SerializedSize;
- memoizedSerializedSize = size;
- return size;
- }
- public static OneBytes ParseFrom(pb::ByteString data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static OneBytes ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static OneBytes ParseFrom(byte[] data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static OneBytes ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static OneBytes ParseFrom(global::System.IO.Stream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static OneBytes ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- public static OneBytes ParseDelimitedFrom(global::System.IO.Stream input) {
- return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
- }
- public static OneBytes ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
- }
- public static OneBytes ParseFrom(pb::ICodedInputStream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static OneBytes ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- private OneBytes 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(OneBytes prototype) {
- return new Builder(prototype);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class Builder : pb::GeneratedBuilder<OneBytes, Builder> {
- protected override Builder ThisBuilder {
- get { return this; }
- }
- public Builder() {
- result = DefaultInstance;
- resultIsReadOnly = true;
- }
- internal Builder(OneBytes cloneFrom) {
- result = cloneFrom;
- resultIsReadOnly = true;
- }
-
- private bool resultIsReadOnly;
- private OneBytes result;
-
- private OneBytes PrepareBuilder() {
- if (resultIsReadOnly) {
- OneBytes original = result;
- result = new OneBytes();
- resultIsReadOnly = false;
- MergeFrom(original);
- }
- return result;
- }
-
- public override bool IsInitialized {
- get { return result.IsInitialized; }
- }
-
- protected override OneBytes 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.OneBytes.Descriptor; }
- }
-
- public override OneBytes DefaultInstanceForType {
- get { return global::Google.ProtocolBuffers.TestProtos.OneBytes.DefaultInstance; }
- }
-
- public override OneBytes BuildPartial() {
- if (resultIsReadOnly) {
- return result;
- }
- resultIsReadOnly = true;
- return result.MakeReadOnly();
- }
-
- public override Builder MergeFrom(pb::IMessage other) {
- if (other is OneBytes) {
- return MergeFrom((OneBytes) other);
- } else {
- base.MergeFrom(other);
- return this;
- }
- }
-
- public override Builder MergeFrom(OneBytes other) {
- if (other == global::Google.ProtocolBuffers.TestProtos.OneBytes.DefaultInstance) return this;
- PrepareBuilder();
- if (other.HasData) {
- Data = other.Data;
- }
- 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(_oneBytesFieldNames, field_name, global::System.StringComparer.Ordinal);
- if(field_ordinal >= 0)
- tag = _oneBytesFieldTags[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.hasData = input.ReadBytes(ref result.data_);
- break;
- }
- }
- }
-
- if (unknownFields != null) {
- this.UnknownFields = unknownFields.Build();
- }
- return this;
- }
-
-
- public bool HasData {
- get { return result.hasData; }
- }
- public pb::ByteString Data {
- get { return result.Data; }
- set { SetData(value); }
- }
- public Builder SetData(pb::ByteString value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.hasData = true;
- result.data_ = value;
- return this;
- }
- public Builder ClearData() {
- PrepareBuilder();
- result.hasData = false;
- result.data_ = pb::ByteString.Empty;
- return this;
- }
- }
- static OneBytes() {
- object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor, null);
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class TestPackedTypes : pb::GeneratedMessage<TestPackedTypes, TestPackedTypes.Builder> {
- private TestPackedTypes() { }
- private static readonly TestPackedTypes defaultInstance = new TestPackedTypes().MakeReadOnly();
- private static readonly string[] _testPackedTypesFieldNames = new string[] { "packed_bool", "packed_double", "packed_enum", "packed_fixed32", "packed_fixed64", "packed_float", "packed_int32", "packed_int64", "packed_sfixed32", "packed_sfixed64", "packed_sint32", "packed_sint64", "packed_uint32", "packed_uint64" };
- private static readonly uint[] _testPackedTypesFieldTags = new uint[] { 818, 810, 826, 770, 778, 802, 722, 730, 786, 794, 754, 762, 738, 746 };
- public static TestPackedTypes DefaultInstance {
- get { return defaultInstance; }
- }
-
- public override TestPackedTypes DefaultInstanceForType {
- get { return DefaultInstance; }
- }
-
- protected override TestPackedTypes ThisMessage {
- get { return this; }
- }
-
- public static pbd::MessageDescriptor Descriptor {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.internal__static_protobuf_unittest_TestPackedTypes__Descriptor; }
- }
-
- protected override pb::FieldAccess.FieldAccessorTable<TestPackedTypes, TestPackedTypes.Builder> InternalFieldAccessors {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.internal__static_protobuf_unittest_TestPackedTypes__FieldAccessorTable; }
- }
-
- public const int PackedInt32FieldNumber = 90;
- private int packedInt32MemoizedSerializedSize;
- private pbc::PopsicleList<int> packedInt32_ = new pbc::PopsicleList<int>();
- public scg::IList<int> PackedInt32List {
- get { return pbc::Lists.AsReadOnly(packedInt32_); }
- }
- public int PackedInt32Count {
- get { return packedInt32_.Count; }
- }
- public int GetPackedInt32(int index) {
- return packedInt32_[index];
- }
-
- public const int PackedInt64FieldNumber = 91;
- private int packedInt64MemoizedSerializedSize;
- private pbc::PopsicleList<long> packedInt64_ = new pbc::PopsicleList<long>();
- public scg::IList<long> PackedInt64List {
- get { return pbc::Lists.AsReadOnly(packedInt64_); }
- }
- public int PackedInt64Count {
- get { return packedInt64_.Count; }
- }
- public long GetPackedInt64(int index) {
- return packedInt64_[index];
- }
-
- public const int PackedUint32FieldNumber = 92;
- private int packedUint32MemoizedSerializedSize;
- private pbc::PopsicleList<uint> packedUint32_ = new pbc::PopsicleList<uint>();
- [global::System.CLSCompliant(false)]
- public scg::IList<uint> PackedUint32List {
- get { return pbc::Lists.AsReadOnly(packedUint32_); }
- }
- public int PackedUint32Count {
- get { return packedUint32_.Count; }
- }
- [global::System.CLSCompliant(false)]
- public uint GetPackedUint32(int index) {
- return packedUint32_[index];
- }
-
- public const int PackedUint64FieldNumber = 93;
- private int packedUint64MemoizedSerializedSize;
- private pbc::PopsicleList<ulong> packedUint64_ = new pbc::PopsicleList<ulong>();
- [global::System.CLSCompliant(false)]
- public scg::IList<ulong> PackedUint64List {
- get { return pbc::Lists.AsReadOnly(packedUint64_); }
- }
- public int PackedUint64Count {
- get { return packedUint64_.Count; }
- }
- [global::System.CLSCompliant(false)]
- public ulong GetPackedUint64(int index) {
- return packedUint64_[index];
- }
-
- public const int PackedSint32FieldNumber = 94;
- private int packedSint32MemoizedSerializedSize;
- private pbc::PopsicleList<int> packedSint32_ = new pbc::PopsicleList<int>();
- public scg::IList<int> PackedSint32List {
- get { return pbc::Lists.AsReadOnly(packedSint32_); }
- }
- public int PackedSint32Count {
- get { return packedSint32_.Count; }
- }
- public int GetPackedSint32(int index) {
- return packedSint32_[index];
- }
-
- public const int PackedSint64FieldNumber = 95;
- private int packedSint64MemoizedSerializedSize;
- private pbc::PopsicleList<long> packedSint64_ = new pbc::PopsicleList<long>();
- public scg::IList<long> PackedSint64List {
- get { return pbc::Lists.AsReadOnly(packedSint64_); }
- }
- public int PackedSint64Count {
- get { return packedSint64_.Count; }
- }
- public long GetPackedSint64(int index) {
- return packedSint64_[index];
- }
-
- public const int PackedFixed32FieldNumber = 96;
- private int packedFixed32MemoizedSerializedSize;
- private pbc::PopsicleList<uint> packedFixed32_ = new pbc::PopsicleList<uint>();
- [global::System.CLSCompliant(false)]
- public scg::IList<uint> PackedFixed32List {
- get { return pbc::Lists.AsReadOnly(packedFixed32_); }
- }
- public int PackedFixed32Count {
- get { return packedFixed32_.Count; }
- }
- [global::System.CLSCompliant(false)]
- public uint GetPackedFixed32(int index) {
- return packedFixed32_[index];
- }
-
- public const int PackedFixed64FieldNumber = 97;
- private int packedFixed64MemoizedSerializedSize;
- private pbc::PopsicleList<ulong> packedFixed64_ = new pbc::PopsicleList<ulong>();
- [global::System.CLSCompliant(false)]
- public scg::IList<ulong> PackedFixed64List {
- get { return pbc::Lists.AsReadOnly(packedFixed64_); }
- }
- public int PackedFixed64Count {
- get { return packedFixed64_.Count; }
- }
- [global::System.CLSCompliant(false)]
- public ulong GetPackedFixed64(int index) {
- return packedFixed64_[index];
- }
-
- public const int PackedSfixed32FieldNumber = 98;
- private int packedSfixed32MemoizedSerializedSize;
- private pbc::PopsicleList<int> packedSfixed32_ = new pbc::PopsicleList<int>();
- public scg::IList<int> PackedSfixed32List {
- get { return pbc::Lists.AsReadOnly(packedSfixed32_); }
- }
- public int PackedSfixed32Count {
- get { return packedSfixed32_.Count; }
- }
- public int GetPackedSfixed32(int index) {
- return packedSfixed32_[index];
- }
-
- public const int PackedSfixed64FieldNumber = 99;
- private int packedSfixed64MemoizedSerializedSize;
- private pbc::PopsicleList<long> packedSfixed64_ = new pbc::PopsicleList<long>();
- public scg::IList<long> PackedSfixed64List {
- get { return pbc::Lists.AsReadOnly(packedSfixed64_); }
- }
- public int PackedSfixed64Count {
- get { return packedSfixed64_.Count; }
- }
- public long GetPackedSfixed64(int index) {
- return packedSfixed64_[index];
- }
-
- public const int PackedFloatFieldNumber = 100;
- private int packedFloatMemoizedSerializedSize;
- private pbc::PopsicleList<float> packedFloat_ = new pbc::PopsicleList<float>();
- public scg::IList<float> PackedFloatList {
- get { return pbc::Lists.AsReadOnly(packedFloat_); }
- }
- public int PackedFloatCount {
- get { return packedFloat_.Count; }
- }
- public float GetPackedFloat(int index) {
- return packedFloat_[index];
- }
-
- public const int PackedDoubleFieldNumber = 101;
- private int packedDoubleMemoizedSerializedSize;
- private pbc::PopsicleList<double> packedDouble_ = new pbc::PopsicleList<double>();
- public scg::IList<double> PackedDoubleList {
- get { return pbc::Lists.AsReadOnly(packedDouble_); }
- }
- public int PackedDoubleCount {
- get { return packedDouble_.Count; }
- }
- public double GetPackedDouble(int index) {
- return packedDouble_[index];
- }
-
- public const int PackedBoolFieldNumber = 102;
- private int packedBoolMemoizedSerializedSize;
- private pbc::PopsicleList<bool> packedBool_ = new pbc::PopsicleList<bool>();
- public scg::IList<bool> PackedBoolList {
- get { return pbc::Lists.AsReadOnly(packedBool_); }
- }
- public int PackedBoolCount {
- get { return packedBool_.Count; }
- }
- public bool GetPackedBool(int index) {
- return packedBool_[index];
- }
-
- public const int PackedEnumFieldNumber = 103;
- private int packedEnumMemoizedSerializedSize;
- private pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.ForeignEnum> packedEnum_ = new pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.ForeignEnum>();
- public scg::IList<global::Google.ProtocolBuffers.TestProtos.ForeignEnum> PackedEnumList {
- get { return pbc::Lists.AsReadOnly(packedEnum_); }
- }
- public int PackedEnumCount {
- get { return packedEnum_.Count; }
- }
- public global::Google.ProtocolBuffers.TestProtos.ForeignEnum GetPackedEnum(int index) {
- return packedEnum_[index];
- }
-
- public override bool IsInitialized {
- get {
- return true;
- }
- }
-
- public override void WriteTo(pb::ICodedOutputStream output) {
- CalcSerializedSize();
- string[] field_names = _testPackedTypesFieldNames;
- if (packedInt32_.Count > 0) {
- output.WritePackedInt32Array(90, field_names[6], packedInt32MemoizedSerializedSize, packedInt32_);
- }
- if (packedInt64_.Count > 0) {
- output.WritePackedInt64Array(91, field_names[7], packedInt64MemoizedSerializedSize, packedInt64_);
- }
- if (packedUint32_.Count > 0) {
- output.WritePackedUInt32Array(92, field_names[12], packedUint32MemoizedSerializedSize, packedUint32_);
- }
- if (packedUint64_.Count > 0) {
- output.WritePackedUInt64Array(93, field_names[13], packedUint64MemoizedSerializedSize, packedUint64_);
- }
- if (packedSint32_.Count > 0) {
- output.WritePackedSInt32Array(94, field_names[10], packedSint32MemoizedSerializedSize, packedSint32_);
- }
- if (packedSint64_.Count > 0) {
- output.WritePackedSInt64Array(95, field_names[11], packedSint64MemoizedSerializedSize, packedSint64_);
- }
- if (packedFixed32_.Count > 0) {
- output.WritePackedFixed32Array(96, field_names[3], packedFixed32MemoizedSerializedSize, packedFixed32_);
- }
- if (packedFixed64_.Count > 0) {
- output.WritePackedFixed64Array(97, field_names[4], packedFixed64MemoizedSerializedSize, packedFixed64_);
- }
- if (packedSfixed32_.Count > 0) {
- output.WritePackedSFixed32Array(98, field_names[8], packedSfixed32MemoizedSerializedSize, packedSfixed32_);
- }
- if (packedSfixed64_.Count > 0) {
- output.WritePackedSFixed64Array(99, field_names[9], packedSfixed64MemoizedSerializedSize, packedSfixed64_);
- }
- if (packedFloat_.Count > 0) {
- output.WritePackedFloatArray(100, field_names[5], packedFloatMemoizedSerializedSize, packedFloat_);
- }
- if (packedDouble_.Count > 0) {
- output.WritePackedDoubleArray(101, field_names[1], packedDoubleMemoizedSerializedSize, packedDouble_);
- }
- if (packedBool_.Count > 0) {
- output.WritePackedBoolArray(102, field_names[0], packedBoolMemoizedSerializedSize, packedBool_);
- }
- if (packedEnum_.Count > 0) {
- output.WritePackedEnumArray(103, field_names[2], packedEnumMemoizedSerializedSize, packedEnum_);
- }
- UnknownFields.WriteTo(output);
- }
-
- private int memoizedSerializedSize = -1;
- public override int SerializedSize {
- get {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
- return CalcSerializedSize();
- }
- }
-
- private int CalcSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- {
- int dataSize = 0;
- foreach (int element in PackedInt32List) {
- dataSize += pb::CodedOutputStream.ComputeInt32SizeNoTag(element);
- }
- size += dataSize;
- if (packedInt32_.Count != 0) {
- size += 2 + pb::CodedOutputStream.ComputeInt32SizeNoTag(dataSize);
- }
- packedInt32MemoizedSerializedSize = dataSize;
- }
- {
- int dataSize = 0;
- foreach (long element in PackedInt64List) {
- dataSize += pb::CodedOutputStream.ComputeInt64SizeNoTag(element);
- }
- size += dataSize;
- if (packedInt64_.Count != 0) {
- size += 2 + pb::CodedOutputStream.ComputeInt32SizeNoTag(dataSize);
- }
- packedInt64MemoizedSerializedSize = dataSize;
- }
- {
- int dataSize = 0;
- foreach (uint element in PackedUint32List) {
- dataSize += pb::CodedOutputStream.ComputeUInt32SizeNoTag(element);
- }
- size += dataSize;
- if (packedUint32_.Count != 0) {
- size += 2 + pb::CodedOutputStream.ComputeInt32SizeNoTag(dataSize);
- }
- packedUint32MemoizedSerializedSize = dataSize;
- }
- {
- int dataSize = 0;
- foreach (ulong element in PackedUint64List) {
- dataSize += pb::CodedOutputStream.ComputeUInt64SizeNoTag(element);
- }
- size += dataSize;
- if (packedUint64_.Count != 0) {
- size += 2 + pb::CodedOutputStream.ComputeInt32SizeNoTag(dataSize);
- }
- packedUint64MemoizedSerializedSize = dataSize;
- }
- {
- int dataSize = 0;
- foreach (int element in PackedSint32List) {
- dataSize += pb::CodedOutputStream.ComputeSInt32SizeNoTag(element);
- }
- size += dataSize;
- if (packedSint32_.Count != 0) {
- size += 2 + pb::CodedOutputStream.ComputeInt32SizeNoTag(dataSize);
- }
- packedSint32MemoizedSerializedSize = dataSize;
- }
- {
- int dataSize = 0;
- foreach (long element in PackedSint64List) {
- dataSize += pb::CodedOutputStream.ComputeSInt64SizeNoTag(element);
- }
- size += dataSize;
- if (packedSint64_.Count != 0) {
- size += 2 + pb::CodedOutputStream.ComputeInt32SizeNoTag(dataSize);
- }
- packedSint64MemoizedSerializedSize = dataSize;
- }
- {
- int dataSize = 0;
- dataSize = 4 * packedFixed32_.Count;
- size += dataSize;
- if (packedFixed32_.Count != 0) {
- size += 2 + pb::CodedOutputStream.ComputeInt32SizeNoTag(dataSize);
- }
- packedFixed32MemoizedSerializedSize = dataSize;
- }
- {
- int dataSize = 0;
- dataSize = 8 * packedFixed64_.Count;
- size += dataSize;
- if (packedFixed64_.Count != 0) {
- size += 2 + pb::CodedOutputStream.ComputeInt32SizeNoTag(dataSize);
- }
- packedFixed64MemoizedSerializedSize = dataSize;
- }
- {
- int dataSize = 0;
- dataSize = 4 * packedSfixed32_.Count;
- size += dataSize;
- if (packedSfixed32_.Count != 0) {
- size += 2 + pb::CodedOutputStream.ComputeInt32SizeNoTag(dataSize);
- }
- packedSfixed32MemoizedSerializedSize = dataSize;
- }
- {
- int dataSize = 0;
- dataSize = 8 * packedSfixed64_.Count;
- size += dataSize;
- if (packedSfixed64_.Count != 0) {
- size += 2 + pb::CodedOutputStream.ComputeInt32SizeNoTag(dataSize);
- }
- packedSfixed64MemoizedSerializedSize = dataSize;
- }
- {
- int dataSize = 0;
- dataSize = 4 * packedFloat_.Count;
- size += dataSize;
- if (packedFloat_.Count != 0) {
- size += 2 + pb::CodedOutputStream.ComputeInt32SizeNoTag(dataSize);
- }
- packedFloatMemoizedSerializedSize = dataSize;
- }
- {
- int dataSize = 0;
- dataSize = 8 * packedDouble_.Count;
- size += dataSize;
- if (packedDouble_.Count != 0) {
- size += 2 + pb::CodedOutputStream.ComputeInt32SizeNoTag(dataSize);
- }
- packedDoubleMemoizedSerializedSize = dataSize;
- }
- {
- int dataSize = 0;
- dataSize = 1 * packedBool_.Count;
- size += dataSize;
- if (packedBool_.Count != 0) {
- size += 2 + pb::CodedOutputStream.ComputeInt32SizeNoTag(dataSize);
- }
- packedBoolMemoizedSerializedSize = dataSize;
- }
- {
- int dataSize = 0;
- if (packedEnum_.Count > 0) {
- foreach (global::Google.ProtocolBuffers.TestProtos.ForeignEnum element in packedEnum_) {
- dataSize += pb::CodedOutputStream.ComputeEnumSizeNoTag((int) element);
- }
- size += dataSize;
- size += 2;
- size += pb::CodedOutputStream.ComputeRawVarint32Size((uint) dataSize);
- }
- packedEnumMemoizedSerializedSize = dataSize;
- }
- size += UnknownFields.SerializedSize;
- memoizedSerializedSize = size;
- return size;
- }
- public static TestPackedTypes ParseFrom(pb::ByteString data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static TestPackedTypes ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static TestPackedTypes ParseFrom(byte[] data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static TestPackedTypes ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static TestPackedTypes ParseFrom(global::System.IO.Stream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static TestPackedTypes ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- public static TestPackedTypes ParseDelimitedFrom(global::System.IO.Stream input) {
- return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
- }
- public static TestPackedTypes ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
- }
- public static TestPackedTypes ParseFrom(pb::ICodedInputStream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static TestPackedTypes ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- private TestPackedTypes MakeReadOnly() {
- packedInt32_.MakeReadOnly();
- packedInt64_.MakeReadOnly();
- packedUint32_.MakeReadOnly();
- packedUint64_.MakeReadOnly();
- packedSint32_.MakeReadOnly();
- packedSint64_.MakeReadOnly();
- packedFixed32_.MakeReadOnly();
- packedFixed64_.MakeReadOnly();
- packedSfixed32_.MakeReadOnly();
- packedSfixed64_.MakeReadOnly();
- packedFloat_.MakeReadOnly();
- packedDouble_.MakeReadOnly();
- packedBool_.MakeReadOnly();
- packedEnum_.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(TestPackedTypes prototype) {
- return new Builder(prototype);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class Builder : pb::GeneratedBuilder<TestPackedTypes, Builder> {
- protected override Builder ThisBuilder {
- get { return this; }
- }
- public Builder() {
- result = DefaultInstance;
- resultIsReadOnly = true;
- }
- internal Builder(TestPackedTypes cloneFrom) {
- result = cloneFrom;
- resultIsReadOnly = true;
- }
-
- private bool resultIsReadOnly;
- private TestPackedTypes result;
-
- private TestPackedTypes PrepareBuilder() {
- if (resultIsReadOnly) {
- TestPackedTypes original = result;
- result = new TestPackedTypes();
- resultIsReadOnly = false;
- MergeFrom(original);
- }
- return result;
- }
-
- public override bool IsInitialized {
- get { return result.IsInitialized; }
- }
-
- protected override TestPackedTypes 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.TestPackedTypes.Descriptor; }
- }
-
- public override TestPackedTypes DefaultInstanceForType {
- get { return global::Google.ProtocolBuffers.TestProtos.TestPackedTypes.DefaultInstance; }
- }
-
- public override TestPackedTypes BuildPartial() {
- if (resultIsReadOnly) {
- return result;
- }
- resultIsReadOnly = true;
- return result.MakeReadOnly();
- }
-
- public override Builder MergeFrom(pb::IMessage other) {
- if (other is TestPackedTypes) {
- return MergeFrom((TestPackedTypes) other);
- } else {
- base.MergeFrom(other);
- return this;
- }
- }
-
- public override Builder MergeFrom(TestPackedTypes other) {
- if (other == global::Google.ProtocolBuffers.TestProtos.TestPackedTypes.DefaultInstance) return this;
- PrepareBuilder();
- if (other.packedInt32_.Count != 0) {
- result.packedInt32_.Add(other.packedInt32_);
- }
- if (other.packedInt64_.Count != 0) {
- result.packedInt64_.Add(other.packedInt64_);
- }
- if (other.packedUint32_.Count != 0) {
- result.packedUint32_.Add(other.packedUint32_);
- }
- if (other.packedUint64_.Count != 0) {
- result.packedUint64_.Add(other.packedUint64_);
- }
- if (other.packedSint32_.Count != 0) {
- result.packedSint32_.Add(other.packedSint32_);
- }
- if (other.packedSint64_.Count != 0) {
- result.packedSint64_.Add(other.packedSint64_);
- }
- if (other.packedFixed32_.Count != 0) {
- result.packedFixed32_.Add(other.packedFixed32_);
- }
- if (other.packedFixed64_.Count != 0) {
- result.packedFixed64_.Add(other.packedFixed64_);
- }
- if (other.packedSfixed32_.Count != 0) {
- result.packedSfixed32_.Add(other.packedSfixed32_);
- }
- if (other.packedSfixed64_.Count != 0) {
- result.packedSfixed64_.Add(other.packedSfixed64_);
- }
- if (other.packedFloat_.Count != 0) {
- result.packedFloat_.Add(other.packedFloat_);
- }
- if (other.packedDouble_.Count != 0) {
- result.packedDouble_.Add(other.packedDouble_);
- }
- if (other.packedBool_.Count != 0) {
- result.packedBool_.Add(other.packedBool_);
- }
- if (other.packedEnum_.Count != 0) {
- result.packedEnum_.Add(other.packedEnum_);
- }
- 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(_testPackedTypesFieldNames, field_name, global::System.StringComparer.Ordinal);
- if(field_ordinal >= 0)
- tag = _testPackedTypesFieldTags[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 722:
- case 720: {
- input.ReadInt32Array(tag, field_name, result.packedInt32_);
- break;
- }
- case 730:
- case 728: {
- input.ReadInt64Array(tag, field_name, result.packedInt64_);
- break;
- }
- case 738:
- case 736: {
- input.ReadUInt32Array(tag, field_name, result.packedUint32_);
- break;
- }
- case 746:
- case 744: {
- input.ReadUInt64Array(tag, field_name, result.packedUint64_);
- break;
- }
- case 754:
- case 752: {
- input.ReadSInt32Array(tag, field_name, result.packedSint32_);
- break;
- }
- case 762:
- case 760: {
- input.ReadSInt64Array(tag, field_name, result.packedSint64_);
- break;
- }
- case 770:
- case 773: {
- input.ReadFixed32Array(tag, field_name, result.packedFixed32_);
- break;
- }
- case 778:
- case 777: {
- input.ReadFixed64Array(tag, field_name, result.packedFixed64_);
- break;
- }
- case 786:
- case 789: {
- input.ReadSFixed32Array(tag, field_name, result.packedSfixed32_);
- break;
- }
- case 794:
- case 793: {
- input.ReadSFixed64Array(tag, field_name, result.packedSfixed64_);
- break;
- }
- case 802:
- case 805: {
- input.ReadFloatArray(tag, field_name, result.packedFloat_);
- break;
- }
- case 810:
- case 809: {
- input.ReadDoubleArray(tag, field_name, result.packedDouble_);
- break;
- }
- case 818:
- case 816: {
- input.ReadBoolArray(tag, field_name, result.packedBool_);
- break;
- }
- case 826:
- case 824: {
- scg::ICollection<object> unknownItems;
- input.ReadEnumArray<global::Google.ProtocolBuffers.TestProtos.ForeignEnum>(tag, field_name, result.packedEnum_, out unknownItems);
- if (unknownItems != null) {
- if (unknownFields == null) {
- unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
- }
- foreach (object rawValue in unknownItems)
- if (rawValue is int)
- unknownFields.MergeVarintField(103, (ulong)(int)rawValue);
- }
- break;
- }
- }
- }
-
- if (unknownFields != null) {
- this.UnknownFields = unknownFields.Build();
- }
- return this;
- }
-
-
- public pbc::IPopsicleList<int> PackedInt32List {
- get { return PrepareBuilder().packedInt32_; }
- }
- public int PackedInt32Count {
- get { return result.PackedInt32Count; }
- }
- public int GetPackedInt32(int index) {
- return result.GetPackedInt32(index);
- }
- public Builder SetPackedInt32(int index, int value) {
- PrepareBuilder();
- result.packedInt32_[index] = value;
- return this;
- }
- public Builder AddPackedInt32(int value) {
- PrepareBuilder();
- result.packedInt32_.Add(value);
- return this;
- }
- public Builder AddRangePackedInt32(scg::IEnumerable<int> values) {
- PrepareBuilder();
- result.packedInt32_.Add(values);
- return this;
- }
- public Builder ClearPackedInt32() {
- PrepareBuilder();
- result.packedInt32_.Clear();
- return this;
- }
-
- public pbc::IPopsicleList<long> PackedInt64List {
- get { return PrepareBuilder().packedInt64_; }
- }
- public int PackedInt64Count {
- get { return result.PackedInt64Count; }
- }
- public long GetPackedInt64(int index) {
- return result.GetPackedInt64(index);
- }
- public Builder SetPackedInt64(int index, long value) {
- PrepareBuilder();
- result.packedInt64_[index] = value;
- return this;
- }
- public Builder AddPackedInt64(long value) {
- PrepareBuilder();
- result.packedInt64_.Add(value);
- return this;
- }
- public Builder AddRangePackedInt64(scg::IEnumerable<long> values) {
- PrepareBuilder();
- result.packedInt64_.Add(values);
- return this;
- }
- public Builder ClearPackedInt64() {
- PrepareBuilder();
- result.packedInt64_.Clear();
- return this;
- }
-
- [global::System.CLSCompliant(false)]
- public pbc::IPopsicleList<uint> PackedUint32List {
- get { return PrepareBuilder().packedUint32_; }
- }
- public int PackedUint32Count {
- get { return result.PackedUint32Count; }
- }
- [global::System.CLSCompliant(false)]
- public uint GetPackedUint32(int index) {
- return result.GetPackedUint32(index);
- }
- [global::System.CLSCompliant(false)]
- public Builder SetPackedUint32(int index, uint value) {
- PrepareBuilder();
- result.packedUint32_[index] = value;
- return this;
- }
- [global::System.CLSCompliant(false)]
- public Builder AddPackedUint32(uint value) {
- PrepareBuilder();
- result.packedUint32_.Add(value);
- return this;
- }
- [global::System.CLSCompliant(false)]
- public Builder AddRangePackedUint32(scg::IEnumerable<uint> values) {
- PrepareBuilder();
- result.packedUint32_.Add(values);
- return this;
- }
- public Builder ClearPackedUint32() {
- PrepareBuilder();
- result.packedUint32_.Clear();
- return this;
- }
-
- [global::System.CLSCompliant(false)]
- public pbc::IPopsicleList<ulong> PackedUint64List {
- get { return PrepareBuilder().packedUint64_; }
- }
- public int PackedUint64Count {
- get { return result.PackedUint64Count; }
- }
- [global::System.CLSCompliant(false)]
- public ulong GetPackedUint64(int index) {
- return result.GetPackedUint64(index);
- }
- [global::System.CLSCompliant(false)]
- public Builder SetPackedUint64(int index, ulong value) {
- PrepareBuilder();
- result.packedUint64_[index] = value;
- return this;
- }
- [global::System.CLSCompliant(false)]
- public Builder AddPackedUint64(ulong value) {
- PrepareBuilder();
- result.packedUint64_.Add(value);
- return this;
- }
- [global::System.CLSCompliant(false)]
- public Builder AddRangePackedUint64(scg::IEnumerable<ulong> values) {
- PrepareBuilder();
- result.packedUint64_.Add(values);
- return this;
- }
- public Builder ClearPackedUint64() {
- PrepareBuilder();
- result.packedUint64_.Clear();
- return this;
- }
-
- public pbc::IPopsicleList<int> PackedSint32List {
- get { return PrepareBuilder().packedSint32_; }
- }
- public int PackedSint32Count {
- get { return result.PackedSint32Count; }
- }
- public int GetPackedSint32(int index) {
- return result.GetPackedSint32(index);
- }
- public Builder SetPackedSint32(int index, int value) {
- PrepareBuilder();
- result.packedSint32_[index] = value;
- return this;
- }
- public Builder AddPackedSint32(int value) {
- PrepareBuilder();
- result.packedSint32_.Add(value);
- return this;
- }
- public Builder AddRangePackedSint32(scg::IEnumerable<int> values) {
- PrepareBuilder();
- result.packedSint32_.Add(values);
- return this;
- }
- public Builder ClearPackedSint32() {
- PrepareBuilder();
- result.packedSint32_.Clear();
- return this;
- }
-
- public pbc::IPopsicleList<long> PackedSint64List {
- get { return PrepareBuilder().packedSint64_; }
- }
- public int PackedSint64Count {
- get { return result.PackedSint64Count; }
- }
- public long GetPackedSint64(int index) {
- return result.GetPackedSint64(index);
- }
- public Builder SetPackedSint64(int index, long value) {
- PrepareBuilder();
- result.packedSint64_[index] = value;
- return this;
- }
- public Builder AddPackedSint64(long value) {
- PrepareBuilder();
- result.packedSint64_.Add(value);
- return this;
- }
- public Builder AddRangePackedSint64(scg::IEnumerable<long> values) {
- PrepareBuilder();
- result.packedSint64_.Add(values);
- return this;
- }
- public Builder ClearPackedSint64() {
- PrepareBuilder();
- result.packedSint64_.Clear();
- return this;
- }
-
- [global::System.CLSCompliant(false)]
- public pbc::IPopsicleList<uint> PackedFixed32List {
- get { return PrepareBuilder().packedFixed32_; }
- }
- public int PackedFixed32Count {
- get { return result.PackedFixed32Count; }
- }
- [global::System.CLSCompliant(false)]
- public uint GetPackedFixed32(int index) {
- return result.GetPackedFixed32(index);
- }
- [global::System.CLSCompliant(false)]
- public Builder SetPackedFixed32(int index, uint value) {
- PrepareBuilder();
- result.packedFixed32_[index] = value;
- return this;
- }
- [global::System.CLSCompliant(false)]
- public Builder AddPackedFixed32(uint value) {
- PrepareBuilder();
- result.packedFixed32_.Add(value);
- return this;
- }
- [global::System.CLSCompliant(false)]
- public Builder AddRangePackedFixed32(scg::IEnumerable<uint> values) {
- PrepareBuilder();
- result.packedFixed32_.Add(values);
- return this;
- }
- public Builder ClearPackedFixed32() {
- PrepareBuilder();
- result.packedFixed32_.Clear();
- return this;
- }
-
- [global::System.CLSCompliant(false)]
- public pbc::IPopsicleList<ulong> PackedFixed64List {
- get { return PrepareBuilder().packedFixed64_; }
- }
- public int PackedFixed64Count {
- get { return result.PackedFixed64Count; }
- }
- [global::System.CLSCompliant(false)]
- public ulong GetPackedFixed64(int index) {
- return result.GetPackedFixed64(index);
- }
- [global::System.CLSCompliant(false)]
- public Builder SetPackedFixed64(int index, ulong value) {
- PrepareBuilder();
- result.packedFixed64_[index] = value;
- return this;
- }
- [global::System.CLSCompliant(false)]
- public Builder AddPackedFixed64(ulong value) {
- PrepareBuilder();
- result.packedFixed64_.Add(value);
- return this;
- }
- [global::System.CLSCompliant(false)]
- public Builder AddRangePackedFixed64(scg::IEnumerable<ulong> values) {
- PrepareBuilder();
- result.packedFixed64_.Add(values);
- return this;
- }
- public Builder ClearPackedFixed64() {
- PrepareBuilder();
- result.packedFixed64_.Clear();
- return this;
- }
-
- public pbc::IPopsicleList<int> PackedSfixed32List {
- get { return PrepareBuilder().packedSfixed32_; }
- }
- public int PackedSfixed32Count {
- get { return result.PackedSfixed32Count; }
- }
- public int GetPackedSfixed32(int index) {
- return result.GetPackedSfixed32(index);
- }
- public Builder SetPackedSfixed32(int index, int value) {
- PrepareBuilder();
- result.packedSfixed32_[index] = value;
- return this;
- }
- public Builder AddPackedSfixed32(int value) {
- PrepareBuilder();
- result.packedSfixed32_.Add(value);
- return this;
- }
- public Builder AddRangePackedSfixed32(scg::IEnumerable<int> values) {
- PrepareBuilder();
- result.packedSfixed32_.Add(values);
- return this;
- }
- public Builder ClearPackedSfixed32() {
- PrepareBuilder();
- result.packedSfixed32_.Clear();
- return this;
- }
-
- public pbc::IPopsicleList<long> PackedSfixed64List {
- get { return PrepareBuilder().packedSfixed64_; }
- }
- public int PackedSfixed64Count {
- get { return result.PackedSfixed64Count; }
- }
- public long GetPackedSfixed64(int index) {
- return result.GetPackedSfixed64(index);
- }
- public Builder SetPackedSfixed64(int index, long value) {
- PrepareBuilder();
- result.packedSfixed64_[index] = value;
- return this;
- }
- public Builder AddPackedSfixed64(long value) {
- PrepareBuilder();
- result.packedSfixed64_.Add(value);
- return this;
- }
- public Builder AddRangePackedSfixed64(scg::IEnumerable<long> values) {
- PrepareBuilder();
- result.packedSfixed64_.Add(values);
- return this;
- }
- public Builder ClearPackedSfixed64() {
- PrepareBuilder();
- result.packedSfixed64_.Clear();
- return this;
- }
-
- public pbc::IPopsicleList<float> PackedFloatList {
- get { return PrepareBuilder().packedFloat_; }
- }
- public int PackedFloatCount {
- get { return result.PackedFloatCount; }
- }
- public float GetPackedFloat(int index) {
- return result.GetPackedFloat(index);
- }
- public Builder SetPackedFloat(int index, float value) {
- PrepareBuilder();
- result.packedFloat_[index] = value;
- return this;
- }
- public Builder AddPackedFloat(float value) {
- PrepareBuilder();
- result.packedFloat_.Add(value);
- return this;
- }
- public Builder AddRangePackedFloat(scg::IEnumerable<float> values) {
- PrepareBuilder();
- result.packedFloat_.Add(values);
- return this;
- }
- public Builder ClearPackedFloat() {
- PrepareBuilder();
- result.packedFloat_.Clear();
- return this;
- }
-
- public pbc::IPopsicleList<double> PackedDoubleList {
- get { return PrepareBuilder().packedDouble_; }
- }
- public int PackedDoubleCount {
- get { return result.PackedDoubleCount; }
- }
- public double GetPackedDouble(int index) {
- return result.GetPackedDouble(index);
- }
- public Builder SetPackedDouble(int index, double value) {
- PrepareBuilder();
- result.packedDouble_[index] = value;
- return this;
- }
- public Builder AddPackedDouble(double value) {
- PrepareBuilder();
- result.packedDouble_.Add(value);
- return this;
- }
- public Builder AddRangePackedDouble(scg::IEnumerable<double> values) {
- PrepareBuilder();
- result.packedDouble_.Add(values);
- return this;
- }
- public Builder ClearPackedDouble() {
- PrepareBuilder();
- result.packedDouble_.Clear();
- return this;
- }
-
- public pbc::IPopsicleList<bool> PackedBoolList {
- get { return PrepareBuilder().packedBool_; }
- }
- public int PackedBoolCount {
- get { return result.PackedBoolCount; }
- }
- public bool GetPackedBool(int index) {
- return result.GetPackedBool(index);
- }
- public Builder SetPackedBool(int index, bool value) {
- PrepareBuilder();
- result.packedBool_[index] = value;
- return this;
- }
- public Builder AddPackedBool(bool value) {
- PrepareBuilder();
- result.packedBool_.Add(value);
- return this;
- }
- public Builder AddRangePackedBool(scg::IEnumerable<bool> values) {
- PrepareBuilder();
- result.packedBool_.Add(values);
- return this;
- }
- public Builder ClearPackedBool() {
- PrepareBuilder();
- result.packedBool_.Clear();
- return this;
- }
-
- public pbc::IPopsicleList<global::Google.ProtocolBuffers.TestProtos.ForeignEnum> PackedEnumList {
- get { return PrepareBuilder().packedEnum_; }
- }
- public int PackedEnumCount {
- get { return result.PackedEnumCount; }
- }
- public global::Google.ProtocolBuffers.TestProtos.ForeignEnum GetPackedEnum(int index) {
- return result.GetPackedEnum(index);
- }
- public Builder SetPackedEnum(int index, global::Google.ProtocolBuffers.TestProtos.ForeignEnum value) {
- PrepareBuilder();
- result.packedEnum_[index] = value;
- return this;
- }
- public Builder AddPackedEnum(global::Google.ProtocolBuffers.TestProtos.ForeignEnum value) {
- PrepareBuilder();
- result.packedEnum_.Add(value);
- return this;
- }
- public Builder AddRangePackedEnum(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.ForeignEnum> values) {
- PrepareBuilder();
- result.packedEnum_.Add(values);
- return this;
- }
- public Builder ClearPackedEnum() {
- PrepareBuilder();
- result.packedEnum_.Clear();
- return this;
- }
- }
- static TestPackedTypes() {
- object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor, null);
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class TestUnpackedTypes : pb::GeneratedMessage<TestUnpackedTypes, TestUnpackedTypes.Builder> {
- private TestUnpackedTypes() { }
- private static readonly TestUnpackedTypes defaultInstance = new TestUnpackedTypes().MakeReadOnly();
- private static readonly string[] _testUnpackedTypesFieldNames = 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[] _testUnpackedTypesFieldTags = new uint[] { 816, 809, 824, 773, 777, 805, 720, 728, 789, 793, 752, 760, 736, 744 };
- public static TestUnpackedTypes DefaultInstance {
- get { return defaultInstance; }
- }
-
- public override TestUnpackedTypes DefaultInstanceForType {
- get { return DefaultInstance; }
- }
-
- protected override TestUnpackedTypes ThisMessage {
- get { return this; }
- }
-
- public static pbd::MessageDescriptor Descriptor {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.internal__static_protobuf_unittest_TestUnpackedTypes__Descriptor; }
- }
-
- protected override pb::FieldAccess.FieldAccessorTable<TestUnpackedTypes, TestUnpackedTypes.Builder> InternalFieldAccessors {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.internal__static_protobuf_unittest_TestUnpackedTypes__FieldAccessorTable; }
- }
-
- 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.ForeignEnum> unpackedEnum_ = new pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.ForeignEnum>();
- public scg::IList<global::Google.ProtocolBuffers.TestProtos.ForeignEnum> UnpackedEnumList {
- get { return pbc::Lists.AsReadOnly(unpackedEnum_); }
- }
- public int UnpackedEnumCount {
- get { return unpackedEnum_.Count; }
- }
- public global::Google.ProtocolBuffers.TestProtos.ForeignEnum GetUnpackedEnum(int index) {
- return unpackedEnum_[index];
- }
-
- public override bool IsInitialized {
- get {
- return true;
- }
- }
-
- public override void WriteTo(pb::ICodedOutputStream output) {
- CalcSerializedSize();
- string[] field_names = _testUnpackedTypesFieldNames;
- 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_);
- }
- UnknownFields.WriteTo(output);
- }
-
- private int memoizedSerializedSize = -1;
- public override int SerializedSize {
- get {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
- return CalcSerializedSize();
- }
- }
-
- private int CalcSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- {
- int dataSize = 0;
- 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.ForeignEnum element in unpackedEnum_) {
- dataSize += pb::CodedOutputStream.ComputeEnumSizeNoTag((int) element);
- }
- size += dataSize;
- size += 2 * unpackedEnum_.Count;
- }
- }
- size += UnknownFields.SerializedSize;
- memoizedSerializedSize = size;
- return size;
- }
- public static TestUnpackedTypes ParseFrom(pb::ByteString data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static TestUnpackedTypes ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static TestUnpackedTypes ParseFrom(byte[] data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static TestUnpackedTypes ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static TestUnpackedTypes ParseFrom(global::System.IO.Stream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static TestUnpackedTypes ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- public static TestUnpackedTypes ParseDelimitedFrom(global::System.IO.Stream input) {
- return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
- }
- public static TestUnpackedTypes ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
- }
- public static TestUnpackedTypes ParseFrom(pb::ICodedInputStream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static TestUnpackedTypes ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- private TestUnpackedTypes 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(TestUnpackedTypes prototype) {
- return new Builder(prototype);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class Builder : pb::GeneratedBuilder<TestUnpackedTypes, Builder> {
- protected override Builder ThisBuilder {
- get { return this; }
- }
- public Builder() {
- result = DefaultInstance;
- resultIsReadOnly = true;
- }
- internal Builder(TestUnpackedTypes cloneFrom) {
- result = cloneFrom;
- resultIsReadOnly = true;
- }
-
- private bool resultIsReadOnly;
- private TestUnpackedTypes result;
-
- private TestUnpackedTypes PrepareBuilder() {
- if (resultIsReadOnly) {
- TestUnpackedTypes original = result;
- result = new TestUnpackedTypes();
- resultIsReadOnly = false;
- MergeFrom(original);
- }
- return result;
- }
-
- public override bool IsInitialized {
- get { return result.IsInitialized; }
- }
-
- protected override TestUnpackedTypes 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.TestUnpackedTypes.Descriptor; }
- }
-
- public override TestUnpackedTypes DefaultInstanceForType {
- get { return global::Google.ProtocolBuffers.TestProtos.TestUnpackedTypes.DefaultInstance; }
- }
-
- public override TestUnpackedTypes BuildPartial() {
- if (resultIsReadOnly) {
- return result;
- }
- resultIsReadOnly = true;
- return result.MakeReadOnly();
- }
-
- public override Builder MergeFrom(pb::IMessage other) {
- if (other is TestUnpackedTypes) {
- return MergeFrom((TestUnpackedTypes) other);
- } else {
- base.MergeFrom(other);
- return this;
- }
- }
-
- public override Builder MergeFrom(TestUnpackedTypes other) {
- if (other == global::Google.ProtocolBuffers.TestProtos.TestUnpackedTypes.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_);
- }
- 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(_testUnpackedTypesFieldNames, field_name, global::System.StringComparer.Ordinal);
- if(field_ordinal >= 0)
- tag = _testUnpackedTypesFieldTags[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 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.ForeignEnum>(tag, field_name, result.unpackedEnum_, out unknownItems);
- if (unknownItems != null) {
- if (unknownFields == null) {
- unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
- }
- foreach (object rawValue in unknownItems)
- if (rawValue is int)
- unknownFields.MergeVarintField(103, (ulong)(int)rawValue);
- }
- break;
- }
- }
- }
-
- if (unknownFields != null) {
- this.UnknownFields = unknownFields.Build();
- }
- 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.ForeignEnum> UnpackedEnumList {
- get { return PrepareBuilder().unpackedEnum_; }
- }
- public int UnpackedEnumCount {
- get { return result.UnpackedEnumCount; }
- }
- public global::Google.ProtocolBuffers.TestProtos.ForeignEnum GetUnpackedEnum(int index) {
- return result.GetUnpackedEnum(index);
- }
- public Builder SetUnpackedEnum(int index, global::Google.ProtocolBuffers.TestProtos.ForeignEnum value) {
- PrepareBuilder();
- result.unpackedEnum_[index] = value;
- return this;
- }
- public Builder AddUnpackedEnum(global::Google.ProtocolBuffers.TestProtos.ForeignEnum value) {
- PrepareBuilder();
- result.unpackedEnum_.Add(value);
- return this;
- }
- public Builder AddRangeUnpackedEnum(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.ForeignEnum> values) {
- PrepareBuilder();
- result.unpackedEnum_.Add(values);
- return this;
- }
- public Builder ClearUnpackedEnum() {
- PrepareBuilder();
- result.unpackedEnum_.Clear();
- return this;
- }
- }
- static TestUnpackedTypes() {
- object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor, null);
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class TestPackedExtensions : pb::ExtendableMessage<TestPackedExtensions, TestPackedExtensions.Builder> {
- private TestPackedExtensions() { }
- private static readonly TestPackedExtensions defaultInstance = new TestPackedExtensions().MakeReadOnly();
- private static readonly string[] _testPackedExtensionsFieldNames = new string[] { };
- private static readonly uint[] _testPackedExtensionsFieldTags = new uint[] { };
- public static TestPackedExtensions DefaultInstance {
- get { return defaultInstance; }
- }
-
- public override TestPackedExtensions DefaultInstanceForType {
- get { return DefaultInstance; }
- }
-
- protected override TestPackedExtensions ThisMessage {
- get { return this; }
- }
-
- public static pbd::MessageDescriptor Descriptor {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.internal__static_protobuf_unittest_TestPackedExtensions__Descriptor; }
- }
-
- protected override pb::FieldAccess.FieldAccessorTable<TestPackedExtensions, TestPackedExtensions.Builder> InternalFieldAccessors {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.internal__static_protobuf_unittest_TestPackedExtensions__FieldAccessorTable; }
- }
-
- public override bool IsInitialized {
- get {
- if (!ExtensionsAreInitialized) return false;
- return true;
- }
- }
-
- public override void WriteTo(pb::ICodedOutputStream output) {
- CalcSerializedSize();
- string[] field_names = _testPackedExtensionsFieldNames;
- pb::ExtendableMessage<TestPackedExtensions, TestPackedExtensions.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;
- return CalcSerializedSize();
- }
- }
-
- private int CalcSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- size += ExtensionsSerializedSize;
- size += UnknownFields.SerializedSize;
- memoizedSerializedSize = size;
- return size;
- }
- public static TestPackedExtensions ParseFrom(pb::ByteString data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static TestPackedExtensions ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static TestPackedExtensions ParseFrom(byte[] data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static TestPackedExtensions ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static TestPackedExtensions ParseFrom(global::System.IO.Stream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static TestPackedExtensions ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- public static TestPackedExtensions ParseDelimitedFrom(global::System.IO.Stream input) {
- return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
- }
- public static TestPackedExtensions ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
- }
- public static TestPackedExtensions ParseFrom(pb::ICodedInputStream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static TestPackedExtensions ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- private TestPackedExtensions 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(TestPackedExtensions prototype) {
- return new Builder(prototype);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class Builder : pb::ExtendableBuilder<TestPackedExtensions, Builder> {
- protected override Builder ThisBuilder {
- get { return this; }
- }
- public Builder() {
- result = DefaultInstance;
- resultIsReadOnly = true;
- }
- internal Builder(TestPackedExtensions cloneFrom) {
- result = cloneFrom;
- resultIsReadOnly = true;
- }
-
- private bool resultIsReadOnly;
- private TestPackedExtensions result;
-
- private TestPackedExtensions PrepareBuilder() {
- if (resultIsReadOnly) {
- TestPackedExtensions original = result;
- result = new TestPackedExtensions();
- resultIsReadOnly = false;
- MergeFrom(original);
- }
- return result;
- }
-
- public override bool IsInitialized {
- get { return result.IsInitialized; }
- }
-
- protected override TestPackedExtensions 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.TestPackedExtensions.Descriptor; }
- }
-
- public override TestPackedExtensions DefaultInstanceForType {
- get { return global::Google.ProtocolBuffers.TestProtos.TestPackedExtensions.DefaultInstance; }
- }
-
- public override TestPackedExtensions BuildPartial() {
- if (resultIsReadOnly) {
- return result;
- }
- resultIsReadOnly = true;
- return result.MakeReadOnly();
- }
-
- public override Builder MergeFrom(pb::IMessage other) {
- if (other is TestPackedExtensions) {
- return MergeFrom((TestPackedExtensions) other);
- } else {
- base.MergeFrom(other);
- return this;
- }
- }
-
- public override Builder MergeFrom(TestPackedExtensions other) {
- if (other == global::Google.ProtocolBuffers.TestProtos.TestPackedExtensions.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(_testPackedExtensionsFieldNames, field_name, global::System.StringComparer.Ordinal);
- if(field_ordinal >= 0)
- tag = _testPackedExtensionsFieldTags[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 TestPackedExtensions() {
- object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor, null);
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class TestDynamicExtensions : pb::GeneratedMessage<TestDynamicExtensions, TestDynamicExtensions.Builder> {
- private TestDynamicExtensions() { }
- private static readonly TestDynamicExtensions defaultInstance = new TestDynamicExtensions().MakeReadOnly();
- private static readonly string[] _testDynamicExtensionsFieldNames = new string[] { "dynamic_enum_extension", "dynamic_message_extension", "enum_extension", "message_extension", "packed_extension", "repeated_extension", "scalar_extension" };
- private static readonly uint[] _testDynamicExtensionsFieldTags = new uint[] { 16016, 16034, 16008, 16026, 16050, 16042, 16005 };
- public static TestDynamicExtensions DefaultInstance {
- get { return defaultInstance; }
- }
-
- public override TestDynamicExtensions DefaultInstanceForType {
- get { return DefaultInstance; }
- }
-
- protected override TestDynamicExtensions ThisMessage {
- get { return this; }
- }
-
- public static pbd::MessageDescriptor Descriptor {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.internal__static_protobuf_unittest_TestDynamicExtensions__Descriptor; }
- }
-
- protected override pb::FieldAccess.FieldAccessorTable<TestDynamicExtensions, TestDynamicExtensions.Builder> InternalFieldAccessors {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.internal__static_protobuf_unittest_TestDynamicExtensions__FieldAccessorTable; }
- }
-
- #region Nested types
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public static partial class Types {
- public enum DynamicEnumType {
- DYNAMIC_FOO = 2200,
- DYNAMIC_BAR = 2201,
- DYNAMIC_BAZ = 2202,
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class DynamicMessageType : pb::GeneratedMessage<DynamicMessageType, DynamicMessageType.Builder> {
- private DynamicMessageType() { }
- private static readonly DynamicMessageType defaultInstance = new DynamicMessageType().MakeReadOnly();
- private static readonly string[] _dynamicMessageTypeFieldNames = new string[] { "dynamic_field" };
- private static readonly uint[] _dynamicMessageTypeFieldTags = new uint[] { 16800 };
- public static DynamicMessageType DefaultInstance {
- get { return defaultInstance; }
- }
-
- public override DynamicMessageType DefaultInstanceForType {
- get { return DefaultInstance; }
- }
-
- protected override DynamicMessageType ThisMessage {
- get { return this; }
- }
-
- public static pbd::MessageDescriptor Descriptor {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.internal__static_protobuf_unittest_TestDynamicExtensions_DynamicMessageType__Descriptor; }
- }
-
- protected override pb::FieldAccess.FieldAccessorTable<DynamicMessageType, DynamicMessageType.Builder> InternalFieldAccessors {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.internal__static_protobuf_unittest_TestDynamicExtensions_DynamicMessageType__FieldAccessorTable; }
- }
-
- public const int DynamicFieldFieldNumber = 2100;
- private bool hasDynamicField;
- private int dynamicField_;
- public bool HasDynamicField {
- get { return hasDynamicField; }
- }
- public int DynamicField {
- get { return dynamicField_; }
- }
-
- public override bool IsInitialized {
- get {
- return true;
- }
- }
-
- public override void WriteTo(pb::ICodedOutputStream output) {
- CalcSerializedSize();
- string[] field_names = _dynamicMessageTypeFieldNames;
- if (hasDynamicField) {
- output.WriteInt32(2100, field_names[0], DynamicField);
- }
- UnknownFields.WriteTo(output);
- }
-
- private int memoizedSerializedSize = -1;
- public override int SerializedSize {
- get {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
- return CalcSerializedSize();
- }
- }
-
- private int CalcSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- if (hasDynamicField) {
- size += pb::CodedOutputStream.ComputeInt32Size(2100, DynamicField);
- }
- size += UnknownFields.SerializedSize;
- memoizedSerializedSize = size;
- return size;
- }
- public static DynamicMessageType ParseFrom(pb::ByteString data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static DynamicMessageType ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static DynamicMessageType ParseFrom(byte[] data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static DynamicMessageType ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static DynamicMessageType ParseFrom(global::System.IO.Stream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static DynamicMessageType ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- public static DynamicMessageType ParseDelimitedFrom(global::System.IO.Stream input) {
- return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
- }
- public static DynamicMessageType ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
- }
- public static DynamicMessageType ParseFrom(pb::ICodedInputStream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static DynamicMessageType ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- private DynamicMessageType 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(DynamicMessageType prototype) {
- return new Builder(prototype);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class Builder : pb::GeneratedBuilder<DynamicMessageType, Builder> {
- protected override Builder ThisBuilder {
- get { return this; }
- }
- public Builder() {
- result = DefaultInstance;
- resultIsReadOnly = true;
- }
- internal Builder(DynamicMessageType cloneFrom) {
- result = cloneFrom;
- resultIsReadOnly = true;
- }
-
- private bool resultIsReadOnly;
- private DynamicMessageType result;
-
- private DynamicMessageType PrepareBuilder() {
- if (resultIsReadOnly) {
- DynamicMessageType original = result;
- result = new DynamicMessageType();
- resultIsReadOnly = false;
- MergeFrom(original);
- }
- return result;
- }
-
- public override bool IsInitialized {
- get { return result.IsInitialized; }
- }
-
- protected override DynamicMessageType 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.TestDynamicExtensions.Types.DynamicMessageType.Descriptor; }
- }
-
- public override DynamicMessageType DefaultInstanceForType {
- get { return global::Google.ProtocolBuffers.TestProtos.TestDynamicExtensions.Types.DynamicMessageType.DefaultInstance; }
- }
-
- public override DynamicMessageType BuildPartial() {
- if (resultIsReadOnly) {
- return result;
- }
- resultIsReadOnly = true;
- return result.MakeReadOnly();
- }
-
- public override Builder MergeFrom(pb::IMessage other) {
- if (other is DynamicMessageType) {
- return MergeFrom((DynamicMessageType) other);
- } else {
- base.MergeFrom(other);
- return this;
- }
- }
-
- public override Builder MergeFrom(DynamicMessageType other) {
- if (other == global::Google.ProtocolBuffers.TestProtos.TestDynamicExtensions.Types.DynamicMessageType.DefaultInstance) return this;
- PrepareBuilder();
- if (other.HasDynamicField) {
- DynamicField = other.DynamicField;
- }
- 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(_dynamicMessageTypeFieldNames, field_name, global::System.StringComparer.Ordinal);
- if(field_ordinal >= 0)
- tag = _dynamicMessageTypeFieldTags[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 16800: {
- result.hasDynamicField = input.ReadInt32(ref result.dynamicField_);
- break;
- }
- }
- }
-
- if (unknownFields != null) {
- this.UnknownFields = unknownFields.Build();
- }
- return this;
- }
-
-
- public bool HasDynamicField {
- get { return result.hasDynamicField; }
- }
- public int DynamicField {
- get { return result.DynamicField; }
- set { SetDynamicField(value); }
- }
- public Builder SetDynamicField(int value) {
- PrepareBuilder();
- result.hasDynamicField = true;
- result.dynamicField_ = value;
- return this;
- }
- public Builder ClearDynamicField() {
- PrepareBuilder();
- result.hasDynamicField = false;
- result.dynamicField_ = 0;
- return this;
- }
- }
- static DynamicMessageType() {
- object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor, null);
- }
- }
-
- }
- #endregion
-
- public const int ScalarExtensionFieldNumber = 2000;
- private bool hasScalarExtension;
- private uint scalarExtension_;
- public bool HasScalarExtension {
- get { return hasScalarExtension; }
- }
- [global::System.CLSCompliant(false)]
- public uint ScalarExtension {
- get { return scalarExtension_; }
- }
-
- public const int EnumExtensionFieldNumber = 2001;
- private bool hasEnumExtension;
- private global::Google.ProtocolBuffers.TestProtos.ForeignEnum enumExtension_ = global::Google.ProtocolBuffers.TestProtos.ForeignEnum.FOREIGN_FOO;
- public bool HasEnumExtension {
- get { return hasEnumExtension; }
- }
- public global::Google.ProtocolBuffers.TestProtos.ForeignEnum EnumExtension {
- get { return enumExtension_; }
- }
-
- public const int DynamicEnumExtensionFieldNumber = 2002;
- private bool hasDynamicEnumExtension;
- private global::Google.ProtocolBuffers.TestProtos.TestDynamicExtensions.Types.DynamicEnumType dynamicEnumExtension_ = global::Google.ProtocolBuffers.TestProtos.TestDynamicExtensions.Types.DynamicEnumType.DYNAMIC_FOO;
- public bool HasDynamicEnumExtension {
- get { return hasDynamicEnumExtension; }
- }
- public global::Google.ProtocolBuffers.TestProtos.TestDynamicExtensions.Types.DynamicEnumType DynamicEnumExtension {
- get { return dynamicEnumExtension_; }
- }
-
- public const int MessageExtensionFieldNumber = 2003;
- private bool hasMessageExtension;
- private global::Google.ProtocolBuffers.TestProtos.ForeignMessage messageExtension_;
- public bool HasMessageExtension {
- get { return hasMessageExtension; }
- }
- public global::Google.ProtocolBuffers.TestProtos.ForeignMessage MessageExtension {
- get { return messageExtension_ ?? global::Google.ProtocolBuffers.TestProtos.ForeignMessage.DefaultInstance; }
- }
-
- public const int DynamicMessageExtensionFieldNumber = 2004;
- private bool hasDynamicMessageExtension;
- private global::Google.ProtocolBuffers.TestProtos.TestDynamicExtensions.Types.DynamicMessageType dynamicMessageExtension_;
- public bool HasDynamicMessageExtension {
- get { return hasDynamicMessageExtension; }
- }
- public global::Google.ProtocolBuffers.TestProtos.TestDynamicExtensions.Types.DynamicMessageType DynamicMessageExtension {
- get { return dynamicMessageExtension_ ?? global::Google.ProtocolBuffers.TestProtos.TestDynamicExtensions.Types.DynamicMessageType.DefaultInstance; }
- }
-
- public const int RepeatedExtensionFieldNumber = 2005;
- private pbc::PopsicleList<string> repeatedExtension_ = new pbc::PopsicleList<string>();
- public scg::IList<string> RepeatedExtensionList {
- get { return pbc::Lists.AsReadOnly(repeatedExtension_); }
- }
- public int RepeatedExtensionCount {
- get { return repeatedExtension_.Count; }
- }
- public string GetRepeatedExtension(int index) {
- return repeatedExtension_[index];
- }
-
- public const int PackedExtensionFieldNumber = 2006;
- private int packedExtensionMemoizedSerializedSize;
- private pbc::PopsicleList<int> packedExtension_ = new pbc::PopsicleList<int>();
- public scg::IList<int> PackedExtensionList {
- get { return pbc::Lists.AsReadOnly(packedExtension_); }
- }
- public int PackedExtensionCount {
- get { return packedExtension_.Count; }
- }
- public int GetPackedExtension(int index) {
- return packedExtension_[index];
- }
-
- public override bool IsInitialized {
- get {
- return true;
- }
- }
-
- public override void WriteTo(pb::ICodedOutputStream output) {
- CalcSerializedSize();
- string[] field_names = _testDynamicExtensionsFieldNames;
- if (hasScalarExtension) {
- output.WriteFixed32(2000, field_names[6], ScalarExtension);
- }
- if (hasEnumExtension) {
- output.WriteEnum(2001, field_names[2], (int) EnumExtension, EnumExtension);
- }
- if (hasDynamicEnumExtension) {
- output.WriteEnum(2002, field_names[0], (int) DynamicEnumExtension, DynamicEnumExtension);
- }
- if (hasMessageExtension) {
- output.WriteMessage(2003, field_names[3], MessageExtension);
- }
- if (hasDynamicMessageExtension) {
- output.WriteMessage(2004, field_names[1], DynamicMessageExtension);
- }
- if (repeatedExtension_.Count > 0) {
- output.WriteStringArray(2005, field_names[5], repeatedExtension_);
- }
- if (packedExtension_.Count > 0) {
- output.WritePackedSInt32Array(2006, field_names[4], packedExtensionMemoizedSerializedSize, packedExtension_);
- }
- UnknownFields.WriteTo(output);
- }
-
- private int memoizedSerializedSize = -1;
- public override int SerializedSize {
- get {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
- return CalcSerializedSize();
- }
- }
-
- private int CalcSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- if (hasScalarExtension) {
- size += pb::CodedOutputStream.ComputeFixed32Size(2000, ScalarExtension);
- }
- if (hasEnumExtension) {
- size += pb::CodedOutputStream.ComputeEnumSize(2001, (int) EnumExtension);
- }
- if (hasDynamicEnumExtension) {
- size += pb::CodedOutputStream.ComputeEnumSize(2002, (int) DynamicEnumExtension);
- }
- if (hasMessageExtension) {
- size += pb::CodedOutputStream.ComputeMessageSize(2003, MessageExtension);
- }
- if (hasDynamicMessageExtension) {
- size += pb::CodedOutputStream.ComputeMessageSize(2004, DynamicMessageExtension);
- }
- {
- int dataSize = 0;
- foreach (string element in RepeatedExtensionList) {
- dataSize += pb::CodedOutputStream.ComputeStringSizeNoTag(element);
- }
- size += dataSize;
- size += 2 * repeatedExtension_.Count;
- }
- {
- int dataSize = 0;
- foreach (int element in PackedExtensionList) {
- dataSize += pb::CodedOutputStream.ComputeSInt32SizeNoTag(element);
- }
- size += dataSize;
- if (packedExtension_.Count != 0) {
- size += 2 + pb::CodedOutputStream.ComputeInt32SizeNoTag(dataSize);
- }
- packedExtensionMemoizedSerializedSize = dataSize;
- }
- size += UnknownFields.SerializedSize;
- memoizedSerializedSize = size;
- return size;
- }
- public static TestDynamicExtensions ParseFrom(pb::ByteString data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static TestDynamicExtensions ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static TestDynamicExtensions ParseFrom(byte[] data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static TestDynamicExtensions ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static TestDynamicExtensions ParseFrom(global::System.IO.Stream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static TestDynamicExtensions ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- public static TestDynamicExtensions ParseDelimitedFrom(global::System.IO.Stream input) {
- return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
- }
- public static TestDynamicExtensions ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
- }
- public static TestDynamicExtensions ParseFrom(pb::ICodedInputStream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static TestDynamicExtensions ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- private TestDynamicExtensions MakeReadOnly() {
- repeatedExtension_.MakeReadOnly();
- packedExtension_.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(TestDynamicExtensions prototype) {
- return new Builder(prototype);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class Builder : pb::GeneratedBuilder<TestDynamicExtensions, Builder> {
- protected override Builder ThisBuilder {
- get { return this; }
- }
- public Builder() {
- result = DefaultInstance;
- resultIsReadOnly = true;
- }
- internal Builder(TestDynamicExtensions cloneFrom) {
- result = cloneFrom;
- resultIsReadOnly = true;
- }
-
- private bool resultIsReadOnly;
- private TestDynamicExtensions result;
-
- private TestDynamicExtensions PrepareBuilder() {
- if (resultIsReadOnly) {
- TestDynamicExtensions original = result;
- result = new TestDynamicExtensions();
- resultIsReadOnly = false;
- MergeFrom(original);
- }
- return result;
- }
-
- public override bool IsInitialized {
- get { return result.IsInitialized; }
- }
-
- protected override TestDynamicExtensions 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.TestDynamicExtensions.Descriptor; }
- }
-
- public override TestDynamicExtensions DefaultInstanceForType {
- get { return global::Google.ProtocolBuffers.TestProtos.TestDynamicExtensions.DefaultInstance; }
- }
-
- public override TestDynamicExtensions BuildPartial() {
- if (resultIsReadOnly) {
- return result;
- }
- resultIsReadOnly = true;
- return result.MakeReadOnly();
- }
-
- public override Builder MergeFrom(pb::IMessage other) {
- if (other is TestDynamicExtensions) {
- return MergeFrom((TestDynamicExtensions) other);
- } else {
- base.MergeFrom(other);
- return this;
- }
- }
-
- public override Builder MergeFrom(TestDynamicExtensions other) {
- if (other == global::Google.ProtocolBuffers.TestProtos.TestDynamicExtensions.DefaultInstance) return this;
- PrepareBuilder();
- if (other.HasScalarExtension) {
- ScalarExtension = other.ScalarExtension;
- }
- if (other.HasEnumExtension) {
- EnumExtension = other.EnumExtension;
- }
- if (other.HasDynamicEnumExtension) {
- DynamicEnumExtension = other.DynamicEnumExtension;
- }
- if (other.HasMessageExtension) {
- MergeMessageExtension(other.MessageExtension);
- }
- if (other.HasDynamicMessageExtension) {
- MergeDynamicMessageExtension(other.DynamicMessageExtension);
- }
- if (other.repeatedExtension_.Count != 0) {
- result.repeatedExtension_.Add(other.repeatedExtension_);
- }
- if (other.packedExtension_.Count != 0) {
- result.packedExtension_.Add(other.packedExtension_);
- }
- 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(_testDynamicExtensionsFieldNames, field_name, global::System.StringComparer.Ordinal);
- if(field_ordinal >= 0)
- tag = _testDynamicExtensionsFieldTags[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 16005: {
- result.hasScalarExtension = input.ReadFixed32(ref result.scalarExtension_);
- break;
- }
- case 16008: {
- object unknown;
- if(input.ReadEnum(ref result.enumExtension_, out unknown)) {
- result.hasEnumExtension = true;
- } else if(unknown is int) {
- if (unknownFields == null) {
- unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
- }
- unknownFields.MergeVarintField(2001, (ulong)(int)unknown);
- }
- break;
- }
- case 16016: {
- object unknown;
- if(input.ReadEnum(ref result.dynamicEnumExtension_, out unknown)) {
- result.hasDynamicEnumExtension = true;
- } else if(unknown is int) {
- if (unknownFields == null) {
- unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
- }
- unknownFields.MergeVarintField(2002, (ulong)(int)unknown);
- }
- break;
- }
- case 16026: {
- global::Google.ProtocolBuffers.TestProtos.ForeignMessage.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.ForeignMessage.CreateBuilder();
- if (result.hasMessageExtension) {
- subBuilder.MergeFrom(MessageExtension);
- }
- input.ReadMessage(subBuilder, extensionRegistry);
- MessageExtension = subBuilder.BuildPartial();
- break;
- }
- case 16034: {
- global::Google.ProtocolBuffers.TestProtos.TestDynamicExtensions.Types.DynamicMessageType.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.TestDynamicExtensions.Types.DynamicMessageType.CreateBuilder();
- if (result.hasDynamicMessageExtension) {
- subBuilder.MergeFrom(DynamicMessageExtension);
- }
- input.ReadMessage(subBuilder, extensionRegistry);
- DynamicMessageExtension = subBuilder.BuildPartial();
- break;
- }
- case 16042: {
- input.ReadStringArray(tag, field_name, result.repeatedExtension_);
- break;
- }
- case 16050:
- case 16048: {
- input.ReadSInt32Array(tag, field_name, result.packedExtension_);
- break;
- }
- }
- }
-
- if (unknownFields != null) {
- this.UnknownFields = unknownFields.Build();
- }
- return this;
- }
-
-
- public bool HasScalarExtension {
- get { return result.hasScalarExtension; }
- }
- [global::System.CLSCompliant(false)]
- public uint ScalarExtension {
- get { return result.ScalarExtension; }
- set { SetScalarExtension(value); }
- }
- [global::System.CLSCompliant(false)]
- public Builder SetScalarExtension(uint value) {
- PrepareBuilder();
- result.hasScalarExtension = true;
- result.scalarExtension_ = value;
- return this;
- }
- public Builder ClearScalarExtension() {
- PrepareBuilder();
- result.hasScalarExtension = false;
- result.scalarExtension_ = 0;
- return this;
- }
-
- public bool HasEnumExtension {
- get { return result.hasEnumExtension; }
- }
- public global::Google.ProtocolBuffers.TestProtos.ForeignEnum EnumExtension {
- get { return result.EnumExtension; }
- set { SetEnumExtension(value); }
- }
- public Builder SetEnumExtension(global::Google.ProtocolBuffers.TestProtos.ForeignEnum value) {
- PrepareBuilder();
- result.hasEnumExtension = true;
- result.enumExtension_ = value;
- return this;
- }
- public Builder ClearEnumExtension() {
- PrepareBuilder();
- result.hasEnumExtension = false;
- result.enumExtension_ = global::Google.ProtocolBuffers.TestProtos.ForeignEnum.FOREIGN_FOO;
- return this;
- }
-
- public bool HasDynamicEnumExtension {
- get { return result.hasDynamicEnumExtension; }
- }
- public global::Google.ProtocolBuffers.TestProtos.TestDynamicExtensions.Types.DynamicEnumType DynamicEnumExtension {
- get { return result.DynamicEnumExtension; }
- set { SetDynamicEnumExtension(value); }
- }
- public Builder SetDynamicEnumExtension(global::Google.ProtocolBuffers.TestProtos.TestDynamicExtensions.Types.DynamicEnumType value) {
- PrepareBuilder();
- result.hasDynamicEnumExtension = true;
- result.dynamicEnumExtension_ = value;
- return this;
- }
- public Builder ClearDynamicEnumExtension() {
- PrepareBuilder();
- result.hasDynamicEnumExtension = false;
- result.dynamicEnumExtension_ = global::Google.ProtocolBuffers.TestProtos.TestDynamicExtensions.Types.DynamicEnumType.DYNAMIC_FOO;
- return this;
- }
-
- public bool HasMessageExtension {
- get { return result.hasMessageExtension; }
- }
- public global::Google.ProtocolBuffers.TestProtos.ForeignMessage MessageExtension {
- get { return result.MessageExtension; }
- set { SetMessageExtension(value); }
- }
- public Builder SetMessageExtension(global::Google.ProtocolBuffers.TestProtos.ForeignMessage value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.hasMessageExtension = true;
- result.messageExtension_ = value;
- return this;
- }
- public Builder SetMessageExtension(global::Google.ProtocolBuffers.TestProtos.ForeignMessage.Builder builderForValue) {
- pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
- PrepareBuilder();
- result.hasMessageExtension = true;
- result.messageExtension_ = builderForValue.Build();
- return this;
- }
- public Builder MergeMessageExtension(global::Google.ProtocolBuffers.TestProtos.ForeignMessage value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- if (result.hasMessageExtension &&
- result.messageExtension_ != global::Google.ProtocolBuffers.TestProtos.ForeignMessage.DefaultInstance) {
- result.messageExtension_ = global::Google.ProtocolBuffers.TestProtos.ForeignMessage.CreateBuilder(result.messageExtension_).MergeFrom(value).BuildPartial();
- } else {
- result.messageExtension_ = value;
- }
- result.hasMessageExtension = true;
- return this;
- }
- public Builder ClearMessageExtension() {
- PrepareBuilder();
- result.hasMessageExtension = false;
- result.messageExtension_ = null;
- return this;
- }
-
- public bool HasDynamicMessageExtension {
- get { return result.hasDynamicMessageExtension; }
- }
- public global::Google.ProtocolBuffers.TestProtos.TestDynamicExtensions.Types.DynamicMessageType DynamicMessageExtension {
- get { return result.DynamicMessageExtension; }
- set { SetDynamicMessageExtension(value); }
- }
- public Builder SetDynamicMessageExtension(global::Google.ProtocolBuffers.TestProtos.TestDynamicExtensions.Types.DynamicMessageType value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.hasDynamicMessageExtension = true;
- result.dynamicMessageExtension_ = value;
- return this;
- }
- public Builder SetDynamicMessageExtension(global::Google.ProtocolBuffers.TestProtos.TestDynamicExtensions.Types.DynamicMessageType.Builder builderForValue) {
- pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
- PrepareBuilder();
- result.hasDynamicMessageExtension = true;
- result.dynamicMessageExtension_ = builderForValue.Build();
- return this;
- }
- public Builder MergeDynamicMessageExtension(global::Google.ProtocolBuffers.TestProtos.TestDynamicExtensions.Types.DynamicMessageType value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- if (result.hasDynamicMessageExtension &&
- result.dynamicMessageExtension_ != global::Google.ProtocolBuffers.TestProtos.TestDynamicExtensions.Types.DynamicMessageType.DefaultInstance) {
- result.dynamicMessageExtension_ = global::Google.ProtocolBuffers.TestProtos.TestDynamicExtensions.Types.DynamicMessageType.CreateBuilder(result.dynamicMessageExtension_).MergeFrom(value).BuildPartial();
- } else {
- result.dynamicMessageExtension_ = value;
- }
- result.hasDynamicMessageExtension = true;
- return this;
- }
- public Builder ClearDynamicMessageExtension() {
- PrepareBuilder();
- result.hasDynamicMessageExtension = false;
- result.dynamicMessageExtension_ = null;
- return this;
- }
-
- public pbc::IPopsicleList<string> RepeatedExtensionList {
- get { return PrepareBuilder().repeatedExtension_; }
- }
- public int RepeatedExtensionCount {
- get { return result.RepeatedExtensionCount; }
- }
- public string GetRepeatedExtension(int index) {
- return result.GetRepeatedExtension(index);
- }
- public Builder SetRepeatedExtension(int index, string value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.repeatedExtension_[index] = value;
- return this;
- }
- public Builder AddRepeatedExtension(string value) {
- pb::ThrowHelper.ThrowIfNull(value, "value");
- PrepareBuilder();
- result.repeatedExtension_.Add(value);
- return this;
- }
- public Builder AddRangeRepeatedExtension(scg::IEnumerable<string> values) {
- PrepareBuilder();
- result.repeatedExtension_.Add(values);
- return this;
- }
- public Builder ClearRepeatedExtension() {
- PrepareBuilder();
- result.repeatedExtension_.Clear();
- return this;
- }
-
- public pbc::IPopsicleList<int> PackedExtensionList {
- get { return PrepareBuilder().packedExtension_; }
- }
- public int PackedExtensionCount {
- get { return result.PackedExtensionCount; }
- }
- public int GetPackedExtension(int index) {
- return result.GetPackedExtension(index);
- }
- public Builder SetPackedExtension(int index, int value) {
- PrepareBuilder();
- result.packedExtension_[index] = value;
- return this;
- }
- public Builder AddPackedExtension(int value) {
- PrepareBuilder();
- result.packedExtension_.Add(value);
- return this;
- }
- public Builder AddRangePackedExtension(scg::IEnumerable<int> values) {
- PrepareBuilder();
- result.packedExtension_.Add(values);
- return this;
- }
- public Builder ClearPackedExtension() {
- PrepareBuilder();
- result.packedExtension_.Clear();
- return this;
- }
- }
- static TestDynamicExtensions() {
- object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor, null);
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class TestRepeatedScalarDifferentTagSizes : pb::GeneratedMessage<TestRepeatedScalarDifferentTagSizes, TestRepeatedScalarDifferentTagSizes.Builder> {
- private TestRepeatedScalarDifferentTagSizes() { }
- private static readonly TestRepeatedScalarDifferentTagSizes defaultInstance = new TestRepeatedScalarDifferentTagSizes().MakeReadOnly();
- private static readonly string[] _testRepeatedScalarDifferentTagSizesFieldNames = new string[] { "repeated_fixed32", "repeated_fixed64", "repeated_float", "repeated_int32", "repeated_int64", "repeated_uint64" };
- private static readonly uint[] _testRepeatedScalarDifferentTagSizesFieldTags = new uint[] { 101, 16369, 2097141, 104, 16376, 2097144 };
- public static TestRepeatedScalarDifferentTagSizes DefaultInstance {
- get { return defaultInstance; }
- }
-
- public override TestRepeatedScalarDifferentTagSizes DefaultInstanceForType {
- get { return DefaultInstance; }
- }
-
- protected override TestRepeatedScalarDifferentTagSizes ThisMessage {
- get { return this; }
- }
-
- public static pbd::MessageDescriptor Descriptor {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.internal__static_protobuf_unittest_TestRepeatedScalarDifferentTagSizes__Descriptor; }
- }
-
- protected override pb::FieldAccess.FieldAccessorTable<TestRepeatedScalarDifferentTagSizes, TestRepeatedScalarDifferentTagSizes.Builder> InternalFieldAccessors {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.internal__static_protobuf_unittest_TestRepeatedScalarDifferentTagSizes__FieldAccessorTable; }
- }
-
- public const int RepeatedFixed32FieldNumber = 12;
- private pbc::PopsicleList<uint> repeatedFixed32_ = new pbc::PopsicleList<uint>();
- [global::System.CLSCompliant(false)]
- public scg::IList<uint> RepeatedFixed32List {
- get { return pbc::Lists.AsReadOnly(repeatedFixed32_); }
- }
- public int RepeatedFixed32Count {
- get { return repeatedFixed32_.Count; }
- }
- [global::System.CLSCompliant(false)]
- public uint GetRepeatedFixed32(int index) {
- return repeatedFixed32_[index];
- }
-
- public const int RepeatedInt32FieldNumber = 13;
- private pbc::PopsicleList<int> repeatedInt32_ = new pbc::PopsicleList<int>();
- public scg::IList<int> RepeatedInt32List {
- get { return pbc::Lists.AsReadOnly(repeatedInt32_); }
- }
- public int RepeatedInt32Count {
- get { return repeatedInt32_.Count; }
- }
- public int GetRepeatedInt32(int index) {
- return repeatedInt32_[index];
- }
-
- public const int RepeatedFixed64FieldNumber = 2046;
- private pbc::PopsicleList<ulong> repeatedFixed64_ = new pbc::PopsicleList<ulong>();
- [global::System.CLSCompliant(false)]
- public scg::IList<ulong> RepeatedFixed64List {
- get { return pbc::Lists.AsReadOnly(repeatedFixed64_); }
- }
- public int RepeatedFixed64Count {
- get { return repeatedFixed64_.Count; }
- }
- [global::System.CLSCompliant(false)]
- public ulong GetRepeatedFixed64(int index) {
- return repeatedFixed64_[index];
- }
-
- public const int RepeatedInt64FieldNumber = 2047;
- private pbc::PopsicleList<long> repeatedInt64_ = new pbc::PopsicleList<long>();
- public scg::IList<long> RepeatedInt64List {
- get { return pbc::Lists.AsReadOnly(repeatedInt64_); }
- }
- public int RepeatedInt64Count {
- get { return repeatedInt64_.Count; }
- }
- public long GetRepeatedInt64(int index) {
- return repeatedInt64_[index];
- }
-
- public const int RepeatedFloatFieldNumber = 262142;
- private pbc::PopsicleList<float> repeatedFloat_ = new pbc::PopsicleList<float>();
- public scg::IList<float> RepeatedFloatList {
- get { return pbc::Lists.AsReadOnly(repeatedFloat_); }
- }
- public int RepeatedFloatCount {
- get { return repeatedFloat_.Count; }
- }
- public float GetRepeatedFloat(int index) {
- return repeatedFloat_[index];
- }
-
- public const int RepeatedUint64FieldNumber = 262143;
- private pbc::PopsicleList<ulong> repeatedUint64_ = new pbc::PopsicleList<ulong>();
- [global::System.CLSCompliant(false)]
- public scg::IList<ulong> RepeatedUint64List {
- get { return pbc::Lists.AsReadOnly(repeatedUint64_); }
- }
- public int RepeatedUint64Count {
- get { return repeatedUint64_.Count; }
- }
- [global::System.CLSCompliant(false)]
- public ulong GetRepeatedUint64(int index) {
- return repeatedUint64_[index];
- }
-
- public override bool IsInitialized {
- get {
- return true;
- }
- }
-
- public override void WriteTo(pb::ICodedOutputStream output) {
- CalcSerializedSize();
- string[] field_names = _testRepeatedScalarDifferentTagSizesFieldNames;
- if (repeatedFixed32_.Count > 0) {
- output.WriteFixed32Array(12, field_names[0], repeatedFixed32_);
- }
- if (repeatedInt32_.Count > 0) {
- output.WriteInt32Array(13, field_names[3], repeatedInt32_);
- }
- if (repeatedFixed64_.Count > 0) {
- output.WriteFixed64Array(2046, field_names[1], repeatedFixed64_);
- }
- if (repeatedInt64_.Count > 0) {
- output.WriteInt64Array(2047, field_names[4], repeatedInt64_);
- }
- if (repeatedFloat_.Count > 0) {
- output.WriteFloatArray(262142, field_names[2], repeatedFloat_);
- }
- if (repeatedUint64_.Count > 0) {
- output.WriteUInt64Array(262143, field_names[5], repeatedUint64_);
- }
- UnknownFields.WriteTo(output);
- }
-
- private int memoizedSerializedSize = -1;
- public override int SerializedSize {
- get {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
- return CalcSerializedSize();
- }
- }
-
- private int CalcSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- {
- int dataSize = 0;
- dataSize = 4 * repeatedFixed32_.Count;
- size += dataSize;
- size += 1 * repeatedFixed32_.Count;
- }
- {
- int dataSize = 0;
- foreach (int element in RepeatedInt32List) {
- dataSize += pb::CodedOutputStream.ComputeInt32SizeNoTag(element);
- }
- size += dataSize;
- size += 1 * repeatedInt32_.Count;
- }
- {
- int dataSize = 0;
- dataSize = 8 * repeatedFixed64_.Count;
- size += dataSize;
- size += 2 * repeatedFixed64_.Count;
- }
- {
- int dataSize = 0;
- foreach (long element in RepeatedInt64List) {
- dataSize += pb::CodedOutputStream.ComputeInt64SizeNoTag(element);
- }
- size += dataSize;
- size += 2 * repeatedInt64_.Count;
- }
- {
- int dataSize = 0;
- dataSize = 4 * repeatedFloat_.Count;
- size += dataSize;
- size += 3 * repeatedFloat_.Count;
- }
- {
- int dataSize = 0;
- foreach (ulong element in RepeatedUint64List) {
- dataSize += pb::CodedOutputStream.ComputeUInt64SizeNoTag(element);
- }
- size += dataSize;
- size += 3 * repeatedUint64_.Count;
- }
- size += UnknownFields.SerializedSize;
- memoizedSerializedSize = size;
- return size;
- }
- public static TestRepeatedScalarDifferentTagSizes ParseFrom(pb::ByteString data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static TestRepeatedScalarDifferentTagSizes ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static TestRepeatedScalarDifferentTagSizes ParseFrom(byte[] data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static TestRepeatedScalarDifferentTagSizes ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static TestRepeatedScalarDifferentTagSizes ParseFrom(global::System.IO.Stream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static TestRepeatedScalarDifferentTagSizes ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- public static TestRepeatedScalarDifferentTagSizes ParseDelimitedFrom(global::System.IO.Stream input) {
- return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
- }
- public static TestRepeatedScalarDifferentTagSizes ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
- }
- public static TestRepeatedScalarDifferentTagSizes ParseFrom(pb::ICodedInputStream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static TestRepeatedScalarDifferentTagSizes ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- private TestRepeatedScalarDifferentTagSizes MakeReadOnly() {
- repeatedFixed32_.MakeReadOnly();
- repeatedInt32_.MakeReadOnly();
- repeatedFixed64_.MakeReadOnly();
- repeatedInt64_.MakeReadOnly();
- repeatedFloat_.MakeReadOnly();
- repeatedUint64_.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(TestRepeatedScalarDifferentTagSizes prototype) {
- return new Builder(prototype);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class Builder : pb::GeneratedBuilder<TestRepeatedScalarDifferentTagSizes, Builder> {
- protected override Builder ThisBuilder {
- get { return this; }
- }
- public Builder() {
- result = DefaultInstance;
- resultIsReadOnly = true;
- }
- internal Builder(TestRepeatedScalarDifferentTagSizes cloneFrom) {
- result = cloneFrom;
- resultIsReadOnly = true;
- }
-
- private bool resultIsReadOnly;
- private TestRepeatedScalarDifferentTagSizes result;
-
- private TestRepeatedScalarDifferentTagSizes PrepareBuilder() {
- if (resultIsReadOnly) {
- TestRepeatedScalarDifferentTagSizes original = result;
- result = new TestRepeatedScalarDifferentTagSizes();
- resultIsReadOnly = false;
- MergeFrom(original);
- }
- return result;
- }
-
- public override bool IsInitialized {
- get { return result.IsInitialized; }
- }
-
- protected override TestRepeatedScalarDifferentTagSizes 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.TestRepeatedScalarDifferentTagSizes.Descriptor; }
- }
-
- public override TestRepeatedScalarDifferentTagSizes DefaultInstanceForType {
- get { return global::Google.ProtocolBuffers.TestProtos.TestRepeatedScalarDifferentTagSizes.DefaultInstance; }
- }
-
- public override TestRepeatedScalarDifferentTagSizes BuildPartial() {
- if (resultIsReadOnly) {
- return result;
- }
- resultIsReadOnly = true;
- return result.MakeReadOnly();
- }
-
- public override Builder MergeFrom(pb::IMessage other) {
- if (other is TestRepeatedScalarDifferentTagSizes) {
- return MergeFrom((TestRepeatedScalarDifferentTagSizes) other);
- } else {
- base.MergeFrom(other);
- return this;
- }
- }
-
- public override Builder MergeFrom(TestRepeatedScalarDifferentTagSizes other) {
- if (other == global::Google.ProtocolBuffers.TestProtos.TestRepeatedScalarDifferentTagSizes.DefaultInstance) return this;
- PrepareBuilder();
- if (other.repeatedFixed32_.Count != 0) {
- result.repeatedFixed32_.Add(other.repeatedFixed32_);
- }
- if (other.repeatedInt32_.Count != 0) {
- result.repeatedInt32_.Add(other.repeatedInt32_);
- }
- if (other.repeatedFixed64_.Count != 0) {
- result.repeatedFixed64_.Add(other.repeatedFixed64_);
- }
- if (other.repeatedInt64_.Count != 0) {
- result.repeatedInt64_.Add(other.repeatedInt64_);
- }
- if (other.repeatedFloat_.Count != 0) {
- result.repeatedFloat_.Add(other.repeatedFloat_);
- }
- if (other.repeatedUint64_.Count != 0) {
- result.repeatedUint64_.Add(other.repeatedUint64_);
- }
- 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(_testRepeatedScalarDifferentTagSizesFieldNames, field_name, global::System.StringComparer.Ordinal);
- if(field_ordinal >= 0)
- tag = _testRepeatedScalarDifferentTagSizesFieldTags[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 98:
- case 101: {
- input.ReadFixed32Array(tag, field_name, result.repeatedFixed32_);
- break;
- }
- case 106:
- case 104: {
- input.ReadInt32Array(tag, field_name, result.repeatedInt32_);
- break;
- }
- case 16370:
- case 16369: {
- input.ReadFixed64Array(tag, field_name, result.repeatedFixed64_);
- break;
- }
- case 16378:
- case 16376: {
- input.ReadInt64Array(tag, field_name, result.repeatedInt64_);
- break;
- }
- case 2097138:
- case 2097141: {
- input.ReadFloatArray(tag, field_name, result.repeatedFloat_);
- break;
- }
- case 2097146:
- case 2097144: {
- input.ReadUInt64Array(tag, field_name, result.repeatedUint64_);
- break;
- }
- }
- }
-
- if (unknownFields != null) {
- this.UnknownFields = unknownFields.Build();
- }
- return this;
- }
-
-
- [global::System.CLSCompliant(false)]
- public pbc::IPopsicleList<uint> RepeatedFixed32List {
- get { return PrepareBuilder().repeatedFixed32_; }
- }
- public int RepeatedFixed32Count {
- get { return result.RepeatedFixed32Count; }
- }
- [global::System.CLSCompliant(false)]
- public uint GetRepeatedFixed32(int index) {
- return result.GetRepeatedFixed32(index);
- }
- [global::System.CLSCompliant(false)]
- public Builder SetRepeatedFixed32(int index, uint value) {
- PrepareBuilder();
- result.repeatedFixed32_[index] = value;
- return this;
- }
- [global::System.CLSCompliant(false)]
- public Builder AddRepeatedFixed32(uint value) {
- PrepareBuilder();
- result.repeatedFixed32_.Add(value);
- return this;
- }
- [global::System.CLSCompliant(false)]
- public Builder AddRangeRepeatedFixed32(scg::IEnumerable<uint> values) {
- PrepareBuilder();
- result.repeatedFixed32_.Add(values);
- return this;
- }
- public Builder ClearRepeatedFixed32() {
- PrepareBuilder();
- result.repeatedFixed32_.Clear();
- return this;
- }
-
- public pbc::IPopsicleList<int> RepeatedInt32List {
- get { return PrepareBuilder().repeatedInt32_; }
- }
- public int RepeatedInt32Count {
- get { return result.RepeatedInt32Count; }
- }
- public int GetRepeatedInt32(int index) {
- return result.GetRepeatedInt32(index);
- }
- public Builder SetRepeatedInt32(int index, int value) {
- PrepareBuilder();
- result.repeatedInt32_[index] = value;
- return this;
- }
- public Builder AddRepeatedInt32(int value) {
- PrepareBuilder();
- result.repeatedInt32_.Add(value);
- return this;
- }
- public Builder AddRangeRepeatedInt32(scg::IEnumerable<int> values) {
- PrepareBuilder();
- result.repeatedInt32_.Add(values);
- return this;
- }
- public Builder ClearRepeatedInt32() {
- PrepareBuilder();
- result.repeatedInt32_.Clear();
- return this;
- }
-
- [global::System.CLSCompliant(false)]
- public pbc::IPopsicleList<ulong> RepeatedFixed64List {
- get { return PrepareBuilder().repeatedFixed64_; }
- }
- public int RepeatedFixed64Count {
- get { return result.RepeatedFixed64Count; }
- }
- [global::System.CLSCompliant(false)]
- public ulong GetRepeatedFixed64(int index) {
- return result.GetRepeatedFixed64(index);
- }
- [global::System.CLSCompliant(false)]
- public Builder SetRepeatedFixed64(int index, ulong value) {
- PrepareBuilder();
- result.repeatedFixed64_[index] = value;
- return this;
- }
- [global::System.CLSCompliant(false)]
- public Builder AddRepeatedFixed64(ulong value) {
- PrepareBuilder();
- result.repeatedFixed64_.Add(value);
- return this;
- }
- [global::System.CLSCompliant(false)]
- public Builder AddRangeRepeatedFixed64(scg::IEnumerable<ulong> values) {
- PrepareBuilder();
- result.repeatedFixed64_.Add(values);
- return this;
- }
- public Builder ClearRepeatedFixed64() {
- PrepareBuilder();
- result.repeatedFixed64_.Clear();
- return this;
- }
-
- public pbc::IPopsicleList<long> RepeatedInt64List {
- get { return PrepareBuilder().repeatedInt64_; }
- }
- public int RepeatedInt64Count {
- get { return result.RepeatedInt64Count; }
- }
- public long GetRepeatedInt64(int index) {
- return result.GetRepeatedInt64(index);
- }
- public Builder SetRepeatedInt64(int index, long value) {
- PrepareBuilder();
- result.repeatedInt64_[index] = value;
- return this;
- }
- public Builder AddRepeatedInt64(long value) {
- PrepareBuilder();
- result.repeatedInt64_.Add(value);
- return this;
- }
- public Builder AddRangeRepeatedInt64(scg::IEnumerable<long> values) {
- PrepareBuilder();
- result.repeatedInt64_.Add(values);
- return this;
- }
- public Builder ClearRepeatedInt64() {
- PrepareBuilder();
- result.repeatedInt64_.Clear();
- return this;
- }
-
- public pbc::IPopsicleList<float> RepeatedFloatList {
- get { return PrepareBuilder().repeatedFloat_; }
- }
- public int RepeatedFloatCount {
- get { return result.RepeatedFloatCount; }
- }
- public float GetRepeatedFloat(int index) {
- return result.GetRepeatedFloat(index);
- }
- public Builder SetRepeatedFloat(int index, float value) {
- PrepareBuilder();
- result.repeatedFloat_[index] = value;
- return this;
- }
- public Builder AddRepeatedFloat(float value) {
- PrepareBuilder();
- result.repeatedFloat_.Add(value);
- return this;
- }
- public Builder AddRangeRepeatedFloat(scg::IEnumerable<float> values) {
- PrepareBuilder();
- result.repeatedFloat_.Add(values);
- return this;
- }
- public Builder ClearRepeatedFloat() {
- PrepareBuilder();
- result.repeatedFloat_.Clear();
- return this;
- }
-
- [global::System.CLSCompliant(false)]
- public pbc::IPopsicleList<ulong> RepeatedUint64List {
- get { return PrepareBuilder().repeatedUint64_; }
- }
- public int RepeatedUint64Count {
- get { return result.RepeatedUint64Count; }
- }
- [global::System.CLSCompliant(false)]
- public ulong GetRepeatedUint64(int index) {
- return result.GetRepeatedUint64(index);
- }
- [global::System.CLSCompliant(false)]
- public Builder SetRepeatedUint64(int index, ulong value) {
- PrepareBuilder();
- result.repeatedUint64_[index] = value;
- return this;
- }
- [global::System.CLSCompliant(false)]
- public Builder AddRepeatedUint64(ulong value) {
- PrepareBuilder();
- result.repeatedUint64_.Add(value);
- return this;
- }
- [global::System.CLSCompliant(false)]
- public Builder AddRangeRepeatedUint64(scg::IEnumerable<ulong> values) {
- PrepareBuilder();
- result.repeatedUint64_.Add(values);
- return this;
- }
- public Builder ClearRepeatedUint64() {
- PrepareBuilder();
- result.repeatedUint64_.Clear();
- return this;
- }
- }
- static TestRepeatedScalarDifferentTagSizes() {
- object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor, null);
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class FooRequest : pb::GeneratedMessage<FooRequest, FooRequest.Builder> {
- private FooRequest() { }
- private static readonly FooRequest defaultInstance = new FooRequest().MakeReadOnly();
- private static readonly string[] _fooRequestFieldNames = new string[] { };
- private static readonly uint[] _fooRequestFieldTags = new uint[] { };
- public static FooRequest DefaultInstance {
- get { return defaultInstance; }
- }
-
- public override FooRequest DefaultInstanceForType {
- get { return DefaultInstance; }
- }
-
- protected override FooRequest ThisMessage {
- get { return this; }
- }
-
- public static pbd::MessageDescriptor Descriptor {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.internal__static_protobuf_unittest_FooRequest__Descriptor; }
- }
-
- protected override pb::FieldAccess.FieldAccessorTable<FooRequest, FooRequest.Builder> InternalFieldAccessors {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.internal__static_protobuf_unittest_FooRequest__FieldAccessorTable; }
- }
-
- public override bool IsInitialized {
- get {
- return true;
- }
- }
-
- public override void WriteTo(pb::ICodedOutputStream output) {
- CalcSerializedSize();
- string[] field_names = _fooRequestFieldNames;
- UnknownFields.WriteTo(output);
- }
-
- private int memoizedSerializedSize = -1;
- public override int SerializedSize {
- get {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
- return CalcSerializedSize();
- }
- }
-
- private int CalcSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- size += UnknownFields.SerializedSize;
- memoizedSerializedSize = size;
- return size;
- }
- public static FooRequest ParseFrom(pb::ByteString data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static FooRequest ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static FooRequest ParseFrom(byte[] data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static FooRequest ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static FooRequest ParseFrom(global::System.IO.Stream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static FooRequest ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- public static FooRequest ParseDelimitedFrom(global::System.IO.Stream input) {
- return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
- }
- public static FooRequest ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
- }
- public static FooRequest ParseFrom(pb::ICodedInputStream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static FooRequest ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- private FooRequest 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(FooRequest prototype) {
- return new Builder(prototype);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class Builder : pb::GeneratedBuilder<FooRequest, Builder> {
- protected override Builder ThisBuilder {
- get { return this; }
- }
- public Builder() {
- result = DefaultInstance;
- resultIsReadOnly = true;
- }
- internal Builder(FooRequest cloneFrom) {
- result = cloneFrom;
- resultIsReadOnly = true;
- }
-
- private bool resultIsReadOnly;
- private FooRequest result;
-
- private FooRequest PrepareBuilder() {
- if (resultIsReadOnly) {
- FooRequest original = result;
- result = new FooRequest();
- resultIsReadOnly = false;
- MergeFrom(original);
- }
- return result;
- }
-
- public override bool IsInitialized {
- get { return result.IsInitialized; }
- }
-
- protected override FooRequest 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.FooRequest.Descriptor; }
- }
-
- public override FooRequest DefaultInstanceForType {
- get { return global::Google.ProtocolBuffers.TestProtos.FooRequest.DefaultInstance; }
- }
-
- public override FooRequest BuildPartial() {
- if (resultIsReadOnly) {
- return result;
- }
- resultIsReadOnly = true;
- return result.MakeReadOnly();
- }
-
- public override Builder MergeFrom(pb::IMessage other) {
- if (other is FooRequest) {
- return MergeFrom((FooRequest) other);
- } else {
- base.MergeFrom(other);
- return this;
- }
- }
-
- public override Builder MergeFrom(FooRequest other) {
- if (other == global::Google.ProtocolBuffers.TestProtos.FooRequest.DefaultInstance) return this;
- PrepareBuilder();
- this.MergeUnknownFields(other.UnknownFields);
- return this;
- }
-
- public override Builder MergeFrom(pb::ICodedInputStream input) {
- return MergeFrom(input, pb::ExtensionRegistry.Empty);
- }
-
- public override Builder MergeFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
- PrepareBuilder();
- pb::UnknownFieldSet.Builder unknownFields = null;
- uint tag;
- string field_name;
- while (input.ReadTag(out tag, out field_name)) {
- if(tag == 0 && field_name != null) {
- int field_ordinal = global::System.Array.BinarySearch(_fooRequestFieldNames, field_name, global::System.StringComparer.Ordinal);
- if(field_ordinal >= 0)
- tag = _fooRequestFieldTags[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 FooRequest() {
- object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor, null);
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class FooResponse : pb::GeneratedMessage<FooResponse, FooResponse.Builder> {
- private FooResponse() { }
- private static readonly FooResponse defaultInstance = new FooResponse().MakeReadOnly();
- private static readonly string[] _fooResponseFieldNames = new string[] { };
- private static readonly uint[] _fooResponseFieldTags = new uint[] { };
- public static FooResponse DefaultInstance {
- get { return defaultInstance; }
- }
-
- public override FooResponse DefaultInstanceForType {
- get { return DefaultInstance; }
- }
-
- protected override FooResponse ThisMessage {
- get { return this; }
- }
-
- public static pbd::MessageDescriptor Descriptor {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.internal__static_protobuf_unittest_FooResponse__Descriptor; }
- }
-
- protected override pb::FieldAccess.FieldAccessorTable<FooResponse, FooResponse.Builder> InternalFieldAccessors {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.internal__static_protobuf_unittest_FooResponse__FieldAccessorTable; }
- }
-
- public override bool IsInitialized {
- get {
- return true;
- }
- }
-
- public override void WriteTo(pb::ICodedOutputStream output) {
- CalcSerializedSize();
- string[] field_names = _fooResponseFieldNames;
- UnknownFields.WriteTo(output);
- }
-
- private int memoizedSerializedSize = -1;
- public override int SerializedSize {
- get {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
- return CalcSerializedSize();
- }
- }
-
- private int CalcSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- size += UnknownFields.SerializedSize;
- memoizedSerializedSize = size;
- return size;
- }
- public static FooResponse ParseFrom(pb::ByteString data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static FooResponse ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static FooResponse ParseFrom(byte[] data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static FooResponse ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static FooResponse ParseFrom(global::System.IO.Stream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static FooResponse ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- public static FooResponse ParseDelimitedFrom(global::System.IO.Stream input) {
- return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
- }
- public static FooResponse ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
- }
- public static FooResponse ParseFrom(pb::ICodedInputStream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static FooResponse ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- private FooResponse 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(FooResponse prototype) {
- return new Builder(prototype);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class Builder : pb::GeneratedBuilder<FooResponse, Builder> {
- protected override Builder ThisBuilder {
- get { return this; }
- }
- public Builder() {
- result = DefaultInstance;
- resultIsReadOnly = true;
- }
- internal Builder(FooResponse cloneFrom) {
- result = cloneFrom;
- resultIsReadOnly = true;
- }
-
- private bool resultIsReadOnly;
- private FooResponse result;
-
- private FooResponse PrepareBuilder() {
- if (resultIsReadOnly) {
- FooResponse original = result;
- result = new FooResponse();
- resultIsReadOnly = false;
- MergeFrom(original);
- }
- return result;
- }
-
- public override bool IsInitialized {
- get { return result.IsInitialized; }
- }
-
- protected override FooResponse 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.FooResponse.Descriptor; }
- }
-
- public override FooResponse DefaultInstanceForType {
- get { return global::Google.ProtocolBuffers.TestProtos.FooResponse.DefaultInstance; }
- }
-
- public override FooResponse BuildPartial() {
- if (resultIsReadOnly) {
- return result;
- }
- resultIsReadOnly = true;
- return result.MakeReadOnly();
- }
-
- public override Builder MergeFrom(pb::IMessage other) {
- if (other is FooResponse) {
- return MergeFrom((FooResponse) other);
- } else {
- base.MergeFrom(other);
- return this;
- }
- }
-
- public override Builder MergeFrom(FooResponse other) {
- if (other == global::Google.ProtocolBuffers.TestProtos.FooResponse.DefaultInstance) return this;
- PrepareBuilder();
- this.MergeUnknownFields(other.UnknownFields);
- return this;
- }
-
- public override Builder MergeFrom(pb::ICodedInputStream input) {
- return MergeFrom(input, pb::ExtensionRegistry.Empty);
- }
-
- public override Builder MergeFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
- PrepareBuilder();
- pb::UnknownFieldSet.Builder unknownFields = null;
- uint tag;
- string field_name;
- while (input.ReadTag(out tag, out field_name)) {
- if(tag == 0 && field_name != null) {
- int field_ordinal = global::System.Array.BinarySearch(_fooResponseFieldNames, field_name, global::System.StringComparer.Ordinal);
- if(field_ordinal >= 0)
- tag = _fooResponseFieldTags[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 FooResponse() {
- object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor, null);
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class BarRequest : pb::GeneratedMessage<BarRequest, BarRequest.Builder> {
- private BarRequest() { }
- private static readonly BarRequest defaultInstance = new BarRequest().MakeReadOnly();
- private static readonly string[] _barRequestFieldNames = new string[] { };
- private static readonly uint[] _barRequestFieldTags = new uint[] { };
- public static BarRequest DefaultInstance {
- get { return defaultInstance; }
- }
-
- public override BarRequest DefaultInstanceForType {
- get { return DefaultInstance; }
- }
-
- protected override BarRequest ThisMessage {
- get { return this; }
- }
-
- public static pbd::MessageDescriptor Descriptor {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.internal__static_protobuf_unittest_BarRequest__Descriptor; }
- }
-
- protected override pb::FieldAccess.FieldAccessorTable<BarRequest, BarRequest.Builder> InternalFieldAccessors {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.internal__static_protobuf_unittest_BarRequest__FieldAccessorTable; }
- }
-
- public override bool IsInitialized {
- get {
- return true;
- }
- }
-
- public override void WriteTo(pb::ICodedOutputStream output) {
- CalcSerializedSize();
- string[] field_names = _barRequestFieldNames;
- UnknownFields.WriteTo(output);
- }
-
- private int memoizedSerializedSize = -1;
- public override int SerializedSize {
- get {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
- return CalcSerializedSize();
- }
- }
-
- private int CalcSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- size += UnknownFields.SerializedSize;
- memoizedSerializedSize = size;
- return size;
- }
- public static BarRequest ParseFrom(pb::ByteString data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static BarRequest ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static BarRequest ParseFrom(byte[] data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static BarRequest ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static BarRequest ParseFrom(global::System.IO.Stream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static BarRequest ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- public static BarRequest ParseDelimitedFrom(global::System.IO.Stream input) {
- return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
- }
- public static BarRequest ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
- }
- public static BarRequest ParseFrom(pb::ICodedInputStream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static BarRequest ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- private BarRequest 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(BarRequest prototype) {
- return new Builder(prototype);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class Builder : pb::GeneratedBuilder<BarRequest, Builder> {
- protected override Builder ThisBuilder {
- get { return this; }
- }
- public Builder() {
- result = DefaultInstance;
- resultIsReadOnly = true;
- }
- internal Builder(BarRequest cloneFrom) {
- result = cloneFrom;
- resultIsReadOnly = true;
- }
-
- private bool resultIsReadOnly;
- private BarRequest result;
-
- private BarRequest PrepareBuilder() {
- if (resultIsReadOnly) {
- BarRequest original = result;
- result = new BarRequest();
- resultIsReadOnly = false;
- MergeFrom(original);
- }
- return result;
- }
-
- public override bool IsInitialized {
- get { return result.IsInitialized; }
- }
-
- protected override BarRequest 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.BarRequest.Descriptor; }
- }
-
- public override BarRequest DefaultInstanceForType {
- get { return global::Google.ProtocolBuffers.TestProtos.BarRequest.DefaultInstance; }
- }
-
- public override BarRequest BuildPartial() {
- if (resultIsReadOnly) {
- return result;
- }
- resultIsReadOnly = true;
- return result.MakeReadOnly();
- }
-
- public override Builder MergeFrom(pb::IMessage other) {
- if (other is BarRequest) {
- return MergeFrom((BarRequest) other);
- } else {
- base.MergeFrom(other);
- return this;
- }
- }
-
- public override Builder MergeFrom(BarRequest other) {
- if (other == global::Google.ProtocolBuffers.TestProtos.BarRequest.DefaultInstance) return this;
- PrepareBuilder();
- this.MergeUnknownFields(other.UnknownFields);
- return this;
- }
-
- public override Builder MergeFrom(pb::ICodedInputStream input) {
- return MergeFrom(input, pb::ExtensionRegistry.Empty);
- }
-
- public override Builder MergeFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
- PrepareBuilder();
- pb::UnknownFieldSet.Builder unknownFields = null;
- uint tag;
- string field_name;
- while (input.ReadTag(out tag, out field_name)) {
- if(tag == 0 && field_name != null) {
- int field_ordinal = global::System.Array.BinarySearch(_barRequestFieldNames, field_name, global::System.StringComparer.Ordinal);
- if(field_ordinal >= 0)
- tag = _barRequestFieldTags[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 BarRequest() {
- object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor, null);
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class BarResponse : pb::GeneratedMessage<BarResponse, BarResponse.Builder> {
- private BarResponse() { }
- private static readonly BarResponse defaultInstance = new BarResponse().MakeReadOnly();
- private static readonly string[] _barResponseFieldNames = new string[] { };
- private static readonly uint[] _barResponseFieldTags = new uint[] { };
- public static BarResponse DefaultInstance {
- get { return defaultInstance; }
- }
-
- public override BarResponse DefaultInstanceForType {
- get { return DefaultInstance; }
- }
-
- protected override BarResponse ThisMessage {
- get { return this; }
- }
-
- public static pbd::MessageDescriptor Descriptor {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.internal__static_protobuf_unittest_BarResponse__Descriptor; }
- }
-
- protected override pb::FieldAccess.FieldAccessorTable<BarResponse, BarResponse.Builder> InternalFieldAccessors {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.internal__static_protobuf_unittest_BarResponse__FieldAccessorTable; }
- }
-
- public override bool IsInitialized {
- get {
- return true;
- }
- }
-
- public override void WriteTo(pb::ICodedOutputStream output) {
- CalcSerializedSize();
- string[] field_names = _barResponseFieldNames;
- UnknownFields.WriteTo(output);
- }
-
- private int memoizedSerializedSize = -1;
- public override int SerializedSize {
- get {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
- return CalcSerializedSize();
- }
- }
-
- private int CalcSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- size += UnknownFields.SerializedSize;
- memoizedSerializedSize = size;
- return size;
- }
- public static BarResponse ParseFrom(pb::ByteString data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static BarResponse ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static BarResponse ParseFrom(byte[] data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static BarResponse ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static BarResponse ParseFrom(global::System.IO.Stream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static BarResponse ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- public static BarResponse ParseDelimitedFrom(global::System.IO.Stream input) {
- return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
- }
- public static BarResponse ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
- }
- public static BarResponse ParseFrom(pb::ICodedInputStream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static BarResponse ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- private BarResponse 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(BarResponse prototype) {
- return new Builder(prototype);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class Builder : pb::GeneratedBuilder<BarResponse, Builder> {
- protected override Builder ThisBuilder {
- get { return this; }
- }
- public Builder() {
- result = DefaultInstance;
- resultIsReadOnly = true;
- }
- internal Builder(BarResponse cloneFrom) {
- result = cloneFrom;
- resultIsReadOnly = true;
- }
-
- private bool resultIsReadOnly;
- private BarResponse result;
-
- private BarResponse PrepareBuilder() {
- if (resultIsReadOnly) {
- BarResponse original = result;
- result = new BarResponse();
- resultIsReadOnly = false;
- MergeFrom(original);
- }
- return result;
- }
-
- public override bool IsInitialized {
- get { return result.IsInitialized; }
- }
-
- protected override BarResponse 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.BarResponse.Descriptor; }
- }
-
- public override BarResponse DefaultInstanceForType {
- get { return global::Google.ProtocolBuffers.TestProtos.BarResponse.DefaultInstance; }
- }
-
- public override BarResponse BuildPartial() {
- if (resultIsReadOnly) {
- return result;
- }
- resultIsReadOnly = true;
- return result.MakeReadOnly();
- }
-
- public override Builder MergeFrom(pb::IMessage other) {
- if (other is BarResponse) {
- return MergeFrom((BarResponse) other);
- } else {
- base.MergeFrom(other);
- return this;
- }
- }
-
- public override Builder MergeFrom(BarResponse other) {
- if (other == global::Google.ProtocolBuffers.TestProtos.BarResponse.DefaultInstance) return this;
- PrepareBuilder();
- this.MergeUnknownFields(other.UnknownFields);
- return this;
- }
-
- public override Builder MergeFrom(pb::ICodedInputStream input) {
- return MergeFrom(input, pb::ExtensionRegistry.Empty);
- }
-
- public override Builder MergeFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
- PrepareBuilder();
- pb::UnknownFieldSet.Builder unknownFields = null;
- uint tag;
- string field_name;
- while (input.ReadTag(out tag, out field_name)) {
- if(tag == 0 && field_name != null) {
- int field_ordinal = global::System.Array.BinarySearch(_barResponseFieldNames, field_name, global::System.StringComparer.Ordinal);
- if(field_ordinal >= 0)
- tag = _barResponseFieldTags[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 BarResponse() {
- object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.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;
- */
- #endregion
-
-}
-
-#endregion Designer generated code
diff --git a/csharp/src/ProtoBench/Unittest.cs b/csharp/src/ProtoBench/Unittest.cs
new file mode 100644
index 0000000..d39c934
--- /dev/null
+++ b/csharp/src/ProtoBench/Unittest.cs
@@ -0,0 +1,33516 @@
+// Manual changes:
+// - Search and replace of RepeatedFieldsGenerator.Group to RepeatedFieldsGenerator.Types.Group
+//
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/protobuf/unittest.proto
+#pragma warning disable 1591, 0612, 3021
+#region Designer generated code
+
+using pb = global::Google.ProtocolBuffers;
+using pbc = global::Google.ProtocolBuffers.Collections;
+using pbd = global::Google.ProtocolBuffers.Descriptors;
+using scg = global::System.Collections.Generic;
+namespace Google.ProtocolBuffers.TestProtos {
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public static partial class Unittest {
+
+ #region Extension registration
+ public static void RegisterAllExtensions(pb::ExtensionRegistry registry) {
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.OptionalInt32Extension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.OptionalInt64Extension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.OptionalUint32Extension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.OptionalUint64Extension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.OptionalSint32Extension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.OptionalSint64Extension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.OptionalFixed32Extension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.OptionalFixed64Extension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.OptionalSfixed32Extension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.OptionalSfixed64Extension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.OptionalFloatExtension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.OptionalDoubleExtension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.OptionalBoolExtension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.OptionalStringExtension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.OptionalBytesExtension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.OptionalGroupExtension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.OptionalNestedMessageExtension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.OptionalForeignMessageExtension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.OptionalImportMessageExtension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.OptionalNestedEnumExtension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.OptionalForeignEnumExtension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.OptionalImportEnumExtension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.OptionalStringPieceExtension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.OptionalCordExtension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.OptionalPublicImportMessageExtension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.OptionalLazyMessageExtension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.RepeatedInt32Extension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.RepeatedInt64Extension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.RepeatedUint32Extension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.RepeatedUint64Extension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.RepeatedSint32Extension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.RepeatedSint64Extension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.RepeatedFixed32Extension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.RepeatedFixed64Extension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.RepeatedSfixed32Extension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.RepeatedSfixed64Extension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.RepeatedFloatExtension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.RepeatedDoubleExtension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.RepeatedBoolExtension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.RepeatedStringExtension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.RepeatedBytesExtension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.RepeatedGroupExtension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.RepeatedNestedMessageExtension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.RepeatedForeignMessageExtension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.RepeatedImportMessageExtension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.RepeatedNestedEnumExtension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.RepeatedForeignEnumExtension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.RepeatedImportEnumExtension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.RepeatedStringPieceExtension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.RepeatedCordExtension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.RepeatedLazyMessageExtension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.DefaultInt32Extension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.DefaultInt64Extension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.DefaultUint32Extension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.DefaultUint64Extension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.DefaultSint32Extension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.DefaultSint64Extension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.DefaultFixed32Extension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.DefaultFixed64Extension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.DefaultSfixed32Extension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.DefaultSfixed64Extension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.DefaultFloatExtension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.DefaultDoubleExtension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.DefaultBoolExtension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.DefaultStringExtension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.DefaultBytesExtension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.DefaultNestedEnumExtension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.DefaultForeignEnumExtension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.DefaultImportEnumExtension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.DefaultStringPieceExtension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.DefaultCordExtension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.OneofUint32Extension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.OneofNestedMessageExtension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.OneofStringExtension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.OneofBytesExtension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.MyExtensionString);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.MyExtensionInt);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.PackedInt32Extension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.PackedInt64Extension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.PackedUint32Extension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.PackedUint64Extension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.PackedSint32Extension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.PackedSint64Extension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.PackedFixed32Extension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.PackedFixed64Extension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.PackedSfixed32Extension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.PackedSfixed64Extension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.PackedFloatExtension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.PackedDoubleExtension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.PackedBoolExtension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.PackedEnumExtension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.UnpackedInt32Extension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.UnpackedInt64Extension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.UnpackedUint32Extension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.UnpackedUint64Extension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.UnpackedSint32Extension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.UnpackedSint64Extension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.UnpackedFixed32Extension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.UnpackedFixed64Extension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.UnpackedSfixed32Extension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.UnpackedSfixed64Extension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.UnpackedFloatExtension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.UnpackedDoubleExtension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.UnpackedBoolExtension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.Unittest.UnpackedEnumExtension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.TestNestedExtension.Test);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.TestNestedExtension.NestedStringExtension);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.TestRequired.Single);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.TestRequired.Multi);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.OptionalExt);
+ registry.Add(global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.RepeatedExt);
+ }
+ #endregion
+ #region Extensions
+ public const int OptionalInt32ExtensionFieldNumber = 1;
+ public static pb::GeneratedExtensionBase<int> OptionalInt32Extension;
+ public const int OptionalInt64ExtensionFieldNumber = 2;
+ public static pb::GeneratedExtensionBase<long> OptionalInt64Extension;
+ public const int OptionalUint32ExtensionFieldNumber = 3;
+ [global::System.CLSCompliant(false)]
+ public static pb::GeneratedExtensionBase<uint> OptionalUint32Extension;
+ public const int OptionalUint64ExtensionFieldNumber = 4;
+ [global::System.CLSCompliant(false)]
+ public static pb::GeneratedExtensionBase<ulong> OptionalUint64Extension;
+ public const int OptionalSint32ExtensionFieldNumber = 5;
+ public static pb::GeneratedExtensionBase<int> OptionalSint32Extension;
+ public const int OptionalSint64ExtensionFieldNumber = 6;
+ public static pb::GeneratedExtensionBase<long> OptionalSint64Extension;
+ public const int OptionalFixed32ExtensionFieldNumber = 7;
+ [global::System.CLSCompliant(false)]
+ public static pb::GeneratedExtensionBase<uint> OptionalFixed32Extension;
+ public const int OptionalFixed64ExtensionFieldNumber = 8;
+ [global::System.CLSCompliant(false)]
+ public static pb::GeneratedExtensionBase<ulong> OptionalFixed64Extension;
+ public const int OptionalSfixed32ExtensionFieldNumber = 9;
+ public static pb::GeneratedExtensionBase<int> OptionalSfixed32Extension;
+ public const int OptionalSfixed64ExtensionFieldNumber = 10;
+ public static pb::GeneratedExtensionBase<long> OptionalSfixed64Extension;
+ public const int OptionalFloatExtensionFieldNumber = 11;
+ public static pb::GeneratedExtensionBase<float> OptionalFloatExtension;
+ public const int OptionalDoubleExtensionFieldNumber = 12;
+ public static pb::GeneratedExtensionBase<double> OptionalDoubleExtension;
+ public const int OptionalBoolExtensionFieldNumber = 13;
+ public static pb::GeneratedExtensionBase<bool> OptionalBoolExtension;
+ public const int OptionalStringExtensionFieldNumber = 14;
+ public static pb::GeneratedExtensionBase<string> OptionalStringExtension;
+ public const int OptionalBytesExtensionFieldNumber = 15;
+ public static pb::GeneratedExtensionBase<pb::ByteString> OptionalBytesExtension;
+ public const int OptionalGroupExtensionFieldNumber = 16;
+ public static pb::GeneratedExtensionBase<global::Google.ProtocolBuffers.TestProtos.OptionalGroup_extension> OptionalGroupExtension;
+ public const int OptionalNestedMessageExtensionFieldNumber = 18;
+ public static pb::GeneratedExtensionBase<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage> OptionalNestedMessageExtension;
+ public const int OptionalForeignMessageExtensionFieldNumber = 19;
+ public static pb::GeneratedExtensionBase<global::Google.ProtocolBuffers.TestProtos.ForeignMessage> OptionalForeignMessageExtension;
+ public const int OptionalImportMessageExtensionFieldNumber = 20;
+ public static pb::GeneratedExtensionBase<global::Google.ProtocolBuffers.TestProtos.ImportMessage> OptionalImportMessageExtension;
+ public const int OptionalNestedEnumExtensionFieldNumber = 21;
+ public static pb::GeneratedExtensionBase<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedEnum> OptionalNestedEnumExtension;
+ public const int OptionalForeignEnumExtensionFieldNumber = 22;
+ public static pb::GeneratedExtensionBase<global::Google.ProtocolBuffers.TestProtos.ForeignEnum> OptionalForeignEnumExtension;
+ public const int OptionalImportEnumExtensionFieldNumber = 23;
+ public static pb::GeneratedExtensionBase<global::Google.ProtocolBuffers.TestProtos.ImportEnum> OptionalImportEnumExtension;
+ public const int OptionalStringPieceExtensionFieldNumber = 24;
+ public static pb::GeneratedExtensionBase<string> OptionalStringPieceExtension;
+ public const int OptionalCordExtensionFieldNumber = 25;
+ public static pb::GeneratedExtensionBase<string> OptionalCordExtension;
+ public const int OptionalPublicImportMessageExtensionFieldNumber = 26;
+ public static pb::GeneratedExtensionBase<global::Google.ProtocolBuffers.TestProtos.PublicImportMessage> OptionalPublicImportMessageExtension;
+ public const int OptionalLazyMessageExtensionFieldNumber = 27;
+ public static pb::GeneratedExtensionBase<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage> OptionalLazyMessageExtension;
+ public const int RepeatedInt32ExtensionFieldNumber = 31;
+ public static pb::GeneratedExtensionBase<scg::IList<int>> RepeatedInt32Extension;
+ public const int RepeatedInt64ExtensionFieldNumber = 32;
+ public static pb::GeneratedExtensionBase<scg::IList<long>> RepeatedInt64Extension;
+ public const int RepeatedUint32ExtensionFieldNumber = 33;
+ [global::System.CLSCompliant(false)]
+ public static pb::GeneratedExtensionBase<scg::IList<uint>> RepeatedUint32Extension;
+ public const int RepeatedUint64ExtensionFieldNumber = 34;
+ [global::System.CLSCompliant(false)]
+ public static pb::GeneratedExtensionBase<scg::IList<ulong>> RepeatedUint64Extension;
+ public const int RepeatedSint32ExtensionFieldNumber = 35;
+ public static pb::GeneratedExtensionBase<scg::IList<int>> RepeatedSint32Extension;
+ public const int RepeatedSint64ExtensionFieldNumber = 36;
+ public static pb::GeneratedExtensionBase<scg::IList<long>> RepeatedSint64Extension;
+ public const int RepeatedFixed32ExtensionFieldNumber = 37;
+ [global::System.CLSCompliant(false)]
+ public static pb::GeneratedExtensionBase<scg::IList<uint>> RepeatedFixed32Extension;
+ public const int RepeatedFixed64ExtensionFieldNumber = 38;
+ [global::System.CLSCompliant(false)]
+ public static pb::GeneratedExtensionBase<scg::IList<ulong>> RepeatedFixed64Extension;
+ public const int RepeatedSfixed32ExtensionFieldNumber = 39;
+ public static pb::GeneratedExtensionBase<scg::IList<int>> RepeatedSfixed32Extension;
+ public const int RepeatedSfixed64ExtensionFieldNumber = 40;
+ public static pb::GeneratedExtensionBase<scg::IList<long>> RepeatedSfixed64Extension;
+ public const int RepeatedFloatExtensionFieldNumber = 41;
+ public static pb::GeneratedExtensionBase<scg::IList<float>> RepeatedFloatExtension;
+ public const int RepeatedDoubleExtensionFieldNumber = 42;
+ public static pb::GeneratedExtensionBase<scg::IList<double>> RepeatedDoubleExtension;
+ public const int RepeatedBoolExtensionFieldNumber = 43;
+ public static pb::GeneratedExtensionBase<scg::IList<bool>> RepeatedBoolExtension;
+ public const int RepeatedStringExtensionFieldNumber = 44;
+ public static pb::GeneratedExtensionBase<scg::IList<string>> RepeatedStringExtension;
+ public const int RepeatedBytesExtensionFieldNumber = 45;
+ public static pb::GeneratedExtensionBase<scg::IList<pb::ByteString>> RepeatedBytesExtension;
+ public const int RepeatedGroupExtensionFieldNumber = 46;
+ public static pb::GeneratedExtensionBase<scg::IList<global::Google.ProtocolBuffers.TestProtos.RepeatedGroup_extension>> RepeatedGroupExtension;
+ public const int RepeatedNestedMessageExtensionFieldNumber = 48;
+ public static pb::GeneratedExtensionBase<scg::IList<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage>> RepeatedNestedMessageExtension;
+ public const int RepeatedForeignMessageExtensionFieldNumber = 49;
+ public static pb::GeneratedExtensionBase<scg::IList<global::Google.ProtocolBuffers.TestProtos.ForeignMessage>> RepeatedForeignMessageExtension;
+ public const int RepeatedImportMessageExtensionFieldNumber = 50;
+ public static pb::GeneratedExtensionBase<scg::IList<global::Google.ProtocolBuffers.TestProtos.ImportMessage>> RepeatedImportMessageExtension;
+ public const int RepeatedNestedEnumExtensionFieldNumber = 51;
+ public static pb::GeneratedExtensionBase<scg::IList<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedEnum>> RepeatedNestedEnumExtension;
+ public const int RepeatedForeignEnumExtensionFieldNumber = 52;
+ public static pb::GeneratedExtensionBase<scg::IList<global::Google.ProtocolBuffers.TestProtos.ForeignEnum>> RepeatedForeignEnumExtension;
+ public const int RepeatedImportEnumExtensionFieldNumber = 53;
+ public static pb::GeneratedExtensionBase<scg::IList<global::Google.ProtocolBuffers.TestProtos.ImportEnum>> RepeatedImportEnumExtension;
+ public const int RepeatedStringPieceExtensionFieldNumber = 54;
+ public static pb::GeneratedExtensionBase<scg::IList<string>> RepeatedStringPieceExtension;
+ public const int RepeatedCordExtensionFieldNumber = 55;
+ public static pb::GeneratedExtensionBase<scg::IList<string>> RepeatedCordExtension;
+ public const int RepeatedLazyMessageExtensionFieldNumber = 57;
+ public static pb::GeneratedExtensionBase<scg::IList<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage>> RepeatedLazyMessageExtension;
+ public const int DefaultInt32ExtensionFieldNumber = 61;
+ public static pb::GeneratedExtensionBase<int> DefaultInt32Extension;
+ public const int DefaultInt64ExtensionFieldNumber = 62;
+ public static pb::GeneratedExtensionBase<long> DefaultInt64Extension;
+ public const int DefaultUint32ExtensionFieldNumber = 63;
+ [global::System.CLSCompliant(false)]
+ public static pb::GeneratedExtensionBase<uint> DefaultUint32Extension;
+ public const int DefaultUint64ExtensionFieldNumber = 64;
+ [global::System.CLSCompliant(false)]
+ public static pb::GeneratedExtensionBase<ulong> DefaultUint64Extension;
+ public const int DefaultSint32ExtensionFieldNumber = 65;
+ public static pb::GeneratedExtensionBase<int> DefaultSint32Extension;
+ public const int DefaultSint64ExtensionFieldNumber = 66;
+ public static pb::GeneratedExtensionBase<long> DefaultSint64Extension;
+ public const int DefaultFixed32ExtensionFieldNumber = 67;
+ [global::System.CLSCompliant(false)]
+ public static pb::GeneratedExtensionBase<uint> DefaultFixed32Extension;
+ public const int DefaultFixed64ExtensionFieldNumber = 68;
+ [global::System.CLSCompliant(false)]
+ public static pb::GeneratedExtensionBase<ulong> DefaultFixed64Extension;
+ public const int DefaultSfixed32ExtensionFieldNumber = 69;
+ public static pb::GeneratedExtensionBase<int> DefaultSfixed32Extension;
+ public const int DefaultSfixed64ExtensionFieldNumber = 70;
+ public static pb::GeneratedExtensionBase<long> DefaultSfixed64Extension;
+ public const int DefaultFloatExtensionFieldNumber = 71;
+ public static pb::GeneratedExtensionBase<float> DefaultFloatExtension;
+ public const int DefaultDoubleExtensionFieldNumber = 72;
+ public static pb::GeneratedExtensionBase<double> DefaultDoubleExtension;
+ public const int DefaultBoolExtensionFieldNumber = 73;
+ public static pb::GeneratedExtensionBase<bool> DefaultBoolExtension;
+ public const int DefaultStringExtensionFieldNumber = 74;
+ public static pb::GeneratedExtensionBase<string> DefaultStringExtension;
+ public const int DefaultBytesExtensionFieldNumber = 75;
+ public static pb::GeneratedExtensionBase<pb::ByteString> DefaultBytesExtension;
+ public const int DefaultNestedEnumExtensionFieldNumber = 81;
+ public static pb::GeneratedExtensionBase<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedEnum> DefaultNestedEnumExtension;
+ public const int DefaultForeignEnumExtensionFieldNumber = 82;
+ public static pb::GeneratedExtensionBase<global::Google.ProtocolBuffers.TestProtos.ForeignEnum> DefaultForeignEnumExtension;
+ public const int DefaultImportEnumExtensionFieldNumber = 83;
+ public static pb::GeneratedExtensionBase<global::Google.ProtocolBuffers.TestProtos.ImportEnum> DefaultImportEnumExtension;
+ public const int DefaultStringPieceExtensionFieldNumber = 84;
+ public static pb::GeneratedExtensionBase<string> DefaultStringPieceExtension;
+ public const int DefaultCordExtensionFieldNumber = 85;
+ public static pb::GeneratedExtensionBase<string> DefaultCordExtension;
+ public const int OneofUint32ExtensionFieldNumber = 111;
+ [global::System.CLSCompliant(false)]
+ public static pb::GeneratedExtensionBase<uint> OneofUint32Extension;
+ public const int OneofNestedMessageExtensionFieldNumber = 112;
+ public static pb::GeneratedExtensionBase<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage> OneofNestedMessageExtension;
+ public const int OneofStringExtensionFieldNumber = 113;
+ public static pb::GeneratedExtensionBase<string> OneofStringExtension;
+ public const int OneofBytesExtensionFieldNumber = 114;
+ public static pb::GeneratedExtensionBase<pb::ByteString> OneofBytesExtension;
+ public const int MyExtensionStringFieldNumber = 50;
+ public static pb::GeneratedExtensionBase<string> MyExtensionString;
+ public const int MyExtensionIntFieldNumber = 5;
+ public static pb::GeneratedExtensionBase<int> MyExtensionInt;
+ public const int PackedInt32ExtensionFieldNumber = 90;
+ public static pb::GeneratedExtensionBase<scg::IList<int>> PackedInt32Extension;
+ public const int PackedInt64ExtensionFieldNumber = 91;
+ public static pb::GeneratedExtensionBase<scg::IList<long>> PackedInt64Extension;
+ public const int PackedUint32ExtensionFieldNumber = 92;
+ [global::System.CLSCompliant(false)]
+ public static pb::GeneratedExtensionBase<scg::IList<uint>> PackedUint32Extension;
+ public const int PackedUint64ExtensionFieldNumber = 93;
+ [global::System.CLSCompliant(false)]
+ public static pb::GeneratedExtensionBase<scg::IList<ulong>> PackedUint64Extension;
+ public const int PackedSint32ExtensionFieldNumber = 94;
+ public static pb::GeneratedExtensionBase<scg::IList<int>> PackedSint32Extension;
+ public const int PackedSint64ExtensionFieldNumber = 95;
+ public static pb::GeneratedExtensionBase<scg::IList<long>> PackedSint64Extension;
+ public const int PackedFixed32ExtensionFieldNumber = 96;
+ [global::System.CLSCompliant(false)]
+ public static pb::GeneratedExtensionBase<scg::IList<uint>> PackedFixed32Extension;
+ public const int PackedFixed64ExtensionFieldNumber = 97;
+ [global::System.CLSCompliant(false)]
+ public static pb::GeneratedExtensionBase<scg::IList<ulong>> PackedFixed64Extension;
+ public const int PackedSfixed32ExtensionFieldNumber = 98;
+ public static pb::GeneratedExtensionBase<scg::IList<int>> PackedSfixed32Extension;
+ public const int PackedSfixed64ExtensionFieldNumber = 99;
+ public static pb::GeneratedExtensionBase<scg::IList<long>> PackedSfixed64Extension;
+ public const int PackedFloatExtensionFieldNumber = 100;
+ public static pb::GeneratedExtensionBase<scg::IList<float>> PackedFloatExtension;
+ public const int PackedDoubleExtensionFieldNumber = 101;
+ public static pb::GeneratedExtensionBase<scg::IList<double>> PackedDoubleExtension;
+ public const int PackedBoolExtensionFieldNumber = 102;
+ public static pb::GeneratedExtensionBase<scg::IList<bool>> PackedBoolExtension;
+ public const int PackedEnumExtensionFieldNumber = 103;
+ public static pb::GeneratedExtensionBase<scg::IList<global::Google.ProtocolBuffers.TestProtos.ForeignEnum>> PackedEnumExtension;
+ 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.ForeignEnum>> UnpackedEnumExtension;
+ #endregion
+
+ #region Static variables
+ internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestAllTypes__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestAllTypes, global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Builder> internal__static_protobuf_unittest_TestAllTypes__FieldAccessorTable;
+ internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestAllTypes_NestedMessage__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage, global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage.Builder> internal__static_protobuf_unittest_TestAllTypes_NestedMessage__FieldAccessorTable;
+ internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestAllTypes_OptionalGroup__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.OptionalGroup, global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.OptionalGroup.Builder> internal__static_protobuf_unittest_TestAllTypes_OptionalGroup__FieldAccessorTable;
+ internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestAllTypes_RepeatedGroup__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.RepeatedGroup, global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.RepeatedGroup.Builder> internal__static_protobuf_unittest_TestAllTypes_RepeatedGroup__FieldAccessorTable;
+ internal static pbd::MessageDescriptor internal__static_protobuf_unittest_NestedTestAllTypes__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.NestedTestAllTypes, global::Google.ProtocolBuffers.TestProtos.NestedTestAllTypes.Builder> internal__static_protobuf_unittest_NestedTestAllTypes__FieldAccessorTable;
+ internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestDeprecatedFields__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestDeprecatedFields, global::Google.ProtocolBuffers.TestProtos.TestDeprecatedFields.Builder> internal__static_protobuf_unittest_TestDeprecatedFields__FieldAccessorTable;
+ internal static pbd::MessageDescriptor internal__static_protobuf_unittest_ForeignMessage__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.ForeignMessage, global::Google.ProtocolBuffers.TestProtos.ForeignMessage.Builder> internal__static_protobuf_unittest_ForeignMessage__FieldAccessorTable;
+ internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestAllExtensions__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestAllExtensions, global::Google.ProtocolBuffers.TestProtos.TestAllExtensions.Builder> internal__static_protobuf_unittest_TestAllExtensions__FieldAccessorTable;
+ internal static pbd::MessageDescriptor internal__static_protobuf_unittest_OptionalGroup_extension__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.OptionalGroup_extension, global::Google.ProtocolBuffers.TestProtos.OptionalGroup_extension.Builder> internal__static_protobuf_unittest_OptionalGroup_extension__FieldAccessorTable;
+ internal static pbd::MessageDescriptor internal__static_protobuf_unittest_RepeatedGroup_extension__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.RepeatedGroup_extension, global::Google.ProtocolBuffers.TestProtos.RepeatedGroup_extension.Builder> internal__static_protobuf_unittest_RepeatedGroup_extension__FieldAccessorTable;
+ internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestNestedExtension__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestNestedExtension, global::Google.ProtocolBuffers.TestProtos.TestNestedExtension.Builder> internal__static_protobuf_unittest_TestNestedExtension__FieldAccessorTable;
+ internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestRequired__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestRequired, global::Google.ProtocolBuffers.TestProtos.TestRequired.Builder> internal__static_protobuf_unittest_TestRequired__FieldAccessorTable;
+ internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestRequiredForeign__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestRequiredForeign, global::Google.ProtocolBuffers.TestProtos.TestRequiredForeign.Builder> internal__static_protobuf_unittest_TestRequiredForeign__FieldAccessorTable;
+ internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestForeignNested__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestForeignNested, global::Google.ProtocolBuffers.TestProtos.TestForeignNested.Builder> internal__static_protobuf_unittest_TestForeignNested__FieldAccessorTable;
+ internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestEmptyMessage__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestEmptyMessage, global::Google.ProtocolBuffers.TestProtos.TestEmptyMessage.Builder> internal__static_protobuf_unittest_TestEmptyMessage__FieldAccessorTable;
+ internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestEmptyMessageWithExtensions__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestEmptyMessageWithExtensions, global::Google.ProtocolBuffers.TestProtos.TestEmptyMessageWithExtensions.Builder> internal__static_protobuf_unittest_TestEmptyMessageWithExtensions__FieldAccessorTable;
+ internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestMultipleExtensionRanges__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestMultipleExtensionRanges, global::Google.ProtocolBuffers.TestProtos.TestMultipleExtensionRanges.Builder> internal__static_protobuf_unittest_TestMultipleExtensionRanges__FieldAccessorTable;
+ internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestReallyLargeTagNumber__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestReallyLargeTagNumber, global::Google.ProtocolBuffers.TestProtos.TestReallyLargeTagNumber.Builder> internal__static_protobuf_unittest_TestReallyLargeTagNumber__FieldAccessorTable;
+ internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestRecursiveMessage__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestRecursiveMessage, global::Google.ProtocolBuffers.TestProtos.TestRecursiveMessage.Builder> internal__static_protobuf_unittest_TestRecursiveMessage__FieldAccessorTable;
+ internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestMutualRecursionA__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestMutualRecursionA, global::Google.ProtocolBuffers.TestProtos.TestMutualRecursionA.Builder> internal__static_protobuf_unittest_TestMutualRecursionA__FieldAccessorTable;
+ internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestMutualRecursionB__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestMutualRecursionB, global::Google.ProtocolBuffers.TestProtos.TestMutualRecursionB.Builder> internal__static_protobuf_unittest_TestMutualRecursionB__FieldAccessorTable;
+ internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestDupFieldNumber__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestDupFieldNumber, global::Google.ProtocolBuffers.TestProtos.TestDupFieldNumber.Builder> internal__static_protobuf_unittest_TestDupFieldNumber__FieldAccessorTable;
+ internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestDupFieldNumber_Foo__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestDupFieldNumber.Types.Foo, global::Google.ProtocolBuffers.TestProtos.TestDupFieldNumber.Types.Foo.Builder> internal__static_protobuf_unittest_TestDupFieldNumber_Foo__FieldAccessorTable;
+ internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestDupFieldNumber_Bar__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestDupFieldNumber.Types.Bar, global::Google.ProtocolBuffers.TestProtos.TestDupFieldNumber.Types.Bar.Builder> internal__static_protobuf_unittest_TestDupFieldNumber_Bar__FieldAccessorTable;
+ internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestEagerMessage__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestEagerMessage, global::Google.ProtocolBuffers.TestProtos.TestEagerMessage.Builder> internal__static_protobuf_unittest_TestEagerMessage__FieldAccessorTable;
+ internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestLazyMessage__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestLazyMessage, global::Google.ProtocolBuffers.TestProtos.TestLazyMessage.Builder> internal__static_protobuf_unittest_TestLazyMessage__FieldAccessorTable;
+ internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestNestedMessageHasBits__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestNestedMessageHasBits, global::Google.ProtocolBuffers.TestProtos.TestNestedMessageHasBits.Builder> internal__static_protobuf_unittest_TestNestedMessageHasBits__FieldAccessorTable;
+ internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestNestedMessageHasBits_NestedMessage__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestNestedMessageHasBits.Types.NestedMessage, global::Google.ProtocolBuffers.TestProtos.TestNestedMessageHasBits.Types.NestedMessage.Builder> internal__static_protobuf_unittest_TestNestedMessageHasBits_NestedMessage__FieldAccessorTable;
+ internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestCamelCaseFieldNames__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestCamelCaseFieldNames, global::Google.ProtocolBuffers.TestProtos.TestCamelCaseFieldNames.Builder> internal__static_protobuf_unittest_TestCamelCaseFieldNames__FieldAccessorTable;
+ internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestFieldOrderings__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestFieldOrderings, global::Google.ProtocolBuffers.TestProtos.TestFieldOrderings.Builder> internal__static_protobuf_unittest_TestFieldOrderings__FieldAccessorTable;
+ internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestFieldOrderings_NestedMessage__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestFieldOrderings.Types.NestedMessage, global::Google.ProtocolBuffers.TestProtos.TestFieldOrderings.Types.NestedMessage.Builder> internal__static_protobuf_unittest_TestFieldOrderings_NestedMessage__FieldAccessorTable;
+ internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestExtremeDefaultValues__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestExtremeDefaultValues, global::Google.ProtocolBuffers.TestProtos.TestExtremeDefaultValues.Builder> internal__static_protobuf_unittest_TestExtremeDefaultValues__FieldAccessorTable;
+ internal static pbd::MessageDescriptor internal__static_protobuf_unittest_SparseEnumMessage__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.SparseEnumMessage, global::Google.ProtocolBuffers.TestProtos.SparseEnumMessage.Builder> internal__static_protobuf_unittest_SparseEnumMessage__FieldAccessorTable;
+ internal static pbd::MessageDescriptor internal__static_protobuf_unittest_OneString__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.OneString, global::Google.ProtocolBuffers.TestProtos.OneString.Builder> internal__static_protobuf_unittest_OneString__FieldAccessorTable;
+ internal static pbd::MessageDescriptor internal__static_protobuf_unittest_MoreString__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.MoreString, global::Google.ProtocolBuffers.TestProtos.MoreString.Builder> internal__static_protobuf_unittest_MoreString__FieldAccessorTable;
+ internal static pbd::MessageDescriptor internal__static_protobuf_unittest_OneBytes__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.OneBytes, global::Google.ProtocolBuffers.TestProtos.OneBytes.Builder> internal__static_protobuf_unittest_OneBytes__FieldAccessorTable;
+ internal static pbd::MessageDescriptor internal__static_protobuf_unittest_MoreBytes__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.MoreBytes, global::Google.ProtocolBuffers.TestProtos.MoreBytes.Builder> internal__static_protobuf_unittest_MoreBytes__FieldAccessorTable;
+ internal static pbd::MessageDescriptor internal__static_protobuf_unittest_Int32Message__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.Int32Message, global::Google.ProtocolBuffers.TestProtos.Int32Message.Builder> internal__static_protobuf_unittest_Int32Message__FieldAccessorTable;
+ internal static pbd::MessageDescriptor internal__static_protobuf_unittest_Uint32Message__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.Uint32Message, global::Google.ProtocolBuffers.TestProtos.Uint32Message.Builder> internal__static_protobuf_unittest_Uint32Message__FieldAccessorTable;
+ internal static pbd::MessageDescriptor internal__static_protobuf_unittest_Int64Message__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.Int64Message, global::Google.ProtocolBuffers.TestProtos.Int64Message.Builder> internal__static_protobuf_unittest_Int64Message__FieldAccessorTable;
+ internal static pbd::MessageDescriptor internal__static_protobuf_unittest_Uint64Message__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.Uint64Message, global::Google.ProtocolBuffers.TestProtos.Uint64Message.Builder> internal__static_protobuf_unittest_Uint64Message__FieldAccessorTable;
+ internal static pbd::MessageDescriptor internal__static_protobuf_unittest_BoolMessage__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.BoolMessage, global::Google.ProtocolBuffers.TestProtos.BoolMessage.Builder> internal__static_protobuf_unittest_BoolMessage__FieldAccessorTable;
+ internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestOneof__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestOneof, global::Google.ProtocolBuffers.TestProtos.TestOneof.Builder> internal__static_protobuf_unittest_TestOneof__FieldAccessorTable;
+ internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestOneof_FooGroup__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestOneof.Types.FooGroup, global::Google.ProtocolBuffers.TestProtos.TestOneof.Types.FooGroup.Builder> internal__static_protobuf_unittest_TestOneof_FooGroup__FieldAccessorTable;
+ internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestOneofBackwardsCompatible__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestOneofBackwardsCompatible, global::Google.ProtocolBuffers.TestProtos.TestOneofBackwardsCompatible.Builder> internal__static_protobuf_unittest_TestOneofBackwardsCompatible__FieldAccessorTable;
+ internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestOneofBackwardsCompatible_FooGroup__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestOneofBackwardsCompatible.Types.FooGroup, global::Google.ProtocolBuffers.TestProtos.TestOneofBackwardsCompatible.Types.FooGroup.Builder> internal__static_protobuf_unittest_TestOneofBackwardsCompatible_FooGroup__FieldAccessorTable;
+ internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestOneof2__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestOneof2, global::Google.ProtocolBuffers.TestProtos.TestOneof2.Builder> internal__static_protobuf_unittest_TestOneof2__FieldAccessorTable;
+ internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestOneof2_FooGroup__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestOneof2.Types.FooGroup, global::Google.ProtocolBuffers.TestProtos.TestOneof2.Types.FooGroup.Builder> internal__static_protobuf_unittest_TestOneof2_FooGroup__FieldAccessorTable;
+ internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestOneof2_NestedMessage__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestOneof2.Types.NestedMessage, global::Google.ProtocolBuffers.TestProtos.TestOneof2.Types.NestedMessage.Builder> internal__static_protobuf_unittest_TestOneof2_NestedMessage__FieldAccessorTable;
+ internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestRequiredOneof__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestRequiredOneof, global::Google.ProtocolBuffers.TestProtos.TestRequiredOneof.Builder> internal__static_protobuf_unittest_TestRequiredOneof__FieldAccessorTable;
+ internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestRequiredOneof_NestedMessage__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestRequiredOneof.Types.NestedMessage, global::Google.ProtocolBuffers.TestProtos.TestRequiredOneof.Types.NestedMessage.Builder> internal__static_protobuf_unittest_TestRequiredOneof_NestedMessage__FieldAccessorTable;
+ internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestPackedTypes__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestPackedTypes, global::Google.ProtocolBuffers.TestProtos.TestPackedTypes.Builder> internal__static_protobuf_unittest_TestPackedTypes__FieldAccessorTable;
+ internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestUnpackedTypes__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestUnpackedTypes, global::Google.ProtocolBuffers.TestProtos.TestUnpackedTypes.Builder> internal__static_protobuf_unittest_TestUnpackedTypes__FieldAccessorTable;
+ internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestPackedExtensions__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestPackedExtensions, global::Google.ProtocolBuffers.TestProtos.TestPackedExtensions.Builder> internal__static_protobuf_unittest_TestPackedExtensions__FieldAccessorTable;
+ internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestUnpackedExtensions__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestUnpackedExtensions, global::Google.ProtocolBuffers.TestProtos.TestUnpackedExtensions.Builder> internal__static_protobuf_unittest_TestUnpackedExtensions__FieldAccessorTable;
+ internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestDynamicExtensions__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestDynamicExtensions, global::Google.ProtocolBuffers.TestProtos.TestDynamicExtensions.Builder> internal__static_protobuf_unittest_TestDynamicExtensions__FieldAccessorTable;
+ internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestDynamicExtensions_DynamicMessageType__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestDynamicExtensions.Types.DynamicMessageType, global::Google.ProtocolBuffers.TestProtos.TestDynamicExtensions.Types.DynamicMessageType.Builder> internal__static_protobuf_unittest_TestDynamicExtensions_DynamicMessageType__FieldAccessorTable;
+ internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestRepeatedScalarDifferentTagSizes__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestRepeatedScalarDifferentTagSizes, global::Google.ProtocolBuffers.TestProtos.TestRepeatedScalarDifferentTagSizes.Builder> internal__static_protobuf_unittest_TestRepeatedScalarDifferentTagSizes__FieldAccessorTable;
+ internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestParsingMerge__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestParsingMerge, global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Builder> internal__static_protobuf_unittest_TestParsingMerge__FieldAccessorTable;
+ internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestParsingMerge_RepeatedFieldsGenerator__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Types.RepeatedFieldsGenerator, global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Types.RepeatedFieldsGenerator.Builder> internal__static_protobuf_unittest_TestParsingMerge_RepeatedFieldsGenerator__FieldAccessorTable;
+ internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestParsingMerge_RepeatedFieldsGenerator_Group1__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Types.RepeatedFieldsGenerator.Types.Group1, global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Types.RepeatedFieldsGenerator.Types.Group1.Builder> internal__static_protobuf_unittest_TestParsingMerge_RepeatedFieldsGenerator_Group1__FieldAccessorTable;
+ internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestParsingMerge_RepeatedFieldsGenerator_Group2__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Types.RepeatedFieldsGenerator.Types.Group2, global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Types.RepeatedFieldsGenerator.Types.Group2.Builder> internal__static_protobuf_unittest_TestParsingMerge_RepeatedFieldsGenerator_Group2__FieldAccessorTable;
+ internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestParsingMerge_OptionalGroup__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Types.OptionalGroup, global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Types.OptionalGroup.Builder> internal__static_protobuf_unittest_TestParsingMerge_OptionalGroup__FieldAccessorTable;
+ internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestParsingMerge_RepeatedGroup__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Types.RepeatedGroup, global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Types.RepeatedGroup.Builder> internal__static_protobuf_unittest_TestParsingMerge_RepeatedGroup__FieldAccessorTable;
+ internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestCommentInjectionMessage__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestCommentInjectionMessage, global::Google.ProtocolBuffers.TestProtos.TestCommentInjectionMessage.Builder> internal__static_protobuf_unittest_TestCommentInjectionMessage__FieldAccessorTable;
+ internal static pbd::MessageDescriptor internal__static_protobuf_unittest_FooRequest__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.FooRequest, global::Google.ProtocolBuffers.TestProtos.FooRequest.Builder> internal__static_protobuf_unittest_FooRequest__FieldAccessorTable;
+ internal static pbd::MessageDescriptor internal__static_protobuf_unittest_FooResponse__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.FooResponse, global::Google.ProtocolBuffers.TestProtos.FooResponse.Builder> internal__static_protobuf_unittest_FooResponse__FieldAccessorTable;
+ internal static pbd::MessageDescriptor internal__static_protobuf_unittest_FooClientMessage__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.FooClientMessage, global::Google.ProtocolBuffers.TestProtos.FooClientMessage.Builder> internal__static_protobuf_unittest_FooClientMessage__FieldAccessorTable;
+ internal static pbd::MessageDescriptor internal__static_protobuf_unittest_FooServerMessage__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.FooServerMessage, global::Google.ProtocolBuffers.TestProtos.FooServerMessage.Builder> internal__static_protobuf_unittest_FooServerMessage__FieldAccessorTable;
+ internal static pbd::MessageDescriptor internal__static_protobuf_unittest_BarRequest__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.BarRequest, global::Google.ProtocolBuffers.TestProtos.BarRequest.Builder> internal__static_protobuf_unittest_BarRequest__FieldAccessorTable;
+ internal static pbd::MessageDescriptor internal__static_protobuf_unittest_BarResponse__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.BarResponse, global::Google.ProtocolBuffers.TestProtos.BarResponse.Builder> internal__static_protobuf_unittest_BarResponse__FieldAccessorTable;
+ #endregion
+ #region Descriptor
+ public static pbd::FileDescriptor Descriptor {
+ get { return descriptor; }
+ }
+ private static pbd::FileDescriptor descriptor;
+
+ static Unittest() {
+ byte[] descriptorData = global::System.Convert.FromBase64String(
+ string.Concat(
+ "Ch5nb29nbGUvcHJvdG9idWYvdW5pdHRlc3QucHJvdG8SEXByb3RvYnVmX3Vu",
+ "aXR0ZXN0GiVnb29nbGUvcHJvdG9idWYvdW5pdHRlc3RfaW1wb3J0LnByb3Rv",
+ "Iu0YCgxUZXN0QWxsVHlwZXMSFgoOb3B0aW9uYWxfaW50MzIYASABKAUSFgoO",
+ "b3B0aW9uYWxfaW50NjQYAiABKAMSFwoPb3B0aW9uYWxfdWludDMyGAMgASgN",
+ "EhcKD29wdGlvbmFsX3VpbnQ2NBgEIAEoBBIXCg9vcHRpb25hbF9zaW50MzIY",
+ "BSABKBESFwoPb3B0aW9uYWxfc2ludDY0GAYgASgSEhgKEG9wdGlvbmFsX2Zp",
+ "eGVkMzIYByABKAcSGAoQb3B0aW9uYWxfZml4ZWQ2NBgIIAEoBhIZChFvcHRp",
+ "b25hbF9zZml4ZWQzMhgJIAEoDxIZChFvcHRpb25hbF9zZml4ZWQ2NBgKIAEo",
+ "EBIWCg5vcHRpb25hbF9mbG9hdBgLIAEoAhIXCg9vcHRpb25hbF9kb3VibGUY",
+ "DCABKAESFQoNb3B0aW9uYWxfYm9vbBgNIAEoCBIXCg9vcHRpb25hbF9zdHJp",
+ "bmcYDiABKAkSFgoOb3B0aW9uYWxfYnl0ZXMYDyABKAwSRAoNb3B0aW9uYWxn",
+ "cm91cBgQIAEoCjItLnByb3RvYnVmX3VuaXR0ZXN0LlRlc3RBbGxUeXBlcy5P",
+ "cHRpb25hbEdyb3VwEk4KF29wdGlvbmFsX25lc3RlZF9tZXNzYWdlGBIgASgL",
+ "Mi0ucHJvdG9idWZfdW5pdHRlc3QuVGVzdEFsbFR5cGVzLk5lc3RlZE1lc3Nh",
+ "Z2USQwoYb3B0aW9uYWxfZm9yZWlnbl9tZXNzYWdlGBMgASgLMiEucHJvdG9i",
+ "dWZfdW5pdHRlc3QuRm9yZWlnbk1lc3NhZ2USSAoXb3B0aW9uYWxfaW1wb3J0",
+ "X21lc3NhZ2UYFCABKAsyJy5wcm90b2J1Zl91bml0dGVzdF9pbXBvcnQuSW1w",
+ "b3J0TWVzc2FnZRJIChRvcHRpb25hbF9uZXN0ZWRfZW51bRgVIAEoDjIqLnBy",
+ "b3RvYnVmX3VuaXR0ZXN0LlRlc3RBbGxUeXBlcy5OZXN0ZWRFbnVtEj0KFW9w",
+ "dGlvbmFsX2ZvcmVpZ25fZW51bRgWIAEoDjIeLnByb3RvYnVmX3VuaXR0ZXN0",
+ "LkZvcmVpZ25FbnVtEkIKFG9wdGlvbmFsX2ltcG9ydF9lbnVtGBcgASgOMiQu",
+ "cHJvdG9idWZfdW5pdHRlc3RfaW1wb3J0LkltcG9ydEVudW0SIQoVb3B0aW9u",
+ "YWxfc3RyaW5nX3BpZWNlGBggASgJQgIIAhIZCg1vcHRpb25hbF9jb3JkGBkg",
+ "ASgJQgIIARJVCh5vcHRpb25hbF9wdWJsaWNfaW1wb3J0X21lc3NhZ2UYGiAB",
+ "KAsyLS5wcm90b2J1Zl91bml0dGVzdF9pbXBvcnQuUHVibGljSW1wb3J0TWVz",
+ "c2FnZRJQChVvcHRpb25hbF9sYXp5X21lc3NhZ2UYGyABKAsyLS5wcm90b2J1",
+ "Zl91bml0dGVzdC5UZXN0QWxsVHlwZXMuTmVzdGVkTWVzc2FnZUICKAESFgoO",
+ "cmVwZWF0ZWRfaW50MzIYHyADKAUSFgoOcmVwZWF0ZWRfaW50NjQYICADKAMS",
+ "FwoPcmVwZWF0ZWRfdWludDMyGCEgAygNEhcKD3JlcGVhdGVkX3VpbnQ2NBgi",
+ "IAMoBBIXCg9yZXBlYXRlZF9zaW50MzIYIyADKBESFwoPcmVwZWF0ZWRfc2lu",
+ "dDY0GCQgAygSEhgKEHJlcGVhdGVkX2ZpeGVkMzIYJSADKAcSGAoQcmVwZWF0",
+ "ZWRfZml4ZWQ2NBgmIAMoBhIZChFyZXBlYXRlZF9zZml4ZWQzMhgnIAMoDxIZ",
+ "ChFyZXBlYXRlZF9zZml4ZWQ2NBgoIAMoEBIWCg5yZXBlYXRlZF9mbG9hdBgp",
+ "IAMoAhIXCg9yZXBlYXRlZF9kb3VibGUYKiADKAESFQoNcmVwZWF0ZWRfYm9v",
+ "bBgrIAMoCBIXCg9yZXBlYXRlZF9zdHJpbmcYLCADKAkSFgoOcmVwZWF0ZWRf",
+ "Ynl0ZXMYLSADKAwSRAoNcmVwZWF0ZWRncm91cBguIAMoCjItLnByb3RvYnVm",
+ "X3VuaXR0ZXN0LlRlc3RBbGxUeXBlcy5SZXBlYXRlZEdyb3VwEk4KF3JlcGVh",
+ "dGVkX25lc3RlZF9tZXNzYWdlGDAgAygLMi0ucHJvdG9idWZfdW5pdHRlc3Qu",
+ "VGVzdEFsbFR5cGVzLk5lc3RlZE1lc3NhZ2USQwoYcmVwZWF0ZWRfZm9yZWln",
+ "bl9tZXNzYWdlGDEgAygLMiEucHJvdG9idWZfdW5pdHRlc3QuRm9yZWlnbk1l",
+ "c3NhZ2USSAoXcmVwZWF0ZWRfaW1wb3J0X21lc3NhZ2UYMiADKAsyJy5wcm90",
+ "b2J1Zl91bml0dGVzdF9pbXBvcnQuSW1wb3J0TWVzc2FnZRJIChRyZXBlYXRl",
+ "ZF9uZXN0ZWRfZW51bRgzIAMoDjIqLnByb3RvYnVmX3VuaXR0ZXN0LlRlc3RB",
+ "bGxUeXBlcy5OZXN0ZWRFbnVtEj0KFXJlcGVhdGVkX2ZvcmVpZ25fZW51bRg0",
+ "IAMoDjIeLnByb3RvYnVmX3VuaXR0ZXN0LkZvcmVpZ25FbnVtEkIKFHJlcGVh",
+ "dGVkX2ltcG9ydF9lbnVtGDUgAygOMiQucHJvdG9idWZfdW5pdHRlc3RfaW1w",
+ "b3J0LkltcG9ydEVudW0SIQoVcmVwZWF0ZWRfc3RyaW5nX3BpZWNlGDYgAygJ",
+ "QgIIAhIZCg1yZXBlYXRlZF9jb3JkGDcgAygJQgIIARJQChVyZXBlYXRlZF9s",
+ "YXp5X21lc3NhZ2UYOSADKAsyLS5wcm90b2J1Zl91bml0dGVzdC5UZXN0QWxs",
+ "VHlwZXMuTmVzdGVkTWVzc2FnZUICKAESGQoNZGVmYXVsdF9pbnQzMhg9IAEo",
+ "BToCNDESGQoNZGVmYXVsdF9pbnQ2NBg+IAEoAzoCNDISGgoOZGVmYXVsdF91",
+ "aW50MzIYPyABKA06AjQzEhoKDmRlZmF1bHRfdWludDY0GEAgASgEOgI0NBIb",
+ "Cg5kZWZhdWx0X3NpbnQzMhhBIAEoEToDLTQ1EhoKDmRlZmF1bHRfc2ludDY0",
+ "GEIgASgSOgI0NhIbCg9kZWZhdWx0X2ZpeGVkMzIYQyABKAc6AjQ3EhsKD2Rl",
+ "ZmF1bHRfZml4ZWQ2NBhEIAEoBjoCNDgSHAoQZGVmYXVsdF9zZml4ZWQzMhhF",
+ "IAEoDzoCNDkSHQoQZGVmYXVsdF9zZml4ZWQ2NBhGIAEoEDoDLTUwEhsKDWRl",
+ "ZmF1bHRfZmxvYXQYRyABKAI6BDUxLjUSHQoOZGVmYXVsdF9kb3VibGUYSCAB",
+ "KAE6BTUyMDAwEhoKDGRlZmF1bHRfYm9vbBhJIAEoCDoEdHJ1ZRIdCg5kZWZh",
+ "dWx0X3N0cmluZxhKIAEoCToFaGVsbG8SHAoNZGVmYXVsdF9ieXRlcxhLIAEo",
+ "DDoFd29ybGQSTAoTZGVmYXVsdF9uZXN0ZWRfZW51bRhRIAEoDjIqLnByb3Rv",
+ "YnVmX3VuaXR0ZXN0LlRlc3RBbGxUeXBlcy5OZXN0ZWRFbnVtOgNCQVISSQoU",
+ "ZGVmYXVsdF9mb3JlaWduX2VudW0YUiABKA4yHi5wcm90b2J1Zl91bml0dGVz",
+ "dC5Gb3JlaWduRW51bToLRk9SRUlHTl9CQVISTQoTZGVmYXVsdF9pbXBvcnRf",
+ "ZW51bRhTIAEoDjIkLnByb3RvYnVmX3VuaXR0ZXN0X2ltcG9ydC5JbXBvcnRF",
+ "bnVtOgpJTVBPUlRfQkFSEiUKFGRlZmF1bHRfc3RyaW5nX3BpZWNlGFQgASgJ",
+ "OgNhYmNCAggCEh0KDGRlZmF1bHRfY29yZBhVIAEoCToDMTIzQgIIARIWCgxv",
+ "bmVvZl91aW50MzIYbyABKA1IABJNChRvbmVvZl9uZXN0ZWRfbWVzc2FnZRhw",
+ "IAEoCzItLnByb3RvYnVmX3VuaXR0ZXN0LlRlc3RBbGxUeXBlcy5OZXN0ZWRN",
+ "ZXNzYWdlSAASFgoMb25lb2Zfc3RyaW5nGHEgASgJSAASFQoLb25lb2ZfYnl0",
+ "ZXMYciABKAxIABobCg1OZXN0ZWRNZXNzYWdlEgoKAmJiGAEgASgFGhoKDU9w",
+ "dGlvbmFsR3JvdXASCQoBYRgRIAEoBRoaCg1SZXBlYXRlZEdyb3VwEgkKAWEY",
+ "LyABKAUiOQoKTmVzdGVkRW51bRIHCgNGT08QARIHCgNCQVIQAhIHCgNCQVoQ",
+ "AxIQCgNORUcQ////////////AUINCgtvbmVvZl9maWVsZCJ8ChJOZXN0ZWRU",
+ "ZXN0QWxsVHlwZXMSNAoFY2hpbGQYASABKAsyJS5wcm90b2J1Zl91bml0dGVz",
+ "dC5OZXN0ZWRUZXN0QWxsVHlwZXMSMAoHcGF5bG9hZBgCIAEoCzIfLnByb3Rv",
+ "YnVmX3VuaXR0ZXN0LlRlc3RBbGxUeXBlcyI0ChRUZXN0RGVwcmVjYXRlZEZp",
+ "ZWxkcxIcChBkZXByZWNhdGVkX2ludDMyGAEgASgFQgIYASIbCg5Gb3JlaWdu",
+ "TWVzc2FnZRIJCgFjGAEgASgFIh0KEVRlc3RBbGxFeHRlbnNpb25zKggIARCA",
+ "gICAAiIkChdPcHRpb25hbEdyb3VwX2V4dGVuc2lvbhIJCgFhGBEgASgFIiQK",
+ "F1JlcGVhdGVkR3JvdXBfZXh0ZW5zaW9uEgkKAWEYLyABKAUimAEKE1Rlc3RO",
+ "ZXN0ZWRFeHRlbnNpb24yOQoEdGVzdBIkLnByb3RvYnVmX3VuaXR0ZXN0LlRl",
+ "c3RBbGxFeHRlbnNpb25zGOoHIAEoCToEdGVzdDJGChduZXN0ZWRfc3RyaW5n",
+ "X2V4dGVuc2lvbhIkLnByb3RvYnVmX3VuaXR0ZXN0LlRlc3RBbGxFeHRlbnNp",
+ "b25zGOsHIAEoCSLVBQoMVGVzdFJlcXVpcmVkEgkKAWEYASACKAUSDgoGZHVt",
+ "bXkyGAIgASgFEgkKAWIYAyACKAUSDgoGZHVtbXk0GAQgASgFEg4KBmR1bW15",
+ "NRgFIAEoBRIOCgZkdW1teTYYBiABKAUSDgoGZHVtbXk3GAcgASgFEg4KBmR1",
+ "bW15OBgIIAEoBRIOCgZkdW1teTkYCSABKAUSDwoHZHVtbXkxMBgKIAEoBRIP",
+ "CgdkdW1teTExGAsgASgFEg8KB2R1bW15MTIYDCABKAUSDwoHZHVtbXkxMxgN",
+ "IAEoBRIPCgdkdW1teTE0GA4gASgFEg8KB2R1bW15MTUYDyABKAUSDwoHZHVt",
+ "bXkxNhgQIAEoBRIPCgdkdW1teTE3GBEgASgFEg8KB2R1bW15MTgYEiABKAUS",
+ "DwoHZHVtbXkxORgTIAEoBRIPCgdkdW1teTIwGBQgASgFEg8KB2R1bW15MjEY",
+ "FSABKAUSDwoHZHVtbXkyMhgWIAEoBRIPCgdkdW1teTIzGBcgASgFEg8KB2R1",
+ "bW15MjQYGCABKAUSDwoHZHVtbXkyNRgZIAEoBRIPCgdkdW1teTI2GBogASgF",
+ "Eg8KB2R1bW15MjcYGyABKAUSDwoHZHVtbXkyOBgcIAEoBRIPCgdkdW1teTI5",
+ "GB0gASgFEg8KB2R1bW15MzAYHiABKAUSDwoHZHVtbXkzMRgfIAEoBRIPCgdk",
+ "dW1teTMyGCAgASgFEgkKAWMYISACKAUyVgoGc2luZ2xlEiQucHJvdG9idWZf",
+ "dW5pdHRlc3QuVGVzdEFsbEV4dGVuc2lvbnMY6AcgASgLMh8ucHJvdG9idWZf",
+ "dW5pdHRlc3QuVGVzdFJlcXVpcmVkMlUKBW11bHRpEiQucHJvdG9idWZfdW5p",
+ "dHRlc3QuVGVzdEFsbEV4dGVuc2lvbnMY6QcgAygLMh8ucHJvdG9idWZfdW5p",
+ "dHRlc3QuVGVzdFJlcXVpcmVkIpoBChNUZXN0UmVxdWlyZWRGb3JlaWduEjkK",
+ "EG9wdGlvbmFsX21lc3NhZ2UYASABKAsyHy5wcm90b2J1Zl91bml0dGVzdC5U",
+ "ZXN0UmVxdWlyZWQSOQoQcmVwZWF0ZWRfbWVzc2FnZRgCIAMoCzIfLnByb3Rv",
+ "YnVmX3VuaXR0ZXN0LlRlc3RSZXF1aXJlZBINCgVkdW1teRgDIAEoBSJaChFU",
+ "ZXN0Rm9yZWlnbk5lc3RlZBJFCg5mb3JlaWduX25lc3RlZBgBIAEoCzItLnBy",
+ "b3RvYnVmX3VuaXR0ZXN0LlRlc3RBbGxUeXBlcy5OZXN0ZWRNZXNzYWdlIhIK",
+ "EFRlc3RFbXB0eU1lc3NhZ2UiKgoeVGVzdEVtcHR5TWVzc2FnZVdpdGhFeHRl",
+ "bnNpb25zKggIARCAgICAAiI3ChtUZXN0TXVsdGlwbGVFeHRlbnNpb25SYW5n",
+ "ZXMqBAgqECsqBgivIBCUISoKCICABBCAgICAAiI0ChhUZXN0UmVhbGx5TGFy",
+ "Z2VUYWdOdW1iZXISCQoBYRgBIAEoBRINCgJiYhj///9/IAEoBSJVChRUZXN0",
+ "UmVjdXJzaXZlTWVzc2FnZRIyCgFhGAEgASgLMicucHJvdG9idWZfdW5pdHRl",
+ "c3QuVGVzdFJlY3Vyc2l2ZU1lc3NhZ2USCQoBaRgCIAEoBSJLChRUZXN0TXV0",
+ "dWFsUmVjdXJzaW9uQRIzCgJiYhgBIAEoCzInLnByb3RvYnVmX3VuaXR0ZXN0",
+ "LlRlc3RNdXR1YWxSZWN1cnNpb25CImIKFFRlc3RNdXR1YWxSZWN1cnNpb25C",
+ "EjIKAWEYASABKAsyJy5wcm90b2J1Zl91bml0dGVzdC5UZXN0TXV0dWFsUmVj",
+ "dXJzaW9uQRIWCg5vcHRpb25hbF9pbnQzMhgCIAEoBSKzAQoSVGVzdER1cEZp",
+ "ZWxkTnVtYmVyEgkKAWEYASABKAUSNgoDZm9vGAIgASgKMikucHJvdG9idWZf",
+ "dW5pdHRlc3QuVGVzdER1cEZpZWxkTnVtYmVyLkZvbxI2CgNiYXIYAyABKAoy",
+ "KS5wcm90b2J1Zl91bml0dGVzdC5UZXN0RHVwRmllbGROdW1iZXIuQmFyGhAK",
+ "A0ZvbxIJCgFhGAEgASgFGhAKA0JhchIJCgFhGAEgASgFIkwKEFRlc3RFYWdl",
+ "ck1lc3NhZ2USOAoLc3ViX21lc3NhZ2UYASABKAsyHy5wcm90b2J1Zl91bml0",
+ "dGVzdC5UZXN0QWxsVHlwZXNCAigAIksKD1Rlc3RMYXp5TWVzc2FnZRI4Cgtz",
+ "dWJfbWVzc2FnZRgBIAEoCzIfLnByb3RvYnVmX3VuaXR0ZXN0LlRlc3RBbGxU",
+ "eXBlc0ICKAEigAIKGFRlc3ROZXN0ZWRNZXNzYWdlSGFzQml0cxJaChdvcHRp",
+ "b25hbF9uZXN0ZWRfbWVzc2FnZRgBIAEoCzI5LnByb3RvYnVmX3VuaXR0ZXN0",
+ "LlRlc3ROZXN0ZWRNZXNzYWdlSGFzQml0cy5OZXN0ZWRNZXNzYWdlGocBCg1O",
+ "ZXN0ZWRNZXNzYWdlEiQKHG5lc3RlZG1lc3NhZ2VfcmVwZWF0ZWRfaW50MzIY",
+ "ASADKAUSUAolbmVzdGVkbWVzc2FnZV9yZXBlYXRlZF9mb3JlaWdubWVzc2Fn",
+ "ZRgCIAMoCzIhLnByb3RvYnVmX3VuaXR0ZXN0LkZvcmVpZ25NZXNzYWdlIuUD",
+ "ChdUZXN0Q2FtZWxDYXNlRmllbGROYW1lcxIWCg5QcmltaXRpdmVGaWVsZBgB",
+ "IAEoBRITCgtTdHJpbmdGaWVsZBgCIAEoCRIxCglFbnVtRmllbGQYAyABKA4y",
+ "Hi5wcm90b2J1Zl91bml0dGVzdC5Gb3JlaWduRW51bRI3CgxNZXNzYWdlRmll",
+ "bGQYBCABKAsyIS5wcm90b2J1Zl91bml0dGVzdC5Gb3JlaWduTWVzc2FnZRIc",
+ "ChBTdHJpbmdQaWVjZUZpZWxkGAUgASgJQgIIAhIVCglDb3JkRmllbGQYBiAB",
+ "KAlCAggBEh4KFlJlcGVhdGVkUHJpbWl0aXZlRmllbGQYByADKAUSGwoTUmVw",
+ "ZWF0ZWRTdHJpbmdGaWVsZBgIIAMoCRI5ChFSZXBlYXRlZEVudW1GaWVsZBgJ",
+ "IAMoDjIeLnByb3RvYnVmX3VuaXR0ZXN0LkZvcmVpZ25FbnVtEj8KFFJlcGVh",
+ "dGVkTWVzc2FnZUZpZWxkGAogAygLMiEucHJvdG9idWZfdW5pdHRlc3QuRm9y",
+ "ZWlnbk1lc3NhZ2USJAoYUmVwZWF0ZWRTdHJpbmdQaWVjZUZpZWxkGAsgAygJ",
+ "QgIIAhIdChFSZXBlYXRlZENvcmRGaWVsZBgMIAMoCUICCAEi1QEKElRlc3RG",
+ "aWVsZE9yZGVyaW5ncxIRCglteV9zdHJpbmcYCyABKAkSDgoGbXlfaW50GAEg",
+ "ASgDEhAKCG15X2Zsb2F0GGUgASgCElUKF29wdGlvbmFsX25lc3RlZF9tZXNz",
+ "YWdlGMgBIAEoCzIzLnByb3RvYnVmX3VuaXR0ZXN0LlRlc3RGaWVsZE9yZGVy",
+ "aW5ncy5OZXN0ZWRNZXNzYWdlGicKDU5lc3RlZE1lc3NhZ2USCgoCb28YAiAB",
+ "KAMSCgoCYmIYASABKAUqBAgCEAsqBAgMEGUitgcKGFRlc3RFeHRyZW1lRGVm",
+ "YXVsdFZhbHVlcxI/Cg1lc2NhcGVkX2J5dGVzGAEgASgMOihcMDAwXDAwMVww",
+ "MDdcMDEwXDAxNFxuXHJcdFwwMTNcXFwnXCJcMzc2EiAKDGxhcmdlX3VpbnQz",
+ "MhgCIAEoDToKNDI5NDk2NzI5NRIqCgxsYXJnZV91aW50NjQYAyABKAQ6FDE4",
+ "NDQ2NzQ0MDczNzA5NTUxNjE1EiAKC3NtYWxsX2ludDMyGAQgASgFOgstMjE0",
+ "NzQ4MzY0NxIpCgtzbWFsbF9pbnQ2NBgFIAEoAzoULTkyMjMzNzIwMzY4NTQ3",
+ "NzU4MDcSJwoScmVhbGx5X3NtYWxsX2ludDMyGBUgASgFOgstMjE0NzQ4MzY0",
+ "OBIwChJyZWFsbHlfc21hbGxfaW50NjQYFiABKAM6FC05MjIzMzcyMDM2ODU0",
+ "Nzc1ODA4EhgKC3V0Zjhfc3RyaW5nGAYgASgJOgPhiLQSFQoKemVyb19mbG9h",
+ "dBgHIAEoAjoBMBIUCglvbmVfZmxvYXQYCCABKAI6ATESGAoLc21hbGxfZmxv",
+ "YXQYCSABKAI6AzEuNRIeChJuZWdhdGl2ZV9vbmVfZmxvYXQYCiABKAI6Ai0x",
+ "EhwKDm5lZ2F0aXZlX2Zsb2F0GAsgASgCOgQtMS41EhoKC2xhcmdlX2Zsb2F0",
+ "GAwgASgCOgUyZSswOBIkChRzbWFsbF9uZWdhdGl2ZV9mbG9hdBgNIAEoAjoG",
+ "LThlLTI4EhcKCmluZl9kb3VibGUYDiABKAE6A2luZhIcCg5uZWdfaW5mX2Rv",
+ "dWJsZRgPIAEoAToELWluZhIXCgpuYW5fZG91YmxlGBAgASgBOgNuYW4SFgoJ",
+ "aW5mX2Zsb2F0GBEgASgCOgNpbmYSGwoNbmVnX2luZl9mbG9hdBgSIAEoAjoE",
+ "LWluZhIWCgluYW5fZmxvYXQYEyABKAI6A25hbhIrCgxjcHBfdHJpZ3JhcGgY",
+ "FCABKAk6FT8gPyA/PyA/PyA/Pz8gPz8vID8/LRIgChBzdHJpbmdfd2l0aF96",
+ "ZXJvGBcgASgJOgZoZWwAbG8SIgoPYnl0ZXNfd2l0aF96ZXJvGBggASgMOgl3",
+ "b3JcMDAwbGQSKAoWc3RyaW5nX3BpZWNlX3dpdGhfemVybxgZIAEoCToEYWIA",
+ "Y0ICCAISIAoOY29yZF93aXRoX3plcm8YGiABKAk6BDEyADNCAggBEiYKEnJl",
+ "cGxhY2VtZW50X3N0cmluZxgbIAEoCToKJHt1bmtub3dufSJLChFTcGFyc2VF",
+ "bnVtTWVzc2FnZRI2CgtzcGFyc2VfZW51bRgBIAEoDjIhLnByb3RvYnVmX3Vu",
+ "aXR0ZXN0LlRlc3RTcGFyc2VFbnVtIhkKCU9uZVN0cmluZxIMCgRkYXRhGAEg",
+ "ASgJIhoKCk1vcmVTdHJpbmcSDAoEZGF0YRgBIAMoCSIYCghPbmVCeXRlcxIM",
+ "CgRkYXRhGAEgASgMIhkKCU1vcmVCeXRlcxIMCgRkYXRhGAEgAygMIhwKDElu",
+ "dDMyTWVzc2FnZRIMCgRkYXRhGAEgASgFIh0KDVVpbnQzMk1lc3NhZ2USDAoE",
+ "ZGF0YRgBIAEoDSIcCgxJbnQ2NE1lc3NhZ2USDAoEZGF0YRgBIAEoAyIdCg1V",
+ "aW50NjRNZXNzYWdlEgwKBGRhdGEYASABKAQiGwoLQm9vbE1lc3NhZ2USDAoE",
+ "ZGF0YRgBIAEoCCLQAQoJVGVzdE9uZW9mEhEKB2Zvb19pbnQYASABKAVIABIU",
+ "Cgpmb29fc3RyaW5nGAIgASgJSAASNgoLZm9vX21lc3NhZ2UYAyABKAsyHy5w",
+ "cm90b2J1Zl91bml0dGVzdC5UZXN0QWxsVHlwZXNIABI5Cghmb29ncm91cBgE",
+ "IAEoCjIlLnByb3RvYnVmX3VuaXR0ZXN0LlRlc3RPbmVvZi5Gb29Hcm91cEgA",
+ "GiAKCEZvb0dyb3VwEgkKAWEYBSABKAUSCQoBYhgGIAEoCUIFCgNmb28i5wEK",
+ "HFRlc3RPbmVvZkJhY2t3YXJkc0NvbXBhdGlibGUSDwoHZm9vX2ludBgBIAEo",
+ "BRISCgpmb29fc3RyaW5nGAIgASgJEjQKC2Zvb19tZXNzYWdlGAMgASgLMh8u",
+ "cHJvdG9idWZfdW5pdHRlc3QuVGVzdEFsbFR5cGVzEkoKCGZvb2dyb3VwGAQg",
+ "ASgKMjgucHJvdG9idWZfdW5pdHRlc3QuVGVzdE9uZW9mQmFja3dhcmRzQ29t",
+ "cGF0aWJsZS5Gb29Hcm91cBogCghGb29Hcm91cBIJCgFhGAUgASgFEgkKAWIY",
+ "BiABKAkingYKClRlc3RPbmVvZjISEQoHZm9vX2ludBgBIAEoBUgAEhQKCmZv",
+ "b19zdHJpbmcYAiABKAlIABIWCghmb29fY29yZBgDIAEoCUICCAFIABIeChBm",
+ "b29fc3RyaW5nX3BpZWNlGAQgASgJQgIIAkgAEhMKCWZvb19ieXRlcxgFIAEo",
+ "DEgAEjwKCGZvb19lbnVtGAYgASgOMigucHJvdG9idWZfdW5pdHRlc3QuVGVz",
+ "dE9uZW9mMi5OZXN0ZWRFbnVtSAASQgoLZm9vX21lc3NhZ2UYByABKAsyKy5w",
+ "cm90b2J1Zl91bml0dGVzdC5UZXN0T25lb2YyLk5lc3RlZE1lc3NhZ2VIABI6",
+ "Cghmb29ncm91cBgIIAEoCjImLnByb3RvYnVmX3VuaXR0ZXN0LlRlc3RPbmVv",
+ "ZjIuRm9vR3JvdXBIABJLChBmb29fbGF6eV9tZXNzYWdlGAsgASgLMisucHJv",
+ "dG9idWZfdW5pdHRlc3QuVGVzdE9uZW9mMi5OZXN0ZWRNZXNzYWdlQgIoAUgA",
+ "EhQKB2Jhcl9pbnQYDCABKAU6ATVIARIcCgpiYXJfc3RyaW5nGA0gASgJOgZT",
+ "VFJJTkdIARIcCghiYXJfY29yZBgOIAEoCToEQ09SREICCAFIARImChBiYXJf",
+ "c3RyaW5nX3BpZWNlGA8gASgJOgZTUElFQ0VCAggCSAESGgoJYmFyX2J5dGVz",
+ "GBAgASgMOgVCWVRFU0gBEkEKCGJhcl9lbnVtGBEgASgOMigucHJvdG9idWZf",
+ "dW5pdHRlc3QuVGVzdE9uZW9mMi5OZXN0ZWRFbnVtOgNCQVJIARIPCgdiYXpf",
+ "aW50GBIgASgFEhcKCmJhel9zdHJpbmcYEyABKAk6A0JBWhogCghGb29Hcm91",
+ "cBIJCgFhGAkgASgFEgkKAWIYCiABKAkaMwoNTmVzdGVkTWVzc2FnZRIPCgdx",
+ "dXhfaW50GAEgASgDEhEKCWNvcmdlX2ludBgCIAMoBSInCgpOZXN0ZWRFbnVt",
+ "EgcKA0ZPTxABEgcKA0JBUhACEgcKA0JBWhADQgUKA2Zvb0IFCgNiYXIiuAEK",
+ "EVRlc3RSZXF1aXJlZE9uZW9mEhEKB2Zvb19pbnQYASABKAVIABIUCgpmb29f",
+ "c3RyaW5nGAIgASgJSAASSQoLZm9vX21lc3NhZ2UYAyABKAsyMi5wcm90b2J1",
+ "Zl91bml0dGVzdC5UZXN0UmVxdWlyZWRPbmVvZi5OZXN0ZWRNZXNzYWdlSAAa",
+ "KAoNTmVzdGVkTWVzc2FnZRIXCg9yZXF1aXJlZF9kb3VibGUYASACKAFCBQoD",
+ "Zm9vIqoDCg9UZXN0UGFja2VkVHlwZXMSGAoMcGFja2VkX2ludDMyGFogAygF",
+ "QgIQARIYCgxwYWNrZWRfaW50NjQYWyADKANCAhABEhkKDXBhY2tlZF91aW50",
+ "MzIYXCADKA1CAhABEhkKDXBhY2tlZF91aW50NjQYXSADKARCAhABEhkKDXBh",
+ "Y2tlZF9zaW50MzIYXiADKBFCAhABEhkKDXBhY2tlZF9zaW50NjQYXyADKBJC",
+ "AhABEhoKDnBhY2tlZF9maXhlZDMyGGAgAygHQgIQARIaCg5wYWNrZWRfZml4",
+ "ZWQ2NBhhIAMoBkICEAESGwoPcGFja2VkX3NmaXhlZDMyGGIgAygPQgIQARIb",
+ "Cg9wYWNrZWRfc2ZpeGVkNjQYYyADKBBCAhABEhgKDHBhY2tlZF9mbG9hdBhk",
+ "IAMoAkICEAESGQoNcGFja2VkX2RvdWJsZRhlIAMoAUICEAESFwoLcGFja2Vk",
+ "X2Jvb2wYZiADKAhCAhABEjcKC3BhY2tlZF9lbnVtGGcgAygOMh4ucHJvdG9i",
+ "dWZfdW5pdHRlc3QuRm9yZWlnbkVudW1CAhABIsgDChFUZXN0VW5wYWNrZWRU",
+ "eXBlcxIaCg51bnBhY2tlZF9pbnQzMhhaIAMoBUICEAASGgoOdW5wYWNrZWRf",
+ "aW50NjQYWyADKANCAhAAEhsKD3VucGFja2VkX3VpbnQzMhhcIAMoDUICEAAS",
+ "GwoPdW5wYWNrZWRfdWludDY0GF0gAygEQgIQABIbCg91bnBhY2tlZF9zaW50",
+ "MzIYXiADKBFCAhAAEhsKD3VucGFja2VkX3NpbnQ2NBhfIAMoEkICEAASHAoQ",
+ "dW5wYWNrZWRfZml4ZWQzMhhgIAMoB0ICEAASHAoQdW5wYWNrZWRfZml4ZWQ2",
+ "NBhhIAMoBkICEAASHQoRdW5wYWNrZWRfc2ZpeGVkMzIYYiADKA9CAhAAEh0K",
+ "EXVucGFja2VkX3NmaXhlZDY0GGMgAygQQgIQABIaCg51bnBhY2tlZF9mbG9h",
+ "dBhkIAMoAkICEAASGwoPdW5wYWNrZWRfZG91YmxlGGUgAygBQgIQABIZCg11",
+ "bnBhY2tlZF9ib29sGGYgAygIQgIQABI5Cg11bnBhY2tlZF9lbnVtGGcgAygO",
+ "Mh4ucHJvdG9idWZfdW5pdHRlc3QuRm9yZWlnbkVudW1CAhAAIiAKFFRlc3RQ",
+ "YWNrZWRFeHRlbnNpb25zKggIARCAgICAAiIiChZUZXN0VW5wYWNrZWRFeHRl",
+ "bnNpb25zKggIARCAgICAAiKZBAoVVGVzdER5bmFtaWNFeHRlbnNpb25zEhkK",
+ "EHNjYWxhcl9leHRlbnNpb24Y0A8gASgHEjcKDmVudW1fZXh0ZW5zaW9uGNEP",
+ "IAEoDjIeLnByb3RvYnVmX3VuaXR0ZXN0LkZvcmVpZ25FbnVtElkKFmR5bmFt",
+ "aWNfZW51bV9leHRlbnNpb24Y0g8gASgOMjgucHJvdG9idWZfdW5pdHRlc3Qu",
+ "VGVzdER5bmFtaWNFeHRlbnNpb25zLkR5bmFtaWNFbnVtVHlwZRI9ChFtZXNz",
+ "YWdlX2V4dGVuc2lvbhjTDyABKAsyIS5wcm90b2J1Zl91bml0dGVzdC5Gb3Jl",
+ "aWduTWVzc2FnZRJfChlkeW5hbWljX21lc3NhZ2VfZXh0ZW5zaW9uGNQPIAEo",
+ "CzI7LnByb3RvYnVmX3VuaXR0ZXN0LlRlc3REeW5hbWljRXh0ZW5zaW9ucy5E",
+ "eW5hbWljTWVzc2FnZVR5cGUSGwoScmVwZWF0ZWRfZXh0ZW5zaW9uGNUPIAMo",
+ "CRIdChBwYWNrZWRfZXh0ZW5zaW9uGNYPIAMoEUICEAEaLAoSRHluYW1pY01l",
+ "c3NhZ2VUeXBlEhYKDWR5bmFtaWNfZmllbGQYtBAgASgFIkcKD0R5bmFtaWNF",
+ "bnVtVHlwZRIQCgtEWU5BTUlDX0ZPTxCYERIQCgtEWU5BTUlDX0JBUhCZERIQ",
+ "CgtEWU5BTUlDX0JBWhCaESLAAQojVGVzdFJlcGVhdGVkU2NhbGFyRGlmZmVy",
+ "ZW50VGFnU2l6ZXMSGAoQcmVwZWF0ZWRfZml4ZWQzMhgMIAMoBxIWCg5yZXBl",
+ "YXRlZF9pbnQzMhgNIAMoBRIZChByZXBlYXRlZF9maXhlZDY0GP4PIAMoBhIX",
+ "Cg5yZXBlYXRlZF9pbnQ2NBj/DyADKAMSGAoOcmVwZWF0ZWRfZmxvYXQY/v8P",
+ "IAMoAhIZCg9yZXBlYXRlZF91aW50NjQY//8PIAMoBCL3CQoQVGVzdFBhcnNp",
+ "bmdNZXJnZRI7ChJyZXF1aXJlZF9hbGxfdHlwZXMYASACKAsyHy5wcm90b2J1",
+ "Zl91bml0dGVzdC5UZXN0QWxsVHlwZXMSOwoSb3B0aW9uYWxfYWxsX3R5cGVz",
+ "GAIgASgLMh8ucHJvdG9idWZfdW5pdHRlc3QuVGVzdEFsbFR5cGVzEjsKEnJl",
+ "cGVhdGVkX2FsbF90eXBlcxgDIAMoCzIfLnByb3RvYnVmX3VuaXR0ZXN0LlRl",
+ "c3RBbGxUeXBlcxJICg1vcHRpb25hbGdyb3VwGAogASgKMjEucHJvdG9idWZf",
+ "dW5pdHRlc3QuVGVzdFBhcnNpbmdNZXJnZS5PcHRpb25hbEdyb3VwEkgKDXJl",
+ "cGVhdGVkZ3JvdXAYFCADKAoyMS5wcm90b2J1Zl91bml0dGVzdC5UZXN0UGFy",
+ "c2luZ01lcmdlLlJlcGVhdGVkR3JvdXAaqgQKF1JlcGVhdGVkRmllbGRzR2Vu",
+ "ZXJhdG9yEi8KBmZpZWxkMRgBIAMoCzIfLnByb3RvYnVmX3VuaXR0ZXN0LlRl",
+ "c3RBbGxUeXBlcxIvCgZmaWVsZDIYAiADKAsyHy5wcm90b2J1Zl91bml0dGVz",
+ "dC5UZXN0QWxsVHlwZXMSLwoGZmllbGQzGAMgAygLMh8ucHJvdG9idWZfdW5p",
+ "dHRlc3QuVGVzdEFsbFR5cGVzElIKBmdyb3VwMRgKIAMoCjJCLnByb3RvYnVm",
+ "X3VuaXR0ZXN0LlRlc3RQYXJzaW5nTWVyZ2UuUmVwZWF0ZWRGaWVsZHNHZW5l",
+ "cmF0b3IuR3JvdXAxElIKBmdyb3VwMhgUIAMoCjJCLnByb3RvYnVmX3VuaXR0",
+ "ZXN0LlRlc3RQYXJzaW5nTWVyZ2UuUmVwZWF0ZWRGaWVsZHNHZW5lcmF0b3Iu",
+ "R3JvdXAyEi4KBGV4dDEY6AcgAygLMh8ucHJvdG9idWZfdW5pdHRlc3QuVGVz",
+ "dEFsbFR5cGVzEi4KBGV4dDIY6QcgAygLMh8ucHJvdG9idWZfdW5pdHRlc3Qu",
+ "VGVzdEFsbFR5cGVzGjkKBkdyb3VwMRIvCgZmaWVsZDEYCyABKAsyHy5wcm90",
+ "b2J1Zl91bml0dGVzdC5UZXN0QWxsVHlwZXMaOQoGR3JvdXAyEi8KBmZpZWxk",
+ "MRgVIAEoCzIfLnByb3RvYnVmX3VuaXR0ZXN0LlRlc3RBbGxUeXBlcxpSCg1P",
+ "cHRpb25hbEdyb3VwEkEKGG9wdGlvbmFsX2dyb3VwX2FsbF90eXBlcxgLIAEo",
+ "CzIfLnByb3RvYnVmX3VuaXR0ZXN0LlRlc3RBbGxUeXBlcxpSCg1SZXBlYXRl",
+ "ZEdyb3VwEkEKGHJlcGVhdGVkX2dyb3VwX2FsbF90eXBlcxgVIAEoCzIfLnBy",
+ "b3RvYnVmX3VuaXR0ZXN0LlRlc3RBbGxUeXBlcyoJCOgHEICAgIACMlsKDG9w",
+ "dGlvbmFsX2V4dBIjLnByb3RvYnVmX3VuaXR0ZXN0LlRlc3RQYXJzaW5nTWVy",
+ "Z2UY6AcgASgLMh8ucHJvdG9idWZfdW5pdHRlc3QuVGVzdEFsbFR5cGVzMlsK",
+ "DHJlcGVhdGVkX2V4dBIjLnByb3RvYnVmX3VuaXR0ZXN0LlRlc3RQYXJzaW5n",
+ "TWVyZ2UY6QcgAygLMh8ucHJvdG9idWZfdW5pdHRlc3QuVGVzdEFsbFR5cGVz",
+ "IkQKG1Rlc3RDb21tZW50SW5qZWN0aW9uTWVzc2FnZRIlCgFhGAEgASgJOhoq",
+ "LyA8LSBOZWl0aGVyIHNob3VsZCB0aGlzLiIMCgpGb29SZXF1ZXN0Ig0KC0Zv",
+ "b1Jlc3BvbnNlIhIKEEZvb0NsaWVudE1lc3NhZ2UiEgoQRm9vU2VydmVyTWVz",
+ "c2FnZSIMCgpCYXJSZXF1ZXN0Ig0KC0JhclJlc3BvbnNlKkAKC0ZvcmVpZ25F",
+ "bnVtEg8KC0ZPUkVJR05fRk9PEAQSDwoLRk9SRUlHTl9CQVIQBRIPCgtGT1JF",
+ "SUdOX0JBWhAGKksKFFRlc3RFbnVtV2l0aER1cFZhbHVlEggKBEZPTzEQARII",
+ "CgRCQVIxEAISBwoDQkFaEAMSCAoERk9PMhABEggKBEJBUjIQAhoCEAEqiQEK",
+ "DlRlc3RTcGFyc2VFbnVtEgwKCFNQQVJTRV9BEHsSDgoIU1BBUlNFX0IQpucD",
+ "Eg8KCFNQQVJTRV9DELKxgAYSFQoIU1BBUlNFX0QQ8f//////////ARIVCghT",
+ "UEFSU0VfRRC03vz///////8BEgwKCFNQQVJTRV9GEAASDAoIU1BBUlNFX0cQ",
+ "AjKZAQoLVGVzdFNlcnZpY2USRAoDRm9vEh0ucHJvdG9idWZfdW5pdHRlc3Qu",
+ "Rm9vUmVxdWVzdBoeLnByb3RvYnVmX3VuaXR0ZXN0LkZvb1Jlc3BvbnNlEkQK",
+ "A0JhchIdLnByb3RvYnVmX3VuaXR0ZXN0LkJhclJlcXVlc3QaHi5wcm90b2J1",
+ "Zl91bml0dGVzdC5CYXJSZXNwb25zZTpGChhvcHRpb25hbF9pbnQzMl9leHRl",
+ "bnNpb24SJC5wcm90b2J1Zl91bml0dGVzdC5UZXN0QWxsRXh0ZW5zaW9ucxgB",
+ "IAEoBTpGChhvcHRpb25hbF9pbnQ2NF9leHRlbnNpb24SJC5wcm90b2J1Zl91",
+ "bml0dGVzdC5UZXN0QWxsRXh0ZW5zaW9ucxgCIAEoAzpHChlvcHRpb25hbF91",
+ "aW50MzJfZXh0ZW5zaW9uEiQucHJvdG9idWZfdW5pdHRlc3QuVGVzdEFsbEV4",
+ "dGVuc2lvbnMYAyABKA06RwoZb3B0aW9uYWxfdWludDY0X2V4dGVuc2lvbhIk",
+ "LnByb3RvYnVmX3VuaXR0ZXN0LlRlc3RBbGxFeHRlbnNpb25zGAQgASgEOkcK",
+ "GW9wdGlvbmFsX3NpbnQzMl9leHRlbnNpb24SJC5wcm90b2J1Zl91bml0dGVz",
+ "dC5UZXN0QWxsRXh0ZW5zaW9ucxgFIAEoETpHChlvcHRpb25hbF9zaW50NjRf",
+ "ZXh0ZW5zaW9uEiQucHJvdG9idWZfdW5pdHRlc3QuVGVzdEFsbEV4dGVuc2lv",
+ "bnMYBiABKBI6SAoab3B0aW9uYWxfZml4ZWQzMl9leHRlbnNpb24SJC5wcm90",
+ "b2J1Zl91bml0dGVzdC5UZXN0QWxsRXh0ZW5zaW9ucxgHIAEoBzpIChpvcHRp",
+ "b25hbF9maXhlZDY0X2V4dGVuc2lvbhIkLnByb3RvYnVmX3VuaXR0ZXN0LlRl",
+ "c3RBbGxFeHRlbnNpb25zGAggASgGOkkKG29wdGlvbmFsX3NmaXhlZDMyX2V4",
+ "dGVuc2lvbhIkLnByb3RvYnVmX3VuaXR0ZXN0LlRlc3RBbGxFeHRlbnNpb25z",
+ "GAkgASgPOkkKG29wdGlvbmFsX3NmaXhlZDY0X2V4dGVuc2lvbhIkLnByb3Rv",
+ "YnVmX3VuaXR0ZXN0LlRlc3RBbGxFeHRlbnNpb25zGAogASgQOkYKGG9wdGlv",
+ "bmFsX2Zsb2F0X2V4dGVuc2lvbhIkLnByb3RvYnVmX3VuaXR0ZXN0LlRlc3RB",
+ "bGxFeHRlbnNpb25zGAsgASgCOkcKGW9wdGlvbmFsX2RvdWJsZV9leHRlbnNp",
+ "b24SJC5wcm90b2J1Zl91bml0dGVzdC5UZXN0QWxsRXh0ZW5zaW9ucxgMIAEo",
+ "ATpFChdvcHRpb25hbF9ib29sX2V4dGVuc2lvbhIkLnByb3RvYnVmX3VuaXR0",
+ "ZXN0LlRlc3RBbGxFeHRlbnNpb25zGA0gASgIOkcKGW9wdGlvbmFsX3N0cmlu",
+ "Z19leHRlbnNpb24SJC5wcm90b2J1Zl91bml0dGVzdC5UZXN0QWxsRXh0ZW5z",
+ "aW9ucxgOIAEoCTpGChhvcHRpb25hbF9ieXRlc19leHRlbnNpb24SJC5wcm90",
+ "b2J1Zl91bml0dGVzdC5UZXN0QWxsRXh0ZW5zaW9ucxgPIAEoDDpxChdvcHRp",
+ "b25hbGdyb3VwX2V4dGVuc2lvbhIkLnByb3RvYnVmX3VuaXR0ZXN0LlRlc3RB",
+ "bGxFeHRlbnNpb25zGBAgASgKMioucHJvdG9idWZfdW5pdHRlc3QuT3B0aW9u",
+ "YWxHcm91cF9leHRlbnNpb246fgohb3B0aW9uYWxfbmVzdGVkX21lc3NhZ2Vf",
+ "ZXh0ZW5zaW9uEiQucHJvdG9idWZfdW5pdHRlc3QuVGVzdEFsbEV4dGVuc2lv",
+ "bnMYEiABKAsyLS5wcm90b2J1Zl91bml0dGVzdC5UZXN0QWxsVHlwZXMuTmVz",
+ "dGVkTWVzc2FnZTpzCiJvcHRpb25hbF9mb3JlaWduX21lc3NhZ2VfZXh0ZW5z",
+ "aW9uEiQucHJvdG9idWZfdW5pdHRlc3QuVGVzdEFsbEV4dGVuc2lvbnMYEyAB",
+ "KAsyIS5wcm90b2J1Zl91bml0dGVzdC5Gb3JlaWduTWVzc2FnZTp4CiFvcHRp",
+ "b25hbF9pbXBvcnRfbWVzc2FnZV9leHRlbnNpb24SJC5wcm90b2J1Zl91bml0",
+ "dGVzdC5UZXN0QWxsRXh0ZW5zaW9ucxgUIAEoCzInLnByb3RvYnVmX3VuaXR0",
+ "ZXN0X2ltcG9ydC5JbXBvcnRNZXNzYWdlOngKHm9wdGlvbmFsX25lc3RlZF9l",
+ "bnVtX2V4dGVuc2lvbhIkLnByb3RvYnVmX3VuaXR0ZXN0LlRlc3RBbGxFeHRl",
+ "bnNpb25zGBUgASgOMioucHJvdG9idWZfdW5pdHRlc3QuVGVzdEFsbFR5cGVz",
+ "Lk5lc3RlZEVudW06bQofb3B0aW9uYWxfZm9yZWlnbl9lbnVtX2V4dGVuc2lv",
+ "bhIkLnByb3RvYnVmX3VuaXR0ZXN0LlRlc3RBbGxFeHRlbnNpb25zGBYgASgO",
+ "Mh4ucHJvdG9idWZfdW5pdHRlc3QuRm9yZWlnbkVudW06cgoeb3B0aW9uYWxf",
+ "aW1wb3J0X2VudW1fZXh0ZW5zaW9uEiQucHJvdG9idWZfdW5pdHRlc3QuVGVz",
+ "dEFsbEV4dGVuc2lvbnMYFyABKA4yJC5wcm90b2J1Zl91bml0dGVzdF9pbXBv",
+ "cnQuSW1wb3J0RW51bTpRCh9vcHRpb25hbF9zdHJpbmdfcGllY2VfZXh0ZW5z",
+ "aW9uEiQucHJvdG9idWZfdW5pdHRlc3QuVGVzdEFsbEV4dGVuc2lvbnMYGCAB",
+ "KAlCAggCOkkKF29wdGlvbmFsX2NvcmRfZXh0ZW5zaW9uEiQucHJvdG9idWZf",
+ "dW5pdHRlc3QuVGVzdEFsbEV4dGVuc2lvbnMYGSABKAlCAggBOoUBCihvcHRp",
+ "b25hbF9wdWJsaWNfaW1wb3J0X21lc3NhZ2VfZXh0ZW5zaW9uEiQucHJvdG9i",
+ "dWZfdW5pdHRlc3QuVGVzdEFsbEV4dGVuc2lvbnMYGiABKAsyLS5wcm90b2J1",
+ "Zl91bml0dGVzdF9pbXBvcnQuUHVibGljSW1wb3J0TWVzc2FnZTqAAQofb3B0",
+ "aW9uYWxfbGF6eV9tZXNzYWdlX2V4dGVuc2lvbhIkLnByb3RvYnVmX3VuaXR0",
+ "ZXN0LlRlc3RBbGxFeHRlbnNpb25zGBsgASgLMi0ucHJvdG9idWZfdW5pdHRl",
+ "c3QuVGVzdEFsbFR5cGVzLk5lc3RlZE1lc3NhZ2VCAigBOkYKGHJlcGVhdGVk",
+ "X2ludDMyX2V4dGVuc2lvbhIkLnByb3RvYnVmX3VuaXR0ZXN0LlRlc3RBbGxF",
+ "eHRlbnNpb25zGB8gAygFOkYKGHJlcGVhdGVkX2ludDY0X2V4dGVuc2lvbhIk",
+ "LnByb3RvYnVmX3VuaXR0ZXN0LlRlc3RBbGxFeHRlbnNpb25zGCAgAygDOkcK",
+ "GXJlcGVhdGVkX3VpbnQzMl9leHRlbnNpb24SJC5wcm90b2J1Zl91bml0dGVz",
+ "dC5UZXN0QWxsRXh0ZW5zaW9ucxghIAMoDTpHChlyZXBlYXRlZF91aW50NjRf",
+ "ZXh0ZW5zaW9uEiQucHJvdG9idWZfdW5pdHRlc3QuVGVzdEFsbEV4dGVuc2lv",
+ "bnMYIiADKAQ6RwoZcmVwZWF0ZWRfc2ludDMyX2V4dGVuc2lvbhIkLnByb3Rv",
+ "YnVmX3VuaXR0ZXN0LlRlc3RBbGxFeHRlbnNpb25zGCMgAygROkcKGXJlcGVh",
+ "dGVkX3NpbnQ2NF9leHRlbnNpb24SJC5wcm90b2J1Zl91bml0dGVzdC5UZXN0",
+ "QWxsRXh0ZW5zaW9ucxgkIAMoEjpIChpyZXBlYXRlZF9maXhlZDMyX2V4dGVu",
+ "c2lvbhIkLnByb3RvYnVmX3VuaXR0ZXN0LlRlc3RBbGxFeHRlbnNpb25zGCUg",
+ "AygHOkgKGnJlcGVhdGVkX2ZpeGVkNjRfZXh0ZW5zaW9uEiQucHJvdG9idWZf",
+ "dW5pdHRlc3QuVGVzdEFsbEV4dGVuc2lvbnMYJiADKAY6SQobcmVwZWF0ZWRf",
+ "c2ZpeGVkMzJfZXh0ZW5zaW9uEiQucHJvdG9idWZfdW5pdHRlc3QuVGVzdEFs",
+ "bEV4dGVuc2lvbnMYJyADKA86SQobcmVwZWF0ZWRfc2ZpeGVkNjRfZXh0ZW5z",
+ "aW9uEiQucHJvdG9idWZfdW5pdHRlc3QuVGVzdEFsbEV4dGVuc2lvbnMYKCAD",
+ "KBA6RgoYcmVwZWF0ZWRfZmxvYXRfZXh0ZW5zaW9uEiQucHJvdG9idWZfdW5p",
+ "dHRlc3QuVGVzdEFsbEV4dGVuc2lvbnMYKSADKAI6RwoZcmVwZWF0ZWRfZG91",
+ "YmxlX2V4dGVuc2lvbhIkLnByb3RvYnVmX3VuaXR0ZXN0LlRlc3RBbGxFeHRl",
+ "bnNpb25zGCogAygBOkUKF3JlcGVhdGVkX2Jvb2xfZXh0ZW5zaW9uEiQucHJv",
+ "dG9idWZfdW5pdHRlc3QuVGVzdEFsbEV4dGVuc2lvbnMYKyADKAg6RwoZcmVw",
+ "ZWF0ZWRfc3RyaW5nX2V4dGVuc2lvbhIkLnByb3RvYnVmX3VuaXR0ZXN0LlRl",
+ "c3RBbGxFeHRlbnNpb25zGCwgAygJOkYKGHJlcGVhdGVkX2J5dGVzX2V4dGVu",
+ "c2lvbhIkLnByb3RvYnVmX3VuaXR0ZXN0LlRlc3RBbGxFeHRlbnNpb25zGC0g",
+ "AygMOnEKF3JlcGVhdGVkZ3JvdXBfZXh0ZW5zaW9uEiQucHJvdG9idWZfdW5p",
+ "dHRlc3QuVGVzdEFsbEV4dGVuc2lvbnMYLiADKAoyKi5wcm90b2J1Zl91bml0",
+ "dGVzdC5SZXBlYXRlZEdyb3VwX2V4dGVuc2lvbjp+CiFyZXBlYXRlZF9uZXN0",
+ "ZWRfbWVzc2FnZV9leHRlbnNpb24SJC5wcm90b2J1Zl91bml0dGVzdC5UZXN0",
+ "QWxsRXh0ZW5zaW9ucxgwIAMoCzItLnByb3RvYnVmX3VuaXR0ZXN0LlRlc3RB",
+ "bGxUeXBlcy5OZXN0ZWRNZXNzYWdlOnMKInJlcGVhdGVkX2ZvcmVpZ25fbWVz",
+ "c2FnZV9leHRlbnNpb24SJC5wcm90b2J1Zl91bml0dGVzdC5UZXN0QWxsRXh0",
+ "ZW5zaW9ucxgxIAMoCzIhLnByb3RvYnVmX3VuaXR0ZXN0LkZvcmVpZ25NZXNz",
+ "YWdlOngKIXJlcGVhdGVkX2ltcG9ydF9tZXNzYWdlX2V4dGVuc2lvbhIkLnBy",
+ "b3RvYnVmX3VuaXR0ZXN0LlRlc3RBbGxFeHRlbnNpb25zGDIgAygLMicucHJv",
+ "dG9idWZfdW5pdHRlc3RfaW1wb3J0LkltcG9ydE1lc3NhZ2U6eAoecmVwZWF0",
+ "ZWRfbmVzdGVkX2VudW1fZXh0ZW5zaW9uEiQucHJvdG9idWZfdW5pdHRlc3Qu",
+ "VGVzdEFsbEV4dGVuc2lvbnMYMyADKA4yKi5wcm90b2J1Zl91bml0dGVzdC5U",
+ "ZXN0QWxsVHlwZXMuTmVzdGVkRW51bTptCh9yZXBlYXRlZF9mb3JlaWduX2Vu",
+ "dW1fZXh0ZW5zaW9uEiQucHJvdG9idWZfdW5pdHRlc3QuVGVzdEFsbEV4dGVu",
+ "c2lvbnMYNCADKA4yHi5wcm90b2J1Zl91bml0dGVzdC5Gb3JlaWduRW51bTpy",
+ "Ch5yZXBlYXRlZF9pbXBvcnRfZW51bV9leHRlbnNpb24SJC5wcm90b2J1Zl91",
+ "bml0dGVzdC5UZXN0QWxsRXh0ZW5zaW9ucxg1IAMoDjIkLnByb3RvYnVmX3Vu",
+ "aXR0ZXN0X2ltcG9ydC5JbXBvcnRFbnVtOlEKH3JlcGVhdGVkX3N0cmluZ19w",
+ "aWVjZV9leHRlbnNpb24SJC5wcm90b2J1Zl91bml0dGVzdC5UZXN0QWxsRXh0",
+ "ZW5zaW9ucxg2IAMoCUICCAI6SQoXcmVwZWF0ZWRfY29yZF9leHRlbnNpb24S",
+ "JC5wcm90b2J1Zl91bml0dGVzdC5UZXN0QWxsRXh0ZW5zaW9ucxg3IAMoCUIC",
+ "CAE6gAEKH3JlcGVhdGVkX2xhenlfbWVzc2FnZV9leHRlbnNpb24SJC5wcm90",
+ "b2J1Zl91bml0dGVzdC5UZXN0QWxsRXh0ZW5zaW9ucxg5IAMoCzItLnByb3Rv",
+ "YnVmX3VuaXR0ZXN0LlRlc3RBbGxUeXBlcy5OZXN0ZWRNZXNzYWdlQgIoATpJ",
+ "ChdkZWZhdWx0X2ludDMyX2V4dGVuc2lvbhIkLnByb3RvYnVmX3VuaXR0ZXN0",
+ "LlRlc3RBbGxFeHRlbnNpb25zGD0gASgFOgI0MTpJChdkZWZhdWx0X2ludDY0",
+ "X2V4dGVuc2lvbhIkLnByb3RvYnVmX3VuaXR0ZXN0LlRlc3RBbGxFeHRlbnNp",
+ "b25zGD4gASgDOgI0MjpKChhkZWZhdWx0X3VpbnQzMl9leHRlbnNpb24SJC5w",
+ "cm90b2J1Zl91bml0dGVzdC5UZXN0QWxsRXh0ZW5zaW9ucxg/IAEoDToCNDM6",
+ "SgoYZGVmYXVsdF91aW50NjRfZXh0ZW5zaW9uEiQucHJvdG9idWZfdW5pdHRl",
+ "c3QuVGVzdEFsbEV4dGVuc2lvbnMYQCABKAQ6AjQ0OksKGGRlZmF1bHRfc2lu",
+ "dDMyX2V4dGVuc2lvbhIkLnByb3RvYnVmX3VuaXR0ZXN0LlRlc3RBbGxFeHRl",
+ "bnNpb25zGEEgASgROgMtNDU6SgoYZGVmYXVsdF9zaW50NjRfZXh0ZW5zaW9u",
+ "EiQucHJvdG9idWZfdW5pdHRlc3QuVGVzdEFsbEV4dGVuc2lvbnMYQiABKBI6",
+ "AjQ2OksKGWRlZmF1bHRfZml4ZWQzMl9leHRlbnNpb24SJC5wcm90b2J1Zl91",
+ "bml0dGVzdC5UZXN0QWxsRXh0ZW5zaW9ucxhDIAEoBzoCNDc6SwoZZGVmYXVs",
+ "dF9maXhlZDY0X2V4dGVuc2lvbhIkLnByb3RvYnVmX3VuaXR0ZXN0LlRlc3RB",
+ "bGxFeHRlbnNpb25zGEQgASgGOgI0ODpMChpkZWZhdWx0X3NmaXhlZDMyX2V4",
+ "dGVuc2lvbhIkLnByb3RvYnVmX3VuaXR0ZXN0LlRlc3RBbGxFeHRlbnNpb25z",
+ "GEUgASgPOgI0OTpNChpkZWZhdWx0X3NmaXhlZDY0X2V4dGVuc2lvbhIkLnBy",
+ "b3RvYnVmX3VuaXR0ZXN0LlRlc3RBbGxFeHRlbnNpb25zGEYgASgQOgMtNTA6",
+ "SwoXZGVmYXVsdF9mbG9hdF9leHRlbnNpb24SJC5wcm90b2J1Zl91bml0dGVz",
+ "dC5UZXN0QWxsRXh0ZW5zaW9ucxhHIAEoAjoENTEuNTpNChhkZWZhdWx0X2Rv",
+ "dWJsZV9leHRlbnNpb24SJC5wcm90b2J1Zl91bml0dGVzdC5UZXN0QWxsRXh0",
+ "ZW5zaW9ucxhIIAEoAToFNTIwMDA6SgoWZGVmYXVsdF9ib29sX2V4dGVuc2lv",
+ "bhIkLnByb3RvYnVmX3VuaXR0ZXN0LlRlc3RBbGxFeHRlbnNpb25zGEkgASgI",
+ "OgR0cnVlOk0KGGRlZmF1bHRfc3RyaW5nX2V4dGVuc2lvbhIkLnByb3RvYnVm",
+ "X3VuaXR0ZXN0LlRlc3RBbGxFeHRlbnNpb25zGEogASgJOgVoZWxsbzpMChdk",
+ "ZWZhdWx0X2J5dGVzX2V4dGVuc2lvbhIkLnByb3RvYnVmX3VuaXR0ZXN0LlRl",
+ "c3RBbGxFeHRlbnNpb25zGEsgASgMOgV3b3JsZDp8Ch1kZWZhdWx0X25lc3Rl",
+ "ZF9lbnVtX2V4dGVuc2lvbhIkLnByb3RvYnVmX3VuaXR0ZXN0LlRlc3RBbGxF",
+ "eHRlbnNpb25zGFEgASgOMioucHJvdG9idWZfdW5pdHRlc3QuVGVzdEFsbFR5",
+ "cGVzLk5lc3RlZEVudW06A0JBUjp5Ch5kZWZhdWx0X2ZvcmVpZ25fZW51bV9l",
+ "eHRlbnNpb24SJC5wcm90b2J1Zl91bml0dGVzdC5UZXN0QWxsRXh0ZW5zaW9u",
+ "cxhSIAEoDjIeLnByb3RvYnVmX3VuaXR0ZXN0LkZvcmVpZ25FbnVtOgtGT1JF",
+ "SUdOX0JBUjp9Ch1kZWZhdWx0X2ltcG9ydF9lbnVtX2V4dGVuc2lvbhIkLnBy",
+ "b3RvYnVmX3VuaXR0ZXN0LlRlc3RBbGxFeHRlbnNpb25zGFMgASgOMiQucHJv",
+ "dG9idWZfdW5pdHRlc3RfaW1wb3J0LkltcG9ydEVudW06CklNUE9SVF9CQVI6",
+ "VQoeZGVmYXVsdF9zdHJpbmdfcGllY2VfZXh0ZW5zaW9uEiQucHJvdG9idWZf",
+ "dW5pdHRlc3QuVGVzdEFsbEV4dGVuc2lvbnMYVCABKAk6A2FiY0ICCAI6TQoW",
+ "ZGVmYXVsdF9jb3JkX2V4dGVuc2lvbhIkLnByb3RvYnVmX3VuaXR0ZXN0LlRl",
+ "c3RBbGxFeHRlbnNpb25zGFUgASgJOgMxMjNCAggBOkQKFm9uZW9mX3VpbnQz",
+ "Ml9leHRlbnNpb24SJC5wcm90b2J1Zl91bml0dGVzdC5UZXN0QWxsRXh0ZW5z",
+ "aW9ucxhvIAEoDTp7Ch5vbmVvZl9uZXN0ZWRfbWVzc2FnZV9leHRlbnNpb24S",
+ "JC5wcm90b2J1Zl91bml0dGVzdC5UZXN0QWxsRXh0ZW5zaW9ucxhwIAEoCzIt",
+ "LnByb3RvYnVmX3VuaXR0ZXN0LlRlc3RBbGxUeXBlcy5OZXN0ZWRNZXNzYWdl",
+ "OkQKFm9uZW9mX3N0cmluZ19leHRlbnNpb24SJC5wcm90b2J1Zl91bml0dGVz",
+ "dC5UZXN0QWxsRXh0ZW5zaW9ucxhxIAEoCTpDChVvbmVvZl9ieXRlc19leHRl",
+ "bnNpb24SJC5wcm90b2J1Zl91bml0dGVzdC5UZXN0QWxsRXh0ZW5zaW9ucxhy",
+ "IAEoDDpCChNteV9leHRlbnNpb25fc3RyaW5nEiUucHJvdG9idWZfdW5pdHRl",
+ "c3QuVGVzdEZpZWxkT3JkZXJpbmdzGDIgASgJOj8KEG15X2V4dGVuc2lvbl9p",
+ "bnQSJS5wcm90b2J1Zl91bml0dGVzdC5UZXN0RmllbGRPcmRlcmluZ3MYBSAB",
+ "KAU6SwoWcGFja2VkX2ludDMyX2V4dGVuc2lvbhInLnByb3RvYnVmX3VuaXR0",
+ "ZXN0LlRlc3RQYWNrZWRFeHRlbnNpb25zGFogAygFQgIQATpLChZwYWNrZWRf",
+ "aW50NjRfZXh0ZW5zaW9uEicucHJvdG9idWZfdW5pdHRlc3QuVGVzdFBhY2tl",
+ "ZEV4dGVuc2lvbnMYWyADKANCAhABOkwKF3BhY2tlZF91aW50MzJfZXh0ZW5z",
+ "aW9uEicucHJvdG9idWZfdW5pdHRlc3QuVGVzdFBhY2tlZEV4dGVuc2lvbnMY",
+ "XCADKA1CAhABOkwKF3BhY2tlZF91aW50NjRfZXh0ZW5zaW9uEicucHJvdG9i",
+ "dWZfdW5pdHRlc3QuVGVzdFBhY2tlZEV4dGVuc2lvbnMYXSADKARCAhABOkwK",
+ "F3BhY2tlZF9zaW50MzJfZXh0ZW5zaW9uEicucHJvdG9idWZfdW5pdHRlc3Qu",
+ "VGVzdFBhY2tlZEV4dGVuc2lvbnMYXiADKBFCAhABOkwKF3BhY2tlZF9zaW50",
+ "NjRfZXh0ZW5zaW9uEicucHJvdG9idWZfdW5pdHRlc3QuVGVzdFBhY2tlZEV4",
+ "dGVuc2lvbnMYXyADKBJCAhABOk0KGHBhY2tlZF9maXhlZDMyX2V4dGVuc2lv",
+ "bhInLnByb3RvYnVmX3VuaXR0ZXN0LlRlc3RQYWNrZWRFeHRlbnNpb25zGGAg",
+ "AygHQgIQATpNChhwYWNrZWRfZml4ZWQ2NF9leHRlbnNpb24SJy5wcm90b2J1",
+ "Zl91bml0dGVzdC5UZXN0UGFja2VkRXh0ZW5zaW9ucxhhIAMoBkICEAE6TgoZ",
+ "cGFja2VkX3NmaXhlZDMyX2V4dGVuc2lvbhInLnByb3RvYnVmX3VuaXR0ZXN0",
+ "LlRlc3RQYWNrZWRFeHRlbnNpb25zGGIgAygPQgIQATpOChlwYWNrZWRfc2Zp",
+ "eGVkNjRfZXh0ZW5zaW9uEicucHJvdG9idWZfdW5pdHRlc3QuVGVzdFBhY2tl",
+ "ZEV4dGVuc2lvbnMYYyADKBBCAhABOksKFnBhY2tlZF9mbG9hdF9leHRlbnNp",
+ "b24SJy5wcm90b2J1Zl91bml0dGVzdC5UZXN0UGFja2VkRXh0ZW5zaW9ucxhk",
+ "IAMoAkICEAE6TAoXcGFja2VkX2RvdWJsZV9leHRlbnNpb24SJy5wcm90b2J1",
+ "Zl91bml0dGVzdC5UZXN0UGFja2VkRXh0ZW5zaW9ucxhlIAMoAUICEAE6SgoV",
+ "cGFja2VkX2Jvb2xfZXh0ZW5zaW9uEicucHJvdG9idWZfdW5pdHRlc3QuVGVz",
+ "dFBhY2tlZEV4dGVuc2lvbnMYZiADKAhCAhABOmoKFXBhY2tlZF9lbnVtX2V4",
+ "dGVuc2lvbhInLnByb3RvYnVmX3VuaXR0ZXN0LlRlc3RQYWNrZWRFeHRlbnNp",
+ "b25zGGcgAygOMh4ucHJvdG9idWZfdW5pdHRlc3QuRm9yZWlnbkVudW1CAhAB",
+ "Ok8KGHVucGFja2VkX2ludDMyX2V4dGVuc2lvbhIpLnByb3RvYnVmX3VuaXR0",
+ "ZXN0LlRlc3RVbnBhY2tlZEV4dGVuc2lvbnMYWiADKAVCAhAAOk8KGHVucGFj",
+ "a2VkX2ludDY0X2V4dGVuc2lvbhIpLnByb3RvYnVmX3VuaXR0ZXN0LlRlc3RV",
+ "bnBhY2tlZEV4dGVuc2lvbnMYWyADKANCAhAAOlAKGXVucGFja2VkX3VpbnQz",
+ "Ml9leHRlbnNpb24SKS5wcm90b2J1Zl91bml0dGVzdC5UZXN0VW5wYWNrZWRF",
+ "eHRlbnNpb25zGFwgAygNQgIQADpQChl1bnBhY2tlZF91aW50NjRfZXh0ZW5z",
+ "aW9uEikucHJvdG9idWZfdW5pdHRlc3QuVGVzdFVucGFja2VkRXh0ZW5zaW9u",
+ "cxhdIAMoBEICEAA6UAoZdW5wYWNrZWRfc2ludDMyX2V4dGVuc2lvbhIpLnBy",
+ "b3RvYnVmX3VuaXR0ZXN0LlRlc3RVbnBhY2tlZEV4dGVuc2lvbnMYXiADKBFC",
+ "AhAAOlAKGXVucGFja2VkX3NpbnQ2NF9leHRlbnNpb24SKS5wcm90b2J1Zl91",
+ "bml0dGVzdC5UZXN0VW5wYWNrZWRFeHRlbnNpb25zGF8gAygSQgIQADpRChp1",
+ "bnBhY2tlZF9maXhlZDMyX2V4dGVuc2lvbhIpLnByb3RvYnVmX3VuaXR0ZXN0",
+ "LlRlc3RVbnBhY2tlZEV4dGVuc2lvbnMYYCADKAdCAhAAOlEKGnVucGFja2Vk",
+ "X2ZpeGVkNjRfZXh0ZW5zaW9uEikucHJvdG9idWZfdW5pdHRlc3QuVGVzdFVu",
+ "cGFja2VkRXh0ZW5zaW9ucxhhIAMoBkICEAA6UgobdW5wYWNrZWRfc2ZpeGVk",
+ "MzJfZXh0ZW5zaW9uEikucHJvdG9idWZfdW5pdHRlc3QuVGVzdFVucGFja2Vk",
+ "RXh0ZW5zaW9ucxhiIAMoD0ICEAA6UgobdW5wYWNrZWRfc2ZpeGVkNjRfZXh0",
+ "ZW5zaW9uEikucHJvdG9idWZfdW5pdHRlc3QuVGVzdFVucGFja2VkRXh0ZW5z",
+ "aW9ucxhjIAMoEEICEAA6TwoYdW5wYWNrZWRfZmxvYXRfZXh0ZW5zaW9uEiku",
+ "cHJvdG9idWZfdW5pdHRlc3QuVGVzdFVucGFja2VkRXh0ZW5zaW9ucxhkIAMo",
+ "AkICEAA6UAoZdW5wYWNrZWRfZG91YmxlX2V4dGVuc2lvbhIpLnByb3RvYnVm",
+ "X3VuaXR0ZXN0LlRlc3RVbnBhY2tlZEV4dGVuc2lvbnMYZSADKAFCAhAAOk4K",
+ "F3VucGFja2VkX2Jvb2xfZXh0ZW5zaW9uEikucHJvdG9idWZfdW5pdHRlc3Qu",
+ "VGVzdFVucGFja2VkRXh0ZW5zaW9ucxhmIAMoCEICEAA6bgoXdW5wYWNrZWRf",
+ "ZW51bV9leHRlbnNpb24SKS5wcm90b2J1Zl91bml0dGVzdC5UZXN0VW5wYWNr",
+ "ZWRFeHRlbnNpb25zGGcgAygOMh4ucHJvdG9idWZfdW5pdHRlc3QuRm9yZWln",
+ "bkVudW1CAhAAQkFCDVVuaXR0ZXN0UHJvdG9IAYABAYgBAZABAfgBAaoCIUdv",
+ "b2dsZS5Qcm90b2NvbEJ1ZmZlcnMuVGVzdFByb3Rvcw=="));
+ pbd::FileDescriptor.InternalDescriptorAssigner assigner = delegate(pbd::FileDescriptor root) {
+ descriptor = root;
+ internal__static_protobuf_unittest_TestAllTypes__Descriptor = Descriptor.MessageTypes[0];
+ internal__static_protobuf_unittest_TestAllTypes__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestAllTypes, global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Builder>(internal__static_protobuf_unittest_TestAllTypes__Descriptor,
+ new string[] { "OptionalInt32", "OptionalInt64", "OptionalUint32", "OptionalUint64", "OptionalSint32", "OptionalSint64", "OptionalFixed32", "OptionalFixed64", "OptionalSfixed32", "OptionalSfixed64", "OptionalFloat", "OptionalDouble", "OptionalBool", "OptionalString", "OptionalBytes", "OptionalGroup", "OptionalNestedMessage", "OptionalForeignMessage", "OptionalImportMessage", "OptionalNestedEnum", "OptionalForeignEnum", "OptionalImportEnum", "OptionalStringPiece", "OptionalCord", "OptionalPublicImportMessage", "OptionalLazyMessage", "RepeatedInt32", "RepeatedInt64", "RepeatedUint32", "RepeatedUint64", "RepeatedSint32", "RepeatedSint64", "RepeatedFixed32", "RepeatedFixed64", "RepeatedSfixed32", "RepeatedSfixed64", "RepeatedFloat", "RepeatedDouble", "RepeatedBool", "RepeatedString", "RepeatedBytes", "RepeatedGroup", "RepeatedNestedMessage", "RepeatedForeignMessage", "RepeatedImportMessage", "RepeatedNestedEnum", "RepeatedForeignEnum", "RepeatedImportEnum", "RepeatedStringPiece", "RepeatedCord", "RepeatedLazyMessage", "DefaultInt32", "DefaultInt64", "DefaultUint32", "DefaultUint64", "DefaultSint32", "DefaultSint64", "DefaultFixed32", "DefaultFixed64", "DefaultSfixed32", "DefaultSfixed64", "DefaultFloat", "DefaultDouble", "DefaultBool", "DefaultString", "DefaultBytes", "DefaultNestedEnum", "DefaultForeignEnum", "DefaultImportEnum", "DefaultStringPiece", "DefaultCord", "OneofUint32", "OneofNestedMessage", "OneofString", "OneofBytes", });
+ internal__static_protobuf_unittest_TestAllTypes_NestedMessage__Descriptor = internal__static_protobuf_unittest_TestAllTypes__Descriptor.NestedTypes[0];
+ internal__static_protobuf_unittest_TestAllTypes_NestedMessage__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage, global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage.Builder>(internal__static_protobuf_unittest_TestAllTypes_NestedMessage__Descriptor,
+ new string[] { "Bb", });
+ internal__static_protobuf_unittest_TestAllTypes_OptionalGroup__Descriptor = internal__static_protobuf_unittest_TestAllTypes__Descriptor.NestedTypes[1];
+ internal__static_protobuf_unittest_TestAllTypes_OptionalGroup__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.OptionalGroup, global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.OptionalGroup.Builder>(internal__static_protobuf_unittest_TestAllTypes_OptionalGroup__Descriptor,
+ new string[] { "A", });
+ internal__static_protobuf_unittest_TestAllTypes_RepeatedGroup__Descriptor = internal__static_protobuf_unittest_TestAllTypes__Descriptor.NestedTypes[2];
+ internal__static_protobuf_unittest_TestAllTypes_RepeatedGroup__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.RepeatedGroup, global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.RepeatedGroup.Builder>(internal__static_protobuf_unittest_TestAllTypes_RepeatedGroup__Descriptor,
+ new string[] { "A", });
+ internal__static_protobuf_unittest_NestedTestAllTypes__Descriptor = Descriptor.MessageTypes[1];
+ internal__static_protobuf_unittest_NestedTestAllTypes__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.NestedTestAllTypes, global::Google.ProtocolBuffers.TestProtos.NestedTestAllTypes.Builder>(internal__static_protobuf_unittest_NestedTestAllTypes__Descriptor,
+ new string[] { "Child", "Payload", });
+ internal__static_protobuf_unittest_TestDeprecatedFields__Descriptor = Descriptor.MessageTypes[2];
+ internal__static_protobuf_unittest_TestDeprecatedFields__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestDeprecatedFields, global::Google.ProtocolBuffers.TestProtos.TestDeprecatedFields.Builder>(internal__static_protobuf_unittest_TestDeprecatedFields__Descriptor,
+ new string[] { "DeprecatedInt32", });
+ internal__static_protobuf_unittest_ForeignMessage__Descriptor = Descriptor.MessageTypes[3];
+ internal__static_protobuf_unittest_ForeignMessage__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.ForeignMessage, global::Google.ProtocolBuffers.TestProtos.ForeignMessage.Builder>(internal__static_protobuf_unittest_ForeignMessage__Descriptor,
+ new string[] { "C", });
+ internal__static_protobuf_unittest_TestAllExtensions__Descriptor = Descriptor.MessageTypes[4];
+ internal__static_protobuf_unittest_TestAllExtensions__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestAllExtensions, global::Google.ProtocolBuffers.TestProtos.TestAllExtensions.Builder>(internal__static_protobuf_unittest_TestAllExtensions__Descriptor,
+ new string[] { });
+ internal__static_protobuf_unittest_OptionalGroup_extension__Descriptor = Descriptor.MessageTypes[5];
+ internal__static_protobuf_unittest_OptionalGroup_extension__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.OptionalGroup_extension, global::Google.ProtocolBuffers.TestProtos.OptionalGroup_extension.Builder>(internal__static_protobuf_unittest_OptionalGroup_extension__Descriptor,
+ new string[] { "A", });
+ internal__static_protobuf_unittest_RepeatedGroup_extension__Descriptor = Descriptor.MessageTypes[6];
+ internal__static_protobuf_unittest_RepeatedGroup_extension__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.RepeatedGroup_extension, global::Google.ProtocolBuffers.TestProtos.RepeatedGroup_extension.Builder>(internal__static_protobuf_unittest_RepeatedGroup_extension__Descriptor,
+ new string[] { "A", });
+ internal__static_protobuf_unittest_TestNestedExtension__Descriptor = Descriptor.MessageTypes[7];
+ internal__static_protobuf_unittest_TestNestedExtension__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestNestedExtension, global::Google.ProtocolBuffers.TestProtos.TestNestedExtension.Builder>(internal__static_protobuf_unittest_TestNestedExtension__Descriptor,
+ new string[] { });
+ global::Google.ProtocolBuffers.TestProtos.TestNestedExtension.Test = pb::GeneratedSingleExtension<string>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.TestNestedExtension.Descriptor.Extensions[0]);
+ global::Google.ProtocolBuffers.TestProtos.TestNestedExtension.NestedStringExtension = pb::GeneratedSingleExtension<string>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.TestNestedExtension.Descriptor.Extensions[1]);
+ internal__static_protobuf_unittest_TestRequired__Descriptor = Descriptor.MessageTypes[8];
+ internal__static_protobuf_unittest_TestRequired__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestRequired, global::Google.ProtocolBuffers.TestProtos.TestRequired.Builder>(internal__static_protobuf_unittest_TestRequired__Descriptor,
+ new string[] { "A", "Dummy2", "B", "Dummy4", "Dummy5", "Dummy6", "Dummy7", "Dummy8", "Dummy9", "Dummy10", "Dummy11", "Dummy12", "Dummy13", "Dummy14", "Dummy15", "Dummy16", "Dummy17", "Dummy18", "Dummy19", "Dummy20", "Dummy21", "Dummy22", "Dummy23", "Dummy24", "Dummy25", "Dummy26", "Dummy27", "Dummy28", "Dummy29", "Dummy30", "Dummy31", "Dummy32", "C", });
+ global::Google.ProtocolBuffers.TestProtos.TestRequired.Single = pb::GeneratedSingleExtension<global::Google.ProtocolBuffers.TestProtos.TestRequired>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.TestRequired.Descriptor.Extensions[0]);
+ global::Google.ProtocolBuffers.TestProtos.TestRequired.Multi = pb::GeneratedRepeatExtension<global::Google.ProtocolBuffers.TestProtos.TestRequired>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.TestRequired.Descriptor.Extensions[1]);
+ internal__static_protobuf_unittest_TestRequiredForeign__Descriptor = Descriptor.MessageTypes[9];
+ internal__static_protobuf_unittest_TestRequiredForeign__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestRequiredForeign, global::Google.ProtocolBuffers.TestProtos.TestRequiredForeign.Builder>(internal__static_protobuf_unittest_TestRequiredForeign__Descriptor,
+ new string[] { "OptionalMessage", "RepeatedMessage", "Dummy", });
+ internal__static_protobuf_unittest_TestForeignNested__Descriptor = Descriptor.MessageTypes[10];
+ internal__static_protobuf_unittest_TestForeignNested__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestForeignNested, global::Google.ProtocolBuffers.TestProtos.TestForeignNested.Builder>(internal__static_protobuf_unittest_TestForeignNested__Descriptor,
+ new string[] { "ForeignNested", });
+ internal__static_protobuf_unittest_TestEmptyMessage__Descriptor = Descriptor.MessageTypes[11];
+ internal__static_protobuf_unittest_TestEmptyMessage__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestEmptyMessage, global::Google.ProtocolBuffers.TestProtos.TestEmptyMessage.Builder>(internal__static_protobuf_unittest_TestEmptyMessage__Descriptor,
+ new string[] { });
+ internal__static_protobuf_unittest_TestEmptyMessageWithExtensions__Descriptor = Descriptor.MessageTypes[12];
+ internal__static_protobuf_unittest_TestEmptyMessageWithExtensions__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestEmptyMessageWithExtensions, global::Google.ProtocolBuffers.TestProtos.TestEmptyMessageWithExtensions.Builder>(internal__static_protobuf_unittest_TestEmptyMessageWithExtensions__Descriptor,
+ new string[] { });
+ internal__static_protobuf_unittest_TestMultipleExtensionRanges__Descriptor = Descriptor.MessageTypes[13];
+ internal__static_protobuf_unittest_TestMultipleExtensionRanges__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestMultipleExtensionRanges, global::Google.ProtocolBuffers.TestProtos.TestMultipleExtensionRanges.Builder>(internal__static_protobuf_unittest_TestMultipleExtensionRanges__Descriptor,
+ new string[] { });
+ internal__static_protobuf_unittest_TestReallyLargeTagNumber__Descriptor = Descriptor.MessageTypes[14];
+ internal__static_protobuf_unittest_TestReallyLargeTagNumber__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestReallyLargeTagNumber, global::Google.ProtocolBuffers.TestProtos.TestReallyLargeTagNumber.Builder>(internal__static_protobuf_unittest_TestReallyLargeTagNumber__Descriptor,
+ new string[] { "A", "Bb", });
+ internal__static_protobuf_unittest_TestRecursiveMessage__Descriptor = Descriptor.MessageTypes[15];
+ internal__static_protobuf_unittest_TestRecursiveMessage__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestRecursiveMessage, global::Google.ProtocolBuffers.TestProtos.TestRecursiveMessage.Builder>(internal__static_protobuf_unittest_TestRecursiveMessage__Descriptor,
+ new string[] { "A", "I", });
+ internal__static_protobuf_unittest_TestMutualRecursionA__Descriptor = Descriptor.MessageTypes[16];
+ internal__static_protobuf_unittest_TestMutualRecursionA__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestMutualRecursionA, global::Google.ProtocolBuffers.TestProtos.TestMutualRecursionA.Builder>(internal__static_protobuf_unittest_TestMutualRecursionA__Descriptor,
+ new string[] { "Bb", });
+ internal__static_protobuf_unittest_TestMutualRecursionB__Descriptor = Descriptor.MessageTypes[17];
+ internal__static_protobuf_unittest_TestMutualRecursionB__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestMutualRecursionB, global::Google.ProtocolBuffers.TestProtos.TestMutualRecursionB.Builder>(internal__static_protobuf_unittest_TestMutualRecursionB__Descriptor,
+ new string[] { "A", "OptionalInt32", });
+ internal__static_protobuf_unittest_TestDupFieldNumber__Descriptor = Descriptor.MessageTypes[18];
+ internal__static_protobuf_unittest_TestDupFieldNumber__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestDupFieldNumber, global::Google.ProtocolBuffers.TestProtos.TestDupFieldNumber.Builder>(internal__static_protobuf_unittest_TestDupFieldNumber__Descriptor,
+ new string[] { "A", "Foo", "Bar", });
+ internal__static_protobuf_unittest_TestDupFieldNumber_Foo__Descriptor = internal__static_protobuf_unittest_TestDupFieldNumber__Descriptor.NestedTypes[0];
+ internal__static_protobuf_unittest_TestDupFieldNumber_Foo__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestDupFieldNumber.Types.Foo, global::Google.ProtocolBuffers.TestProtos.TestDupFieldNumber.Types.Foo.Builder>(internal__static_protobuf_unittest_TestDupFieldNumber_Foo__Descriptor,
+ new string[] { "A", });
+ internal__static_protobuf_unittest_TestDupFieldNumber_Bar__Descriptor = internal__static_protobuf_unittest_TestDupFieldNumber__Descriptor.NestedTypes[1];
+ internal__static_protobuf_unittest_TestDupFieldNumber_Bar__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestDupFieldNumber.Types.Bar, global::Google.ProtocolBuffers.TestProtos.TestDupFieldNumber.Types.Bar.Builder>(internal__static_protobuf_unittest_TestDupFieldNumber_Bar__Descriptor,
+ new string[] { "A", });
+ internal__static_protobuf_unittest_TestEagerMessage__Descriptor = Descriptor.MessageTypes[19];
+ internal__static_protobuf_unittest_TestEagerMessage__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestEagerMessage, global::Google.ProtocolBuffers.TestProtos.TestEagerMessage.Builder>(internal__static_protobuf_unittest_TestEagerMessage__Descriptor,
+ new string[] { "SubMessage", });
+ internal__static_protobuf_unittest_TestLazyMessage__Descriptor = Descriptor.MessageTypes[20];
+ internal__static_protobuf_unittest_TestLazyMessage__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestLazyMessage, global::Google.ProtocolBuffers.TestProtos.TestLazyMessage.Builder>(internal__static_protobuf_unittest_TestLazyMessage__Descriptor,
+ new string[] { "SubMessage", });
+ internal__static_protobuf_unittest_TestNestedMessageHasBits__Descriptor = Descriptor.MessageTypes[21];
+ internal__static_protobuf_unittest_TestNestedMessageHasBits__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestNestedMessageHasBits, global::Google.ProtocolBuffers.TestProtos.TestNestedMessageHasBits.Builder>(internal__static_protobuf_unittest_TestNestedMessageHasBits__Descriptor,
+ new string[] { "OptionalNestedMessage", });
+ internal__static_protobuf_unittest_TestNestedMessageHasBits_NestedMessage__Descriptor = internal__static_protobuf_unittest_TestNestedMessageHasBits__Descriptor.NestedTypes[0];
+ internal__static_protobuf_unittest_TestNestedMessageHasBits_NestedMessage__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestNestedMessageHasBits.Types.NestedMessage, global::Google.ProtocolBuffers.TestProtos.TestNestedMessageHasBits.Types.NestedMessage.Builder>(internal__static_protobuf_unittest_TestNestedMessageHasBits_NestedMessage__Descriptor,
+ new string[] { "NestedmessageRepeatedInt32", "NestedmessageRepeatedForeignmessage", });
+ internal__static_protobuf_unittest_TestCamelCaseFieldNames__Descriptor = Descriptor.MessageTypes[22];
+ internal__static_protobuf_unittest_TestCamelCaseFieldNames__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestCamelCaseFieldNames, global::Google.ProtocolBuffers.TestProtos.TestCamelCaseFieldNames.Builder>(internal__static_protobuf_unittest_TestCamelCaseFieldNames__Descriptor,
+ new string[] { "PrimitiveField", "StringField", "EnumField", "MessageField", "StringPieceField", "CordField", "RepeatedPrimitiveField", "RepeatedStringField", "RepeatedEnumField", "RepeatedMessageField", "RepeatedStringPieceField", "RepeatedCordField", });
+ internal__static_protobuf_unittest_TestFieldOrderings__Descriptor = Descriptor.MessageTypes[23];
+ internal__static_protobuf_unittest_TestFieldOrderings__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestFieldOrderings, global::Google.ProtocolBuffers.TestProtos.TestFieldOrderings.Builder>(internal__static_protobuf_unittest_TestFieldOrderings__Descriptor,
+ new string[] { "MyString", "MyInt", "MyFloat", "OptionalNestedMessage", });
+ internal__static_protobuf_unittest_TestFieldOrderings_NestedMessage__Descriptor = internal__static_protobuf_unittest_TestFieldOrderings__Descriptor.NestedTypes[0];
+ internal__static_protobuf_unittest_TestFieldOrderings_NestedMessage__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestFieldOrderings.Types.NestedMessage, global::Google.ProtocolBuffers.TestProtos.TestFieldOrderings.Types.NestedMessage.Builder>(internal__static_protobuf_unittest_TestFieldOrderings_NestedMessage__Descriptor,
+ new string[] { "Oo", "Bb", });
+ internal__static_protobuf_unittest_TestExtremeDefaultValues__Descriptor = Descriptor.MessageTypes[24];
+ internal__static_protobuf_unittest_TestExtremeDefaultValues__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestExtremeDefaultValues, global::Google.ProtocolBuffers.TestProtos.TestExtremeDefaultValues.Builder>(internal__static_protobuf_unittest_TestExtremeDefaultValues__Descriptor,
+ new string[] { "EscapedBytes", "LargeUint32", "LargeUint64", "SmallInt32", "SmallInt64", "ReallySmallInt32", "ReallySmallInt64", "Utf8String", "ZeroFloat", "OneFloat", "SmallFloat", "NegativeOneFloat", "NegativeFloat", "LargeFloat", "SmallNegativeFloat", "InfDouble", "NegInfDouble", "NanDouble", "InfFloat", "NegInfFloat", "NanFloat", "CppTrigraph", "StringWithZero", "BytesWithZero", "StringPieceWithZero", "CordWithZero", "ReplacementString", });
+ internal__static_protobuf_unittest_SparseEnumMessage__Descriptor = Descriptor.MessageTypes[25];
+ internal__static_protobuf_unittest_SparseEnumMessage__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.SparseEnumMessage, global::Google.ProtocolBuffers.TestProtos.SparseEnumMessage.Builder>(internal__static_protobuf_unittest_SparseEnumMessage__Descriptor,
+ new string[] { "SparseEnum", });
+ internal__static_protobuf_unittest_OneString__Descriptor = Descriptor.MessageTypes[26];
+ internal__static_protobuf_unittest_OneString__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.OneString, global::Google.ProtocolBuffers.TestProtos.OneString.Builder>(internal__static_protobuf_unittest_OneString__Descriptor,
+ new string[] { "Data", });
+ internal__static_protobuf_unittest_MoreString__Descriptor = Descriptor.MessageTypes[27];
+ internal__static_protobuf_unittest_MoreString__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.MoreString, global::Google.ProtocolBuffers.TestProtos.MoreString.Builder>(internal__static_protobuf_unittest_MoreString__Descriptor,
+ new string[] { "Data", });
+ internal__static_protobuf_unittest_OneBytes__Descriptor = Descriptor.MessageTypes[28];
+ internal__static_protobuf_unittest_OneBytes__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.OneBytes, global::Google.ProtocolBuffers.TestProtos.OneBytes.Builder>(internal__static_protobuf_unittest_OneBytes__Descriptor,
+ new string[] { "Data", });
+ internal__static_protobuf_unittest_MoreBytes__Descriptor = Descriptor.MessageTypes[29];
+ internal__static_protobuf_unittest_MoreBytes__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.MoreBytes, global::Google.ProtocolBuffers.TestProtos.MoreBytes.Builder>(internal__static_protobuf_unittest_MoreBytes__Descriptor,
+ new string[] { "Data", });
+ internal__static_protobuf_unittest_Int32Message__Descriptor = Descriptor.MessageTypes[30];
+ internal__static_protobuf_unittest_Int32Message__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.Int32Message, global::Google.ProtocolBuffers.TestProtos.Int32Message.Builder>(internal__static_protobuf_unittest_Int32Message__Descriptor,
+ new string[] { "Data", });
+ internal__static_protobuf_unittest_Uint32Message__Descriptor = Descriptor.MessageTypes[31];
+ internal__static_protobuf_unittest_Uint32Message__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.Uint32Message, global::Google.ProtocolBuffers.TestProtos.Uint32Message.Builder>(internal__static_protobuf_unittest_Uint32Message__Descriptor,
+ new string[] { "Data", });
+ internal__static_protobuf_unittest_Int64Message__Descriptor = Descriptor.MessageTypes[32];
+ internal__static_protobuf_unittest_Int64Message__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.Int64Message, global::Google.ProtocolBuffers.TestProtos.Int64Message.Builder>(internal__static_protobuf_unittest_Int64Message__Descriptor,
+ new string[] { "Data", });
+ internal__static_protobuf_unittest_Uint64Message__Descriptor = Descriptor.MessageTypes[33];
+ internal__static_protobuf_unittest_Uint64Message__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.Uint64Message, global::Google.ProtocolBuffers.TestProtos.Uint64Message.Builder>(internal__static_protobuf_unittest_Uint64Message__Descriptor,
+ new string[] { "Data", });
+ internal__static_protobuf_unittest_BoolMessage__Descriptor = Descriptor.MessageTypes[34];
+ internal__static_protobuf_unittest_BoolMessage__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.BoolMessage, global::Google.ProtocolBuffers.TestProtos.BoolMessage.Builder>(internal__static_protobuf_unittest_BoolMessage__Descriptor,
+ new string[] { "Data", });
+ internal__static_protobuf_unittest_TestOneof__Descriptor = Descriptor.MessageTypes[35];
+ internal__static_protobuf_unittest_TestOneof__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestOneof, global::Google.ProtocolBuffers.TestProtos.TestOneof.Builder>(internal__static_protobuf_unittest_TestOneof__Descriptor,
+ new string[] { "FooInt", "FooString", "FooMessage", "FooGroup", });
+ internal__static_protobuf_unittest_TestOneof_FooGroup__Descriptor = internal__static_protobuf_unittest_TestOneof__Descriptor.NestedTypes[0];
+ internal__static_protobuf_unittest_TestOneof_FooGroup__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestOneof.Types.FooGroup, global::Google.ProtocolBuffers.TestProtos.TestOneof.Types.FooGroup.Builder>(internal__static_protobuf_unittest_TestOneof_FooGroup__Descriptor,
+ new string[] { "A", "B", });
+ internal__static_protobuf_unittest_TestOneofBackwardsCompatible__Descriptor = Descriptor.MessageTypes[36];
+ internal__static_protobuf_unittest_TestOneofBackwardsCompatible__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestOneofBackwardsCompatible, global::Google.ProtocolBuffers.TestProtos.TestOneofBackwardsCompatible.Builder>(internal__static_protobuf_unittest_TestOneofBackwardsCompatible__Descriptor,
+ new string[] { "FooInt", "FooString", "FooMessage", "FooGroup", });
+ internal__static_protobuf_unittest_TestOneofBackwardsCompatible_FooGroup__Descriptor = internal__static_protobuf_unittest_TestOneofBackwardsCompatible__Descriptor.NestedTypes[0];
+ internal__static_protobuf_unittest_TestOneofBackwardsCompatible_FooGroup__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestOneofBackwardsCompatible.Types.FooGroup, global::Google.ProtocolBuffers.TestProtos.TestOneofBackwardsCompatible.Types.FooGroup.Builder>(internal__static_protobuf_unittest_TestOneofBackwardsCompatible_FooGroup__Descriptor,
+ new string[] { "A", "B", });
+ internal__static_protobuf_unittest_TestOneof2__Descriptor = Descriptor.MessageTypes[37];
+ internal__static_protobuf_unittest_TestOneof2__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestOneof2, global::Google.ProtocolBuffers.TestProtos.TestOneof2.Builder>(internal__static_protobuf_unittest_TestOneof2__Descriptor,
+ new string[] { "FooInt", "FooString", "FooCord", "FooStringPiece", "FooBytes", "FooEnum", "FooMessage", "FooGroup", "FooLazyMessage", "BarInt", "BarString", "BarCord", "BarStringPiece", "BarBytes", "BarEnum", "BazInt", "BazString", });
+ internal__static_protobuf_unittest_TestOneof2_FooGroup__Descriptor = internal__static_protobuf_unittest_TestOneof2__Descriptor.NestedTypes[0];
+ internal__static_protobuf_unittest_TestOneof2_FooGroup__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestOneof2.Types.FooGroup, global::Google.ProtocolBuffers.TestProtos.TestOneof2.Types.FooGroup.Builder>(internal__static_protobuf_unittest_TestOneof2_FooGroup__Descriptor,
+ new string[] { "A", "B", });
+ internal__static_protobuf_unittest_TestOneof2_NestedMessage__Descriptor = internal__static_protobuf_unittest_TestOneof2__Descriptor.NestedTypes[1];
+ internal__static_protobuf_unittest_TestOneof2_NestedMessage__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestOneof2.Types.NestedMessage, global::Google.ProtocolBuffers.TestProtos.TestOneof2.Types.NestedMessage.Builder>(internal__static_protobuf_unittest_TestOneof2_NestedMessage__Descriptor,
+ new string[] { "QuxInt", "CorgeInt", });
+ internal__static_protobuf_unittest_TestRequiredOneof__Descriptor = Descriptor.MessageTypes[38];
+ internal__static_protobuf_unittest_TestRequiredOneof__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestRequiredOneof, global::Google.ProtocolBuffers.TestProtos.TestRequiredOneof.Builder>(internal__static_protobuf_unittest_TestRequiredOneof__Descriptor,
+ new string[] { "FooInt", "FooString", "FooMessage", });
+ internal__static_protobuf_unittest_TestRequiredOneof_NestedMessage__Descriptor = internal__static_protobuf_unittest_TestRequiredOneof__Descriptor.NestedTypes[0];
+ internal__static_protobuf_unittest_TestRequiredOneof_NestedMessage__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestRequiredOneof.Types.NestedMessage, global::Google.ProtocolBuffers.TestProtos.TestRequiredOneof.Types.NestedMessage.Builder>(internal__static_protobuf_unittest_TestRequiredOneof_NestedMessage__Descriptor,
+ new string[] { "RequiredDouble", });
+ internal__static_protobuf_unittest_TestPackedTypes__Descriptor = Descriptor.MessageTypes[39];
+ internal__static_protobuf_unittest_TestPackedTypes__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestPackedTypes, global::Google.ProtocolBuffers.TestProtos.TestPackedTypes.Builder>(internal__static_protobuf_unittest_TestPackedTypes__Descriptor,
+ new string[] { "PackedInt32", "PackedInt64", "PackedUint32", "PackedUint64", "PackedSint32", "PackedSint64", "PackedFixed32", "PackedFixed64", "PackedSfixed32", "PackedSfixed64", "PackedFloat", "PackedDouble", "PackedBool", "PackedEnum", });
+ internal__static_protobuf_unittest_TestUnpackedTypes__Descriptor = Descriptor.MessageTypes[40];
+ internal__static_protobuf_unittest_TestUnpackedTypes__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestUnpackedTypes, global::Google.ProtocolBuffers.TestProtos.TestUnpackedTypes.Builder>(internal__static_protobuf_unittest_TestUnpackedTypes__Descriptor,
+ new string[] { "UnpackedInt32", "UnpackedInt64", "UnpackedUint32", "UnpackedUint64", "UnpackedSint32", "UnpackedSint64", "UnpackedFixed32", "UnpackedFixed64", "UnpackedSfixed32", "UnpackedSfixed64", "UnpackedFloat", "UnpackedDouble", "UnpackedBool", "UnpackedEnum", });
+ internal__static_protobuf_unittest_TestPackedExtensions__Descriptor = Descriptor.MessageTypes[41];
+ internal__static_protobuf_unittest_TestPackedExtensions__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestPackedExtensions, global::Google.ProtocolBuffers.TestProtos.TestPackedExtensions.Builder>(internal__static_protobuf_unittest_TestPackedExtensions__Descriptor,
+ new string[] { });
+ internal__static_protobuf_unittest_TestUnpackedExtensions__Descriptor = Descriptor.MessageTypes[42];
+ internal__static_protobuf_unittest_TestUnpackedExtensions__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestUnpackedExtensions, global::Google.ProtocolBuffers.TestProtos.TestUnpackedExtensions.Builder>(internal__static_protobuf_unittest_TestUnpackedExtensions__Descriptor,
+ new string[] { });
+ internal__static_protobuf_unittest_TestDynamicExtensions__Descriptor = Descriptor.MessageTypes[43];
+ internal__static_protobuf_unittest_TestDynamicExtensions__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestDynamicExtensions, global::Google.ProtocolBuffers.TestProtos.TestDynamicExtensions.Builder>(internal__static_protobuf_unittest_TestDynamicExtensions__Descriptor,
+ new string[] { "ScalarExtension", "EnumExtension", "DynamicEnumExtension", "MessageExtension", "DynamicMessageExtension", "RepeatedExtension", "PackedExtension", });
+ internal__static_protobuf_unittest_TestDynamicExtensions_DynamicMessageType__Descriptor = internal__static_protobuf_unittest_TestDynamicExtensions__Descriptor.NestedTypes[0];
+ internal__static_protobuf_unittest_TestDynamicExtensions_DynamicMessageType__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestDynamicExtensions.Types.DynamicMessageType, global::Google.ProtocolBuffers.TestProtos.TestDynamicExtensions.Types.DynamicMessageType.Builder>(internal__static_protobuf_unittest_TestDynamicExtensions_DynamicMessageType__Descriptor,
+ new string[] { "DynamicField", });
+ internal__static_protobuf_unittest_TestRepeatedScalarDifferentTagSizes__Descriptor = Descriptor.MessageTypes[44];
+ internal__static_protobuf_unittest_TestRepeatedScalarDifferentTagSizes__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestRepeatedScalarDifferentTagSizes, global::Google.ProtocolBuffers.TestProtos.TestRepeatedScalarDifferentTagSizes.Builder>(internal__static_protobuf_unittest_TestRepeatedScalarDifferentTagSizes__Descriptor,
+ new string[] { "RepeatedFixed32", "RepeatedInt32", "RepeatedFixed64", "RepeatedInt64", "RepeatedFloat", "RepeatedUint64", });
+ internal__static_protobuf_unittest_TestParsingMerge__Descriptor = Descriptor.MessageTypes[45];
+ internal__static_protobuf_unittest_TestParsingMerge__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestParsingMerge, global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Builder>(internal__static_protobuf_unittest_TestParsingMerge__Descriptor,
+ new string[] { "RequiredAllTypes", "OptionalAllTypes", "RepeatedAllTypes", "OptionalGroup", "RepeatedGroup", });
+ internal__static_protobuf_unittest_TestParsingMerge_RepeatedFieldsGenerator__Descriptor = internal__static_protobuf_unittest_TestParsingMerge__Descriptor.NestedTypes[0];
+ internal__static_protobuf_unittest_TestParsingMerge_RepeatedFieldsGenerator__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Types.RepeatedFieldsGenerator, global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Types.RepeatedFieldsGenerator.Builder>(internal__static_protobuf_unittest_TestParsingMerge_RepeatedFieldsGenerator__Descriptor,
+ new string[] { "Field1", "Field2", "Field3", "Group1", "Group2", "Ext1", "Ext2", });
+ internal__static_protobuf_unittest_TestParsingMerge_RepeatedFieldsGenerator_Group1__Descriptor = internal__static_protobuf_unittest_TestParsingMerge_RepeatedFieldsGenerator__Descriptor.NestedTypes[0];
+ internal__static_protobuf_unittest_TestParsingMerge_RepeatedFieldsGenerator_Group1__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Types.RepeatedFieldsGenerator.Types.Group1, global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Types.RepeatedFieldsGenerator.Types.Group1.Builder>(internal__static_protobuf_unittest_TestParsingMerge_RepeatedFieldsGenerator_Group1__Descriptor,
+ new string[] { "Field1", });
+ internal__static_protobuf_unittest_TestParsingMerge_RepeatedFieldsGenerator_Group2__Descriptor = internal__static_protobuf_unittest_TestParsingMerge_RepeatedFieldsGenerator__Descriptor.NestedTypes[1];
+ internal__static_protobuf_unittest_TestParsingMerge_RepeatedFieldsGenerator_Group2__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Types.RepeatedFieldsGenerator.Types.Group2, global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Types.RepeatedFieldsGenerator.Types.Group2.Builder>(internal__static_protobuf_unittest_TestParsingMerge_RepeatedFieldsGenerator_Group2__Descriptor,
+ new string[] { "Field1", });
+ internal__static_protobuf_unittest_TestParsingMerge_OptionalGroup__Descriptor = internal__static_protobuf_unittest_TestParsingMerge__Descriptor.NestedTypes[1];
+ internal__static_protobuf_unittest_TestParsingMerge_OptionalGroup__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Types.OptionalGroup, global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Types.OptionalGroup.Builder>(internal__static_protobuf_unittest_TestParsingMerge_OptionalGroup__Descriptor,
+ new string[] { "OptionalGroupAllTypes", });
+ internal__static_protobuf_unittest_TestParsingMerge_RepeatedGroup__Descriptor = internal__static_protobuf_unittest_TestParsingMerge__Descriptor.NestedTypes[2];
+ internal__static_protobuf_unittest_TestParsingMerge_RepeatedGroup__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Types.RepeatedGroup, global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Types.RepeatedGroup.Builder>(internal__static_protobuf_unittest_TestParsingMerge_RepeatedGroup__Descriptor,
+ new string[] { "RepeatedGroupAllTypes", });
+ global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.OptionalExt = pb::GeneratedSingleExtension<global::Google.ProtocolBuffers.TestProtos.TestAllTypes>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Descriptor.Extensions[0]);
+ global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.RepeatedExt = pb::GeneratedRepeatExtension<global::Google.ProtocolBuffers.TestProtos.TestAllTypes>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Descriptor.Extensions[1]);
+ internal__static_protobuf_unittest_TestCommentInjectionMessage__Descriptor = Descriptor.MessageTypes[46];
+ internal__static_protobuf_unittest_TestCommentInjectionMessage__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestCommentInjectionMessage, global::Google.ProtocolBuffers.TestProtos.TestCommentInjectionMessage.Builder>(internal__static_protobuf_unittest_TestCommentInjectionMessage__Descriptor,
+ new string[] { "A", });
+ internal__static_protobuf_unittest_FooRequest__Descriptor = Descriptor.MessageTypes[47];
+ internal__static_protobuf_unittest_FooRequest__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.FooRequest, global::Google.ProtocolBuffers.TestProtos.FooRequest.Builder>(internal__static_protobuf_unittest_FooRequest__Descriptor,
+ new string[] { });
+ internal__static_protobuf_unittest_FooResponse__Descriptor = Descriptor.MessageTypes[48];
+ internal__static_protobuf_unittest_FooResponse__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.FooResponse, global::Google.ProtocolBuffers.TestProtos.FooResponse.Builder>(internal__static_protobuf_unittest_FooResponse__Descriptor,
+ new string[] { });
+ internal__static_protobuf_unittest_FooClientMessage__Descriptor = Descriptor.MessageTypes[49];
+ internal__static_protobuf_unittest_FooClientMessage__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.FooClientMessage, global::Google.ProtocolBuffers.TestProtos.FooClientMessage.Builder>(internal__static_protobuf_unittest_FooClientMessage__Descriptor,
+ new string[] { });
+ internal__static_protobuf_unittest_FooServerMessage__Descriptor = Descriptor.MessageTypes[50];
+ internal__static_protobuf_unittest_FooServerMessage__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.FooServerMessage, global::Google.ProtocolBuffers.TestProtos.FooServerMessage.Builder>(internal__static_protobuf_unittest_FooServerMessage__Descriptor,
+ new string[] { });
+ internal__static_protobuf_unittest_BarRequest__Descriptor = Descriptor.MessageTypes[51];
+ internal__static_protobuf_unittest_BarRequest__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.BarRequest, global::Google.ProtocolBuffers.TestProtos.BarRequest.Builder>(internal__static_protobuf_unittest_BarRequest__Descriptor,
+ new string[] { });
+ internal__static_protobuf_unittest_BarResponse__Descriptor = Descriptor.MessageTypes[52];
+ internal__static_protobuf_unittest_BarResponse__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.BarResponse, global::Google.ProtocolBuffers.TestProtos.BarResponse.Builder>(internal__static_protobuf_unittest_BarResponse__Descriptor,
+ new string[] { });
+ global::Google.ProtocolBuffers.TestProtos.Unittest.OptionalInt32Extension = pb::GeneratedSingleExtension<int>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[0]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.OptionalInt64Extension = pb::GeneratedSingleExtension<long>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[1]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.OptionalUint32Extension = pb::GeneratedSingleExtension<uint>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[2]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.OptionalUint64Extension = pb::GeneratedSingleExtension<ulong>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[3]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.OptionalSint32Extension = pb::GeneratedSingleExtension<int>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[4]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.OptionalSint64Extension = pb::GeneratedSingleExtension<long>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[5]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.OptionalFixed32Extension = pb::GeneratedSingleExtension<uint>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[6]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.OptionalFixed64Extension = pb::GeneratedSingleExtension<ulong>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[7]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.OptionalSfixed32Extension = pb::GeneratedSingleExtension<int>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[8]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.OptionalSfixed64Extension = pb::GeneratedSingleExtension<long>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[9]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.OptionalFloatExtension = pb::GeneratedSingleExtension<float>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[10]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.OptionalDoubleExtension = pb::GeneratedSingleExtension<double>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[11]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.OptionalBoolExtension = pb::GeneratedSingleExtension<bool>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[12]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.OptionalStringExtension = pb::GeneratedSingleExtension<string>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[13]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.OptionalBytesExtension = pb::GeneratedSingleExtension<pb::ByteString>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[14]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.OptionalGroupExtension = pb::GeneratedSingleExtension<global::Google.ProtocolBuffers.TestProtos.OptionalGroup_extension>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[15]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.OptionalNestedMessageExtension = pb::GeneratedSingleExtension<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[16]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.OptionalForeignMessageExtension = pb::GeneratedSingleExtension<global::Google.ProtocolBuffers.TestProtos.ForeignMessage>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[17]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.OptionalImportMessageExtension = pb::GeneratedSingleExtension<global::Google.ProtocolBuffers.TestProtos.ImportMessage>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[18]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.OptionalNestedEnumExtension = pb::GeneratedSingleExtension<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedEnum>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[19]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.OptionalForeignEnumExtension = pb::GeneratedSingleExtension<global::Google.ProtocolBuffers.TestProtos.ForeignEnum>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[20]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.OptionalImportEnumExtension = pb::GeneratedSingleExtension<global::Google.ProtocolBuffers.TestProtos.ImportEnum>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[21]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.OptionalStringPieceExtension = pb::GeneratedSingleExtension<string>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[22]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.OptionalCordExtension = pb::GeneratedSingleExtension<string>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[23]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.OptionalPublicImportMessageExtension = pb::GeneratedSingleExtension<global::Google.ProtocolBuffers.TestProtos.PublicImportMessage>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[24]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.OptionalLazyMessageExtension = pb::GeneratedSingleExtension<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[25]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.RepeatedInt32Extension = pb::GeneratedRepeatExtension<int>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[26]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.RepeatedInt64Extension = pb::GeneratedRepeatExtension<long>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[27]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.RepeatedUint32Extension = pb::GeneratedRepeatExtension<uint>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[28]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.RepeatedUint64Extension = pb::GeneratedRepeatExtension<ulong>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[29]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.RepeatedSint32Extension = pb::GeneratedRepeatExtension<int>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[30]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.RepeatedSint64Extension = pb::GeneratedRepeatExtension<long>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[31]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.RepeatedFixed32Extension = pb::GeneratedRepeatExtension<uint>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[32]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.RepeatedFixed64Extension = pb::GeneratedRepeatExtension<ulong>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[33]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.RepeatedSfixed32Extension = pb::GeneratedRepeatExtension<int>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[34]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.RepeatedSfixed64Extension = pb::GeneratedRepeatExtension<long>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[35]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.RepeatedFloatExtension = pb::GeneratedRepeatExtension<float>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[36]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.RepeatedDoubleExtension = pb::GeneratedRepeatExtension<double>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[37]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.RepeatedBoolExtension = pb::GeneratedRepeatExtension<bool>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[38]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.RepeatedStringExtension = pb::GeneratedRepeatExtension<string>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[39]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.RepeatedBytesExtension = pb::GeneratedRepeatExtension<pb::ByteString>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[40]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.RepeatedGroupExtension = pb::GeneratedRepeatExtension<global::Google.ProtocolBuffers.TestProtos.RepeatedGroup_extension>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[41]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.RepeatedNestedMessageExtension = pb::GeneratedRepeatExtension<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[42]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.RepeatedForeignMessageExtension = pb::GeneratedRepeatExtension<global::Google.ProtocolBuffers.TestProtos.ForeignMessage>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[43]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.RepeatedImportMessageExtension = pb::GeneratedRepeatExtension<global::Google.ProtocolBuffers.TestProtos.ImportMessage>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[44]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.RepeatedNestedEnumExtension = pb::GeneratedRepeatExtension<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedEnum>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[45]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.RepeatedForeignEnumExtension = pb::GeneratedRepeatExtension<global::Google.ProtocolBuffers.TestProtos.ForeignEnum>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[46]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.RepeatedImportEnumExtension = pb::GeneratedRepeatExtension<global::Google.ProtocolBuffers.TestProtos.ImportEnum>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[47]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.RepeatedStringPieceExtension = pb::GeneratedRepeatExtension<string>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[48]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.RepeatedCordExtension = pb::GeneratedRepeatExtension<string>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[49]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.RepeatedLazyMessageExtension = pb::GeneratedRepeatExtension<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[50]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.DefaultInt32Extension = pb::GeneratedSingleExtension<int>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[51]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.DefaultInt64Extension = pb::GeneratedSingleExtension<long>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[52]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.DefaultUint32Extension = pb::GeneratedSingleExtension<uint>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[53]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.DefaultUint64Extension = pb::GeneratedSingleExtension<ulong>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[54]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.DefaultSint32Extension = pb::GeneratedSingleExtension<int>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[55]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.DefaultSint64Extension = pb::GeneratedSingleExtension<long>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[56]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.DefaultFixed32Extension = pb::GeneratedSingleExtension<uint>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[57]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.DefaultFixed64Extension = pb::GeneratedSingleExtension<ulong>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[58]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.DefaultSfixed32Extension = pb::GeneratedSingleExtension<int>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[59]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.DefaultSfixed64Extension = pb::GeneratedSingleExtension<long>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[60]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.DefaultFloatExtension = pb::GeneratedSingleExtension<float>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[61]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.DefaultDoubleExtension = pb::GeneratedSingleExtension<double>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[62]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.DefaultBoolExtension = pb::GeneratedSingleExtension<bool>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[63]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.DefaultStringExtension = pb::GeneratedSingleExtension<string>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[64]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.DefaultBytesExtension = pb::GeneratedSingleExtension<pb::ByteString>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[65]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.DefaultNestedEnumExtension = pb::GeneratedSingleExtension<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedEnum>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[66]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.DefaultForeignEnumExtension = pb::GeneratedSingleExtension<global::Google.ProtocolBuffers.TestProtos.ForeignEnum>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[67]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.DefaultImportEnumExtension = pb::GeneratedSingleExtension<global::Google.ProtocolBuffers.TestProtos.ImportEnum>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[68]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.DefaultStringPieceExtension = pb::GeneratedSingleExtension<string>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[69]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.DefaultCordExtension = pb::GeneratedSingleExtension<string>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[70]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.OneofUint32Extension = pb::GeneratedSingleExtension<uint>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[71]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.OneofNestedMessageExtension = pb::GeneratedSingleExtension<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[72]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.OneofStringExtension = pb::GeneratedSingleExtension<string>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[73]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.OneofBytesExtension = pb::GeneratedSingleExtension<pb::ByteString>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[74]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.MyExtensionString = pb::GeneratedSingleExtension<string>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[75]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.MyExtensionInt = pb::GeneratedSingleExtension<int>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[76]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.PackedInt32Extension = pb::GeneratedRepeatExtension<int>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[77]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.PackedInt64Extension = pb::GeneratedRepeatExtension<long>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[78]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.PackedUint32Extension = pb::GeneratedRepeatExtension<uint>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[79]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.PackedUint64Extension = pb::GeneratedRepeatExtension<ulong>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[80]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.PackedSint32Extension = pb::GeneratedRepeatExtension<int>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[81]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.PackedSint64Extension = pb::GeneratedRepeatExtension<long>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[82]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.PackedFixed32Extension = pb::GeneratedRepeatExtension<uint>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[83]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.PackedFixed64Extension = pb::GeneratedRepeatExtension<ulong>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[84]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.PackedSfixed32Extension = pb::GeneratedRepeatExtension<int>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[85]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.PackedSfixed64Extension = pb::GeneratedRepeatExtension<long>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[86]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.PackedFloatExtension = pb::GeneratedRepeatExtension<float>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[87]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.PackedDoubleExtension = pb::GeneratedRepeatExtension<double>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[88]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.PackedBoolExtension = pb::GeneratedRepeatExtension<bool>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[89]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.PackedEnumExtension = pb::GeneratedRepeatExtension<global::Google.ProtocolBuffers.TestProtos.ForeignEnum>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[90]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.UnpackedInt32Extension = pb::GeneratedRepeatExtension<int>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[91]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.UnpackedInt64Extension = pb::GeneratedRepeatExtension<long>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[92]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.UnpackedUint32Extension = pb::GeneratedRepeatExtension<uint>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[93]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.UnpackedUint64Extension = pb::GeneratedRepeatExtension<ulong>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[94]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.UnpackedSint32Extension = pb::GeneratedRepeatExtension<int>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[95]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.UnpackedSint64Extension = pb::GeneratedRepeatExtension<long>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[96]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.UnpackedFixed32Extension = pb::GeneratedRepeatExtension<uint>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[97]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.UnpackedFixed64Extension = pb::GeneratedRepeatExtension<ulong>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[98]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.UnpackedSfixed32Extension = pb::GeneratedRepeatExtension<int>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[99]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.UnpackedSfixed64Extension = pb::GeneratedRepeatExtension<long>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[100]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.UnpackedFloatExtension = pb::GeneratedRepeatExtension<float>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[101]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.UnpackedDoubleExtension = pb::GeneratedRepeatExtension<double>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[102]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.UnpackedBoolExtension = pb::GeneratedRepeatExtension<bool>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[103]);
+ global::Google.ProtocolBuffers.TestProtos.Unittest.UnpackedEnumExtension = pb::GeneratedRepeatExtension<global::Google.ProtocolBuffers.TestProtos.ForeignEnum>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor.Extensions[104]);
+ pb::ExtensionRegistry registry = pb::ExtensionRegistry.CreateInstance();
+ RegisterAllExtensions(registry);
+ global::Google.ProtocolBuffers.TestProtos.UnittestImport.RegisterAllExtensions(registry);
+ return registry;
+ };
+ pbd::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData,
+ new pbd::FileDescriptor[] {
+ global::Google.ProtocolBuffers.TestProtos.UnittestImport.Descriptor,
+ }, assigner);
+ }
+ #endregion
+
+ }
+ #region Enums
+ public enum ForeignEnum {
+ FOREIGN_FOO = 4,
+ FOREIGN_BAR = 5,
+ FOREIGN_BAZ = 6,
+ }
+
+ public enum TestEnumWithDupValue {
+ FOO1 = 1,
+ BAR1 = 2,
+ BAZ = 3,
+ FOO2 = 1,
+ BAR2 = 2,
+ }
+
+ public enum TestSparseEnum {
+ SPARSE_A = 123,
+ SPARSE_B = 62374,
+ SPARSE_C = 12589234,
+ SPARSE_D = -15,
+ SPARSE_E = -53452,
+ SPARSE_F = 0,
+ SPARSE_G = 2,
+ }
+
+ #endregion
+
+ #region Messages
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class TestAllTypes : pb::GeneratedMessage<TestAllTypes, TestAllTypes.Builder> {
+ private TestAllTypes() { }
+ private static readonly TestAllTypes defaultInstance = new TestAllTypes().MakeReadOnly();
+ private static readonly string[] _testAllTypesFieldNames = new string[] { "default_bool", "default_bytes", "default_cord", "default_double", "default_fixed32", "default_fixed64", "default_float", "default_foreign_enum", "default_import_enum", "default_int32", "default_int64", "default_nested_enum", "default_sfixed32", "default_sfixed64", "default_sint32", "default_sint64", "default_string", "default_string_piece", "default_uint32", "default_uint64", "oneof_bytes", "oneof_nested_message", "oneof_string", "oneof_uint32", "optional_bool", "optional_bytes", "optional_cord", "optional_double", "optional_fixed32", "optional_fixed64", "optional_float", "optional_foreign_enum", "optional_foreign_message", "optional_import_enum", "optional_import_message", "optional_int32", "optional_int64", "optional_lazy_message", "optional_nested_enum", "optional_nested_message", "optional_public_import_message", "optional_sfixed32", "optional_sfixed64", "optional_sint32", "optional_sint64", "optional_string", "optional_string_piece", "optional_uint32", "optional_uint64", "optionalgroup", "repeated_bool", "repeated_bytes", "repeated_cord", "repeated_double", "repeated_fixed32", "repeated_fixed64", "repeated_float", "repeated_foreign_enum", "repeated_foreign_message", "repeated_import_enum", "repeated_import_message", "repeated_int32", "repeated_int64", "repeated_lazy_message", "repeated_nested_enum", "repeated_nested_message", "repeated_sfixed32", "repeated_sfixed64", "repeated_sint32", "repeated_sint64", "repeated_string", "repeated_string_piece", "repeated_uint32", "repeated_uint64", "repeatedgroup" };
+ private static readonly uint[] _testAllTypesFieldTags = new uint[] { 584, 602, 682, 577, 541, 545, 573, 656, 664, 488, 496, 648, 557, 561, 520, 528, 594, 674, 504, 512, 914, 898, 906, 888, 104, 122, 202, 97, 61, 65, 93, 176, 154, 184, 162, 8, 16, 218, 168, 146, 210, 77, 81, 40, 48, 114, 194, 24, 32, 131, 344, 362, 442, 337, 301, 305, 333, 416, 394, 424, 402, 248, 256, 458, 408, 386, 317, 321, 280, 288, 354, 434, 264, 272, 371 };
+ public static TestAllTypes DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override TestAllTypes DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override TestAllTypes ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestAllTypes__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<TestAllTypes, TestAllTypes.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestAllTypes__FieldAccessorTable; }
+ }
+
+ #region Nested types
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public static partial class Types {
+ public enum NestedEnum {
+ FOO = 1,
+ BAR = 2,
+ BAZ = 3,
+ NEG = -1,
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class NestedMessage : pb::GeneratedMessage<NestedMessage, NestedMessage.Builder> {
+ private NestedMessage() { }
+ private static readonly NestedMessage defaultInstance = new NestedMessage().MakeReadOnly();
+ private static readonly string[] _nestedMessageFieldNames = new string[] { "bb" };
+ private static readonly uint[] _nestedMessageFieldTags = new uint[] { 8 };
+ public static NestedMessage DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override NestedMessage DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override NestedMessage ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestAllTypes_NestedMessage__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<NestedMessage, NestedMessage.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestAllTypes_NestedMessage__FieldAccessorTable; }
+ }
+
+ public const int BbFieldNumber = 1;
+ private bool hasBb;
+ private int bb_;
+ public bool HasBb {
+ get { return hasBb; }
+ }
+ public int Bb {
+ get { return bb_; }
+ }
+
+ public override bool IsInitialized {
+ get {
+ return true;
+ }
+ }
+
+ public override void WriteTo(pb::ICodedOutputStream output) {
+ CalcSerializedSize();
+ string[] field_names = _nestedMessageFieldNames;
+ if (hasBb) {
+ output.WriteInt32(1, field_names[0], Bb);
+ }
+ UnknownFields.WriteTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public override int SerializedSize {
+ get {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+ return CalcSerializedSize();
+ }
+ }
+
+ private int CalcSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (hasBb) {
+ size += pb::CodedOutputStream.ComputeInt32Size(1, Bb);
+ }
+ size += UnknownFields.SerializedSize;
+ memoizedSerializedSize = size;
+ return size;
+ }
+ public static NestedMessage ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static NestedMessage ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static NestedMessage ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static NestedMessage ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static NestedMessage ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static NestedMessage ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static NestedMessage ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static NestedMessage ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static NestedMessage ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static NestedMessage ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private NestedMessage 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(NestedMessage prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Builder : pb::GeneratedBuilder<NestedMessage, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(NestedMessage cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private NestedMessage result;
+
+ private NestedMessage PrepareBuilder() {
+ if (resultIsReadOnly) {
+ NestedMessage original = result;
+ result = new NestedMessage();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override NestedMessage 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.TestAllTypes.Types.NestedMessage.Descriptor; }
+ }
+
+ public override NestedMessage DefaultInstanceForType {
+ get { return global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage.DefaultInstance; }
+ }
+
+ public override NestedMessage BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+ public override Builder MergeFrom(pb::IMessage other) {
+ if (other is NestedMessage) {
+ return MergeFrom((NestedMessage) other);
+ } else {
+ base.MergeFrom(other);
+ return this;
+ }
+ }
+
+ public override Builder MergeFrom(NestedMessage other) {
+ if (other == global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage.DefaultInstance) return this;
+ PrepareBuilder();
+ if (other.HasBb) {
+ Bb = other.Bb;
+ }
+ 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(_nestedMessageFieldNames, field_name, global::System.StringComparer.Ordinal);
+ if(field_ordinal >= 0)
+ tag = _nestedMessageFieldTags[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.hasBb = input.ReadInt32(ref result.bb_);
+ break;
+ }
+ }
+ }
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
+ }
+
+
+ public bool HasBb {
+ get { return result.hasBb; }
+ }
+ public int Bb {
+ get { return result.Bb; }
+ set { SetBb(value); }
+ }
+ public Builder SetBb(int value) {
+ PrepareBuilder();
+ result.hasBb = true;
+ result.bb_ = value;
+ return this;
+ }
+ public Builder ClearBb() {
+ PrepareBuilder();
+ result.hasBb = false;
+ result.bb_ = 0;
+ return this;
+ }
+ }
+ static NestedMessage() {
+ object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor, null);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class OptionalGroup : pb::GeneratedMessage<OptionalGroup, OptionalGroup.Builder> {
+ private OptionalGroup() { }
+ private static readonly OptionalGroup defaultInstance = new OptionalGroup().MakeReadOnly();
+ private static readonly string[] _optionalGroupFieldNames = new string[] { "a" };
+ private static readonly uint[] _optionalGroupFieldTags = new uint[] { 136 };
+ public static OptionalGroup DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override OptionalGroup DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override OptionalGroup ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestAllTypes_OptionalGroup__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<OptionalGroup, OptionalGroup.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestAllTypes_OptionalGroup__FieldAccessorTable; }
+ }
+
+ public const int AFieldNumber = 17;
+ private bool hasA;
+ private int a_;
+ public bool HasA {
+ get { return hasA; }
+ }
+ public int A {
+ get { return a_; }
+ }
+
+ public override bool IsInitialized {
+ get {
+ return true;
+ }
+ }
+
+ public override void WriteTo(pb::ICodedOutputStream output) {
+ CalcSerializedSize();
+ string[] field_names = _optionalGroupFieldNames;
+ if (hasA) {
+ output.WriteInt32(17, field_names[0], A);
+ }
+ UnknownFields.WriteTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public override int SerializedSize {
+ get {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+ return CalcSerializedSize();
+ }
+ }
+
+ private int CalcSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (hasA) {
+ size += pb::CodedOutputStream.ComputeInt32Size(17, A);
+ }
+ size += UnknownFields.SerializedSize;
+ memoizedSerializedSize = size;
+ return size;
+ }
+ public static OptionalGroup ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static OptionalGroup ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static OptionalGroup ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static OptionalGroup ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static OptionalGroup ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static OptionalGroup ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static OptionalGroup ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static OptionalGroup ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static OptionalGroup ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static OptionalGroup ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private OptionalGroup 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(OptionalGroup prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Builder : pb::GeneratedBuilder<OptionalGroup, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(OptionalGroup cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private OptionalGroup result;
+
+ private OptionalGroup PrepareBuilder() {
+ if (resultIsReadOnly) {
+ OptionalGroup original = result;
+ result = new OptionalGroup();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override OptionalGroup 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.TestAllTypes.Types.OptionalGroup.Descriptor; }
+ }
+
+ public override OptionalGroup DefaultInstanceForType {
+ get { return global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.OptionalGroup.DefaultInstance; }
+ }
+
+ public override OptionalGroup BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+ public override Builder MergeFrom(pb::IMessage other) {
+ if (other is OptionalGroup) {
+ return MergeFrom((OptionalGroup) other);
+ } else {
+ base.MergeFrom(other);
+ return this;
+ }
+ }
+
+ public override Builder MergeFrom(OptionalGroup other) {
+ if (other == global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.OptionalGroup.DefaultInstance) return this;
+ PrepareBuilder();
+ if (other.HasA) {
+ A = other.A;
+ }
+ 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(_optionalGroupFieldNames, field_name, global::System.StringComparer.Ordinal);
+ if(field_ordinal >= 0)
+ tag = _optionalGroupFieldTags[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 136: {
+ result.hasA = input.ReadInt32(ref result.a_);
+ break;
+ }
+ }
+ }
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
+ }
+
+
+ public bool HasA {
+ get { return result.hasA; }
+ }
+ public int A {
+ get { return result.A; }
+ set { SetA(value); }
+ }
+ public Builder SetA(int value) {
+ PrepareBuilder();
+ result.hasA = true;
+ result.a_ = value;
+ return this;
+ }
+ public Builder ClearA() {
+ PrepareBuilder();
+ result.hasA = false;
+ result.a_ = 0;
+ return this;
+ }
+ }
+ static OptionalGroup() {
+ object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor, null);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class RepeatedGroup : pb::GeneratedMessage<RepeatedGroup, RepeatedGroup.Builder> {
+ private RepeatedGroup() { }
+ private static readonly RepeatedGroup defaultInstance = new RepeatedGroup().MakeReadOnly();
+ private static readonly string[] _repeatedGroupFieldNames = new string[] { "a" };
+ private static readonly uint[] _repeatedGroupFieldTags = new uint[] { 376 };
+ public static RepeatedGroup DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override RepeatedGroup DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override RepeatedGroup ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestAllTypes_RepeatedGroup__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<RepeatedGroup, RepeatedGroup.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestAllTypes_RepeatedGroup__FieldAccessorTable; }
+ }
+
+ public const int AFieldNumber = 47;
+ private bool hasA;
+ private int a_;
+ public bool HasA {
+ get { return hasA; }
+ }
+ public int A {
+ get { return a_; }
+ }
+
+ public override bool IsInitialized {
+ get {
+ return true;
+ }
+ }
+
+ public override void WriteTo(pb::ICodedOutputStream output) {
+ CalcSerializedSize();
+ string[] field_names = _repeatedGroupFieldNames;
+ if (hasA) {
+ output.WriteInt32(47, field_names[0], A);
+ }
+ UnknownFields.WriteTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public override int SerializedSize {
+ get {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+ return CalcSerializedSize();
+ }
+ }
+
+ private int CalcSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (hasA) {
+ size += pb::CodedOutputStream.ComputeInt32Size(47, A);
+ }
+ size += UnknownFields.SerializedSize;
+ memoizedSerializedSize = size;
+ return size;
+ }
+ public static RepeatedGroup ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static RepeatedGroup ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static RepeatedGroup ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static RepeatedGroup ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static RepeatedGroup ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static RepeatedGroup ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static RepeatedGroup ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static RepeatedGroup ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static RepeatedGroup ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static RepeatedGroup ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private RepeatedGroup 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(RepeatedGroup prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Builder : pb::GeneratedBuilder<RepeatedGroup, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(RepeatedGroup cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private RepeatedGroup result;
+
+ private RepeatedGroup PrepareBuilder() {
+ if (resultIsReadOnly) {
+ RepeatedGroup original = result;
+ result = new RepeatedGroup();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override RepeatedGroup 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.TestAllTypes.Types.RepeatedGroup.Descriptor; }
+ }
+
+ public override RepeatedGroup DefaultInstanceForType {
+ get { return global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.RepeatedGroup.DefaultInstance; }
+ }
+
+ public override RepeatedGroup BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+ public override Builder MergeFrom(pb::IMessage other) {
+ if (other is RepeatedGroup) {
+ return MergeFrom((RepeatedGroup) other);
+ } else {
+ base.MergeFrom(other);
+ return this;
+ }
+ }
+
+ public override Builder MergeFrom(RepeatedGroup other) {
+ if (other == global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.RepeatedGroup.DefaultInstance) return this;
+ PrepareBuilder();
+ if (other.HasA) {
+ A = other.A;
+ }
+ 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(_repeatedGroupFieldNames, field_name, global::System.StringComparer.Ordinal);
+ if(field_ordinal >= 0)
+ tag = _repeatedGroupFieldTags[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 376: {
+ result.hasA = input.ReadInt32(ref result.a_);
+ break;
+ }
+ }
+ }
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
+ }
+
+
+ public bool HasA {
+ get { return result.hasA; }
+ }
+ public int A {
+ get { return result.A; }
+ set { SetA(value); }
+ }
+ public Builder SetA(int value) {
+ PrepareBuilder();
+ result.hasA = true;
+ result.a_ = value;
+ return this;
+ }
+ public Builder ClearA() {
+ PrepareBuilder();
+ result.hasA = false;
+ result.a_ = 0;
+ return this;
+ }
+ }
+ static RepeatedGroup() {
+ object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor, null);
+ }
+ }
+
+ }
+ #endregion
+
+ public const int OptionalInt32FieldNumber = 1;
+ private bool hasOptionalInt32;
+ private int optionalInt32_;
+ public bool HasOptionalInt32 {
+ get { return hasOptionalInt32; }
+ }
+ public int OptionalInt32 {
+ get { return optionalInt32_; }
+ }
+
+ public const int OptionalInt64FieldNumber = 2;
+ private bool hasOptionalInt64;
+ private long optionalInt64_;
+ public bool HasOptionalInt64 {
+ get { return hasOptionalInt64; }
+ }
+ public long OptionalInt64 {
+ get { return optionalInt64_; }
+ }
+
+ public const int OptionalUint32FieldNumber = 3;
+ private bool hasOptionalUint32;
+ private uint optionalUint32_;
+ public bool HasOptionalUint32 {
+ get { return hasOptionalUint32; }
+ }
+ [global::System.CLSCompliant(false)]
+ public uint OptionalUint32 {
+ get { return optionalUint32_; }
+ }
+
+ public const int OptionalUint64FieldNumber = 4;
+ private bool hasOptionalUint64;
+ private ulong optionalUint64_;
+ public bool HasOptionalUint64 {
+ get { return hasOptionalUint64; }
+ }
+ [global::System.CLSCompliant(false)]
+ public ulong OptionalUint64 {
+ get { return optionalUint64_; }
+ }
+
+ public const int OptionalSint32FieldNumber = 5;
+ private bool hasOptionalSint32;
+ private int optionalSint32_;
+ public bool HasOptionalSint32 {
+ get { return hasOptionalSint32; }
+ }
+ public int OptionalSint32 {
+ get { return optionalSint32_; }
+ }
+
+ public const int OptionalSint64FieldNumber = 6;
+ private bool hasOptionalSint64;
+ private long optionalSint64_;
+ public bool HasOptionalSint64 {
+ get { return hasOptionalSint64; }
+ }
+ public long OptionalSint64 {
+ get { return optionalSint64_; }
+ }
+
+ public const int OptionalFixed32FieldNumber = 7;
+ private bool hasOptionalFixed32;
+ private uint optionalFixed32_;
+ public bool HasOptionalFixed32 {
+ get { return hasOptionalFixed32; }
+ }
+ [global::System.CLSCompliant(false)]
+ public uint OptionalFixed32 {
+ get { return optionalFixed32_; }
+ }
+
+ public const int OptionalFixed64FieldNumber = 8;
+ private bool hasOptionalFixed64;
+ private ulong optionalFixed64_;
+ public bool HasOptionalFixed64 {
+ get { return hasOptionalFixed64; }
+ }
+ [global::System.CLSCompliant(false)]
+ public ulong OptionalFixed64 {
+ get { return optionalFixed64_; }
+ }
+
+ public const int OptionalSfixed32FieldNumber = 9;
+ private bool hasOptionalSfixed32;
+ private int optionalSfixed32_;
+ public bool HasOptionalSfixed32 {
+ get { return hasOptionalSfixed32; }
+ }
+ public int OptionalSfixed32 {
+ get { return optionalSfixed32_; }
+ }
+
+ public const int OptionalSfixed64FieldNumber = 10;
+ private bool hasOptionalSfixed64;
+ private long optionalSfixed64_;
+ public bool HasOptionalSfixed64 {
+ get { return hasOptionalSfixed64; }
+ }
+ public long OptionalSfixed64 {
+ get { return optionalSfixed64_; }
+ }
+
+ public const int OptionalFloatFieldNumber = 11;
+ private bool hasOptionalFloat;
+ private float optionalFloat_;
+ public bool HasOptionalFloat {
+ get { return hasOptionalFloat; }
+ }
+ public float OptionalFloat {
+ get { return optionalFloat_; }
+ }
+
+ public const int OptionalDoubleFieldNumber = 12;
+ private bool hasOptionalDouble;
+ private double optionalDouble_;
+ public bool HasOptionalDouble {
+ get { return hasOptionalDouble; }
+ }
+ public double OptionalDouble {
+ get { return optionalDouble_; }
+ }
+
+ public const int OptionalBoolFieldNumber = 13;
+ private bool hasOptionalBool;
+ private bool optionalBool_;
+ public bool HasOptionalBool {
+ get { return hasOptionalBool; }
+ }
+ public bool OptionalBool {
+ get { return optionalBool_; }
+ }
+
+ public const int OptionalStringFieldNumber = 14;
+ private bool hasOptionalString;
+ private string optionalString_ = "";
+ public bool HasOptionalString {
+ get { return hasOptionalString; }
+ }
+ public string OptionalString {
+ get { return optionalString_; }
+ }
+
+ public const int OptionalBytesFieldNumber = 15;
+ private bool hasOptionalBytes;
+ private pb::ByteString optionalBytes_ = pb::ByteString.Empty;
+ public bool HasOptionalBytes {
+ get { return hasOptionalBytes; }
+ }
+ public pb::ByteString OptionalBytes {
+ get { return optionalBytes_; }
+ }
+
+ public const int OptionalGroupFieldNumber = 16;
+ private bool hasOptionalGroup;
+ private global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.OptionalGroup optionalGroup_;
+ public bool HasOptionalGroup {
+ get { return hasOptionalGroup; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.OptionalGroup OptionalGroup {
+ get { return optionalGroup_ ?? global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.OptionalGroup.DefaultInstance; }
+ }
+
+ public const int OptionalNestedMessageFieldNumber = 18;
+ private bool hasOptionalNestedMessage;
+ private global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage optionalNestedMessage_;
+ public bool HasOptionalNestedMessage {
+ get { return hasOptionalNestedMessage; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage OptionalNestedMessage {
+ get { return optionalNestedMessage_ ?? global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage.DefaultInstance; }
+ }
+
+ public const int OptionalForeignMessageFieldNumber = 19;
+ private bool hasOptionalForeignMessage;
+ private global::Google.ProtocolBuffers.TestProtos.ForeignMessage optionalForeignMessage_;
+ public bool HasOptionalForeignMessage {
+ get { return hasOptionalForeignMessage; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.ForeignMessage OptionalForeignMessage {
+ get { return optionalForeignMessage_ ?? global::Google.ProtocolBuffers.TestProtos.ForeignMessage.DefaultInstance; }
+ }
+
+ public const int OptionalImportMessageFieldNumber = 20;
+ private bool hasOptionalImportMessage;
+ private global::Google.ProtocolBuffers.TestProtos.ImportMessage optionalImportMessage_;
+ public bool HasOptionalImportMessage {
+ get { return hasOptionalImportMessage; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.ImportMessage OptionalImportMessage {
+ get { return optionalImportMessage_ ?? global::Google.ProtocolBuffers.TestProtos.ImportMessage.DefaultInstance; }
+ }
+
+ public const int OptionalNestedEnumFieldNumber = 21;
+ private bool hasOptionalNestedEnum;
+ private global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedEnum optionalNestedEnum_ = global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedEnum.FOO;
+ public bool HasOptionalNestedEnum {
+ get { return hasOptionalNestedEnum; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedEnum OptionalNestedEnum {
+ get { return optionalNestedEnum_; }
+ }
+
+ public const int OptionalForeignEnumFieldNumber = 22;
+ private bool hasOptionalForeignEnum;
+ private global::Google.ProtocolBuffers.TestProtos.ForeignEnum optionalForeignEnum_ = global::Google.ProtocolBuffers.TestProtos.ForeignEnum.FOREIGN_FOO;
+ public bool HasOptionalForeignEnum {
+ get { return hasOptionalForeignEnum; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.ForeignEnum OptionalForeignEnum {
+ get { return optionalForeignEnum_; }
+ }
+
+ public const int OptionalImportEnumFieldNumber = 23;
+ private bool hasOptionalImportEnum;
+ private global::Google.ProtocolBuffers.TestProtos.ImportEnum optionalImportEnum_ = global::Google.ProtocolBuffers.TestProtos.ImportEnum.IMPORT_FOO;
+ public bool HasOptionalImportEnum {
+ get { return hasOptionalImportEnum; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.ImportEnum OptionalImportEnum {
+ get { return optionalImportEnum_; }
+ }
+
+ public const int OptionalStringPieceFieldNumber = 24;
+ private bool hasOptionalStringPiece;
+ private string optionalStringPiece_ = "";
+ public bool HasOptionalStringPiece {
+ get { return hasOptionalStringPiece; }
+ }
+ public string OptionalStringPiece {
+ get { return optionalStringPiece_; }
+ }
+
+ public const int OptionalCordFieldNumber = 25;
+ private bool hasOptionalCord;
+ private string optionalCord_ = "";
+ public bool HasOptionalCord {
+ get { return hasOptionalCord; }
+ }
+ public string OptionalCord {
+ get { return optionalCord_; }
+ }
+
+ public const int OptionalPublicImportMessageFieldNumber = 26;
+ private bool hasOptionalPublicImportMessage;
+ private global::Google.ProtocolBuffers.TestProtos.PublicImportMessage optionalPublicImportMessage_;
+ public bool HasOptionalPublicImportMessage {
+ get { return hasOptionalPublicImportMessage; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.PublicImportMessage OptionalPublicImportMessage {
+ get { return optionalPublicImportMessage_ ?? global::Google.ProtocolBuffers.TestProtos.PublicImportMessage.DefaultInstance; }
+ }
+
+ public const int OptionalLazyMessageFieldNumber = 27;
+ private bool hasOptionalLazyMessage;
+ private global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage optionalLazyMessage_;
+ public bool HasOptionalLazyMessage {
+ get { return hasOptionalLazyMessage; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage OptionalLazyMessage {
+ get { return optionalLazyMessage_ ?? global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage.DefaultInstance; }
+ }
+
+ public const int RepeatedInt32FieldNumber = 31;
+ private pbc::PopsicleList<int> repeatedInt32_ = new pbc::PopsicleList<int>();
+ public scg::IList<int> RepeatedInt32List {
+ get { return pbc::Lists.AsReadOnly(repeatedInt32_); }
+ }
+ public int RepeatedInt32Count {
+ get { return repeatedInt32_.Count; }
+ }
+ public int GetRepeatedInt32(int index) {
+ return repeatedInt32_[index];
+ }
+
+ public const int RepeatedInt64FieldNumber = 32;
+ private pbc::PopsicleList<long> repeatedInt64_ = new pbc::PopsicleList<long>();
+ public scg::IList<long> RepeatedInt64List {
+ get { return pbc::Lists.AsReadOnly(repeatedInt64_); }
+ }
+ public int RepeatedInt64Count {
+ get { return repeatedInt64_.Count; }
+ }
+ public long GetRepeatedInt64(int index) {
+ return repeatedInt64_[index];
+ }
+
+ public const int RepeatedUint32FieldNumber = 33;
+ private pbc::PopsicleList<uint> repeatedUint32_ = new pbc::PopsicleList<uint>();
+ [global::System.CLSCompliant(false)]
+ public scg::IList<uint> RepeatedUint32List {
+ get { return pbc::Lists.AsReadOnly(repeatedUint32_); }
+ }
+ public int RepeatedUint32Count {
+ get { return repeatedUint32_.Count; }
+ }
+ [global::System.CLSCompliant(false)]
+ public uint GetRepeatedUint32(int index) {
+ return repeatedUint32_[index];
+ }
+
+ public const int RepeatedUint64FieldNumber = 34;
+ private pbc::PopsicleList<ulong> repeatedUint64_ = new pbc::PopsicleList<ulong>();
+ [global::System.CLSCompliant(false)]
+ public scg::IList<ulong> RepeatedUint64List {
+ get { return pbc::Lists.AsReadOnly(repeatedUint64_); }
+ }
+ public int RepeatedUint64Count {
+ get { return repeatedUint64_.Count; }
+ }
+ [global::System.CLSCompliant(false)]
+ public ulong GetRepeatedUint64(int index) {
+ return repeatedUint64_[index];
+ }
+
+ public const int RepeatedSint32FieldNumber = 35;
+ private pbc::PopsicleList<int> repeatedSint32_ = new pbc::PopsicleList<int>();
+ public scg::IList<int> RepeatedSint32List {
+ get { return pbc::Lists.AsReadOnly(repeatedSint32_); }
+ }
+ public int RepeatedSint32Count {
+ get { return repeatedSint32_.Count; }
+ }
+ public int GetRepeatedSint32(int index) {
+ return repeatedSint32_[index];
+ }
+
+ public const int RepeatedSint64FieldNumber = 36;
+ private pbc::PopsicleList<long> repeatedSint64_ = new pbc::PopsicleList<long>();
+ public scg::IList<long> RepeatedSint64List {
+ get { return pbc::Lists.AsReadOnly(repeatedSint64_); }
+ }
+ public int RepeatedSint64Count {
+ get { return repeatedSint64_.Count; }
+ }
+ public long GetRepeatedSint64(int index) {
+ return repeatedSint64_[index];
+ }
+
+ public const int RepeatedFixed32FieldNumber = 37;
+ private pbc::PopsicleList<uint> repeatedFixed32_ = new pbc::PopsicleList<uint>();
+ [global::System.CLSCompliant(false)]
+ public scg::IList<uint> RepeatedFixed32List {
+ get { return pbc::Lists.AsReadOnly(repeatedFixed32_); }
+ }
+ public int RepeatedFixed32Count {
+ get { return repeatedFixed32_.Count; }
+ }
+ [global::System.CLSCompliant(false)]
+ public uint GetRepeatedFixed32(int index) {
+ return repeatedFixed32_[index];
+ }
+
+ public const int RepeatedFixed64FieldNumber = 38;
+ private pbc::PopsicleList<ulong> repeatedFixed64_ = new pbc::PopsicleList<ulong>();
+ [global::System.CLSCompliant(false)]
+ public scg::IList<ulong> RepeatedFixed64List {
+ get { return pbc::Lists.AsReadOnly(repeatedFixed64_); }
+ }
+ public int RepeatedFixed64Count {
+ get { return repeatedFixed64_.Count; }
+ }
+ [global::System.CLSCompliant(false)]
+ public ulong GetRepeatedFixed64(int index) {
+ return repeatedFixed64_[index];
+ }
+
+ public const int RepeatedSfixed32FieldNumber = 39;
+ private pbc::PopsicleList<int> repeatedSfixed32_ = new pbc::PopsicleList<int>();
+ public scg::IList<int> RepeatedSfixed32List {
+ get { return pbc::Lists.AsReadOnly(repeatedSfixed32_); }
+ }
+ public int RepeatedSfixed32Count {
+ get { return repeatedSfixed32_.Count; }
+ }
+ public int GetRepeatedSfixed32(int index) {
+ return repeatedSfixed32_[index];
+ }
+
+ public const int RepeatedSfixed64FieldNumber = 40;
+ private pbc::PopsicleList<long> repeatedSfixed64_ = new pbc::PopsicleList<long>();
+ public scg::IList<long> RepeatedSfixed64List {
+ get { return pbc::Lists.AsReadOnly(repeatedSfixed64_); }
+ }
+ public int RepeatedSfixed64Count {
+ get { return repeatedSfixed64_.Count; }
+ }
+ public long GetRepeatedSfixed64(int index) {
+ return repeatedSfixed64_[index];
+ }
+
+ public const int RepeatedFloatFieldNumber = 41;
+ private pbc::PopsicleList<float> repeatedFloat_ = new pbc::PopsicleList<float>();
+ public scg::IList<float> RepeatedFloatList {
+ get { return pbc::Lists.AsReadOnly(repeatedFloat_); }
+ }
+ public int RepeatedFloatCount {
+ get { return repeatedFloat_.Count; }
+ }
+ public float GetRepeatedFloat(int index) {
+ return repeatedFloat_[index];
+ }
+
+ public const int RepeatedDoubleFieldNumber = 42;
+ private pbc::PopsicleList<double> repeatedDouble_ = new pbc::PopsicleList<double>();
+ public scg::IList<double> RepeatedDoubleList {
+ get { return pbc::Lists.AsReadOnly(repeatedDouble_); }
+ }
+ public int RepeatedDoubleCount {
+ get { return repeatedDouble_.Count; }
+ }
+ public double GetRepeatedDouble(int index) {
+ return repeatedDouble_[index];
+ }
+
+ public const int RepeatedBoolFieldNumber = 43;
+ private pbc::PopsicleList<bool> repeatedBool_ = new pbc::PopsicleList<bool>();
+ public scg::IList<bool> RepeatedBoolList {
+ get { return pbc::Lists.AsReadOnly(repeatedBool_); }
+ }
+ public int RepeatedBoolCount {
+ get { return repeatedBool_.Count; }
+ }
+ public bool GetRepeatedBool(int index) {
+ return repeatedBool_[index];
+ }
+
+ public const int RepeatedStringFieldNumber = 44;
+ private pbc::PopsicleList<string> repeatedString_ = new pbc::PopsicleList<string>();
+ public scg::IList<string> RepeatedStringList {
+ get { return pbc::Lists.AsReadOnly(repeatedString_); }
+ }
+ public int RepeatedStringCount {
+ get { return repeatedString_.Count; }
+ }
+ public string GetRepeatedString(int index) {
+ return repeatedString_[index];
+ }
+
+ public const int RepeatedBytesFieldNumber = 45;
+ private pbc::PopsicleList<pb::ByteString> repeatedBytes_ = new pbc::PopsicleList<pb::ByteString>();
+ public scg::IList<pb::ByteString> RepeatedBytesList {
+ get { return pbc::Lists.AsReadOnly(repeatedBytes_); }
+ }
+ public int RepeatedBytesCount {
+ get { return repeatedBytes_.Count; }
+ }
+ public pb::ByteString GetRepeatedBytes(int index) {
+ return repeatedBytes_[index];
+ }
+
+ public const int RepeatedGroupFieldNumber = 46;
+ private pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.RepeatedGroup> repeatedGroup_ = new pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.RepeatedGroup>();
+ public scg::IList<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.RepeatedGroup> RepeatedGroupList {
+ get { return repeatedGroup_; }
+ }
+ public int RepeatedGroupCount {
+ get { return repeatedGroup_.Count; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.RepeatedGroup GetRepeatedGroup(int index) {
+ return repeatedGroup_[index];
+ }
+
+ public const int RepeatedNestedMessageFieldNumber = 48;
+ private pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage> repeatedNestedMessage_ = new pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage>();
+ public scg::IList<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage> RepeatedNestedMessageList {
+ get { return repeatedNestedMessage_; }
+ }
+ public int RepeatedNestedMessageCount {
+ get { return repeatedNestedMessage_.Count; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage GetRepeatedNestedMessage(int index) {
+ return repeatedNestedMessage_[index];
+ }
+
+ public const int RepeatedForeignMessageFieldNumber = 49;
+ private pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.ForeignMessage> repeatedForeignMessage_ = new pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.ForeignMessage>();
+ public scg::IList<global::Google.ProtocolBuffers.TestProtos.ForeignMessage> RepeatedForeignMessageList {
+ get { return repeatedForeignMessage_; }
+ }
+ public int RepeatedForeignMessageCount {
+ get { return repeatedForeignMessage_.Count; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.ForeignMessage GetRepeatedForeignMessage(int index) {
+ return repeatedForeignMessage_[index];
+ }
+
+ public const int RepeatedImportMessageFieldNumber = 50;
+ private pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.ImportMessage> repeatedImportMessage_ = new pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.ImportMessage>();
+ public scg::IList<global::Google.ProtocolBuffers.TestProtos.ImportMessage> RepeatedImportMessageList {
+ get { return repeatedImportMessage_; }
+ }
+ public int RepeatedImportMessageCount {
+ get { return repeatedImportMessage_.Count; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.ImportMessage GetRepeatedImportMessage(int index) {
+ return repeatedImportMessage_[index];
+ }
+
+ public const int RepeatedNestedEnumFieldNumber = 51;
+ private pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedEnum> repeatedNestedEnum_ = new pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedEnum>();
+ public scg::IList<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedEnum> RepeatedNestedEnumList {
+ get { return pbc::Lists.AsReadOnly(repeatedNestedEnum_); }
+ }
+ public int RepeatedNestedEnumCount {
+ get { return repeatedNestedEnum_.Count; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedEnum GetRepeatedNestedEnum(int index) {
+ return repeatedNestedEnum_[index];
+ }
+
+ public const int RepeatedForeignEnumFieldNumber = 52;
+ private pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.ForeignEnum> repeatedForeignEnum_ = new pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.ForeignEnum>();
+ public scg::IList<global::Google.ProtocolBuffers.TestProtos.ForeignEnum> RepeatedForeignEnumList {
+ get { return pbc::Lists.AsReadOnly(repeatedForeignEnum_); }
+ }
+ public int RepeatedForeignEnumCount {
+ get { return repeatedForeignEnum_.Count; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.ForeignEnum GetRepeatedForeignEnum(int index) {
+ return repeatedForeignEnum_[index];
+ }
+
+ public const int RepeatedImportEnumFieldNumber = 53;
+ private pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.ImportEnum> repeatedImportEnum_ = new pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.ImportEnum>();
+ public scg::IList<global::Google.ProtocolBuffers.TestProtos.ImportEnum> RepeatedImportEnumList {
+ get { return pbc::Lists.AsReadOnly(repeatedImportEnum_); }
+ }
+ public int RepeatedImportEnumCount {
+ get { return repeatedImportEnum_.Count; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.ImportEnum GetRepeatedImportEnum(int index) {
+ return repeatedImportEnum_[index];
+ }
+
+ public const int RepeatedStringPieceFieldNumber = 54;
+ private pbc::PopsicleList<string> repeatedStringPiece_ = new pbc::PopsicleList<string>();
+ public scg::IList<string> RepeatedStringPieceList {
+ get { return pbc::Lists.AsReadOnly(repeatedStringPiece_); }
+ }
+ public int RepeatedStringPieceCount {
+ get { return repeatedStringPiece_.Count; }
+ }
+ public string GetRepeatedStringPiece(int index) {
+ return repeatedStringPiece_[index];
+ }
+
+ public const int RepeatedCordFieldNumber = 55;
+ private pbc::PopsicleList<string> repeatedCord_ = new pbc::PopsicleList<string>();
+ public scg::IList<string> RepeatedCordList {
+ get { return pbc::Lists.AsReadOnly(repeatedCord_); }
+ }
+ public int RepeatedCordCount {
+ get { return repeatedCord_.Count; }
+ }
+ public string GetRepeatedCord(int index) {
+ return repeatedCord_[index];
+ }
+
+ public const int RepeatedLazyMessageFieldNumber = 57;
+ private pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage> repeatedLazyMessage_ = new pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage>();
+ public scg::IList<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage> RepeatedLazyMessageList {
+ get { return repeatedLazyMessage_; }
+ }
+ public int RepeatedLazyMessageCount {
+ get { return repeatedLazyMessage_.Count; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage GetRepeatedLazyMessage(int index) {
+ return repeatedLazyMessage_[index];
+ }
+
+ public const int DefaultInt32FieldNumber = 61;
+ private bool hasDefaultInt32;
+ private int defaultInt32_ = 41;
+ public bool HasDefaultInt32 {
+ get { return hasDefaultInt32; }
+ }
+ public int DefaultInt32 {
+ get { return defaultInt32_; }
+ }
+
+ public const int DefaultInt64FieldNumber = 62;
+ private bool hasDefaultInt64;
+ private long defaultInt64_ = 42L;
+ public bool HasDefaultInt64 {
+ get { return hasDefaultInt64; }
+ }
+ public long DefaultInt64 {
+ get { return defaultInt64_; }
+ }
+
+ public const int DefaultUint32FieldNumber = 63;
+ private bool hasDefaultUint32;
+ private uint defaultUint32_ = 43;
+ public bool HasDefaultUint32 {
+ get { return hasDefaultUint32; }
+ }
+ [global::System.CLSCompliant(false)]
+ public uint DefaultUint32 {
+ get { return defaultUint32_; }
+ }
+
+ public const int DefaultUint64FieldNumber = 64;
+ private bool hasDefaultUint64;
+ private ulong defaultUint64_ = 44UL;
+ public bool HasDefaultUint64 {
+ get { return hasDefaultUint64; }
+ }
+ [global::System.CLSCompliant(false)]
+ public ulong DefaultUint64 {
+ get { return defaultUint64_; }
+ }
+
+ public const int DefaultSint32FieldNumber = 65;
+ private bool hasDefaultSint32;
+ private int defaultSint32_ = -45;
+ public bool HasDefaultSint32 {
+ get { return hasDefaultSint32; }
+ }
+ public int DefaultSint32 {
+ get { return defaultSint32_; }
+ }
+
+ public const int DefaultSint64FieldNumber = 66;
+ private bool hasDefaultSint64;
+ private long defaultSint64_ = 46L;
+ public bool HasDefaultSint64 {
+ get { return hasDefaultSint64; }
+ }
+ public long DefaultSint64 {
+ get { return defaultSint64_; }
+ }
+
+ public const int DefaultFixed32FieldNumber = 67;
+ private bool hasDefaultFixed32;
+ private uint defaultFixed32_ = 47;
+ public bool HasDefaultFixed32 {
+ get { return hasDefaultFixed32; }
+ }
+ [global::System.CLSCompliant(false)]
+ public uint DefaultFixed32 {
+ get { return defaultFixed32_; }
+ }
+
+ public const int DefaultFixed64FieldNumber = 68;
+ private bool hasDefaultFixed64;
+ private ulong defaultFixed64_ = 48UL;
+ public bool HasDefaultFixed64 {
+ get { return hasDefaultFixed64; }
+ }
+ [global::System.CLSCompliant(false)]
+ public ulong DefaultFixed64 {
+ get { return defaultFixed64_; }
+ }
+
+ public const int DefaultSfixed32FieldNumber = 69;
+ private bool hasDefaultSfixed32;
+ private int defaultSfixed32_ = 49;
+ public bool HasDefaultSfixed32 {
+ get { return hasDefaultSfixed32; }
+ }
+ public int DefaultSfixed32 {
+ get { return defaultSfixed32_; }
+ }
+
+ public const int DefaultSfixed64FieldNumber = 70;
+ private bool hasDefaultSfixed64;
+ private long defaultSfixed64_ = -50L;
+ public bool HasDefaultSfixed64 {
+ get { return hasDefaultSfixed64; }
+ }
+ public long DefaultSfixed64 {
+ get { return defaultSfixed64_; }
+ }
+
+ public const int DefaultFloatFieldNumber = 71;
+ private bool hasDefaultFloat;
+ private float defaultFloat_ = 51.5F;
+ public bool HasDefaultFloat {
+ get { return hasDefaultFloat; }
+ }
+ public float DefaultFloat {
+ get { return defaultFloat_; }
+ }
+
+ public const int DefaultDoubleFieldNumber = 72;
+ private bool hasDefaultDouble;
+ private double defaultDouble_ = 52000D;
+ public bool HasDefaultDouble {
+ get { return hasDefaultDouble; }
+ }
+ public double DefaultDouble {
+ get { return defaultDouble_; }
+ }
+
+ public const int DefaultBoolFieldNumber = 73;
+ private bool hasDefaultBool;
+ private bool defaultBool_ = true;
+ public bool HasDefaultBool {
+ get { return hasDefaultBool; }
+ }
+ public bool DefaultBool {
+ get { return defaultBool_; }
+ }
+
+ public const int DefaultStringFieldNumber = 74;
+ private bool hasDefaultString;
+ private string defaultString_ = "hello";
+ public bool HasDefaultString {
+ get { return hasDefaultString; }
+ }
+ public string DefaultString {
+ get { return defaultString_; }
+ }
+
+ public const int DefaultBytesFieldNumber = 75;
+ private bool hasDefaultBytes;
+ private pb::ByteString defaultBytes_ = (pb::ByteString) global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Descriptor.Fields[65].DefaultValue;
+ public bool HasDefaultBytes {
+ get { return hasDefaultBytes; }
+ }
+ public pb::ByteString DefaultBytes {
+ get { return defaultBytes_; }
+ }
+
+ public const int DefaultNestedEnumFieldNumber = 81;
+ private bool hasDefaultNestedEnum;
+ private global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedEnum defaultNestedEnum_ = global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedEnum.BAR;
+ public bool HasDefaultNestedEnum {
+ get { return hasDefaultNestedEnum; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedEnum DefaultNestedEnum {
+ get { return defaultNestedEnum_; }
+ }
+
+ public const int DefaultForeignEnumFieldNumber = 82;
+ private bool hasDefaultForeignEnum;
+ private global::Google.ProtocolBuffers.TestProtos.ForeignEnum defaultForeignEnum_ = global::Google.ProtocolBuffers.TestProtos.ForeignEnum.FOREIGN_BAR;
+ public bool HasDefaultForeignEnum {
+ get { return hasDefaultForeignEnum; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.ForeignEnum DefaultForeignEnum {
+ get { return defaultForeignEnum_; }
+ }
+
+ public const int DefaultImportEnumFieldNumber = 83;
+ private bool hasDefaultImportEnum;
+ private global::Google.ProtocolBuffers.TestProtos.ImportEnum defaultImportEnum_ = global::Google.ProtocolBuffers.TestProtos.ImportEnum.IMPORT_BAR;
+ public bool HasDefaultImportEnum {
+ get { return hasDefaultImportEnum; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.ImportEnum DefaultImportEnum {
+ get { return defaultImportEnum_; }
+ }
+
+ public const int DefaultStringPieceFieldNumber = 84;
+ private bool hasDefaultStringPiece;
+ private string defaultStringPiece_ = "abc";
+ public bool HasDefaultStringPiece {
+ get { return hasDefaultStringPiece; }
+ }
+ public string DefaultStringPiece {
+ get { return defaultStringPiece_; }
+ }
+
+ public const int DefaultCordFieldNumber = 85;
+ private bool hasDefaultCord;
+ private string defaultCord_ = "123";
+ public bool HasDefaultCord {
+ get { return hasDefaultCord; }
+ }
+ public string DefaultCord {
+ get { return defaultCord_; }
+ }
+
+ public const int OneofUint32FieldNumber = 111;
+ private bool hasOneofUint32;
+ private uint oneofUint32_;
+ public bool HasOneofUint32 {
+ get { return hasOneofUint32; }
+ }
+ [global::System.CLSCompliant(false)]
+ public uint OneofUint32 {
+ get { return oneofUint32_; }
+ }
+
+ public const int OneofNestedMessageFieldNumber = 112;
+ private bool hasOneofNestedMessage;
+ private global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage oneofNestedMessage_;
+ public bool HasOneofNestedMessage {
+ get { return hasOneofNestedMessage; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage OneofNestedMessage {
+ get { return oneofNestedMessage_ ?? global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage.DefaultInstance; }
+ }
+
+ public const int OneofStringFieldNumber = 113;
+ private bool hasOneofString;
+ private string oneofString_ = "";
+ public bool HasOneofString {
+ get { return hasOneofString; }
+ }
+ public string OneofString {
+ get { return oneofString_; }
+ }
+
+ public const int OneofBytesFieldNumber = 114;
+ private bool hasOneofBytes;
+ private pb::ByteString oneofBytes_ = pb::ByteString.Empty;
+ public bool HasOneofBytes {
+ get { return hasOneofBytes; }
+ }
+ public pb::ByteString OneofBytes {
+ get { return oneofBytes_; }
+ }
+
+ public override bool IsInitialized {
+ get {
+ return true;
+ }
+ }
+
+ public override void WriteTo(pb::ICodedOutputStream output) {
+ CalcSerializedSize();
+ string[] field_names = _testAllTypesFieldNames;
+ if (hasOptionalInt32) {
+ output.WriteInt32(1, field_names[35], OptionalInt32);
+ }
+ if (hasOptionalInt64) {
+ output.WriteInt64(2, field_names[36], OptionalInt64);
+ }
+ if (hasOptionalUint32) {
+ output.WriteUInt32(3, field_names[47], OptionalUint32);
+ }
+ if (hasOptionalUint64) {
+ output.WriteUInt64(4, field_names[48], OptionalUint64);
+ }
+ if (hasOptionalSint32) {
+ output.WriteSInt32(5, field_names[43], OptionalSint32);
+ }
+ if (hasOptionalSint64) {
+ output.WriteSInt64(6, field_names[44], OptionalSint64);
+ }
+ if (hasOptionalFixed32) {
+ output.WriteFixed32(7, field_names[28], OptionalFixed32);
+ }
+ if (hasOptionalFixed64) {
+ output.WriteFixed64(8, field_names[29], OptionalFixed64);
+ }
+ if (hasOptionalSfixed32) {
+ output.WriteSFixed32(9, field_names[41], OptionalSfixed32);
+ }
+ if (hasOptionalSfixed64) {
+ output.WriteSFixed64(10, field_names[42], OptionalSfixed64);
+ }
+ if (hasOptionalFloat) {
+ output.WriteFloat(11, field_names[30], OptionalFloat);
+ }
+ if (hasOptionalDouble) {
+ output.WriteDouble(12, field_names[27], OptionalDouble);
+ }
+ if (hasOptionalBool) {
+ output.WriteBool(13, field_names[24], OptionalBool);
+ }
+ if (hasOptionalString) {
+ output.WriteString(14, field_names[45], OptionalString);
+ }
+ if (hasOptionalBytes) {
+ output.WriteBytes(15, field_names[25], OptionalBytes);
+ }
+ if (hasOptionalGroup) {
+ output.WriteGroup(16, field_names[49], OptionalGroup);
+ }
+ if (hasOptionalNestedMessage) {
+ output.WriteMessage(18, field_names[39], OptionalNestedMessage);
+ }
+ if (hasOptionalForeignMessage) {
+ output.WriteMessage(19, field_names[32], OptionalForeignMessage);
+ }
+ if (hasOptionalImportMessage) {
+ output.WriteMessage(20, field_names[34], OptionalImportMessage);
+ }
+ if (hasOptionalNestedEnum) {
+ output.WriteEnum(21, field_names[38], (int) OptionalNestedEnum, OptionalNestedEnum);
+ }
+ if (hasOptionalForeignEnum) {
+ output.WriteEnum(22, field_names[31], (int) OptionalForeignEnum, OptionalForeignEnum);
+ }
+ if (hasOptionalImportEnum) {
+ output.WriteEnum(23, field_names[33], (int) OptionalImportEnum, OptionalImportEnum);
+ }
+ if (hasOptionalStringPiece) {
+ output.WriteString(24, field_names[46], OptionalStringPiece);
+ }
+ if (hasOptionalCord) {
+ output.WriteString(25, field_names[26], OptionalCord);
+ }
+ if (hasOptionalPublicImportMessage) {
+ output.WriteMessage(26, field_names[40], OptionalPublicImportMessage);
+ }
+ if (hasOptionalLazyMessage) {
+ output.WriteMessage(27, field_names[37], OptionalLazyMessage);
+ }
+ if (repeatedInt32_.Count > 0) {
+ output.WriteInt32Array(31, field_names[61], repeatedInt32_);
+ }
+ if (repeatedInt64_.Count > 0) {
+ output.WriteInt64Array(32, field_names[62], repeatedInt64_);
+ }
+ if (repeatedUint32_.Count > 0) {
+ output.WriteUInt32Array(33, field_names[72], repeatedUint32_);
+ }
+ if (repeatedUint64_.Count > 0) {
+ output.WriteUInt64Array(34, field_names[73], repeatedUint64_);
+ }
+ if (repeatedSint32_.Count > 0) {
+ output.WriteSInt32Array(35, field_names[68], repeatedSint32_);
+ }
+ if (repeatedSint64_.Count > 0) {
+ output.WriteSInt64Array(36, field_names[69], repeatedSint64_);
+ }
+ if (repeatedFixed32_.Count > 0) {
+ output.WriteFixed32Array(37, field_names[54], repeatedFixed32_);
+ }
+ if (repeatedFixed64_.Count > 0) {
+ output.WriteFixed64Array(38, field_names[55], repeatedFixed64_);
+ }
+ if (repeatedSfixed32_.Count > 0) {
+ output.WriteSFixed32Array(39, field_names[66], repeatedSfixed32_);
+ }
+ if (repeatedSfixed64_.Count > 0) {
+ output.WriteSFixed64Array(40, field_names[67], repeatedSfixed64_);
+ }
+ if (repeatedFloat_.Count > 0) {
+ output.WriteFloatArray(41, field_names[56], repeatedFloat_);
+ }
+ if (repeatedDouble_.Count > 0) {
+ output.WriteDoubleArray(42, field_names[53], repeatedDouble_);
+ }
+ if (repeatedBool_.Count > 0) {
+ output.WriteBoolArray(43, field_names[50], repeatedBool_);
+ }
+ if (repeatedString_.Count > 0) {
+ output.WriteStringArray(44, field_names[70], repeatedString_);
+ }
+ if (repeatedBytes_.Count > 0) {
+ output.WriteBytesArray(45, field_names[51], repeatedBytes_);
+ }
+ if (repeatedGroup_.Count > 0) {
+ output.WriteGroupArray(46, field_names[74], repeatedGroup_);
+ }
+ if (repeatedNestedMessage_.Count > 0) {
+ output.WriteMessageArray(48, field_names[65], repeatedNestedMessage_);
+ }
+ if (repeatedForeignMessage_.Count > 0) {
+ output.WriteMessageArray(49, field_names[58], repeatedForeignMessage_);
+ }
+ if (repeatedImportMessage_.Count > 0) {
+ output.WriteMessageArray(50, field_names[60], repeatedImportMessage_);
+ }
+ if (repeatedNestedEnum_.Count > 0) {
+ output.WriteEnumArray(51, field_names[64], repeatedNestedEnum_);
+ }
+ if (repeatedForeignEnum_.Count > 0) {
+ output.WriteEnumArray(52, field_names[57], repeatedForeignEnum_);
+ }
+ if (repeatedImportEnum_.Count > 0) {
+ output.WriteEnumArray(53, field_names[59], repeatedImportEnum_);
+ }
+ if (repeatedStringPiece_.Count > 0) {
+ output.WriteStringArray(54, field_names[71], repeatedStringPiece_);
+ }
+ if (repeatedCord_.Count > 0) {
+ output.WriteStringArray(55, field_names[52], repeatedCord_);
+ }
+ if (repeatedLazyMessage_.Count > 0) {
+ output.WriteMessageArray(57, field_names[63], repeatedLazyMessage_);
+ }
+ if (hasDefaultInt32) {
+ output.WriteInt32(61, field_names[9], DefaultInt32);
+ }
+ if (hasDefaultInt64) {
+ output.WriteInt64(62, field_names[10], DefaultInt64);
+ }
+ if (hasDefaultUint32) {
+ output.WriteUInt32(63, field_names[18], DefaultUint32);
+ }
+ if (hasDefaultUint64) {
+ output.WriteUInt64(64, field_names[19], DefaultUint64);
+ }
+ if (hasDefaultSint32) {
+ output.WriteSInt32(65, field_names[14], DefaultSint32);
+ }
+ if (hasDefaultSint64) {
+ output.WriteSInt64(66, field_names[15], DefaultSint64);
+ }
+ if (hasDefaultFixed32) {
+ output.WriteFixed32(67, field_names[4], DefaultFixed32);
+ }
+ if (hasDefaultFixed64) {
+ output.WriteFixed64(68, field_names[5], DefaultFixed64);
+ }
+ if (hasDefaultSfixed32) {
+ output.WriteSFixed32(69, field_names[12], DefaultSfixed32);
+ }
+ if (hasDefaultSfixed64) {
+ output.WriteSFixed64(70, field_names[13], DefaultSfixed64);
+ }
+ if (hasDefaultFloat) {
+ output.WriteFloat(71, field_names[6], DefaultFloat);
+ }
+ if (hasDefaultDouble) {
+ output.WriteDouble(72, field_names[3], DefaultDouble);
+ }
+ if (hasDefaultBool) {
+ output.WriteBool(73, field_names[0], DefaultBool);
+ }
+ if (hasDefaultString) {
+ output.WriteString(74, field_names[16], DefaultString);
+ }
+ if (hasDefaultBytes) {
+ output.WriteBytes(75, field_names[1], DefaultBytes);
+ }
+ if (hasDefaultNestedEnum) {
+ output.WriteEnum(81, field_names[11], (int) DefaultNestedEnum, DefaultNestedEnum);
+ }
+ if (hasDefaultForeignEnum) {
+ output.WriteEnum(82, field_names[7], (int) DefaultForeignEnum, DefaultForeignEnum);
+ }
+ if (hasDefaultImportEnum) {
+ output.WriteEnum(83, field_names[8], (int) DefaultImportEnum, DefaultImportEnum);
+ }
+ if (hasDefaultStringPiece) {
+ output.WriteString(84, field_names[17], DefaultStringPiece);
+ }
+ if (hasDefaultCord) {
+ output.WriteString(85, field_names[2], DefaultCord);
+ }
+ if (hasOneofUint32) {
+ output.WriteUInt32(111, field_names[23], OneofUint32);
+ }
+ if (hasOneofNestedMessage) {
+ output.WriteMessage(112, field_names[21], OneofNestedMessage);
+ }
+ if (hasOneofString) {
+ output.WriteString(113, field_names[22], OneofString);
+ }
+ if (hasOneofBytes) {
+ output.WriteBytes(114, field_names[20], OneofBytes);
+ }
+ UnknownFields.WriteTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public override int SerializedSize {
+ get {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+ return CalcSerializedSize();
+ }
+ }
+
+ private int CalcSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (hasOptionalInt32) {
+ size += pb::CodedOutputStream.ComputeInt32Size(1, OptionalInt32);
+ }
+ if (hasOptionalInt64) {
+ size += pb::CodedOutputStream.ComputeInt64Size(2, OptionalInt64);
+ }
+ if (hasOptionalUint32) {
+ size += pb::CodedOutputStream.ComputeUInt32Size(3, OptionalUint32);
+ }
+ if (hasOptionalUint64) {
+ size += pb::CodedOutputStream.ComputeUInt64Size(4, OptionalUint64);
+ }
+ if (hasOptionalSint32) {
+ size += pb::CodedOutputStream.ComputeSInt32Size(5, OptionalSint32);
+ }
+ if (hasOptionalSint64) {
+ size += pb::CodedOutputStream.ComputeSInt64Size(6, OptionalSint64);
+ }
+ if (hasOptionalFixed32) {
+ size += pb::CodedOutputStream.ComputeFixed32Size(7, OptionalFixed32);
+ }
+ if (hasOptionalFixed64) {
+ size += pb::CodedOutputStream.ComputeFixed64Size(8, OptionalFixed64);
+ }
+ if (hasOptionalSfixed32) {
+ size += pb::CodedOutputStream.ComputeSFixed32Size(9, OptionalSfixed32);
+ }
+ if (hasOptionalSfixed64) {
+ size += pb::CodedOutputStream.ComputeSFixed64Size(10, OptionalSfixed64);
+ }
+ if (hasOptionalFloat) {
+ size += pb::CodedOutputStream.ComputeFloatSize(11, OptionalFloat);
+ }
+ if (hasOptionalDouble) {
+ size += pb::CodedOutputStream.ComputeDoubleSize(12, OptionalDouble);
+ }
+ if (hasOptionalBool) {
+ size += pb::CodedOutputStream.ComputeBoolSize(13, OptionalBool);
+ }
+ if (hasOptionalString) {
+ size += pb::CodedOutputStream.ComputeStringSize(14, OptionalString);
+ }
+ if (hasOptionalBytes) {
+ size += pb::CodedOutputStream.ComputeBytesSize(15, OptionalBytes);
+ }
+ if (hasOptionalGroup) {
+ size += pb::CodedOutputStream.ComputeGroupSize(16, OptionalGroup);
+ }
+ if (hasOptionalNestedMessage) {
+ size += pb::CodedOutputStream.ComputeMessageSize(18, OptionalNestedMessage);
+ }
+ if (hasOptionalForeignMessage) {
+ size += pb::CodedOutputStream.ComputeMessageSize(19, OptionalForeignMessage);
+ }
+ if (hasOptionalImportMessage) {
+ size += pb::CodedOutputStream.ComputeMessageSize(20, OptionalImportMessage);
+ }
+ if (hasOptionalNestedEnum) {
+ size += pb::CodedOutputStream.ComputeEnumSize(21, (int) OptionalNestedEnum);
+ }
+ if (hasOptionalForeignEnum) {
+ size += pb::CodedOutputStream.ComputeEnumSize(22, (int) OptionalForeignEnum);
+ }
+ if (hasOptionalImportEnum) {
+ size += pb::CodedOutputStream.ComputeEnumSize(23, (int) OptionalImportEnum);
+ }
+ if (hasOptionalStringPiece) {
+ size += pb::CodedOutputStream.ComputeStringSize(24, OptionalStringPiece);
+ }
+ if (hasOptionalCord) {
+ size += pb::CodedOutputStream.ComputeStringSize(25, OptionalCord);
+ }
+ if (hasOptionalPublicImportMessage) {
+ size += pb::CodedOutputStream.ComputeMessageSize(26, OptionalPublicImportMessage);
+ }
+ if (hasOptionalLazyMessage) {
+ size += pb::CodedOutputStream.ComputeMessageSize(27, OptionalLazyMessage);
+ }
+ {
+ int dataSize = 0;
+ foreach (int element in RepeatedInt32List) {
+ dataSize += pb::CodedOutputStream.ComputeInt32SizeNoTag(element);
+ }
+ size += dataSize;
+ size += 2 * repeatedInt32_.Count;
+ }
+ {
+ int dataSize = 0;
+ foreach (long element in RepeatedInt64List) {
+ dataSize += pb::CodedOutputStream.ComputeInt64SizeNoTag(element);
+ }
+ size += dataSize;
+ size += 2 * repeatedInt64_.Count;
+ }
+ {
+ int dataSize = 0;
+ foreach (uint element in RepeatedUint32List) {
+ dataSize += pb::CodedOutputStream.ComputeUInt32SizeNoTag(element);
+ }
+ size += dataSize;
+ size += 2 * repeatedUint32_.Count;
+ }
+ {
+ int dataSize = 0;
+ foreach (ulong element in RepeatedUint64List) {
+ dataSize += pb::CodedOutputStream.ComputeUInt64SizeNoTag(element);
+ }
+ size += dataSize;
+ size += 2 * repeatedUint64_.Count;
+ }
+ {
+ int dataSize = 0;
+ foreach (int element in RepeatedSint32List) {
+ dataSize += pb::CodedOutputStream.ComputeSInt32SizeNoTag(element);
+ }
+ size += dataSize;
+ size += 2 * repeatedSint32_.Count;
+ }
+ {
+ int dataSize = 0;
+ foreach (long element in RepeatedSint64List) {
+ dataSize += pb::CodedOutputStream.ComputeSInt64SizeNoTag(element);
+ }
+ size += dataSize;
+ size += 2 * repeatedSint64_.Count;
+ }
+ {
+ int dataSize = 0;
+ dataSize = 4 * repeatedFixed32_.Count;
+ size += dataSize;
+ size += 2 * repeatedFixed32_.Count;
+ }
+ {
+ int dataSize = 0;
+ dataSize = 8 * repeatedFixed64_.Count;
+ size += dataSize;
+ size += 2 * repeatedFixed64_.Count;
+ }
+ {
+ int dataSize = 0;
+ dataSize = 4 * repeatedSfixed32_.Count;
+ size += dataSize;
+ size += 2 * repeatedSfixed32_.Count;
+ }
+ {
+ int dataSize = 0;
+ dataSize = 8 * repeatedSfixed64_.Count;
+ size += dataSize;
+ size += 2 * repeatedSfixed64_.Count;
+ }
+ {
+ int dataSize = 0;
+ dataSize = 4 * repeatedFloat_.Count;
+ size += dataSize;
+ size += 2 * repeatedFloat_.Count;
+ }
+ {
+ int dataSize = 0;
+ dataSize = 8 * repeatedDouble_.Count;
+ size += dataSize;
+ size += 2 * repeatedDouble_.Count;
+ }
+ {
+ int dataSize = 0;
+ dataSize = 1 * repeatedBool_.Count;
+ size += dataSize;
+ size += 2 * repeatedBool_.Count;
+ }
+ {
+ int dataSize = 0;
+ foreach (string element in RepeatedStringList) {
+ dataSize += pb::CodedOutputStream.ComputeStringSizeNoTag(element);
+ }
+ size += dataSize;
+ size += 2 * repeatedString_.Count;
+ }
+ {
+ int dataSize = 0;
+ foreach (pb::ByteString element in RepeatedBytesList) {
+ dataSize += pb::CodedOutputStream.ComputeBytesSizeNoTag(element);
+ }
+ size += dataSize;
+ size += 2 * repeatedBytes_.Count;
+ }
+ foreach (global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.RepeatedGroup element in RepeatedGroupList) {
+ size += pb::CodedOutputStream.ComputeGroupSize(46, element);
+ }
+ foreach (global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage element in RepeatedNestedMessageList) {
+ size += pb::CodedOutputStream.ComputeMessageSize(48, element);
+ }
+ foreach (global::Google.ProtocolBuffers.TestProtos.ForeignMessage element in RepeatedForeignMessageList) {
+ size += pb::CodedOutputStream.ComputeMessageSize(49, element);
+ }
+ foreach (global::Google.ProtocolBuffers.TestProtos.ImportMessage element in RepeatedImportMessageList) {
+ size += pb::CodedOutputStream.ComputeMessageSize(50, element);
+ }
+ {
+ int dataSize = 0;
+ if (repeatedNestedEnum_.Count > 0) {
+ foreach (global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedEnum element in repeatedNestedEnum_) {
+ dataSize += pb::CodedOutputStream.ComputeEnumSizeNoTag((int) element);
+ }
+ size += dataSize;
+ size += 2 * repeatedNestedEnum_.Count;
+ }
+ }
+ {
+ int dataSize = 0;
+ if (repeatedForeignEnum_.Count > 0) {
+ foreach (global::Google.ProtocolBuffers.TestProtos.ForeignEnum element in repeatedForeignEnum_) {
+ dataSize += pb::CodedOutputStream.ComputeEnumSizeNoTag((int) element);
+ }
+ size += dataSize;
+ size += 2 * repeatedForeignEnum_.Count;
+ }
+ }
+ {
+ int dataSize = 0;
+ if (repeatedImportEnum_.Count > 0) {
+ foreach (global::Google.ProtocolBuffers.TestProtos.ImportEnum element in repeatedImportEnum_) {
+ dataSize += pb::CodedOutputStream.ComputeEnumSizeNoTag((int) element);
+ }
+ size += dataSize;
+ size += 2 * repeatedImportEnum_.Count;
+ }
+ }
+ {
+ int dataSize = 0;
+ foreach (string element in RepeatedStringPieceList) {
+ dataSize += pb::CodedOutputStream.ComputeStringSizeNoTag(element);
+ }
+ size += dataSize;
+ size += 2 * repeatedStringPiece_.Count;
+ }
+ {
+ int dataSize = 0;
+ foreach (string element in RepeatedCordList) {
+ dataSize += pb::CodedOutputStream.ComputeStringSizeNoTag(element);
+ }
+ size += dataSize;
+ size += 2 * repeatedCord_.Count;
+ }
+ foreach (global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage element in RepeatedLazyMessageList) {
+ size += pb::CodedOutputStream.ComputeMessageSize(57, element);
+ }
+ if (hasDefaultInt32) {
+ size += pb::CodedOutputStream.ComputeInt32Size(61, DefaultInt32);
+ }
+ if (hasDefaultInt64) {
+ size += pb::CodedOutputStream.ComputeInt64Size(62, DefaultInt64);
+ }
+ if (hasDefaultUint32) {
+ size += pb::CodedOutputStream.ComputeUInt32Size(63, DefaultUint32);
+ }
+ if (hasDefaultUint64) {
+ size += pb::CodedOutputStream.ComputeUInt64Size(64, DefaultUint64);
+ }
+ if (hasDefaultSint32) {
+ size += pb::CodedOutputStream.ComputeSInt32Size(65, DefaultSint32);
+ }
+ if (hasDefaultSint64) {
+ size += pb::CodedOutputStream.ComputeSInt64Size(66, DefaultSint64);
+ }
+ if (hasDefaultFixed32) {
+ size += pb::CodedOutputStream.ComputeFixed32Size(67, DefaultFixed32);
+ }
+ if (hasDefaultFixed64) {
+ size += pb::CodedOutputStream.ComputeFixed64Size(68, DefaultFixed64);
+ }
+ if (hasDefaultSfixed32) {
+ size += pb::CodedOutputStream.ComputeSFixed32Size(69, DefaultSfixed32);
+ }
+ if (hasDefaultSfixed64) {
+ size += pb::CodedOutputStream.ComputeSFixed64Size(70, DefaultSfixed64);
+ }
+ if (hasDefaultFloat) {
+ size += pb::CodedOutputStream.ComputeFloatSize(71, DefaultFloat);
+ }
+ if (hasDefaultDouble) {
+ size += pb::CodedOutputStream.ComputeDoubleSize(72, DefaultDouble);
+ }
+ if (hasDefaultBool) {
+ size += pb::CodedOutputStream.ComputeBoolSize(73, DefaultBool);
+ }
+ if (hasDefaultString) {
+ size += pb::CodedOutputStream.ComputeStringSize(74, DefaultString);
+ }
+ if (hasDefaultBytes) {
+ size += pb::CodedOutputStream.ComputeBytesSize(75, DefaultBytes);
+ }
+ if (hasDefaultNestedEnum) {
+ size += pb::CodedOutputStream.ComputeEnumSize(81, (int) DefaultNestedEnum);
+ }
+ if (hasDefaultForeignEnum) {
+ size += pb::CodedOutputStream.ComputeEnumSize(82, (int) DefaultForeignEnum);
+ }
+ if (hasDefaultImportEnum) {
+ size += pb::CodedOutputStream.ComputeEnumSize(83, (int) DefaultImportEnum);
+ }
+ if (hasDefaultStringPiece) {
+ size += pb::CodedOutputStream.ComputeStringSize(84, DefaultStringPiece);
+ }
+ if (hasDefaultCord) {
+ size += pb::CodedOutputStream.ComputeStringSize(85, DefaultCord);
+ }
+ if (hasOneofUint32) {
+ size += pb::CodedOutputStream.ComputeUInt32Size(111, OneofUint32);
+ }
+ if (hasOneofNestedMessage) {
+ size += pb::CodedOutputStream.ComputeMessageSize(112, OneofNestedMessage);
+ }
+ if (hasOneofString) {
+ size += pb::CodedOutputStream.ComputeStringSize(113, OneofString);
+ }
+ if (hasOneofBytes) {
+ size += pb::CodedOutputStream.ComputeBytesSize(114, OneofBytes);
+ }
+ size += UnknownFields.SerializedSize;
+ memoizedSerializedSize = size;
+ return size;
+ }
+ public static TestAllTypes ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static TestAllTypes ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static TestAllTypes ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static TestAllTypes ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static TestAllTypes ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static TestAllTypes ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static TestAllTypes ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static TestAllTypes ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static TestAllTypes ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static TestAllTypes ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private TestAllTypes MakeReadOnly() {
+ repeatedInt32_.MakeReadOnly();
+ repeatedInt64_.MakeReadOnly();
+ repeatedUint32_.MakeReadOnly();
+ repeatedUint64_.MakeReadOnly();
+ repeatedSint32_.MakeReadOnly();
+ repeatedSint64_.MakeReadOnly();
+ repeatedFixed32_.MakeReadOnly();
+ repeatedFixed64_.MakeReadOnly();
+ repeatedSfixed32_.MakeReadOnly();
+ repeatedSfixed64_.MakeReadOnly();
+ repeatedFloat_.MakeReadOnly();
+ repeatedDouble_.MakeReadOnly();
+ repeatedBool_.MakeReadOnly();
+ repeatedString_.MakeReadOnly();
+ repeatedBytes_.MakeReadOnly();
+ repeatedGroup_.MakeReadOnly();
+ repeatedNestedMessage_.MakeReadOnly();
+ repeatedForeignMessage_.MakeReadOnly();
+ repeatedImportMessage_.MakeReadOnly();
+ repeatedNestedEnum_.MakeReadOnly();
+ repeatedForeignEnum_.MakeReadOnly();
+ repeatedImportEnum_.MakeReadOnly();
+ repeatedStringPiece_.MakeReadOnly();
+ repeatedCord_.MakeReadOnly();
+ repeatedLazyMessage_.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(TestAllTypes prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Builder : pb::GeneratedBuilder<TestAllTypes, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(TestAllTypes cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private TestAllTypes result;
+
+ private TestAllTypes PrepareBuilder() {
+ if (resultIsReadOnly) {
+ TestAllTypes original = result;
+ result = new TestAllTypes();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override TestAllTypes 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.TestAllTypes.Descriptor; }
+ }
+
+ public override TestAllTypes DefaultInstanceForType {
+ get { return global::Google.ProtocolBuffers.TestProtos.TestAllTypes.DefaultInstance; }
+ }
+
+ public override TestAllTypes BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+ public override Builder MergeFrom(pb::IMessage other) {
+ if (other is TestAllTypes) {
+ return MergeFrom((TestAllTypes) other);
+ } else {
+ base.MergeFrom(other);
+ return this;
+ }
+ }
+
+ public override Builder MergeFrom(TestAllTypes other) {
+ if (other == global::Google.ProtocolBuffers.TestProtos.TestAllTypes.DefaultInstance) return this;
+ PrepareBuilder();
+ if (other.HasOptionalInt32) {
+ OptionalInt32 = other.OptionalInt32;
+ }
+ if (other.HasOptionalInt64) {
+ OptionalInt64 = other.OptionalInt64;
+ }
+ if (other.HasOptionalUint32) {
+ OptionalUint32 = other.OptionalUint32;
+ }
+ if (other.HasOptionalUint64) {
+ OptionalUint64 = other.OptionalUint64;
+ }
+ if (other.HasOptionalSint32) {
+ OptionalSint32 = other.OptionalSint32;
+ }
+ if (other.HasOptionalSint64) {
+ OptionalSint64 = other.OptionalSint64;
+ }
+ if (other.HasOptionalFixed32) {
+ OptionalFixed32 = other.OptionalFixed32;
+ }
+ if (other.HasOptionalFixed64) {
+ OptionalFixed64 = other.OptionalFixed64;
+ }
+ if (other.HasOptionalSfixed32) {
+ OptionalSfixed32 = other.OptionalSfixed32;
+ }
+ if (other.HasOptionalSfixed64) {
+ OptionalSfixed64 = other.OptionalSfixed64;
+ }
+ if (other.HasOptionalFloat) {
+ OptionalFloat = other.OptionalFloat;
+ }
+ if (other.HasOptionalDouble) {
+ OptionalDouble = other.OptionalDouble;
+ }
+ if (other.HasOptionalBool) {
+ OptionalBool = other.OptionalBool;
+ }
+ if (other.HasOptionalString) {
+ OptionalString = other.OptionalString;
+ }
+ if (other.HasOptionalBytes) {
+ OptionalBytes = other.OptionalBytes;
+ }
+ if (other.HasOptionalGroup) {
+ MergeOptionalGroup(other.OptionalGroup);
+ }
+ if (other.HasOptionalNestedMessage) {
+ MergeOptionalNestedMessage(other.OptionalNestedMessage);
+ }
+ if (other.HasOptionalForeignMessage) {
+ MergeOptionalForeignMessage(other.OptionalForeignMessage);
+ }
+ if (other.HasOptionalImportMessage) {
+ MergeOptionalImportMessage(other.OptionalImportMessage);
+ }
+ if (other.HasOptionalNestedEnum) {
+ OptionalNestedEnum = other.OptionalNestedEnum;
+ }
+ if (other.HasOptionalForeignEnum) {
+ OptionalForeignEnum = other.OptionalForeignEnum;
+ }
+ if (other.HasOptionalImportEnum) {
+ OptionalImportEnum = other.OptionalImportEnum;
+ }
+ if (other.HasOptionalStringPiece) {
+ OptionalStringPiece = other.OptionalStringPiece;
+ }
+ if (other.HasOptionalCord) {
+ OptionalCord = other.OptionalCord;
+ }
+ if (other.HasOptionalPublicImportMessage) {
+ MergeOptionalPublicImportMessage(other.OptionalPublicImportMessage);
+ }
+ if (other.HasOptionalLazyMessage) {
+ MergeOptionalLazyMessage(other.OptionalLazyMessage);
+ }
+ if (other.repeatedInt32_.Count != 0) {
+ result.repeatedInt32_.Add(other.repeatedInt32_);
+ }
+ if (other.repeatedInt64_.Count != 0) {
+ result.repeatedInt64_.Add(other.repeatedInt64_);
+ }
+ if (other.repeatedUint32_.Count != 0) {
+ result.repeatedUint32_.Add(other.repeatedUint32_);
+ }
+ if (other.repeatedUint64_.Count != 0) {
+ result.repeatedUint64_.Add(other.repeatedUint64_);
+ }
+ if (other.repeatedSint32_.Count != 0) {
+ result.repeatedSint32_.Add(other.repeatedSint32_);
+ }
+ if (other.repeatedSint64_.Count != 0) {
+ result.repeatedSint64_.Add(other.repeatedSint64_);
+ }
+ if (other.repeatedFixed32_.Count != 0) {
+ result.repeatedFixed32_.Add(other.repeatedFixed32_);
+ }
+ if (other.repeatedFixed64_.Count != 0) {
+ result.repeatedFixed64_.Add(other.repeatedFixed64_);
+ }
+ if (other.repeatedSfixed32_.Count != 0) {
+ result.repeatedSfixed32_.Add(other.repeatedSfixed32_);
+ }
+ if (other.repeatedSfixed64_.Count != 0) {
+ result.repeatedSfixed64_.Add(other.repeatedSfixed64_);
+ }
+ if (other.repeatedFloat_.Count != 0) {
+ result.repeatedFloat_.Add(other.repeatedFloat_);
+ }
+ if (other.repeatedDouble_.Count != 0) {
+ result.repeatedDouble_.Add(other.repeatedDouble_);
+ }
+ if (other.repeatedBool_.Count != 0) {
+ result.repeatedBool_.Add(other.repeatedBool_);
+ }
+ if (other.repeatedString_.Count != 0) {
+ result.repeatedString_.Add(other.repeatedString_);
+ }
+ if (other.repeatedBytes_.Count != 0) {
+ result.repeatedBytes_.Add(other.repeatedBytes_);
+ }
+ if (other.repeatedGroup_.Count != 0) {
+ result.repeatedGroup_.Add(other.repeatedGroup_);
+ }
+ if (other.repeatedNestedMessage_.Count != 0) {
+ result.repeatedNestedMessage_.Add(other.repeatedNestedMessage_);
+ }
+ if (other.repeatedForeignMessage_.Count != 0) {
+ result.repeatedForeignMessage_.Add(other.repeatedForeignMessage_);
+ }
+ if (other.repeatedImportMessage_.Count != 0) {
+ result.repeatedImportMessage_.Add(other.repeatedImportMessage_);
+ }
+ if (other.repeatedNestedEnum_.Count != 0) {
+ result.repeatedNestedEnum_.Add(other.repeatedNestedEnum_);
+ }
+ if (other.repeatedForeignEnum_.Count != 0) {
+ result.repeatedForeignEnum_.Add(other.repeatedForeignEnum_);
+ }
+ if (other.repeatedImportEnum_.Count != 0) {
+ result.repeatedImportEnum_.Add(other.repeatedImportEnum_);
+ }
+ if (other.repeatedStringPiece_.Count != 0) {
+ result.repeatedStringPiece_.Add(other.repeatedStringPiece_);
+ }
+ if (other.repeatedCord_.Count != 0) {
+ result.repeatedCord_.Add(other.repeatedCord_);
+ }
+ if (other.repeatedLazyMessage_.Count != 0) {
+ result.repeatedLazyMessage_.Add(other.repeatedLazyMessage_);
+ }
+ if (other.HasDefaultInt32) {
+ DefaultInt32 = other.DefaultInt32;
+ }
+ if (other.HasDefaultInt64) {
+ DefaultInt64 = other.DefaultInt64;
+ }
+ if (other.HasDefaultUint32) {
+ DefaultUint32 = other.DefaultUint32;
+ }
+ if (other.HasDefaultUint64) {
+ DefaultUint64 = other.DefaultUint64;
+ }
+ if (other.HasDefaultSint32) {
+ DefaultSint32 = other.DefaultSint32;
+ }
+ if (other.HasDefaultSint64) {
+ DefaultSint64 = other.DefaultSint64;
+ }
+ if (other.HasDefaultFixed32) {
+ DefaultFixed32 = other.DefaultFixed32;
+ }
+ if (other.HasDefaultFixed64) {
+ DefaultFixed64 = other.DefaultFixed64;
+ }
+ if (other.HasDefaultSfixed32) {
+ DefaultSfixed32 = other.DefaultSfixed32;
+ }
+ if (other.HasDefaultSfixed64) {
+ DefaultSfixed64 = other.DefaultSfixed64;
+ }
+ if (other.HasDefaultFloat) {
+ DefaultFloat = other.DefaultFloat;
+ }
+ if (other.HasDefaultDouble) {
+ DefaultDouble = other.DefaultDouble;
+ }
+ if (other.HasDefaultBool) {
+ DefaultBool = other.DefaultBool;
+ }
+ if (other.HasDefaultString) {
+ DefaultString = other.DefaultString;
+ }
+ if (other.HasDefaultBytes) {
+ DefaultBytes = other.DefaultBytes;
+ }
+ if (other.HasDefaultNestedEnum) {
+ DefaultNestedEnum = other.DefaultNestedEnum;
+ }
+ if (other.HasDefaultForeignEnum) {
+ DefaultForeignEnum = other.DefaultForeignEnum;
+ }
+ if (other.HasDefaultImportEnum) {
+ DefaultImportEnum = other.DefaultImportEnum;
+ }
+ if (other.HasDefaultStringPiece) {
+ DefaultStringPiece = other.DefaultStringPiece;
+ }
+ if (other.HasDefaultCord) {
+ DefaultCord = other.DefaultCord;
+ }
+ if (other.HasOneofUint32) {
+ OneofUint32 = other.OneofUint32;
+ }
+ if (other.HasOneofNestedMessage) {
+ MergeOneofNestedMessage(other.OneofNestedMessage);
+ }
+ if (other.HasOneofString) {
+ OneofString = other.OneofString;
+ }
+ if (other.HasOneofBytes) {
+ OneofBytes = other.OneofBytes;
+ }
+ 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(_testAllTypesFieldNames, field_name, global::System.StringComparer.Ordinal);
+ if(field_ordinal >= 0)
+ tag = _testAllTypesFieldTags[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.hasOptionalInt32 = input.ReadInt32(ref result.optionalInt32_);
+ break;
+ }
+ case 16: {
+ result.hasOptionalInt64 = input.ReadInt64(ref result.optionalInt64_);
+ break;
+ }
+ case 24: {
+ result.hasOptionalUint32 = input.ReadUInt32(ref result.optionalUint32_);
+ break;
+ }
+ case 32: {
+ result.hasOptionalUint64 = input.ReadUInt64(ref result.optionalUint64_);
+ break;
+ }
+ case 40: {
+ result.hasOptionalSint32 = input.ReadSInt32(ref result.optionalSint32_);
+ break;
+ }
+ case 48: {
+ result.hasOptionalSint64 = input.ReadSInt64(ref result.optionalSint64_);
+ break;
+ }
+ case 61: {
+ result.hasOptionalFixed32 = input.ReadFixed32(ref result.optionalFixed32_);
+ break;
+ }
+ case 65: {
+ result.hasOptionalFixed64 = input.ReadFixed64(ref result.optionalFixed64_);
+ break;
+ }
+ case 77: {
+ result.hasOptionalSfixed32 = input.ReadSFixed32(ref result.optionalSfixed32_);
+ break;
+ }
+ case 81: {
+ result.hasOptionalSfixed64 = input.ReadSFixed64(ref result.optionalSfixed64_);
+ break;
+ }
+ case 93: {
+ result.hasOptionalFloat = input.ReadFloat(ref result.optionalFloat_);
+ break;
+ }
+ case 97: {
+ result.hasOptionalDouble = input.ReadDouble(ref result.optionalDouble_);
+ break;
+ }
+ case 104: {
+ result.hasOptionalBool = input.ReadBool(ref result.optionalBool_);
+ break;
+ }
+ case 114: {
+ result.hasOptionalString = input.ReadString(ref result.optionalString_);
+ break;
+ }
+ case 122: {
+ result.hasOptionalBytes = input.ReadBytes(ref result.optionalBytes_);
+ break;
+ }
+ case 131: {
+ global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.OptionalGroup.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.OptionalGroup.CreateBuilder();
+ if (result.hasOptionalGroup) {
+ subBuilder.MergeFrom(OptionalGroup);
+ }
+ input.ReadGroup(16, subBuilder, extensionRegistry);
+ OptionalGroup = subBuilder.BuildPartial();
+ break;
+ }
+ case 146: {
+ global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage.CreateBuilder();
+ if (result.hasOptionalNestedMessage) {
+ subBuilder.MergeFrom(OptionalNestedMessage);
+ }
+ input.ReadMessage(subBuilder, extensionRegistry);
+ OptionalNestedMessage = subBuilder.BuildPartial();
+ break;
+ }
+ case 154: {
+ global::Google.ProtocolBuffers.TestProtos.ForeignMessage.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.ForeignMessage.CreateBuilder();
+ if (result.hasOptionalForeignMessage) {
+ subBuilder.MergeFrom(OptionalForeignMessage);
+ }
+ input.ReadMessage(subBuilder, extensionRegistry);
+ OptionalForeignMessage = subBuilder.BuildPartial();
+ break;
+ }
+ case 162: {
+ global::Google.ProtocolBuffers.TestProtos.ImportMessage.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.ImportMessage.CreateBuilder();
+ if (result.hasOptionalImportMessage) {
+ subBuilder.MergeFrom(OptionalImportMessage);
+ }
+ input.ReadMessage(subBuilder, extensionRegistry);
+ OptionalImportMessage = subBuilder.BuildPartial();
+ break;
+ }
+ case 168: {
+ object unknown;
+ if(input.ReadEnum(ref result.optionalNestedEnum_, out unknown)) {
+ result.hasOptionalNestedEnum = true;
+ } else if(unknown is int) {
+ if (unknownFields == null) {
+ unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+ }
+ unknownFields.MergeVarintField(21, (ulong)(int)unknown);
+ }
+ break;
+ }
+ case 176: {
+ object unknown;
+ if(input.ReadEnum(ref result.optionalForeignEnum_, out unknown)) {
+ result.hasOptionalForeignEnum = true;
+ } else if(unknown is int) {
+ if (unknownFields == null) {
+ unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+ }
+ unknownFields.MergeVarintField(22, (ulong)(int)unknown);
+ }
+ break;
+ }
+ case 184: {
+ object unknown;
+ if(input.ReadEnum(ref result.optionalImportEnum_, out unknown)) {
+ result.hasOptionalImportEnum = true;
+ } else if(unknown is int) {
+ if (unknownFields == null) {
+ unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+ }
+ unknownFields.MergeVarintField(23, (ulong)(int)unknown);
+ }
+ break;
+ }
+ case 194: {
+ result.hasOptionalStringPiece = input.ReadString(ref result.optionalStringPiece_);
+ break;
+ }
+ case 202: {
+ result.hasOptionalCord = input.ReadString(ref result.optionalCord_);
+ break;
+ }
+ case 210: {
+ global::Google.ProtocolBuffers.TestProtos.PublicImportMessage.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.PublicImportMessage.CreateBuilder();
+ if (result.hasOptionalPublicImportMessage) {
+ subBuilder.MergeFrom(OptionalPublicImportMessage);
+ }
+ input.ReadMessage(subBuilder, extensionRegistry);
+ OptionalPublicImportMessage = subBuilder.BuildPartial();
+ break;
+ }
+ case 218: {
+ global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage.CreateBuilder();
+ if (result.hasOptionalLazyMessage) {
+ subBuilder.MergeFrom(OptionalLazyMessage);
+ }
+ input.ReadMessage(subBuilder, extensionRegistry);
+ OptionalLazyMessage = subBuilder.BuildPartial();
+ break;
+ }
+ case 250:
+ case 248: {
+ input.ReadInt32Array(tag, field_name, result.repeatedInt32_);
+ break;
+ }
+ case 258:
+ case 256: {
+ input.ReadInt64Array(tag, field_name, result.repeatedInt64_);
+ break;
+ }
+ case 266:
+ case 264: {
+ input.ReadUInt32Array(tag, field_name, result.repeatedUint32_);
+ break;
+ }
+ case 274:
+ case 272: {
+ input.ReadUInt64Array(tag, field_name, result.repeatedUint64_);
+ break;
+ }
+ case 282:
+ case 280: {
+ input.ReadSInt32Array(tag, field_name, result.repeatedSint32_);
+ break;
+ }
+ case 290:
+ case 288: {
+ input.ReadSInt64Array(tag, field_name, result.repeatedSint64_);
+ break;
+ }
+ case 298:
+ case 301: {
+ input.ReadFixed32Array(tag, field_name, result.repeatedFixed32_);
+ break;
+ }
+ case 306:
+ case 305: {
+ input.ReadFixed64Array(tag, field_name, result.repeatedFixed64_);
+ break;
+ }
+ case 314:
+ case 317: {
+ input.ReadSFixed32Array(tag, field_name, result.repeatedSfixed32_);
+ break;
+ }
+ case 322:
+ case 321: {
+ input.ReadSFixed64Array(tag, field_name, result.repeatedSfixed64_);
+ break;
+ }
+ case 330:
+ case 333: {
+ input.ReadFloatArray(tag, field_name, result.repeatedFloat_);
+ break;
+ }
+ case 338:
+ case 337: {
+ input.ReadDoubleArray(tag, field_name, result.repeatedDouble_);
+ break;
+ }
+ case 346:
+ case 344: {
+ input.ReadBoolArray(tag, field_name, result.repeatedBool_);
+ break;
+ }
+ case 354: {
+ input.ReadStringArray(tag, field_name, result.repeatedString_);
+ break;
+ }
+ case 362: {
+ input.ReadBytesArray(tag, field_name, result.repeatedBytes_);
+ break;
+ }
+ case 371: {
+ input.ReadGroupArray(tag, field_name, result.repeatedGroup_, global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.RepeatedGroup.DefaultInstance, extensionRegistry);
+ break;
+ }
+ case 386: {
+ input.ReadMessageArray(tag, field_name, result.repeatedNestedMessage_, global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage.DefaultInstance, extensionRegistry);
+ break;
+ }
+ case 394: {
+ input.ReadMessageArray(tag, field_name, result.repeatedForeignMessage_, global::Google.ProtocolBuffers.TestProtos.ForeignMessage.DefaultInstance, extensionRegistry);
+ break;
+ }
+ case 402: {
+ input.ReadMessageArray(tag, field_name, result.repeatedImportMessage_, global::Google.ProtocolBuffers.TestProtos.ImportMessage.DefaultInstance, extensionRegistry);
+ break;
+ }
+ case 410:
+ case 408: {
+ scg::ICollection<object> unknownItems;
+ input.ReadEnumArray<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedEnum>(tag, field_name, result.repeatedNestedEnum_, out unknownItems);
+ if (unknownItems != null) {
+ if (unknownFields == null) {
+ unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+ }
+ foreach (object rawValue in unknownItems)
+ if (rawValue is int)
+ unknownFields.MergeVarintField(51, (ulong)(int)rawValue);
+ }
+ break;
+ }
+ case 418:
+ case 416: {
+ scg::ICollection<object> unknownItems;
+ input.ReadEnumArray<global::Google.ProtocolBuffers.TestProtos.ForeignEnum>(tag, field_name, result.repeatedForeignEnum_, out unknownItems);
+ if (unknownItems != null) {
+ if (unknownFields == null) {
+ unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+ }
+ foreach (object rawValue in unknownItems)
+ if (rawValue is int)
+ unknownFields.MergeVarintField(52, (ulong)(int)rawValue);
+ }
+ break;
+ }
+ case 426:
+ case 424: {
+ scg::ICollection<object> unknownItems;
+ input.ReadEnumArray<global::Google.ProtocolBuffers.TestProtos.ImportEnum>(tag, field_name, result.repeatedImportEnum_, out unknownItems);
+ if (unknownItems != null) {
+ if (unknownFields == null) {
+ unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+ }
+ foreach (object rawValue in unknownItems)
+ if (rawValue is int)
+ unknownFields.MergeVarintField(53, (ulong)(int)rawValue);
+ }
+ break;
+ }
+ case 434: {
+ input.ReadStringArray(tag, field_name, result.repeatedStringPiece_);
+ break;
+ }
+ case 442: {
+ input.ReadStringArray(tag, field_name, result.repeatedCord_);
+ break;
+ }
+ case 458: {
+ input.ReadMessageArray(tag, field_name, result.repeatedLazyMessage_, global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage.DefaultInstance, extensionRegistry);
+ break;
+ }
+ case 488: {
+ result.hasDefaultInt32 = input.ReadInt32(ref result.defaultInt32_);
+ break;
+ }
+ case 496: {
+ result.hasDefaultInt64 = input.ReadInt64(ref result.defaultInt64_);
+ break;
+ }
+ case 504: {
+ result.hasDefaultUint32 = input.ReadUInt32(ref result.defaultUint32_);
+ break;
+ }
+ case 512: {
+ result.hasDefaultUint64 = input.ReadUInt64(ref result.defaultUint64_);
+ break;
+ }
+ case 520: {
+ result.hasDefaultSint32 = input.ReadSInt32(ref result.defaultSint32_);
+ break;
+ }
+ case 528: {
+ result.hasDefaultSint64 = input.ReadSInt64(ref result.defaultSint64_);
+ break;
+ }
+ case 541: {
+ result.hasDefaultFixed32 = input.ReadFixed32(ref result.defaultFixed32_);
+ break;
+ }
+ case 545: {
+ result.hasDefaultFixed64 = input.ReadFixed64(ref result.defaultFixed64_);
+ break;
+ }
+ case 557: {
+ result.hasDefaultSfixed32 = input.ReadSFixed32(ref result.defaultSfixed32_);
+ break;
+ }
+ case 561: {
+ result.hasDefaultSfixed64 = input.ReadSFixed64(ref result.defaultSfixed64_);
+ break;
+ }
+ case 573: {
+ result.hasDefaultFloat = input.ReadFloat(ref result.defaultFloat_);
+ break;
+ }
+ case 577: {
+ result.hasDefaultDouble = input.ReadDouble(ref result.defaultDouble_);
+ break;
+ }
+ case 584: {
+ result.hasDefaultBool = input.ReadBool(ref result.defaultBool_);
+ break;
+ }
+ case 594: {
+ result.hasDefaultString = input.ReadString(ref result.defaultString_);
+ break;
+ }
+ case 602: {
+ result.hasDefaultBytes = input.ReadBytes(ref result.defaultBytes_);
+ break;
+ }
+ case 648: {
+ object unknown;
+ if(input.ReadEnum(ref result.defaultNestedEnum_, out unknown)) {
+ result.hasDefaultNestedEnum = true;
+ } else if(unknown is int) {
+ if (unknownFields == null) {
+ unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+ }
+ unknownFields.MergeVarintField(81, (ulong)(int)unknown);
+ }
+ break;
+ }
+ case 656: {
+ object unknown;
+ if(input.ReadEnum(ref result.defaultForeignEnum_, out unknown)) {
+ result.hasDefaultForeignEnum = true;
+ } else if(unknown is int) {
+ if (unknownFields == null) {
+ unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+ }
+ unknownFields.MergeVarintField(82, (ulong)(int)unknown);
+ }
+ break;
+ }
+ case 664: {
+ object unknown;
+ if(input.ReadEnum(ref result.defaultImportEnum_, out unknown)) {
+ result.hasDefaultImportEnum = true;
+ } else if(unknown is int) {
+ if (unknownFields == null) {
+ unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+ }
+ unknownFields.MergeVarintField(83, (ulong)(int)unknown);
+ }
+ break;
+ }
+ case 674: {
+ result.hasDefaultStringPiece = input.ReadString(ref result.defaultStringPiece_);
+ break;
+ }
+ case 682: {
+ result.hasDefaultCord = input.ReadString(ref result.defaultCord_);
+ break;
+ }
+ case 888: {
+ result.hasOneofUint32 = input.ReadUInt32(ref result.oneofUint32_);
+ break;
+ }
+ case 898: {
+ global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage.CreateBuilder();
+ if (result.hasOneofNestedMessage) {
+ subBuilder.MergeFrom(OneofNestedMessage);
+ }
+ input.ReadMessage(subBuilder, extensionRegistry);
+ OneofNestedMessage = subBuilder.BuildPartial();
+ break;
+ }
+ case 906: {
+ result.hasOneofString = input.ReadString(ref result.oneofString_);
+ break;
+ }
+ case 914: {
+ result.hasOneofBytes = input.ReadBytes(ref result.oneofBytes_);
+ break;
+ }
+ }
+ }
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
+ }
+
+
+ public bool HasOptionalInt32 {
+ get { return result.hasOptionalInt32; }
+ }
+ public int OptionalInt32 {
+ get { return result.OptionalInt32; }
+ set { SetOptionalInt32(value); }
+ }
+ public Builder SetOptionalInt32(int value) {
+ PrepareBuilder();
+ result.hasOptionalInt32 = true;
+ result.optionalInt32_ = value;
+ return this;
+ }
+ public Builder ClearOptionalInt32() {
+ PrepareBuilder();
+ result.hasOptionalInt32 = false;
+ result.optionalInt32_ = 0;
+ return this;
+ }
+
+ public bool HasOptionalInt64 {
+ get { return result.hasOptionalInt64; }
+ }
+ public long OptionalInt64 {
+ get { return result.OptionalInt64; }
+ set { SetOptionalInt64(value); }
+ }
+ public Builder SetOptionalInt64(long value) {
+ PrepareBuilder();
+ result.hasOptionalInt64 = true;
+ result.optionalInt64_ = value;
+ return this;
+ }
+ public Builder ClearOptionalInt64() {
+ PrepareBuilder();
+ result.hasOptionalInt64 = false;
+ result.optionalInt64_ = 0L;
+ return this;
+ }
+
+ public bool HasOptionalUint32 {
+ get { return result.hasOptionalUint32; }
+ }
+ [global::System.CLSCompliant(false)]
+ public uint OptionalUint32 {
+ get { return result.OptionalUint32; }
+ set { SetOptionalUint32(value); }
+ }
+ [global::System.CLSCompliant(false)]
+ public Builder SetOptionalUint32(uint value) {
+ PrepareBuilder();
+ result.hasOptionalUint32 = true;
+ result.optionalUint32_ = value;
+ return this;
+ }
+ public Builder ClearOptionalUint32() {
+ PrepareBuilder();
+ result.hasOptionalUint32 = false;
+ result.optionalUint32_ = 0;
+ return this;
+ }
+
+ public bool HasOptionalUint64 {
+ get { return result.hasOptionalUint64; }
+ }
+ [global::System.CLSCompliant(false)]
+ public ulong OptionalUint64 {
+ get { return result.OptionalUint64; }
+ set { SetOptionalUint64(value); }
+ }
+ [global::System.CLSCompliant(false)]
+ public Builder SetOptionalUint64(ulong value) {
+ PrepareBuilder();
+ result.hasOptionalUint64 = true;
+ result.optionalUint64_ = value;
+ return this;
+ }
+ public Builder ClearOptionalUint64() {
+ PrepareBuilder();
+ result.hasOptionalUint64 = false;
+ result.optionalUint64_ = 0UL;
+ return this;
+ }
+
+ public bool HasOptionalSint32 {
+ get { return result.hasOptionalSint32; }
+ }
+ public int OptionalSint32 {
+ get { return result.OptionalSint32; }
+ set { SetOptionalSint32(value); }
+ }
+ public Builder SetOptionalSint32(int value) {
+ PrepareBuilder();
+ result.hasOptionalSint32 = true;
+ result.optionalSint32_ = value;
+ return this;
+ }
+ public Builder ClearOptionalSint32() {
+ PrepareBuilder();
+ result.hasOptionalSint32 = false;
+ result.optionalSint32_ = 0;
+ return this;
+ }
+
+ public bool HasOptionalSint64 {
+ get { return result.hasOptionalSint64; }
+ }
+ public long OptionalSint64 {
+ get { return result.OptionalSint64; }
+ set { SetOptionalSint64(value); }
+ }
+ public Builder SetOptionalSint64(long value) {
+ PrepareBuilder();
+ result.hasOptionalSint64 = true;
+ result.optionalSint64_ = value;
+ return this;
+ }
+ public Builder ClearOptionalSint64() {
+ PrepareBuilder();
+ result.hasOptionalSint64 = false;
+ result.optionalSint64_ = 0L;
+ return this;
+ }
+
+ public bool HasOptionalFixed32 {
+ get { return result.hasOptionalFixed32; }
+ }
+ [global::System.CLSCompliant(false)]
+ public uint OptionalFixed32 {
+ get { return result.OptionalFixed32; }
+ set { SetOptionalFixed32(value); }
+ }
+ [global::System.CLSCompliant(false)]
+ public Builder SetOptionalFixed32(uint value) {
+ PrepareBuilder();
+ result.hasOptionalFixed32 = true;
+ result.optionalFixed32_ = value;
+ return this;
+ }
+ public Builder ClearOptionalFixed32() {
+ PrepareBuilder();
+ result.hasOptionalFixed32 = false;
+ result.optionalFixed32_ = 0;
+ return this;
+ }
+
+ public bool HasOptionalFixed64 {
+ get { return result.hasOptionalFixed64; }
+ }
+ [global::System.CLSCompliant(false)]
+ public ulong OptionalFixed64 {
+ get { return result.OptionalFixed64; }
+ set { SetOptionalFixed64(value); }
+ }
+ [global::System.CLSCompliant(false)]
+ public Builder SetOptionalFixed64(ulong value) {
+ PrepareBuilder();
+ result.hasOptionalFixed64 = true;
+ result.optionalFixed64_ = value;
+ return this;
+ }
+ public Builder ClearOptionalFixed64() {
+ PrepareBuilder();
+ result.hasOptionalFixed64 = false;
+ result.optionalFixed64_ = 0UL;
+ return this;
+ }
+
+ public bool HasOptionalSfixed32 {
+ get { return result.hasOptionalSfixed32; }
+ }
+ public int OptionalSfixed32 {
+ get { return result.OptionalSfixed32; }
+ set { SetOptionalSfixed32(value); }
+ }
+ public Builder SetOptionalSfixed32(int value) {
+ PrepareBuilder();
+ result.hasOptionalSfixed32 = true;
+ result.optionalSfixed32_ = value;
+ return this;
+ }
+ public Builder ClearOptionalSfixed32() {
+ PrepareBuilder();
+ result.hasOptionalSfixed32 = false;
+ result.optionalSfixed32_ = 0;
+ return this;
+ }
+
+ public bool HasOptionalSfixed64 {
+ get { return result.hasOptionalSfixed64; }
+ }
+ public long OptionalSfixed64 {
+ get { return result.OptionalSfixed64; }
+ set { SetOptionalSfixed64(value); }
+ }
+ public Builder SetOptionalSfixed64(long value) {
+ PrepareBuilder();
+ result.hasOptionalSfixed64 = true;
+ result.optionalSfixed64_ = value;
+ return this;
+ }
+ public Builder ClearOptionalSfixed64() {
+ PrepareBuilder();
+ result.hasOptionalSfixed64 = false;
+ result.optionalSfixed64_ = 0L;
+ return this;
+ }
+
+ public bool HasOptionalFloat {
+ get { return result.hasOptionalFloat; }
+ }
+ public float OptionalFloat {
+ get { return result.OptionalFloat; }
+ set { SetOptionalFloat(value); }
+ }
+ public Builder SetOptionalFloat(float value) {
+ PrepareBuilder();
+ result.hasOptionalFloat = true;
+ result.optionalFloat_ = value;
+ return this;
+ }
+ public Builder ClearOptionalFloat() {
+ PrepareBuilder();
+ result.hasOptionalFloat = false;
+ result.optionalFloat_ = 0F;
+ return this;
+ }
+
+ public bool HasOptionalDouble {
+ get { return result.hasOptionalDouble; }
+ }
+ public double OptionalDouble {
+ get { return result.OptionalDouble; }
+ set { SetOptionalDouble(value); }
+ }
+ public Builder SetOptionalDouble(double value) {
+ PrepareBuilder();
+ result.hasOptionalDouble = true;
+ result.optionalDouble_ = value;
+ return this;
+ }
+ public Builder ClearOptionalDouble() {
+ PrepareBuilder();
+ result.hasOptionalDouble = false;
+ result.optionalDouble_ = 0D;
+ return this;
+ }
+
+ public bool HasOptionalBool {
+ get { return result.hasOptionalBool; }
+ }
+ public bool OptionalBool {
+ get { return result.OptionalBool; }
+ set { SetOptionalBool(value); }
+ }
+ public Builder SetOptionalBool(bool value) {
+ PrepareBuilder();
+ result.hasOptionalBool = true;
+ result.optionalBool_ = value;
+ return this;
+ }
+ public Builder ClearOptionalBool() {
+ PrepareBuilder();
+ result.hasOptionalBool = false;
+ result.optionalBool_ = false;
+ return this;
+ }
+
+ public bool HasOptionalString {
+ get { return result.hasOptionalString; }
+ }
+ public string OptionalString {
+ get { return result.OptionalString; }
+ set { SetOptionalString(value); }
+ }
+ public Builder SetOptionalString(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasOptionalString = true;
+ result.optionalString_ = value;
+ return this;
+ }
+ public Builder ClearOptionalString() {
+ PrepareBuilder();
+ result.hasOptionalString = false;
+ result.optionalString_ = "";
+ return this;
+ }
+
+ public bool HasOptionalBytes {
+ get { return result.hasOptionalBytes; }
+ }
+ public pb::ByteString OptionalBytes {
+ get { return result.OptionalBytes; }
+ set { SetOptionalBytes(value); }
+ }
+ public Builder SetOptionalBytes(pb::ByteString value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasOptionalBytes = true;
+ result.optionalBytes_ = value;
+ return this;
+ }
+ public Builder ClearOptionalBytes() {
+ PrepareBuilder();
+ result.hasOptionalBytes = false;
+ result.optionalBytes_ = pb::ByteString.Empty;
+ return this;
+ }
+
+ public bool HasOptionalGroup {
+ get { return result.hasOptionalGroup; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.OptionalGroup OptionalGroup {
+ get { return result.OptionalGroup; }
+ set { SetOptionalGroup(value); }
+ }
+ public Builder SetOptionalGroup(global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.OptionalGroup value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasOptionalGroup = true;
+ result.optionalGroup_ = value;
+ return this;
+ }
+ public Builder SetOptionalGroup(global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.OptionalGroup.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.hasOptionalGroup = true;
+ result.optionalGroup_ = builderForValue.Build();
+ return this;
+ }
+ public Builder MergeOptionalGroup(global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.OptionalGroup value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ if (result.hasOptionalGroup &&
+ result.optionalGroup_ != global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.OptionalGroup.DefaultInstance) {
+ result.optionalGroup_ = global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.OptionalGroup.CreateBuilder(result.optionalGroup_).MergeFrom(value).BuildPartial();
+ } else {
+ result.optionalGroup_ = value;
+ }
+ result.hasOptionalGroup = true;
+ return this;
+ }
+ public Builder ClearOptionalGroup() {
+ PrepareBuilder();
+ result.hasOptionalGroup = false;
+ result.optionalGroup_ = null;
+ return this;
+ }
+
+ public bool HasOptionalNestedMessage {
+ get { return result.hasOptionalNestedMessage; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage OptionalNestedMessage {
+ get { return result.OptionalNestedMessage; }
+ set { SetOptionalNestedMessage(value); }
+ }
+ public Builder SetOptionalNestedMessage(global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasOptionalNestedMessage = true;
+ result.optionalNestedMessage_ = value;
+ return this;
+ }
+ public Builder SetOptionalNestedMessage(global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.hasOptionalNestedMessage = true;
+ result.optionalNestedMessage_ = builderForValue.Build();
+ return this;
+ }
+ public Builder MergeOptionalNestedMessage(global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ if (result.hasOptionalNestedMessage &&
+ result.optionalNestedMessage_ != global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage.DefaultInstance) {
+ result.optionalNestedMessage_ = global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage.CreateBuilder(result.optionalNestedMessage_).MergeFrom(value).BuildPartial();
+ } else {
+ result.optionalNestedMessage_ = value;
+ }
+ result.hasOptionalNestedMessage = true;
+ return this;
+ }
+ public Builder ClearOptionalNestedMessage() {
+ PrepareBuilder();
+ result.hasOptionalNestedMessage = false;
+ result.optionalNestedMessage_ = null;
+ return this;
+ }
+
+ public bool HasOptionalForeignMessage {
+ get { return result.hasOptionalForeignMessage; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.ForeignMessage OptionalForeignMessage {
+ get { return result.OptionalForeignMessage; }
+ set { SetOptionalForeignMessage(value); }
+ }
+ public Builder SetOptionalForeignMessage(global::Google.ProtocolBuffers.TestProtos.ForeignMessage value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasOptionalForeignMessage = true;
+ result.optionalForeignMessage_ = value;
+ return this;
+ }
+ public Builder SetOptionalForeignMessage(global::Google.ProtocolBuffers.TestProtos.ForeignMessage.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.hasOptionalForeignMessage = true;
+ result.optionalForeignMessage_ = builderForValue.Build();
+ return this;
+ }
+ public Builder MergeOptionalForeignMessage(global::Google.ProtocolBuffers.TestProtos.ForeignMessage value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ if (result.hasOptionalForeignMessage &&
+ result.optionalForeignMessage_ != global::Google.ProtocolBuffers.TestProtos.ForeignMessage.DefaultInstance) {
+ result.optionalForeignMessage_ = global::Google.ProtocolBuffers.TestProtos.ForeignMessage.CreateBuilder(result.optionalForeignMessage_).MergeFrom(value).BuildPartial();
+ } else {
+ result.optionalForeignMessage_ = value;
+ }
+ result.hasOptionalForeignMessage = true;
+ return this;
+ }
+ public Builder ClearOptionalForeignMessage() {
+ PrepareBuilder();
+ result.hasOptionalForeignMessage = false;
+ result.optionalForeignMessage_ = null;
+ return this;
+ }
+
+ public bool HasOptionalImportMessage {
+ get { return result.hasOptionalImportMessage; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.ImportMessage OptionalImportMessage {
+ get { return result.OptionalImportMessage; }
+ set { SetOptionalImportMessage(value); }
+ }
+ public Builder SetOptionalImportMessage(global::Google.ProtocolBuffers.TestProtos.ImportMessage value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasOptionalImportMessage = true;
+ result.optionalImportMessage_ = value;
+ return this;
+ }
+ public Builder SetOptionalImportMessage(global::Google.ProtocolBuffers.TestProtos.ImportMessage.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.hasOptionalImportMessage = true;
+ result.optionalImportMessage_ = builderForValue.Build();
+ return this;
+ }
+ public Builder MergeOptionalImportMessage(global::Google.ProtocolBuffers.TestProtos.ImportMessage value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ if (result.hasOptionalImportMessage &&
+ result.optionalImportMessage_ != global::Google.ProtocolBuffers.TestProtos.ImportMessage.DefaultInstance) {
+ result.optionalImportMessage_ = global::Google.ProtocolBuffers.TestProtos.ImportMessage.CreateBuilder(result.optionalImportMessage_).MergeFrom(value).BuildPartial();
+ } else {
+ result.optionalImportMessage_ = value;
+ }
+ result.hasOptionalImportMessage = true;
+ return this;
+ }
+ public Builder ClearOptionalImportMessage() {
+ PrepareBuilder();
+ result.hasOptionalImportMessage = false;
+ result.optionalImportMessage_ = null;
+ return this;
+ }
+
+ public bool HasOptionalNestedEnum {
+ get { return result.hasOptionalNestedEnum; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedEnum OptionalNestedEnum {
+ get { return result.OptionalNestedEnum; }
+ set { SetOptionalNestedEnum(value); }
+ }
+ public Builder SetOptionalNestedEnum(global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedEnum value) {
+ PrepareBuilder();
+ result.hasOptionalNestedEnum = true;
+ result.optionalNestedEnum_ = value;
+ return this;
+ }
+ public Builder ClearOptionalNestedEnum() {
+ PrepareBuilder();
+ result.hasOptionalNestedEnum = false;
+ result.optionalNestedEnum_ = global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedEnum.FOO;
+ return this;
+ }
+
+ public bool HasOptionalForeignEnum {
+ get { return result.hasOptionalForeignEnum; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.ForeignEnum OptionalForeignEnum {
+ get { return result.OptionalForeignEnum; }
+ set { SetOptionalForeignEnum(value); }
+ }
+ public Builder SetOptionalForeignEnum(global::Google.ProtocolBuffers.TestProtos.ForeignEnum value) {
+ PrepareBuilder();
+ result.hasOptionalForeignEnum = true;
+ result.optionalForeignEnum_ = value;
+ return this;
+ }
+ public Builder ClearOptionalForeignEnum() {
+ PrepareBuilder();
+ result.hasOptionalForeignEnum = false;
+ result.optionalForeignEnum_ = global::Google.ProtocolBuffers.TestProtos.ForeignEnum.FOREIGN_FOO;
+ return this;
+ }
+
+ public bool HasOptionalImportEnum {
+ get { return result.hasOptionalImportEnum; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.ImportEnum OptionalImportEnum {
+ get { return result.OptionalImportEnum; }
+ set { SetOptionalImportEnum(value); }
+ }
+ public Builder SetOptionalImportEnum(global::Google.ProtocolBuffers.TestProtos.ImportEnum value) {
+ PrepareBuilder();
+ result.hasOptionalImportEnum = true;
+ result.optionalImportEnum_ = value;
+ return this;
+ }
+ public Builder ClearOptionalImportEnum() {
+ PrepareBuilder();
+ result.hasOptionalImportEnum = false;
+ result.optionalImportEnum_ = global::Google.ProtocolBuffers.TestProtos.ImportEnum.IMPORT_FOO;
+ return this;
+ }
+
+ public bool HasOptionalStringPiece {
+ get { return result.hasOptionalStringPiece; }
+ }
+ public string OptionalStringPiece {
+ get { return result.OptionalStringPiece; }
+ set { SetOptionalStringPiece(value); }
+ }
+ public Builder SetOptionalStringPiece(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasOptionalStringPiece = true;
+ result.optionalStringPiece_ = value;
+ return this;
+ }
+ public Builder ClearOptionalStringPiece() {
+ PrepareBuilder();
+ result.hasOptionalStringPiece = false;
+ result.optionalStringPiece_ = "";
+ return this;
+ }
+
+ public bool HasOptionalCord {
+ get { return result.hasOptionalCord; }
+ }
+ public string OptionalCord {
+ get { return result.OptionalCord; }
+ set { SetOptionalCord(value); }
+ }
+ public Builder SetOptionalCord(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasOptionalCord = true;
+ result.optionalCord_ = value;
+ return this;
+ }
+ public Builder ClearOptionalCord() {
+ PrepareBuilder();
+ result.hasOptionalCord = false;
+ result.optionalCord_ = "";
+ return this;
+ }
+
+ public bool HasOptionalPublicImportMessage {
+ get { return result.hasOptionalPublicImportMessage; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.PublicImportMessage OptionalPublicImportMessage {
+ get { return result.OptionalPublicImportMessage; }
+ set { SetOptionalPublicImportMessage(value); }
+ }
+ public Builder SetOptionalPublicImportMessage(global::Google.ProtocolBuffers.TestProtos.PublicImportMessage value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasOptionalPublicImportMessage = true;
+ result.optionalPublicImportMessage_ = value;
+ return this;
+ }
+ public Builder SetOptionalPublicImportMessage(global::Google.ProtocolBuffers.TestProtos.PublicImportMessage.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.hasOptionalPublicImportMessage = true;
+ result.optionalPublicImportMessage_ = builderForValue.Build();
+ return this;
+ }
+ public Builder MergeOptionalPublicImportMessage(global::Google.ProtocolBuffers.TestProtos.PublicImportMessage value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ if (result.hasOptionalPublicImportMessage &&
+ result.optionalPublicImportMessage_ != global::Google.ProtocolBuffers.TestProtos.PublicImportMessage.DefaultInstance) {
+ result.optionalPublicImportMessage_ = global::Google.ProtocolBuffers.TestProtos.PublicImportMessage.CreateBuilder(result.optionalPublicImportMessage_).MergeFrom(value).BuildPartial();
+ } else {
+ result.optionalPublicImportMessage_ = value;
+ }
+ result.hasOptionalPublicImportMessage = true;
+ return this;
+ }
+ public Builder ClearOptionalPublicImportMessage() {
+ PrepareBuilder();
+ result.hasOptionalPublicImportMessage = false;
+ result.optionalPublicImportMessage_ = null;
+ return this;
+ }
+
+ public bool HasOptionalLazyMessage {
+ get { return result.hasOptionalLazyMessage; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage OptionalLazyMessage {
+ get { return result.OptionalLazyMessage; }
+ set { SetOptionalLazyMessage(value); }
+ }
+ public Builder SetOptionalLazyMessage(global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasOptionalLazyMessage = true;
+ result.optionalLazyMessage_ = value;
+ return this;
+ }
+ public Builder SetOptionalLazyMessage(global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.hasOptionalLazyMessage = true;
+ result.optionalLazyMessage_ = builderForValue.Build();
+ return this;
+ }
+ public Builder MergeOptionalLazyMessage(global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ if (result.hasOptionalLazyMessage &&
+ result.optionalLazyMessage_ != global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage.DefaultInstance) {
+ result.optionalLazyMessage_ = global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage.CreateBuilder(result.optionalLazyMessage_).MergeFrom(value).BuildPartial();
+ } else {
+ result.optionalLazyMessage_ = value;
+ }
+ result.hasOptionalLazyMessage = true;
+ return this;
+ }
+ public Builder ClearOptionalLazyMessage() {
+ PrepareBuilder();
+ result.hasOptionalLazyMessage = false;
+ result.optionalLazyMessage_ = null;
+ return this;
+ }
+
+ public pbc::IPopsicleList<int> RepeatedInt32List {
+ get { return PrepareBuilder().repeatedInt32_; }
+ }
+ public int RepeatedInt32Count {
+ get { return result.RepeatedInt32Count; }
+ }
+ public int GetRepeatedInt32(int index) {
+ return result.GetRepeatedInt32(index);
+ }
+ public Builder SetRepeatedInt32(int index, int value) {
+ PrepareBuilder();
+ result.repeatedInt32_[index] = value;
+ return this;
+ }
+ public Builder AddRepeatedInt32(int value) {
+ PrepareBuilder();
+ result.repeatedInt32_.Add(value);
+ return this;
+ }
+ public Builder AddRangeRepeatedInt32(scg::IEnumerable<int> values) {
+ PrepareBuilder();
+ result.repeatedInt32_.Add(values);
+ return this;
+ }
+ public Builder ClearRepeatedInt32() {
+ PrepareBuilder();
+ result.repeatedInt32_.Clear();
+ return this;
+ }
+
+ public pbc::IPopsicleList<long> RepeatedInt64List {
+ get { return PrepareBuilder().repeatedInt64_; }
+ }
+ public int RepeatedInt64Count {
+ get { return result.RepeatedInt64Count; }
+ }
+ public long GetRepeatedInt64(int index) {
+ return result.GetRepeatedInt64(index);
+ }
+ public Builder SetRepeatedInt64(int index, long value) {
+ PrepareBuilder();
+ result.repeatedInt64_[index] = value;
+ return this;
+ }
+ public Builder AddRepeatedInt64(long value) {
+ PrepareBuilder();
+ result.repeatedInt64_.Add(value);
+ return this;
+ }
+ public Builder AddRangeRepeatedInt64(scg::IEnumerable<long> values) {
+ PrepareBuilder();
+ result.repeatedInt64_.Add(values);
+ return this;
+ }
+ public Builder ClearRepeatedInt64() {
+ PrepareBuilder();
+ result.repeatedInt64_.Clear();
+ return this;
+ }
+
+ [global::System.CLSCompliant(false)]
+ public pbc::IPopsicleList<uint> RepeatedUint32List {
+ get { return PrepareBuilder().repeatedUint32_; }
+ }
+ public int RepeatedUint32Count {
+ get { return result.RepeatedUint32Count; }
+ }
+ [global::System.CLSCompliant(false)]
+ public uint GetRepeatedUint32(int index) {
+ return result.GetRepeatedUint32(index);
+ }
+ [global::System.CLSCompliant(false)]
+ public Builder SetRepeatedUint32(int index, uint value) {
+ PrepareBuilder();
+ result.repeatedUint32_[index] = value;
+ return this;
+ }
+ [global::System.CLSCompliant(false)]
+ public Builder AddRepeatedUint32(uint value) {
+ PrepareBuilder();
+ result.repeatedUint32_.Add(value);
+ return this;
+ }
+ [global::System.CLSCompliant(false)]
+ public Builder AddRangeRepeatedUint32(scg::IEnumerable<uint> values) {
+ PrepareBuilder();
+ result.repeatedUint32_.Add(values);
+ return this;
+ }
+ public Builder ClearRepeatedUint32() {
+ PrepareBuilder();
+ result.repeatedUint32_.Clear();
+ return this;
+ }
+
+ [global::System.CLSCompliant(false)]
+ public pbc::IPopsicleList<ulong> RepeatedUint64List {
+ get { return PrepareBuilder().repeatedUint64_; }
+ }
+ public int RepeatedUint64Count {
+ get { return result.RepeatedUint64Count; }
+ }
+ [global::System.CLSCompliant(false)]
+ public ulong GetRepeatedUint64(int index) {
+ return result.GetRepeatedUint64(index);
+ }
+ [global::System.CLSCompliant(false)]
+ public Builder SetRepeatedUint64(int index, ulong value) {
+ PrepareBuilder();
+ result.repeatedUint64_[index] = value;
+ return this;
+ }
+ [global::System.CLSCompliant(false)]
+ public Builder AddRepeatedUint64(ulong value) {
+ PrepareBuilder();
+ result.repeatedUint64_.Add(value);
+ return this;
+ }
+ [global::System.CLSCompliant(false)]
+ public Builder AddRangeRepeatedUint64(scg::IEnumerable<ulong> values) {
+ PrepareBuilder();
+ result.repeatedUint64_.Add(values);
+ return this;
+ }
+ public Builder ClearRepeatedUint64() {
+ PrepareBuilder();
+ result.repeatedUint64_.Clear();
+ return this;
+ }
+
+ public pbc::IPopsicleList<int> RepeatedSint32List {
+ get { return PrepareBuilder().repeatedSint32_; }
+ }
+ public int RepeatedSint32Count {
+ get { return result.RepeatedSint32Count; }
+ }
+ public int GetRepeatedSint32(int index) {
+ return result.GetRepeatedSint32(index);
+ }
+ public Builder SetRepeatedSint32(int index, int value) {
+ PrepareBuilder();
+ result.repeatedSint32_[index] = value;
+ return this;
+ }
+ public Builder AddRepeatedSint32(int value) {
+ PrepareBuilder();
+ result.repeatedSint32_.Add(value);
+ return this;
+ }
+ public Builder AddRangeRepeatedSint32(scg::IEnumerable<int> values) {
+ PrepareBuilder();
+ result.repeatedSint32_.Add(values);
+ return this;
+ }
+ public Builder ClearRepeatedSint32() {
+ PrepareBuilder();
+ result.repeatedSint32_.Clear();
+ return this;
+ }
+
+ public pbc::IPopsicleList<long> RepeatedSint64List {
+ get { return PrepareBuilder().repeatedSint64_; }
+ }
+ public int RepeatedSint64Count {
+ get { return result.RepeatedSint64Count; }
+ }
+ public long GetRepeatedSint64(int index) {
+ return result.GetRepeatedSint64(index);
+ }
+ public Builder SetRepeatedSint64(int index, long value) {
+ PrepareBuilder();
+ result.repeatedSint64_[index] = value;
+ return this;
+ }
+ public Builder AddRepeatedSint64(long value) {
+ PrepareBuilder();
+ result.repeatedSint64_.Add(value);
+ return this;
+ }
+ public Builder AddRangeRepeatedSint64(scg::IEnumerable<long> values) {
+ PrepareBuilder();
+ result.repeatedSint64_.Add(values);
+ return this;
+ }
+ public Builder ClearRepeatedSint64() {
+ PrepareBuilder();
+ result.repeatedSint64_.Clear();
+ return this;
+ }
+
+ [global::System.CLSCompliant(false)]
+ public pbc::IPopsicleList<uint> RepeatedFixed32List {
+ get { return PrepareBuilder().repeatedFixed32_; }
+ }
+ public int RepeatedFixed32Count {
+ get { return result.RepeatedFixed32Count; }
+ }
+ [global::System.CLSCompliant(false)]
+ public uint GetRepeatedFixed32(int index) {
+ return result.GetRepeatedFixed32(index);
+ }
+ [global::System.CLSCompliant(false)]
+ public Builder SetRepeatedFixed32(int index, uint value) {
+ PrepareBuilder();
+ result.repeatedFixed32_[index] = value;
+ return this;
+ }
+ [global::System.CLSCompliant(false)]
+ public Builder AddRepeatedFixed32(uint value) {
+ PrepareBuilder();
+ result.repeatedFixed32_.Add(value);
+ return this;
+ }
+ [global::System.CLSCompliant(false)]
+ public Builder AddRangeRepeatedFixed32(scg::IEnumerable<uint> values) {
+ PrepareBuilder();
+ result.repeatedFixed32_.Add(values);
+ return this;
+ }
+ public Builder ClearRepeatedFixed32() {
+ PrepareBuilder();
+ result.repeatedFixed32_.Clear();
+ return this;
+ }
+
+ [global::System.CLSCompliant(false)]
+ public pbc::IPopsicleList<ulong> RepeatedFixed64List {
+ get { return PrepareBuilder().repeatedFixed64_; }
+ }
+ public int RepeatedFixed64Count {
+ get { return result.RepeatedFixed64Count; }
+ }
+ [global::System.CLSCompliant(false)]
+ public ulong GetRepeatedFixed64(int index) {
+ return result.GetRepeatedFixed64(index);
+ }
+ [global::System.CLSCompliant(false)]
+ public Builder SetRepeatedFixed64(int index, ulong value) {
+ PrepareBuilder();
+ result.repeatedFixed64_[index] = value;
+ return this;
+ }
+ [global::System.CLSCompliant(false)]
+ public Builder AddRepeatedFixed64(ulong value) {
+ PrepareBuilder();
+ result.repeatedFixed64_.Add(value);
+ return this;
+ }
+ [global::System.CLSCompliant(false)]
+ public Builder AddRangeRepeatedFixed64(scg::IEnumerable<ulong> values) {
+ PrepareBuilder();
+ result.repeatedFixed64_.Add(values);
+ return this;
+ }
+ public Builder ClearRepeatedFixed64() {
+ PrepareBuilder();
+ result.repeatedFixed64_.Clear();
+ return this;
+ }
+
+ public pbc::IPopsicleList<int> RepeatedSfixed32List {
+ get { return PrepareBuilder().repeatedSfixed32_; }
+ }
+ public int RepeatedSfixed32Count {
+ get { return result.RepeatedSfixed32Count; }
+ }
+ public int GetRepeatedSfixed32(int index) {
+ return result.GetRepeatedSfixed32(index);
+ }
+ public Builder SetRepeatedSfixed32(int index, int value) {
+ PrepareBuilder();
+ result.repeatedSfixed32_[index] = value;
+ return this;
+ }
+ public Builder AddRepeatedSfixed32(int value) {
+ PrepareBuilder();
+ result.repeatedSfixed32_.Add(value);
+ return this;
+ }
+ public Builder AddRangeRepeatedSfixed32(scg::IEnumerable<int> values) {
+ PrepareBuilder();
+ result.repeatedSfixed32_.Add(values);
+ return this;
+ }
+ public Builder ClearRepeatedSfixed32() {
+ PrepareBuilder();
+ result.repeatedSfixed32_.Clear();
+ return this;
+ }
+
+ public pbc::IPopsicleList<long> RepeatedSfixed64List {
+ get { return PrepareBuilder().repeatedSfixed64_; }
+ }
+ public int RepeatedSfixed64Count {
+ get { return result.RepeatedSfixed64Count; }
+ }
+ public long GetRepeatedSfixed64(int index) {
+ return result.GetRepeatedSfixed64(index);
+ }
+ public Builder SetRepeatedSfixed64(int index, long value) {
+ PrepareBuilder();
+ result.repeatedSfixed64_[index] = value;
+ return this;
+ }
+ public Builder AddRepeatedSfixed64(long value) {
+ PrepareBuilder();
+ result.repeatedSfixed64_.Add(value);
+ return this;
+ }
+ public Builder AddRangeRepeatedSfixed64(scg::IEnumerable<long> values) {
+ PrepareBuilder();
+ result.repeatedSfixed64_.Add(values);
+ return this;
+ }
+ public Builder ClearRepeatedSfixed64() {
+ PrepareBuilder();
+ result.repeatedSfixed64_.Clear();
+ return this;
+ }
+
+ public pbc::IPopsicleList<float> RepeatedFloatList {
+ get { return PrepareBuilder().repeatedFloat_; }
+ }
+ public int RepeatedFloatCount {
+ get { return result.RepeatedFloatCount; }
+ }
+ public float GetRepeatedFloat(int index) {
+ return result.GetRepeatedFloat(index);
+ }
+ public Builder SetRepeatedFloat(int index, float value) {
+ PrepareBuilder();
+ result.repeatedFloat_[index] = value;
+ return this;
+ }
+ public Builder AddRepeatedFloat(float value) {
+ PrepareBuilder();
+ result.repeatedFloat_.Add(value);
+ return this;
+ }
+ public Builder AddRangeRepeatedFloat(scg::IEnumerable<float> values) {
+ PrepareBuilder();
+ result.repeatedFloat_.Add(values);
+ return this;
+ }
+ public Builder ClearRepeatedFloat() {
+ PrepareBuilder();
+ result.repeatedFloat_.Clear();
+ return this;
+ }
+
+ public pbc::IPopsicleList<double> RepeatedDoubleList {
+ get { return PrepareBuilder().repeatedDouble_; }
+ }
+ public int RepeatedDoubleCount {
+ get { return result.RepeatedDoubleCount; }
+ }
+ public double GetRepeatedDouble(int index) {
+ return result.GetRepeatedDouble(index);
+ }
+ public Builder SetRepeatedDouble(int index, double value) {
+ PrepareBuilder();
+ result.repeatedDouble_[index] = value;
+ return this;
+ }
+ public Builder AddRepeatedDouble(double value) {
+ PrepareBuilder();
+ result.repeatedDouble_.Add(value);
+ return this;
+ }
+ public Builder AddRangeRepeatedDouble(scg::IEnumerable<double> values) {
+ PrepareBuilder();
+ result.repeatedDouble_.Add(values);
+ return this;
+ }
+ public Builder ClearRepeatedDouble() {
+ PrepareBuilder();
+ result.repeatedDouble_.Clear();
+ return this;
+ }
+
+ public pbc::IPopsicleList<bool> RepeatedBoolList {
+ get { return PrepareBuilder().repeatedBool_; }
+ }
+ public int RepeatedBoolCount {
+ get { return result.RepeatedBoolCount; }
+ }
+ public bool GetRepeatedBool(int index) {
+ return result.GetRepeatedBool(index);
+ }
+ public Builder SetRepeatedBool(int index, bool value) {
+ PrepareBuilder();
+ result.repeatedBool_[index] = value;
+ return this;
+ }
+ public Builder AddRepeatedBool(bool value) {
+ PrepareBuilder();
+ result.repeatedBool_.Add(value);
+ return this;
+ }
+ public Builder AddRangeRepeatedBool(scg::IEnumerable<bool> values) {
+ PrepareBuilder();
+ result.repeatedBool_.Add(values);
+ return this;
+ }
+ public Builder ClearRepeatedBool() {
+ PrepareBuilder();
+ result.repeatedBool_.Clear();
+ return this;
+ }
+
+ public pbc::IPopsicleList<string> RepeatedStringList {
+ get { return PrepareBuilder().repeatedString_; }
+ }
+ public int RepeatedStringCount {
+ get { return result.RepeatedStringCount; }
+ }
+ public string GetRepeatedString(int index) {
+ return result.GetRepeatedString(index);
+ }
+ public Builder SetRepeatedString(int index, string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.repeatedString_[index] = value;
+ return this;
+ }
+ public Builder AddRepeatedString(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.repeatedString_.Add(value);
+ return this;
+ }
+ public Builder AddRangeRepeatedString(scg::IEnumerable<string> values) {
+ PrepareBuilder();
+ result.repeatedString_.Add(values);
+ return this;
+ }
+ public Builder ClearRepeatedString() {
+ PrepareBuilder();
+ result.repeatedString_.Clear();
+ return this;
+ }
+
+ public pbc::IPopsicleList<pb::ByteString> RepeatedBytesList {
+ get { return PrepareBuilder().repeatedBytes_; }
+ }
+ public int RepeatedBytesCount {
+ get { return result.RepeatedBytesCount; }
+ }
+ public pb::ByteString GetRepeatedBytes(int index) {
+ return result.GetRepeatedBytes(index);
+ }
+ public Builder SetRepeatedBytes(int index, pb::ByteString value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.repeatedBytes_[index] = value;
+ return this;
+ }
+ public Builder AddRepeatedBytes(pb::ByteString value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.repeatedBytes_.Add(value);
+ return this;
+ }
+ public Builder AddRangeRepeatedBytes(scg::IEnumerable<pb::ByteString> values) {
+ PrepareBuilder();
+ result.repeatedBytes_.Add(values);
+ return this;
+ }
+ public Builder ClearRepeatedBytes() {
+ PrepareBuilder();
+ result.repeatedBytes_.Clear();
+ return this;
+ }
+
+ public pbc::IPopsicleList<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.RepeatedGroup> RepeatedGroupList {
+ get { return PrepareBuilder().repeatedGroup_; }
+ }
+ public int RepeatedGroupCount {
+ get { return result.RepeatedGroupCount; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.RepeatedGroup GetRepeatedGroup(int index) {
+ return result.GetRepeatedGroup(index);
+ }
+ public Builder SetRepeatedGroup(int index, global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.RepeatedGroup value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.repeatedGroup_[index] = value;
+ return this;
+ }
+ public Builder SetRepeatedGroup(int index, global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.RepeatedGroup.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.repeatedGroup_[index] = builderForValue.Build();
+ return this;
+ }
+ public Builder AddRepeatedGroup(global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.RepeatedGroup value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.repeatedGroup_.Add(value);
+ return this;
+ }
+ public Builder AddRepeatedGroup(global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.RepeatedGroup.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.repeatedGroup_.Add(builderForValue.Build());
+ return this;
+ }
+ public Builder AddRangeRepeatedGroup(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.RepeatedGroup> values) {
+ PrepareBuilder();
+ result.repeatedGroup_.Add(values);
+ return this;
+ }
+ public Builder ClearRepeatedGroup() {
+ PrepareBuilder();
+ result.repeatedGroup_.Clear();
+ return this;
+ }
+
+ public pbc::IPopsicleList<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage> RepeatedNestedMessageList {
+ get { return PrepareBuilder().repeatedNestedMessage_; }
+ }
+ public int RepeatedNestedMessageCount {
+ get { return result.RepeatedNestedMessageCount; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage GetRepeatedNestedMessage(int index) {
+ return result.GetRepeatedNestedMessage(index);
+ }
+ public Builder SetRepeatedNestedMessage(int index, global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.repeatedNestedMessage_[index] = value;
+ return this;
+ }
+ public Builder SetRepeatedNestedMessage(int index, global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.repeatedNestedMessage_[index] = builderForValue.Build();
+ return this;
+ }
+ public Builder AddRepeatedNestedMessage(global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.repeatedNestedMessage_.Add(value);
+ return this;
+ }
+ public Builder AddRepeatedNestedMessage(global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.repeatedNestedMessage_.Add(builderForValue.Build());
+ return this;
+ }
+ public Builder AddRangeRepeatedNestedMessage(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage> values) {
+ PrepareBuilder();
+ result.repeatedNestedMessage_.Add(values);
+ return this;
+ }
+ public Builder ClearRepeatedNestedMessage() {
+ PrepareBuilder();
+ result.repeatedNestedMessage_.Clear();
+ return this;
+ }
+
+ public pbc::IPopsicleList<global::Google.ProtocolBuffers.TestProtos.ForeignMessage> RepeatedForeignMessageList {
+ get { return PrepareBuilder().repeatedForeignMessage_; }
+ }
+ public int RepeatedForeignMessageCount {
+ get { return result.RepeatedForeignMessageCount; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.ForeignMessage GetRepeatedForeignMessage(int index) {
+ return result.GetRepeatedForeignMessage(index);
+ }
+ public Builder SetRepeatedForeignMessage(int index, global::Google.ProtocolBuffers.TestProtos.ForeignMessage value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.repeatedForeignMessage_[index] = value;
+ return this;
+ }
+ public Builder SetRepeatedForeignMessage(int index, global::Google.ProtocolBuffers.TestProtos.ForeignMessage.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.repeatedForeignMessage_[index] = builderForValue.Build();
+ return this;
+ }
+ public Builder AddRepeatedForeignMessage(global::Google.ProtocolBuffers.TestProtos.ForeignMessage value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.repeatedForeignMessage_.Add(value);
+ return this;
+ }
+ public Builder AddRepeatedForeignMessage(global::Google.ProtocolBuffers.TestProtos.ForeignMessage.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.repeatedForeignMessage_.Add(builderForValue.Build());
+ return this;
+ }
+ public Builder AddRangeRepeatedForeignMessage(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.ForeignMessage> values) {
+ PrepareBuilder();
+ result.repeatedForeignMessage_.Add(values);
+ return this;
+ }
+ public Builder ClearRepeatedForeignMessage() {
+ PrepareBuilder();
+ result.repeatedForeignMessage_.Clear();
+ return this;
+ }
+
+ public pbc::IPopsicleList<global::Google.ProtocolBuffers.TestProtos.ImportMessage> RepeatedImportMessageList {
+ get { return PrepareBuilder().repeatedImportMessage_; }
+ }
+ public int RepeatedImportMessageCount {
+ get { return result.RepeatedImportMessageCount; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.ImportMessage GetRepeatedImportMessage(int index) {
+ return result.GetRepeatedImportMessage(index);
+ }
+ public Builder SetRepeatedImportMessage(int index, global::Google.ProtocolBuffers.TestProtos.ImportMessage value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.repeatedImportMessage_[index] = value;
+ return this;
+ }
+ public Builder SetRepeatedImportMessage(int index, global::Google.ProtocolBuffers.TestProtos.ImportMessage.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.repeatedImportMessage_[index] = builderForValue.Build();
+ return this;
+ }
+ public Builder AddRepeatedImportMessage(global::Google.ProtocolBuffers.TestProtos.ImportMessage value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.repeatedImportMessage_.Add(value);
+ return this;
+ }
+ public Builder AddRepeatedImportMessage(global::Google.ProtocolBuffers.TestProtos.ImportMessage.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.repeatedImportMessage_.Add(builderForValue.Build());
+ return this;
+ }
+ public Builder AddRangeRepeatedImportMessage(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.ImportMessage> values) {
+ PrepareBuilder();
+ result.repeatedImportMessage_.Add(values);
+ return this;
+ }
+ public Builder ClearRepeatedImportMessage() {
+ PrepareBuilder();
+ result.repeatedImportMessage_.Clear();
+ return this;
+ }
+
+ public pbc::IPopsicleList<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedEnum> RepeatedNestedEnumList {
+ get { return PrepareBuilder().repeatedNestedEnum_; }
+ }
+ public int RepeatedNestedEnumCount {
+ get { return result.RepeatedNestedEnumCount; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedEnum GetRepeatedNestedEnum(int index) {
+ return result.GetRepeatedNestedEnum(index);
+ }
+ public Builder SetRepeatedNestedEnum(int index, global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedEnum value) {
+ PrepareBuilder();
+ result.repeatedNestedEnum_[index] = value;
+ return this;
+ }
+ public Builder AddRepeatedNestedEnum(global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedEnum value) {
+ PrepareBuilder();
+ result.repeatedNestedEnum_.Add(value);
+ return this;
+ }
+ public Builder AddRangeRepeatedNestedEnum(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedEnum> values) {
+ PrepareBuilder();
+ result.repeatedNestedEnum_.Add(values);
+ return this;
+ }
+ public Builder ClearRepeatedNestedEnum() {
+ PrepareBuilder();
+ result.repeatedNestedEnum_.Clear();
+ return this;
+ }
+
+ public pbc::IPopsicleList<global::Google.ProtocolBuffers.TestProtos.ForeignEnum> RepeatedForeignEnumList {
+ get { return PrepareBuilder().repeatedForeignEnum_; }
+ }
+ public int RepeatedForeignEnumCount {
+ get { return result.RepeatedForeignEnumCount; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.ForeignEnum GetRepeatedForeignEnum(int index) {
+ return result.GetRepeatedForeignEnum(index);
+ }
+ public Builder SetRepeatedForeignEnum(int index, global::Google.ProtocolBuffers.TestProtos.ForeignEnum value) {
+ PrepareBuilder();
+ result.repeatedForeignEnum_[index] = value;
+ return this;
+ }
+ public Builder AddRepeatedForeignEnum(global::Google.ProtocolBuffers.TestProtos.ForeignEnum value) {
+ PrepareBuilder();
+ result.repeatedForeignEnum_.Add(value);
+ return this;
+ }
+ public Builder AddRangeRepeatedForeignEnum(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.ForeignEnum> values) {
+ PrepareBuilder();
+ result.repeatedForeignEnum_.Add(values);
+ return this;
+ }
+ public Builder ClearRepeatedForeignEnum() {
+ PrepareBuilder();
+ result.repeatedForeignEnum_.Clear();
+ return this;
+ }
+
+ public pbc::IPopsicleList<global::Google.ProtocolBuffers.TestProtos.ImportEnum> RepeatedImportEnumList {
+ get { return PrepareBuilder().repeatedImportEnum_; }
+ }
+ public int RepeatedImportEnumCount {
+ get { return result.RepeatedImportEnumCount; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.ImportEnum GetRepeatedImportEnum(int index) {
+ return result.GetRepeatedImportEnum(index);
+ }
+ public Builder SetRepeatedImportEnum(int index, global::Google.ProtocolBuffers.TestProtos.ImportEnum value) {
+ PrepareBuilder();
+ result.repeatedImportEnum_[index] = value;
+ return this;
+ }
+ public Builder AddRepeatedImportEnum(global::Google.ProtocolBuffers.TestProtos.ImportEnum value) {
+ PrepareBuilder();
+ result.repeatedImportEnum_.Add(value);
+ return this;
+ }
+ public Builder AddRangeRepeatedImportEnum(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.ImportEnum> values) {
+ PrepareBuilder();
+ result.repeatedImportEnum_.Add(values);
+ return this;
+ }
+ public Builder ClearRepeatedImportEnum() {
+ PrepareBuilder();
+ result.repeatedImportEnum_.Clear();
+ return this;
+ }
+
+ public pbc::IPopsicleList<string> RepeatedStringPieceList {
+ get { return PrepareBuilder().repeatedStringPiece_; }
+ }
+ public int RepeatedStringPieceCount {
+ get { return result.RepeatedStringPieceCount; }
+ }
+ public string GetRepeatedStringPiece(int index) {
+ return result.GetRepeatedStringPiece(index);
+ }
+ public Builder SetRepeatedStringPiece(int index, string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.repeatedStringPiece_[index] = value;
+ return this;
+ }
+ public Builder AddRepeatedStringPiece(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.repeatedStringPiece_.Add(value);
+ return this;
+ }
+ public Builder AddRangeRepeatedStringPiece(scg::IEnumerable<string> values) {
+ PrepareBuilder();
+ result.repeatedStringPiece_.Add(values);
+ return this;
+ }
+ public Builder ClearRepeatedStringPiece() {
+ PrepareBuilder();
+ result.repeatedStringPiece_.Clear();
+ return this;
+ }
+
+ public pbc::IPopsicleList<string> RepeatedCordList {
+ get { return PrepareBuilder().repeatedCord_; }
+ }
+ public int RepeatedCordCount {
+ get { return result.RepeatedCordCount; }
+ }
+ public string GetRepeatedCord(int index) {
+ return result.GetRepeatedCord(index);
+ }
+ public Builder SetRepeatedCord(int index, string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.repeatedCord_[index] = value;
+ return this;
+ }
+ public Builder AddRepeatedCord(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.repeatedCord_.Add(value);
+ return this;
+ }
+ public Builder AddRangeRepeatedCord(scg::IEnumerable<string> values) {
+ PrepareBuilder();
+ result.repeatedCord_.Add(values);
+ return this;
+ }
+ public Builder ClearRepeatedCord() {
+ PrepareBuilder();
+ result.repeatedCord_.Clear();
+ return this;
+ }
+
+ public pbc::IPopsicleList<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage> RepeatedLazyMessageList {
+ get { return PrepareBuilder().repeatedLazyMessage_; }
+ }
+ public int RepeatedLazyMessageCount {
+ get { return result.RepeatedLazyMessageCount; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage GetRepeatedLazyMessage(int index) {
+ return result.GetRepeatedLazyMessage(index);
+ }
+ public Builder SetRepeatedLazyMessage(int index, global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.repeatedLazyMessage_[index] = value;
+ return this;
+ }
+ public Builder SetRepeatedLazyMessage(int index, global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.repeatedLazyMessage_[index] = builderForValue.Build();
+ return this;
+ }
+ public Builder AddRepeatedLazyMessage(global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.repeatedLazyMessage_.Add(value);
+ return this;
+ }
+ public Builder AddRepeatedLazyMessage(global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.repeatedLazyMessage_.Add(builderForValue.Build());
+ return this;
+ }
+ public Builder AddRangeRepeatedLazyMessage(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage> values) {
+ PrepareBuilder();
+ result.repeatedLazyMessage_.Add(values);
+ return this;
+ }
+ public Builder ClearRepeatedLazyMessage() {
+ PrepareBuilder();
+ result.repeatedLazyMessage_.Clear();
+ return this;
+ }
+
+ public bool HasDefaultInt32 {
+ get { return result.hasDefaultInt32; }
+ }
+ public int DefaultInt32 {
+ get { return result.DefaultInt32; }
+ set { SetDefaultInt32(value); }
+ }
+ public Builder SetDefaultInt32(int value) {
+ PrepareBuilder();
+ result.hasDefaultInt32 = true;
+ result.defaultInt32_ = value;
+ return this;
+ }
+ public Builder ClearDefaultInt32() {
+ PrepareBuilder();
+ result.hasDefaultInt32 = false;
+ result.defaultInt32_ = 41;
+ return this;
+ }
+
+ public bool HasDefaultInt64 {
+ get { return result.hasDefaultInt64; }
+ }
+ public long DefaultInt64 {
+ get { return result.DefaultInt64; }
+ set { SetDefaultInt64(value); }
+ }
+ public Builder SetDefaultInt64(long value) {
+ PrepareBuilder();
+ result.hasDefaultInt64 = true;
+ result.defaultInt64_ = value;
+ return this;
+ }
+ public Builder ClearDefaultInt64() {
+ PrepareBuilder();
+ result.hasDefaultInt64 = false;
+ result.defaultInt64_ = 42L;
+ return this;
+ }
+
+ public bool HasDefaultUint32 {
+ get { return result.hasDefaultUint32; }
+ }
+ [global::System.CLSCompliant(false)]
+ public uint DefaultUint32 {
+ get { return result.DefaultUint32; }
+ set { SetDefaultUint32(value); }
+ }
+ [global::System.CLSCompliant(false)]
+ public Builder SetDefaultUint32(uint value) {
+ PrepareBuilder();
+ result.hasDefaultUint32 = true;
+ result.defaultUint32_ = value;
+ return this;
+ }
+ public Builder ClearDefaultUint32() {
+ PrepareBuilder();
+ result.hasDefaultUint32 = false;
+ result.defaultUint32_ = 43;
+ return this;
+ }
+
+ public bool HasDefaultUint64 {
+ get { return result.hasDefaultUint64; }
+ }
+ [global::System.CLSCompliant(false)]
+ public ulong DefaultUint64 {
+ get { return result.DefaultUint64; }
+ set { SetDefaultUint64(value); }
+ }
+ [global::System.CLSCompliant(false)]
+ public Builder SetDefaultUint64(ulong value) {
+ PrepareBuilder();
+ result.hasDefaultUint64 = true;
+ result.defaultUint64_ = value;
+ return this;
+ }
+ public Builder ClearDefaultUint64() {
+ PrepareBuilder();
+ result.hasDefaultUint64 = false;
+ result.defaultUint64_ = 44UL;
+ return this;
+ }
+
+ public bool HasDefaultSint32 {
+ get { return result.hasDefaultSint32; }
+ }
+ public int DefaultSint32 {
+ get { return result.DefaultSint32; }
+ set { SetDefaultSint32(value); }
+ }
+ public Builder SetDefaultSint32(int value) {
+ PrepareBuilder();
+ result.hasDefaultSint32 = true;
+ result.defaultSint32_ = value;
+ return this;
+ }
+ public Builder ClearDefaultSint32() {
+ PrepareBuilder();
+ result.hasDefaultSint32 = false;
+ result.defaultSint32_ = -45;
+ return this;
+ }
+
+ public bool HasDefaultSint64 {
+ get { return result.hasDefaultSint64; }
+ }
+ public long DefaultSint64 {
+ get { return result.DefaultSint64; }
+ set { SetDefaultSint64(value); }
+ }
+ public Builder SetDefaultSint64(long value) {
+ PrepareBuilder();
+ result.hasDefaultSint64 = true;
+ result.defaultSint64_ = value;
+ return this;
+ }
+ public Builder ClearDefaultSint64() {
+ PrepareBuilder();
+ result.hasDefaultSint64 = false;
+ result.defaultSint64_ = 46L;
+ return this;
+ }
+
+ public bool HasDefaultFixed32 {
+ get { return result.hasDefaultFixed32; }
+ }
+ [global::System.CLSCompliant(false)]
+ public uint DefaultFixed32 {
+ get { return result.DefaultFixed32; }
+ set { SetDefaultFixed32(value); }
+ }
+ [global::System.CLSCompliant(false)]
+ public Builder SetDefaultFixed32(uint value) {
+ PrepareBuilder();
+ result.hasDefaultFixed32 = true;
+ result.defaultFixed32_ = value;
+ return this;
+ }
+ public Builder ClearDefaultFixed32() {
+ PrepareBuilder();
+ result.hasDefaultFixed32 = false;
+ result.defaultFixed32_ = 47;
+ return this;
+ }
+
+ public bool HasDefaultFixed64 {
+ get { return result.hasDefaultFixed64; }
+ }
+ [global::System.CLSCompliant(false)]
+ public ulong DefaultFixed64 {
+ get { return result.DefaultFixed64; }
+ set { SetDefaultFixed64(value); }
+ }
+ [global::System.CLSCompliant(false)]
+ public Builder SetDefaultFixed64(ulong value) {
+ PrepareBuilder();
+ result.hasDefaultFixed64 = true;
+ result.defaultFixed64_ = value;
+ return this;
+ }
+ public Builder ClearDefaultFixed64() {
+ PrepareBuilder();
+ result.hasDefaultFixed64 = false;
+ result.defaultFixed64_ = 48UL;
+ return this;
+ }
+
+ public bool HasDefaultSfixed32 {
+ get { return result.hasDefaultSfixed32; }
+ }
+ public int DefaultSfixed32 {
+ get { return result.DefaultSfixed32; }
+ set { SetDefaultSfixed32(value); }
+ }
+ public Builder SetDefaultSfixed32(int value) {
+ PrepareBuilder();
+ result.hasDefaultSfixed32 = true;
+ result.defaultSfixed32_ = value;
+ return this;
+ }
+ public Builder ClearDefaultSfixed32() {
+ PrepareBuilder();
+ result.hasDefaultSfixed32 = false;
+ result.defaultSfixed32_ = 49;
+ return this;
+ }
+
+ public bool HasDefaultSfixed64 {
+ get { return result.hasDefaultSfixed64; }
+ }
+ public long DefaultSfixed64 {
+ get { return result.DefaultSfixed64; }
+ set { SetDefaultSfixed64(value); }
+ }
+ public Builder SetDefaultSfixed64(long value) {
+ PrepareBuilder();
+ result.hasDefaultSfixed64 = true;
+ result.defaultSfixed64_ = value;
+ return this;
+ }
+ public Builder ClearDefaultSfixed64() {
+ PrepareBuilder();
+ result.hasDefaultSfixed64 = false;
+ result.defaultSfixed64_ = -50L;
+ return this;
+ }
+
+ public bool HasDefaultFloat {
+ get { return result.hasDefaultFloat; }
+ }
+ public float DefaultFloat {
+ get { return result.DefaultFloat; }
+ set { SetDefaultFloat(value); }
+ }
+ public Builder SetDefaultFloat(float value) {
+ PrepareBuilder();
+ result.hasDefaultFloat = true;
+ result.defaultFloat_ = value;
+ return this;
+ }
+ public Builder ClearDefaultFloat() {
+ PrepareBuilder();
+ result.hasDefaultFloat = false;
+ result.defaultFloat_ = 51.5F;
+ return this;
+ }
+
+ public bool HasDefaultDouble {
+ get { return result.hasDefaultDouble; }
+ }
+ public double DefaultDouble {
+ get { return result.DefaultDouble; }
+ set { SetDefaultDouble(value); }
+ }
+ public Builder SetDefaultDouble(double value) {
+ PrepareBuilder();
+ result.hasDefaultDouble = true;
+ result.defaultDouble_ = value;
+ return this;
+ }
+ public Builder ClearDefaultDouble() {
+ PrepareBuilder();
+ result.hasDefaultDouble = false;
+ result.defaultDouble_ = 52000D;
+ return this;
+ }
+
+ public bool HasDefaultBool {
+ get { return result.hasDefaultBool; }
+ }
+ public bool DefaultBool {
+ get { return result.DefaultBool; }
+ set { SetDefaultBool(value); }
+ }
+ public Builder SetDefaultBool(bool value) {
+ PrepareBuilder();
+ result.hasDefaultBool = true;
+ result.defaultBool_ = value;
+ return this;
+ }
+ public Builder ClearDefaultBool() {
+ PrepareBuilder();
+ result.hasDefaultBool = false;
+ result.defaultBool_ = true;
+ return this;
+ }
+
+ public bool HasDefaultString {
+ get { return result.hasDefaultString; }
+ }
+ public string DefaultString {
+ get { return result.DefaultString; }
+ set { SetDefaultString(value); }
+ }
+ public Builder SetDefaultString(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasDefaultString = true;
+ result.defaultString_ = value;
+ return this;
+ }
+ public Builder ClearDefaultString() {
+ PrepareBuilder();
+ result.hasDefaultString = false;
+ result.defaultString_ = "hello";
+ return this;
+ }
+
+ public bool HasDefaultBytes {
+ get { return result.hasDefaultBytes; }
+ }
+ public pb::ByteString DefaultBytes {
+ get { return result.DefaultBytes; }
+ set { SetDefaultBytes(value); }
+ }
+ public Builder SetDefaultBytes(pb::ByteString value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasDefaultBytes = true;
+ result.defaultBytes_ = value;
+ return this;
+ }
+ public Builder ClearDefaultBytes() {
+ PrepareBuilder();
+ result.hasDefaultBytes = false;
+ result.defaultBytes_ = (pb::ByteString) global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Descriptor.Fields[65].DefaultValue;
+ return this;
+ }
+
+ public bool HasDefaultNestedEnum {
+ get { return result.hasDefaultNestedEnum; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedEnum DefaultNestedEnum {
+ get { return result.DefaultNestedEnum; }
+ set { SetDefaultNestedEnum(value); }
+ }
+ public Builder SetDefaultNestedEnum(global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedEnum value) {
+ PrepareBuilder();
+ result.hasDefaultNestedEnum = true;
+ result.defaultNestedEnum_ = value;
+ return this;
+ }
+ public Builder ClearDefaultNestedEnum() {
+ PrepareBuilder();
+ result.hasDefaultNestedEnum = false;
+ result.defaultNestedEnum_ = global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedEnum.BAR;
+ return this;
+ }
+
+ public bool HasDefaultForeignEnum {
+ get { return result.hasDefaultForeignEnum; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.ForeignEnum DefaultForeignEnum {
+ get { return result.DefaultForeignEnum; }
+ set { SetDefaultForeignEnum(value); }
+ }
+ public Builder SetDefaultForeignEnum(global::Google.ProtocolBuffers.TestProtos.ForeignEnum value) {
+ PrepareBuilder();
+ result.hasDefaultForeignEnum = true;
+ result.defaultForeignEnum_ = value;
+ return this;
+ }
+ public Builder ClearDefaultForeignEnum() {
+ PrepareBuilder();
+ result.hasDefaultForeignEnum = false;
+ result.defaultForeignEnum_ = global::Google.ProtocolBuffers.TestProtos.ForeignEnum.FOREIGN_BAR;
+ return this;
+ }
+
+ public bool HasDefaultImportEnum {
+ get { return result.hasDefaultImportEnum; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.ImportEnum DefaultImportEnum {
+ get { return result.DefaultImportEnum; }
+ set { SetDefaultImportEnum(value); }
+ }
+ public Builder SetDefaultImportEnum(global::Google.ProtocolBuffers.TestProtos.ImportEnum value) {
+ PrepareBuilder();
+ result.hasDefaultImportEnum = true;
+ result.defaultImportEnum_ = value;
+ return this;
+ }
+ public Builder ClearDefaultImportEnum() {
+ PrepareBuilder();
+ result.hasDefaultImportEnum = false;
+ result.defaultImportEnum_ = global::Google.ProtocolBuffers.TestProtos.ImportEnum.IMPORT_BAR;
+ return this;
+ }
+
+ public bool HasDefaultStringPiece {
+ get { return result.hasDefaultStringPiece; }
+ }
+ public string DefaultStringPiece {
+ get { return result.DefaultStringPiece; }
+ set { SetDefaultStringPiece(value); }
+ }
+ public Builder SetDefaultStringPiece(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasDefaultStringPiece = true;
+ result.defaultStringPiece_ = value;
+ return this;
+ }
+ public Builder ClearDefaultStringPiece() {
+ PrepareBuilder();
+ result.hasDefaultStringPiece = false;
+ result.defaultStringPiece_ = "abc";
+ return this;
+ }
+
+ public bool HasDefaultCord {
+ get { return result.hasDefaultCord; }
+ }
+ public string DefaultCord {
+ get { return result.DefaultCord; }
+ set { SetDefaultCord(value); }
+ }
+ public Builder SetDefaultCord(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasDefaultCord = true;
+ result.defaultCord_ = value;
+ return this;
+ }
+ public Builder ClearDefaultCord() {
+ PrepareBuilder();
+ result.hasDefaultCord = false;
+ result.defaultCord_ = "123";
+ return this;
+ }
+
+ public bool HasOneofUint32 {
+ get { return result.hasOneofUint32; }
+ }
+ [global::System.CLSCompliant(false)]
+ public uint OneofUint32 {
+ get { return result.OneofUint32; }
+ set { SetOneofUint32(value); }
+ }
+ [global::System.CLSCompliant(false)]
+ public Builder SetOneofUint32(uint value) {
+ PrepareBuilder();
+ result.hasOneofUint32 = true;
+ result.oneofUint32_ = value;
+ return this;
+ }
+ public Builder ClearOneofUint32() {
+ PrepareBuilder();
+ result.hasOneofUint32 = false;
+ result.oneofUint32_ = 0;
+ return this;
+ }
+
+ public bool HasOneofNestedMessage {
+ get { return result.hasOneofNestedMessage; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage OneofNestedMessage {
+ get { return result.OneofNestedMessage; }
+ set { SetOneofNestedMessage(value); }
+ }
+ public Builder SetOneofNestedMessage(global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasOneofNestedMessage = true;
+ result.oneofNestedMessage_ = value;
+ return this;
+ }
+ public Builder SetOneofNestedMessage(global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.hasOneofNestedMessage = true;
+ result.oneofNestedMessage_ = builderForValue.Build();
+ return this;
+ }
+ public Builder MergeOneofNestedMessage(global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ if (result.hasOneofNestedMessage &&
+ result.oneofNestedMessage_ != global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage.DefaultInstance) {
+ result.oneofNestedMessage_ = global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage.CreateBuilder(result.oneofNestedMessage_).MergeFrom(value).BuildPartial();
+ } else {
+ result.oneofNestedMessage_ = value;
+ }
+ result.hasOneofNestedMessage = true;
+ return this;
+ }
+ public Builder ClearOneofNestedMessage() {
+ PrepareBuilder();
+ result.hasOneofNestedMessage = false;
+ result.oneofNestedMessage_ = null;
+ return this;
+ }
+
+ public bool HasOneofString {
+ get { return result.hasOneofString; }
+ }
+ public string OneofString {
+ get { return result.OneofString; }
+ set { SetOneofString(value); }
+ }
+ public Builder SetOneofString(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasOneofString = true;
+ result.oneofString_ = value;
+ return this;
+ }
+ public Builder ClearOneofString() {
+ PrepareBuilder();
+ result.hasOneofString = false;
+ result.oneofString_ = "";
+ return this;
+ }
+
+ public bool HasOneofBytes {
+ get { return result.hasOneofBytes; }
+ }
+ public pb::ByteString OneofBytes {
+ get { return result.OneofBytes; }
+ set { SetOneofBytes(value); }
+ }
+ public Builder SetOneofBytes(pb::ByteString value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasOneofBytes = true;
+ result.oneofBytes_ = value;
+ return this;
+ }
+ public Builder ClearOneofBytes() {
+ PrepareBuilder();
+ result.hasOneofBytes = false;
+ result.oneofBytes_ = pb::ByteString.Empty;
+ return this;
+ }
+ }
+ static TestAllTypes() {
+ object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor, null);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class NestedTestAllTypes : pb::GeneratedMessage<NestedTestAllTypes, NestedTestAllTypes.Builder> {
+ private NestedTestAllTypes() { }
+ private static readonly NestedTestAllTypes defaultInstance = new NestedTestAllTypes().MakeReadOnly();
+ private static readonly string[] _nestedTestAllTypesFieldNames = new string[] { "child", "payload" };
+ private static readonly uint[] _nestedTestAllTypesFieldTags = new uint[] { 10, 18 };
+ public static NestedTestAllTypes DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override NestedTestAllTypes DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override NestedTestAllTypes ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_NestedTestAllTypes__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<NestedTestAllTypes, NestedTestAllTypes.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_NestedTestAllTypes__FieldAccessorTable; }
+ }
+
+ public const int ChildFieldNumber = 1;
+ private bool hasChild;
+ private global::Google.ProtocolBuffers.TestProtos.NestedTestAllTypes child_;
+ public bool HasChild {
+ get { return hasChild; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.NestedTestAllTypes Child {
+ get { return child_ ?? global::Google.ProtocolBuffers.TestProtos.NestedTestAllTypes.DefaultInstance; }
+ }
+
+ public const int PayloadFieldNumber = 2;
+ private bool hasPayload;
+ private global::Google.ProtocolBuffers.TestProtos.TestAllTypes payload_;
+ public bool HasPayload {
+ get { return hasPayload; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestAllTypes Payload {
+ get { return payload_ ?? global::Google.ProtocolBuffers.TestProtos.TestAllTypes.DefaultInstance; }
+ }
+
+ public override bool IsInitialized {
+ get {
+ return true;
+ }
+ }
+
+ public override void WriteTo(pb::ICodedOutputStream output) {
+ CalcSerializedSize();
+ string[] field_names = _nestedTestAllTypesFieldNames;
+ if (hasChild) {
+ output.WriteMessage(1, field_names[0], Child);
+ }
+ if (hasPayload) {
+ output.WriteMessage(2, field_names[1], Payload);
+ }
+ UnknownFields.WriteTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public override int SerializedSize {
+ get {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+ return CalcSerializedSize();
+ }
+ }
+
+ private int CalcSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (hasChild) {
+ size += pb::CodedOutputStream.ComputeMessageSize(1, Child);
+ }
+ if (hasPayload) {
+ size += pb::CodedOutputStream.ComputeMessageSize(2, Payload);
+ }
+ size += UnknownFields.SerializedSize;
+ memoizedSerializedSize = size;
+ return size;
+ }
+ public static NestedTestAllTypes ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static NestedTestAllTypes ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static NestedTestAllTypes ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static NestedTestAllTypes ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static NestedTestAllTypes ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static NestedTestAllTypes ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static NestedTestAllTypes ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static NestedTestAllTypes ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static NestedTestAllTypes ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static NestedTestAllTypes ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private NestedTestAllTypes 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(NestedTestAllTypes prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Builder : pb::GeneratedBuilder<NestedTestAllTypes, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(NestedTestAllTypes cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private NestedTestAllTypes result;
+
+ private NestedTestAllTypes PrepareBuilder() {
+ if (resultIsReadOnly) {
+ NestedTestAllTypes original = result;
+ result = new NestedTestAllTypes();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override NestedTestAllTypes 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.NestedTestAllTypes.Descriptor; }
+ }
+
+ public override NestedTestAllTypes DefaultInstanceForType {
+ get { return global::Google.ProtocolBuffers.TestProtos.NestedTestAllTypes.DefaultInstance; }
+ }
+
+ public override NestedTestAllTypes BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+ public override Builder MergeFrom(pb::IMessage other) {
+ if (other is NestedTestAllTypes) {
+ return MergeFrom((NestedTestAllTypes) other);
+ } else {
+ base.MergeFrom(other);
+ return this;
+ }
+ }
+
+ public override Builder MergeFrom(NestedTestAllTypes other) {
+ if (other == global::Google.ProtocolBuffers.TestProtos.NestedTestAllTypes.DefaultInstance) return this;
+ PrepareBuilder();
+ if (other.HasChild) {
+ MergeChild(other.Child);
+ }
+ if (other.HasPayload) {
+ MergePayload(other.Payload);
+ }
+ 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(_nestedTestAllTypesFieldNames, field_name, global::System.StringComparer.Ordinal);
+ if(field_ordinal >= 0)
+ tag = _nestedTestAllTypesFieldTags[field_ordinal];
+ else {
+ if (unknownFields == null) {
+ unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+ }
+ ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
+ continue;
+ }
+ }
+ switch (tag) {
+ case 0: {
+ throw pb::InvalidProtocolBufferException.InvalidTag();
+ }
+ default: {
+ if (pb::WireFormat.IsEndGroupTag(tag)) {
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
+ }
+ if (unknownFields == null) {
+ unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+ }
+ ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
+ break;
+ }
+ case 10: {
+ global::Google.ProtocolBuffers.TestProtos.NestedTestAllTypes.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.NestedTestAllTypes.CreateBuilder();
+ if (result.hasChild) {
+ subBuilder.MergeFrom(Child);
+ }
+ input.ReadMessage(subBuilder, extensionRegistry);
+ Child = subBuilder.BuildPartial();
+ break;
+ }
+ case 18: {
+ global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.TestAllTypes.CreateBuilder();
+ if (result.hasPayload) {
+ subBuilder.MergeFrom(Payload);
+ }
+ input.ReadMessage(subBuilder, extensionRegistry);
+ Payload = subBuilder.BuildPartial();
+ break;
+ }
+ }
+ }
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
+ }
+
+
+ public bool HasChild {
+ get { return result.hasChild; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.NestedTestAllTypes Child {
+ get { return result.Child; }
+ set { SetChild(value); }
+ }
+ public Builder SetChild(global::Google.ProtocolBuffers.TestProtos.NestedTestAllTypes value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasChild = true;
+ result.child_ = value;
+ return this;
+ }
+ public Builder SetChild(global::Google.ProtocolBuffers.TestProtos.NestedTestAllTypes.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.hasChild = true;
+ result.child_ = builderForValue.Build();
+ return this;
+ }
+ public Builder MergeChild(global::Google.ProtocolBuffers.TestProtos.NestedTestAllTypes value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ if (result.hasChild &&
+ result.child_ != global::Google.ProtocolBuffers.TestProtos.NestedTestAllTypes.DefaultInstance) {
+ result.child_ = global::Google.ProtocolBuffers.TestProtos.NestedTestAllTypes.CreateBuilder(result.child_).MergeFrom(value).BuildPartial();
+ } else {
+ result.child_ = value;
+ }
+ result.hasChild = true;
+ return this;
+ }
+ public Builder ClearChild() {
+ PrepareBuilder();
+ result.hasChild = false;
+ result.child_ = null;
+ return this;
+ }
+
+ public bool HasPayload {
+ get { return result.hasPayload; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestAllTypes Payload {
+ get { return result.Payload; }
+ set { SetPayload(value); }
+ }
+ public Builder SetPayload(global::Google.ProtocolBuffers.TestProtos.TestAllTypes value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasPayload = true;
+ result.payload_ = value;
+ return this;
+ }
+ public Builder SetPayload(global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.hasPayload = true;
+ result.payload_ = builderForValue.Build();
+ return this;
+ }
+ public Builder MergePayload(global::Google.ProtocolBuffers.TestProtos.TestAllTypes value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ if (result.hasPayload &&
+ result.payload_ != global::Google.ProtocolBuffers.TestProtos.TestAllTypes.DefaultInstance) {
+ result.payload_ = global::Google.ProtocolBuffers.TestProtos.TestAllTypes.CreateBuilder(result.payload_).MergeFrom(value).BuildPartial();
+ } else {
+ result.payload_ = value;
+ }
+ result.hasPayload = true;
+ return this;
+ }
+ public Builder ClearPayload() {
+ PrepareBuilder();
+ result.hasPayload = false;
+ result.payload_ = null;
+ return this;
+ }
+ }
+ static NestedTestAllTypes() {
+ object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor, null);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class TestDeprecatedFields : pb::GeneratedMessage<TestDeprecatedFields, TestDeprecatedFields.Builder> {
+ private TestDeprecatedFields() { }
+ private static readonly TestDeprecatedFields defaultInstance = new TestDeprecatedFields().MakeReadOnly();
+ private static readonly string[] _testDeprecatedFieldsFieldNames = new string[] { "deprecated_int32" };
+ private static readonly uint[] _testDeprecatedFieldsFieldTags = new uint[] { 8 };
+ public static TestDeprecatedFields DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override TestDeprecatedFields DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override TestDeprecatedFields ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestDeprecatedFields__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<TestDeprecatedFields, TestDeprecatedFields.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestDeprecatedFields__FieldAccessorTable; }
+ }
+
+ public const int DeprecatedInt32FieldNumber = 1;
+ private bool hasDeprecatedInt32;
+ private int deprecatedInt32_;
+ [global::System.ObsoleteAttribute()]
+ public bool HasDeprecatedInt32 {
+ get { return hasDeprecatedInt32; }
+ }
+ [global::System.ObsoleteAttribute()]
+ public int DeprecatedInt32 {
+ get { return deprecatedInt32_; }
+ }
+
+ public override bool IsInitialized {
+ get {
+ return true;
+ }
+ }
+
+ public override void WriteTo(pb::ICodedOutputStream output) {
+ CalcSerializedSize();
+ string[] field_names = _testDeprecatedFieldsFieldNames;
+ if (hasDeprecatedInt32) {
+ output.WriteInt32(1, field_names[0], DeprecatedInt32);
+ }
+ UnknownFields.WriteTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public override int SerializedSize {
+ get {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+ return CalcSerializedSize();
+ }
+ }
+
+ private int CalcSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (hasDeprecatedInt32) {
+ size += pb::CodedOutputStream.ComputeInt32Size(1, DeprecatedInt32);
+ }
+ size += UnknownFields.SerializedSize;
+ memoizedSerializedSize = size;
+ return size;
+ }
+ public static TestDeprecatedFields ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static TestDeprecatedFields ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static TestDeprecatedFields ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static TestDeprecatedFields ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static TestDeprecatedFields ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static TestDeprecatedFields ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static TestDeprecatedFields ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static TestDeprecatedFields ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static TestDeprecatedFields ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static TestDeprecatedFields ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private TestDeprecatedFields 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(TestDeprecatedFields prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Builder : pb::GeneratedBuilder<TestDeprecatedFields, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(TestDeprecatedFields cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private TestDeprecatedFields result;
+
+ private TestDeprecatedFields PrepareBuilder() {
+ if (resultIsReadOnly) {
+ TestDeprecatedFields original = result;
+ result = new TestDeprecatedFields();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override TestDeprecatedFields 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.TestDeprecatedFields.Descriptor; }
+ }
+
+ public override TestDeprecatedFields DefaultInstanceForType {
+ get { return global::Google.ProtocolBuffers.TestProtos.TestDeprecatedFields.DefaultInstance; }
+ }
+
+ public override TestDeprecatedFields BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+ public override Builder MergeFrom(pb::IMessage other) {
+ if (other is TestDeprecatedFields) {
+ return MergeFrom((TestDeprecatedFields) other);
+ } else {
+ base.MergeFrom(other);
+ return this;
+ }
+ }
+
+ public override Builder MergeFrom(TestDeprecatedFields other) {
+ if (other == global::Google.ProtocolBuffers.TestProtos.TestDeprecatedFields.DefaultInstance) return this;
+ PrepareBuilder();
+ if (other.HasDeprecatedInt32) {
+ DeprecatedInt32 = other.DeprecatedInt32;
+ }
+ 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(_testDeprecatedFieldsFieldNames, field_name, global::System.StringComparer.Ordinal);
+ if(field_ordinal >= 0)
+ tag = _testDeprecatedFieldsFieldTags[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.hasDeprecatedInt32 = input.ReadInt32(ref result.deprecatedInt32_);
+ break;
+ }
+ }
+ }
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
+ }
+
+
+ [global::System.ObsoleteAttribute()]
+ public bool HasDeprecatedInt32 {
+ get { return result.hasDeprecatedInt32; }
+ }
+ [global::System.ObsoleteAttribute()]
+ public int DeprecatedInt32 {
+ get { return result.DeprecatedInt32; }
+ set { SetDeprecatedInt32(value); }
+ }
+ [global::System.ObsoleteAttribute()]
+ public Builder SetDeprecatedInt32(int value) {
+ PrepareBuilder();
+ result.hasDeprecatedInt32 = true;
+ result.deprecatedInt32_ = value;
+ return this;
+ }
+ [global::System.ObsoleteAttribute()]
+ public Builder ClearDeprecatedInt32() {
+ PrepareBuilder();
+ result.hasDeprecatedInt32 = false;
+ result.deprecatedInt32_ = 0;
+ return this;
+ }
+ }
+ static TestDeprecatedFields() {
+ object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor, null);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class ForeignMessage : pb::GeneratedMessage<ForeignMessage, ForeignMessage.Builder> {
+ private ForeignMessage() { }
+ private static readonly ForeignMessage defaultInstance = new ForeignMessage().MakeReadOnly();
+ private static readonly string[] _foreignMessageFieldNames = new string[] { "c" };
+ private static readonly uint[] _foreignMessageFieldTags = new uint[] { 8 };
+ public static ForeignMessage DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override ForeignMessage DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override ForeignMessage ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_ForeignMessage__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<ForeignMessage, ForeignMessage.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_ForeignMessage__FieldAccessorTable; }
+ }
+
+ public const int CFieldNumber = 1;
+ private bool hasC;
+ private int c_;
+ public bool HasC {
+ get { return hasC; }
+ }
+ public int C {
+ get { return c_; }
+ }
+
+ public override bool IsInitialized {
+ get {
+ return true;
+ }
+ }
+
+ public override void WriteTo(pb::ICodedOutputStream output) {
+ CalcSerializedSize();
+ string[] field_names = _foreignMessageFieldNames;
+ if (hasC) {
+ output.WriteInt32(1, field_names[0], C);
+ }
+ UnknownFields.WriteTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public override int SerializedSize {
+ get {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+ return CalcSerializedSize();
+ }
+ }
+
+ private int CalcSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (hasC) {
+ size += pb::CodedOutputStream.ComputeInt32Size(1, C);
+ }
+ size += UnknownFields.SerializedSize;
+ memoizedSerializedSize = size;
+ return size;
+ }
+ public static ForeignMessage ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static ForeignMessage ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static ForeignMessage ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static ForeignMessage ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static ForeignMessage ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static ForeignMessage ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static ForeignMessage ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static ForeignMessage ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static ForeignMessage ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static ForeignMessage ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private ForeignMessage 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(ForeignMessage prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Builder : pb::GeneratedBuilder<ForeignMessage, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(ForeignMessage cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private ForeignMessage result;
+
+ private ForeignMessage PrepareBuilder() {
+ if (resultIsReadOnly) {
+ ForeignMessage original = result;
+ result = new ForeignMessage();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override ForeignMessage 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.ForeignMessage.Descriptor; }
+ }
+
+ public override ForeignMessage DefaultInstanceForType {
+ get { return global::Google.ProtocolBuffers.TestProtos.ForeignMessage.DefaultInstance; }
+ }
+
+ public override ForeignMessage BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+ public override Builder MergeFrom(pb::IMessage other) {
+ if (other is ForeignMessage) {
+ return MergeFrom((ForeignMessage) other);
+ } else {
+ base.MergeFrom(other);
+ return this;
+ }
+ }
+
+ public override Builder MergeFrom(ForeignMessage other) {
+ if (other == global::Google.ProtocolBuffers.TestProtos.ForeignMessage.DefaultInstance) return this;
+ PrepareBuilder();
+ if (other.HasC) {
+ C = other.C;
+ }
+ 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(_foreignMessageFieldNames, field_name, global::System.StringComparer.Ordinal);
+ if(field_ordinal >= 0)
+ tag = _foreignMessageFieldTags[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.hasC = input.ReadInt32(ref result.c_);
+ break;
+ }
+ }
+ }
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
+ }
+
+
+ public bool HasC {
+ get { return result.hasC; }
+ }
+ public int C {
+ get { return result.C; }
+ set { SetC(value); }
+ }
+ public Builder SetC(int value) {
+ PrepareBuilder();
+ result.hasC = true;
+ result.c_ = value;
+ return this;
+ }
+ public Builder ClearC() {
+ PrepareBuilder();
+ result.hasC = false;
+ result.c_ = 0;
+ return this;
+ }
+ }
+ static ForeignMessage() {
+ object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor, null);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class TestAllExtensions : pb::ExtendableMessage<TestAllExtensions, TestAllExtensions.Builder> {
+ private TestAllExtensions() { }
+ private static readonly TestAllExtensions defaultInstance = new TestAllExtensions().MakeReadOnly();
+ private static readonly string[] _testAllExtensionsFieldNames = new string[] { };
+ private static readonly uint[] _testAllExtensionsFieldTags = new uint[] { };
+ public static TestAllExtensions DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override TestAllExtensions DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override TestAllExtensions ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestAllExtensions__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<TestAllExtensions, TestAllExtensions.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestAllExtensions__FieldAccessorTable; }
+ }
+
+ public override bool IsInitialized {
+ get {
+ if (!ExtensionsAreInitialized) return false;
+ return true;
+ }
+ }
+
+ public override void WriteTo(pb::ICodedOutputStream output) {
+ CalcSerializedSize();
+ string[] field_names = _testAllExtensionsFieldNames;
+ pb::ExtendableMessage<TestAllExtensions, TestAllExtensions.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;
+ return CalcSerializedSize();
+ }
+ }
+
+ private int CalcSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ size += ExtensionsSerializedSize;
+ size += UnknownFields.SerializedSize;
+ memoizedSerializedSize = size;
+ return size;
+ }
+ public static TestAllExtensions ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static TestAllExtensions ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static TestAllExtensions ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static TestAllExtensions ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static TestAllExtensions ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static TestAllExtensions ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static TestAllExtensions ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static TestAllExtensions ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static TestAllExtensions ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static TestAllExtensions ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private TestAllExtensions 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(TestAllExtensions prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Builder : pb::ExtendableBuilder<TestAllExtensions, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(TestAllExtensions cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private TestAllExtensions result;
+
+ private TestAllExtensions PrepareBuilder() {
+ if (resultIsReadOnly) {
+ TestAllExtensions original = result;
+ result = new TestAllExtensions();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override TestAllExtensions 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.TestAllExtensions.Descriptor; }
+ }
+
+ public override TestAllExtensions DefaultInstanceForType {
+ get { return global::Google.ProtocolBuffers.TestProtos.TestAllExtensions.DefaultInstance; }
+ }
+
+ public override TestAllExtensions BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+ public override Builder MergeFrom(pb::IMessage other) {
+ if (other is TestAllExtensions) {
+ return MergeFrom((TestAllExtensions) other);
+ } else {
+ base.MergeFrom(other);
+ return this;
+ }
+ }
+
+ public override Builder MergeFrom(TestAllExtensions other) {
+ if (other == global::Google.ProtocolBuffers.TestProtos.TestAllExtensions.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(_testAllExtensionsFieldNames, field_name, global::System.StringComparer.Ordinal);
+ if(field_ordinal >= 0)
+ tag = _testAllExtensionsFieldTags[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 TestAllExtensions() {
+ object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor, null);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class OptionalGroup_extension : pb::GeneratedMessage<OptionalGroup_extension, OptionalGroup_extension.Builder> {
+ private OptionalGroup_extension() { }
+ private static readonly OptionalGroup_extension defaultInstance = new OptionalGroup_extension().MakeReadOnly();
+ private static readonly string[] _optionalGroupExtensionFieldNames = new string[] { "a" };
+ private static readonly uint[] _optionalGroupExtensionFieldTags = new uint[] { 136 };
+ public static OptionalGroup_extension DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override OptionalGroup_extension DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override OptionalGroup_extension ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_OptionalGroup_extension__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<OptionalGroup_extension, OptionalGroup_extension.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_OptionalGroup_extension__FieldAccessorTable; }
+ }
+
+ public const int AFieldNumber = 17;
+ private bool hasA;
+ private int a_;
+ public bool HasA {
+ get { return hasA; }
+ }
+ public int A {
+ get { return a_; }
+ }
+
+ public override bool IsInitialized {
+ get {
+ return true;
+ }
+ }
+
+ public override void WriteTo(pb::ICodedOutputStream output) {
+ CalcSerializedSize();
+ string[] field_names = _optionalGroupExtensionFieldNames;
+ if (hasA) {
+ output.WriteInt32(17, field_names[0], A);
+ }
+ UnknownFields.WriteTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public override int SerializedSize {
+ get {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+ return CalcSerializedSize();
+ }
+ }
+
+ private int CalcSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (hasA) {
+ size += pb::CodedOutputStream.ComputeInt32Size(17, A);
+ }
+ size += UnknownFields.SerializedSize;
+ memoizedSerializedSize = size;
+ return size;
+ }
+ public static OptionalGroup_extension ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static OptionalGroup_extension ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static OptionalGroup_extension ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static OptionalGroup_extension ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static OptionalGroup_extension ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static OptionalGroup_extension ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static OptionalGroup_extension ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static OptionalGroup_extension ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static OptionalGroup_extension ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static OptionalGroup_extension ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private OptionalGroup_extension 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(OptionalGroup_extension prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Builder : pb::GeneratedBuilder<OptionalGroup_extension, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(OptionalGroup_extension cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private OptionalGroup_extension result;
+
+ private OptionalGroup_extension PrepareBuilder() {
+ if (resultIsReadOnly) {
+ OptionalGroup_extension original = result;
+ result = new OptionalGroup_extension();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override OptionalGroup_extension 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.OptionalGroup_extension.Descriptor; }
+ }
+
+ public override OptionalGroup_extension DefaultInstanceForType {
+ get { return global::Google.ProtocolBuffers.TestProtos.OptionalGroup_extension.DefaultInstance; }
+ }
+
+ public override OptionalGroup_extension BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+ public override Builder MergeFrom(pb::IMessage other) {
+ if (other is OptionalGroup_extension) {
+ return MergeFrom((OptionalGroup_extension) other);
+ } else {
+ base.MergeFrom(other);
+ return this;
+ }
+ }
+
+ public override Builder MergeFrom(OptionalGroup_extension other) {
+ if (other == global::Google.ProtocolBuffers.TestProtos.OptionalGroup_extension.DefaultInstance) return this;
+ PrepareBuilder();
+ if (other.HasA) {
+ A = other.A;
+ }
+ 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(_optionalGroupExtensionFieldNames, field_name, global::System.StringComparer.Ordinal);
+ if(field_ordinal >= 0)
+ tag = _optionalGroupExtensionFieldTags[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 136: {
+ result.hasA = input.ReadInt32(ref result.a_);
+ break;
+ }
+ }
+ }
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
+ }
+
+
+ public bool HasA {
+ get { return result.hasA; }
+ }
+ public int A {
+ get { return result.A; }
+ set { SetA(value); }
+ }
+ public Builder SetA(int value) {
+ PrepareBuilder();
+ result.hasA = true;
+ result.a_ = value;
+ return this;
+ }
+ public Builder ClearA() {
+ PrepareBuilder();
+ result.hasA = false;
+ result.a_ = 0;
+ return this;
+ }
+ }
+ static OptionalGroup_extension() {
+ object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor, null);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class RepeatedGroup_extension : pb::GeneratedMessage<RepeatedGroup_extension, RepeatedGroup_extension.Builder> {
+ private RepeatedGroup_extension() { }
+ private static readonly RepeatedGroup_extension defaultInstance = new RepeatedGroup_extension().MakeReadOnly();
+ private static readonly string[] _repeatedGroupExtensionFieldNames = new string[] { "a" };
+ private static readonly uint[] _repeatedGroupExtensionFieldTags = new uint[] { 376 };
+ public static RepeatedGroup_extension DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override RepeatedGroup_extension DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override RepeatedGroup_extension ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_RepeatedGroup_extension__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<RepeatedGroup_extension, RepeatedGroup_extension.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_RepeatedGroup_extension__FieldAccessorTable; }
+ }
+
+ public const int AFieldNumber = 47;
+ private bool hasA;
+ private int a_;
+ public bool HasA {
+ get { return hasA; }
+ }
+ public int A {
+ get { return a_; }
+ }
+
+ public override bool IsInitialized {
+ get {
+ return true;
+ }
+ }
+
+ public override void WriteTo(pb::ICodedOutputStream output) {
+ CalcSerializedSize();
+ string[] field_names = _repeatedGroupExtensionFieldNames;
+ if (hasA) {
+ output.WriteInt32(47, field_names[0], A);
+ }
+ UnknownFields.WriteTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public override int SerializedSize {
+ get {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+ return CalcSerializedSize();
+ }
+ }
+
+ private int CalcSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (hasA) {
+ size += pb::CodedOutputStream.ComputeInt32Size(47, A);
+ }
+ size += UnknownFields.SerializedSize;
+ memoizedSerializedSize = size;
+ return size;
+ }
+ public static RepeatedGroup_extension ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static RepeatedGroup_extension ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static RepeatedGroup_extension ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static RepeatedGroup_extension ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static RepeatedGroup_extension ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static RepeatedGroup_extension ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static RepeatedGroup_extension ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static RepeatedGroup_extension ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static RepeatedGroup_extension ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static RepeatedGroup_extension ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private RepeatedGroup_extension 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(RepeatedGroup_extension prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Builder : pb::GeneratedBuilder<RepeatedGroup_extension, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(RepeatedGroup_extension cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private RepeatedGroup_extension result;
+
+ private RepeatedGroup_extension PrepareBuilder() {
+ if (resultIsReadOnly) {
+ RepeatedGroup_extension original = result;
+ result = new RepeatedGroup_extension();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override RepeatedGroup_extension 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.RepeatedGroup_extension.Descriptor; }
+ }
+
+ public override RepeatedGroup_extension DefaultInstanceForType {
+ get { return global::Google.ProtocolBuffers.TestProtos.RepeatedGroup_extension.DefaultInstance; }
+ }
+
+ public override RepeatedGroup_extension BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+ public override Builder MergeFrom(pb::IMessage other) {
+ if (other is RepeatedGroup_extension) {
+ return MergeFrom((RepeatedGroup_extension) other);
+ } else {
+ base.MergeFrom(other);
+ return this;
+ }
+ }
+
+ public override Builder MergeFrom(RepeatedGroup_extension other) {
+ if (other == global::Google.ProtocolBuffers.TestProtos.RepeatedGroup_extension.DefaultInstance) return this;
+ PrepareBuilder();
+ if (other.HasA) {
+ A = other.A;
+ }
+ 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(_repeatedGroupExtensionFieldNames, field_name, global::System.StringComparer.Ordinal);
+ if(field_ordinal >= 0)
+ tag = _repeatedGroupExtensionFieldTags[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 376: {
+ result.hasA = input.ReadInt32(ref result.a_);
+ break;
+ }
+ }
+ }
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
+ }
+
+
+ public bool HasA {
+ get { return result.hasA; }
+ }
+ public int A {
+ get { return result.A; }
+ set { SetA(value); }
+ }
+ public Builder SetA(int value) {
+ PrepareBuilder();
+ result.hasA = true;
+ result.a_ = value;
+ return this;
+ }
+ public Builder ClearA() {
+ PrepareBuilder();
+ result.hasA = false;
+ result.a_ = 0;
+ return this;
+ }
+ }
+ static RepeatedGroup_extension() {
+ object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor, null);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class TestNestedExtension : pb::GeneratedMessage<TestNestedExtension, TestNestedExtension.Builder> {
+ private TestNestedExtension() { }
+ private static readonly TestNestedExtension defaultInstance = new TestNestedExtension().MakeReadOnly();
+ private static readonly string[] _testNestedExtensionFieldNames = new string[] { };
+ private static readonly uint[] _testNestedExtensionFieldTags = new uint[] { };
+ public static TestNestedExtension DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override TestNestedExtension DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override TestNestedExtension ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestNestedExtension__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<TestNestedExtension, TestNestedExtension.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestNestedExtension__FieldAccessorTable; }
+ }
+
+ public const int TestFieldNumber = 1002;
+ public static pb::GeneratedExtensionBase<string> Test;
+ public const int NestedStringExtensionFieldNumber = 1003;
+ public static pb::GeneratedExtensionBase<string> NestedStringExtension;
+ public override bool IsInitialized {
+ get {
+ return true;
+ }
+ }
+
+ public override void WriteTo(pb::ICodedOutputStream output) {
+ CalcSerializedSize();
+ string[] field_names = _testNestedExtensionFieldNames;
+ UnknownFields.WriteTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public override int SerializedSize {
+ get {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+ return CalcSerializedSize();
+ }
+ }
+
+ private int CalcSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ size += UnknownFields.SerializedSize;
+ memoizedSerializedSize = size;
+ return size;
+ }
+ public static TestNestedExtension ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static TestNestedExtension ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static TestNestedExtension ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static TestNestedExtension ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static TestNestedExtension ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static TestNestedExtension ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static TestNestedExtension ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static TestNestedExtension ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static TestNestedExtension ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static TestNestedExtension ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private TestNestedExtension 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(TestNestedExtension prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Builder : pb::GeneratedBuilder<TestNestedExtension, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(TestNestedExtension cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private TestNestedExtension result;
+
+ private TestNestedExtension PrepareBuilder() {
+ if (resultIsReadOnly) {
+ TestNestedExtension original = result;
+ result = new TestNestedExtension();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override TestNestedExtension 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.TestNestedExtension.Descriptor; }
+ }
+
+ public override TestNestedExtension DefaultInstanceForType {
+ get { return global::Google.ProtocolBuffers.TestProtos.TestNestedExtension.DefaultInstance; }
+ }
+
+ public override TestNestedExtension BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+ public override Builder MergeFrom(pb::IMessage other) {
+ if (other is TestNestedExtension) {
+ return MergeFrom((TestNestedExtension) other);
+ } else {
+ base.MergeFrom(other);
+ return this;
+ }
+ }
+
+ public override Builder MergeFrom(TestNestedExtension other) {
+ if (other == global::Google.ProtocolBuffers.TestProtos.TestNestedExtension.DefaultInstance) return this;
+ PrepareBuilder();
+ this.MergeUnknownFields(other.UnknownFields);
+ return this;
+ }
+
+ public override Builder MergeFrom(pb::ICodedInputStream input) {
+ return MergeFrom(input, pb::ExtensionRegistry.Empty);
+ }
+
+ public override Builder MergeFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ PrepareBuilder();
+ pb::UnknownFieldSet.Builder unknownFields = null;
+ uint tag;
+ string field_name;
+ while (input.ReadTag(out tag, out field_name)) {
+ if(tag == 0 && field_name != null) {
+ int field_ordinal = global::System.Array.BinarySearch(_testNestedExtensionFieldNames, field_name, global::System.StringComparer.Ordinal);
+ if(field_ordinal >= 0)
+ tag = _testNestedExtensionFieldTags[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 TestNestedExtension() {
+ object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor, null);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class TestRequired : pb::GeneratedMessage<TestRequired, TestRequired.Builder> {
+ private TestRequired() { }
+ private static readonly TestRequired defaultInstance = new TestRequired().MakeReadOnly();
+ private static readonly string[] _testRequiredFieldNames = new string[] { "a", "b", "c", "dummy10", "dummy11", "dummy12", "dummy13", "dummy14", "dummy15", "dummy16", "dummy17", "dummy18", "dummy19", "dummy2", "dummy20", "dummy21", "dummy22", "dummy23", "dummy24", "dummy25", "dummy26", "dummy27", "dummy28", "dummy29", "dummy30", "dummy31", "dummy32", "dummy4", "dummy5", "dummy6", "dummy7", "dummy8", "dummy9" };
+ private static readonly uint[] _testRequiredFieldTags = new uint[] { 8, 24, 264, 80, 88, 96, 104, 112, 120, 128, 136, 144, 152, 16, 160, 168, 176, 184, 192, 200, 208, 216, 224, 232, 240, 248, 256, 32, 40, 48, 56, 64, 72 };
+ public static TestRequired DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override TestRequired DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override TestRequired ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestRequired__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<TestRequired, TestRequired.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestRequired__FieldAccessorTable; }
+ }
+
+ public const int SingleFieldNumber = 1000;
+ public static pb::GeneratedExtensionBase<global::Google.ProtocolBuffers.TestProtos.TestRequired> Single;
+ public const int MultiFieldNumber = 1001;
+ public static pb::GeneratedExtensionBase<scg::IList<global::Google.ProtocolBuffers.TestProtos.TestRequired>> Multi;
+ public const int AFieldNumber = 1;
+ private bool hasA;
+ private int a_;
+ public bool HasA {
+ get { return hasA; }
+ }
+ public int A {
+ get { return a_; }
+ }
+
+ public const int Dummy2FieldNumber = 2;
+ private bool hasDummy2;
+ private int dummy2_;
+ public bool HasDummy2 {
+ get { return hasDummy2; }
+ }
+ public int Dummy2 {
+ get { return dummy2_; }
+ }
+
+ public const int BFieldNumber = 3;
+ private bool hasB;
+ private int b_;
+ public bool HasB {
+ get { return hasB; }
+ }
+ public int B {
+ get { return b_; }
+ }
+
+ public const int Dummy4FieldNumber = 4;
+ private bool hasDummy4;
+ private int dummy4_;
+ public bool HasDummy4 {
+ get { return hasDummy4; }
+ }
+ public int Dummy4 {
+ get { return dummy4_; }
+ }
+
+ public const int Dummy5FieldNumber = 5;
+ private bool hasDummy5;
+ private int dummy5_;
+ public bool HasDummy5 {
+ get { return hasDummy5; }
+ }
+ public int Dummy5 {
+ get { return dummy5_; }
+ }
+
+ public const int Dummy6FieldNumber = 6;
+ private bool hasDummy6;
+ private int dummy6_;
+ public bool HasDummy6 {
+ get { return hasDummy6; }
+ }
+ public int Dummy6 {
+ get { return dummy6_; }
+ }
+
+ public const int Dummy7FieldNumber = 7;
+ private bool hasDummy7;
+ private int dummy7_;
+ public bool HasDummy7 {
+ get { return hasDummy7; }
+ }
+ public int Dummy7 {
+ get { return dummy7_; }
+ }
+
+ public const int Dummy8FieldNumber = 8;
+ private bool hasDummy8;
+ private int dummy8_;
+ public bool HasDummy8 {
+ get { return hasDummy8; }
+ }
+ public int Dummy8 {
+ get { return dummy8_; }
+ }
+
+ public const int Dummy9FieldNumber = 9;
+ private bool hasDummy9;
+ private int dummy9_;
+ public bool HasDummy9 {
+ get { return hasDummy9; }
+ }
+ public int Dummy9 {
+ get { return dummy9_; }
+ }
+
+ public const int Dummy10FieldNumber = 10;
+ private bool hasDummy10;
+ private int dummy10_;
+ public bool HasDummy10 {
+ get { return hasDummy10; }
+ }
+ public int Dummy10 {
+ get { return dummy10_; }
+ }
+
+ public const int Dummy11FieldNumber = 11;
+ private bool hasDummy11;
+ private int dummy11_;
+ public bool HasDummy11 {
+ get { return hasDummy11; }
+ }
+ public int Dummy11 {
+ get { return dummy11_; }
+ }
+
+ public const int Dummy12FieldNumber = 12;
+ private bool hasDummy12;
+ private int dummy12_;
+ public bool HasDummy12 {
+ get { return hasDummy12; }
+ }
+ public int Dummy12 {
+ get { return dummy12_; }
+ }
+
+ public const int Dummy13FieldNumber = 13;
+ private bool hasDummy13;
+ private int dummy13_;
+ public bool HasDummy13 {
+ get { return hasDummy13; }
+ }
+ public int Dummy13 {
+ get { return dummy13_; }
+ }
+
+ public const int Dummy14FieldNumber = 14;
+ private bool hasDummy14;
+ private int dummy14_;
+ public bool HasDummy14 {
+ get { return hasDummy14; }
+ }
+ public int Dummy14 {
+ get { return dummy14_; }
+ }
+
+ public const int Dummy15FieldNumber = 15;
+ private bool hasDummy15;
+ private int dummy15_;
+ public bool HasDummy15 {
+ get { return hasDummy15; }
+ }
+ public int Dummy15 {
+ get { return dummy15_; }
+ }
+
+ public const int Dummy16FieldNumber = 16;
+ private bool hasDummy16;
+ private int dummy16_;
+ public bool HasDummy16 {
+ get { return hasDummy16; }
+ }
+ public int Dummy16 {
+ get { return dummy16_; }
+ }
+
+ public const int Dummy17FieldNumber = 17;
+ private bool hasDummy17;
+ private int dummy17_;
+ public bool HasDummy17 {
+ get { return hasDummy17; }
+ }
+ public int Dummy17 {
+ get { return dummy17_; }
+ }
+
+ public const int Dummy18FieldNumber = 18;
+ private bool hasDummy18;
+ private int dummy18_;
+ public bool HasDummy18 {
+ get { return hasDummy18; }
+ }
+ public int Dummy18 {
+ get { return dummy18_; }
+ }
+
+ public const int Dummy19FieldNumber = 19;
+ private bool hasDummy19;
+ private int dummy19_;
+ public bool HasDummy19 {
+ get { return hasDummy19; }
+ }
+ public int Dummy19 {
+ get { return dummy19_; }
+ }
+
+ public const int Dummy20FieldNumber = 20;
+ private bool hasDummy20;
+ private int dummy20_;
+ public bool HasDummy20 {
+ get { return hasDummy20; }
+ }
+ public int Dummy20 {
+ get { return dummy20_; }
+ }
+
+ public const int Dummy21FieldNumber = 21;
+ private bool hasDummy21;
+ private int dummy21_;
+ public bool HasDummy21 {
+ get { return hasDummy21; }
+ }
+ public int Dummy21 {
+ get { return dummy21_; }
+ }
+
+ public const int Dummy22FieldNumber = 22;
+ private bool hasDummy22;
+ private int dummy22_;
+ public bool HasDummy22 {
+ get { return hasDummy22; }
+ }
+ public int Dummy22 {
+ get { return dummy22_; }
+ }
+
+ public const int Dummy23FieldNumber = 23;
+ private bool hasDummy23;
+ private int dummy23_;
+ public bool HasDummy23 {
+ get { return hasDummy23; }
+ }
+ public int Dummy23 {
+ get { return dummy23_; }
+ }
+
+ public const int Dummy24FieldNumber = 24;
+ private bool hasDummy24;
+ private int dummy24_;
+ public bool HasDummy24 {
+ get { return hasDummy24; }
+ }
+ public int Dummy24 {
+ get { return dummy24_; }
+ }
+
+ public const int Dummy25FieldNumber = 25;
+ private bool hasDummy25;
+ private int dummy25_;
+ public bool HasDummy25 {
+ get { return hasDummy25; }
+ }
+ public int Dummy25 {
+ get { return dummy25_; }
+ }
+
+ public const int Dummy26FieldNumber = 26;
+ private bool hasDummy26;
+ private int dummy26_;
+ public bool HasDummy26 {
+ get { return hasDummy26; }
+ }
+ public int Dummy26 {
+ get { return dummy26_; }
+ }
+
+ public const int Dummy27FieldNumber = 27;
+ private bool hasDummy27;
+ private int dummy27_;
+ public bool HasDummy27 {
+ get { return hasDummy27; }
+ }
+ public int Dummy27 {
+ get { return dummy27_; }
+ }
+
+ public const int Dummy28FieldNumber = 28;
+ private bool hasDummy28;
+ private int dummy28_;
+ public bool HasDummy28 {
+ get { return hasDummy28; }
+ }
+ public int Dummy28 {
+ get { return dummy28_; }
+ }
+
+ public const int Dummy29FieldNumber = 29;
+ private bool hasDummy29;
+ private int dummy29_;
+ public bool HasDummy29 {
+ get { return hasDummy29; }
+ }
+ public int Dummy29 {
+ get { return dummy29_; }
+ }
+
+ public const int Dummy30FieldNumber = 30;
+ private bool hasDummy30;
+ private int dummy30_;
+ public bool HasDummy30 {
+ get { return hasDummy30; }
+ }
+ public int Dummy30 {
+ get { return dummy30_; }
+ }
+
+ public const int Dummy31FieldNumber = 31;
+ private bool hasDummy31;
+ private int dummy31_;
+ public bool HasDummy31 {
+ get { return hasDummy31; }
+ }
+ public int Dummy31 {
+ get { return dummy31_; }
+ }
+
+ public const int Dummy32FieldNumber = 32;
+ private bool hasDummy32;
+ private int dummy32_;
+ public bool HasDummy32 {
+ get { return hasDummy32; }
+ }
+ public int Dummy32 {
+ get { return dummy32_; }
+ }
+
+ public const int CFieldNumber = 33;
+ private bool hasC;
+ private int c_;
+ public bool HasC {
+ get { return hasC; }
+ }
+ public int C {
+ get { return c_; }
+ }
+
+ public override bool IsInitialized {
+ get {
+ if (!hasA) return false;
+ if (!hasB) return false;
+ if (!hasC) return false;
+ return true;
+ }
+ }
+
+ public override void WriteTo(pb::ICodedOutputStream output) {
+ CalcSerializedSize();
+ string[] field_names = _testRequiredFieldNames;
+ if (hasA) {
+ output.WriteInt32(1, field_names[0], A);
+ }
+ if (hasDummy2) {
+ output.WriteInt32(2, field_names[13], Dummy2);
+ }
+ if (hasB) {
+ output.WriteInt32(3, field_names[1], B);
+ }
+ if (hasDummy4) {
+ output.WriteInt32(4, field_names[27], Dummy4);
+ }
+ if (hasDummy5) {
+ output.WriteInt32(5, field_names[28], Dummy5);
+ }
+ if (hasDummy6) {
+ output.WriteInt32(6, field_names[29], Dummy6);
+ }
+ if (hasDummy7) {
+ output.WriteInt32(7, field_names[30], Dummy7);
+ }
+ if (hasDummy8) {
+ output.WriteInt32(8, field_names[31], Dummy8);
+ }
+ if (hasDummy9) {
+ output.WriteInt32(9, field_names[32], Dummy9);
+ }
+ if (hasDummy10) {
+ output.WriteInt32(10, field_names[3], Dummy10);
+ }
+ if (hasDummy11) {
+ output.WriteInt32(11, field_names[4], Dummy11);
+ }
+ if (hasDummy12) {
+ output.WriteInt32(12, field_names[5], Dummy12);
+ }
+ if (hasDummy13) {
+ output.WriteInt32(13, field_names[6], Dummy13);
+ }
+ if (hasDummy14) {
+ output.WriteInt32(14, field_names[7], Dummy14);
+ }
+ if (hasDummy15) {
+ output.WriteInt32(15, field_names[8], Dummy15);
+ }
+ if (hasDummy16) {
+ output.WriteInt32(16, field_names[9], Dummy16);
+ }
+ if (hasDummy17) {
+ output.WriteInt32(17, field_names[10], Dummy17);
+ }
+ if (hasDummy18) {
+ output.WriteInt32(18, field_names[11], Dummy18);
+ }
+ if (hasDummy19) {
+ output.WriteInt32(19, field_names[12], Dummy19);
+ }
+ if (hasDummy20) {
+ output.WriteInt32(20, field_names[14], Dummy20);
+ }
+ if (hasDummy21) {
+ output.WriteInt32(21, field_names[15], Dummy21);
+ }
+ if (hasDummy22) {
+ output.WriteInt32(22, field_names[16], Dummy22);
+ }
+ if (hasDummy23) {
+ output.WriteInt32(23, field_names[17], Dummy23);
+ }
+ if (hasDummy24) {
+ output.WriteInt32(24, field_names[18], Dummy24);
+ }
+ if (hasDummy25) {
+ output.WriteInt32(25, field_names[19], Dummy25);
+ }
+ if (hasDummy26) {
+ output.WriteInt32(26, field_names[20], Dummy26);
+ }
+ if (hasDummy27) {
+ output.WriteInt32(27, field_names[21], Dummy27);
+ }
+ if (hasDummy28) {
+ output.WriteInt32(28, field_names[22], Dummy28);
+ }
+ if (hasDummy29) {
+ output.WriteInt32(29, field_names[23], Dummy29);
+ }
+ if (hasDummy30) {
+ output.WriteInt32(30, field_names[24], Dummy30);
+ }
+ if (hasDummy31) {
+ output.WriteInt32(31, field_names[25], Dummy31);
+ }
+ if (hasDummy32) {
+ output.WriteInt32(32, field_names[26], Dummy32);
+ }
+ if (hasC) {
+ output.WriteInt32(33, field_names[2], C);
+ }
+ UnknownFields.WriteTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public override int SerializedSize {
+ get {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+ return CalcSerializedSize();
+ }
+ }
+
+ private int CalcSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (hasA) {
+ size += pb::CodedOutputStream.ComputeInt32Size(1, A);
+ }
+ if (hasDummy2) {
+ size += pb::CodedOutputStream.ComputeInt32Size(2, Dummy2);
+ }
+ if (hasB) {
+ size += pb::CodedOutputStream.ComputeInt32Size(3, B);
+ }
+ if (hasDummy4) {
+ size += pb::CodedOutputStream.ComputeInt32Size(4, Dummy4);
+ }
+ if (hasDummy5) {
+ size += pb::CodedOutputStream.ComputeInt32Size(5, Dummy5);
+ }
+ if (hasDummy6) {
+ size += pb::CodedOutputStream.ComputeInt32Size(6, Dummy6);
+ }
+ if (hasDummy7) {
+ size += pb::CodedOutputStream.ComputeInt32Size(7, Dummy7);
+ }
+ if (hasDummy8) {
+ size += pb::CodedOutputStream.ComputeInt32Size(8, Dummy8);
+ }
+ if (hasDummy9) {
+ size += pb::CodedOutputStream.ComputeInt32Size(9, Dummy9);
+ }
+ if (hasDummy10) {
+ size += pb::CodedOutputStream.ComputeInt32Size(10, Dummy10);
+ }
+ if (hasDummy11) {
+ size += pb::CodedOutputStream.ComputeInt32Size(11, Dummy11);
+ }
+ if (hasDummy12) {
+ size += pb::CodedOutputStream.ComputeInt32Size(12, Dummy12);
+ }
+ if (hasDummy13) {
+ size += pb::CodedOutputStream.ComputeInt32Size(13, Dummy13);
+ }
+ if (hasDummy14) {
+ size += pb::CodedOutputStream.ComputeInt32Size(14, Dummy14);
+ }
+ if (hasDummy15) {
+ size += pb::CodedOutputStream.ComputeInt32Size(15, Dummy15);
+ }
+ if (hasDummy16) {
+ size += pb::CodedOutputStream.ComputeInt32Size(16, Dummy16);
+ }
+ if (hasDummy17) {
+ size += pb::CodedOutputStream.ComputeInt32Size(17, Dummy17);
+ }
+ if (hasDummy18) {
+ size += pb::CodedOutputStream.ComputeInt32Size(18, Dummy18);
+ }
+ if (hasDummy19) {
+ size += pb::CodedOutputStream.ComputeInt32Size(19, Dummy19);
+ }
+ if (hasDummy20) {
+ size += pb::CodedOutputStream.ComputeInt32Size(20, Dummy20);
+ }
+ if (hasDummy21) {
+ size += pb::CodedOutputStream.ComputeInt32Size(21, Dummy21);
+ }
+ if (hasDummy22) {
+ size += pb::CodedOutputStream.ComputeInt32Size(22, Dummy22);
+ }
+ if (hasDummy23) {
+ size += pb::CodedOutputStream.ComputeInt32Size(23, Dummy23);
+ }
+ if (hasDummy24) {
+ size += pb::CodedOutputStream.ComputeInt32Size(24, Dummy24);
+ }
+ if (hasDummy25) {
+ size += pb::CodedOutputStream.ComputeInt32Size(25, Dummy25);
+ }
+ if (hasDummy26) {
+ size += pb::CodedOutputStream.ComputeInt32Size(26, Dummy26);
+ }
+ if (hasDummy27) {
+ size += pb::CodedOutputStream.ComputeInt32Size(27, Dummy27);
+ }
+ if (hasDummy28) {
+ size += pb::CodedOutputStream.ComputeInt32Size(28, Dummy28);
+ }
+ if (hasDummy29) {
+ size += pb::CodedOutputStream.ComputeInt32Size(29, Dummy29);
+ }
+ if (hasDummy30) {
+ size += pb::CodedOutputStream.ComputeInt32Size(30, Dummy30);
+ }
+ if (hasDummy31) {
+ size += pb::CodedOutputStream.ComputeInt32Size(31, Dummy31);
+ }
+ if (hasDummy32) {
+ size += pb::CodedOutputStream.ComputeInt32Size(32, Dummy32);
+ }
+ if (hasC) {
+ size += pb::CodedOutputStream.ComputeInt32Size(33, C);
+ }
+ size += UnknownFields.SerializedSize;
+ memoizedSerializedSize = size;
+ return size;
+ }
+ public static TestRequired ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static TestRequired ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static TestRequired ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static TestRequired ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static TestRequired ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static TestRequired ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static TestRequired ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static TestRequired ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static TestRequired ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static TestRequired ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private TestRequired 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(TestRequired prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Builder : pb::GeneratedBuilder<TestRequired, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(TestRequired cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private TestRequired result;
+
+ private TestRequired PrepareBuilder() {
+ if (resultIsReadOnly) {
+ TestRequired original = result;
+ result = new TestRequired();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override TestRequired 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.TestRequired.Descriptor; }
+ }
+
+ public override TestRequired DefaultInstanceForType {
+ get { return global::Google.ProtocolBuffers.TestProtos.TestRequired.DefaultInstance; }
+ }
+
+ public override TestRequired BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+ public override Builder MergeFrom(pb::IMessage other) {
+ if (other is TestRequired) {
+ return MergeFrom((TestRequired) other);
+ } else {
+ base.MergeFrom(other);
+ return this;
+ }
+ }
+
+ public override Builder MergeFrom(TestRequired other) {
+ if (other == global::Google.ProtocolBuffers.TestProtos.TestRequired.DefaultInstance) return this;
+ PrepareBuilder();
+ if (other.HasA) {
+ A = other.A;
+ }
+ if (other.HasDummy2) {
+ Dummy2 = other.Dummy2;
+ }
+ if (other.HasB) {
+ B = other.B;
+ }
+ if (other.HasDummy4) {
+ Dummy4 = other.Dummy4;
+ }
+ if (other.HasDummy5) {
+ Dummy5 = other.Dummy5;
+ }
+ if (other.HasDummy6) {
+ Dummy6 = other.Dummy6;
+ }
+ if (other.HasDummy7) {
+ Dummy7 = other.Dummy7;
+ }
+ if (other.HasDummy8) {
+ Dummy8 = other.Dummy8;
+ }
+ if (other.HasDummy9) {
+ Dummy9 = other.Dummy9;
+ }
+ if (other.HasDummy10) {
+ Dummy10 = other.Dummy10;
+ }
+ if (other.HasDummy11) {
+ Dummy11 = other.Dummy11;
+ }
+ if (other.HasDummy12) {
+ Dummy12 = other.Dummy12;
+ }
+ if (other.HasDummy13) {
+ Dummy13 = other.Dummy13;
+ }
+ if (other.HasDummy14) {
+ Dummy14 = other.Dummy14;
+ }
+ if (other.HasDummy15) {
+ Dummy15 = other.Dummy15;
+ }
+ if (other.HasDummy16) {
+ Dummy16 = other.Dummy16;
+ }
+ if (other.HasDummy17) {
+ Dummy17 = other.Dummy17;
+ }
+ if (other.HasDummy18) {
+ Dummy18 = other.Dummy18;
+ }
+ if (other.HasDummy19) {
+ Dummy19 = other.Dummy19;
+ }
+ if (other.HasDummy20) {
+ Dummy20 = other.Dummy20;
+ }
+ if (other.HasDummy21) {
+ Dummy21 = other.Dummy21;
+ }
+ if (other.HasDummy22) {
+ Dummy22 = other.Dummy22;
+ }
+ if (other.HasDummy23) {
+ Dummy23 = other.Dummy23;
+ }
+ if (other.HasDummy24) {
+ Dummy24 = other.Dummy24;
+ }
+ if (other.HasDummy25) {
+ Dummy25 = other.Dummy25;
+ }
+ if (other.HasDummy26) {
+ Dummy26 = other.Dummy26;
+ }
+ if (other.HasDummy27) {
+ Dummy27 = other.Dummy27;
+ }
+ if (other.HasDummy28) {
+ Dummy28 = other.Dummy28;
+ }
+ if (other.HasDummy29) {
+ Dummy29 = other.Dummy29;
+ }
+ if (other.HasDummy30) {
+ Dummy30 = other.Dummy30;
+ }
+ if (other.HasDummy31) {
+ Dummy31 = other.Dummy31;
+ }
+ if (other.HasDummy32) {
+ Dummy32 = other.Dummy32;
+ }
+ if (other.HasC) {
+ C = other.C;
+ }
+ 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(_testRequiredFieldNames, field_name, global::System.StringComparer.Ordinal);
+ if(field_ordinal >= 0)
+ tag = _testRequiredFieldTags[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.hasA = input.ReadInt32(ref result.a_);
+ break;
+ }
+ case 16: {
+ result.hasDummy2 = input.ReadInt32(ref result.dummy2_);
+ break;
+ }
+ case 24: {
+ result.hasB = input.ReadInt32(ref result.b_);
+ break;
+ }
+ case 32: {
+ result.hasDummy4 = input.ReadInt32(ref result.dummy4_);
+ break;
+ }
+ case 40: {
+ result.hasDummy5 = input.ReadInt32(ref result.dummy5_);
+ break;
+ }
+ case 48: {
+ result.hasDummy6 = input.ReadInt32(ref result.dummy6_);
+ break;
+ }
+ case 56: {
+ result.hasDummy7 = input.ReadInt32(ref result.dummy7_);
+ break;
+ }
+ case 64: {
+ result.hasDummy8 = input.ReadInt32(ref result.dummy8_);
+ break;
+ }
+ case 72: {
+ result.hasDummy9 = input.ReadInt32(ref result.dummy9_);
+ break;
+ }
+ case 80: {
+ result.hasDummy10 = input.ReadInt32(ref result.dummy10_);
+ break;
+ }
+ case 88: {
+ result.hasDummy11 = input.ReadInt32(ref result.dummy11_);
+ break;
+ }
+ case 96: {
+ result.hasDummy12 = input.ReadInt32(ref result.dummy12_);
+ break;
+ }
+ case 104: {
+ result.hasDummy13 = input.ReadInt32(ref result.dummy13_);
+ break;
+ }
+ case 112: {
+ result.hasDummy14 = input.ReadInt32(ref result.dummy14_);
+ break;
+ }
+ case 120: {
+ result.hasDummy15 = input.ReadInt32(ref result.dummy15_);
+ break;
+ }
+ case 128: {
+ result.hasDummy16 = input.ReadInt32(ref result.dummy16_);
+ break;
+ }
+ case 136: {
+ result.hasDummy17 = input.ReadInt32(ref result.dummy17_);
+ break;
+ }
+ case 144: {
+ result.hasDummy18 = input.ReadInt32(ref result.dummy18_);
+ break;
+ }
+ case 152: {
+ result.hasDummy19 = input.ReadInt32(ref result.dummy19_);
+ break;
+ }
+ case 160: {
+ result.hasDummy20 = input.ReadInt32(ref result.dummy20_);
+ break;
+ }
+ case 168: {
+ result.hasDummy21 = input.ReadInt32(ref result.dummy21_);
+ break;
+ }
+ case 176: {
+ result.hasDummy22 = input.ReadInt32(ref result.dummy22_);
+ break;
+ }
+ case 184: {
+ result.hasDummy23 = input.ReadInt32(ref result.dummy23_);
+ break;
+ }
+ case 192: {
+ result.hasDummy24 = input.ReadInt32(ref result.dummy24_);
+ break;
+ }
+ case 200: {
+ result.hasDummy25 = input.ReadInt32(ref result.dummy25_);
+ break;
+ }
+ case 208: {
+ result.hasDummy26 = input.ReadInt32(ref result.dummy26_);
+ break;
+ }
+ case 216: {
+ result.hasDummy27 = input.ReadInt32(ref result.dummy27_);
+ break;
+ }
+ case 224: {
+ result.hasDummy28 = input.ReadInt32(ref result.dummy28_);
+ break;
+ }
+ case 232: {
+ result.hasDummy29 = input.ReadInt32(ref result.dummy29_);
+ break;
+ }
+ case 240: {
+ result.hasDummy30 = input.ReadInt32(ref result.dummy30_);
+ break;
+ }
+ case 248: {
+ result.hasDummy31 = input.ReadInt32(ref result.dummy31_);
+ break;
+ }
+ case 256: {
+ result.hasDummy32 = input.ReadInt32(ref result.dummy32_);
+ break;
+ }
+ case 264: {
+ result.hasC = input.ReadInt32(ref result.c_);
+ break;
+ }
+ }
+ }
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
+ }
+
+
+ public bool HasA {
+ get { return result.hasA; }
+ }
+ public int A {
+ get { return result.A; }
+ set { SetA(value); }
+ }
+ public Builder SetA(int value) {
+ PrepareBuilder();
+ result.hasA = true;
+ result.a_ = value;
+ return this;
+ }
+ public Builder ClearA() {
+ PrepareBuilder();
+ result.hasA = false;
+ result.a_ = 0;
+ return this;
+ }
+
+ public bool HasDummy2 {
+ get { return result.hasDummy2; }
+ }
+ public int Dummy2 {
+ get { return result.Dummy2; }
+ set { SetDummy2(value); }
+ }
+ public Builder SetDummy2(int value) {
+ PrepareBuilder();
+ result.hasDummy2 = true;
+ result.dummy2_ = value;
+ return this;
+ }
+ public Builder ClearDummy2() {
+ PrepareBuilder();
+ result.hasDummy2 = false;
+ result.dummy2_ = 0;
+ return this;
+ }
+
+ public bool HasB {
+ get { return result.hasB; }
+ }
+ public int B {
+ get { return result.B; }
+ set { SetB(value); }
+ }
+ public Builder SetB(int value) {
+ PrepareBuilder();
+ result.hasB = true;
+ result.b_ = value;
+ return this;
+ }
+ public Builder ClearB() {
+ PrepareBuilder();
+ result.hasB = false;
+ result.b_ = 0;
+ return this;
+ }
+
+ public bool HasDummy4 {
+ get { return result.hasDummy4; }
+ }
+ public int Dummy4 {
+ get { return result.Dummy4; }
+ set { SetDummy4(value); }
+ }
+ public Builder SetDummy4(int value) {
+ PrepareBuilder();
+ result.hasDummy4 = true;
+ result.dummy4_ = value;
+ return this;
+ }
+ public Builder ClearDummy4() {
+ PrepareBuilder();
+ result.hasDummy4 = false;
+ result.dummy4_ = 0;
+ return this;
+ }
+
+ public bool HasDummy5 {
+ get { return result.hasDummy5; }
+ }
+ public int Dummy5 {
+ get { return result.Dummy5; }
+ set { SetDummy5(value); }
+ }
+ public Builder SetDummy5(int value) {
+ PrepareBuilder();
+ result.hasDummy5 = true;
+ result.dummy5_ = value;
+ return this;
+ }
+ public Builder ClearDummy5() {
+ PrepareBuilder();
+ result.hasDummy5 = false;
+ result.dummy5_ = 0;
+ return this;
+ }
+
+ public bool HasDummy6 {
+ get { return result.hasDummy6; }
+ }
+ public int Dummy6 {
+ get { return result.Dummy6; }
+ set { SetDummy6(value); }
+ }
+ public Builder SetDummy6(int value) {
+ PrepareBuilder();
+ result.hasDummy6 = true;
+ result.dummy6_ = value;
+ return this;
+ }
+ public Builder ClearDummy6() {
+ PrepareBuilder();
+ result.hasDummy6 = false;
+ result.dummy6_ = 0;
+ return this;
+ }
+
+ public bool HasDummy7 {
+ get { return result.hasDummy7; }
+ }
+ public int Dummy7 {
+ get { return result.Dummy7; }
+ set { SetDummy7(value); }
+ }
+ public Builder SetDummy7(int value) {
+ PrepareBuilder();
+ result.hasDummy7 = true;
+ result.dummy7_ = value;
+ return this;
+ }
+ public Builder ClearDummy7() {
+ PrepareBuilder();
+ result.hasDummy7 = false;
+ result.dummy7_ = 0;
+ return this;
+ }
+
+ public bool HasDummy8 {
+ get { return result.hasDummy8; }
+ }
+ public int Dummy8 {
+ get { return result.Dummy8; }
+ set { SetDummy8(value); }
+ }
+ public Builder SetDummy8(int value) {
+ PrepareBuilder();
+ result.hasDummy8 = true;
+ result.dummy8_ = value;
+ return this;
+ }
+ public Builder ClearDummy8() {
+ PrepareBuilder();
+ result.hasDummy8 = false;
+ result.dummy8_ = 0;
+ return this;
+ }
+
+ public bool HasDummy9 {
+ get { return result.hasDummy9; }
+ }
+ public int Dummy9 {
+ get { return result.Dummy9; }
+ set { SetDummy9(value); }
+ }
+ public Builder SetDummy9(int value) {
+ PrepareBuilder();
+ result.hasDummy9 = true;
+ result.dummy9_ = value;
+ return this;
+ }
+ public Builder ClearDummy9() {
+ PrepareBuilder();
+ result.hasDummy9 = false;
+ result.dummy9_ = 0;
+ return this;
+ }
+
+ public bool HasDummy10 {
+ get { return result.hasDummy10; }
+ }
+ public int Dummy10 {
+ get { return result.Dummy10; }
+ set { SetDummy10(value); }
+ }
+ public Builder SetDummy10(int value) {
+ PrepareBuilder();
+ result.hasDummy10 = true;
+ result.dummy10_ = value;
+ return this;
+ }
+ public Builder ClearDummy10() {
+ PrepareBuilder();
+ result.hasDummy10 = false;
+ result.dummy10_ = 0;
+ return this;
+ }
+
+ public bool HasDummy11 {
+ get { return result.hasDummy11; }
+ }
+ public int Dummy11 {
+ get { return result.Dummy11; }
+ set { SetDummy11(value); }
+ }
+ public Builder SetDummy11(int value) {
+ PrepareBuilder();
+ result.hasDummy11 = true;
+ result.dummy11_ = value;
+ return this;
+ }
+ public Builder ClearDummy11() {
+ PrepareBuilder();
+ result.hasDummy11 = false;
+ result.dummy11_ = 0;
+ return this;
+ }
+
+ public bool HasDummy12 {
+ get { return result.hasDummy12; }
+ }
+ public int Dummy12 {
+ get { return result.Dummy12; }
+ set { SetDummy12(value); }
+ }
+ public Builder SetDummy12(int value) {
+ PrepareBuilder();
+ result.hasDummy12 = true;
+ result.dummy12_ = value;
+ return this;
+ }
+ public Builder ClearDummy12() {
+ PrepareBuilder();
+ result.hasDummy12 = false;
+ result.dummy12_ = 0;
+ return this;
+ }
+
+ public bool HasDummy13 {
+ get { return result.hasDummy13; }
+ }
+ public int Dummy13 {
+ get { return result.Dummy13; }
+ set { SetDummy13(value); }
+ }
+ public Builder SetDummy13(int value) {
+ PrepareBuilder();
+ result.hasDummy13 = true;
+ result.dummy13_ = value;
+ return this;
+ }
+ public Builder ClearDummy13() {
+ PrepareBuilder();
+ result.hasDummy13 = false;
+ result.dummy13_ = 0;
+ return this;
+ }
+
+ public bool HasDummy14 {
+ get { return result.hasDummy14; }
+ }
+ public int Dummy14 {
+ get { return result.Dummy14; }
+ set { SetDummy14(value); }
+ }
+ public Builder SetDummy14(int value) {
+ PrepareBuilder();
+ result.hasDummy14 = true;
+ result.dummy14_ = value;
+ return this;
+ }
+ public Builder ClearDummy14() {
+ PrepareBuilder();
+ result.hasDummy14 = false;
+ result.dummy14_ = 0;
+ return this;
+ }
+
+ public bool HasDummy15 {
+ get { return result.hasDummy15; }
+ }
+ public int Dummy15 {
+ get { return result.Dummy15; }
+ set { SetDummy15(value); }
+ }
+ public Builder SetDummy15(int value) {
+ PrepareBuilder();
+ result.hasDummy15 = true;
+ result.dummy15_ = value;
+ return this;
+ }
+ public Builder ClearDummy15() {
+ PrepareBuilder();
+ result.hasDummy15 = false;
+ result.dummy15_ = 0;
+ return this;
+ }
+
+ public bool HasDummy16 {
+ get { return result.hasDummy16; }
+ }
+ public int Dummy16 {
+ get { return result.Dummy16; }
+ set { SetDummy16(value); }
+ }
+ public Builder SetDummy16(int value) {
+ PrepareBuilder();
+ result.hasDummy16 = true;
+ result.dummy16_ = value;
+ return this;
+ }
+ public Builder ClearDummy16() {
+ PrepareBuilder();
+ result.hasDummy16 = false;
+ result.dummy16_ = 0;
+ return this;
+ }
+
+ public bool HasDummy17 {
+ get { return result.hasDummy17; }
+ }
+ public int Dummy17 {
+ get { return result.Dummy17; }
+ set { SetDummy17(value); }
+ }
+ public Builder SetDummy17(int value) {
+ PrepareBuilder();
+ result.hasDummy17 = true;
+ result.dummy17_ = value;
+ return this;
+ }
+ public Builder ClearDummy17() {
+ PrepareBuilder();
+ result.hasDummy17 = false;
+ result.dummy17_ = 0;
+ return this;
+ }
+
+ public bool HasDummy18 {
+ get { return result.hasDummy18; }
+ }
+ public int Dummy18 {
+ get { return result.Dummy18; }
+ set { SetDummy18(value); }
+ }
+ public Builder SetDummy18(int value) {
+ PrepareBuilder();
+ result.hasDummy18 = true;
+ result.dummy18_ = value;
+ return this;
+ }
+ public Builder ClearDummy18() {
+ PrepareBuilder();
+ result.hasDummy18 = false;
+ result.dummy18_ = 0;
+ return this;
+ }
+
+ public bool HasDummy19 {
+ get { return result.hasDummy19; }
+ }
+ public int Dummy19 {
+ get { return result.Dummy19; }
+ set { SetDummy19(value); }
+ }
+ public Builder SetDummy19(int value) {
+ PrepareBuilder();
+ result.hasDummy19 = true;
+ result.dummy19_ = value;
+ return this;
+ }
+ public Builder ClearDummy19() {
+ PrepareBuilder();
+ result.hasDummy19 = false;
+ result.dummy19_ = 0;
+ return this;
+ }
+
+ public bool HasDummy20 {
+ get { return result.hasDummy20; }
+ }
+ public int Dummy20 {
+ get { return result.Dummy20; }
+ set { SetDummy20(value); }
+ }
+ public Builder SetDummy20(int value) {
+ PrepareBuilder();
+ result.hasDummy20 = true;
+ result.dummy20_ = value;
+ return this;
+ }
+ public Builder ClearDummy20() {
+ PrepareBuilder();
+ result.hasDummy20 = false;
+ result.dummy20_ = 0;
+ return this;
+ }
+
+ public bool HasDummy21 {
+ get { return result.hasDummy21; }
+ }
+ public int Dummy21 {
+ get { return result.Dummy21; }
+ set { SetDummy21(value); }
+ }
+ public Builder SetDummy21(int value) {
+ PrepareBuilder();
+ result.hasDummy21 = true;
+ result.dummy21_ = value;
+ return this;
+ }
+ public Builder ClearDummy21() {
+ PrepareBuilder();
+ result.hasDummy21 = false;
+ result.dummy21_ = 0;
+ return this;
+ }
+
+ public bool HasDummy22 {
+ get { return result.hasDummy22; }
+ }
+ public int Dummy22 {
+ get { return result.Dummy22; }
+ set { SetDummy22(value); }
+ }
+ public Builder SetDummy22(int value) {
+ PrepareBuilder();
+ result.hasDummy22 = true;
+ result.dummy22_ = value;
+ return this;
+ }
+ public Builder ClearDummy22() {
+ PrepareBuilder();
+ result.hasDummy22 = false;
+ result.dummy22_ = 0;
+ return this;
+ }
+
+ public bool HasDummy23 {
+ get { return result.hasDummy23; }
+ }
+ public int Dummy23 {
+ get { return result.Dummy23; }
+ set { SetDummy23(value); }
+ }
+ public Builder SetDummy23(int value) {
+ PrepareBuilder();
+ result.hasDummy23 = true;
+ result.dummy23_ = value;
+ return this;
+ }
+ public Builder ClearDummy23() {
+ PrepareBuilder();
+ result.hasDummy23 = false;
+ result.dummy23_ = 0;
+ return this;
+ }
+
+ public bool HasDummy24 {
+ get { return result.hasDummy24; }
+ }
+ public int Dummy24 {
+ get { return result.Dummy24; }
+ set { SetDummy24(value); }
+ }
+ public Builder SetDummy24(int value) {
+ PrepareBuilder();
+ result.hasDummy24 = true;
+ result.dummy24_ = value;
+ return this;
+ }
+ public Builder ClearDummy24() {
+ PrepareBuilder();
+ result.hasDummy24 = false;
+ result.dummy24_ = 0;
+ return this;
+ }
+
+ public bool HasDummy25 {
+ get { return result.hasDummy25; }
+ }
+ public int Dummy25 {
+ get { return result.Dummy25; }
+ set { SetDummy25(value); }
+ }
+ public Builder SetDummy25(int value) {
+ PrepareBuilder();
+ result.hasDummy25 = true;
+ result.dummy25_ = value;
+ return this;
+ }
+ public Builder ClearDummy25() {
+ PrepareBuilder();
+ result.hasDummy25 = false;
+ result.dummy25_ = 0;
+ return this;
+ }
+
+ public bool HasDummy26 {
+ get { return result.hasDummy26; }
+ }
+ public int Dummy26 {
+ get { return result.Dummy26; }
+ set { SetDummy26(value); }
+ }
+ public Builder SetDummy26(int value) {
+ PrepareBuilder();
+ result.hasDummy26 = true;
+ result.dummy26_ = value;
+ return this;
+ }
+ public Builder ClearDummy26() {
+ PrepareBuilder();
+ result.hasDummy26 = false;
+ result.dummy26_ = 0;
+ return this;
+ }
+
+ public bool HasDummy27 {
+ get { return result.hasDummy27; }
+ }
+ public int Dummy27 {
+ get { return result.Dummy27; }
+ set { SetDummy27(value); }
+ }
+ public Builder SetDummy27(int value) {
+ PrepareBuilder();
+ result.hasDummy27 = true;
+ result.dummy27_ = value;
+ return this;
+ }
+ public Builder ClearDummy27() {
+ PrepareBuilder();
+ result.hasDummy27 = false;
+ result.dummy27_ = 0;
+ return this;
+ }
+
+ public bool HasDummy28 {
+ get { return result.hasDummy28; }
+ }
+ public int Dummy28 {
+ get { return result.Dummy28; }
+ set { SetDummy28(value); }
+ }
+ public Builder SetDummy28(int value) {
+ PrepareBuilder();
+ result.hasDummy28 = true;
+ result.dummy28_ = value;
+ return this;
+ }
+ public Builder ClearDummy28() {
+ PrepareBuilder();
+ result.hasDummy28 = false;
+ result.dummy28_ = 0;
+ return this;
+ }
+
+ public bool HasDummy29 {
+ get { return result.hasDummy29; }
+ }
+ public int Dummy29 {
+ get { return result.Dummy29; }
+ set { SetDummy29(value); }
+ }
+ public Builder SetDummy29(int value) {
+ PrepareBuilder();
+ result.hasDummy29 = true;
+ result.dummy29_ = value;
+ return this;
+ }
+ public Builder ClearDummy29() {
+ PrepareBuilder();
+ result.hasDummy29 = false;
+ result.dummy29_ = 0;
+ return this;
+ }
+
+ public bool HasDummy30 {
+ get { return result.hasDummy30; }
+ }
+ public int Dummy30 {
+ get { return result.Dummy30; }
+ set { SetDummy30(value); }
+ }
+ public Builder SetDummy30(int value) {
+ PrepareBuilder();
+ result.hasDummy30 = true;
+ result.dummy30_ = value;
+ return this;
+ }
+ public Builder ClearDummy30() {
+ PrepareBuilder();
+ result.hasDummy30 = false;
+ result.dummy30_ = 0;
+ return this;
+ }
+
+ public bool HasDummy31 {
+ get { return result.hasDummy31; }
+ }
+ public int Dummy31 {
+ get { return result.Dummy31; }
+ set { SetDummy31(value); }
+ }
+ public Builder SetDummy31(int value) {
+ PrepareBuilder();
+ result.hasDummy31 = true;
+ result.dummy31_ = value;
+ return this;
+ }
+ public Builder ClearDummy31() {
+ PrepareBuilder();
+ result.hasDummy31 = false;
+ result.dummy31_ = 0;
+ return this;
+ }
+
+ public bool HasDummy32 {
+ get { return result.hasDummy32; }
+ }
+ public int Dummy32 {
+ get { return result.Dummy32; }
+ set { SetDummy32(value); }
+ }
+ public Builder SetDummy32(int value) {
+ PrepareBuilder();
+ result.hasDummy32 = true;
+ result.dummy32_ = value;
+ return this;
+ }
+ public Builder ClearDummy32() {
+ PrepareBuilder();
+ result.hasDummy32 = false;
+ result.dummy32_ = 0;
+ return this;
+ }
+
+ public bool HasC {
+ get { return result.hasC; }
+ }
+ public int C {
+ get { return result.C; }
+ set { SetC(value); }
+ }
+ public Builder SetC(int value) {
+ PrepareBuilder();
+ result.hasC = true;
+ result.c_ = value;
+ return this;
+ }
+ public Builder ClearC() {
+ PrepareBuilder();
+ result.hasC = false;
+ result.c_ = 0;
+ return this;
+ }
+ }
+ static TestRequired() {
+ object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor, null);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class TestRequiredForeign : pb::GeneratedMessage<TestRequiredForeign, TestRequiredForeign.Builder> {
+ private TestRequiredForeign() { }
+ private static readonly TestRequiredForeign defaultInstance = new TestRequiredForeign().MakeReadOnly();
+ private static readonly string[] _testRequiredForeignFieldNames = new string[] { "dummy", "optional_message", "repeated_message" };
+ private static readonly uint[] _testRequiredForeignFieldTags = new uint[] { 24, 10, 18 };
+ public static TestRequiredForeign DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override TestRequiredForeign DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override TestRequiredForeign ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestRequiredForeign__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<TestRequiredForeign, TestRequiredForeign.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestRequiredForeign__FieldAccessorTable; }
+ }
+
+ public const int OptionalMessageFieldNumber = 1;
+ private bool hasOptionalMessage;
+ private global::Google.ProtocolBuffers.TestProtos.TestRequired optionalMessage_;
+ public bool HasOptionalMessage {
+ get { return hasOptionalMessage; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestRequired OptionalMessage {
+ get { return optionalMessage_ ?? global::Google.ProtocolBuffers.TestProtos.TestRequired.DefaultInstance; }
+ }
+
+ public const int RepeatedMessageFieldNumber = 2;
+ private pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.TestRequired> repeatedMessage_ = new pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.TestRequired>();
+ public scg::IList<global::Google.ProtocolBuffers.TestProtos.TestRequired> RepeatedMessageList {
+ get { return repeatedMessage_; }
+ }
+ public int RepeatedMessageCount {
+ get { return repeatedMessage_.Count; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestRequired GetRepeatedMessage(int index) {
+ return repeatedMessage_[index];
+ }
+
+ public const int DummyFieldNumber = 3;
+ private bool hasDummy;
+ private int dummy_;
+ public bool HasDummy {
+ get { return hasDummy; }
+ }
+ public int Dummy {
+ get { return dummy_; }
+ }
+
+ public override bool IsInitialized {
+ get {
+ if (HasOptionalMessage) {
+ if (!OptionalMessage.IsInitialized) return false;
+ }
+ foreach (global::Google.ProtocolBuffers.TestProtos.TestRequired element in RepeatedMessageList) {
+ if (!element.IsInitialized) return false;
+ }
+ return true;
+ }
+ }
+
+ public override void WriteTo(pb::ICodedOutputStream output) {
+ CalcSerializedSize();
+ string[] field_names = _testRequiredForeignFieldNames;
+ if (hasOptionalMessage) {
+ output.WriteMessage(1, field_names[1], OptionalMessage);
+ }
+ if (repeatedMessage_.Count > 0) {
+ output.WriteMessageArray(2, field_names[2], repeatedMessage_);
+ }
+ if (hasDummy) {
+ output.WriteInt32(3, field_names[0], Dummy);
+ }
+ UnknownFields.WriteTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public override int SerializedSize {
+ get {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+ return CalcSerializedSize();
+ }
+ }
+
+ private int CalcSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (hasOptionalMessage) {
+ size += pb::CodedOutputStream.ComputeMessageSize(1, OptionalMessage);
+ }
+ foreach (global::Google.ProtocolBuffers.TestProtos.TestRequired element in RepeatedMessageList) {
+ size += pb::CodedOutputStream.ComputeMessageSize(2, element);
+ }
+ if (hasDummy) {
+ size += pb::CodedOutputStream.ComputeInt32Size(3, Dummy);
+ }
+ size += UnknownFields.SerializedSize;
+ memoizedSerializedSize = size;
+ return size;
+ }
+ public static TestRequiredForeign ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static TestRequiredForeign ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static TestRequiredForeign ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static TestRequiredForeign ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static TestRequiredForeign ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static TestRequiredForeign ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static TestRequiredForeign ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static TestRequiredForeign ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static TestRequiredForeign ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static TestRequiredForeign ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private TestRequiredForeign MakeReadOnly() {
+ repeatedMessage_.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(TestRequiredForeign prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Builder : pb::GeneratedBuilder<TestRequiredForeign, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(TestRequiredForeign cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private TestRequiredForeign result;
+
+ private TestRequiredForeign PrepareBuilder() {
+ if (resultIsReadOnly) {
+ TestRequiredForeign original = result;
+ result = new TestRequiredForeign();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override TestRequiredForeign 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.TestRequiredForeign.Descriptor; }
+ }
+
+ public override TestRequiredForeign DefaultInstanceForType {
+ get { return global::Google.ProtocolBuffers.TestProtos.TestRequiredForeign.DefaultInstance; }
+ }
+
+ public override TestRequiredForeign BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+ public override Builder MergeFrom(pb::IMessage other) {
+ if (other is TestRequiredForeign) {
+ return MergeFrom((TestRequiredForeign) other);
+ } else {
+ base.MergeFrom(other);
+ return this;
+ }
+ }
+
+ public override Builder MergeFrom(TestRequiredForeign other) {
+ if (other == global::Google.ProtocolBuffers.TestProtos.TestRequiredForeign.DefaultInstance) return this;
+ PrepareBuilder();
+ if (other.HasOptionalMessage) {
+ MergeOptionalMessage(other.OptionalMessage);
+ }
+ if (other.repeatedMessage_.Count != 0) {
+ result.repeatedMessage_.Add(other.repeatedMessage_);
+ }
+ if (other.HasDummy) {
+ Dummy = other.Dummy;
+ }
+ 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(_testRequiredForeignFieldNames, field_name, global::System.StringComparer.Ordinal);
+ if(field_ordinal >= 0)
+ tag = _testRequiredForeignFieldTags[field_ordinal];
+ else {
+ if (unknownFields == null) {
+ unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+ }
+ ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
+ continue;
+ }
+ }
+ switch (tag) {
+ case 0: {
+ throw pb::InvalidProtocolBufferException.InvalidTag();
+ }
+ default: {
+ if (pb::WireFormat.IsEndGroupTag(tag)) {
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
+ }
+ if (unknownFields == null) {
+ unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+ }
+ ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
+ break;
+ }
+ case 10: {
+ global::Google.ProtocolBuffers.TestProtos.TestRequired.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.TestRequired.CreateBuilder();
+ if (result.hasOptionalMessage) {
+ subBuilder.MergeFrom(OptionalMessage);
+ }
+ input.ReadMessage(subBuilder, extensionRegistry);
+ OptionalMessage = subBuilder.BuildPartial();
+ break;
+ }
+ case 18: {
+ input.ReadMessageArray(tag, field_name, result.repeatedMessage_, global::Google.ProtocolBuffers.TestProtos.TestRequired.DefaultInstance, extensionRegistry);
+ break;
+ }
+ case 24: {
+ result.hasDummy = input.ReadInt32(ref result.dummy_);
+ break;
+ }
+ }
+ }
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
+ }
+
+
+ public bool HasOptionalMessage {
+ get { return result.hasOptionalMessage; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestRequired OptionalMessage {
+ get { return result.OptionalMessage; }
+ set { SetOptionalMessage(value); }
+ }
+ public Builder SetOptionalMessage(global::Google.ProtocolBuffers.TestProtos.TestRequired value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasOptionalMessage = true;
+ result.optionalMessage_ = value;
+ return this;
+ }
+ public Builder SetOptionalMessage(global::Google.ProtocolBuffers.TestProtos.TestRequired.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.hasOptionalMessage = true;
+ result.optionalMessage_ = builderForValue.Build();
+ return this;
+ }
+ public Builder MergeOptionalMessage(global::Google.ProtocolBuffers.TestProtos.TestRequired value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ if (result.hasOptionalMessage &&
+ result.optionalMessage_ != global::Google.ProtocolBuffers.TestProtos.TestRequired.DefaultInstance) {
+ result.optionalMessage_ = global::Google.ProtocolBuffers.TestProtos.TestRequired.CreateBuilder(result.optionalMessage_).MergeFrom(value).BuildPartial();
+ } else {
+ result.optionalMessage_ = value;
+ }
+ result.hasOptionalMessage = true;
+ return this;
+ }
+ public Builder ClearOptionalMessage() {
+ PrepareBuilder();
+ result.hasOptionalMessage = false;
+ result.optionalMessage_ = null;
+ return this;
+ }
+
+ public pbc::IPopsicleList<global::Google.ProtocolBuffers.TestProtos.TestRequired> RepeatedMessageList {
+ get { return PrepareBuilder().repeatedMessage_; }
+ }
+ public int RepeatedMessageCount {
+ get { return result.RepeatedMessageCount; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestRequired GetRepeatedMessage(int index) {
+ return result.GetRepeatedMessage(index);
+ }
+ public Builder SetRepeatedMessage(int index, global::Google.ProtocolBuffers.TestProtos.TestRequired value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.repeatedMessage_[index] = value;
+ return this;
+ }
+ public Builder SetRepeatedMessage(int index, global::Google.ProtocolBuffers.TestProtos.TestRequired.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.repeatedMessage_[index] = builderForValue.Build();
+ return this;
+ }
+ public Builder AddRepeatedMessage(global::Google.ProtocolBuffers.TestProtos.TestRequired value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.repeatedMessage_.Add(value);
+ return this;
+ }
+ public Builder AddRepeatedMessage(global::Google.ProtocolBuffers.TestProtos.TestRequired.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.repeatedMessage_.Add(builderForValue.Build());
+ return this;
+ }
+ public Builder AddRangeRepeatedMessage(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.TestRequired> values) {
+ PrepareBuilder();
+ result.repeatedMessage_.Add(values);
+ return this;
+ }
+ public Builder ClearRepeatedMessage() {
+ PrepareBuilder();
+ result.repeatedMessage_.Clear();
+ return this;
+ }
+
+ public bool HasDummy {
+ get { return result.hasDummy; }
+ }
+ public int Dummy {
+ get { return result.Dummy; }
+ set { SetDummy(value); }
+ }
+ public Builder SetDummy(int value) {
+ PrepareBuilder();
+ result.hasDummy = true;
+ result.dummy_ = value;
+ return this;
+ }
+ public Builder ClearDummy() {
+ PrepareBuilder();
+ result.hasDummy = false;
+ result.dummy_ = 0;
+ return this;
+ }
+ }
+ static TestRequiredForeign() {
+ object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor, null);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class TestForeignNested : pb::GeneratedMessage<TestForeignNested, TestForeignNested.Builder> {
+ private TestForeignNested() { }
+ private static readonly TestForeignNested defaultInstance = new TestForeignNested().MakeReadOnly();
+ private static readonly string[] _testForeignNestedFieldNames = new string[] { "foreign_nested" };
+ private static readonly uint[] _testForeignNestedFieldTags = new uint[] { 10 };
+ public static TestForeignNested DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override TestForeignNested DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override TestForeignNested ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestForeignNested__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<TestForeignNested, TestForeignNested.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestForeignNested__FieldAccessorTable; }
+ }
+
+ public const int ForeignNestedFieldNumber = 1;
+ private bool hasForeignNested;
+ private global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage foreignNested_;
+ public bool HasForeignNested {
+ get { return hasForeignNested; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage ForeignNested {
+ get { return foreignNested_ ?? global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage.DefaultInstance; }
+ }
+
+ public override bool IsInitialized {
+ get {
+ return true;
+ }
+ }
+
+ public override void WriteTo(pb::ICodedOutputStream output) {
+ CalcSerializedSize();
+ string[] field_names = _testForeignNestedFieldNames;
+ if (hasForeignNested) {
+ output.WriteMessage(1, field_names[0], ForeignNested);
+ }
+ UnknownFields.WriteTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public override int SerializedSize {
+ get {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+ return CalcSerializedSize();
+ }
+ }
+
+ private int CalcSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (hasForeignNested) {
+ size += pb::CodedOutputStream.ComputeMessageSize(1, ForeignNested);
+ }
+ size += UnknownFields.SerializedSize;
+ memoizedSerializedSize = size;
+ return size;
+ }
+ public static TestForeignNested ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static TestForeignNested ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static TestForeignNested ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static TestForeignNested ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static TestForeignNested ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static TestForeignNested ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static TestForeignNested ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static TestForeignNested ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static TestForeignNested ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static TestForeignNested ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private TestForeignNested 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(TestForeignNested prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Builder : pb::GeneratedBuilder<TestForeignNested, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(TestForeignNested cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private TestForeignNested result;
+
+ private TestForeignNested PrepareBuilder() {
+ if (resultIsReadOnly) {
+ TestForeignNested original = result;
+ result = new TestForeignNested();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override TestForeignNested 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.TestForeignNested.Descriptor; }
+ }
+
+ public override TestForeignNested DefaultInstanceForType {
+ get { return global::Google.ProtocolBuffers.TestProtos.TestForeignNested.DefaultInstance; }
+ }
+
+ public override TestForeignNested BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+ public override Builder MergeFrom(pb::IMessage other) {
+ if (other is TestForeignNested) {
+ return MergeFrom((TestForeignNested) other);
+ } else {
+ base.MergeFrom(other);
+ return this;
+ }
+ }
+
+ public override Builder MergeFrom(TestForeignNested other) {
+ if (other == global::Google.ProtocolBuffers.TestProtos.TestForeignNested.DefaultInstance) return this;
+ PrepareBuilder();
+ if (other.HasForeignNested) {
+ MergeForeignNested(other.ForeignNested);
+ }
+ 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(_testForeignNestedFieldNames, field_name, global::System.StringComparer.Ordinal);
+ if(field_ordinal >= 0)
+ tag = _testForeignNestedFieldTags[field_ordinal];
+ else {
+ if (unknownFields == null) {
+ unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+ }
+ ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
+ continue;
+ }
+ }
+ switch (tag) {
+ case 0: {
+ throw pb::InvalidProtocolBufferException.InvalidTag();
+ }
+ default: {
+ if (pb::WireFormat.IsEndGroupTag(tag)) {
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
+ }
+ if (unknownFields == null) {
+ unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+ }
+ ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
+ break;
+ }
+ case 10: {
+ global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage.CreateBuilder();
+ if (result.hasForeignNested) {
+ subBuilder.MergeFrom(ForeignNested);
+ }
+ input.ReadMessage(subBuilder, extensionRegistry);
+ ForeignNested = subBuilder.BuildPartial();
+ break;
+ }
+ }
+ }
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
+ }
+
+
+ public bool HasForeignNested {
+ get { return result.hasForeignNested; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage ForeignNested {
+ get { return result.ForeignNested; }
+ set { SetForeignNested(value); }
+ }
+ public Builder SetForeignNested(global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasForeignNested = true;
+ result.foreignNested_ = value;
+ return this;
+ }
+ public Builder SetForeignNested(global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.hasForeignNested = true;
+ result.foreignNested_ = builderForValue.Build();
+ return this;
+ }
+ public Builder MergeForeignNested(global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ if (result.hasForeignNested &&
+ result.foreignNested_ != global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage.DefaultInstance) {
+ result.foreignNested_ = global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage.CreateBuilder(result.foreignNested_).MergeFrom(value).BuildPartial();
+ } else {
+ result.foreignNested_ = value;
+ }
+ result.hasForeignNested = true;
+ return this;
+ }
+ public Builder ClearForeignNested() {
+ PrepareBuilder();
+ result.hasForeignNested = false;
+ result.foreignNested_ = null;
+ return this;
+ }
+ }
+ static TestForeignNested() {
+ object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor, null);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class TestEmptyMessage : pb::GeneratedMessage<TestEmptyMessage, TestEmptyMessage.Builder> {
+ private TestEmptyMessage() { }
+ private static readonly TestEmptyMessage defaultInstance = new TestEmptyMessage().MakeReadOnly();
+ private static readonly string[] _testEmptyMessageFieldNames = new string[] { };
+ private static readonly uint[] _testEmptyMessageFieldTags = new uint[] { };
+ public static TestEmptyMessage DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override TestEmptyMessage DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override TestEmptyMessage ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestEmptyMessage__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<TestEmptyMessage, TestEmptyMessage.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestEmptyMessage__FieldAccessorTable; }
+ }
+
+ public override bool IsInitialized {
+ get {
+ return true;
+ }
+ }
+
+ public override void WriteTo(pb::ICodedOutputStream output) {
+ CalcSerializedSize();
+ string[] field_names = _testEmptyMessageFieldNames;
+ UnknownFields.WriteTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public override int SerializedSize {
+ get {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+ return CalcSerializedSize();
+ }
+ }
+
+ private int CalcSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ size += UnknownFields.SerializedSize;
+ memoizedSerializedSize = size;
+ return size;
+ }
+ public static TestEmptyMessage ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static TestEmptyMessage ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static TestEmptyMessage ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static TestEmptyMessage ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static TestEmptyMessage ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static TestEmptyMessage ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static TestEmptyMessage ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static TestEmptyMessage ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static TestEmptyMessage ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static TestEmptyMessage ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private TestEmptyMessage 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(TestEmptyMessage prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Builder : pb::GeneratedBuilder<TestEmptyMessage, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(TestEmptyMessage cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private TestEmptyMessage result;
+
+ private TestEmptyMessage PrepareBuilder() {
+ if (resultIsReadOnly) {
+ TestEmptyMessage original = result;
+ result = new TestEmptyMessage();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override TestEmptyMessage 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.TestEmptyMessage.Descriptor; }
+ }
+
+ public override TestEmptyMessage DefaultInstanceForType {
+ get { return global::Google.ProtocolBuffers.TestProtos.TestEmptyMessage.DefaultInstance; }
+ }
+
+ public override TestEmptyMessage BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+ public override Builder MergeFrom(pb::IMessage other) {
+ if (other is TestEmptyMessage) {
+ return MergeFrom((TestEmptyMessage) other);
+ } else {
+ base.MergeFrom(other);
+ return this;
+ }
+ }
+
+ public override Builder MergeFrom(TestEmptyMessage other) {
+ if (other == global::Google.ProtocolBuffers.TestProtos.TestEmptyMessage.DefaultInstance) return this;
+ PrepareBuilder();
+ this.MergeUnknownFields(other.UnknownFields);
+ return this;
+ }
+
+ public override Builder MergeFrom(pb::ICodedInputStream input) {
+ return MergeFrom(input, pb::ExtensionRegistry.Empty);
+ }
+
+ public override Builder MergeFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ PrepareBuilder();
+ pb::UnknownFieldSet.Builder unknownFields = null;
+ uint tag;
+ string field_name;
+ while (input.ReadTag(out tag, out field_name)) {
+ if(tag == 0 && field_name != null) {
+ int field_ordinal = global::System.Array.BinarySearch(_testEmptyMessageFieldNames, field_name, global::System.StringComparer.Ordinal);
+ if(field_ordinal >= 0)
+ tag = _testEmptyMessageFieldTags[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 TestEmptyMessage() {
+ object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor, null);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class TestEmptyMessageWithExtensions : pb::ExtendableMessage<TestEmptyMessageWithExtensions, TestEmptyMessageWithExtensions.Builder> {
+ private TestEmptyMessageWithExtensions() { }
+ private static readonly TestEmptyMessageWithExtensions defaultInstance = new TestEmptyMessageWithExtensions().MakeReadOnly();
+ private static readonly string[] _testEmptyMessageWithExtensionsFieldNames = new string[] { };
+ private static readonly uint[] _testEmptyMessageWithExtensionsFieldTags = new uint[] { };
+ public static TestEmptyMessageWithExtensions DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override TestEmptyMessageWithExtensions DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override TestEmptyMessageWithExtensions ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestEmptyMessageWithExtensions__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<TestEmptyMessageWithExtensions, TestEmptyMessageWithExtensions.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestEmptyMessageWithExtensions__FieldAccessorTable; }
+ }
+
+ public override bool IsInitialized {
+ get {
+ if (!ExtensionsAreInitialized) return false;
+ return true;
+ }
+ }
+
+ public override void WriteTo(pb::ICodedOutputStream output) {
+ CalcSerializedSize();
+ string[] field_names = _testEmptyMessageWithExtensionsFieldNames;
+ pb::ExtendableMessage<TestEmptyMessageWithExtensions, TestEmptyMessageWithExtensions.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;
+ return CalcSerializedSize();
+ }
+ }
+
+ private int CalcSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ size += ExtensionsSerializedSize;
+ size += UnknownFields.SerializedSize;
+ memoizedSerializedSize = size;
+ return size;
+ }
+ public static TestEmptyMessageWithExtensions ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static TestEmptyMessageWithExtensions ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static TestEmptyMessageWithExtensions ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static TestEmptyMessageWithExtensions ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static TestEmptyMessageWithExtensions ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static TestEmptyMessageWithExtensions ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static TestEmptyMessageWithExtensions ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static TestEmptyMessageWithExtensions ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static TestEmptyMessageWithExtensions ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static TestEmptyMessageWithExtensions ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private TestEmptyMessageWithExtensions 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(TestEmptyMessageWithExtensions prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Builder : pb::ExtendableBuilder<TestEmptyMessageWithExtensions, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(TestEmptyMessageWithExtensions cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private TestEmptyMessageWithExtensions result;
+
+ private TestEmptyMessageWithExtensions PrepareBuilder() {
+ if (resultIsReadOnly) {
+ TestEmptyMessageWithExtensions original = result;
+ result = new TestEmptyMessageWithExtensions();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override TestEmptyMessageWithExtensions 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.TestEmptyMessageWithExtensions.Descriptor; }
+ }
+
+ public override TestEmptyMessageWithExtensions DefaultInstanceForType {
+ get { return global::Google.ProtocolBuffers.TestProtos.TestEmptyMessageWithExtensions.DefaultInstance; }
+ }
+
+ public override TestEmptyMessageWithExtensions BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+ public override Builder MergeFrom(pb::IMessage other) {
+ if (other is TestEmptyMessageWithExtensions) {
+ return MergeFrom((TestEmptyMessageWithExtensions) other);
+ } else {
+ base.MergeFrom(other);
+ return this;
+ }
+ }
+
+ public override Builder MergeFrom(TestEmptyMessageWithExtensions other) {
+ if (other == global::Google.ProtocolBuffers.TestProtos.TestEmptyMessageWithExtensions.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(_testEmptyMessageWithExtensionsFieldNames, field_name, global::System.StringComparer.Ordinal);
+ if(field_ordinal >= 0)
+ tag = _testEmptyMessageWithExtensionsFieldTags[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 TestEmptyMessageWithExtensions() {
+ object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor, null);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class TestMultipleExtensionRanges : pb::ExtendableMessage<TestMultipleExtensionRanges, TestMultipleExtensionRanges.Builder> {
+ private TestMultipleExtensionRanges() { }
+ private static readonly TestMultipleExtensionRanges defaultInstance = new TestMultipleExtensionRanges().MakeReadOnly();
+ private static readonly string[] _testMultipleExtensionRangesFieldNames = new string[] { };
+ private static readonly uint[] _testMultipleExtensionRangesFieldTags = new uint[] { };
+ public static TestMultipleExtensionRanges DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override TestMultipleExtensionRanges DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override TestMultipleExtensionRanges ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestMultipleExtensionRanges__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<TestMultipleExtensionRanges, TestMultipleExtensionRanges.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestMultipleExtensionRanges__FieldAccessorTable; }
+ }
+
+ public override bool IsInitialized {
+ get {
+ if (!ExtensionsAreInitialized) return false;
+ return true;
+ }
+ }
+
+ public override void WriteTo(pb::ICodedOutputStream output) {
+ CalcSerializedSize();
+ string[] field_names = _testMultipleExtensionRangesFieldNames;
+ pb::ExtendableMessage<TestMultipleExtensionRanges, TestMultipleExtensionRanges.Builder>.ExtensionWriter extensionWriter = CreateExtensionWriter(this);
+ extensionWriter.WriteUntil(43, output);
+ extensionWriter.WriteUntil(4244, output);
+ extensionWriter.WriteUntil(536870912, output);
+ UnknownFields.WriteTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public override int SerializedSize {
+ get {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+ return CalcSerializedSize();
+ }
+ }
+
+ private int CalcSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ size += ExtensionsSerializedSize;
+ size += UnknownFields.SerializedSize;
+ memoizedSerializedSize = size;
+ return size;
+ }
+ public static TestMultipleExtensionRanges ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static TestMultipleExtensionRanges ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static TestMultipleExtensionRanges ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static TestMultipleExtensionRanges ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static TestMultipleExtensionRanges ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static TestMultipleExtensionRanges ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static TestMultipleExtensionRanges ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static TestMultipleExtensionRanges ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static TestMultipleExtensionRanges ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static TestMultipleExtensionRanges ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private TestMultipleExtensionRanges 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(TestMultipleExtensionRanges prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Builder : pb::ExtendableBuilder<TestMultipleExtensionRanges, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(TestMultipleExtensionRanges cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private TestMultipleExtensionRanges result;
+
+ private TestMultipleExtensionRanges PrepareBuilder() {
+ if (resultIsReadOnly) {
+ TestMultipleExtensionRanges original = result;
+ result = new TestMultipleExtensionRanges();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override TestMultipleExtensionRanges 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.TestMultipleExtensionRanges.Descriptor; }
+ }
+
+ public override TestMultipleExtensionRanges DefaultInstanceForType {
+ get { return global::Google.ProtocolBuffers.TestProtos.TestMultipleExtensionRanges.DefaultInstance; }
+ }
+
+ public override TestMultipleExtensionRanges BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+ public override Builder MergeFrom(pb::IMessage other) {
+ if (other is TestMultipleExtensionRanges) {
+ return MergeFrom((TestMultipleExtensionRanges) other);
+ } else {
+ base.MergeFrom(other);
+ return this;
+ }
+ }
+
+ public override Builder MergeFrom(TestMultipleExtensionRanges other) {
+ if (other == global::Google.ProtocolBuffers.TestProtos.TestMultipleExtensionRanges.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(_testMultipleExtensionRangesFieldNames, field_name, global::System.StringComparer.Ordinal);
+ if(field_ordinal >= 0)
+ tag = _testMultipleExtensionRangesFieldTags[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 TestMultipleExtensionRanges() {
+ object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor, null);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class TestReallyLargeTagNumber : pb::GeneratedMessage<TestReallyLargeTagNumber, TestReallyLargeTagNumber.Builder> {
+ private TestReallyLargeTagNumber() { }
+ private static readonly TestReallyLargeTagNumber defaultInstance = new TestReallyLargeTagNumber().MakeReadOnly();
+ private static readonly string[] _testReallyLargeTagNumberFieldNames = new string[] { "a", "bb" };
+ private static readonly uint[] _testReallyLargeTagNumberFieldTags = new uint[] { 8, 2147483640 };
+ public static TestReallyLargeTagNumber DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override TestReallyLargeTagNumber DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override TestReallyLargeTagNumber ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestReallyLargeTagNumber__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<TestReallyLargeTagNumber, TestReallyLargeTagNumber.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestReallyLargeTagNumber__FieldAccessorTable; }
+ }
+
+ public const int AFieldNumber = 1;
+ private bool hasA;
+ private int a_;
+ public bool HasA {
+ get { return hasA; }
+ }
+ public int A {
+ get { return a_; }
+ }
+
+ public const int BbFieldNumber = 268435455;
+ private bool hasBb;
+ private int bb_;
+ public bool HasBb {
+ get { return hasBb; }
+ }
+ public int Bb {
+ get { return bb_; }
+ }
+
+ public override bool IsInitialized {
+ get {
+ return true;
+ }
+ }
+
+ public override void WriteTo(pb::ICodedOutputStream output) {
+ CalcSerializedSize();
+ string[] field_names = _testReallyLargeTagNumberFieldNames;
+ if (hasA) {
+ output.WriteInt32(1, field_names[0], A);
+ }
+ if (hasBb) {
+ output.WriteInt32(268435455, field_names[1], Bb);
+ }
+ UnknownFields.WriteTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public override int SerializedSize {
+ get {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+ return CalcSerializedSize();
+ }
+ }
+
+ private int CalcSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (hasA) {
+ size += pb::CodedOutputStream.ComputeInt32Size(1, A);
+ }
+ if (hasBb) {
+ size += pb::CodedOutputStream.ComputeInt32Size(268435455, Bb);
+ }
+ size += UnknownFields.SerializedSize;
+ memoizedSerializedSize = size;
+ return size;
+ }
+ public static TestReallyLargeTagNumber ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static TestReallyLargeTagNumber ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static TestReallyLargeTagNumber ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static TestReallyLargeTagNumber ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static TestReallyLargeTagNumber ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static TestReallyLargeTagNumber ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static TestReallyLargeTagNumber ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static TestReallyLargeTagNumber ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static TestReallyLargeTagNumber ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static TestReallyLargeTagNumber ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private TestReallyLargeTagNumber 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(TestReallyLargeTagNumber prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Builder : pb::GeneratedBuilder<TestReallyLargeTagNumber, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(TestReallyLargeTagNumber cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private TestReallyLargeTagNumber result;
+
+ private TestReallyLargeTagNumber PrepareBuilder() {
+ if (resultIsReadOnly) {
+ TestReallyLargeTagNumber original = result;
+ result = new TestReallyLargeTagNumber();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override TestReallyLargeTagNumber 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.TestReallyLargeTagNumber.Descriptor; }
+ }
+
+ public override TestReallyLargeTagNumber DefaultInstanceForType {
+ get { return global::Google.ProtocolBuffers.TestProtos.TestReallyLargeTagNumber.DefaultInstance; }
+ }
+
+ public override TestReallyLargeTagNumber BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+ public override Builder MergeFrom(pb::IMessage other) {
+ if (other is TestReallyLargeTagNumber) {
+ return MergeFrom((TestReallyLargeTagNumber) other);
+ } else {
+ base.MergeFrom(other);
+ return this;
+ }
+ }
+
+ public override Builder MergeFrom(TestReallyLargeTagNumber other) {
+ if (other == global::Google.ProtocolBuffers.TestProtos.TestReallyLargeTagNumber.DefaultInstance) return this;
+ PrepareBuilder();
+ if (other.HasA) {
+ A = other.A;
+ }
+ if (other.HasBb) {
+ Bb = other.Bb;
+ }
+ 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(_testReallyLargeTagNumberFieldNames, field_name, global::System.StringComparer.Ordinal);
+ if(field_ordinal >= 0)
+ tag = _testReallyLargeTagNumberFieldTags[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.hasA = input.ReadInt32(ref result.a_);
+ break;
+ }
+ case 2147483640: {
+ result.hasBb = input.ReadInt32(ref result.bb_);
+ break;
+ }
+ }
+ }
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
+ }
+
+
+ public bool HasA {
+ get { return result.hasA; }
+ }
+ public int A {
+ get { return result.A; }
+ set { SetA(value); }
+ }
+ public Builder SetA(int value) {
+ PrepareBuilder();
+ result.hasA = true;
+ result.a_ = value;
+ return this;
+ }
+ public Builder ClearA() {
+ PrepareBuilder();
+ result.hasA = false;
+ result.a_ = 0;
+ return this;
+ }
+
+ public bool HasBb {
+ get { return result.hasBb; }
+ }
+ public int Bb {
+ get { return result.Bb; }
+ set { SetBb(value); }
+ }
+ public Builder SetBb(int value) {
+ PrepareBuilder();
+ result.hasBb = true;
+ result.bb_ = value;
+ return this;
+ }
+ public Builder ClearBb() {
+ PrepareBuilder();
+ result.hasBb = false;
+ result.bb_ = 0;
+ return this;
+ }
+ }
+ static TestReallyLargeTagNumber() {
+ object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor, null);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class TestRecursiveMessage : pb::GeneratedMessage<TestRecursiveMessage, TestRecursiveMessage.Builder> {
+ private TestRecursiveMessage() { }
+ private static readonly TestRecursiveMessage defaultInstance = new TestRecursiveMessage().MakeReadOnly();
+ private static readonly string[] _testRecursiveMessageFieldNames = new string[] { "a", "i" };
+ private static readonly uint[] _testRecursiveMessageFieldTags = new uint[] { 10, 16 };
+ public static TestRecursiveMessage DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override TestRecursiveMessage DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override TestRecursiveMessage ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestRecursiveMessage__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<TestRecursiveMessage, TestRecursiveMessage.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestRecursiveMessage__FieldAccessorTable; }
+ }
+
+ public const int AFieldNumber = 1;
+ private bool hasA;
+ private global::Google.ProtocolBuffers.TestProtos.TestRecursiveMessage a_;
+ public bool HasA {
+ get { return hasA; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestRecursiveMessage A {
+ get { return a_ ?? global::Google.ProtocolBuffers.TestProtos.TestRecursiveMessage.DefaultInstance; }
+ }
+
+ public const int IFieldNumber = 2;
+ private bool hasI;
+ private int i_;
+ public bool HasI {
+ get { return hasI; }
+ }
+ public int I {
+ get { return i_; }
+ }
+
+ public override bool IsInitialized {
+ get {
+ return true;
+ }
+ }
+
+ public override void WriteTo(pb::ICodedOutputStream output) {
+ CalcSerializedSize();
+ string[] field_names = _testRecursiveMessageFieldNames;
+ if (hasA) {
+ output.WriteMessage(1, field_names[0], A);
+ }
+ if (hasI) {
+ output.WriteInt32(2, field_names[1], I);
+ }
+ UnknownFields.WriteTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public override int SerializedSize {
+ get {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+ return CalcSerializedSize();
+ }
+ }
+
+ private int CalcSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (hasA) {
+ size += pb::CodedOutputStream.ComputeMessageSize(1, A);
+ }
+ if (hasI) {
+ size += pb::CodedOutputStream.ComputeInt32Size(2, I);
+ }
+ size += UnknownFields.SerializedSize;
+ memoizedSerializedSize = size;
+ return size;
+ }
+ public static TestRecursiveMessage ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static TestRecursiveMessage ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static TestRecursiveMessage ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static TestRecursiveMessage ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static TestRecursiveMessage ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static TestRecursiveMessage ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static TestRecursiveMessage ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static TestRecursiveMessage ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static TestRecursiveMessage ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static TestRecursiveMessage ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private TestRecursiveMessage 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(TestRecursiveMessage prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Builder : pb::GeneratedBuilder<TestRecursiveMessage, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(TestRecursiveMessage cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private TestRecursiveMessage result;
+
+ private TestRecursiveMessage PrepareBuilder() {
+ if (resultIsReadOnly) {
+ TestRecursiveMessage original = result;
+ result = new TestRecursiveMessage();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override TestRecursiveMessage 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.TestRecursiveMessage.Descriptor; }
+ }
+
+ public override TestRecursiveMessage DefaultInstanceForType {
+ get { return global::Google.ProtocolBuffers.TestProtos.TestRecursiveMessage.DefaultInstance; }
+ }
+
+ public override TestRecursiveMessage BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+ public override Builder MergeFrom(pb::IMessage other) {
+ if (other is TestRecursiveMessage) {
+ return MergeFrom((TestRecursiveMessage) other);
+ } else {
+ base.MergeFrom(other);
+ return this;
+ }
+ }
+
+ public override Builder MergeFrom(TestRecursiveMessage other) {
+ if (other == global::Google.ProtocolBuffers.TestProtos.TestRecursiveMessage.DefaultInstance) return this;
+ PrepareBuilder();
+ if (other.HasA) {
+ MergeA(other.A);
+ }
+ if (other.HasI) {
+ I = other.I;
+ }
+ 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(_testRecursiveMessageFieldNames, field_name, global::System.StringComparer.Ordinal);
+ if(field_ordinal >= 0)
+ tag = _testRecursiveMessageFieldTags[field_ordinal];
+ else {
+ if (unknownFields == null) {
+ unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+ }
+ ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
+ continue;
+ }
+ }
+ switch (tag) {
+ case 0: {
+ throw pb::InvalidProtocolBufferException.InvalidTag();
+ }
+ default: {
+ if (pb::WireFormat.IsEndGroupTag(tag)) {
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
+ }
+ if (unknownFields == null) {
+ unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+ }
+ ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
+ break;
+ }
+ case 10: {
+ global::Google.ProtocolBuffers.TestProtos.TestRecursiveMessage.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.TestRecursiveMessage.CreateBuilder();
+ if (result.hasA) {
+ subBuilder.MergeFrom(A);
+ }
+ input.ReadMessage(subBuilder, extensionRegistry);
+ A = subBuilder.BuildPartial();
+ break;
+ }
+ case 16: {
+ result.hasI = input.ReadInt32(ref result.i_);
+ break;
+ }
+ }
+ }
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
+ }
+
+
+ public bool HasA {
+ get { return result.hasA; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestRecursiveMessage A {
+ get { return result.A; }
+ set { SetA(value); }
+ }
+ public Builder SetA(global::Google.ProtocolBuffers.TestProtos.TestRecursiveMessage value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasA = true;
+ result.a_ = value;
+ return this;
+ }
+ public Builder SetA(global::Google.ProtocolBuffers.TestProtos.TestRecursiveMessage.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.hasA = true;
+ result.a_ = builderForValue.Build();
+ return this;
+ }
+ public Builder MergeA(global::Google.ProtocolBuffers.TestProtos.TestRecursiveMessage value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ if (result.hasA &&
+ result.a_ != global::Google.ProtocolBuffers.TestProtos.TestRecursiveMessage.DefaultInstance) {
+ result.a_ = global::Google.ProtocolBuffers.TestProtos.TestRecursiveMessage.CreateBuilder(result.a_).MergeFrom(value).BuildPartial();
+ } else {
+ result.a_ = value;
+ }
+ result.hasA = true;
+ return this;
+ }
+ public Builder ClearA() {
+ PrepareBuilder();
+ result.hasA = false;
+ result.a_ = null;
+ 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;
+ }
+ }
+ static TestRecursiveMessage() {
+ object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor, null);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class TestMutualRecursionA : pb::GeneratedMessage<TestMutualRecursionA, TestMutualRecursionA.Builder> {
+ private TestMutualRecursionA() { }
+ private static readonly TestMutualRecursionA defaultInstance = new TestMutualRecursionA().MakeReadOnly();
+ private static readonly string[] _testMutualRecursionAFieldNames = new string[] { "bb" };
+ private static readonly uint[] _testMutualRecursionAFieldTags = new uint[] { 10 };
+ public static TestMutualRecursionA DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override TestMutualRecursionA DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override TestMutualRecursionA ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestMutualRecursionA__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<TestMutualRecursionA, TestMutualRecursionA.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestMutualRecursionA__FieldAccessorTable; }
+ }
+
+ public const int BbFieldNumber = 1;
+ private bool hasBb;
+ private global::Google.ProtocolBuffers.TestProtos.TestMutualRecursionB bb_;
+ public bool HasBb {
+ get { return hasBb; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestMutualRecursionB Bb {
+ get { return bb_ ?? global::Google.ProtocolBuffers.TestProtos.TestMutualRecursionB.DefaultInstance; }
+ }
+
+ public override bool IsInitialized {
+ get {
+ return true;
+ }
+ }
+
+ public override void WriteTo(pb::ICodedOutputStream output) {
+ CalcSerializedSize();
+ string[] field_names = _testMutualRecursionAFieldNames;
+ if (hasBb) {
+ output.WriteMessage(1, field_names[0], Bb);
+ }
+ UnknownFields.WriteTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public override int SerializedSize {
+ get {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+ return CalcSerializedSize();
+ }
+ }
+
+ private int CalcSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (hasBb) {
+ size += pb::CodedOutputStream.ComputeMessageSize(1, Bb);
+ }
+ size += UnknownFields.SerializedSize;
+ memoizedSerializedSize = size;
+ return size;
+ }
+ public static TestMutualRecursionA ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static TestMutualRecursionA ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static TestMutualRecursionA ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static TestMutualRecursionA ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static TestMutualRecursionA ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static TestMutualRecursionA ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static TestMutualRecursionA ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static TestMutualRecursionA ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static TestMutualRecursionA ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static TestMutualRecursionA ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private TestMutualRecursionA 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(TestMutualRecursionA prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Builder : pb::GeneratedBuilder<TestMutualRecursionA, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(TestMutualRecursionA cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private TestMutualRecursionA result;
+
+ private TestMutualRecursionA PrepareBuilder() {
+ if (resultIsReadOnly) {
+ TestMutualRecursionA original = result;
+ result = new TestMutualRecursionA();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override TestMutualRecursionA 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.TestMutualRecursionA.Descriptor; }
+ }
+
+ public override TestMutualRecursionA DefaultInstanceForType {
+ get { return global::Google.ProtocolBuffers.TestProtos.TestMutualRecursionA.DefaultInstance; }
+ }
+
+ public override TestMutualRecursionA BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+ public override Builder MergeFrom(pb::IMessage other) {
+ if (other is TestMutualRecursionA) {
+ return MergeFrom((TestMutualRecursionA) other);
+ } else {
+ base.MergeFrom(other);
+ return this;
+ }
+ }
+
+ public override Builder MergeFrom(TestMutualRecursionA other) {
+ if (other == global::Google.ProtocolBuffers.TestProtos.TestMutualRecursionA.DefaultInstance) return this;
+ PrepareBuilder();
+ if (other.HasBb) {
+ MergeBb(other.Bb);
+ }
+ 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(_testMutualRecursionAFieldNames, field_name, global::System.StringComparer.Ordinal);
+ if(field_ordinal >= 0)
+ tag = _testMutualRecursionAFieldTags[field_ordinal];
+ else {
+ if (unknownFields == null) {
+ unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+ }
+ ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
+ continue;
+ }
+ }
+ switch (tag) {
+ case 0: {
+ throw pb::InvalidProtocolBufferException.InvalidTag();
+ }
+ default: {
+ if (pb::WireFormat.IsEndGroupTag(tag)) {
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
+ }
+ if (unknownFields == null) {
+ unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+ }
+ ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
+ break;
+ }
+ case 10: {
+ global::Google.ProtocolBuffers.TestProtos.TestMutualRecursionB.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.TestMutualRecursionB.CreateBuilder();
+ if (result.hasBb) {
+ subBuilder.MergeFrom(Bb);
+ }
+ input.ReadMessage(subBuilder, extensionRegistry);
+ Bb = subBuilder.BuildPartial();
+ break;
+ }
+ }
+ }
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
+ }
+
+
+ public bool HasBb {
+ get { return result.hasBb; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestMutualRecursionB Bb {
+ get { return result.Bb; }
+ set { SetBb(value); }
+ }
+ public Builder SetBb(global::Google.ProtocolBuffers.TestProtos.TestMutualRecursionB value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasBb = true;
+ result.bb_ = value;
+ return this;
+ }
+ public Builder SetBb(global::Google.ProtocolBuffers.TestProtos.TestMutualRecursionB.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.hasBb = true;
+ result.bb_ = builderForValue.Build();
+ return this;
+ }
+ public Builder MergeBb(global::Google.ProtocolBuffers.TestProtos.TestMutualRecursionB value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ if (result.hasBb &&
+ result.bb_ != global::Google.ProtocolBuffers.TestProtos.TestMutualRecursionB.DefaultInstance) {
+ result.bb_ = global::Google.ProtocolBuffers.TestProtos.TestMutualRecursionB.CreateBuilder(result.bb_).MergeFrom(value).BuildPartial();
+ } else {
+ result.bb_ = value;
+ }
+ result.hasBb = true;
+ return this;
+ }
+ public Builder ClearBb() {
+ PrepareBuilder();
+ result.hasBb = false;
+ result.bb_ = null;
+ return this;
+ }
+ }
+ static TestMutualRecursionA() {
+ object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor, null);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class TestMutualRecursionB : pb::GeneratedMessage<TestMutualRecursionB, TestMutualRecursionB.Builder> {
+ private TestMutualRecursionB() { }
+ private static readonly TestMutualRecursionB defaultInstance = new TestMutualRecursionB().MakeReadOnly();
+ private static readonly string[] _testMutualRecursionBFieldNames = new string[] { "a", "optional_int32" };
+ private static readonly uint[] _testMutualRecursionBFieldTags = new uint[] { 10, 16 };
+ public static TestMutualRecursionB DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override TestMutualRecursionB DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override TestMutualRecursionB ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestMutualRecursionB__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<TestMutualRecursionB, TestMutualRecursionB.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestMutualRecursionB__FieldAccessorTable; }
+ }
+
+ public const int AFieldNumber = 1;
+ private bool hasA;
+ private global::Google.ProtocolBuffers.TestProtos.TestMutualRecursionA a_;
+ public bool HasA {
+ get { return hasA; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestMutualRecursionA A {
+ get { return a_ ?? global::Google.ProtocolBuffers.TestProtos.TestMutualRecursionA.DefaultInstance; }
+ }
+
+ public const int OptionalInt32FieldNumber = 2;
+ private bool hasOptionalInt32;
+ private int optionalInt32_;
+ public bool HasOptionalInt32 {
+ get { return hasOptionalInt32; }
+ }
+ public int OptionalInt32 {
+ get { return optionalInt32_; }
+ }
+
+ public override bool IsInitialized {
+ get {
+ return true;
+ }
+ }
+
+ public override void WriteTo(pb::ICodedOutputStream output) {
+ CalcSerializedSize();
+ string[] field_names = _testMutualRecursionBFieldNames;
+ if (hasA) {
+ output.WriteMessage(1, field_names[0], A);
+ }
+ if (hasOptionalInt32) {
+ output.WriteInt32(2, field_names[1], OptionalInt32);
+ }
+ UnknownFields.WriteTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public override int SerializedSize {
+ get {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+ return CalcSerializedSize();
+ }
+ }
+
+ private int CalcSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (hasA) {
+ size += pb::CodedOutputStream.ComputeMessageSize(1, A);
+ }
+ if (hasOptionalInt32) {
+ size += pb::CodedOutputStream.ComputeInt32Size(2, OptionalInt32);
+ }
+ size += UnknownFields.SerializedSize;
+ memoizedSerializedSize = size;
+ return size;
+ }
+ public static TestMutualRecursionB ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static TestMutualRecursionB ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static TestMutualRecursionB ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static TestMutualRecursionB ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static TestMutualRecursionB ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static TestMutualRecursionB ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static TestMutualRecursionB ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static TestMutualRecursionB ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static TestMutualRecursionB ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static TestMutualRecursionB ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private TestMutualRecursionB 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(TestMutualRecursionB prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Builder : pb::GeneratedBuilder<TestMutualRecursionB, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(TestMutualRecursionB cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private TestMutualRecursionB result;
+
+ private TestMutualRecursionB PrepareBuilder() {
+ if (resultIsReadOnly) {
+ TestMutualRecursionB original = result;
+ result = new TestMutualRecursionB();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override TestMutualRecursionB 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.TestMutualRecursionB.Descriptor; }
+ }
+
+ public override TestMutualRecursionB DefaultInstanceForType {
+ get { return global::Google.ProtocolBuffers.TestProtos.TestMutualRecursionB.DefaultInstance; }
+ }
+
+ public override TestMutualRecursionB BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+ public override Builder MergeFrom(pb::IMessage other) {
+ if (other is TestMutualRecursionB) {
+ return MergeFrom((TestMutualRecursionB) other);
+ } else {
+ base.MergeFrom(other);
+ return this;
+ }
+ }
+
+ public override Builder MergeFrom(TestMutualRecursionB other) {
+ if (other == global::Google.ProtocolBuffers.TestProtos.TestMutualRecursionB.DefaultInstance) return this;
+ PrepareBuilder();
+ if (other.HasA) {
+ MergeA(other.A);
+ }
+ if (other.HasOptionalInt32) {
+ OptionalInt32 = other.OptionalInt32;
+ }
+ 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(_testMutualRecursionBFieldNames, field_name, global::System.StringComparer.Ordinal);
+ if(field_ordinal >= 0)
+ tag = _testMutualRecursionBFieldTags[field_ordinal];
+ else {
+ if (unknownFields == null) {
+ unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+ }
+ ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
+ continue;
+ }
+ }
+ switch (tag) {
+ case 0: {
+ throw pb::InvalidProtocolBufferException.InvalidTag();
+ }
+ default: {
+ if (pb::WireFormat.IsEndGroupTag(tag)) {
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
+ }
+ if (unknownFields == null) {
+ unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+ }
+ ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
+ break;
+ }
+ case 10: {
+ global::Google.ProtocolBuffers.TestProtos.TestMutualRecursionA.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.TestMutualRecursionA.CreateBuilder();
+ if (result.hasA) {
+ subBuilder.MergeFrom(A);
+ }
+ input.ReadMessage(subBuilder, extensionRegistry);
+ A = subBuilder.BuildPartial();
+ break;
+ }
+ case 16: {
+ result.hasOptionalInt32 = input.ReadInt32(ref result.optionalInt32_);
+ break;
+ }
+ }
+ }
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
+ }
+
+
+ public bool HasA {
+ get { return result.hasA; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestMutualRecursionA A {
+ get { return result.A; }
+ set { SetA(value); }
+ }
+ public Builder SetA(global::Google.ProtocolBuffers.TestProtos.TestMutualRecursionA value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasA = true;
+ result.a_ = value;
+ return this;
+ }
+ public Builder SetA(global::Google.ProtocolBuffers.TestProtos.TestMutualRecursionA.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.hasA = true;
+ result.a_ = builderForValue.Build();
+ return this;
+ }
+ public Builder MergeA(global::Google.ProtocolBuffers.TestProtos.TestMutualRecursionA value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ if (result.hasA &&
+ result.a_ != global::Google.ProtocolBuffers.TestProtos.TestMutualRecursionA.DefaultInstance) {
+ result.a_ = global::Google.ProtocolBuffers.TestProtos.TestMutualRecursionA.CreateBuilder(result.a_).MergeFrom(value).BuildPartial();
+ } else {
+ result.a_ = value;
+ }
+ result.hasA = true;
+ return this;
+ }
+ public Builder ClearA() {
+ PrepareBuilder();
+ result.hasA = false;
+ result.a_ = null;
+ return this;
+ }
+
+ public bool HasOptionalInt32 {
+ get { return result.hasOptionalInt32; }
+ }
+ public int OptionalInt32 {
+ get { return result.OptionalInt32; }
+ set { SetOptionalInt32(value); }
+ }
+ public Builder SetOptionalInt32(int value) {
+ PrepareBuilder();
+ result.hasOptionalInt32 = true;
+ result.optionalInt32_ = value;
+ return this;
+ }
+ public Builder ClearOptionalInt32() {
+ PrepareBuilder();
+ result.hasOptionalInt32 = false;
+ result.optionalInt32_ = 0;
+ return this;
+ }
+ }
+ static TestMutualRecursionB() {
+ object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor, null);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class TestDupFieldNumber : pb::GeneratedMessage<TestDupFieldNumber, TestDupFieldNumber.Builder> {
+ private TestDupFieldNumber() { }
+ private static readonly TestDupFieldNumber defaultInstance = new TestDupFieldNumber().MakeReadOnly();
+ private static readonly string[] _testDupFieldNumberFieldNames = new string[] { "a", "bar", "foo" };
+ private static readonly uint[] _testDupFieldNumberFieldTags = new uint[] { 8, 27, 19 };
+ public static TestDupFieldNumber DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override TestDupFieldNumber DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override TestDupFieldNumber ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestDupFieldNumber__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<TestDupFieldNumber, TestDupFieldNumber.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestDupFieldNumber__FieldAccessorTable; }
+ }
+
+ #region Nested types
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public static partial class Types {
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Foo : pb::GeneratedMessage<Foo, Foo.Builder> {
+ private Foo() { }
+ private static readonly Foo defaultInstance = new Foo().MakeReadOnly();
+ private static readonly string[] _fooFieldNames = new string[] { "a" };
+ private static readonly uint[] _fooFieldTags = new uint[] { 8 };
+ public static Foo DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override Foo DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override Foo ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestDupFieldNumber_Foo__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<Foo, Foo.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestDupFieldNumber_Foo__FieldAccessorTable; }
+ }
+
+ public const int AFieldNumber = 1;
+ private bool hasA;
+ private int a_;
+ public bool HasA {
+ get { return hasA; }
+ }
+ public int A {
+ get { return a_; }
+ }
+
+ public override bool IsInitialized {
+ get {
+ return true;
+ }
+ }
+
+ public override void WriteTo(pb::ICodedOutputStream output) {
+ CalcSerializedSize();
+ string[] field_names = _fooFieldNames;
+ if (hasA) {
+ output.WriteInt32(1, field_names[0], A);
+ }
+ UnknownFields.WriteTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public override int SerializedSize {
+ get {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+ return CalcSerializedSize();
+ }
+ }
+
+ private int CalcSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (hasA) {
+ size += pb::CodedOutputStream.ComputeInt32Size(1, A);
+ }
+ size += UnknownFields.SerializedSize;
+ memoizedSerializedSize = size;
+ return size;
+ }
+ public static Foo ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static Foo ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static Foo ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static Foo ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static Foo ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static Foo ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static Foo ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static Foo ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static Foo ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static Foo ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private Foo 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(Foo prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Builder : pb::GeneratedBuilder<Foo, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(Foo cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private Foo result;
+
+ private Foo PrepareBuilder() {
+ if (resultIsReadOnly) {
+ Foo original = result;
+ result = new Foo();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override Foo 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.TestDupFieldNumber.Types.Foo.Descriptor; }
+ }
+
+ public override Foo DefaultInstanceForType {
+ get { return global::Google.ProtocolBuffers.TestProtos.TestDupFieldNumber.Types.Foo.DefaultInstance; }
+ }
+
+ public override Foo BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+ public override Builder MergeFrom(pb::IMessage other) {
+ if (other is Foo) {
+ return MergeFrom((Foo) other);
+ } else {
+ base.MergeFrom(other);
+ return this;
+ }
+ }
+
+ public override Builder MergeFrom(Foo other) {
+ if (other == global::Google.ProtocolBuffers.TestProtos.TestDupFieldNumber.Types.Foo.DefaultInstance) return this;
+ PrepareBuilder();
+ if (other.HasA) {
+ A = other.A;
+ }
+ 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(_fooFieldNames, field_name, global::System.StringComparer.Ordinal);
+ if(field_ordinal >= 0)
+ tag = _fooFieldTags[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.hasA = input.ReadInt32(ref result.a_);
+ break;
+ }
+ }
+ }
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
+ }
+
+
+ public bool HasA {
+ get { return result.hasA; }
+ }
+ public int A {
+ get { return result.A; }
+ set { SetA(value); }
+ }
+ public Builder SetA(int value) {
+ PrepareBuilder();
+ result.hasA = true;
+ result.a_ = value;
+ return this;
+ }
+ public Builder ClearA() {
+ PrepareBuilder();
+ result.hasA = false;
+ result.a_ = 0;
+ return this;
+ }
+ }
+ static Foo() {
+ object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor, null);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Bar : pb::GeneratedMessage<Bar, Bar.Builder> {
+ private Bar() { }
+ private static readonly Bar defaultInstance = new Bar().MakeReadOnly();
+ private static readonly string[] _barFieldNames = new string[] { "a" };
+ private static readonly uint[] _barFieldTags = new uint[] { 8 };
+ public static Bar DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override Bar DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override Bar ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestDupFieldNumber_Bar__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<Bar, Bar.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestDupFieldNumber_Bar__FieldAccessorTable; }
+ }
+
+ public const int AFieldNumber = 1;
+ private bool hasA;
+ private int a_;
+ public bool HasA {
+ get { return hasA; }
+ }
+ public int A {
+ get { return a_; }
+ }
+
+ public override bool IsInitialized {
+ get {
+ return true;
+ }
+ }
+
+ public override void WriteTo(pb::ICodedOutputStream output) {
+ CalcSerializedSize();
+ string[] field_names = _barFieldNames;
+ if (hasA) {
+ output.WriteInt32(1, field_names[0], A);
+ }
+ UnknownFields.WriteTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public override int SerializedSize {
+ get {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+ return CalcSerializedSize();
+ }
+ }
+
+ private int CalcSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (hasA) {
+ size += pb::CodedOutputStream.ComputeInt32Size(1, A);
+ }
+ size += UnknownFields.SerializedSize;
+ memoizedSerializedSize = size;
+ return size;
+ }
+ public static Bar ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static Bar ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static Bar ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static Bar ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static Bar ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static Bar ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static Bar ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static Bar ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static Bar ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static Bar ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private Bar 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(Bar prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Builder : pb::GeneratedBuilder<Bar, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(Bar cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private Bar result;
+
+ private Bar PrepareBuilder() {
+ if (resultIsReadOnly) {
+ Bar original = result;
+ result = new Bar();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override Bar 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.TestDupFieldNumber.Types.Bar.Descriptor; }
+ }
+
+ public override Bar DefaultInstanceForType {
+ get { return global::Google.ProtocolBuffers.TestProtos.TestDupFieldNumber.Types.Bar.DefaultInstance; }
+ }
+
+ public override Bar BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+ public override Builder MergeFrom(pb::IMessage other) {
+ if (other is Bar) {
+ return MergeFrom((Bar) other);
+ } else {
+ base.MergeFrom(other);
+ return this;
+ }
+ }
+
+ public override Builder MergeFrom(Bar other) {
+ if (other == global::Google.ProtocolBuffers.TestProtos.TestDupFieldNumber.Types.Bar.DefaultInstance) return this;
+ PrepareBuilder();
+ if (other.HasA) {
+ A = other.A;
+ }
+ 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(_barFieldNames, field_name, global::System.StringComparer.Ordinal);
+ if(field_ordinal >= 0)
+ tag = _barFieldTags[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.hasA = input.ReadInt32(ref result.a_);
+ break;
+ }
+ }
+ }
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
+ }
+
+
+ public bool HasA {
+ get { return result.hasA; }
+ }
+ public int A {
+ get { return result.A; }
+ set { SetA(value); }
+ }
+ public Builder SetA(int value) {
+ PrepareBuilder();
+ result.hasA = true;
+ result.a_ = value;
+ return this;
+ }
+ public Builder ClearA() {
+ PrepareBuilder();
+ result.hasA = false;
+ result.a_ = 0;
+ return this;
+ }
+ }
+ static Bar() {
+ object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor, null);
+ }
+ }
+
+ }
+ #endregion
+
+ public const int AFieldNumber = 1;
+ private bool hasA;
+ private int a_;
+ public bool HasA {
+ get { return hasA; }
+ }
+ public int A {
+ get { return a_; }
+ }
+
+ public const int FooFieldNumber = 2;
+ private bool hasFoo;
+ private global::Google.ProtocolBuffers.TestProtos.TestDupFieldNumber.Types.Foo foo_;
+ public bool HasFoo {
+ get { return hasFoo; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestDupFieldNumber.Types.Foo Foo {
+ get { return foo_ ?? global::Google.ProtocolBuffers.TestProtos.TestDupFieldNumber.Types.Foo.DefaultInstance; }
+ }
+
+ public const int BarFieldNumber = 3;
+ private bool hasBar;
+ private global::Google.ProtocolBuffers.TestProtos.TestDupFieldNumber.Types.Bar bar_;
+ public bool HasBar {
+ get { return hasBar; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestDupFieldNumber.Types.Bar Bar {
+ get { return bar_ ?? global::Google.ProtocolBuffers.TestProtos.TestDupFieldNumber.Types.Bar.DefaultInstance; }
+ }
+
+ public override bool IsInitialized {
+ get {
+ return true;
+ }
+ }
+
+ public override void WriteTo(pb::ICodedOutputStream output) {
+ CalcSerializedSize();
+ string[] field_names = _testDupFieldNumberFieldNames;
+ if (hasA) {
+ output.WriteInt32(1, field_names[0], A);
+ }
+ if (hasFoo) {
+ output.WriteGroup(2, field_names[2], Foo);
+ }
+ if (hasBar) {
+ output.WriteGroup(3, field_names[1], Bar);
+ }
+ UnknownFields.WriteTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public override int SerializedSize {
+ get {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+ return CalcSerializedSize();
+ }
+ }
+
+ private int CalcSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (hasA) {
+ size += pb::CodedOutputStream.ComputeInt32Size(1, A);
+ }
+ if (hasFoo) {
+ size += pb::CodedOutputStream.ComputeGroupSize(2, Foo);
+ }
+ if (hasBar) {
+ size += pb::CodedOutputStream.ComputeGroupSize(3, Bar);
+ }
+ size += UnknownFields.SerializedSize;
+ memoizedSerializedSize = size;
+ return size;
+ }
+ public static TestDupFieldNumber ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static TestDupFieldNumber ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static TestDupFieldNumber ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static TestDupFieldNumber ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static TestDupFieldNumber ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static TestDupFieldNumber ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static TestDupFieldNumber ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static TestDupFieldNumber ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static TestDupFieldNumber ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static TestDupFieldNumber ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private TestDupFieldNumber 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(TestDupFieldNumber prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Builder : pb::GeneratedBuilder<TestDupFieldNumber, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(TestDupFieldNumber cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private TestDupFieldNumber result;
+
+ private TestDupFieldNumber PrepareBuilder() {
+ if (resultIsReadOnly) {
+ TestDupFieldNumber original = result;
+ result = new TestDupFieldNumber();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override TestDupFieldNumber 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.TestDupFieldNumber.Descriptor; }
+ }
+
+ public override TestDupFieldNumber DefaultInstanceForType {
+ get { return global::Google.ProtocolBuffers.TestProtos.TestDupFieldNumber.DefaultInstance; }
+ }
+
+ public override TestDupFieldNumber BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+ public override Builder MergeFrom(pb::IMessage other) {
+ if (other is TestDupFieldNumber) {
+ return MergeFrom((TestDupFieldNumber) other);
+ } else {
+ base.MergeFrom(other);
+ return this;
+ }
+ }
+
+ public override Builder MergeFrom(TestDupFieldNumber other) {
+ if (other == global::Google.ProtocolBuffers.TestProtos.TestDupFieldNumber.DefaultInstance) return this;
+ PrepareBuilder();
+ if (other.HasA) {
+ A = other.A;
+ }
+ if (other.HasFoo) {
+ MergeFoo(other.Foo);
+ }
+ if (other.HasBar) {
+ MergeBar(other.Bar);
+ }
+ 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(_testDupFieldNumberFieldNames, field_name, global::System.StringComparer.Ordinal);
+ if(field_ordinal >= 0)
+ tag = _testDupFieldNumberFieldTags[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.hasA = input.ReadInt32(ref result.a_);
+ break;
+ }
+ case 19: {
+ global::Google.ProtocolBuffers.TestProtos.TestDupFieldNumber.Types.Foo.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.TestDupFieldNumber.Types.Foo.CreateBuilder();
+ if (result.hasFoo) {
+ subBuilder.MergeFrom(Foo);
+ }
+ input.ReadGroup(2, subBuilder, extensionRegistry);
+ Foo = subBuilder.BuildPartial();
+ break;
+ }
+ case 27: {
+ global::Google.ProtocolBuffers.TestProtos.TestDupFieldNumber.Types.Bar.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.TestDupFieldNumber.Types.Bar.CreateBuilder();
+ if (result.hasBar) {
+ subBuilder.MergeFrom(Bar);
+ }
+ input.ReadGroup(3, subBuilder, extensionRegistry);
+ Bar = subBuilder.BuildPartial();
+ break;
+ }
+ }
+ }
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
+ }
+
+
+ public bool HasA {
+ get { return result.hasA; }
+ }
+ public int A {
+ get { return result.A; }
+ set { SetA(value); }
+ }
+ public Builder SetA(int value) {
+ PrepareBuilder();
+ result.hasA = true;
+ result.a_ = value;
+ return this;
+ }
+ public Builder ClearA() {
+ PrepareBuilder();
+ result.hasA = false;
+ result.a_ = 0;
+ return this;
+ }
+
+ public bool HasFoo {
+ get { return result.hasFoo; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestDupFieldNumber.Types.Foo Foo {
+ get { return result.Foo; }
+ set { SetFoo(value); }
+ }
+ public Builder SetFoo(global::Google.ProtocolBuffers.TestProtos.TestDupFieldNumber.Types.Foo value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasFoo = true;
+ result.foo_ = value;
+ return this;
+ }
+ public Builder SetFoo(global::Google.ProtocolBuffers.TestProtos.TestDupFieldNumber.Types.Foo.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.hasFoo = true;
+ result.foo_ = builderForValue.Build();
+ return this;
+ }
+ public Builder MergeFoo(global::Google.ProtocolBuffers.TestProtos.TestDupFieldNumber.Types.Foo value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ if (result.hasFoo &&
+ result.foo_ != global::Google.ProtocolBuffers.TestProtos.TestDupFieldNumber.Types.Foo.DefaultInstance) {
+ result.foo_ = global::Google.ProtocolBuffers.TestProtos.TestDupFieldNumber.Types.Foo.CreateBuilder(result.foo_).MergeFrom(value).BuildPartial();
+ } else {
+ result.foo_ = value;
+ }
+ result.hasFoo = true;
+ return this;
+ }
+ public Builder ClearFoo() {
+ PrepareBuilder();
+ result.hasFoo = false;
+ result.foo_ = null;
+ return this;
+ }
+
+ public bool HasBar {
+ get { return result.hasBar; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestDupFieldNumber.Types.Bar Bar {
+ get { return result.Bar; }
+ set { SetBar(value); }
+ }
+ public Builder SetBar(global::Google.ProtocolBuffers.TestProtos.TestDupFieldNumber.Types.Bar value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasBar = true;
+ result.bar_ = value;
+ return this;
+ }
+ public Builder SetBar(global::Google.ProtocolBuffers.TestProtos.TestDupFieldNumber.Types.Bar.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.hasBar = true;
+ result.bar_ = builderForValue.Build();
+ return this;
+ }
+ public Builder MergeBar(global::Google.ProtocolBuffers.TestProtos.TestDupFieldNumber.Types.Bar value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ if (result.hasBar &&
+ result.bar_ != global::Google.ProtocolBuffers.TestProtos.TestDupFieldNumber.Types.Bar.DefaultInstance) {
+ result.bar_ = global::Google.ProtocolBuffers.TestProtos.TestDupFieldNumber.Types.Bar.CreateBuilder(result.bar_).MergeFrom(value).BuildPartial();
+ } else {
+ result.bar_ = value;
+ }
+ result.hasBar = true;
+ return this;
+ }
+ public Builder ClearBar() {
+ PrepareBuilder();
+ result.hasBar = false;
+ result.bar_ = null;
+ return this;
+ }
+ }
+ static TestDupFieldNumber() {
+ object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor, null);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class TestEagerMessage : pb::GeneratedMessage<TestEagerMessage, TestEagerMessage.Builder> {
+ private TestEagerMessage() { }
+ private static readonly TestEagerMessage defaultInstance = new TestEagerMessage().MakeReadOnly();
+ private static readonly string[] _testEagerMessageFieldNames = new string[] { "sub_message" };
+ private static readonly uint[] _testEagerMessageFieldTags = new uint[] { 10 };
+ public static TestEagerMessage DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override TestEagerMessage DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override TestEagerMessage ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestEagerMessage__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<TestEagerMessage, TestEagerMessage.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestEagerMessage__FieldAccessorTable; }
+ }
+
+ public const int SubMessageFieldNumber = 1;
+ private bool hasSubMessage;
+ private global::Google.ProtocolBuffers.TestProtos.TestAllTypes subMessage_;
+ public bool HasSubMessage {
+ get { return hasSubMessage; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestAllTypes SubMessage {
+ get { return subMessage_ ?? global::Google.ProtocolBuffers.TestProtos.TestAllTypes.DefaultInstance; }
+ }
+
+ public override bool IsInitialized {
+ get {
+ return true;
+ }
+ }
+
+ public override void WriteTo(pb::ICodedOutputStream output) {
+ CalcSerializedSize();
+ string[] field_names = _testEagerMessageFieldNames;
+ if (hasSubMessage) {
+ output.WriteMessage(1, field_names[0], SubMessage);
+ }
+ UnknownFields.WriteTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public override int SerializedSize {
+ get {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+ return CalcSerializedSize();
+ }
+ }
+
+ private int CalcSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (hasSubMessage) {
+ size += pb::CodedOutputStream.ComputeMessageSize(1, SubMessage);
+ }
+ size += UnknownFields.SerializedSize;
+ memoizedSerializedSize = size;
+ return size;
+ }
+ public static TestEagerMessage ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static TestEagerMessage ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static TestEagerMessage ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static TestEagerMessage ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static TestEagerMessage ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static TestEagerMessage ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static TestEagerMessage ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static TestEagerMessage ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static TestEagerMessage ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static TestEagerMessage ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private TestEagerMessage 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(TestEagerMessage prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Builder : pb::GeneratedBuilder<TestEagerMessage, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(TestEagerMessage cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private TestEagerMessage result;
+
+ private TestEagerMessage PrepareBuilder() {
+ if (resultIsReadOnly) {
+ TestEagerMessage original = result;
+ result = new TestEagerMessage();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override TestEagerMessage 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.TestEagerMessage.Descriptor; }
+ }
+
+ public override TestEagerMessage DefaultInstanceForType {
+ get { return global::Google.ProtocolBuffers.TestProtos.TestEagerMessage.DefaultInstance; }
+ }
+
+ public override TestEagerMessage BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+ public override Builder MergeFrom(pb::IMessage other) {
+ if (other is TestEagerMessage) {
+ return MergeFrom((TestEagerMessage) other);
+ } else {
+ base.MergeFrom(other);
+ return this;
+ }
+ }
+
+ public override Builder MergeFrom(TestEagerMessage other) {
+ if (other == global::Google.ProtocolBuffers.TestProtos.TestEagerMessage.DefaultInstance) return this;
+ PrepareBuilder();
+ if (other.HasSubMessage) {
+ MergeSubMessage(other.SubMessage);
+ }
+ 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(_testEagerMessageFieldNames, field_name, global::System.StringComparer.Ordinal);
+ if(field_ordinal >= 0)
+ tag = _testEagerMessageFieldTags[field_ordinal];
+ else {
+ if (unknownFields == null) {
+ unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+ }
+ ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
+ continue;
+ }
+ }
+ switch (tag) {
+ case 0: {
+ throw pb::InvalidProtocolBufferException.InvalidTag();
+ }
+ default: {
+ if (pb::WireFormat.IsEndGroupTag(tag)) {
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
+ }
+ if (unknownFields == null) {
+ unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+ }
+ ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
+ break;
+ }
+ case 10: {
+ global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.TestAllTypes.CreateBuilder();
+ if (result.hasSubMessage) {
+ subBuilder.MergeFrom(SubMessage);
+ }
+ input.ReadMessage(subBuilder, extensionRegistry);
+ SubMessage = subBuilder.BuildPartial();
+ break;
+ }
+ }
+ }
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
+ }
+
+
+ public bool HasSubMessage {
+ get { return result.hasSubMessage; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestAllTypes SubMessage {
+ get { return result.SubMessage; }
+ set { SetSubMessage(value); }
+ }
+ public Builder SetSubMessage(global::Google.ProtocolBuffers.TestProtos.TestAllTypes value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasSubMessage = true;
+ result.subMessage_ = value;
+ return this;
+ }
+ public Builder SetSubMessage(global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.hasSubMessage = true;
+ result.subMessage_ = builderForValue.Build();
+ return this;
+ }
+ public Builder MergeSubMessage(global::Google.ProtocolBuffers.TestProtos.TestAllTypes value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ if (result.hasSubMessage &&
+ result.subMessage_ != global::Google.ProtocolBuffers.TestProtos.TestAllTypes.DefaultInstance) {
+ result.subMessage_ = global::Google.ProtocolBuffers.TestProtos.TestAllTypes.CreateBuilder(result.subMessage_).MergeFrom(value).BuildPartial();
+ } else {
+ result.subMessage_ = value;
+ }
+ result.hasSubMessage = true;
+ return this;
+ }
+ public Builder ClearSubMessage() {
+ PrepareBuilder();
+ result.hasSubMessage = false;
+ result.subMessage_ = null;
+ return this;
+ }
+ }
+ static TestEagerMessage() {
+ object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor, null);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class TestLazyMessage : pb::GeneratedMessage<TestLazyMessage, TestLazyMessage.Builder> {
+ private TestLazyMessage() { }
+ private static readonly TestLazyMessage defaultInstance = new TestLazyMessage().MakeReadOnly();
+ private static readonly string[] _testLazyMessageFieldNames = new string[] { "sub_message" };
+ private static readonly uint[] _testLazyMessageFieldTags = new uint[] { 10 };
+ public static TestLazyMessage DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override TestLazyMessage DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override TestLazyMessage ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestLazyMessage__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<TestLazyMessage, TestLazyMessage.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestLazyMessage__FieldAccessorTable; }
+ }
+
+ public const int SubMessageFieldNumber = 1;
+ private bool hasSubMessage;
+ private global::Google.ProtocolBuffers.TestProtos.TestAllTypes subMessage_;
+ public bool HasSubMessage {
+ get { return hasSubMessage; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestAllTypes SubMessage {
+ get { return subMessage_ ?? global::Google.ProtocolBuffers.TestProtos.TestAllTypes.DefaultInstance; }
+ }
+
+ public override bool IsInitialized {
+ get {
+ return true;
+ }
+ }
+
+ public override void WriteTo(pb::ICodedOutputStream output) {
+ CalcSerializedSize();
+ string[] field_names = _testLazyMessageFieldNames;
+ if (hasSubMessage) {
+ output.WriteMessage(1, field_names[0], SubMessage);
+ }
+ UnknownFields.WriteTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public override int SerializedSize {
+ get {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+ return CalcSerializedSize();
+ }
+ }
+
+ private int CalcSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (hasSubMessage) {
+ size += pb::CodedOutputStream.ComputeMessageSize(1, SubMessage);
+ }
+ size += UnknownFields.SerializedSize;
+ memoizedSerializedSize = size;
+ return size;
+ }
+ public static TestLazyMessage ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static TestLazyMessage ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static TestLazyMessage ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static TestLazyMessage ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static TestLazyMessage ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static TestLazyMessage ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static TestLazyMessage ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static TestLazyMessage ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static TestLazyMessage ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static TestLazyMessage ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private TestLazyMessage 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(TestLazyMessage prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Builder : pb::GeneratedBuilder<TestLazyMessage, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(TestLazyMessage cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private TestLazyMessage result;
+
+ private TestLazyMessage PrepareBuilder() {
+ if (resultIsReadOnly) {
+ TestLazyMessage original = result;
+ result = new TestLazyMessage();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override TestLazyMessage 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.TestLazyMessage.Descriptor; }
+ }
+
+ public override TestLazyMessage DefaultInstanceForType {
+ get { return global::Google.ProtocolBuffers.TestProtos.TestLazyMessage.DefaultInstance; }
+ }
+
+ public override TestLazyMessage BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+ public override Builder MergeFrom(pb::IMessage other) {
+ if (other is TestLazyMessage) {
+ return MergeFrom((TestLazyMessage) other);
+ } else {
+ base.MergeFrom(other);
+ return this;
+ }
+ }
+
+ public override Builder MergeFrom(TestLazyMessage other) {
+ if (other == global::Google.ProtocolBuffers.TestProtos.TestLazyMessage.DefaultInstance) return this;
+ PrepareBuilder();
+ if (other.HasSubMessage) {
+ MergeSubMessage(other.SubMessage);
+ }
+ 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(_testLazyMessageFieldNames, field_name, global::System.StringComparer.Ordinal);
+ if(field_ordinal >= 0)
+ tag = _testLazyMessageFieldTags[field_ordinal];
+ else {
+ if (unknownFields == null) {
+ unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+ }
+ ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
+ continue;
+ }
+ }
+ switch (tag) {
+ case 0: {
+ throw pb::InvalidProtocolBufferException.InvalidTag();
+ }
+ default: {
+ if (pb::WireFormat.IsEndGroupTag(tag)) {
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
+ }
+ if (unknownFields == null) {
+ unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+ }
+ ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
+ break;
+ }
+ case 10: {
+ global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.TestAllTypes.CreateBuilder();
+ if (result.hasSubMessage) {
+ subBuilder.MergeFrom(SubMessage);
+ }
+ input.ReadMessage(subBuilder, extensionRegistry);
+ SubMessage = subBuilder.BuildPartial();
+ break;
+ }
+ }
+ }
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
+ }
+
+
+ public bool HasSubMessage {
+ get { return result.hasSubMessage; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestAllTypes SubMessage {
+ get { return result.SubMessage; }
+ set { SetSubMessage(value); }
+ }
+ public Builder SetSubMessage(global::Google.ProtocolBuffers.TestProtos.TestAllTypes value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasSubMessage = true;
+ result.subMessage_ = value;
+ return this;
+ }
+ public Builder SetSubMessage(global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.hasSubMessage = true;
+ result.subMessage_ = builderForValue.Build();
+ return this;
+ }
+ public Builder MergeSubMessage(global::Google.ProtocolBuffers.TestProtos.TestAllTypes value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ if (result.hasSubMessage &&
+ result.subMessage_ != global::Google.ProtocolBuffers.TestProtos.TestAllTypes.DefaultInstance) {
+ result.subMessage_ = global::Google.ProtocolBuffers.TestProtos.TestAllTypes.CreateBuilder(result.subMessage_).MergeFrom(value).BuildPartial();
+ } else {
+ result.subMessage_ = value;
+ }
+ result.hasSubMessage = true;
+ return this;
+ }
+ public Builder ClearSubMessage() {
+ PrepareBuilder();
+ result.hasSubMessage = false;
+ result.subMessage_ = null;
+ return this;
+ }
+ }
+ static TestLazyMessage() {
+ object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor, null);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class TestNestedMessageHasBits : pb::GeneratedMessage<TestNestedMessageHasBits, TestNestedMessageHasBits.Builder> {
+ private TestNestedMessageHasBits() { }
+ private static readonly TestNestedMessageHasBits defaultInstance = new TestNestedMessageHasBits().MakeReadOnly();
+ private static readonly string[] _testNestedMessageHasBitsFieldNames = new string[] { "optional_nested_message" };
+ private static readonly uint[] _testNestedMessageHasBitsFieldTags = new uint[] { 10 };
+ public static TestNestedMessageHasBits DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override TestNestedMessageHasBits DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override TestNestedMessageHasBits ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestNestedMessageHasBits__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<TestNestedMessageHasBits, TestNestedMessageHasBits.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestNestedMessageHasBits__FieldAccessorTable; }
+ }
+
+ #region Nested types
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public static partial class Types {
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class NestedMessage : pb::GeneratedMessage<NestedMessage, NestedMessage.Builder> {
+ private NestedMessage() { }
+ private static readonly NestedMessage defaultInstance = new NestedMessage().MakeReadOnly();
+ private static readonly string[] _nestedMessageFieldNames = new string[] { "nestedmessage_repeated_foreignmessage", "nestedmessage_repeated_int32" };
+ private static readonly uint[] _nestedMessageFieldTags = new uint[] { 18, 8 };
+ public static NestedMessage DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override NestedMessage DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override NestedMessage ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestNestedMessageHasBits_NestedMessage__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<NestedMessage, NestedMessage.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestNestedMessageHasBits_NestedMessage__FieldAccessorTable; }
+ }
+
+ public const int NestedmessageRepeatedInt32FieldNumber = 1;
+ private pbc::PopsicleList<int> nestedmessageRepeatedInt32_ = new pbc::PopsicleList<int>();
+ public scg::IList<int> NestedmessageRepeatedInt32List {
+ get { return pbc::Lists.AsReadOnly(nestedmessageRepeatedInt32_); }
+ }
+ public int NestedmessageRepeatedInt32Count {
+ get { return nestedmessageRepeatedInt32_.Count; }
+ }
+ public int GetNestedmessageRepeatedInt32(int index) {
+ return nestedmessageRepeatedInt32_[index];
+ }
+
+ public const int NestedmessageRepeatedForeignmessageFieldNumber = 2;
+ private pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.ForeignMessage> nestedmessageRepeatedForeignmessage_ = new pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.ForeignMessage>();
+ public scg::IList<global::Google.ProtocolBuffers.TestProtos.ForeignMessage> NestedmessageRepeatedForeignmessageList {
+ get { return nestedmessageRepeatedForeignmessage_; }
+ }
+ public int NestedmessageRepeatedForeignmessageCount {
+ get { return nestedmessageRepeatedForeignmessage_.Count; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.ForeignMessage GetNestedmessageRepeatedForeignmessage(int index) {
+ return nestedmessageRepeatedForeignmessage_[index];
+ }
+
+ public override bool IsInitialized {
+ get {
+ return true;
+ }
+ }
+
+ public override void WriteTo(pb::ICodedOutputStream output) {
+ CalcSerializedSize();
+ string[] field_names = _nestedMessageFieldNames;
+ if (nestedmessageRepeatedInt32_.Count > 0) {
+ output.WriteInt32Array(1, field_names[1], nestedmessageRepeatedInt32_);
+ }
+ if (nestedmessageRepeatedForeignmessage_.Count > 0) {
+ output.WriteMessageArray(2, field_names[0], nestedmessageRepeatedForeignmessage_);
+ }
+ UnknownFields.WriteTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public override int SerializedSize {
+ get {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+ return CalcSerializedSize();
+ }
+ }
+
+ private int CalcSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ {
+ int dataSize = 0;
+ foreach (int element in NestedmessageRepeatedInt32List) {
+ dataSize += pb::CodedOutputStream.ComputeInt32SizeNoTag(element);
+ }
+ size += dataSize;
+ size += 1 * nestedmessageRepeatedInt32_.Count;
+ }
+ foreach (global::Google.ProtocolBuffers.TestProtos.ForeignMessage element in NestedmessageRepeatedForeignmessageList) {
+ size += pb::CodedOutputStream.ComputeMessageSize(2, element);
+ }
+ size += UnknownFields.SerializedSize;
+ memoizedSerializedSize = size;
+ return size;
+ }
+ public static NestedMessage ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static NestedMessage ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static NestedMessage ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static NestedMessage ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static NestedMessage ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static NestedMessage ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static NestedMessage ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static NestedMessage ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static NestedMessage ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static NestedMessage ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private NestedMessage MakeReadOnly() {
+ nestedmessageRepeatedInt32_.MakeReadOnly();
+ nestedmessageRepeatedForeignmessage_.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(NestedMessage prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Builder : pb::GeneratedBuilder<NestedMessage, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(NestedMessage cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private NestedMessage result;
+
+ private NestedMessage PrepareBuilder() {
+ if (resultIsReadOnly) {
+ NestedMessage original = result;
+ result = new NestedMessage();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override NestedMessage 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.TestNestedMessageHasBits.Types.NestedMessage.Descriptor; }
+ }
+
+ public override NestedMessage DefaultInstanceForType {
+ get { return global::Google.ProtocolBuffers.TestProtos.TestNestedMessageHasBits.Types.NestedMessage.DefaultInstance; }
+ }
+
+ public override NestedMessage BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+ public override Builder MergeFrom(pb::IMessage other) {
+ if (other is NestedMessage) {
+ return MergeFrom((NestedMessage) other);
+ } else {
+ base.MergeFrom(other);
+ return this;
+ }
+ }
+
+ public override Builder MergeFrom(NestedMessage other) {
+ if (other == global::Google.ProtocolBuffers.TestProtos.TestNestedMessageHasBits.Types.NestedMessage.DefaultInstance) return this;
+ PrepareBuilder();
+ if (other.nestedmessageRepeatedInt32_.Count != 0) {
+ result.nestedmessageRepeatedInt32_.Add(other.nestedmessageRepeatedInt32_);
+ }
+ if (other.nestedmessageRepeatedForeignmessage_.Count != 0) {
+ result.nestedmessageRepeatedForeignmessage_.Add(other.nestedmessageRepeatedForeignmessage_);
+ }
+ 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(_nestedMessageFieldNames, field_name, global::System.StringComparer.Ordinal);
+ if(field_ordinal >= 0)
+ tag = _nestedMessageFieldTags[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.nestedmessageRepeatedInt32_);
+ break;
+ }
+ case 18: {
+ input.ReadMessageArray(tag, field_name, result.nestedmessageRepeatedForeignmessage_, global::Google.ProtocolBuffers.TestProtos.ForeignMessage.DefaultInstance, extensionRegistry);
+ break;
+ }
+ }
+ }
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
+ }
+
+
+ public pbc::IPopsicleList<int> NestedmessageRepeatedInt32List {
+ get { return PrepareBuilder().nestedmessageRepeatedInt32_; }
+ }
+ public int NestedmessageRepeatedInt32Count {
+ get { return result.NestedmessageRepeatedInt32Count; }
+ }
+ public int GetNestedmessageRepeatedInt32(int index) {
+ return result.GetNestedmessageRepeatedInt32(index);
+ }
+ public Builder SetNestedmessageRepeatedInt32(int index, int value) {
+ PrepareBuilder();
+ result.nestedmessageRepeatedInt32_[index] = value;
+ return this;
+ }
+ public Builder AddNestedmessageRepeatedInt32(int value) {
+ PrepareBuilder();
+ result.nestedmessageRepeatedInt32_.Add(value);
+ return this;
+ }
+ public Builder AddRangeNestedmessageRepeatedInt32(scg::IEnumerable<int> values) {
+ PrepareBuilder();
+ result.nestedmessageRepeatedInt32_.Add(values);
+ return this;
+ }
+ public Builder ClearNestedmessageRepeatedInt32() {
+ PrepareBuilder();
+ result.nestedmessageRepeatedInt32_.Clear();
+ return this;
+ }
+
+ public pbc::IPopsicleList<global::Google.ProtocolBuffers.TestProtos.ForeignMessage> NestedmessageRepeatedForeignmessageList {
+ get { return PrepareBuilder().nestedmessageRepeatedForeignmessage_; }
+ }
+ public int NestedmessageRepeatedForeignmessageCount {
+ get { return result.NestedmessageRepeatedForeignmessageCount; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.ForeignMessage GetNestedmessageRepeatedForeignmessage(int index) {
+ return result.GetNestedmessageRepeatedForeignmessage(index);
+ }
+ public Builder SetNestedmessageRepeatedForeignmessage(int index, global::Google.ProtocolBuffers.TestProtos.ForeignMessage value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.nestedmessageRepeatedForeignmessage_[index] = value;
+ return this;
+ }
+ public Builder SetNestedmessageRepeatedForeignmessage(int index, global::Google.ProtocolBuffers.TestProtos.ForeignMessage.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.nestedmessageRepeatedForeignmessage_[index] = builderForValue.Build();
+ return this;
+ }
+ public Builder AddNestedmessageRepeatedForeignmessage(global::Google.ProtocolBuffers.TestProtos.ForeignMessage value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.nestedmessageRepeatedForeignmessage_.Add(value);
+ return this;
+ }
+ public Builder AddNestedmessageRepeatedForeignmessage(global::Google.ProtocolBuffers.TestProtos.ForeignMessage.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.nestedmessageRepeatedForeignmessage_.Add(builderForValue.Build());
+ return this;
+ }
+ public Builder AddRangeNestedmessageRepeatedForeignmessage(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.ForeignMessage> values) {
+ PrepareBuilder();
+ result.nestedmessageRepeatedForeignmessage_.Add(values);
+ return this;
+ }
+ public Builder ClearNestedmessageRepeatedForeignmessage() {
+ PrepareBuilder();
+ result.nestedmessageRepeatedForeignmessage_.Clear();
+ return this;
+ }
+ }
+ static NestedMessage() {
+ object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor, null);
+ }
+ }
+
+ }
+ #endregion
+
+ public const int OptionalNestedMessageFieldNumber = 1;
+ private bool hasOptionalNestedMessage;
+ private global::Google.ProtocolBuffers.TestProtos.TestNestedMessageHasBits.Types.NestedMessage optionalNestedMessage_;
+ public bool HasOptionalNestedMessage {
+ get { return hasOptionalNestedMessage; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestNestedMessageHasBits.Types.NestedMessage OptionalNestedMessage {
+ get { return optionalNestedMessage_ ?? global::Google.ProtocolBuffers.TestProtos.TestNestedMessageHasBits.Types.NestedMessage.DefaultInstance; }
+ }
+
+ public override bool IsInitialized {
+ get {
+ return true;
+ }
+ }
+
+ public override void WriteTo(pb::ICodedOutputStream output) {
+ CalcSerializedSize();
+ string[] field_names = _testNestedMessageHasBitsFieldNames;
+ if (hasOptionalNestedMessage) {
+ output.WriteMessage(1, field_names[0], OptionalNestedMessage);
+ }
+ UnknownFields.WriteTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public override int SerializedSize {
+ get {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+ return CalcSerializedSize();
+ }
+ }
+
+ private int CalcSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (hasOptionalNestedMessage) {
+ size += pb::CodedOutputStream.ComputeMessageSize(1, OptionalNestedMessage);
+ }
+ size += UnknownFields.SerializedSize;
+ memoizedSerializedSize = size;
+ return size;
+ }
+ public static TestNestedMessageHasBits ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static TestNestedMessageHasBits ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static TestNestedMessageHasBits ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static TestNestedMessageHasBits ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static TestNestedMessageHasBits ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static TestNestedMessageHasBits ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static TestNestedMessageHasBits ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static TestNestedMessageHasBits ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static TestNestedMessageHasBits ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static TestNestedMessageHasBits ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private TestNestedMessageHasBits 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(TestNestedMessageHasBits prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Builder : pb::GeneratedBuilder<TestNestedMessageHasBits, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(TestNestedMessageHasBits cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private TestNestedMessageHasBits result;
+
+ private TestNestedMessageHasBits PrepareBuilder() {
+ if (resultIsReadOnly) {
+ TestNestedMessageHasBits original = result;
+ result = new TestNestedMessageHasBits();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override TestNestedMessageHasBits 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.TestNestedMessageHasBits.Descriptor; }
+ }
+
+ public override TestNestedMessageHasBits DefaultInstanceForType {
+ get { return global::Google.ProtocolBuffers.TestProtos.TestNestedMessageHasBits.DefaultInstance; }
+ }
+
+ public override TestNestedMessageHasBits BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+ public override Builder MergeFrom(pb::IMessage other) {
+ if (other is TestNestedMessageHasBits) {
+ return MergeFrom((TestNestedMessageHasBits) other);
+ } else {
+ base.MergeFrom(other);
+ return this;
+ }
+ }
+
+ public override Builder MergeFrom(TestNestedMessageHasBits other) {
+ if (other == global::Google.ProtocolBuffers.TestProtos.TestNestedMessageHasBits.DefaultInstance) return this;
+ PrepareBuilder();
+ if (other.HasOptionalNestedMessage) {
+ MergeOptionalNestedMessage(other.OptionalNestedMessage);
+ }
+ 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(_testNestedMessageHasBitsFieldNames, field_name, global::System.StringComparer.Ordinal);
+ if(field_ordinal >= 0)
+ tag = _testNestedMessageHasBitsFieldTags[field_ordinal];
+ else {
+ if (unknownFields == null) {
+ unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+ }
+ ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
+ continue;
+ }
+ }
+ switch (tag) {
+ case 0: {
+ throw pb::InvalidProtocolBufferException.InvalidTag();
+ }
+ default: {
+ if (pb::WireFormat.IsEndGroupTag(tag)) {
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
+ }
+ if (unknownFields == null) {
+ unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+ }
+ ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
+ break;
+ }
+ case 10: {
+ global::Google.ProtocolBuffers.TestProtos.TestNestedMessageHasBits.Types.NestedMessage.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.TestNestedMessageHasBits.Types.NestedMessage.CreateBuilder();
+ if (result.hasOptionalNestedMessage) {
+ subBuilder.MergeFrom(OptionalNestedMessage);
+ }
+ input.ReadMessage(subBuilder, extensionRegistry);
+ OptionalNestedMessage = subBuilder.BuildPartial();
+ break;
+ }
+ }
+ }
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
+ }
+
+
+ public bool HasOptionalNestedMessage {
+ get { return result.hasOptionalNestedMessage; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestNestedMessageHasBits.Types.NestedMessage OptionalNestedMessage {
+ get { return result.OptionalNestedMessage; }
+ set { SetOptionalNestedMessage(value); }
+ }
+ public Builder SetOptionalNestedMessage(global::Google.ProtocolBuffers.TestProtos.TestNestedMessageHasBits.Types.NestedMessage value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasOptionalNestedMessage = true;
+ result.optionalNestedMessage_ = value;
+ return this;
+ }
+ public Builder SetOptionalNestedMessage(global::Google.ProtocolBuffers.TestProtos.TestNestedMessageHasBits.Types.NestedMessage.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.hasOptionalNestedMessage = true;
+ result.optionalNestedMessage_ = builderForValue.Build();
+ return this;
+ }
+ public Builder MergeOptionalNestedMessage(global::Google.ProtocolBuffers.TestProtos.TestNestedMessageHasBits.Types.NestedMessage value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ if (result.hasOptionalNestedMessage &&
+ result.optionalNestedMessage_ != global::Google.ProtocolBuffers.TestProtos.TestNestedMessageHasBits.Types.NestedMessage.DefaultInstance) {
+ result.optionalNestedMessage_ = global::Google.ProtocolBuffers.TestProtos.TestNestedMessageHasBits.Types.NestedMessage.CreateBuilder(result.optionalNestedMessage_).MergeFrom(value).BuildPartial();
+ } else {
+ result.optionalNestedMessage_ = value;
+ }
+ result.hasOptionalNestedMessage = true;
+ return this;
+ }
+ public Builder ClearOptionalNestedMessage() {
+ PrepareBuilder();
+ result.hasOptionalNestedMessage = false;
+ result.optionalNestedMessage_ = null;
+ return this;
+ }
+ }
+ static TestNestedMessageHasBits() {
+ object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor, null);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class TestCamelCaseFieldNames : pb::GeneratedMessage<TestCamelCaseFieldNames, TestCamelCaseFieldNames.Builder> {
+ private TestCamelCaseFieldNames() { }
+ private static readonly TestCamelCaseFieldNames defaultInstance = new TestCamelCaseFieldNames().MakeReadOnly();
+ private static readonly string[] _testCamelCaseFieldNamesFieldNames = new string[] { "CordField", "EnumField", "MessageField", "PrimitiveField", "RepeatedCordField", "RepeatedEnumField", "RepeatedMessageField", "RepeatedPrimitiveField", "RepeatedStringField", "RepeatedStringPieceField", "StringField", "StringPieceField" };
+ private static readonly uint[] _testCamelCaseFieldNamesFieldTags = new uint[] { 50, 24, 34, 8, 98, 72, 82, 56, 66, 90, 18, 42 };
+ public static TestCamelCaseFieldNames DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override TestCamelCaseFieldNames DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override TestCamelCaseFieldNames ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestCamelCaseFieldNames__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<TestCamelCaseFieldNames, TestCamelCaseFieldNames.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestCamelCaseFieldNames__FieldAccessorTable; }
+ }
+
+ public const int PrimitiveFieldFieldNumber = 1;
+ private bool hasPrimitiveField;
+ private int primitiveField_;
+ public bool HasPrimitiveField {
+ get { return hasPrimitiveField; }
+ }
+ public int PrimitiveField {
+ get { return primitiveField_; }
+ }
+
+ public const int StringFieldFieldNumber = 2;
+ private bool hasStringField;
+ private string stringField_ = "";
+ public bool HasStringField {
+ get { return hasStringField; }
+ }
+ public string StringField {
+ get { return stringField_; }
+ }
+
+ public const int EnumFieldFieldNumber = 3;
+ private bool hasEnumField;
+ private global::Google.ProtocolBuffers.TestProtos.ForeignEnum enumField_ = global::Google.ProtocolBuffers.TestProtos.ForeignEnum.FOREIGN_FOO;
+ public bool HasEnumField {
+ get { return hasEnumField; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.ForeignEnum EnumField {
+ get { return enumField_; }
+ }
+
+ public const int MessageFieldFieldNumber = 4;
+ private bool hasMessageField;
+ private global::Google.ProtocolBuffers.TestProtos.ForeignMessage messageField_;
+ public bool HasMessageField {
+ get { return hasMessageField; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.ForeignMessage MessageField {
+ get { return messageField_ ?? global::Google.ProtocolBuffers.TestProtos.ForeignMessage.DefaultInstance; }
+ }
+
+ public const int StringPieceFieldFieldNumber = 5;
+ private bool hasStringPieceField;
+ private string stringPieceField_ = "";
+ public bool HasStringPieceField {
+ get { return hasStringPieceField; }
+ }
+ public string StringPieceField {
+ get { return stringPieceField_; }
+ }
+
+ public const int CordFieldFieldNumber = 6;
+ private bool hasCordField;
+ private string cordField_ = "";
+ public bool HasCordField {
+ get { return hasCordField; }
+ }
+ public string CordField {
+ get { return cordField_; }
+ }
+
+ public const int RepeatedPrimitiveFieldFieldNumber = 7;
+ private pbc::PopsicleList<int> repeatedPrimitiveField_ = new pbc::PopsicleList<int>();
+ public scg::IList<int> RepeatedPrimitiveFieldList {
+ get { return pbc::Lists.AsReadOnly(repeatedPrimitiveField_); }
+ }
+ public int RepeatedPrimitiveFieldCount {
+ get { return repeatedPrimitiveField_.Count; }
+ }
+ public int GetRepeatedPrimitiveField(int index) {
+ return repeatedPrimitiveField_[index];
+ }
+
+ public const int RepeatedStringFieldFieldNumber = 8;
+ private pbc::PopsicleList<string> repeatedStringField_ = new pbc::PopsicleList<string>();
+ public scg::IList<string> RepeatedStringFieldList {
+ get { return pbc::Lists.AsReadOnly(repeatedStringField_); }
+ }
+ public int RepeatedStringFieldCount {
+ get { return repeatedStringField_.Count; }
+ }
+ public string GetRepeatedStringField(int index) {
+ return repeatedStringField_[index];
+ }
+
+ public const int RepeatedEnumFieldFieldNumber = 9;
+ private pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.ForeignEnum> repeatedEnumField_ = new pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.ForeignEnum>();
+ public scg::IList<global::Google.ProtocolBuffers.TestProtos.ForeignEnum> RepeatedEnumFieldList {
+ get { return pbc::Lists.AsReadOnly(repeatedEnumField_); }
+ }
+ public int RepeatedEnumFieldCount {
+ get { return repeatedEnumField_.Count; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.ForeignEnum GetRepeatedEnumField(int index) {
+ return repeatedEnumField_[index];
+ }
+
+ public const int RepeatedMessageFieldFieldNumber = 10;
+ private pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.ForeignMessage> repeatedMessageField_ = new pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.ForeignMessage>();
+ public scg::IList<global::Google.ProtocolBuffers.TestProtos.ForeignMessage> RepeatedMessageFieldList {
+ get { return repeatedMessageField_; }
+ }
+ public int RepeatedMessageFieldCount {
+ get { return repeatedMessageField_.Count; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.ForeignMessage GetRepeatedMessageField(int index) {
+ return repeatedMessageField_[index];
+ }
+
+ public const int RepeatedStringPieceFieldFieldNumber = 11;
+ private pbc::PopsicleList<string> repeatedStringPieceField_ = new pbc::PopsicleList<string>();
+ public scg::IList<string> RepeatedStringPieceFieldList {
+ get { return pbc::Lists.AsReadOnly(repeatedStringPieceField_); }
+ }
+ public int RepeatedStringPieceFieldCount {
+ get { return repeatedStringPieceField_.Count; }
+ }
+ public string GetRepeatedStringPieceField(int index) {
+ return repeatedStringPieceField_[index];
+ }
+
+ public const int RepeatedCordFieldFieldNumber = 12;
+ private pbc::PopsicleList<string> repeatedCordField_ = new pbc::PopsicleList<string>();
+ public scg::IList<string> RepeatedCordFieldList {
+ get { return pbc::Lists.AsReadOnly(repeatedCordField_); }
+ }
+ public int RepeatedCordFieldCount {
+ get { return repeatedCordField_.Count; }
+ }
+ public string GetRepeatedCordField(int index) {
+ return repeatedCordField_[index];
+ }
+
+ public override bool IsInitialized {
+ get {
+ return true;
+ }
+ }
+
+ public override void WriteTo(pb::ICodedOutputStream output) {
+ CalcSerializedSize();
+ string[] field_names = _testCamelCaseFieldNamesFieldNames;
+ if (hasPrimitiveField) {
+ output.WriteInt32(1, field_names[3], PrimitiveField);
+ }
+ if (hasStringField) {
+ output.WriteString(2, field_names[10], StringField);
+ }
+ if (hasEnumField) {
+ output.WriteEnum(3, field_names[1], (int) EnumField, EnumField);
+ }
+ if (hasMessageField) {
+ output.WriteMessage(4, field_names[2], MessageField);
+ }
+ if (hasStringPieceField) {
+ output.WriteString(5, field_names[11], StringPieceField);
+ }
+ if (hasCordField) {
+ output.WriteString(6, field_names[0], CordField);
+ }
+ if (repeatedPrimitiveField_.Count > 0) {
+ output.WriteInt32Array(7, field_names[7], repeatedPrimitiveField_);
+ }
+ if (repeatedStringField_.Count > 0) {
+ output.WriteStringArray(8, field_names[8], repeatedStringField_);
+ }
+ if (repeatedEnumField_.Count > 0) {
+ output.WriteEnumArray(9, field_names[5], repeatedEnumField_);
+ }
+ if (repeatedMessageField_.Count > 0) {
+ output.WriteMessageArray(10, field_names[6], repeatedMessageField_);
+ }
+ if (repeatedStringPieceField_.Count > 0) {
+ output.WriteStringArray(11, field_names[9], repeatedStringPieceField_);
+ }
+ if (repeatedCordField_.Count > 0) {
+ output.WriteStringArray(12, field_names[4], repeatedCordField_);
+ }
+ UnknownFields.WriteTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public override int SerializedSize {
+ get {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+ return CalcSerializedSize();
+ }
+ }
+
+ private int CalcSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (hasPrimitiveField) {
+ size += pb::CodedOutputStream.ComputeInt32Size(1, PrimitiveField);
+ }
+ if (hasStringField) {
+ size += pb::CodedOutputStream.ComputeStringSize(2, StringField);
+ }
+ if (hasEnumField) {
+ size += pb::CodedOutputStream.ComputeEnumSize(3, (int) EnumField);
+ }
+ if (hasMessageField) {
+ size += pb::CodedOutputStream.ComputeMessageSize(4, MessageField);
+ }
+ if (hasStringPieceField) {
+ size += pb::CodedOutputStream.ComputeStringSize(5, StringPieceField);
+ }
+ if (hasCordField) {
+ size += pb::CodedOutputStream.ComputeStringSize(6, CordField);
+ }
+ {
+ int dataSize = 0;
+ foreach (int element in RepeatedPrimitiveFieldList) {
+ dataSize += pb::CodedOutputStream.ComputeInt32SizeNoTag(element);
+ }
+ size += dataSize;
+ size += 1 * repeatedPrimitiveField_.Count;
+ }
+ {
+ int dataSize = 0;
+ foreach (string element in RepeatedStringFieldList) {
+ dataSize += pb::CodedOutputStream.ComputeStringSizeNoTag(element);
+ }
+ size += dataSize;
+ size += 1 * repeatedStringField_.Count;
+ }
+ {
+ int dataSize = 0;
+ if (repeatedEnumField_.Count > 0) {
+ foreach (global::Google.ProtocolBuffers.TestProtos.ForeignEnum element in repeatedEnumField_) {
+ dataSize += pb::CodedOutputStream.ComputeEnumSizeNoTag((int) element);
+ }
+ size += dataSize;
+ size += 1 * repeatedEnumField_.Count;
+ }
+ }
+ foreach (global::Google.ProtocolBuffers.TestProtos.ForeignMessage element in RepeatedMessageFieldList) {
+ size += pb::CodedOutputStream.ComputeMessageSize(10, element);
+ }
+ {
+ int dataSize = 0;
+ foreach (string element in RepeatedStringPieceFieldList) {
+ dataSize += pb::CodedOutputStream.ComputeStringSizeNoTag(element);
+ }
+ size += dataSize;
+ size += 1 * repeatedStringPieceField_.Count;
+ }
+ {
+ int dataSize = 0;
+ foreach (string element in RepeatedCordFieldList) {
+ dataSize += pb::CodedOutputStream.ComputeStringSizeNoTag(element);
+ }
+ size += dataSize;
+ size += 1 * repeatedCordField_.Count;
+ }
+ size += UnknownFields.SerializedSize;
+ memoizedSerializedSize = size;
+ return size;
+ }
+ public static TestCamelCaseFieldNames ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static TestCamelCaseFieldNames ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static TestCamelCaseFieldNames ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static TestCamelCaseFieldNames ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static TestCamelCaseFieldNames ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static TestCamelCaseFieldNames ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static TestCamelCaseFieldNames ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static TestCamelCaseFieldNames ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static TestCamelCaseFieldNames ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static TestCamelCaseFieldNames ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private TestCamelCaseFieldNames MakeReadOnly() {
+ repeatedPrimitiveField_.MakeReadOnly();
+ repeatedStringField_.MakeReadOnly();
+ repeatedEnumField_.MakeReadOnly();
+ repeatedMessageField_.MakeReadOnly();
+ repeatedStringPieceField_.MakeReadOnly();
+ repeatedCordField_.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(TestCamelCaseFieldNames prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Builder : pb::GeneratedBuilder<TestCamelCaseFieldNames, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(TestCamelCaseFieldNames cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private TestCamelCaseFieldNames result;
+
+ private TestCamelCaseFieldNames PrepareBuilder() {
+ if (resultIsReadOnly) {
+ TestCamelCaseFieldNames original = result;
+ result = new TestCamelCaseFieldNames();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override TestCamelCaseFieldNames 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.TestCamelCaseFieldNames.Descriptor; }
+ }
+
+ public override TestCamelCaseFieldNames DefaultInstanceForType {
+ get { return global::Google.ProtocolBuffers.TestProtos.TestCamelCaseFieldNames.DefaultInstance; }
+ }
+
+ public override TestCamelCaseFieldNames BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+ public override Builder MergeFrom(pb::IMessage other) {
+ if (other is TestCamelCaseFieldNames) {
+ return MergeFrom((TestCamelCaseFieldNames) other);
+ } else {
+ base.MergeFrom(other);
+ return this;
+ }
+ }
+
+ public override Builder MergeFrom(TestCamelCaseFieldNames other) {
+ if (other == global::Google.ProtocolBuffers.TestProtos.TestCamelCaseFieldNames.DefaultInstance) return this;
+ PrepareBuilder();
+ if (other.HasPrimitiveField) {
+ PrimitiveField = other.PrimitiveField;
+ }
+ if (other.HasStringField) {
+ StringField = other.StringField;
+ }
+ if (other.HasEnumField) {
+ EnumField = other.EnumField;
+ }
+ if (other.HasMessageField) {
+ MergeMessageField(other.MessageField);
+ }
+ if (other.HasStringPieceField) {
+ StringPieceField = other.StringPieceField;
+ }
+ if (other.HasCordField) {
+ CordField = other.CordField;
+ }
+ if (other.repeatedPrimitiveField_.Count != 0) {
+ result.repeatedPrimitiveField_.Add(other.repeatedPrimitiveField_);
+ }
+ if (other.repeatedStringField_.Count != 0) {
+ result.repeatedStringField_.Add(other.repeatedStringField_);
+ }
+ if (other.repeatedEnumField_.Count != 0) {
+ result.repeatedEnumField_.Add(other.repeatedEnumField_);
+ }
+ if (other.repeatedMessageField_.Count != 0) {
+ result.repeatedMessageField_.Add(other.repeatedMessageField_);
+ }
+ if (other.repeatedStringPieceField_.Count != 0) {
+ result.repeatedStringPieceField_.Add(other.repeatedStringPieceField_);
+ }
+ if (other.repeatedCordField_.Count != 0) {
+ result.repeatedCordField_.Add(other.repeatedCordField_);
+ }
+ 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(_testCamelCaseFieldNamesFieldNames, field_name, global::System.StringComparer.Ordinal);
+ if(field_ordinal >= 0)
+ tag = _testCamelCaseFieldNamesFieldTags[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.hasPrimitiveField = input.ReadInt32(ref result.primitiveField_);
+ break;
+ }
+ case 18: {
+ result.hasStringField = input.ReadString(ref result.stringField_);
+ break;
+ }
+ case 24: {
+ object unknown;
+ if(input.ReadEnum(ref result.enumField_, out unknown)) {
+ result.hasEnumField = true;
+ } else if(unknown is int) {
+ if (unknownFields == null) {
+ unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+ }
+ unknownFields.MergeVarintField(3, (ulong)(int)unknown);
+ }
+ break;
+ }
+ case 34: {
+ global::Google.ProtocolBuffers.TestProtos.ForeignMessage.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.ForeignMessage.CreateBuilder();
+ if (result.hasMessageField) {
+ subBuilder.MergeFrom(MessageField);
+ }
+ input.ReadMessage(subBuilder, extensionRegistry);
+ MessageField = subBuilder.BuildPartial();
+ break;
+ }
+ case 42: {
+ result.hasStringPieceField = input.ReadString(ref result.stringPieceField_);
+ break;
+ }
+ case 50: {
+ result.hasCordField = input.ReadString(ref result.cordField_);
+ break;
+ }
+ case 58:
+ case 56: {
+ input.ReadInt32Array(tag, field_name, result.repeatedPrimitiveField_);
+ break;
+ }
+ case 66: {
+ input.ReadStringArray(tag, field_name, result.repeatedStringField_);
+ break;
+ }
+ case 74:
+ case 72: {
+ scg::ICollection<object> unknownItems;
+ input.ReadEnumArray<global::Google.ProtocolBuffers.TestProtos.ForeignEnum>(tag, field_name, result.repeatedEnumField_, out unknownItems);
+ if (unknownItems != null) {
+ if (unknownFields == null) {
+ unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+ }
+ foreach (object rawValue in unknownItems)
+ if (rawValue is int)
+ unknownFields.MergeVarintField(9, (ulong)(int)rawValue);
+ }
+ break;
+ }
+ case 82: {
+ input.ReadMessageArray(tag, field_name, result.repeatedMessageField_, global::Google.ProtocolBuffers.TestProtos.ForeignMessage.DefaultInstance, extensionRegistry);
+ break;
+ }
+ case 90: {
+ input.ReadStringArray(tag, field_name, result.repeatedStringPieceField_);
+ break;
+ }
+ case 98: {
+ input.ReadStringArray(tag, field_name, result.repeatedCordField_);
+ break;
+ }
+ }
+ }
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
+ }
+
+
+ public bool HasPrimitiveField {
+ get { return result.hasPrimitiveField; }
+ }
+ public int PrimitiveField {
+ get { return result.PrimitiveField; }
+ set { SetPrimitiveField(value); }
+ }
+ public Builder SetPrimitiveField(int value) {
+ PrepareBuilder();
+ result.hasPrimitiveField = true;
+ result.primitiveField_ = value;
+ return this;
+ }
+ public Builder ClearPrimitiveField() {
+ PrepareBuilder();
+ result.hasPrimitiveField = false;
+ result.primitiveField_ = 0;
+ return this;
+ }
+
+ public bool HasStringField {
+ get { return result.hasStringField; }
+ }
+ public string StringField {
+ get { return result.StringField; }
+ set { SetStringField(value); }
+ }
+ public Builder SetStringField(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasStringField = true;
+ result.stringField_ = value;
+ return this;
+ }
+ public Builder ClearStringField() {
+ PrepareBuilder();
+ result.hasStringField = false;
+ result.stringField_ = "";
+ return this;
+ }
+
+ public bool HasEnumField {
+ get { return result.hasEnumField; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.ForeignEnum EnumField {
+ get { return result.EnumField; }
+ set { SetEnumField(value); }
+ }
+ public Builder SetEnumField(global::Google.ProtocolBuffers.TestProtos.ForeignEnum value) {
+ PrepareBuilder();
+ result.hasEnumField = true;
+ result.enumField_ = value;
+ return this;
+ }
+ public Builder ClearEnumField() {
+ PrepareBuilder();
+ result.hasEnumField = false;
+ result.enumField_ = global::Google.ProtocolBuffers.TestProtos.ForeignEnum.FOREIGN_FOO;
+ return this;
+ }
+
+ public bool HasMessageField {
+ get { return result.hasMessageField; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.ForeignMessage MessageField {
+ get { return result.MessageField; }
+ set { SetMessageField(value); }
+ }
+ public Builder SetMessageField(global::Google.ProtocolBuffers.TestProtos.ForeignMessage value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasMessageField = true;
+ result.messageField_ = value;
+ return this;
+ }
+ public Builder SetMessageField(global::Google.ProtocolBuffers.TestProtos.ForeignMessage.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.hasMessageField = true;
+ result.messageField_ = builderForValue.Build();
+ return this;
+ }
+ public Builder MergeMessageField(global::Google.ProtocolBuffers.TestProtos.ForeignMessage value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ if (result.hasMessageField &&
+ result.messageField_ != global::Google.ProtocolBuffers.TestProtos.ForeignMessage.DefaultInstance) {
+ result.messageField_ = global::Google.ProtocolBuffers.TestProtos.ForeignMessage.CreateBuilder(result.messageField_).MergeFrom(value).BuildPartial();
+ } else {
+ result.messageField_ = value;
+ }
+ result.hasMessageField = true;
+ return this;
+ }
+ public Builder ClearMessageField() {
+ PrepareBuilder();
+ result.hasMessageField = false;
+ result.messageField_ = null;
+ return this;
+ }
+
+ public bool HasStringPieceField {
+ get { return result.hasStringPieceField; }
+ }
+ public string StringPieceField {
+ get { return result.StringPieceField; }
+ set { SetStringPieceField(value); }
+ }
+ public Builder SetStringPieceField(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasStringPieceField = true;
+ result.stringPieceField_ = value;
+ return this;
+ }
+ public Builder ClearStringPieceField() {
+ PrepareBuilder();
+ result.hasStringPieceField = false;
+ result.stringPieceField_ = "";
+ return this;
+ }
+
+ public bool HasCordField {
+ get { return result.hasCordField; }
+ }
+ public string CordField {
+ get { return result.CordField; }
+ set { SetCordField(value); }
+ }
+ public Builder SetCordField(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasCordField = true;
+ result.cordField_ = value;
+ return this;
+ }
+ public Builder ClearCordField() {
+ PrepareBuilder();
+ result.hasCordField = false;
+ result.cordField_ = "";
+ return this;
+ }
+
+ public pbc::IPopsicleList<int> RepeatedPrimitiveFieldList {
+ get { return PrepareBuilder().repeatedPrimitiveField_; }
+ }
+ public int RepeatedPrimitiveFieldCount {
+ get { return result.RepeatedPrimitiveFieldCount; }
+ }
+ public int GetRepeatedPrimitiveField(int index) {
+ return result.GetRepeatedPrimitiveField(index);
+ }
+ public Builder SetRepeatedPrimitiveField(int index, int value) {
+ PrepareBuilder();
+ result.repeatedPrimitiveField_[index] = value;
+ return this;
+ }
+ public Builder AddRepeatedPrimitiveField(int value) {
+ PrepareBuilder();
+ result.repeatedPrimitiveField_.Add(value);
+ return this;
+ }
+ public Builder AddRangeRepeatedPrimitiveField(scg::IEnumerable<int> values) {
+ PrepareBuilder();
+ result.repeatedPrimitiveField_.Add(values);
+ return this;
+ }
+ public Builder ClearRepeatedPrimitiveField() {
+ PrepareBuilder();
+ result.repeatedPrimitiveField_.Clear();
+ return this;
+ }
+
+ public pbc::IPopsicleList<string> RepeatedStringFieldList {
+ get { return PrepareBuilder().repeatedStringField_; }
+ }
+ public int RepeatedStringFieldCount {
+ get { return result.RepeatedStringFieldCount; }
+ }
+ public string GetRepeatedStringField(int index) {
+ return result.GetRepeatedStringField(index);
+ }
+ public Builder SetRepeatedStringField(int index, string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.repeatedStringField_[index] = value;
+ return this;
+ }
+ public Builder AddRepeatedStringField(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.repeatedStringField_.Add(value);
+ return this;
+ }
+ public Builder AddRangeRepeatedStringField(scg::IEnumerable<string> values) {
+ PrepareBuilder();
+ result.repeatedStringField_.Add(values);
+ return this;
+ }
+ public Builder ClearRepeatedStringField() {
+ PrepareBuilder();
+ result.repeatedStringField_.Clear();
+ return this;
+ }
+
+ public pbc::IPopsicleList<global::Google.ProtocolBuffers.TestProtos.ForeignEnum> RepeatedEnumFieldList {
+ get { return PrepareBuilder().repeatedEnumField_; }
+ }
+ public int RepeatedEnumFieldCount {
+ get { return result.RepeatedEnumFieldCount; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.ForeignEnum GetRepeatedEnumField(int index) {
+ return result.GetRepeatedEnumField(index);
+ }
+ public Builder SetRepeatedEnumField(int index, global::Google.ProtocolBuffers.TestProtos.ForeignEnum value) {
+ PrepareBuilder();
+ result.repeatedEnumField_[index] = value;
+ return this;
+ }
+ public Builder AddRepeatedEnumField(global::Google.ProtocolBuffers.TestProtos.ForeignEnum value) {
+ PrepareBuilder();
+ result.repeatedEnumField_.Add(value);
+ return this;
+ }
+ public Builder AddRangeRepeatedEnumField(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.ForeignEnum> values) {
+ PrepareBuilder();
+ result.repeatedEnumField_.Add(values);
+ return this;
+ }
+ public Builder ClearRepeatedEnumField() {
+ PrepareBuilder();
+ result.repeatedEnumField_.Clear();
+ return this;
+ }
+
+ public pbc::IPopsicleList<global::Google.ProtocolBuffers.TestProtos.ForeignMessage> RepeatedMessageFieldList {
+ get { return PrepareBuilder().repeatedMessageField_; }
+ }
+ public int RepeatedMessageFieldCount {
+ get { return result.RepeatedMessageFieldCount; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.ForeignMessage GetRepeatedMessageField(int index) {
+ return result.GetRepeatedMessageField(index);
+ }
+ public Builder SetRepeatedMessageField(int index, global::Google.ProtocolBuffers.TestProtos.ForeignMessage value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.repeatedMessageField_[index] = value;
+ return this;
+ }
+ public Builder SetRepeatedMessageField(int index, global::Google.ProtocolBuffers.TestProtos.ForeignMessage.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.repeatedMessageField_[index] = builderForValue.Build();
+ return this;
+ }
+ public Builder AddRepeatedMessageField(global::Google.ProtocolBuffers.TestProtos.ForeignMessage value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.repeatedMessageField_.Add(value);
+ return this;
+ }
+ public Builder AddRepeatedMessageField(global::Google.ProtocolBuffers.TestProtos.ForeignMessage.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.repeatedMessageField_.Add(builderForValue.Build());
+ return this;
+ }
+ public Builder AddRangeRepeatedMessageField(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.ForeignMessage> values) {
+ PrepareBuilder();
+ result.repeatedMessageField_.Add(values);
+ return this;
+ }
+ public Builder ClearRepeatedMessageField() {
+ PrepareBuilder();
+ result.repeatedMessageField_.Clear();
+ return this;
+ }
+
+ public pbc::IPopsicleList<string> RepeatedStringPieceFieldList {
+ get { return PrepareBuilder().repeatedStringPieceField_; }
+ }
+ public int RepeatedStringPieceFieldCount {
+ get { return result.RepeatedStringPieceFieldCount; }
+ }
+ public string GetRepeatedStringPieceField(int index) {
+ return result.GetRepeatedStringPieceField(index);
+ }
+ public Builder SetRepeatedStringPieceField(int index, string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.repeatedStringPieceField_[index] = value;
+ return this;
+ }
+ public Builder AddRepeatedStringPieceField(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.repeatedStringPieceField_.Add(value);
+ return this;
+ }
+ public Builder AddRangeRepeatedStringPieceField(scg::IEnumerable<string> values) {
+ PrepareBuilder();
+ result.repeatedStringPieceField_.Add(values);
+ return this;
+ }
+ public Builder ClearRepeatedStringPieceField() {
+ PrepareBuilder();
+ result.repeatedStringPieceField_.Clear();
+ return this;
+ }
+
+ public pbc::IPopsicleList<string> RepeatedCordFieldList {
+ get { return PrepareBuilder().repeatedCordField_; }
+ }
+ public int RepeatedCordFieldCount {
+ get { return result.RepeatedCordFieldCount; }
+ }
+ public string GetRepeatedCordField(int index) {
+ return result.GetRepeatedCordField(index);
+ }
+ public Builder SetRepeatedCordField(int index, string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.repeatedCordField_[index] = value;
+ return this;
+ }
+ public Builder AddRepeatedCordField(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.repeatedCordField_.Add(value);
+ return this;
+ }
+ public Builder AddRangeRepeatedCordField(scg::IEnumerable<string> values) {
+ PrepareBuilder();
+ result.repeatedCordField_.Add(values);
+ return this;
+ }
+ public Builder ClearRepeatedCordField() {
+ PrepareBuilder();
+ result.repeatedCordField_.Clear();
+ return this;
+ }
+ }
+ static TestCamelCaseFieldNames() {
+ object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor, null);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class TestFieldOrderings : pb::ExtendableMessage<TestFieldOrderings, TestFieldOrderings.Builder> {
+ private TestFieldOrderings() { }
+ private static readonly TestFieldOrderings defaultInstance = new TestFieldOrderings().MakeReadOnly();
+ private static readonly string[] _testFieldOrderingsFieldNames = new string[] { "my_float", "my_int", "my_string", "optional_nested_message" };
+ private static readonly uint[] _testFieldOrderingsFieldTags = new uint[] { 813, 8, 90, 1602 };
+ public static TestFieldOrderings DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override TestFieldOrderings DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override TestFieldOrderings ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestFieldOrderings__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<TestFieldOrderings, TestFieldOrderings.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestFieldOrderings__FieldAccessorTable; }
+ }
+
+ #region Nested types
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public static partial class Types {
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class NestedMessage : pb::GeneratedMessage<NestedMessage, NestedMessage.Builder> {
+ private NestedMessage() { }
+ private static readonly NestedMessage defaultInstance = new NestedMessage().MakeReadOnly();
+ private static readonly string[] _nestedMessageFieldNames = new string[] { "bb", "oo" };
+ private static readonly uint[] _nestedMessageFieldTags = new uint[] { 8, 16 };
+ public static NestedMessage DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override NestedMessage DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override NestedMessage ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestFieldOrderings_NestedMessage__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<NestedMessage, NestedMessage.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestFieldOrderings_NestedMessage__FieldAccessorTable; }
+ }
+
+ public const int OoFieldNumber = 2;
+ private bool hasOo;
+ private long oo_;
+ public bool HasOo {
+ get { return hasOo; }
+ }
+ public long Oo {
+ get { return oo_; }
+ }
+
+ public const int BbFieldNumber = 1;
+ private bool hasBb;
+ private int bb_;
+ public bool HasBb {
+ get { return hasBb; }
+ }
+ public int Bb {
+ get { return bb_; }
+ }
+
+ public override bool IsInitialized {
+ get {
+ return true;
+ }
+ }
+
+ public override void WriteTo(pb::ICodedOutputStream output) {
+ CalcSerializedSize();
+ string[] field_names = _nestedMessageFieldNames;
+ if (hasBb) {
+ output.WriteInt32(1, field_names[0], Bb);
+ }
+ if (hasOo) {
+ output.WriteInt64(2, field_names[1], Oo);
+ }
+ UnknownFields.WriteTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public override int SerializedSize {
+ get {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+ return CalcSerializedSize();
+ }
+ }
+
+ private int CalcSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (hasOo) {
+ size += pb::CodedOutputStream.ComputeInt64Size(2, Oo);
+ }
+ if (hasBb) {
+ size += pb::CodedOutputStream.ComputeInt32Size(1, Bb);
+ }
+ size += UnknownFields.SerializedSize;
+ memoizedSerializedSize = size;
+ return size;
+ }
+ public static NestedMessage ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static NestedMessage ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static NestedMessage ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static NestedMessage ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static NestedMessage ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static NestedMessage ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static NestedMessage ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static NestedMessage ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static NestedMessage ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static NestedMessage ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private NestedMessage 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(NestedMessage prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Builder : pb::GeneratedBuilder<NestedMessage, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(NestedMessage cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private NestedMessage result;
+
+ private NestedMessage PrepareBuilder() {
+ if (resultIsReadOnly) {
+ NestedMessage original = result;
+ result = new NestedMessage();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override NestedMessage 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.TestFieldOrderings.Types.NestedMessage.Descriptor; }
+ }
+
+ public override NestedMessage DefaultInstanceForType {
+ get { return global::Google.ProtocolBuffers.TestProtos.TestFieldOrderings.Types.NestedMessage.DefaultInstance; }
+ }
+
+ public override NestedMessage BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+ public override Builder MergeFrom(pb::IMessage other) {
+ if (other is NestedMessage) {
+ return MergeFrom((NestedMessage) other);
+ } else {
+ base.MergeFrom(other);
+ return this;
+ }
+ }
+
+ public override Builder MergeFrom(NestedMessage other) {
+ if (other == global::Google.ProtocolBuffers.TestProtos.TestFieldOrderings.Types.NestedMessage.DefaultInstance) return this;
+ PrepareBuilder();
+ if (other.HasOo) {
+ Oo = other.Oo;
+ }
+ if (other.HasBb) {
+ Bb = other.Bb;
+ }
+ 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(_nestedMessageFieldNames, field_name, global::System.StringComparer.Ordinal);
+ if(field_ordinal >= 0)
+ tag = _nestedMessageFieldTags[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.hasBb = input.ReadInt32(ref result.bb_);
+ break;
+ }
+ case 16: {
+ result.hasOo = input.ReadInt64(ref result.oo_);
+ break;
+ }
+ }
+ }
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
+ }
+
+
+ public bool HasOo {
+ get { return result.hasOo; }
+ }
+ public long Oo {
+ get { return result.Oo; }
+ set { SetOo(value); }
+ }
+ public Builder SetOo(long value) {
+ PrepareBuilder();
+ result.hasOo = true;
+ result.oo_ = value;
+ return this;
+ }
+ public Builder ClearOo() {
+ PrepareBuilder();
+ result.hasOo = false;
+ result.oo_ = 0L;
+ return this;
+ }
+
+ public bool HasBb {
+ get { return result.hasBb; }
+ }
+ public int Bb {
+ get { return result.Bb; }
+ set { SetBb(value); }
+ }
+ public Builder SetBb(int value) {
+ PrepareBuilder();
+ result.hasBb = true;
+ result.bb_ = value;
+ return this;
+ }
+ public Builder ClearBb() {
+ PrepareBuilder();
+ result.hasBb = false;
+ result.bb_ = 0;
+ return this;
+ }
+ }
+ static NestedMessage() {
+ object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor, null);
+ }
+ }
+
+ }
+ #endregion
+
+ public const int MyStringFieldNumber = 11;
+ private bool hasMyString;
+ private string myString_ = "";
+ public bool HasMyString {
+ get { return hasMyString; }
+ }
+ public string MyString {
+ get { return myString_; }
+ }
+
+ public const int MyIntFieldNumber = 1;
+ private bool hasMyInt;
+ private long myInt_;
+ public bool HasMyInt {
+ get { return hasMyInt; }
+ }
+ public long MyInt {
+ get { return myInt_; }
+ }
+
+ public const int MyFloatFieldNumber = 101;
+ private bool hasMyFloat;
+ private float myFloat_;
+ public bool HasMyFloat {
+ get { return hasMyFloat; }
+ }
+ public float MyFloat {
+ get { return myFloat_; }
+ }
+
+ public const int OptionalNestedMessageFieldNumber = 200;
+ private bool hasOptionalNestedMessage;
+ private global::Google.ProtocolBuffers.TestProtos.TestFieldOrderings.Types.NestedMessage optionalNestedMessage_;
+ public bool HasOptionalNestedMessage {
+ get { return hasOptionalNestedMessage; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestFieldOrderings.Types.NestedMessage OptionalNestedMessage {
+ get { return optionalNestedMessage_ ?? global::Google.ProtocolBuffers.TestProtos.TestFieldOrderings.Types.NestedMessage.DefaultInstance; }
+ }
+
+ public override bool IsInitialized {
+ get {
+ if (!ExtensionsAreInitialized) return false;
+ return true;
+ }
+ }
+
+ public override void WriteTo(pb::ICodedOutputStream output) {
+ CalcSerializedSize();
+ string[] field_names = _testFieldOrderingsFieldNames;
+ pb::ExtendableMessage<TestFieldOrderings, TestFieldOrderings.Builder>.ExtensionWriter extensionWriter = CreateExtensionWriter(this);
+ if (hasMyInt) {
+ output.WriteInt64(1, field_names[1], MyInt);
+ }
+ extensionWriter.WriteUntil(11, output);
+ if (hasMyString) {
+ output.WriteString(11, field_names[2], MyString);
+ }
+ extensionWriter.WriteUntil(101, output);
+ if (hasMyFloat) {
+ output.WriteFloat(101, field_names[0], MyFloat);
+ }
+ if (hasOptionalNestedMessage) {
+ output.WriteMessage(200, field_names[3], OptionalNestedMessage);
+ }
+ UnknownFields.WriteTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public override int SerializedSize {
+ get {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+ return CalcSerializedSize();
+ }
+ }
+
+ private int CalcSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (hasMyString) {
+ size += pb::CodedOutputStream.ComputeStringSize(11, MyString);
+ }
+ if (hasMyInt) {
+ size += pb::CodedOutputStream.ComputeInt64Size(1, MyInt);
+ }
+ if (hasMyFloat) {
+ size += pb::CodedOutputStream.ComputeFloatSize(101, MyFloat);
+ }
+ if (hasOptionalNestedMessage) {
+ size += pb::CodedOutputStream.ComputeMessageSize(200, OptionalNestedMessage);
+ }
+ size += ExtensionsSerializedSize;
+ size += UnknownFields.SerializedSize;
+ memoizedSerializedSize = size;
+ return size;
+ }
+ public static TestFieldOrderings ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static TestFieldOrderings ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static TestFieldOrderings ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static TestFieldOrderings ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static TestFieldOrderings ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static TestFieldOrderings ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static TestFieldOrderings ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static TestFieldOrderings ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static TestFieldOrderings ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static TestFieldOrderings ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private TestFieldOrderings 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(TestFieldOrderings prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Builder : pb::ExtendableBuilder<TestFieldOrderings, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(TestFieldOrderings cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private TestFieldOrderings result;
+
+ private TestFieldOrderings PrepareBuilder() {
+ if (resultIsReadOnly) {
+ TestFieldOrderings original = result;
+ result = new TestFieldOrderings();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override TestFieldOrderings 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.TestFieldOrderings.Descriptor; }
+ }
+
+ public override TestFieldOrderings DefaultInstanceForType {
+ get { return global::Google.ProtocolBuffers.TestProtos.TestFieldOrderings.DefaultInstance; }
+ }
+
+ public override TestFieldOrderings BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+ public override Builder MergeFrom(pb::IMessage other) {
+ if (other is TestFieldOrderings) {
+ return MergeFrom((TestFieldOrderings) other);
+ } else {
+ base.MergeFrom(other);
+ return this;
+ }
+ }
+
+ public override Builder MergeFrom(TestFieldOrderings other) {
+ if (other == global::Google.ProtocolBuffers.TestProtos.TestFieldOrderings.DefaultInstance) return this;
+ PrepareBuilder();
+ if (other.HasMyString) {
+ MyString = other.MyString;
+ }
+ if (other.HasMyInt) {
+ MyInt = other.MyInt;
+ }
+ if (other.HasMyFloat) {
+ MyFloat = other.MyFloat;
+ }
+ if (other.HasOptionalNestedMessage) {
+ MergeOptionalNestedMessage(other.OptionalNestedMessage);
+ }
+ 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(_testFieldOrderingsFieldNames, field_name, global::System.StringComparer.Ordinal);
+ if(field_ordinal >= 0)
+ tag = _testFieldOrderingsFieldTags[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.hasMyInt = input.ReadInt64(ref result.myInt_);
+ break;
+ }
+ case 90: {
+ result.hasMyString = input.ReadString(ref result.myString_);
+ break;
+ }
+ case 813: {
+ result.hasMyFloat = input.ReadFloat(ref result.myFloat_);
+ break;
+ }
+ case 1602: {
+ global::Google.ProtocolBuffers.TestProtos.TestFieldOrderings.Types.NestedMessage.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.TestFieldOrderings.Types.NestedMessage.CreateBuilder();
+ if (result.hasOptionalNestedMessage) {
+ subBuilder.MergeFrom(OptionalNestedMessage);
+ }
+ input.ReadMessage(subBuilder, extensionRegistry);
+ OptionalNestedMessage = subBuilder.BuildPartial();
+ break;
+ }
+ }
+ }
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
+ }
+
+
+ public bool HasMyString {
+ get { return result.hasMyString; }
+ }
+ public string MyString {
+ get { return result.MyString; }
+ set { SetMyString(value); }
+ }
+ public Builder SetMyString(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasMyString = true;
+ result.myString_ = value;
+ return this;
+ }
+ public Builder ClearMyString() {
+ PrepareBuilder();
+ result.hasMyString = false;
+ result.myString_ = "";
+ return this;
+ }
+
+ public bool HasMyInt {
+ get { return result.hasMyInt; }
+ }
+ public long MyInt {
+ get { return result.MyInt; }
+ set { SetMyInt(value); }
+ }
+ public Builder SetMyInt(long value) {
+ PrepareBuilder();
+ result.hasMyInt = true;
+ result.myInt_ = value;
+ return this;
+ }
+ public Builder ClearMyInt() {
+ PrepareBuilder();
+ result.hasMyInt = false;
+ result.myInt_ = 0L;
+ return this;
+ }
+
+ public bool HasMyFloat {
+ get { return result.hasMyFloat; }
+ }
+ public float MyFloat {
+ get { return result.MyFloat; }
+ set { SetMyFloat(value); }
+ }
+ public Builder SetMyFloat(float value) {
+ PrepareBuilder();
+ result.hasMyFloat = true;
+ result.myFloat_ = value;
+ return this;
+ }
+ public Builder ClearMyFloat() {
+ PrepareBuilder();
+ result.hasMyFloat = false;
+ result.myFloat_ = 0F;
+ return this;
+ }
+
+ public bool HasOptionalNestedMessage {
+ get { return result.hasOptionalNestedMessage; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestFieldOrderings.Types.NestedMessage OptionalNestedMessage {
+ get { return result.OptionalNestedMessage; }
+ set { SetOptionalNestedMessage(value); }
+ }
+ public Builder SetOptionalNestedMessage(global::Google.ProtocolBuffers.TestProtos.TestFieldOrderings.Types.NestedMessage value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasOptionalNestedMessage = true;
+ result.optionalNestedMessage_ = value;
+ return this;
+ }
+ public Builder SetOptionalNestedMessage(global::Google.ProtocolBuffers.TestProtos.TestFieldOrderings.Types.NestedMessage.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.hasOptionalNestedMessage = true;
+ result.optionalNestedMessage_ = builderForValue.Build();
+ return this;
+ }
+ public Builder MergeOptionalNestedMessage(global::Google.ProtocolBuffers.TestProtos.TestFieldOrderings.Types.NestedMessage value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ if (result.hasOptionalNestedMessage &&
+ result.optionalNestedMessage_ != global::Google.ProtocolBuffers.TestProtos.TestFieldOrderings.Types.NestedMessage.DefaultInstance) {
+ result.optionalNestedMessage_ = global::Google.ProtocolBuffers.TestProtos.TestFieldOrderings.Types.NestedMessage.CreateBuilder(result.optionalNestedMessage_).MergeFrom(value).BuildPartial();
+ } else {
+ result.optionalNestedMessage_ = value;
+ }
+ result.hasOptionalNestedMessage = true;
+ return this;
+ }
+ public Builder ClearOptionalNestedMessage() {
+ PrepareBuilder();
+ result.hasOptionalNestedMessage = false;
+ result.optionalNestedMessage_ = null;
+ return this;
+ }
+ }
+ static TestFieldOrderings() {
+ object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor, null);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class TestExtremeDefaultValues : pb::GeneratedMessage<TestExtremeDefaultValues, TestExtremeDefaultValues.Builder> {
+ private TestExtremeDefaultValues() { }
+ private static readonly TestExtremeDefaultValues defaultInstance = new TestExtremeDefaultValues().MakeReadOnly();
+ private static readonly string[] _testExtremeDefaultValuesFieldNames = new string[] { "bytes_with_zero", "cord_with_zero", "cpp_trigraph", "escaped_bytes", "inf_double", "inf_float", "large_float", "large_uint32", "large_uint64", "nan_double", "nan_float", "neg_inf_double", "neg_inf_float", "negative_float", "negative_one_float", "one_float", "really_small_int32", "really_small_int64", "replacement_string", "small_float", "small_int32", "small_int64", "small_negative_float", "string_piece_with_zero", "string_with_zero", "utf8_string", "zero_float" };
+ private static readonly uint[] _testExtremeDefaultValuesFieldTags = new uint[] { 194, 210, 162, 10, 113, 141, 101, 16, 24, 129, 157, 121, 149, 93, 85, 69, 168, 176, 218, 77, 32, 40, 109, 202, 186, 50, 61 };
+ public static TestExtremeDefaultValues DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override TestExtremeDefaultValues DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override TestExtremeDefaultValues ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestExtremeDefaultValues__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<TestExtremeDefaultValues, TestExtremeDefaultValues.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestExtremeDefaultValues__FieldAccessorTable; }
+ }
+
+ public const int EscapedBytesFieldNumber = 1;
+ private bool hasEscapedBytes;
+ private pb::ByteString escapedBytes_ = (pb::ByteString) global::Google.ProtocolBuffers.TestProtos.TestExtremeDefaultValues.Descriptor.Fields[0].DefaultValue;
+ public bool HasEscapedBytes {
+ get { return hasEscapedBytes; }
+ }
+ public pb::ByteString EscapedBytes {
+ get { return escapedBytes_; }
+ }
+
+ public const int LargeUint32FieldNumber = 2;
+ private bool hasLargeUint32;
+ private uint largeUint32_ = 4294967295;
+ public bool HasLargeUint32 {
+ get { return hasLargeUint32; }
+ }
+ [global::System.CLSCompliant(false)]
+ public uint LargeUint32 {
+ get { return largeUint32_; }
+ }
+
+ public const int LargeUint64FieldNumber = 3;
+ private bool hasLargeUint64;
+ private ulong largeUint64_ = 18446744073709551615UL;
+ public bool HasLargeUint64 {
+ get { return hasLargeUint64; }
+ }
+ [global::System.CLSCompliant(false)]
+ public ulong LargeUint64 {
+ get { return largeUint64_; }
+ }
+
+ public const int SmallInt32FieldNumber = 4;
+ private bool hasSmallInt32;
+ private int smallInt32_ = -2147483647;
+ public bool HasSmallInt32 {
+ get { return hasSmallInt32; }
+ }
+ public int SmallInt32 {
+ get { return smallInt32_; }
+ }
+
+ public const int SmallInt64FieldNumber = 5;
+ private bool hasSmallInt64;
+ private long smallInt64_ = -9223372036854775807L;
+ public bool HasSmallInt64 {
+ get { return hasSmallInt64; }
+ }
+ public long SmallInt64 {
+ get { return smallInt64_; }
+ }
+
+ public const int ReallySmallInt32FieldNumber = 21;
+ private bool hasReallySmallInt32;
+ private int reallySmallInt32_ = -2147483648;
+ public bool HasReallySmallInt32 {
+ get { return hasReallySmallInt32; }
+ }
+ public int ReallySmallInt32 {
+ get { return reallySmallInt32_; }
+ }
+
+ public const int ReallySmallInt64FieldNumber = 22;
+ private bool hasReallySmallInt64;
+ private long reallySmallInt64_ = -9223372036854775808L;
+ public bool HasReallySmallInt64 {
+ get { return hasReallySmallInt64; }
+ }
+ public long ReallySmallInt64 {
+ get { return reallySmallInt64_; }
+ }
+
+ public const int Utf8StringFieldNumber = 6;
+ private bool hasUtf8String;
+ private string utf8String_ = (string) global::Google.ProtocolBuffers.TestProtos.TestExtremeDefaultValues.Descriptor.Fields[7].DefaultValue;
+ public bool HasUtf8String {
+ get { return hasUtf8String; }
+ }
+ public string Utf8String {
+ get { return utf8String_; }
+ }
+
+ public const int ZeroFloatFieldNumber = 7;
+ private bool hasZeroFloat;
+ private float zeroFloat_;
+ public bool HasZeroFloat {
+ get { return hasZeroFloat; }
+ }
+ public float ZeroFloat {
+ get { return zeroFloat_; }
+ }
+
+ public const int OneFloatFieldNumber = 8;
+ private bool hasOneFloat;
+ private float oneFloat_ = 1F;
+ public bool HasOneFloat {
+ get { return hasOneFloat; }
+ }
+ public float OneFloat {
+ get { return oneFloat_; }
+ }
+
+ public const int SmallFloatFieldNumber = 9;
+ private bool hasSmallFloat;
+ private float smallFloat_ = 1.5F;
+ public bool HasSmallFloat {
+ get { return hasSmallFloat; }
+ }
+ public float SmallFloat {
+ get { return smallFloat_; }
+ }
+
+ public const int NegativeOneFloatFieldNumber = 10;
+ private bool hasNegativeOneFloat;
+ private float negativeOneFloat_ = -1F;
+ public bool HasNegativeOneFloat {
+ get { return hasNegativeOneFloat; }
+ }
+ public float NegativeOneFloat {
+ get { return negativeOneFloat_; }
+ }
+
+ public const int NegativeFloatFieldNumber = 11;
+ private bool hasNegativeFloat;
+ private float negativeFloat_ = -1.5F;
+ public bool HasNegativeFloat {
+ get { return hasNegativeFloat; }
+ }
+ public float NegativeFloat {
+ get { return negativeFloat_; }
+ }
+
+ public const int LargeFloatFieldNumber = 12;
+ private bool hasLargeFloat;
+ private float largeFloat_ = 2e+08F;
+ public bool HasLargeFloat {
+ get { return hasLargeFloat; }
+ }
+ public float LargeFloat {
+ get { return largeFloat_; }
+ }
+
+ public const int SmallNegativeFloatFieldNumber = 13;
+ private bool hasSmallNegativeFloat;
+ private float smallNegativeFloat_ = -8e-28F;
+ public bool HasSmallNegativeFloat {
+ get { return hasSmallNegativeFloat; }
+ }
+ public float SmallNegativeFloat {
+ get { return smallNegativeFloat_; }
+ }
+
+ public const int InfDoubleFieldNumber = 14;
+ private bool hasInfDouble;
+ private double infDouble_ = double.PositiveInfinity;
+ public bool HasInfDouble {
+ get { return hasInfDouble; }
+ }
+ public double InfDouble {
+ get { return infDouble_; }
+ }
+
+ public const int NegInfDoubleFieldNumber = 15;
+ private bool hasNegInfDouble;
+ private double negInfDouble_ = double.NegativeInfinity;
+ public bool HasNegInfDouble {
+ get { return hasNegInfDouble; }
+ }
+ public double NegInfDouble {
+ get { return negInfDouble_; }
+ }
+
+ public const int NanDoubleFieldNumber = 16;
+ private bool hasNanDouble;
+ private double nanDouble_ = double.NaN;
+ public bool HasNanDouble {
+ get { return hasNanDouble; }
+ }
+ public double NanDouble {
+ get { return nanDouble_; }
+ }
+
+ public const int InfFloatFieldNumber = 17;
+ private bool hasInfFloat;
+ private float infFloat_ = float.PositiveInfinity;
+ public bool HasInfFloat {
+ get { return hasInfFloat; }
+ }
+ public float InfFloat {
+ get { return infFloat_; }
+ }
+
+ public const int NegInfFloatFieldNumber = 18;
+ private bool hasNegInfFloat;
+ private float negInfFloat_ = float.NegativeInfinity;
+ public bool HasNegInfFloat {
+ get { return hasNegInfFloat; }
+ }
+ public float NegInfFloat {
+ get { return negInfFloat_; }
+ }
+
+ public const int NanFloatFieldNumber = 19;
+ private bool hasNanFloat;
+ private float nanFloat_ = float.NaN;
+ public bool HasNanFloat {
+ get { return hasNanFloat; }
+ }
+ public float NanFloat {
+ get { return nanFloat_; }
+ }
+
+ public const int CppTrigraphFieldNumber = 20;
+ private bool hasCppTrigraph;
+ private string cppTrigraph_ = "? ? ?? ?? ??? ??/ ??-";
+ public bool HasCppTrigraph {
+ get { return hasCppTrigraph; }
+ }
+ public string CppTrigraph {
+ get { return cppTrigraph_; }
+ }
+
+ public const int StringWithZeroFieldNumber = 23;
+ private bool hasStringWithZero;
+ private string stringWithZero_ = (string) global::Google.ProtocolBuffers.TestProtos.TestExtremeDefaultValues.Descriptor.Fields[22].DefaultValue;
+ public bool HasStringWithZero {
+ get { return hasStringWithZero; }
+ }
+ public string StringWithZero {
+ get { return stringWithZero_; }
+ }
+
+ public const int BytesWithZeroFieldNumber = 24;
+ private bool hasBytesWithZero;
+ private pb::ByteString bytesWithZero_ = (pb::ByteString) global::Google.ProtocolBuffers.TestProtos.TestExtremeDefaultValues.Descriptor.Fields[23].DefaultValue;
+ public bool HasBytesWithZero {
+ get { return hasBytesWithZero; }
+ }
+ public pb::ByteString BytesWithZero {
+ get { return bytesWithZero_; }
+ }
+
+ public const int StringPieceWithZeroFieldNumber = 25;
+ private bool hasStringPieceWithZero;
+ private string stringPieceWithZero_ = (string) global::Google.ProtocolBuffers.TestProtos.TestExtremeDefaultValues.Descriptor.Fields[24].DefaultValue;
+ public bool HasStringPieceWithZero {
+ get { return hasStringPieceWithZero; }
+ }
+ public string StringPieceWithZero {
+ get { return stringPieceWithZero_; }
+ }
+
+ public const int CordWithZeroFieldNumber = 26;
+ private bool hasCordWithZero;
+ private string cordWithZero_ = (string) global::Google.ProtocolBuffers.TestProtos.TestExtremeDefaultValues.Descriptor.Fields[25].DefaultValue;
+ public bool HasCordWithZero {
+ get { return hasCordWithZero; }
+ }
+ public string CordWithZero {
+ get { return cordWithZero_; }
+ }
+
+ public const int ReplacementStringFieldNumber = 27;
+ private bool hasReplacementString;
+ private string replacementString_ = "${unknown}";
+ public bool HasReplacementString {
+ get { return hasReplacementString; }
+ }
+ public string ReplacementString {
+ get { return replacementString_; }
+ }
+
+ public override bool IsInitialized {
+ get {
+ return true;
+ }
+ }
+
+ public override void WriteTo(pb::ICodedOutputStream output) {
+ CalcSerializedSize();
+ string[] field_names = _testExtremeDefaultValuesFieldNames;
+ if (hasEscapedBytes) {
+ output.WriteBytes(1, field_names[3], EscapedBytes);
+ }
+ if (hasLargeUint32) {
+ output.WriteUInt32(2, field_names[7], LargeUint32);
+ }
+ if (hasLargeUint64) {
+ output.WriteUInt64(3, field_names[8], LargeUint64);
+ }
+ if (hasSmallInt32) {
+ output.WriteInt32(4, field_names[20], SmallInt32);
+ }
+ if (hasSmallInt64) {
+ output.WriteInt64(5, field_names[21], SmallInt64);
+ }
+ if (hasUtf8String) {
+ output.WriteString(6, field_names[25], Utf8String);
+ }
+ if (hasZeroFloat) {
+ output.WriteFloat(7, field_names[26], ZeroFloat);
+ }
+ if (hasOneFloat) {
+ output.WriteFloat(8, field_names[15], OneFloat);
+ }
+ if (hasSmallFloat) {
+ output.WriteFloat(9, field_names[19], SmallFloat);
+ }
+ if (hasNegativeOneFloat) {
+ output.WriteFloat(10, field_names[14], NegativeOneFloat);
+ }
+ if (hasNegativeFloat) {
+ output.WriteFloat(11, field_names[13], NegativeFloat);
+ }
+ if (hasLargeFloat) {
+ output.WriteFloat(12, field_names[6], LargeFloat);
+ }
+ if (hasSmallNegativeFloat) {
+ output.WriteFloat(13, field_names[22], SmallNegativeFloat);
+ }
+ if (hasInfDouble) {
+ output.WriteDouble(14, field_names[4], InfDouble);
+ }
+ if (hasNegInfDouble) {
+ output.WriteDouble(15, field_names[11], NegInfDouble);
+ }
+ if (hasNanDouble) {
+ output.WriteDouble(16, field_names[9], NanDouble);
+ }
+ if (hasInfFloat) {
+ output.WriteFloat(17, field_names[5], InfFloat);
+ }
+ if (hasNegInfFloat) {
+ output.WriteFloat(18, field_names[12], NegInfFloat);
+ }
+ if (hasNanFloat) {
+ output.WriteFloat(19, field_names[10], NanFloat);
+ }
+ if (hasCppTrigraph) {
+ output.WriteString(20, field_names[2], CppTrigraph);
+ }
+ if (hasReallySmallInt32) {
+ output.WriteInt32(21, field_names[16], ReallySmallInt32);
+ }
+ if (hasReallySmallInt64) {
+ output.WriteInt64(22, field_names[17], ReallySmallInt64);
+ }
+ if (hasStringWithZero) {
+ output.WriteString(23, field_names[24], StringWithZero);
+ }
+ if (hasBytesWithZero) {
+ output.WriteBytes(24, field_names[0], BytesWithZero);
+ }
+ if (hasStringPieceWithZero) {
+ output.WriteString(25, field_names[23], StringPieceWithZero);
+ }
+ if (hasCordWithZero) {
+ output.WriteString(26, field_names[1], CordWithZero);
+ }
+ if (hasReplacementString) {
+ output.WriteString(27, field_names[18], ReplacementString);
+ }
+ UnknownFields.WriteTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public override int SerializedSize {
+ get {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+ return CalcSerializedSize();
+ }
+ }
+
+ private int CalcSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (hasEscapedBytes) {
+ size += pb::CodedOutputStream.ComputeBytesSize(1, EscapedBytes);
+ }
+ if (hasLargeUint32) {
+ size += pb::CodedOutputStream.ComputeUInt32Size(2, LargeUint32);
+ }
+ if (hasLargeUint64) {
+ size += pb::CodedOutputStream.ComputeUInt64Size(3, LargeUint64);
+ }
+ if (hasSmallInt32) {
+ size += pb::CodedOutputStream.ComputeInt32Size(4, SmallInt32);
+ }
+ if (hasSmallInt64) {
+ size += pb::CodedOutputStream.ComputeInt64Size(5, SmallInt64);
+ }
+ if (hasReallySmallInt32) {
+ size += pb::CodedOutputStream.ComputeInt32Size(21, ReallySmallInt32);
+ }
+ if (hasReallySmallInt64) {
+ size += pb::CodedOutputStream.ComputeInt64Size(22, ReallySmallInt64);
+ }
+ if (hasUtf8String) {
+ size += pb::CodedOutputStream.ComputeStringSize(6, Utf8String);
+ }
+ if (hasZeroFloat) {
+ size += pb::CodedOutputStream.ComputeFloatSize(7, ZeroFloat);
+ }
+ if (hasOneFloat) {
+ size += pb::CodedOutputStream.ComputeFloatSize(8, OneFloat);
+ }
+ if (hasSmallFloat) {
+ size += pb::CodedOutputStream.ComputeFloatSize(9, SmallFloat);
+ }
+ if (hasNegativeOneFloat) {
+ size += pb::CodedOutputStream.ComputeFloatSize(10, NegativeOneFloat);
+ }
+ if (hasNegativeFloat) {
+ size += pb::CodedOutputStream.ComputeFloatSize(11, NegativeFloat);
+ }
+ if (hasLargeFloat) {
+ size += pb::CodedOutputStream.ComputeFloatSize(12, LargeFloat);
+ }
+ if (hasSmallNegativeFloat) {
+ size += pb::CodedOutputStream.ComputeFloatSize(13, SmallNegativeFloat);
+ }
+ if (hasInfDouble) {
+ size += pb::CodedOutputStream.ComputeDoubleSize(14, InfDouble);
+ }
+ if (hasNegInfDouble) {
+ size += pb::CodedOutputStream.ComputeDoubleSize(15, NegInfDouble);
+ }
+ if (hasNanDouble) {
+ size += pb::CodedOutputStream.ComputeDoubleSize(16, NanDouble);
+ }
+ if (hasInfFloat) {
+ size += pb::CodedOutputStream.ComputeFloatSize(17, InfFloat);
+ }
+ if (hasNegInfFloat) {
+ size += pb::CodedOutputStream.ComputeFloatSize(18, NegInfFloat);
+ }
+ if (hasNanFloat) {
+ size += pb::CodedOutputStream.ComputeFloatSize(19, NanFloat);
+ }
+ if (hasCppTrigraph) {
+ size += pb::CodedOutputStream.ComputeStringSize(20, CppTrigraph);
+ }
+ if (hasStringWithZero) {
+ size += pb::CodedOutputStream.ComputeStringSize(23, StringWithZero);
+ }
+ if (hasBytesWithZero) {
+ size += pb::CodedOutputStream.ComputeBytesSize(24, BytesWithZero);
+ }
+ if (hasStringPieceWithZero) {
+ size += pb::CodedOutputStream.ComputeStringSize(25, StringPieceWithZero);
+ }
+ if (hasCordWithZero) {
+ size += pb::CodedOutputStream.ComputeStringSize(26, CordWithZero);
+ }
+ if (hasReplacementString) {
+ size += pb::CodedOutputStream.ComputeStringSize(27, ReplacementString);
+ }
+ size += UnknownFields.SerializedSize;
+ memoizedSerializedSize = size;
+ return size;
+ }
+ public static TestExtremeDefaultValues ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static TestExtremeDefaultValues ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static TestExtremeDefaultValues ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static TestExtremeDefaultValues ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static TestExtremeDefaultValues ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static TestExtremeDefaultValues ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static TestExtremeDefaultValues ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static TestExtremeDefaultValues ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static TestExtremeDefaultValues ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static TestExtremeDefaultValues ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private TestExtremeDefaultValues 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(TestExtremeDefaultValues prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Builder : pb::GeneratedBuilder<TestExtremeDefaultValues, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(TestExtremeDefaultValues cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private TestExtremeDefaultValues result;
+
+ private TestExtremeDefaultValues PrepareBuilder() {
+ if (resultIsReadOnly) {
+ TestExtremeDefaultValues original = result;
+ result = new TestExtremeDefaultValues();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override TestExtremeDefaultValues 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.TestExtremeDefaultValues.Descriptor; }
+ }
+
+ public override TestExtremeDefaultValues DefaultInstanceForType {
+ get { return global::Google.ProtocolBuffers.TestProtos.TestExtremeDefaultValues.DefaultInstance; }
+ }
+
+ public override TestExtremeDefaultValues BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+ public override Builder MergeFrom(pb::IMessage other) {
+ if (other is TestExtremeDefaultValues) {
+ return MergeFrom((TestExtremeDefaultValues) other);
+ } else {
+ base.MergeFrom(other);
+ return this;
+ }
+ }
+
+ public override Builder MergeFrom(TestExtremeDefaultValues other) {
+ if (other == global::Google.ProtocolBuffers.TestProtos.TestExtremeDefaultValues.DefaultInstance) return this;
+ PrepareBuilder();
+ if (other.HasEscapedBytes) {
+ EscapedBytes = other.EscapedBytes;
+ }
+ if (other.HasLargeUint32) {
+ LargeUint32 = other.LargeUint32;
+ }
+ if (other.HasLargeUint64) {
+ LargeUint64 = other.LargeUint64;
+ }
+ if (other.HasSmallInt32) {
+ SmallInt32 = other.SmallInt32;
+ }
+ if (other.HasSmallInt64) {
+ SmallInt64 = other.SmallInt64;
+ }
+ if (other.HasReallySmallInt32) {
+ ReallySmallInt32 = other.ReallySmallInt32;
+ }
+ if (other.HasReallySmallInt64) {
+ ReallySmallInt64 = other.ReallySmallInt64;
+ }
+ if (other.HasUtf8String) {
+ Utf8String = other.Utf8String;
+ }
+ if (other.HasZeroFloat) {
+ ZeroFloat = other.ZeroFloat;
+ }
+ if (other.HasOneFloat) {
+ OneFloat = other.OneFloat;
+ }
+ if (other.HasSmallFloat) {
+ SmallFloat = other.SmallFloat;
+ }
+ if (other.HasNegativeOneFloat) {
+ NegativeOneFloat = other.NegativeOneFloat;
+ }
+ if (other.HasNegativeFloat) {
+ NegativeFloat = other.NegativeFloat;
+ }
+ if (other.HasLargeFloat) {
+ LargeFloat = other.LargeFloat;
+ }
+ if (other.HasSmallNegativeFloat) {
+ SmallNegativeFloat = other.SmallNegativeFloat;
+ }
+ if (other.HasInfDouble) {
+ InfDouble = other.InfDouble;
+ }
+ if (other.HasNegInfDouble) {
+ NegInfDouble = other.NegInfDouble;
+ }
+ if (other.HasNanDouble) {
+ NanDouble = other.NanDouble;
+ }
+ if (other.HasInfFloat) {
+ InfFloat = other.InfFloat;
+ }
+ if (other.HasNegInfFloat) {
+ NegInfFloat = other.NegInfFloat;
+ }
+ if (other.HasNanFloat) {
+ NanFloat = other.NanFloat;
+ }
+ if (other.HasCppTrigraph) {
+ CppTrigraph = other.CppTrigraph;
+ }
+ if (other.HasStringWithZero) {
+ StringWithZero = other.StringWithZero;
+ }
+ if (other.HasBytesWithZero) {
+ BytesWithZero = other.BytesWithZero;
+ }
+ if (other.HasStringPieceWithZero) {
+ StringPieceWithZero = other.StringPieceWithZero;
+ }
+ if (other.HasCordWithZero) {
+ CordWithZero = other.CordWithZero;
+ }
+ if (other.HasReplacementString) {
+ ReplacementString = other.ReplacementString;
+ }
+ 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(_testExtremeDefaultValuesFieldNames, field_name, global::System.StringComparer.Ordinal);
+ if(field_ordinal >= 0)
+ tag = _testExtremeDefaultValuesFieldTags[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.hasEscapedBytes = input.ReadBytes(ref result.escapedBytes_);
+ break;
+ }
+ case 16: {
+ result.hasLargeUint32 = input.ReadUInt32(ref result.largeUint32_);
+ break;
+ }
+ case 24: {
+ result.hasLargeUint64 = input.ReadUInt64(ref result.largeUint64_);
+ break;
+ }
+ case 32: {
+ result.hasSmallInt32 = input.ReadInt32(ref result.smallInt32_);
+ break;
+ }
+ case 40: {
+ result.hasSmallInt64 = input.ReadInt64(ref result.smallInt64_);
+ break;
+ }
+ case 50: {
+ result.hasUtf8String = input.ReadString(ref result.utf8String_);
+ break;
+ }
+ case 61: {
+ result.hasZeroFloat = input.ReadFloat(ref result.zeroFloat_);
+ break;
+ }
+ case 69: {
+ result.hasOneFloat = input.ReadFloat(ref result.oneFloat_);
+ break;
+ }
+ case 77: {
+ result.hasSmallFloat = input.ReadFloat(ref result.smallFloat_);
+ break;
+ }
+ case 85: {
+ result.hasNegativeOneFloat = input.ReadFloat(ref result.negativeOneFloat_);
+ break;
+ }
+ case 93: {
+ result.hasNegativeFloat = input.ReadFloat(ref result.negativeFloat_);
+ break;
+ }
+ case 101: {
+ result.hasLargeFloat = input.ReadFloat(ref result.largeFloat_);
+ break;
+ }
+ case 109: {
+ result.hasSmallNegativeFloat = input.ReadFloat(ref result.smallNegativeFloat_);
+ break;
+ }
+ case 113: {
+ result.hasInfDouble = input.ReadDouble(ref result.infDouble_);
+ break;
+ }
+ case 121: {
+ result.hasNegInfDouble = input.ReadDouble(ref result.negInfDouble_);
+ break;
+ }
+ case 129: {
+ result.hasNanDouble = input.ReadDouble(ref result.nanDouble_);
+ break;
+ }
+ case 141: {
+ result.hasInfFloat = input.ReadFloat(ref result.infFloat_);
+ break;
+ }
+ case 149: {
+ result.hasNegInfFloat = input.ReadFloat(ref result.negInfFloat_);
+ break;
+ }
+ case 157: {
+ result.hasNanFloat = input.ReadFloat(ref result.nanFloat_);
+ break;
+ }
+ case 162: {
+ result.hasCppTrigraph = input.ReadString(ref result.cppTrigraph_);
+ break;
+ }
+ case 168: {
+ result.hasReallySmallInt32 = input.ReadInt32(ref result.reallySmallInt32_);
+ break;
+ }
+ case 176: {
+ result.hasReallySmallInt64 = input.ReadInt64(ref result.reallySmallInt64_);
+ break;
+ }
+ case 186: {
+ result.hasStringWithZero = input.ReadString(ref result.stringWithZero_);
+ break;
+ }
+ case 194: {
+ result.hasBytesWithZero = input.ReadBytes(ref result.bytesWithZero_);
+ break;
+ }
+ case 202: {
+ result.hasStringPieceWithZero = input.ReadString(ref result.stringPieceWithZero_);
+ break;
+ }
+ case 210: {
+ result.hasCordWithZero = input.ReadString(ref result.cordWithZero_);
+ break;
+ }
+ case 218: {
+ result.hasReplacementString = input.ReadString(ref result.replacementString_);
+ break;
+ }
+ }
+ }
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
+ }
+
+
+ public bool HasEscapedBytes {
+ get { return result.hasEscapedBytes; }
+ }
+ public pb::ByteString EscapedBytes {
+ get { return result.EscapedBytes; }
+ set { SetEscapedBytes(value); }
+ }
+ public Builder SetEscapedBytes(pb::ByteString value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasEscapedBytes = true;
+ result.escapedBytes_ = value;
+ return this;
+ }
+ public Builder ClearEscapedBytes() {
+ PrepareBuilder();
+ result.hasEscapedBytes = false;
+ result.escapedBytes_ = (pb::ByteString) global::Google.ProtocolBuffers.TestProtos.TestExtremeDefaultValues.Descriptor.Fields[0].DefaultValue;
+ return this;
+ }
+
+ public bool HasLargeUint32 {
+ get { return result.hasLargeUint32; }
+ }
+ [global::System.CLSCompliant(false)]
+ public uint LargeUint32 {
+ get { return result.LargeUint32; }
+ set { SetLargeUint32(value); }
+ }
+ [global::System.CLSCompliant(false)]
+ public Builder SetLargeUint32(uint value) {
+ PrepareBuilder();
+ result.hasLargeUint32 = true;
+ result.largeUint32_ = value;
+ return this;
+ }
+ public Builder ClearLargeUint32() {
+ PrepareBuilder();
+ result.hasLargeUint32 = false;
+ result.largeUint32_ = 4294967295;
+ return this;
+ }
+
+ public bool HasLargeUint64 {
+ get { return result.hasLargeUint64; }
+ }
+ [global::System.CLSCompliant(false)]
+ public ulong LargeUint64 {
+ get { return result.LargeUint64; }
+ set { SetLargeUint64(value); }
+ }
+ [global::System.CLSCompliant(false)]
+ public Builder SetLargeUint64(ulong value) {
+ PrepareBuilder();
+ result.hasLargeUint64 = true;
+ result.largeUint64_ = value;
+ return this;
+ }
+ public Builder ClearLargeUint64() {
+ PrepareBuilder();
+ result.hasLargeUint64 = false;
+ result.largeUint64_ = 18446744073709551615UL;
+ return this;
+ }
+
+ public bool HasSmallInt32 {
+ get { return result.hasSmallInt32; }
+ }
+ public int SmallInt32 {
+ get { return result.SmallInt32; }
+ set { SetSmallInt32(value); }
+ }
+ public Builder SetSmallInt32(int value) {
+ PrepareBuilder();
+ result.hasSmallInt32 = true;
+ result.smallInt32_ = value;
+ return this;
+ }
+ public Builder ClearSmallInt32() {
+ PrepareBuilder();
+ result.hasSmallInt32 = false;
+ result.smallInt32_ = -2147483647;
+ return this;
+ }
+
+ public bool HasSmallInt64 {
+ get { return result.hasSmallInt64; }
+ }
+ public long SmallInt64 {
+ get { return result.SmallInt64; }
+ set { SetSmallInt64(value); }
+ }
+ public Builder SetSmallInt64(long value) {
+ PrepareBuilder();
+ result.hasSmallInt64 = true;
+ result.smallInt64_ = value;
+ return this;
+ }
+ public Builder ClearSmallInt64() {
+ PrepareBuilder();
+ result.hasSmallInt64 = false;
+ result.smallInt64_ = -9223372036854775807L;
+ return this;
+ }
+
+ public bool HasReallySmallInt32 {
+ get { return result.hasReallySmallInt32; }
+ }
+ public int ReallySmallInt32 {
+ get { return result.ReallySmallInt32; }
+ set { SetReallySmallInt32(value); }
+ }
+ public Builder SetReallySmallInt32(int value) {
+ PrepareBuilder();
+ result.hasReallySmallInt32 = true;
+ result.reallySmallInt32_ = value;
+ return this;
+ }
+ public Builder ClearReallySmallInt32() {
+ PrepareBuilder();
+ result.hasReallySmallInt32 = false;
+ result.reallySmallInt32_ = -2147483648;
+ return this;
+ }
+
+ public bool HasReallySmallInt64 {
+ get { return result.hasReallySmallInt64; }
+ }
+ public long ReallySmallInt64 {
+ get { return result.ReallySmallInt64; }
+ set { SetReallySmallInt64(value); }
+ }
+ public Builder SetReallySmallInt64(long value) {
+ PrepareBuilder();
+ result.hasReallySmallInt64 = true;
+ result.reallySmallInt64_ = value;
+ return this;
+ }
+ public Builder ClearReallySmallInt64() {
+ PrepareBuilder();
+ result.hasReallySmallInt64 = false;
+ result.reallySmallInt64_ = -9223372036854775808L;
+ return this;
+ }
+
+ public bool HasUtf8String {
+ get { return result.hasUtf8String; }
+ }
+ public string Utf8String {
+ get { return result.Utf8String; }
+ set { SetUtf8String(value); }
+ }
+ public Builder SetUtf8String(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasUtf8String = true;
+ result.utf8String_ = value;
+ return this;
+ }
+ public Builder ClearUtf8String() {
+ PrepareBuilder();
+ result.hasUtf8String = false;
+ result.utf8String_ = (string) global::Google.ProtocolBuffers.TestProtos.TestExtremeDefaultValues.Descriptor.Fields[7].DefaultValue;
+ return this;
+ }
+
+ public bool HasZeroFloat {
+ get { return result.hasZeroFloat; }
+ }
+ public float ZeroFloat {
+ get { return result.ZeroFloat; }
+ set { SetZeroFloat(value); }
+ }
+ public Builder SetZeroFloat(float value) {
+ PrepareBuilder();
+ result.hasZeroFloat = true;
+ result.zeroFloat_ = value;
+ return this;
+ }
+ public Builder ClearZeroFloat() {
+ PrepareBuilder();
+ result.hasZeroFloat = false;
+ result.zeroFloat_ = 0F;
+ return this;
+ }
+
+ public bool HasOneFloat {
+ get { return result.hasOneFloat; }
+ }
+ public float OneFloat {
+ get { return result.OneFloat; }
+ set { SetOneFloat(value); }
+ }
+ public Builder SetOneFloat(float value) {
+ PrepareBuilder();
+ result.hasOneFloat = true;
+ result.oneFloat_ = value;
+ return this;
+ }
+ public Builder ClearOneFloat() {
+ PrepareBuilder();
+ result.hasOneFloat = false;
+ result.oneFloat_ = 1F;
+ return this;
+ }
+
+ public bool HasSmallFloat {
+ get { return result.hasSmallFloat; }
+ }
+ public float SmallFloat {
+ get { return result.SmallFloat; }
+ set { SetSmallFloat(value); }
+ }
+ public Builder SetSmallFloat(float value) {
+ PrepareBuilder();
+ result.hasSmallFloat = true;
+ result.smallFloat_ = value;
+ return this;
+ }
+ public Builder ClearSmallFloat() {
+ PrepareBuilder();
+ result.hasSmallFloat = false;
+ result.smallFloat_ = 1.5F;
+ return this;
+ }
+
+ public bool HasNegativeOneFloat {
+ get { return result.hasNegativeOneFloat; }
+ }
+ public float NegativeOneFloat {
+ get { return result.NegativeOneFloat; }
+ set { SetNegativeOneFloat(value); }
+ }
+ public Builder SetNegativeOneFloat(float value) {
+ PrepareBuilder();
+ result.hasNegativeOneFloat = true;
+ result.negativeOneFloat_ = value;
+ return this;
+ }
+ public Builder ClearNegativeOneFloat() {
+ PrepareBuilder();
+ result.hasNegativeOneFloat = false;
+ result.negativeOneFloat_ = -1F;
+ return this;
+ }
+
+ public bool HasNegativeFloat {
+ get { return result.hasNegativeFloat; }
+ }
+ public float NegativeFloat {
+ get { return result.NegativeFloat; }
+ set { SetNegativeFloat(value); }
+ }
+ public Builder SetNegativeFloat(float value) {
+ PrepareBuilder();
+ result.hasNegativeFloat = true;
+ result.negativeFloat_ = value;
+ return this;
+ }
+ public Builder ClearNegativeFloat() {
+ PrepareBuilder();
+ result.hasNegativeFloat = false;
+ result.negativeFloat_ = -1.5F;
+ return this;
+ }
+
+ public bool HasLargeFloat {
+ get { return result.hasLargeFloat; }
+ }
+ public float LargeFloat {
+ get { return result.LargeFloat; }
+ set { SetLargeFloat(value); }
+ }
+ public Builder SetLargeFloat(float value) {
+ PrepareBuilder();
+ result.hasLargeFloat = true;
+ result.largeFloat_ = value;
+ return this;
+ }
+ public Builder ClearLargeFloat() {
+ PrepareBuilder();
+ result.hasLargeFloat = false;
+ result.largeFloat_ = 2e+08F;
+ return this;
+ }
+
+ public bool HasSmallNegativeFloat {
+ get { return result.hasSmallNegativeFloat; }
+ }
+ public float SmallNegativeFloat {
+ get { return result.SmallNegativeFloat; }
+ set { SetSmallNegativeFloat(value); }
+ }
+ public Builder SetSmallNegativeFloat(float value) {
+ PrepareBuilder();
+ result.hasSmallNegativeFloat = true;
+ result.smallNegativeFloat_ = value;
+ return this;
+ }
+ public Builder ClearSmallNegativeFloat() {
+ PrepareBuilder();
+ result.hasSmallNegativeFloat = false;
+ result.smallNegativeFloat_ = -8e-28F;
+ return this;
+ }
+
+ public bool HasInfDouble {
+ get { return result.hasInfDouble; }
+ }
+ public double InfDouble {
+ get { return result.InfDouble; }
+ set { SetInfDouble(value); }
+ }
+ public Builder SetInfDouble(double value) {
+ PrepareBuilder();
+ result.hasInfDouble = true;
+ result.infDouble_ = value;
+ return this;
+ }
+ public Builder ClearInfDouble() {
+ PrepareBuilder();
+ result.hasInfDouble = false;
+ result.infDouble_ = double.PositiveInfinity;
+ return this;
+ }
+
+ public bool HasNegInfDouble {
+ get { return result.hasNegInfDouble; }
+ }
+ public double NegInfDouble {
+ get { return result.NegInfDouble; }
+ set { SetNegInfDouble(value); }
+ }
+ public Builder SetNegInfDouble(double value) {
+ PrepareBuilder();
+ result.hasNegInfDouble = true;
+ result.negInfDouble_ = value;
+ return this;
+ }
+ public Builder ClearNegInfDouble() {
+ PrepareBuilder();
+ result.hasNegInfDouble = false;
+ result.negInfDouble_ = double.NegativeInfinity;
+ return this;
+ }
+
+ public bool HasNanDouble {
+ get { return result.hasNanDouble; }
+ }
+ public double NanDouble {
+ get { return result.NanDouble; }
+ set { SetNanDouble(value); }
+ }
+ public Builder SetNanDouble(double value) {
+ PrepareBuilder();
+ result.hasNanDouble = true;
+ result.nanDouble_ = value;
+ return this;
+ }
+ public Builder ClearNanDouble() {
+ PrepareBuilder();
+ result.hasNanDouble = false;
+ result.nanDouble_ = double.NaN;
+ return this;
+ }
+
+ public bool HasInfFloat {
+ get { return result.hasInfFloat; }
+ }
+ public float InfFloat {
+ get { return result.InfFloat; }
+ set { SetInfFloat(value); }
+ }
+ public Builder SetInfFloat(float value) {
+ PrepareBuilder();
+ result.hasInfFloat = true;
+ result.infFloat_ = value;
+ return this;
+ }
+ public Builder ClearInfFloat() {
+ PrepareBuilder();
+ result.hasInfFloat = false;
+ result.infFloat_ = float.PositiveInfinity;
+ return this;
+ }
+
+ public bool HasNegInfFloat {
+ get { return result.hasNegInfFloat; }
+ }
+ public float NegInfFloat {
+ get { return result.NegInfFloat; }
+ set { SetNegInfFloat(value); }
+ }
+ public Builder SetNegInfFloat(float value) {
+ PrepareBuilder();
+ result.hasNegInfFloat = true;
+ result.negInfFloat_ = value;
+ return this;
+ }
+ public Builder ClearNegInfFloat() {
+ PrepareBuilder();
+ result.hasNegInfFloat = false;
+ result.negInfFloat_ = float.NegativeInfinity;
+ return this;
+ }
+
+ public bool HasNanFloat {
+ get { return result.hasNanFloat; }
+ }
+ public float NanFloat {
+ get { return result.NanFloat; }
+ set { SetNanFloat(value); }
+ }
+ public Builder SetNanFloat(float value) {
+ PrepareBuilder();
+ result.hasNanFloat = true;
+ result.nanFloat_ = value;
+ return this;
+ }
+ public Builder ClearNanFloat() {
+ PrepareBuilder();
+ result.hasNanFloat = false;
+ result.nanFloat_ = float.NaN;
+ return this;
+ }
+
+ public bool HasCppTrigraph {
+ get { return result.hasCppTrigraph; }
+ }
+ public string CppTrigraph {
+ get { return result.CppTrigraph; }
+ set { SetCppTrigraph(value); }
+ }
+ public Builder SetCppTrigraph(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasCppTrigraph = true;
+ result.cppTrigraph_ = value;
+ return this;
+ }
+ public Builder ClearCppTrigraph() {
+ PrepareBuilder();
+ result.hasCppTrigraph = false;
+ result.cppTrigraph_ = "? ? ?? ?? ??? ??/ ??-";
+ return this;
+ }
+
+ public bool HasStringWithZero {
+ get { return result.hasStringWithZero; }
+ }
+ public string StringWithZero {
+ get { return result.StringWithZero; }
+ set { SetStringWithZero(value); }
+ }
+ public Builder SetStringWithZero(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasStringWithZero = true;
+ result.stringWithZero_ = value;
+ return this;
+ }
+ public Builder ClearStringWithZero() {
+ PrepareBuilder();
+ result.hasStringWithZero = false;
+ result.stringWithZero_ = (string) global::Google.ProtocolBuffers.TestProtos.TestExtremeDefaultValues.Descriptor.Fields[22].DefaultValue;
+ return this;
+ }
+
+ public bool HasBytesWithZero {
+ get { return result.hasBytesWithZero; }
+ }
+ public pb::ByteString BytesWithZero {
+ get { return result.BytesWithZero; }
+ set { SetBytesWithZero(value); }
+ }
+ public Builder SetBytesWithZero(pb::ByteString value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasBytesWithZero = true;
+ result.bytesWithZero_ = value;
+ return this;
+ }
+ public Builder ClearBytesWithZero() {
+ PrepareBuilder();
+ result.hasBytesWithZero = false;
+ result.bytesWithZero_ = (pb::ByteString) global::Google.ProtocolBuffers.TestProtos.TestExtremeDefaultValues.Descriptor.Fields[23].DefaultValue;
+ return this;
+ }
+
+ public bool HasStringPieceWithZero {
+ get { return result.hasStringPieceWithZero; }
+ }
+ public string StringPieceWithZero {
+ get { return result.StringPieceWithZero; }
+ set { SetStringPieceWithZero(value); }
+ }
+ public Builder SetStringPieceWithZero(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasStringPieceWithZero = true;
+ result.stringPieceWithZero_ = value;
+ return this;
+ }
+ public Builder ClearStringPieceWithZero() {
+ PrepareBuilder();
+ result.hasStringPieceWithZero = false;
+ result.stringPieceWithZero_ = (string) global::Google.ProtocolBuffers.TestProtos.TestExtremeDefaultValues.Descriptor.Fields[24].DefaultValue;
+ return this;
+ }
+
+ public bool HasCordWithZero {
+ get { return result.hasCordWithZero; }
+ }
+ public string CordWithZero {
+ get { return result.CordWithZero; }
+ set { SetCordWithZero(value); }
+ }
+ public Builder SetCordWithZero(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasCordWithZero = true;
+ result.cordWithZero_ = value;
+ return this;
+ }
+ public Builder ClearCordWithZero() {
+ PrepareBuilder();
+ result.hasCordWithZero = false;
+ result.cordWithZero_ = (string) global::Google.ProtocolBuffers.TestProtos.TestExtremeDefaultValues.Descriptor.Fields[25].DefaultValue;
+ return this;
+ }
+
+ public bool HasReplacementString {
+ get { return result.hasReplacementString; }
+ }
+ public string ReplacementString {
+ get { return result.ReplacementString; }
+ set { SetReplacementString(value); }
+ }
+ public Builder SetReplacementString(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasReplacementString = true;
+ result.replacementString_ = value;
+ return this;
+ }
+ public Builder ClearReplacementString() {
+ PrepareBuilder();
+ result.hasReplacementString = false;
+ result.replacementString_ = "${unknown}";
+ return this;
+ }
+ }
+ static TestExtremeDefaultValues() {
+ object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor, null);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class SparseEnumMessage : pb::GeneratedMessage<SparseEnumMessage, SparseEnumMessage.Builder> {
+ private SparseEnumMessage() { }
+ private static readonly SparseEnumMessage defaultInstance = new SparseEnumMessage().MakeReadOnly();
+ private static readonly string[] _sparseEnumMessageFieldNames = new string[] { "sparse_enum" };
+ private static readonly uint[] _sparseEnumMessageFieldTags = new uint[] { 8 };
+ public static SparseEnumMessage DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override SparseEnumMessage DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override SparseEnumMessage ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_SparseEnumMessage__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<SparseEnumMessage, SparseEnumMessage.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_SparseEnumMessage__FieldAccessorTable; }
+ }
+
+ public const int SparseEnumFieldNumber = 1;
+ private bool hasSparseEnum;
+ private global::Google.ProtocolBuffers.TestProtos.TestSparseEnum sparseEnum_ = global::Google.ProtocolBuffers.TestProtos.TestSparseEnum.SPARSE_A;
+ public bool HasSparseEnum {
+ get { return hasSparseEnum; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestSparseEnum SparseEnum {
+ get { return sparseEnum_; }
+ }
+
+ public override bool IsInitialized {
+ get {
+ return true;
+ }
+ }
+
+ public override void WriteTo(pb::ICodedOutputStream output) {
+ CalcSerializedSize();
+ string[] field_names = _sparseEnumMessageFieldNames;
+ if (hasSparseEnum) {
+ output.WriteEnum(1, field_names[0], (int) SparseEnum, SparseEnum);
+ }
+ UnknownFields.WriteTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public override int SerializedSize {
+ get {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+ return CalcSerializedSize();
+ }
+ }
+
+ private int CalcSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (hasSparseEnum) {
+ size += pb::CodedOutputStream.ComputeEnumSize(1, (int) SparseEnum);
+ }
+ size += UnknownFields.SerializedSize;
+ memoizedSerializedSize = size;
+ return size;
+ }
+ public static SparseEnumMessage ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static SparseEnumMessage ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static SparseEnumMessage ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static SparseEnumMessage ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static SparseEnumMessage ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static SparseEnumMessage ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static SparseEnumMessage ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static SparseEnumMessage ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static SparseEnumMessage ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static SparseEnumMessage ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private SparseEnumMessage 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(SparseEnumMessage prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Builder : pb::GeneratedBuilder<SparseEnumMessage, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(SparseEnumMessage cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private SparseEnumMessage result;
+
+ private SparseEnumMessage PrepareBuilder() {
+ if (resultIsReadOnly) {
+ SparseEnumMessage original = result;
+ result = new SparseEnumMessage();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override SparseEnumMessage 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.SparseEnumMessage.Descriptor; }
+ }
+
+ public override SparseEnumMessage DefaultInstanceForType {
+ get { return global::Google.ProtocolBuffers.TestProtos.SparseEnumMessage.DefaultInstance; }
+ }
+
+ public override SparseEnumMessage BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+ public override Builder MergeFrom(pb::IMessage other) {
+ if (other is SparseEnumMessage) {
+ return MergeFrom((SparseEnumMessage) other);
+ } else {
+ base.MergeFrom(other);
+ return this;
+ }
+ }
+
+ public override Builder MergeFrom(SparseEnumMessage other) {
+ if (other == global::Google.ProtocolBuffers.TestProtos.SparseEnumMessage.DefaultInstance) return this;
+ PrepareBuilder();
+ if (other.HasSparseEnum) {
+ SparseEnum = other.SparseEnum;
+ }
+ 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(_sparseEnumMessageFieldNames, field_name, global::System.StringComparer.Ordinal);
+ if(field_ordinal >= 0)
+ tag = _sparseEnumMessageFieldTags[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: {
+ object unknown;
+ if(input.ReadEnum(ref result.sparseEnum_, out unknown)) {
+ result.hasSparseEnum = true;
+ } else if(unknown is int) {
+ if (unknownFields == null) {
+ unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+ }
+ unknownFields.MergeVarintField(1, (ulong)(int)unknown);
+ }
+ break;
+ }
+ }
+ }
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
+ }
+
+
+ public bool HasSparseEnum {
+ get { return result.hasSparseEnum; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestSparseEnum SparseEnum {
+ get { return result.SparseEnum; }
+ set { SetSparseEnum(value); }
+ }
+ public Builder SetSparseEnum(global::Google.ProtocolBuffers.TestProtos.TestSparseEnum value) {
+ PrepareBuilder();
+ result.hasSparseEnum = true;
+ result.sparseEnum_ = value;
+ return this;
+ }
+ public Builder ClearSparseEnum() {
+ PrepareBuilder();
+ result.hasSparseEnum = false;
+ result.sparseEnum_ = global::Google.ProtocolBuffers.TestProtos.TestSparseEnum.SPARSE_A;
+ return this;
+ }
+ }
+ static SparseEnumMessage() {
+ object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor, null);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class OneString : pb::GeneratedMessage<OneString, OneString.Builder> {
+ private OneString() { }
+ private static readonly OneString defaultInstance = new OneString().MakeReadOnly();
+ private static readonly string[] _oneStringFieldNames = new string[] { "data" };
+ private static readonly uint[] _oneStringFieldTags = new uint[] { 10 };
+ public static OneString DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override OneString DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override OneString ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_OneString__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<OneString, OneString.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_OneString__FieldAccessorTable; }
+ }
+
+ public const int DataFieldNumber = 1;
+ private bool hasData;
+ private string data_ = "";
+ public bool HasData {
+ get { return hasData; }
+ }
+ public string Data {
+ get { return data_; }
+ }
+
+ public override bool IsInitialized {
+ get {
+ return true;
+ }
+ }
+
+ public override void WriteTo(pb::ICodedOutputStream output) {
+ CalcSerializedSize();
+ string[] field_names = _oneStringFieldNames;
+ if (hasData) {
+ output.WriteString(1, field_names[0], Data);
+ }
+ UnknownFields.WriteTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public override int SerializedSize {
+ get {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+ return CalcSerializedSize();
+ }
+ }
+
+ private int CalcSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (hasData) {
+ size += pb::CodedOutputStream.ComputeStringSize(1, Data);
+ }
+ size += UnknownFields.SerializedSize;
+ memoizedSerializedSize = size;
+ return size;
+ }
+ public static OneString ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static OneString ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static OneString ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static OneString ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static OneString ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static OneString ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static OneString ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static OneString ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static OneString ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static OneString ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private OneString 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(OneString prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Builder : pb::GeneratedBuilder<OneString, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(OneString cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private OneString result;
+
+ private OneString PrepareBuilder() {
+ if (resultIsReadOnly) {
+ OneString original = result;
+ result = new OneString();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override OneString 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.OneString.Descriptor; }
+ }
+
+ public override OneString DefaultInstanceForType {
+ get { return global::Google.ProtocolBuffers.TestProtos.OneString.DefaultInstance; }
+ }
+
+ public override OneString BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+ public override Builder MergeFrom(pb::IMessage other) {
+ if (other is OneString) {
+ return MergeFrom((OneString) other);
+ } else {
+ base.MergeFrom(other);
+ return this;
+ }
+ }
+
+ public override Builder MergeFrom(OneString other) {
+ if (other == global::Google.ProtocolBuffers.TestProtos.OneString.DefaultInstance) return this;
+ PrepareBuilder();
+ if (other.HasData) {
+ Data = other.Data;
+ }
+ 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(_oneStringFieldNames, field_name, global::System.StringComparer.Ordinal);
+ if(field_ordinal >= 0)
+ tag = _oneStringFieldTags[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.hasData = input.ReadString(ref result.data_);
+ break;
+ }
+ }
+ }
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
+ }
+
+
+ public bool HasData {
+ get { return result.hasData; }
+ }
+ public string Data {
+ get { return result.Data; }
+ set { SetData(value); }
+ }
+ public Builder SetData(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasData = true;
+ result.data_ = value;
+ return this;
+ }
+ public Builder ClearData() {
+ PrepareBuilder();
+ result.hasData = false;
+ result.data_ = "";
+ return this;
+ }
+ }
+ static OneString() {
+ object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor, null);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class MoreString : pb::GeneratedMessage<MoreString, MoreString.Builder> {
+ private MoreString() { }
+ private static readonly MoreString defaultInstance = new MoreString().MakeReadOnly();
+ private static readonly string[] _moreStringFieldNames = new string[] { "data" };
+ private static readonly uint[] _moreStringFieldTags = new uint[] { 10 };
+ public static MoreString DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override MoreString DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override MoreString ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_MoreString__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<MoreString, MoreString.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_MoreString__FieldAccessorTable; }
+ }
+
+ public const int DataFieldNumber = 1;
+ private pbc::PopsicleList<string> data_ = new pbc::PopsicleList<string>();
+ public scg::IList<string> DataList {
+ get { return pbc::Lists.AsReadOnly(data_); }
+ }
+ public int DataCount {
+ get { return data_.Count; }
+ }
+ public string GetData(int index) {
+ return data_[index];
+ }
+
+ public override bool IsInitialized {
+ get {
+ return true;
+ }
+ }
+
+ public override void WriteTo(pb::ICodedOutputStream output) {
+ CalcSerializedSize();
+ string[] field_names = _moreStringFieldNames;
+ if (data_.Count > 0) {
+ output.WriteStringArray(1, field_names[0], data_);
+ }
+ UnknownFields.WriteTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public override int SerializedSize {
+ get {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+ return CalcSerializedSize();
+ }
+ }
+
+ private int CalcSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ {
+ int dataSize = 0;
+ foreach (string element in DataList) {
+ dataSize += pb::CodedOutputStream.ComputeStringSizeNoTag(element);
+ }
+ size += dataSize;
+ size += 1 * data_.Count;
+ }
+ size += UnknownFields.SerializedSize;
+ memoizedSerializedSize = size;
+ return size;
+ }
+ public static MoreString ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static MoreString ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static MoreString ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static MoreString ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static MoreString ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static MoreString ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static MoreString ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static MoreString ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static MoreString ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static MoreString ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private MoreString MakeReadOnly() {
+ data_.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(MoreString prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Builder : pb::GeneratedBuilder<MoreString, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(MoreString cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private MoreString result;
+
+ private MoreString PrepareBuilder() {
+ if (resultIsReadOnly) {
+ MoreString original = result;
+ result = new MoreString();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override MoreString 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.MoreString.Descriptor; }
+ }
+
+ public override MoreString DefaultInstanceForType {
+ get { return global::Google.ProtocolBuffers.TestProtos.MoreString.DefaultInstance; }
+ }
+
+ public override MoreString BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+ public override Builder MergeFrom(pb::IMessage other) {
+ if (other is MoreString) {
+ return MergeFrom((MoreString) other);
+ } else {
+ base.MergeFrom(other);
+ return this;
+ }
+ }
+
+ public override Builder MergeFrom(MoreString other) {
+ if (other == global::Google.ProtocolBuffers.TestProtos.MoreString.DefaultInstance) return this;
+ PrepareBuilder();
+ if (other.data_.Count != 0) {
+ result.data_.Add(other.data_);
+ }
+ 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(_moreStringFieldNames, field_name, global::System.StringComparer.Ordinal);
+ if(field_ordinal >= 0)
+ tag = _moreStringFieldTags[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.ReadStringArray(tag, field_name, result.data_);
+ break;
+ }
+ }
+ }
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
+ }
+
+
+ public pbc::IPopsicleList<string> DataList {
+ get { return PrepareBuilder().data_; }
+ }
+ public int DataCount {
+ get { return result.DataCount; }
+ }
+ public string GetData(int index) {
+ return result.GetData(index);
+ }
+ public Builder SetData(int index, string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.data_[index] = value;
+ return this;
+ }
+ public Builder AddData(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.data_.Add(value);
+ return this;
+ }
+ public Builder AddRangeData(scg::IEnumerable<string> values) {
+ PrepareBuilder();
+ result.data_.Add(values);
+ return this;
+ }
+ public Builder ClearData() {
+ PrepareBuilder();
+ result.data_.Clear();
+ return this;
+ }
+ }
+ static MoreString() {
+ object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor, null);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class OneBytes : pb::GeneratedMessage<OneBytes, OneBytes.Builder> {
+ private OneBytes() { }
+ private static readonly OneBytes defaultInstance = new OneBytes().MakeReadOnly();
+ private static readonly string[] _oneBytesFieldNames = new string[] { "data" };
+ private static readonly uint[] _oneBytesFieldTags = new uint[] { 10 };
+ public static OneBytes DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override OneBytes DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override OneBytes ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_OneBytes__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<OneBytes, OneBytes.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_OneBytes__FieldAccessorTable; }
+ }
+
+ public const int DataFieldNumber = 1;
+ private bool hasData;
+ private pb::ByteString data_ = pb::ByteString.Empty;
+ public bool HasData {
+ get { return hasData; }
+ }
+ public pb::ByteString Data {
+ get { return data_; }
+ }
+
+ public override bool IsInitialized {
+ get {
+ return true;
+ }
+ }
+
+ public override void WriteTo(pb::ICodedOutputStream output) {
+ CalcSerializedSize();
+ string[] field_names = _oneBytesFieldNames;
+ if (hasData) {
+ output.WriteBytes(1, field_names[0], Data);
+ }
+ UnknownFields.WriteTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public override int SerializedSize {
+ get {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+ return CalcSerializedSize();
+ }
+ }
+
+ private int CalcSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (hasData) {
+ size += pb::CodedOutputStream.ComputeBytesSize(1, Data);
+ }
+ size += UnknownFields.SerializedSize;
+ memoizedSerializedSize = size;
+ return size;
+ }
+ public static OneBytes ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static OneBytes ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static OneBytes ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static OneBytes ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static OneBytes ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static OneBytes ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static OneBytes ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static OneBytes ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static OneBytes ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static OneBytes ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private OneBytes 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(OneBytes prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Builder : pb::GeneratedBuilder<OneBytes, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(OneBytes cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private OneBytes result;
+
+ private OneBytes PrepareBuilder() {
+ if (resultIsReadOnly) {
+ OneBytes original = result;
+ result = new OneBytes();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override OneBytes 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.OneBytes.Descriptor; }
+ }
+
+ public override OneBytes DefaultInstanceForType {
+ get { return global::Google.ProtocolBuffers.TestProtos.OneBytes.DefaultInstance; }
+ }
+
+ public override OneBytes BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+ public override Builder MergeFrom(pb::IMessage other) {
+ if (other is OneBytes) {
+ return MergeFrom((OneBytes) other);
+ } else {
+ base.MergeFrom(other);
+ return this;
+ }
+ }
+
+ public override Builder MergeFrom(OneBytes other) {
+ if (other == global::Google.ProtocolBuffers.TestProtos.OneBytes.DefaultInstance) return this;
+ PrepareBuilder();
+ if (other.HasData) {
+ Data = other.Data;
+ }
+ 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(_oneBytesFieldNames, field_name, global::System.StringComparer.Ordinal);
+ if(field_ordinal >= 0)
+ tag = _oneBytesFieldTags[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.hasData = input.ReadBytes(ref result.data_);
+ break;
+ }
+ }
+ }
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
+ }
+
+
+ public bool HasData {
+ get { return result.hasData; }
+ }
+ public pb::ByteString Data {
+ get { return result.Data; }
+ set { SetData(value); }
+ }
+ public Builder SetData(pb::ByteString value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasData = true;
+ result.data_ = value;
+ return this;
+ }
+ public Builder ClearData() {
+ PrepareBuilder();
+ result.hasData = false;
+ result.data_ = pb::ByteString.Empty;
+ return this;
+ }
+ }
+ static OneBytes() {
+ object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor, null);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class MoreBytes : pb::GeneratedMessage<MoreBytes, MoreBytes.Builder> {
+ private MoreBytes() { }
+ private static readonly MoreBytes defaultInstance = new MoreBytes().MakeReadOnly();
+ private static readonly string[] _moreBytesFieldNames = new string[] { "data" };
+ private static readonly uint[] _moreBytesFieldTags = new uint[] { 10 };
+ public static MoreBytes DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override MoreBytes DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override MoreBytes ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_MoreBytes__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<MoreBytes, MoreBytes.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_MoreBytes__FieldAccessorTable; }
+ }
+
+ public const int DataFieldNumber = 1;
+ private pbc::PopsicleList<pb::ByteString> data_ = new pbc::PopsicleList<pb::ByteString>();
+ public scg::IList<pb::ByteString> DataList {
+ get { return pbc::Lists.AsReadOnly(data_); }
+ }
+ public int DataCount {
+ get { return data_.Count; }
+ }
+ public pb::ByteString GetData(int index) {
+ return data_[index];
+ }
+
+ public override bool IsInitialized {
+ get {
+ return true;
+ }
+ }
+
+ public override void WriteTo(pb::ICodedOutputStream output) {
+ CalcSerializedSize();
+ string[] field_names = _moreBytesFieldNames;
+ if (data_.Count > 0) {
+ output.WriteBytesArray(1, field_names[0], data_);
+ }
+ UnknownFields.WriteTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public override int SerializedSize {
+ get {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+ return CalcSerializedSize();
+ }
+ }
+
+ private int CalcSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ {
+ int dataSize = 0;
+ foreach (pb::ByteString element in DataList) {
+ dataSize += pb::CodedOutputStream.ComputeBytesSizeNoTag(element);
+ }
+ size += dataSize;
+ size += 1 * data_.Count;
+ }
+ size += UnknownFields.SerializedSize;
+ memoizedSerializedSize = size;
+ return size;
+ }
+ public static MoreBytes ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static MoreBytes ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static MoreBytes ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static MoreBytes ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static MoreBytes ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static MoreBytes ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static MoreBytes ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static MoreBytes ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static MoreBytes ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static MoreBytes ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private MoreBytes MakeReadOnly() {
+ data_.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(MoreBytes prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Builder : pb::GeneratedBuilder<MoreBytes, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(MoreBytes cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private MoreBytes result;
+
+ private MoreBytes PrepareBuilder() {
+ if (resultIsReadOnly) {
+ MoreBytes original = result;
+ result = new MoreBytes();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override MoreBytes 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.MoreBytes.Descriptor; }
+ }
+
+ public override MoreBytes DefaultInstanceForType {
+ get { return global::Google.ProtocolBuffers.TestProtos.MoreBytes.DefaultInstance; }
+ }
+
+ public override MoreBytes BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+ public override Builder MergeFrom(pb::IMessage other) {
+ if (other is MoreBytes) {
+ return MergeFrom((MoreBytes) other);
+ } else {
+ base.MergeFrom(other);
+ return this;
+ }
+ }
+
+ public override Builder MergeFrom(MoreBytes other) {
+ if (other == global::Google.ProtocolBuffers.TestProtos.MoreBytes.DefaultInstance) return this;
+ PrepareBuilder();
+ if (other.data_.Count != 0) {
+ result.data_.Add(other.data_);
+ }
+ 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(_moreBytesFieldNames, field_name, global::System.StringComparer.Ordinal);
+ if(field_ordinal >= 0)
+ tag = _moreBytesFieldTags[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.ReadBytesArray(tag, field_name, result.data_);
+ break;
+ }
+ }
+ }
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
+ }
+
+
+ public pbc::IPopsicleList<pb::ByteString> DataList {
+ get { return PrepareBuilder().data_; }
+ }
+ public int DataCount {
+ get { return result.DataCount; }
+ }
+ public pb::ByteString GetData(int index) {
+ return result.GetData(index);
+ }
+ public Builder SetData(int index, pb::ByteString value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.data_[index] = value;
+ return this;
+ }
+ public Builder AddData(pb::ByteString value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.data_.Add(value);
+ return this;
+ }
+ public Builder AddRangeData(scg::IEnumerable<pb::ByteString> values) {
+ PrepareBuilder();
+ result.data_.Add(values);
+ return this;
+ }
+ public Builder ClearData() {
+ PrepareBuilder();
+ result.data_.Clear();
+ return this;
+ }
+ }
+ static MoreBytes() {
+ object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor, null);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Int32Message : pb::GeneratedMessage<Int32Message, Int32Message.Builder> {
+ private Int32Message() { }
+ private static readonly Int32Message defaultInstance = new Int32Message().MakeReadOnly();
+ private static readonly string[] _int32MessageFieldNames = new string[] { "data" };
+ private static readonly uint[] _int32MessageFieldTags = new uint[] { 8 };
+ public static Int32Message DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override Int32Message DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override Int32Message ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_Int32Message__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<Int32Message, Int32Message.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_Int32Message__FieldAccessorTable; }
+ }
+
+ public const int DataFieldNumber = 1;
+ private bool hasData;
+ private int data_;
+ public bool HasData {
+ get { return hasData; }
+ }
+ public int Data {
+ get { return data_; }
+ }
+
+ public override bool IsInitialized {
+ get {
+ return true;
+ }
+ }
+
+ public override void WriteTo(pb::ICodedOutputStream output) {
+ CalcSerializedSize();
+ string[] field_names = _int32MessageFieldNames;
+ if (hasData) {
+ output.WriteInt32(1, field_names[0], Data);
+ }
+ UnknownFields.WriteTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public override int SerializedSize {
+ get {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+ return CalcSerializedSize();
+ }
+ }
+
+ private int CalcSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (hasData) {
+ size += pb::CodedOutputStream.ComputeInt32Size(1, Data);
+ }
+ size += UnknownFields.SerializedSize;
+ memoizedSerializedSize = size;
+ return size;
+ }
+ public static Int32Message ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static Int32Message ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static Int32Message ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static Int32Message ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static Int32Message ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static Int32Message ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static Int32Message ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static Int32Message ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static Int32Message ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static Int32Message ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private Int32Message 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(Int32Message prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Builder : pb::GeneratedBuilder<Int32Message, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(Int32Message cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private Int32Message result;
+
+ private Int32Message PrepareBuilder() {
+ if (resultIsReadOnly) {
+ Int32Message original = result;
+ result = new Int32Message();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override Int32Message 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.Int32Message.Descriptor; }
+ }
+
+ public override Int32Message DefaultInstanceForType {
+ get { return global::Google.ProtocolBuffers.TestProtos.Int32Message.DefaultInstance; }
+ }
+
+ public override Int32Message BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+ public override Builder MergeFrom(pb::IMessage other) {
+ if (other is Int32Message) {
+ return MergeFrom((Int32Message) other);
+ } else {
+ base.MergeFrom(other);
+ return this;
+ }
+ }
+
+ public override Builder MergeFrom(Int32Message other) {
+ if (other == global::Google.ProtocolBuffers.TestProtos.Int32Message.DefaultInstance) return this;
+ PrepareBuilder();
+ if (other.HasData) {
+ Data = other.Data;
+ }
+ 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(_int32MessageFieldNames, field_name, global::System.StringComparer.Ordinal);
+ if(field_ordinal >= 0)
+ tag = _int32MessageFieldTags[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.hasData = input.ReadInt32(ref result.data_);
+ break;
+ }
+ }
+ }
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
+ }
+
+
+ public bool HasData {
+ get { return result.hasData; }
+ }
+ public int Data {
+ get { return result.Data; }
+ set { SetData(value); }
+ }
+ public Builder SetData(int value) {
+ PrepareBuilder();
+ result.hasData = true;
+ result.data_ = value;
+ return this;
+ }
+ public Builder ClearData() {
+ PrepareBuilder();
+ result.hasData = false;
+ result.data_ = 0;
+ return this;
+ }
+ }
+ static Int32Message() {
+ object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor, null);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Uint32Message : pb::GeneratedMessage<Uint32Message, Uint32Message.Builder> {
+ private Uint32Message() { }
+ private static readonly Uint32Message defaultInstance = new Uint32Message().MakeReadOnly();
+ private static readonly string[] _uint32MessageFieldNames = new string[] { "data" };
+ private static readonly uint[] _uint32MessageFieldTags = new uint[] { 8 };
+ public static Uint32Message DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override Uint32Message DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override Uint32Message ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_Uint32Message__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<Uint32Message, Uint32Message.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_Uint32Message__FieldAccessorTable; }
+ }
+
+ public const int DataFieldNumber = 1;
+ private bool hasData;
+ private uint data_;
+ public bool HasData {
+ get { return hasData; }
+ }
+ [global::System.CLSCompliant(false)]
+ public uint Data {
+ get { return data_; }
+ }
+
+ public override bool IsInitialized {
+ get {
+ return true;
+ }
+ }
+
+ public override void WriteTo(pb::ICodedOutputStream output) {
+ CalcSerializedSize();
+ string[] field_names = _uint32MessageFieldNames;
+ if (hasData) {
+ output.WriteUInt32(1, field_names[0], Data);
+ }
+ UnknownFields.WriteTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public override int SerializedSize {
+ get {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+ return CalcSerializedSize();
+ }
+ }
+
+ private int CalcSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (hasData) {
+ size += pb::CodedOutputStream.ComputeUInt32Size(1, Data);
+ }
+ size += UnknownFields.SerializedSize;
+ memoizedSerializedSize = size;
+ return size;
+ }
+ public static Uint32Message ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static Uint32Message ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static Uint32Message ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static Uint32Message ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static Uint32Message ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static Uint32Message ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static Uint32Message ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static Uint32Message ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static Uint32Message ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static Uint32Message ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private Uint32Message 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(Uint32Message prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Builder : pb::GeneratedBuilder<Uint32Message, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(Uint32Message cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private Uint32Message result;
+
+ private Uint32Message PrepareBuilder() {
+ if (resultIsReadOnly) {
+ Uint32Message original = result;
+ result = new Uint32Message();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override Uint32Message 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.Uint32Message.Descriptor; }
+ }
+
+ public override Uint32Message DefaultInstanceForType {
+ get { return global::Google.ProtocolBuffers.TestProtos.Uint32Message.DefaultInstance; }
+ }
+
+ public override Uint32Message BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+ public override Builder MergeFrom(pb::IMessage other) {
+ if (other is Uint32Message) {
+ return MergeFrom((Uint32Message) other);
+ } else {
+ base.MergeFrom(other);
+ return this;
+ }
+ }
+
+ public override Builder MergeFrom(Uint32Message other) {
+ if (other == global::Google.ProtocolBuffers.TestProtos.Uint32Message.DefaultInstance) return this;
+ PrepareBuilder();
+ if (other.HasData) {
+ Data = other.Data;
+ }
+ 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(_uint32MessageFieldNames, field_name, global::System.StringComparer.Ordinal);
+ if(field_ordinal >= 0)
+ tag = _uint32MessageFieldTags[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.hasData = input.ReadUInt32(ref result.data_);
+ break;
+ }
+ }
+ }
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
+ }
+
+
+ public bool HasData {
+ get { return result.hasData; }
+ }
+ [global::System.CLSCompliant(false)]
+ public uint Data {
+ get { return result.Data; }
+ set { SetData(value); }
+ }
+ [global::System.CLSCompliant(false)]
+ public Builder SetData(uint value) {
+ PrepareBuilder();
+ result.hasData = true;
+ result.data_ = value;
+ return this;
+ }
+ public Builder ClearData() {
+ PrepareBuilder();
+ result.hasData = false;
+ result.data_ = 0;
+ return this;
+ }
+ }
+ static Uint32Message() {
+ object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor, null);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Int64Message : pb::GeneratedMessage<Int64Message, Int64Message.Builder> {
+ private Int64Message() { }
+ private static readonly Int64Message defaultInstance = new Int64Message().MakeReadOnly();
+ private static readonly string[] _int64MessageFieldNames = new string[] { "data" };
+ private static readonly uint[] _int64MessageFieldTags = new uint[] { 8 };
+ public static Int64Message DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override Int64Message DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override Int64Message ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_Int64Message__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<Int64Message, Int64Message.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_Int64Message__FieldAccessorTable; }
+ }
+
+ public const int DataFieldNumber = 1;
+ private bool hasData;
+ private long data_;
+ public bool HasData {
+ get { return hasData; }
+ }
+ public long Data {
+ get { return data_; }
+ }
+
+ public override bool IsInitialized {
+ get {
+ return true;
+ }
+ }
+
+ public override void WriteTo(pb::ICodedOutputStream output) {
+ CalcSerializedSize();
+ string[] field_names = _int64MessageFieldNames;
+ if (hasData) {
+ output.WriteInt64(1, field_names[0], Data);
+ }
+ UnknownFields.WriteTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public override int SerializedSize {
+ get {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+ return CalcSerializedSize();
+ }
+ }
+
+ private int CalcSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (hasData) {
+ size += pb::CodedOutputStream.ComputeInt64Size(1, Data);
+ }
+ size += UnknownFields.SerializedSize;
+ memoizedSerializedSize = size;
+ return size;
+ }
+ public static Int64Message ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static Int64Message ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static Int64Message ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static Int64Message ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static Int64Message ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static Int64Message ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static Int64Message ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static Int64Message ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static Int64Message ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static Int64Message ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private Int64Message 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(Int64Message prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Builder : pb::GeneratedBuilder<Int64Message, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(Int64Message cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private Int64Message result;
+
+ private Int64Message PrepareBuilder() {
+ if (resultIsReadOnly) {
+ Int64Message original = result;
+ result = new Int64Message();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override Int64Message 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.Int64Message.Descriptor; }
+ }
+
+ public override Int64Message DefaultInstanceForType {
+ get { return global::Google.ProtocolBuffers.TestProtos.Int64Message.DefaultInstance; }
+ }
+
+ public override Int64Message BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+ public override Builder MergeFrom(pb::IMessage other) {
+ if (other is Int64Message) {
+ return MergeFrom((Int64Message) other);
+ } else {
+ base.MergeFrom(other);
+ return this;
+ }
+ }
+
+ public override Builder MergeFrom(Int64Message other) {
+ if (other == global::Google.ProtocolBuffers.TestProtos.Int64Message.DefaultInstance) return this;
+ PrepareBuilder();
+ if (other.HasData) {
+ Data = other.Data;
+ }
+ 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(_int64MessageFieldNames, field_name, global::System.StringComparer.Ordinal);
+ if(field_ordinal >= 0)
+ tag = _int64MessageFieldTags[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.hasData = input.ReadInt64(ref result.data_);
+ break;
+ }
+ }
+ }
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
+ }
+
+
+ public bool HasData {
+ get { return result.hasData; }
+ }
+ public long Data {
+ get { return result.Data; }
+ set { SetData(value); }
+ }
+ public Builder SetData(long value) {
+ PrepareBuilder();
+ result.hasData = true;
+ result.data_ = value;
+ return this;
+ }
+ public Builder ClearData() {
+ PrepareBuilder();
+ result.hasData = false;
+ result.data_ = 0L;
+ return this;
+ }
+ }
+ static Int64Message() {
+ object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor, null);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Uint64Message : pb::GeneratedMessage<Uint64Message, Uint64Message.Builder> {
+ private Uint64Message() { }
+ private static readonly Uint64Message defaultInstance = new Uint64Message().MakeReadOnly();
+ private static readonly string[] _uint64MessageFieldNames = new string[] { "data" };
+ private static readonly uint[] _uint64MessageFieldTags = new uint[] { 8 };
+ public static Uint64Message DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override Uint64Message DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override Uint64Message ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_Uint64Message__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<Uint64Message, Uint64Message.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_Uint64Message__FieldAccessorTable; }
+ }
+
+ public const int DataFieldNumber = 1;
+ private bool hasData;
+ private ulong data_;
+ public bool HasData {
+ get { return hasData; }
+ }
+ [global::System.CLSCompliant(false)]
+ public ulong Data {
+ get { return data_; }
+ }
+
+ public override bool IsInitialized {
+ get {
+ return true;
+ }
+ }
+
+ public override void WriteTo(pb::ICodedOutputStream output) {
+ CalcSerializedSize();
+ string[] field_names = _uint64MessageFieldNames;
+ if (hasData) {
+ output.WriteUInt64(1, field_names[0], Data);
+ }
+ UnknownFields.WriteTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public override int SerializedSize {
+ get {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+ return CalcSerializedSize();
+ }
+ }
+
+ private int CalcSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (hasData) {
+ size += pb::CodedOutputStream.ComputeUInt64Size(1, Data);
+ }
+ size += UnknownFields.SerializedSize;
+ memoizedSerializedSize = size;
+ return size;
+ }
+ public static Uint64Message ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static Uint64Message ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static Uint64Message ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static Uint64Message ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static Uint64Message ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static Uint64Message ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static Uint64Message ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static Uint64Message ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static Uint64Message ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static Uint64Message ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private Uint64Message 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(Uint64Message prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Builder : pb::GeneratedBuilder<Uint64Message, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(Uint64Message cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private Uint64Message result;
+
+ private Uint64Message PrepareBuilder() {
+ if (resultIsReadOnly) {
+ Uint64Message original = result;
+ result = new Uint64Message();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override Uint64Message 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.Uint64Message.Descriptor; }
+ }
+
+ public override Uint64Message DefaultInstanceForType {
+ get { return global::Google.ProtocolBuffers.TestProtos.Uint64Message.DefaultInstance; }
+ }
+
+ public override Uint64Message BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+ public override Builder MergeFrom(pb::IMessage other) {
+ if (other is Uint64Message) {
+ return MergeFrom((Uint64Message) other);
+ } else {
+ base.MergeFrom(other);
+ return this;
+ }
+ }
+
+ public override Builder MergeFrom(Uint64Message other) {
+ if (other == global::Google.ProtocolBuffers.TestProtos.Uint64Message.DefaultInstance) return this;
+ PrepareBuilder();
+ if (other.HasData) {
+ Data = other.Data;
+ }
+ 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(_uint64MessageFieldNames, field_name, global::System.StringComparer.Ordinal);
+ if(field_ordinal >= 0)
+ tag = _uint64MessageFieldTags[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.hasData = input.ReadUInt64(ref result.data_);
+ break;
+ }
+ }
+ }
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
+ }
+
+
+ public bool HasData {
+ get { return result.hasData; }
+ }
+ [global::System.CLSCompliant(false)]
+ public ulong Data {
+ get { return result.Data; }
+ set { SetData(value); }
+ }
+ [global::System.CLSCompliant(false)]
+ public Builder SetData(ulong value) {
+ PrepareBuilder();
+ result.hasData = true;
+ result.data_ = value;
+ return this;
+ }
+ public Builder ClearData() {
+ PrepareBuilder();
+ result.hasData = false;
+ result.data_ = 0UL;
+ return this;
+ }
+ }
+ static Uint64Message() {
+ object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor, null);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class BoolMessage : pb::GeneratedMessage<BoolMessage, BoolMessage.Builder> {
+ private BoolMessage() { }
+ private static readonly BoolMessage defaultInstance = new BoolMessage().MakeReadOnly();
+ private static readonly string[] _boolMessageFieldNames = new string[] { "data" };
+ private static readonly uint[] _boolMessageFieldTags = new uint[] { 8 };
+ public static BoolMessage DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override BoolMessage DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override BoolMessage ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_BoolMessage__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<BoolMessage, BoolMessage.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_BoolMessage__FieldAccessorTable; }
+ }
+
+ public const int DataFieldNumber = 1;
+ private bool hasData;
+ private bool data_;
+ public bool HasData {
+ get { return hasData; }
+ }
+ public bool Data {
+ get { return data_; }
+ }
+
+ public override bool IsInitialized {
+ get {
+ return true;
+ }
+ }
+
+ public override void WriteTo(pb::ICodedOutputStream output) {
+ CalcSerializedSize();
+ string[] field_names = _boolMessageFieldNames;
+ if (hasData) {
+ output.WriteBool(1, field_names[0], Data);
+ }
+ UnknownFields.WriteTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public override int SerializedSize {
+ get {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+ return CalcSerializedSize();
+ }
+ }
+
+ private int CalcSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (hasData) {
+ size += pb::CodedOutputStream.ComputeBoolSize(1, Data);
+ }
+ size += UnknownFields.SerializedSize;
+ memoizedSerializedSize = size;
+ return size;
+ }
+ public static BoolMessage ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static BoolMessage ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static BoolMessage ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static BoolMessage ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static BoolMessage ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static BoolMessage ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static BoolMessage ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static BoolMessage ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static BoolMessage ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static BoolMessage ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private BoolMessage 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(BoolMessage prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Builder : pb::GeneratedBuilder<BoolMessage, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(BoolMessage cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private BoolMessage result;
+
+ private BoolMessage PrepareBuilder() {
+ if (resultIsReadOnly) {
+ BoolMessage original = result;
+ result = new BoolMessage();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override BoolMessage 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.BoolMessage.Descriptor; }
+ }
+
+ public override BoolMessage DefaultInstanceForType {
+ get { return global::Google.ProtocolBuffers.TestProtos.BoolMessage.DefaultInstance; }
+ }
+
+ public override BoolMessage BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+ public override Builder MergeFrom(pb::IMessage other) {
+ if (other is BoolMessage) {
+ return MergeFrom((BoolMessage) other);
+ } else {
+ base.MergeFrom(other);
+ return this;
+ }
+ }
+
+ public override Builder MergeFrom(BoolMessage other) {
+ if (other == global::Google.ProtocolBuffers.TestProtos.BoolMessage.DefaultInstance) return this;
+ PrepareBuilder();
+ if (other.HasData) {
+ Data = other.Data;
+ }
+ 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(_boolMessageFieldNames, field_name, global::System.StringComparer.Ordinal);
+ if(field_ordinal >= 0)
+ tag = _boolMessageFieldTags[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.hasData = input.ReadBool(ref result.data_);
+ break;
+ }
+ }
+ }
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
+ }
+
+
+ public bool HasData {
+ get { return result.hasData; }
+ }
+ public bool Data {
+ get { return result.Data; }
+ set { SetData(value); }
+ }
+ public Builder SetData(bool value) {
+ PrepareBuilder();
+ result.hasData = true;
+ result.data_ = value;
+ return this;
+ }
+ public Builder ClearData() {
+ PrepareBuilder();
+ result.hasData = false;
+ result.data_ = false;
+ return this;
+ }
+ }
+ static BoolMessage() {
+ object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor, null);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class TestOneof : pb::GeneratedMessage<TestOneof, TestOneof.Builder> {
+ private TestOneof() { }
+ private static readonly TestOneof defaultInstance = new TestOneof().MakeReadOnly();
+ private static readonly string[] _testOneofFieldNames = new string[] { "foo_int", "foo_message", "foo_string", "foogroup" };
+ private static readonly uint[] _testOneofFieldTags = new uint[] { 8, 26, 18, 35 };
+ public static TestOneof DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override TestOneof DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override TestOneof ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestOneof__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<TestOneof, TestOneof.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestOneof__FieldAccessorTable; }
+ }
+
+ #region Nested types
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public static partial class Types {
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class FooGroup : pb::GeneratedMessage<FooGroup, FooGroup.Builder> {
+ private FooGroup() { }
+ private static readonly FooGroup defaultInstance = new FooGroup().MakeReadOnly();
+ private static readonly string[] _fooGroupFieldNames = new string[] { "a", "b" };
+ private static readonly uint[] _fooGroupFieldTags = new uint[] { 40, 50 };
+ public static FooGroup DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override FooGroup DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override FooGroup ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestOneof_FooGroup__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<FooGroup, FooGroup.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestOneof_FooGroup__FieldAccessorTable; }
+ }
+
+ public const int AFieldNumber = 5;
+ private bool hasA;
+ private int a_;
+ public bool HasA {
+ get { return hasA; }
+ }
+ public int A {
+ get { return a_; }
+ }
+
+ public const int BFieldNumber = 6;
+ private bool hasB;
+ private string b_ = "";
+ public bool HasB {
+ get { return hasB; }
+ }
+ public string B {
+ get { return b_; }
+ }
+
+ public override bool IsInitialized {
+ get {
+ return true;
+ }
+ }
+
+ public override void WriteTo(pb::ICodedOutputStream output) {
+ CalcSerializedSize();
+ string[] field_names = _fooGroupFieldNames;
+ if (hasA) {
+ output.WriteInt32(5, field_names[0], A);
+ }
+ if (hasB) {
+ output.WriteString(6, field_names[1], B);
+ }
+ UnknownFields.WriteTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public override int SerializedSize {
+ get {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+ return CalcSerializedSize();
+ }
+ }
+
+ private int CalcSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (hasA) {
+ size += pb::CodedOutputStream.ComputeInt32Size(5, A);
+ }
+ if (hasB) {
+ size += pb::CodedOutputStream.ComputeStringSize(6, B);
+ }
+ size += UnknownFields.SerializedSize;
+ memoizedSerializedSize = size;
+ return size;
+ }
+ public static FooGroup ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static FooGroup ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static FooGroup ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static FooGroup ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static FooGroup ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static FooGroup ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static FooGroup ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static FooGroup ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static FooGroup ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static FooGroup ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private FooGroup 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(FooGroup prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Builder : pb::GeneratedBuilder<FooGroup, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(FooGroup cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private FooGroup result;
+
+ private FooGroup PrepareBuilder() {
+ if (resultIsReadOnly) {
+ FooGroup original = result;
+ result = new FooGroup();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override FooGroup 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.TestOneof.Types.FooGroup.Descriptor; }
+ }
+
+ public override FooGroup DefaultInstanceForType {
+ get { return global::Google.ProtocolBuffers.TestProtos.TestOneof.Types.FooGroup.DefaultInstance; }
+ }
+
+ public override FooGroup BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+ public override Builder MergeFrom(pb::IMessage other) {
+ if (other is FooGroup) {
+ return MergeFrom((FooGroup) other);
+ } else {
+ base.MergeFrom(other);
+ return this;
+ }
+ }
+
+ public override Builder MergeFrom(FooGroup other) {
+ if (other == global::Google.ProtocolBuffers.TestProtos.TestOneof.Types.FooGroup.DefaultInstance) return this;
+ PrepareBuilder();
+ if (other.HasA) {
+ A = other.A;
+ }
+ if (other.HasB) {
+ B = other.B;
+ }
+ 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(_fooGroupFieldNames, field_name, global::System.StringComparer.Ordinal);
+ if(field_ordinal >= 0)
+ tag = _fooGroupFieldTags[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 40: {
+ result.hasA = input.ReadInt32(ref result.a_);
+ break;
+ }
+ case 50: {
+ result.hasB = input.ReadString(ref result.b_);
+ break;
+ }
+ }
+ }
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
+ }
+
+
+ public bool HasA {
+ get { return result.hasA; }
+ }
+ public int A {
+ get { return result.A; }
+ set { SetA(value); }
+ }
+ public Builder SetA(int value) {
+ PrepareBuilder();
+ result.hasA = true;
+ result.a_ = value;
+ return this;
+ }
+ public Builder ClearA() {
+ PrepareBuilder();
+ result.hasA = false;
+ result.a_ = 0;
+ return this;
+ }
+
+ public bool HasB {
+ get { return result.hasB; }
+ }
+ public string B {
+ get { return result.B; }
+ set { SetB(value); }
+ }
+ public Builder SetB(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasB = true;
+ result.b_ = value;
+ return this;
+ }
+ public Builder ClearB() {
+ PrepareBuilder();
+ result.hasB = false;
+ result.b_ = "";
+ return this;
+ }
+ }
+ static FooGroup() {
+ object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor, null);
+ }
+ }
+
+ }
+ #endregion
+
+ public const int FooIntFieldNumber = 1;
+ private bool hasFooInt;
+ private int fooInt_;
+ public bool HasFooInt {
+ get { return hasFooInt; }
+ }
+ public int FooInt {
+ get { return fooInt_; }
+ }
+
+ public const int FooStringFieldNumber = 2;
+ private bool hasFooString;
+ private string fooString_ = "";
+ public bool HasFooString {
+ get { return hasFooString; }
+ }
+ public string FooString {
+ get { return fooString_; }
+ }
+
+ public const int FooMessageFieldNumber = 3;
+ private bool hasFooMessage;
+ private global::Google.ProtocolBuffers.TestProtos.TestAllTypes fooMessage_;
+ public bool HasFooMessage {
+ get { return hasFooMessage; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestAllTypes FooMessage {
+ get { return fooMessage_ ?? global::Google.ProtocolBuffers.TestProtos.TestAllTypes.DefaultInstance; }
+ }
+
+ public const int FooGroupFieldNumber = 4;
+ private bool hasFooGroup;
+ private global::Google.ProtocolBuffers.TestProtos.TestOneof.Types.FooGroup fooGroup_;
+ public bool HasFooGroup {
+ get { return hasFooGroup; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestOneof.Types.FooGroup FooGroup {
+ get { return fooGroup_ ?? global::Google.ProtocolBuffers.TestProtos.TestOneof.Types.FooGroup.DefaultInstance; }
+ }
+
+ public override bool IsInitialized {
+ get {
+ return true;
+ }
+ }
+
+ public override void WriteTo(pb::ICodedOutputStream output) {
+ CalcSerializedSize();
+ string[] field_names = _testOneofFieldNames;
+ if (hasFooInt) {
+ output.WriteInt32(1, field_names[0], FooInt);
+ }
+ if (hasFooString) {
+ output.WriteString(2, field_names[2], FooString);
+ }
+ if (hasFooMessage) {
+ output.WriteMessage(3, field_names[1], FooMessage);
+ }
+ if (hasFooGroup) {
+ output.WriteGroup(4, field_names[3], FooGroup);
+ }
+ UnknownFields.WriteTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public override int SerializedSize {
+ get {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+ return CalcSerializedSize();
+ }
+ }
+
+ private int CalcSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (hasFooInt) {
+ size += pb::CodedOutputStream.ComputeInt32Size(1, FooInt);
+ }
+ if (hasFooString) {
+ size += pb::CodedOutputStream.ComputeStringSize(2, FooString);
+ }
+ if (hasFooMessage) {
+ size += pb::CodedOutputStream.ComputeMessageSize(3, FooMessage);
+ }
+ if (hasFooGroup) {
+ size += pb::CodedOutputStream.ComputeGroupSize(4, FooGroup);
+ }
+ size += UnknownFields.SerializedSize;
+ memoizedSerializedSize = size;
+ return size;
+ }
+ public static TestOneof ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static TestOneof ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static TestOneof ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static TestOneof ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static TestOneof ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static TestOneof ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static TestOneof ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static TestOneof ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static TestOneof ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static TestOneof ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private TestOneof 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(TestOneof prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Builder : pb::GeneratedBuilder<TestOneof, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(TestOneof cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private TestOneof result;
+
+ private TestOneof PrepareBuilder() {
+ if (resultIsReadOnly) {
+ TestOneof original = result;
+ result = new TestOneof();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override TestOneof 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.TestOneof.Descriptor; }
+ }
+
+ public override TestOneof DefaultInstanceForType {
+ get { return global::Google.ProtocolBuffers.TestProtos.TestOneof.DefaultInstance; }
+ }
+
+ public override TestOneof BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+ public override Builder MergeFrom(pb::IMessage other) {
+ if (other is TestOneof) {
+ return MergeFrom((TestOneof) other);
+ } else {
+ base.MergeFrom(other);
+ return this;
+ }
+ }
+
+ public override Builder MergeFrom(TestOneof other) {
+ if (other == global::Google.ProtocolBuffers.TestProtos.TestOneof.DefaultInstance) return this;
+ PrepareBuilder();
+ if (other.HasFooInt) {
+ FooInt = other.FooInt;
+ }
+ if (other.HasFooString) {
+ FooString = other.FooString;
+ }
+ if (other.HasFooMessage) {
+ MergeFooMessage(other.FooMessage);
+ }
+ if (other.HasFooGroup) {
+ MergeFooGroup(other.FooGroup);
+ }
+ 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(_testOneofFieldNames, field_name, global::System.StringComparer.Ordinal);
+ if(field_ordinal >= 0)
+ tag = _testOneofFieldTags[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.hasFooInt = input.ReadInt32(ref result.fooInt_);
+ break;
+ }
+ case 18: {
+ result.hasFooString = input.ReadString(ref result.fooString_);
+ break;
+ }
+ case 26: {
+ global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.TestAllTypes.CreateBuilder();
+ if (result.hasFooMessage) {
+ subBuilder.MergeFrom(FooMessage);
+ }
+ input.ReadMessage(subBuilder, extensionRegistry);
+ FooMessage = subBuilder.BuildPartial();
+ break;
+ }
+ case 35: {
+ global::Google.ProtocolBuffers.TestProtos.TestOneof.Types.FooGroup.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.TestOneof.Types.FooGroup.CreateBuilder();
+ if (result.hasFooGroup) {
+ subBuilder.MergeFrom(FooGroup);
+ }
+ input.ReadGroup(4, subBuilder, extensionRegistry);
+ FooGroup = subBuilder.BuildPartial();
+ break;
+ }
+ }
+ }
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
+ }
+
+
+ public bool HasFooInt {
+ get { return result.hasFooInt; }
+ }
+ public int FooInt {
+ get { return result.FooInt; }
+ set { SetFooInt(value); }
+ }
+ public Builder SetFooInt(int value) {
+ PrepareBuilder();
+ result.hasFooInt = true;
+ result.fooInt_ = value;
+ return this;
+ }
+ public Builder ClearFooInt() {
+ PrepareBuilder();
+ result.hasFooInt = false;
+ result.fooInt_ = 0;
+ return this;
+ }
+
+ public bool HasFooString {
+ get { return result.hasFooString; }
+ }
+ public string FooString {
+ get { return result.FooString; }
+ set { SetFooString(value); }
+ }
+ public Builder SetFooString(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasFooString = true;
+ result.fooString_ = value;
+ return this;
+ }
+ public Builder ClearFooString() {
+ PrepareBuilder();
+ result.hasFooString = false;
+ result.fooString_ = "";
+ return this;
+ }
+
+ public bool HasFooMessage {
+ get { return result.hasFooMessage; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestAllTypes FooMessage {
+ get { return result.FooMessage; }
+ set { SetFooMessage(value); }
+ }
+ public Builder SetFooMessage(global::Google.ProtocolBuffers.TestProtos.TestAllTypes value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasFooMessage = true;
+ result.fooMessage_ = value;
+ return this;
+ }
+ public Builder SetFooMessage(global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.hasFooMessage = true;
+ result.fooMessage_ = builderForValue.Build();
+ return this;
+ }
+ public Builder MergeFooMessage(global::Google.ProtocolBuffers.TestProtos.TestAllTypes value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ if (result.hasFooMessage &&
+ result.fooMessage_ != global::Google.ProtocolBuffers.TestProtos.TestAllTypes.DefaultInstance) {
+ result.fooMessage_ = global::Google.ProtocolBuffers.TestProtos.TestAllTypes.CreateBuilder(result.fooMessage_).MergeFrom(value).BuildPartial();
+ } else {
+ result.fooMessage_ = value;
+ }
+ result.hasFooMessage = true;
+ return this;
+ }
+ public Builder ClearFooMessage() {
+ PrepareBuilder();
+ result.hasFooMessage = false;
+ result.fooMessage_ = null;
+ return this;
+ }
+
+ public bool HasFooGroup {
+ get { return result.hasFooGroup; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestOneof.Types.FooGroup FooGroup {
+ get { return result.FooGroup; }
+ set { SetFooGroup(value); }
+ }
+ public Builder SetFooGroup(global::Google.ProtocolBuffers.TestProtos.TestOneof.Types.FooGroup value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasFooGroup = true;
+ result.fooGroup_ = value;
+ return this;
+ }
+ public Builder SetFooGroup(global::Google.ProtocolBuffers.TestProtos.TestOneof.Types.FooGroup.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.hasFooGroup = true;
+ result.fooGroup_ = builderForValue.Build();
+ return this;
+ }
+ public Builder MergeFooGroup(global::Google.ProtocolBuffers.TestProtos.TestOneof.Types.FooGroup value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ if (result.hasFooGroup &&
+ result.fooGroup_ != global::Google.ProtocolBuffers.TestProtos.TestOneof.Types.FooGroup.DefaultInstance) {
+ result.fooGroup_ = global::Google.ProtocolBuffers.TestProtos.TestOneof.Types.FooGroup.CreateBuilder(result.fooGroup_).MergeFrom(value).BuildPartial();
+ } else {
+ result.fooGroup_ = value;
+ }
+ result.hasFooGroup = true;
+ return this;
+ }
+ public Builder ClearFooGroup() {
+ PrepareBuilder();
+ result.hasFooGroup = false;
+ result.fooGroup_ = null;
+ return this;
+ }
+ }
+ static TestOneof() {
+ object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor, null);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class TestOneofBackwardsCompatible : pb::GeneratedMessage<TestOneofBackwardsCompatible, TestOneofBackwardsCompatible.Builder> {
+ private TestOneofBackwardsCompatible() { }
+ private static readonly TestOneofBackwardsCompatible defaultInstance = new TestOneofBackwardsCompatible().MakeReadOnly();
+ private static readonly string[] _testOneofBackwardsCompatibleFieldNames = new string[] { "foo_int", "foo_message", "foo_string", "foogroup" };
+ private static readonly uint[] _testOneofBackwardsCompatibleFieldTags = new uint[] { 8, 26, 18, 35 };
+ public static TestOneofBackwardsCompatible DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override TestOneofBackwardsCompatible DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override TestOneofBackwardsCompatible ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestOneofBackwardsCompatible__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<TestOneofBackwardsCompatible, TestOneofBackwardsCompatible.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestOneofBackwardsCompatible__FieldAccessorTable; }
+ }
+
+ #region Nested types
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public static partial class Types {
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class FooGroup : pb::GeneratedMessage<FooGroup, FooGroup.Builder> {
+ private FooGroup() { }
+ private static readonly FooGroup defaultInstance = new FooGroup().MakeReadOnly();
+ private static readonly string[] _fooGroupFieldNames = new string[] { "a", "b" };
+ private static readonly uint[] _fooGroupFieldTags = new uint[] { 40, 50 };
+ public static FooGroup DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override FooGroup DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override FooGroup ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestOneofBackwardsCompatible_FooGroup__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<FooGroup, FooGroup.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestOneofBackwardsCompatible_FooGroup__FieldAccessorTable; }
+ }
+
+ public const int AFieldNumber = 5;
+ private bool hasA;
+ private int a_;
+ public bool HasA {
+ get { return hasA; }
+ }
+ public int A {
+ get { return a_; }
+ }
+
+ public const int BFieldNumber = 6;
+ private bool hasB;
+ private string b_ = "";
+ public bool HasB {
+ get { return hasB; }
+ }
+ public string B {
+ get { return b_; }
+ }
+
+ public override bool IsInitialized {
+ get {
+ return true;
+ }
+ }
+
+ public override void WriteTo(pb::ICodedOutputStream output) {
+ CalcSerializedSize();
+ string[] field_names = _fooGroupFieldNames;
+ if (hasA) {
+ output.WriteInt32(5, field_names[0], A);
+ }
+ if (hasB) {
+ output.WriteString(6, field_names[1], B);
+ }
+ UnknownFields.WriteTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public override int SerializedSize {
+ get {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+ return CalcSerializedSize();
+ }
+ }
+
+ private int CalcSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (hasA) {
+ size += pb::CodedOutputStream.ComputeInt32Size(5, A);
+ }
+ if (hasB) {
+ size += pb::CodedOutputStream.ComputeStringSize(6, B);
+ }
+ size += UnknownFields.SerializedSize;
+ memoizedSerializedSize = size;
+ return size;
+ }
+ public static FooGroup ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static FooGroup ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static FooGroup ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static FooGroup ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static FooGroup ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static FooGroup ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static FooGroup ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static FooGroup ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static FooGroup ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static FooGroup ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private FooGroup 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(FooGroup prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Builder : pb::GeneratedBuilder<FooGroup, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(FooGroup cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private FooGroup result;
+
+ private FooGroup PrepareBuilder() {
+ if (resultIsReadOnly) {
+ FooGroup original = result;
+ result = new FooGroup();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override FooGroup 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.TestOneofBackwardsCompatible.Types.FooGroup.Descriptor; }
+ }
+
+ public override FooGroup DefaultInstanceForType {
+ get { return global::Google.ProtocolBuffers.TestProtos.TestOneofBackwardsCompatible.Types.FooGroup.DefaultInstance; }
+ }
+
+ public override FooGroup BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+ public override Builder MergeFrom(pb::IMessage other) {
+ if (other is FooGroup) {
+ return MergeFrom((FooGroup) other);
+ } else {
+ base.MergeFrom(other);
+ return this;
+ }
+ }
+
+ public override Builder MergeFrom(FooGroup other) {
+ if (other == global::Google.ProtocolBuffers.TestProtos.TestOneofBackwardsCompatible.Types.FooGroup.DefaultInstance) return this;
+ PrepareBuilder();
+ if (other.HasA) {
+ A = other.A;
+ }
+ if (other.HasB) {
+ B = other.B;
+ }
+ 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(_fooGroupFieldNames, field_name, global::System.StringComparer.Ordinal);
+ if(field_ordinal >= 0)
+ tag = _fooGroupFieldTags[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 40: {
+ result.hasA = input.ReadInt32(ref result.a_);
+ break;
+ }
+ case 50: {
+ result.hasB = input.ReadString(ref result.b_);
+ break;
+ }
+ }
+ }
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
+ }
+
+
+ public bool HasA {
+ get { return result.hasA; }
+ }
+ public int A {
+ get { return result.A; }
+ set { SetA(value); }
+ }
+ public Builder SetA(int value) {
+ PrepareBuilder();
+ result.hasA = true;
+ result.a_ = value;
+ return this;
+ }
+ public Builder ClearA() {
+ PrepareBuilder();
+ result.hasA = false;
+ result.a_ = 0;
+ return this;
+ }
+
+ public bool HasB {
+ get { return result.hasB; }
+ }
+ public string B {
+ get { return result.B; }
+ set { SetB(value); }
+ }
+ public Builder SetB(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasB = true;
+ result.b_ = value;
+ return this;
+ }
+ public Builder ClearB() {
+ PrepareBuilder();
+ result.hasB = false;
+ result.b_ = "";
+ return this;
+ }
+ }
+ static FooGroup() {
+ object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor, null);
+ }
+ }
+
+ }
+ #endregion
+
+ public const int FooIntFieldNumber = 1;
+ private bool hasFooInt;
+ private int fooInt_;
+ public bool HasFooInt {
+ get { return hasFooInt; }
+ }
+ public int FooInt {
+ get { return fooInt_; }
+ }
+
+ public const int FooStringFieldNumber = 2;
+ private bool hasFooString;
+ private string fooString_ = "";
+ public bool HasFooString {
+ get { return hasFooString; }
+ }
+ public string FooString {
+ get { return fooString_; }
+ }
+
+ public const int FooMessageFieldNumber = 3;
+ private bool hasFooMessage;
+ private global::Google.ProtocolBuffers.TestProtos.TestAllTypes fooMessage_;
+ public bool HasFooMessage {
+ get { return hasFooMessage; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestAllTypes FooMessage {
+ get { return fooMessage_ ?? global::Google.ProtocolBuffers.TestProtos.TestAllTypes.DefaultInstance; }
+ }
+
+ public const int FooGroupFieldNumber = 4;
+ private bool hasFooGroup;
+ private global::Google.ProtocolBuffers.TestProtos.TestOneofBackwardsCompatible.Types.FooGroup fooGroup_;
+ public bool HasFooGroup {
+ get { return hasFooGroup; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestOneofBackwardsCompatible.Types.FooGroup FooGroup {
+ get { return fooGroup_ ?? global::Google.ProtocolBuffers.TestProtos.TestOneofBackwardsCompatible.Types.FooGroup.DefaultInstance; }
+ }
+
+ public override bool IsInitialized {
+ get {
+ return true;
+ }
+ }
+
+ public override void WriteTo(pb::ICodedOutputStream output) {
+ CalcSerializedSize();
+ string[] field_names = _testOneofBackwardsCompatibleFieldNames;
+ if (hasFooInt) {
+ output.WriteInt32(1, field_names[0], FooInt);
+ }
+ if (hasFooString) {
+ output.WriteString(2, field_names[2], FooString);
+ }
+ if (hasFooMessage) {
+ output.WriteMessage(3, field_names[1], FooMessage);
+ }
+ if (hasFooGroup) {
+ output.WriteGroup(4, field_names[3], FooGroup);
+ }
+ UnknownFields.WriteTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public override int SerializedSize {
+ get {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+ return CalcSerializedSize();
+ }
+ }
+
+ private int CalcSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (hasFooInt) {
+ size += pb::CodedOutputStream.ComputeInt32Size(1, FooInt);
+ }
+ if (hasFooString) {
+ size += pb::CodedOutputStream.ComputeStringSize(2, FooString);
+ }
+ if (hasFooMessage) {
+ size += pb::CodedOutputStream.ComputeMessageSize(3, FooMessage);
+ }
+ if (hasFooGroup) {
+ size += pb::CodedOutputStream.ComputeGroupSize(4, FooGroup);
+ }
+ size += UnknownFields.SerializedSize;
+ memoizedSerializedSize = size;
+ return size;
+ }
+ public static TestOneofBackwardsCompatible ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static TestOneofBackwardsCompatible ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static TestOneofBackwardsCompatible ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static TestOneofBackwardsCompatible ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static TestOneofBackwardsCompatible ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static TestOneofBackwardsCompatible ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static TestOneofBackwardsCompatible ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static TestOneofBackwardsCompatible ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static TestOneofBackwardsCompatible ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static TestOneofBackwardsCompatible ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private TestOneofBackwardsCompatible 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(TestOneofBackwardsCompatible prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Builder : pb::GeneratedBuilder<TestOneofBackwardsCompatible, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(TestOneofBackwardsCompatible cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private TestOneofBackwardsCompatible result;
+
+ private TestOneofBackwardsCompatible PrepareBuilder() {
+ if (resultIsReadOnly) {
+ TestOneofBackwardsCompatible original = result;
+ result = new TestOneofBackwardsCompatible();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override TestOneofBackwardsCompatible 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.TestOneofBackwardsCompatible.Descriptor; }
+ }
+
+ public override TestOneofBackwardsCompatible DefaultInstanceForType {
+ get { return global::Google.ProtocolBuffers.TestProtos.TestOneofBackwardsCompatible.DefaultInstance; }
+ }
+
+ public override TestOneofBackwardsCompatible BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+ public override Builder MergeFrom(pb::IMessage other) {
+ if (other is TestOneofBackwardsCompatible) {
+ return MergeFrom((TestOneofBackwardsCompatible) other);
+ } else {
+ base.MergeFrom(other);
+ return this;
+ }
+ }
+
+ public override Builder MergeFrom(TestOneofBackwardsCompatible other) {
+ if (other == global::Google.ProtocolBuffers.TestProtos.TestOneofBackwardsCompatible.DefaultInstance) return this;
+ PrepareBuilder();
+ if (other.HasFooInt) {
+ FooInt = other.FooInt;
+ }
+ if (other.HasFooString) {
+ FooString = other.FooString;
+ }
+ if (other.HasFooMessage) {
+ MergeFooMessage(other.FooMessage);
+ }
+ if (other.HasFooGroup) {
+ MergeFooGroup(other.FooGroup);
+ }
+ 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(_testOneofBackwardsCompatibleFieldNames, field_name, global::System.StringComparer.Ordinal);
+ if(field_ordinal >= 0)
+ tag = _testOneofBackwardsCompatibleFieldTags[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.hasFooInt = input.ReadInt32(ref result.fooInt_);
+ break;
+ }
+ case 18: {
+ result.hasFooString = input.ReadString(ref result.fooString_);
+ break;
+ }
+ case 26: {
+ global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.TestAllTypes.CreateBuilder();
+ if (result.hasFooMessage) {
+ subBuilder.MergeFrom(FooMessage);
+ }
+ input.ReadMessage(subBuilder, extensionRegistry);
+ FooMessage = subBuilder.BuildPartial();
+ break;
+ }
+ case 35: {
+ global::Google.ProtocolBuffers.TestProtos.TestOneofBackwardsCompatible.Types.FooGroup.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.TestOneofBackwardsCompatible.Types.FooGroup.CreateBuilder();
+ if (result.hasFooGroup) {
+ subBuilder.MergeFrom(FooGroup);
+ }
+ input.ReadGroup(4, subBuilder, extensionRegistry);
+ FooGroup = subBuilder.BuildPartial();
+ break;
+ }
+ }
+ }
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
+ }
+
+
+ public bool HasFooInt {
+ get { return result.hasFooInt; }
+ }
+ public int FooInt {
+ get { return result.FooInt; }
+ set { SetFooInt(value); }
+ }
+ public Builder SetFooInt(int value) {
+ PrepareBuilder();
+ result.hasFooInt = true;
+ result.fooInt_ = value;
+ return this;
+ }
+ public Builder ClearFooInt() {
+ PrepareBuilder();
+ result.hasFooInt = false;
+ result.fooInt_ = 0;
+ return this;
+ }
+
+ public bool HasFooString {
+ get { return result.hasFooString; }
+ }
+ public string FooString {
+ get { return result.FooString; }
+ set { SetFooString(value); }
+ }
+ public Builder SetFooString(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasFooString = true;
+ result.fooString_ = value;
+ return this;
+ }
+ public Builder ClearFooString() {
+ PrepareBuilder();
+ result.hasFooString = false;
+ result.fooString_ = "";
+ return this;
+ }
+
+ public bool HasFooMessage {
+ get { return result.hasFooMessage; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestAllTypes FooMessage {
+ get { return result.FooMessage; }
+ set { SetFooMessage(value); }
+ }
+ public Builder SetFooMessage(global::Google.ProtocolBuffers.TestProtos.TestAllTypes value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasFooMessage = true;
+ result.fooMessage_ = value;
+ return this;
+ }
+ public Builder SetFooMessage(global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.hasFooMessage = true;
+ result.fooMessage_ = builderForValue.Build();
+ return this;
+ }
+ public Builder MergeFooMessage(global::Google.ProtocolBuffers.TestProtos.TestAllTypes value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ if (result.hasFooMessage &&
+ result.fooMessage_ != global::Google.ProtocolBuffers.TestProtos.TestAllTypes.DefaultInstance) {
+ result.fooMessage_ = global::Google.ProtocolBuffers.TestProtos.TestAllTypes.CreateBuilder(result.fooMessage_).MergeFrom(value).BuildPartial();
+ } else {
+ result.fooMessage_ = value;
+ }
+ result.hasFooMessage = true;
+ return this;
+ }
+ public Builder ClearFooMessage() {
+ PrepareBuilder();
+ result.hasFooMessage = false;
+ result.fooMessage_ = null;
+ return this;
+ }
+
+ public bool HasFooGroup {
+ get { return result.hasFooGroup; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestOneofBackwardsCompatible.Types.FooGroup FooGroup {
+ get { return result.FooGroup; }
+ set { SetFooGroup(value); }
+ }
+ public Builder SetFooGroup(global::Google.ProtocolBuffers.TestProtos.TestOneofBackwardsCompatible.Types.FooGroup value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasFooGroup = true;
+ result.fooGroup_ = value;
+ return this;
+ }
+ public Builder SetFooGroup(global::Google.ProtocolBuffers.TestProtos.TestOneofBackwardsCompatible.Types.FooGroup.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.hasFooGroup = true;
+ result.fooGroup_ = builderForValue.Build();
+ return this;
+ }
+ public Builder MergeFooGroup(global::Google.ProtocolBuffers.TestProtos.TestOneofBackwardsCompatible.Types.FooGroup value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ if (result.hasFooGroup &&
+ result.fooGroup_ != global::Google.ProtocolBuffers.TestProtos.TestOneofBackwardsCompatible.Types.FooGroup.DefaultInstance) {
+ result.fooGroup_ = global::Google.ProtocolBuffers.TestProtos.TestOneofBackwardsCompatible.Types.FooGroup.CreateBuilder(result.fooGroup_).MergeFrom(value).BuildPartial();
+ } else {
+ result.fooGroup_ = value;
+ }
+ result.hasFooGroup = true;
+ return this;
+ }
+ public Builder ClearFooGroup() {
+ PrepareBuilder();
+ result.hasFooGroup = false;
+ result.fooGroup_ = null;
+ return this;
+ }
+ }
+ static TestOneofBackwardsCompatible() {
+ object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor, null);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class TestOneof2 : pb::GeneratedMessage<TestOneof2, TestOneof2.Builder> {
+ private TestOneof2() { }
+ private static readonly TestOneof2 defaultInstance = new TestOneof2().MakeReadOnly();
+ private static readonly string[] _testOneof2FieldNames = new string[] { "bar_bytes", "bar_cord", "bar_enum", "bar_int", "bar_string", "bar_string_piece", "baz_int", "baz_string", "foo_bytes", "foo_cord", "foo_enum", "foo_int", "foo_lazy_message", "foo_message", "foo_string", "foo_string_piece", "foogroup" };
+ private static readonly uint[] _testOneof2FieldTags = new uint[] { 130, 114, 136, 96, 106, 122, 144, 154, 42, 26, 48, 8, 90, 58, 18, 34, 67 };
+ public static TestOneof2 DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override TestOneof2 DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override TestOneof2 ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestOneof2__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<TestOneof2, TestOneof2.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestOneof2__FieldAccessorTable; }
+ }
+
+ #region Nested types
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public static partial class Types {
+ public enum NestedEnum {
+ FOO = 1,
+ BAR = 2,
+ BAZ = 3,
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class FooGroup : pb::GeneratedMessage<FooGroup, FooGroup.Builder> {
+ private FooGroup() { }
+ private static readonly FooGroup defaultInstance = new FooGroup().MakeReadOnly();
+ private static readonly string[] _fooGroupFieldNames = new string[] { "a", "b" };
+ private static readonly uint[] _fooGroupFieldTags = new uint[] { 72, 82 };
+ public static FooGroup DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override FooGroup DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override FooGroup ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestOneof2_FooGroup__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<FooGroup, FooGroup.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestOneof2_FooGroup__FieldAccessorTable; }
+ }
+
+ public const int AFieldNumber = 9;
+ private bool hasA;
+ private int a_;
+ public bool HasA {
+ get { return hasA; }
+ }
+ public int A {
+ get { return a_; }
+ }
+
+ public const int BFieldNumber = 10;
+ private bool hasB;
+ private string b_ = "";
+ public bool HasB {
+ get { return hasB; }
+ }
+ public string B {
+ get { return b_; }
+ }
+
+ public override bool IsInitialized {
+ get {
+ return true;
+ }
+ }
+
+ public override void WriteTo(pb::ICodedOutputStream output) {
+ CalcSerializedSize();
+ string[] field_names = _fooGroupFieldNames;
+ if (hasA) {
+ output.WriteInt32(9, field_names[0], A);
+ }
+ if (hasB) {
+ output.WriteString(10, field_names[1], B);
+ }
+ UnknownFields.WriteTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public override int SerializedSize {
+ get {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+ return CalcSerializedSize();
+ }
+ }
+
+ private int CalcSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (hasA) {
+ size += pb::CodedOutputStream.ComputeInt32Size(9, A);
+ }
+ if (hasB) {
+ size += pb::CodedOutputStream.ComputeStringSize(10, B);
+ }
+ size += UnknownFields.SerializedSize;
+ memoizedSerializedSize = size;
+ return size;
+ }
+ public static FooGroup ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static FooGroup ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static FooGroup ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static FooGroup ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static FooGroup ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static FooGroup ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static FooGroup ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static FooGroup ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static FooGroup ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static FooGroup ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private FooGroup 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(FooGroup prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Builder : pb::GeneratedBuilder<FooGroup, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(FooGroup cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private FooGroup result;
+
+ private FooGroup PrepareBuilder() {
+ if (resultIsReadOnly) {
+ FooGroup original = result;
+ result = new FooGroup();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override FooGroup 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.TestOneof2.Types.FooGroup.Descriptor; }
+ }
+
+ public override FooGroup DefaultInstanceForType {
+ get { return global::Google.ProtocolBuffers.TestProtos.TestOneof2.Types.FooGroup.DefaultInstance; }
+ }
+
+ public override FooGroup BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+ public override Builder MergeFrom(pb::IMessage other) {
+ if (other is FooGroup) {
+ return MergeFrom((FooGroup) other);
+ } else {
+ base.MergeFrom(other);
+ return this;
+ }
+ }
+
+ public override Builder MergeFrom(FooGroup other) {
+ if (other == global::Google.ProtocolBuffers.TestProtos.TestOneof2.Types.FooGroup.DefaultInstance) return this;
+ PrepareBuilder();
+ if (other.HasA) {
+ A = other.A;
+ }
+ if (other.HasB) {
+ B = other.B;
+ }
+ 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(_fooGroupFieldNames, field_name, global::System.StringComparer.Ordinal);
+ if(field_ordinal >= 0)
+ tag = _fooGroupFieldTags[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 72: {
+ result.hasA = input.ReadInt32(ref result.a_);
+ break;
+ }
+ case 82: {
+ result.hasB = input.ReadString(ref result.b_);
+ break;
+ }
+ }
+ }
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
+ }
+
+
+ public bool HasA {
+ get { return result.hasA; }
+ }
+ public int A {
+ get { return result.A; }
+ set { SetA(value); }
+ }
+ public Builder SetA(int value) {
+ PrepareBuilder();
+ result.hasA = true;
+ result.a_ = value;
+ return this;
+ }
+ public Builder ClearA() {
+ PrepareBuilder();
+ result.hasA = false;
+ result.a_ = 0;
+ return this;
+ }
+
+ public bool HasB {
+ get { return result.hasB; }
+ }
+ public string B {
+ get { return result.B; }
+ set { SetB(value); }
+ }
+ public Builder SetB(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasB = true;
+ result.b_ = value;
+ return this;
+ }
+ public Builder ClearB() {
+ PrepareBuilder();
+ result.hasB = false;
+ result.b_ = "";
+ return this;
+ }
+ }
+ static FooGroup() {
+ object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor, null);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class NestedMessage : pb::GeneratedMessage<NestedMessage, NestedMessage.Builder> {
+ private NestedMessage() { }
+ private static readonly NestedMessage defaultInstance = new NestedMessage().MakeReadOnly();
+ private static readonly string[] _nestedMessageFieldNames = new string[] { "corge_int", "qux_int" };
+ private static readonly uint[] _nestedMessageFieldTags = new uint[] { 16, 8 };
+ public static NestedMessage DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override NestedMessage DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override NestedMessage ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestOneof2_NestedMessage__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<NestedMessage, NestedMessage.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestOneof2_NestedMessage__FieldAccessorTable; }
+ }
+
+ public const int QuxIntFieldNumber = 1;
+ private bool hasQuxInt;
+ private long quxInt_;
+ public bool HasQuxInt {
+ get { return hasQuxInt; }
+ }
+ public long QuxInt {
+ get { return quxInt_; }
+ }
+
+ public const int CorgeIntFieldNumber = 2;
+ private pbc::PopsicleList<int> corgeInt_ = new pbc::PopsicleList<int>();
+ public scg::IList<int> CorgeIntList {
+ get { return pbc::Lists.AsReadOnly(corgeInt_); }
+ }
+ public int CorgeIntCount {
+ get { return corgeInt_.Count; }
+ }
+ public int GetCorgeInt(int index) {
+ return corgeInt_[index];
+ }
+
+ public override bool IsInitialized {
+ get {
+ return true;
+ }
+ }
+
+ public override void WriteTo(pb::ICodedOutputStream output) {
+ CalcSerializedSize();
+ string[] field_names = _nestedMessageFieldNames;
+ if (hasQuxInt) {
+ output.WriteInt64(1, field_names[1], QuxInt);
+ }
+ if (corgeInt_.Count > 0) {
+ output.WriteInt32Array(2, field_names[0], corgeInt_);
+ }
+ UnknownFields.WriteTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public override int SerializedSize {
+ get {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+ return CalcSerializedSize();
+ }
+ }
+
+ private int CalcSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (hasQuxInt) {
+ size += pb::CodedOutputStream.ComputeInt64Size(1, QuxInt);
+ }
+ {
+ int dataSize = 0;
+ foreach (int element in CorgeIntList) {
+ dataSize += pb::CodedOutputStream.ComputeInt32SizeNoTag(element);
+ }
+ size += dataSize;
+ size += 1 * corgeInt_.Count;
+ }
+ size += UnknownFields.SerializedSize;
+ memoizedSerializedSize = size;
+ return size;
+ }
+ public static NestedMessage ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static NestedMessage ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static NestedMessage ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static NestedMessage ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static NestedMessage ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static NestedMessage ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static NestedMessage ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static NestedMessage ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static NestedMessage ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static NestedMessage ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private NestedMessage MakeReadOnly() {
+ corgeInt_.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(NestedMessage prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Builder : pb::GeneratedBuilder<NestedMessage, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(NestedMessage cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private NestedMessage result;
+
+ private NestedMessage PrepareBuilder() {
+ if (resultIsReadOnly) {
+ NestedMessage original = result;
+ result = new NestedMessage();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override NestedMessage 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.TestOneof2.Types.NestedMessage.Descriptor; }
+ }
+
+ public override NestedMessage DefaultInstanceForType {
+ get { return global::Google.ProtocolBuffers.TestProtos.TestOneof2.Types.NestedMessage.DefaultInstance; }
+ }
+
+ public override NestedMessage BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+ public override Builder MergeFrom(pb::IMessage other) {
+ if (other is NestedMessage) {
+ return MergeFrom((NestedMessage) other);
+ } else {
+ base.MergeFrom(other);
+ return this;
+ }
+ }
+
+ public override Builder MergeFrom(NestedMessage other) {
+ if (other == global::Google.ProtocolBuffers.TestProtos.TestOneof2.Types.NestedMessage.DefaultInstance) return this;
+ PrepareBuilder();
+ if (other.HasQuxInt) {
+ QuxInt = other.QuxInt;
+ }
+ if (other.corgeInt_.Count != 0) {
+ result.corgeInt_.Add(other.corgeInt_);
+ }
+ 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(_nestedMessageFieldNames, field_name, global::System.StringComparer.Ordinal);
+ if(field_ordinal >= 0)
+ tag = _nestedMessageFieldTags[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.hasQuxInt = input.ReadInt64(ref result.quxInt_);
+ break;
+ }
+ case 18:
+ case 16: {
+ input.ReadInt32Array(tag, field_name, result.corgeInt_);
+ break;
+ }
+ }
+ }
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
+ }
+
+
+ public bool HasQuxInt {
+ get { return result.hasQuxInt; }
+ }
+ public long QuxInt {
+ get { return result.QuxInt; }
+ set { SetQuxInt(value); }
+ }
+ public Builder SetQuxInt(long value) {
+ PrepareBuilder();
+ result.hasQuxInt = true;
+ result.quxInt_ = value;
+ return this;
+ }
+ public Builder ClearQuxInt() {
+ PrepareBuilder();
+ result.hasQuxInt = false;
+ result.quxInt_ = 0L;
+ return this;
+ }
+
+ public pbc::IPopsicleList<int> CorgeIntList {
+ get { return PrepareBuilder().corgeInt_; }
+ }
+ public int CorgeIntCount {
+ get { return result.CorgeIntCount; }
+ }
+ public int GetCorgeInt(int index) {
+ return result.GetCorgeInt(index);
+ }
+ public Builder SetCorgeInt(int index, int value) {
+ PrepareBuilder();
+ result.corgeInt_[index] = value;
+ return this;
+ }
+ public Builder AddCorgeInt(int value) {
+ PrepareBuilder();
+ result.corgeInt_.Add(value);
+ return this;
+ }
+ public Builder AddRangeCorgeInt(scg::IEnumerable<int> values) {
+ PrepareBuilder();
+ result.corgeInt_.Add(values);
+ return this;
+ }
+ public Builder ClearCorgeInt() {
+ PrepareBuilder();
+ result.corgeInt_.Clear();
+ return this;
+ }
+ }
+ static NestedMessage() {
+ object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor, null);
+ }
+ }
+
+ }
+ #endregion
+
+ public const int FooIntFieldNumber = 1;
+ private bool hasFooInt;
+ private int fooInt_;
+ public bool HasFooInt {
+ get { return hasFooInt; }
+ }
+ public int FooInt {
+ get { return fooInt_; }
+ }
+
+ public const int FooStringFieldNumber = 2;
+ private bool hasFooString;
+ private string fooString_ = "";
+ public bool HasFooString {
+ get { return hasFooString; }
+ }
+ public string FooString {
+ get { return fooString_; }
+ }
+
+ public const int FooCordFieldNumber = 3;
+ private bool hasFooCord;
+ private string fooCord_ = "";
+ public bool HasFooCord {
+ get { return hasFooCord; }
+ }
+ public string FooCord {
+ get { return fooCord_; }
+ }
+
+ public const int FooStringPieceFieldNumber = 4;
+ private bool hasFooStringPiece;
+ private string fooStringPiece_ = "";
+ public bool HasFooStringPiece {
+ get { return hasFooStringPiece; }
+ }
+ public string FooStringPiece {
+ get { return fooStringPiece_; }
+ }
+
+ public const int FooBytesFieldNumber = 5;
+ private bool hasFooBytes;
+ private pb::ByteString fooBytes_ = pb::ByteString.Empty;
+ public bool HasFooBytes {
+ get { return hasFooBytes; }
+ }
+ public pb::ByteString FooBytes {
+ get { return fooBytes_; }
+ }
+
+ public const int FooEnumFieldNumber = 6;
+ private bool hasFooEnum;
+ private global::Google.ProtocolBuffers.TestProtos.TestOneof2.Types.NestedEnum fooEnum_ = global::Google.ProtocolBuffers.TestProtos.TestOneof2.Types.NestedEnum.FOO;
+ public bool HasFooEnum {
+ get { return hasFooEnum; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestOneof2.Types.NestedEnum FooEnum {
+ get { return fooEnum_; }
+ }
+
+ public const int FooMessageFieldNumber = 7;
+ private bool hasFooMessage;
+ private global::Google.ProtocolBuffers.TestProtos.TestOneof2.Types.NestedMessage fooMessage_;
+ public bool HasFooMessage {
+ get { return hasFooMessage; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestOneof2.Types.NestedMessage FooMessage {
+ get { return fooMessage_ ?? global::Google.ProtocolBuffers.TestProtos.TestOneof2.Types.NestedMessage.DefaultInstance; }
+ }
+
+ public const int FooGroupFieldNumber = 8;
+ private bool hasFooGroup;
+ private global::Google.ProtocolBuffers.TestProtos.TestOneof2.Types.FooGroup fooGroup_;
+ public bool HasFooGroup {
+ get { return hasFooGroup; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestOneof2.Types.FooGroup FooGroup {
+ get { return fooGroup_ ?? global::Google.ProtocolBuffers.TestProtos.TestOneof2.Types.FooGroup.DefaultInstance; }
+ }
+
+ public const int FooLazyMessageFieldNumber = 11;
+ private bool hasFooLazyMessage;
+ private global::Google.ProtocolBuffers.TestProtos.TestOneof2.Types.NestedMessage fooLazyMessage_;
+ public bool HasFooLazyMessage {
+ get { return hasFooLazyMessage; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestOneof2.Types.NestedMessage FooLazyMessage {
+ get { return fooLazyMessage_ ?? global::Google.ProtocolBuffers.TestProtos.TestOneof2.Types.NestedMessage.DefaultInstance; }
+ }
+
+ public const int BarIntFieldNumber = 12;
+ private bool hasBarInt;
+ private int barInt_ = 5;
+ public bool HasBarInt {
+ get { return hasBarInt; }
+ }
+ public int BarInt {
+ get { return barInt_; }
+ }
+
+ public const int BarStringFieldNumber = 13;
+ private bool hasBarString;
+ private string barString_ = "STRING";
+ public bool HasBarString {
+ get { return hasBarString; }
+ }
+ public string BarString {
+ get { return barString_; }
+ }
+
+ public const int BarCordFieldNumber = 14;
+ private bool hasBarCord;
+ private string barCord_ = "CORD";
+ public bool HasBarCord {
+ get { return hasBarCord; }
+ }
+ public string BarCord {
+ get { return barCord_; }
+ }
+
+ public const int BarStringPieceFieldNumber = 15;
+ private bool hasBarStringPiece;
+ private string barStringPiece_ = "SPIECE";
+ public bool HasBarStringPiece {
+ get { return hasBarStringPiece; }
+ }
+ public string BarStringPiece {
+ get { return barStringPiece_; }
+ }
+
+ public const int BarBytesFieldNumber = 16;
+ private bool hasBarBytes;
+ private pb::ByteString barBytes_ = (pb::ByteString) global::Google.ProtocolBuffers.TestProtos.TestOneof2.Descriptor.Fields[13].DefaultValue;
+ public bool HasBarBytes {
+ get { return hasBarBytes; }
+ }
+ public pb::ByteString BarBytes {
+ get { return barBytes_; }
+ }
+
+ public const int BarEnumFieldNumber = 17;
+ private bool hasBarEnum;
+ private global::Google.ProtocolBuffers.TestProtos.TestOneof2.Types.NestedEnum barEnum_ = global::Google.ProtocolBuffers.TestProtos.TestOneof2.Types.NestedEnum.BAR;
+ public bool HasBarEnum {
+ get { return hasBarEnum; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestOneof2.Types.NestedEnum BarEnum {
+ get { return barEnum_; }
+ }
+
+ public const int BazIntFieldNumber = 18;
+ private bool hasBazInt;
+ private int bazInt_;
+ public bool HasBazInt {
+ get { return hasBazInt; }
+ }
+ public int BazInt {
+ get { return bazInt_; }
+ }
+
+ public const int BazStringFieldNumber = 19;
+ private bool hasBazString;
+ private string bazString_ = "BAZ";
+ public bool HasBazString {
+ get { return hasBazString; }
+ }
+ public string BazString {
+ get { return bazString_; }
+ }
+
+ public override bool IsInitialized {
+ get {
+ return true;
+ }
+ }
+
+ public override void WriteTo(pb::ICodedOutputStream output) {
+ CalcSerializedSize();
+ string[] field_names = _testOneof2FieldNames;
+ if (hasFooInt) {
+ output.WriteInt32(1, field_names[11], FooInt);
+ }
+ if (hasFooString) {
+ output.WriteString(2, field_names[14], FooString);
+ }
+ if (hasFooCord) {
+ output.WriteString(3, field_names[9], FooCord);
+ }
+ if (hasFooStringPiece) {
+ output.WriteString(4, field_names[15], FooStringPiece);
+ }
+ if (hasFooBytes) {
+ output.WriteBytes(5, field_names[8], FooBytes);
+ }
+ if (hasFooEnum) {
+ output.WriteEnum(6, field_names[10], (int) FooEnum, FooEnum);
+ }
+ if (hasFooMessage) {
+ output.WriteMessage(7, field_names[13], FooMessage);
+ }
+ if (hasFooGroup) {
+ output.WriteGroup(8, field_names[16], FooGroup);
+ }
+ if (hasFooLazyMessage) {
+ output.WriteMessage(11, field_names[12], FooLazyMessage);
+ }
+ if (hasBarInt) {
+ output.WriteInt32(12, field_names[3], BarInt);
+ }
+ if (hasBarString) {
+ output.WriteString(13, field_names[4], BarString);
+ }
+ if (hasBarCord) {
+ output.WriteString(14, field_names[1], BarCord);
+ }
+ if (hasBarStringPiece) {
+ output.WriteString(15, field_names[5], BarStringPiece);
+ }
+ if (hasBarBytes) {
+ output.WriteBytes(16, field_names[0], BarBytes);
+ }
+ if (hasBarEnum) {
+ output.WriteEnum(17, field_names[2], (int) BarEnum, BarEnum);
+ }
+ if (hasBazInt) {
+ output.WriteInt32(18, field_names[6], BazInt);
+ }
+ if (hasBazString) {
+ output.WriteString(19, field_names[7], BazString);
+ }
+ UnknownFields.WriteTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public override int SerializedSize {
+ get {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+ return CalcSerializedSize();
+ }
+ }
+
+ private int CalcSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (hasFooInt) {
+ size += pb::CodedOutputStream.ComputeInt32Size(1, FooInt);
+ }
+ if (hasFooString) {
+ size += pb::CodedOutputStream.ComputeStringSize(2, FooString);
+ }
+ if (hasFooCord) {
+ size += pb::CodedOutputStream.ComputeStringSize(3, FooCord);
+ }
+ if (hasFooStringPiece) {
+ size += pb::CodedOutputStream.ComputeStringSize(4, FooStringPiece);
+ }
+ if (hasFooBytes) {
+ size += pb::CodedOutputStream.ComputeBytesSize(5, FooBytes);
+ }
+ if (hasFooEnum) {
+ size += pb::CodedOutputStream.ComputeEnumSize(6, (int) FooEnum);
+ }
+ if (hasFooMessage) {
+ size += pb::CodedOutputStream.ComputeMessageSize(7, FooMessage);
+ }
+ if (hasFooGroup) {
+ size += pb::CodedOutputStream.ComputeGroupSize(8, FooGroup);
+ }
+ if (hasFooLazyMessage) {
+ size += pb::CodedOutputStream.ComputeMessageSize(11, FooLazyMessage);
+ }
+ if (hasBarInt) {
+ size += pb::CodedOutputStream.ComputeInt32Size(12, BarInt);
+ }
+ if (hasBarString) {
+ size += pb::CodedOutputStream.ComputeStringSize(13, BarString);
+ }
+ if (hasBarCord) {
+ size += pb::CodedOutputStream.ComputeStringSize(14, BarCord);
+ }
+ if (hasBarStringPiece) {
+ size += pb::CodedOutputStream.ComputeStringSize(15, BarStringPiece);
+ }
+ if (hasBarBytes) {
+ size += pb::CodedOutputStream.ComputeBytesSize(16, BarBytes);
+ }
+ if (hasBarEnum) {
+ size += pb::CodedOutputStream.ComputeEnumSize(17, (int) BarEnum);
+ }
+ if (hasBazInt) {
+ size += pb::CodedOutputStream.ComputeInt32Size(18, BazInt);
+ }
+ if (hasBazString) {
+ size += pb::CodedOutputStream.ComputeStringSize(19, BazString);
+ }
+ size += UnknownFields.SerializedSize;
+ memoizedSerializedSize = size;
+ return size;
+ }
+ public static TestOneof2 ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static TestOneof2 ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static TestOneof2 ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static TestOneof2 ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static TestOneof2 ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static TestOneof2 ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static TestOneof2 ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static TestOneof2 ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static TestOneof2 ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static TestOneof2 ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private TestOneof2 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(TestOneof2 prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Builder : pb::GeneratedBuilder<TestOneof2, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(TestOneof2 cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private TestOneof2 result;
+
+ private TestOneof2 PrepareBuilder() {
+ if (resultIsReadOnly) {
+ TestOneof2 original = result;
+ result = new TestOneof2();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override TestOneof2 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.TestOneof2.Descriptor; }
+ }
+
+ public override TestOneof2 DefaultInstanceForType {
+ get { return global::Google.ProtocolBuffers.TestProtos.TestOneof2.DefaultInstance; }
+ }
+
+ public override TestOneof2 BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+ public override Builder MergeFrom(pb::IMessage other) {
+ if (other is TestOneof2) {
+ return MergeFrom((TestOneof2) other);
+ } else {
+ base.MergeFrom(other);
+ return this;
+ }
+ }
+
+ public override Builder MergeFrom(TestOneof2 other) {
+ if (other == global::Google.ProtocolBuffers.TestProtos.TestOneof2.DefaultInstance) return this;
+ PrepareBuilder();
+ if (other.HasFooInt) {
+ FooInt = other.FooInt;
+ }
+ if (other.HasFooString) {
+ FooString = other.FooString;
+ }
+ if (other.HasFooCord) {
+ FooCord = other.FooCord;
+ }
+ if (other.HasFooStringPiece) {
+ FooStringPiece = other.FooStringPiece;
+ }
+ if (other.HasFooBytes) {
+ FooBytes = other.FooBytes;
+ }
+ if (other.HasFooEnum) {
+ FooEnum = other.FooEnum;
+ }
+ if (other.HasFooMessage) {
+ MergeFooMessage(other.FooMessage);
+ }
+ if (other.HasFooGroup) {
+ MergeFooGroup(other.FooGroup);
+ }
+ if (other.HasFooLazyMessage) {
+ MergeFooLazyMessage(other.FooLazyMessage);
+ }
+ if (other.HasBarInt) {
+ BarInt = other.BarInt;
+ }
+ if (other.HasBarString) {
+ BarString = other.BarString;
+ }
+ if (other.HasBarCord) {
+ BarCord = other.BarCord;
+ }
+ if (other.HasBarStringPiece) {
+ BarStringPiece = other.BarStringPiece;
+ }
+ if (other.HasBarBytes) {
+ BarBytes = other.BarBytes;
+ }
+ if (other.HasBarEnum) {
+ BarEnum = other.BarEnum;
+ }
+ if (other.HasBazInt) {
+ BazInt = other.BazInt;
+ }
+ if (other.HasBazString) {
+ BazString = other.BazString;
+ }
+ 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(_testOneof2FieldNames, field_name, global::System.StringComparer.Ordinal);
+ if(field_ordinal >= 0)
+ tag = _testOneof2FieldTags[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.hasFooInt = input.ReadInt32(ref result.fooInt_);
+ break;
+ }
+ case 18: {
+ result.hasFooString = input.ReadString(ref result.fooString_);
+ break;
+ }
+ case 26: {
+ result.hasFooCord = input.ReadString(ref result.fooCord_);
+ break;
+ }
+ case 34: {
+ result.hasFooStringPiece = input.ReadString(ref result.fooStringPiece_);
+ break;
+ }
+ case 42: {
+ result.hasFooBytes = input.ReadBytes(ref result.fooBytes_);
+ break;
+ }
+ case 48: {
+ object unknown;
+ if(input.ReadEnum(ref result.fooEnum_, out unknown)) {
+ result.hasFooEnum = true;
+ } else if(unknown is int) {
+ if (unknownFields == null) {
+ unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+ }
+ unknownFields.MergeVarintField(6, (ulong)(int)unknown);
+ }
+ break;
+ }
+ case 58: {
+ global::Google.ProtocolBuffers.TestProtos.TestOneof2.Types.NestedMessage.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.TestOneof2.Types.NestedMessage.CreateBuilder();
+ if (result.hasFooMessage) {
+ subBuilder.MergeFrom(FooMessage);
+ }
+ input.ReadMessage(subBuilder, extensionRegistry);
+ FooMessage = subBuilder.BuildPartial();
+ break;
+ }
+ case 67: {
+ global::Google.ProtocolBuffers.TestProtos.TestOneof2.Types.FooGroup.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.TestOneof2.Types.FooGroup.CreateBuilder();
+ if (result.hasFooGroup) {
+ subBuilder.MergeFrom(FooGroup);
+ }
+ input.ReadGroup(8, subBuilder, extensionRegistry);
+ FooGroup = subBuilder.BuildPartial();
+ break;
+ }
+ case 90: {
+ global::Google.ProtocolBuffers.TestProtos.TestOneof2.Types.NestedMessage.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.TestOneof2.Types.NestedMessage.CreateBuilder();
+ if (result.hasFooLazyMessage) {
+ subBuilder.MergeFrom(FooLazyMessage);
+ }
+ input.ReadMessage(subBuilder, extensionRegistry);
+ FooLazyMessage = subBuilder.BuildPartial();
+ break;
+ }
+ case 96: {
+ result.hasBarInt = input.ReadInt32(ref result.barInt_);
+ break;
+ }
+ case 106: {
+ result.hasBarString = input.ReadString(ref result.barString_);
+ break;
+ }
+ case 114: {
+ result.hasBarCord = input.ReadString(ref result.barCord_);
+ break;
+ }
+ case 122: {
+ result.hasBarStringPiece = input.ReadString(ref result.barStringPiece_);
+ break;
+ }
+ case 130: {
+ result.hasBarBytes = input.ReadBytes(ref result.barBytes_);
+ break;
+ }
+ case 136: {
+ object unknown;
+ if(input.ReadEnum(ref result.barEnum_, out unknown)) {
+ result.hasBarEnum = true;
+ } else if(unknown is int) {
+ if (unknownFields == null) {
+ unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+ }
+ unknownFields.MergeVarintField(17, (ulong)(int)unknown);
+ }
+ break;
+ }
+ case 144: {
+ result.hasBazInt = input.ReadInt32(ref result.bazInt_);
+ break;
+ }
+ case 154: {
+ result.hasBazString = input.ReadString(ref result.bazString_);
+ break;
+ }
+ }
+ }
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
+ }
+
+
+ public bool HasFooInt {
+ get { return result.hasFooInt; }
+ }
+ public int FooInt {
+ get { return result.FooInt; }
+ set { SetFooInt(value); }
+ }
+ public Builder SetFooInt(int value) {
+ PrepareBuilder();
+ result.hasFooInt = true;
+ result.fooInt_ = value;
+ return this;
+ }
+ public Builder ClearFooInt() {
+ PrepareBuilder();
+ result.hasFooInt = false;
+ result.fooInt_ = 0;
+ return this;
+ }
+
+ public bool HasFooString {
+ get { return result.hasFooString; }
+ }
+ public string FooString {
+ get { return result.FooString; }
+ set { SetFooString(value); }
+ }
+ public Builder SetFooString(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasFooString = true;
+ result.fooString_ = value;
+ return this;
+ }
+ public Builder ClearFooString() {
+ PrepareBuilder();
+ result.hasFooString = false;
+ result.fooString_ = "";
+ return this;
+ }
+
+ public bool HasFooCord {
+ get { return result.hasFooCord; }
+ }
+ public string FooCord {
+ get { return result.FooCord; }
+ set { SetFooCord(value); }
+ }
+ public Builder SetFooCord(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasFooCord = true;
+ result.fooCord_ = value;
+ return this;
+ }
+ public Builder ClearFooCord() {
+ PrepareBuilder();
+ result.hasFooCord = false;
+ result.fooCord_ = "";
+ return this;
+ }
+
+ public bool HasFooStringPiece {
+ get { return result.hasFooStringPiece; }
+ }
+ public string FooStringPiece {
+ get { return result.FooStringPiece; }
+ set { SetFooStringPiece(value); }
+ }
+ public Builder SetFooStringPiece(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasFooStringPiece = true;
+ result.fooStringPiece_ = value;
+ return this;
+ }
+ public Builder ClearFooStringPiece() {
+ PrepareBuilder();
+ result.hasFooStringPiece = false;
+ result.fooStringPiece_ = "";
+ return this;
+ }
+
+ public bool HasFooBytes {
+ get { return result.hasFooBytes; }
+ }
+ public pb::ByteString FooBytes {
+ get { return result.FooBytes; }
+ set { SetFooBytes(value); }
+ }
+ public Builder SetFooBytes(pb::ByteString value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasFooBytes = true;
+ result.fooBytes_ = value;
+ return this;
+ }
+ public Builder ClearFooBytes() {
+ PrepareBuilder();
+ result.hasFooBytes = false;
+ result.fooBytes_ = pb::ByteString.Empty;
+ return this;
+ }
+
+ public bool HasFooEnum {
+ get { return result.hasFooEnum; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestOneof2.Types.NestedEnum FooEnum {
+ get { return result.FooEnum; }
+ set { SetFooEnum(value); }
+ }
+ public Builder SetFooEnum(global::Google.ProtocolBuffers.TestProtos.TestOneof2.Types.NestedEnum value) {
+ PrepareBuilder();
+ result.hasFooEnum = true;
+ result.fooEnum_ = value;
+ return this;
+ }
+ public Builder ClearFooEnum() {
+ PrepareBuilder();
+ result.hasFooEnum = false;
+ result.fooEnum_ = global::Google.ProtocolBuffers.TestProtos.TestOneof2.Types.NestedEnum.FOO;
+ return this;
+ }
+
+ public bool HasFooMessage {
+ get { return result.hasFooMessage; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestOneof2.Types.NestedMessage FooMessage {
+ get { return result.FooMessage; }
+ set { SetFooMessage(value); }
+ }
+ public Builder SetFooMessage(global::Google.ProtocolBuffers.TestProtos.TestOneof2.Types.NestedMessage value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasFooMessage = true;
+ result.fooMessage_ = value;
+ return this;
+ }
+ public Builder SetFooMessage(global::Google.ProtocolBuffers.TestProtos.TestOneof2.Types.NestedMessage.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.hasFooMessage = true;
+ result.fooMessage_ = builderForValue.Build();
+ return this;
+ }
+ public Builder MergeFooMessage(global::Google.ProtocolBuffers.TestProtos.TestOneof2.Types.NestedMessage value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ if (result.hasFooMessage &&
+ result.fooMessage_ != global::Google.ProtocolBuffers.TestProtos.TestOneof2.Types.NestedMessage.DefaultInstance) {
+ result.fooMessage_ = global::Google.ProtocolBuffers.TestProtos.TestOneof2.Types.NestedMessage.CreateBuilder(result.fooMessage_).MergeFrom(value).BuildPartial();
+ } else {
+ result.fooMessage_ = value;
+ }
+ result.hasFooMessage = true;
+ return this;
+ }
+ public Builder ClearFooMessage() {
+ PrepareBuilder();
+ result.hasFooMessage = false;
+ result.fooMessage_ = null;
+ return this;
+ }
+
+ public bool HasFooGroup {
+ get { return result.hasFooGroup; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestOneof2.Types.FooGroup FooGroup {
+ get { return result.FooGroup; }
+ set { SetFooGroup(value); }
+ }
+ public Builder SetFooGroup(global::Google.ProtocolBuffers.TestProtos.TestOneof2.Types.FooGroup value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasFooGroup = true;
+ result.fooGroup_ = value;
+ return this;
+ }
+ public Builder SetFooGroup(global::Google.ProtocolBuffers.TestProtos.TestOneof2.Types.FooGroup.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.hasFooGroup = true;
+ result.fooGroup_ = builderForValue.Build();
+ return this;
+ }
+ public Builder MergeFooGroup(global::Google.ProtocolBuffers.TestProtos.TestOneof2.Types.FooGroup value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ if (result.hasFooGroup &&
+ result.fooGroup_ != global::Google.ProtocolBuffers.TestProtos.TestOneof2.Types.FooGroup.DefaultInstance) {
+ result.fooGroup_ = global::Google.ProtocolBuffers.TestProtos.TestOneof2.Types.FooGroup.CreateBuilder(result.fooGroup_).MergeFrom(value).BuildPartial();
+ } else {
+ result.fooGroup_ = value;
+ }
+ result.hasFooGroup = true;
+ return this;
+ }
+ public Builder ClearFooGroup() {
+ PrepareBuilder();
+ result.hasFooGroup = false;
+ result.fooGroup_ = null;
+ return this;
+ }
+
+ public bool HasFooLazyMessage {
+ get { return result.hasFooLazyMessage; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestOneof2.Types.NestedMessage FooLazyMessage {
+ get { return result.FooLazyMessage; }
+ set { SetFooLazyMessage(value); }
+ }
+ public Builder SetFooLazyMessage(global::Google.ProtocolBuffers.TestProtos.TestOneof2.Types.NestedMessage value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasFooLazyMessage = true;
+ result.fooLazyMessage_ = value;
+ return this;
+ }
+ public Builder SetFooLazyMessage(global::Google.ProtocolBuffers.TestProtos.TestOneof2.Types.NestedMessage.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.hasFooLazyMessage = true;
+ result.fooLazyMessage_ = builderForValue.Build();
+ return this;
+ }
+ public Builder MergeFooLazyMessage(global::Google.ProtocolBuffers.TestProtos.TestOneof2.Types.NestedMessage value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ if (result.hasFooLazyMessage &&
+ result.fooLazyMessage_ != global::Google.ProtocolBuffers.TestProtos.TestOneof2.Types.NestedMessage.DefaultInstance) {
+ result.fooLazyMessage_ = global::Google.ProtocolBuffers.TestProtos.TestOneof2.Types.NestedMessage.CreateBuilder(result.fooLazyMessage_).MergeFrom(value).BuildPartial();
+ } else {
+ result.fooLazyMessage_ = value;
+ }
+ result.hasFooLazyMessage = true;
+ return this;
+ }
+ public Builder ClearFooLazyMessage() {
+ PrepareBuilder();
+ result.hasFooLazyMessage = false;
+ result.fooLazyMessage_ = null;
+ return this;
+ }
+
+ public bool HasBarInt {
+ get { return result.hasBarInt; }
+ }
+ public int BarInt {
+ get { return result.BarInt; }
+ set { SetBarInt(value); }
+ }
+ public Builder SetBarInt(int value) {
+ PrepareBuilder();
+ result.hasBarInt = true;
+ result.barInt_ = value;
+ return this;
+ }
+ public Builder ClearBarInt() {
+ PrepareBuilder();
+ result.hasBarInt = false;
+ result.barInt_ = 5;
+ return this;
+ }
+
+ public bool HasBarString {
+ get { return result.hasBarString; }
+ }
+ public string BarString {
+ get { return result.BarString; }
+ set { SetBarString(value); }
+ }
+ public Builder SetBarString(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasBarString = true;
+ result.barString_ = value;
+ return this;
+ }
+ public Builder ClearBarString() {
+ PrepareBuilder();
+ result.hasBarString = false;
+ result.barString_ = "STRING";
+ return this;
+ }
+
+ public bool HasBarCord {
+ get { return result.hasBarCord; }
+ }
+ public string BarCord {
+ get { return result.BarCord; }
+ set { SetBarCord(value); }
+ }
+ public Builder SetBarCord(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasBarCord = true;
+ result.barCord_ = value;
+ return this;
+ }
+ public Builder ClearBarCord() {
+ PrepareBuilder();
+ result.hasBarCord = false;
+ result.barCord_ = "CORD";
+ return this;
+ }
+
+ public bool HasBarStringPiece {
+ get { return result.hasBarStringPiece; }
+ }
+ public string BarStringPiece {
+ get { return result.BarStringPiece; }
+ set { SetBarStringPiece(value); }
+ }
+ public Builder SetBarStringPiece(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasBarStringPiece = true;
+ result.barStringPiece_ = value;
+ return this;
+ }
+ public Builder ClearBarStringPiece() {
+ PrepareBuilder();
+ result.hasBarStringPiece = false;
+ result.barStringPiece_ = "SPIECE";
+ return this;
+ }
+
+ public bool HasBarBytes {
+ get { return result.hasBarBytes; }
+ }
+ public pb::ByteString BarBytes {
+ get { return result.BarBytes; }
+ set { SetBarBytes(value); }
+ }
+ public Builder SetBarBytes(pb::ByteString value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasBarBytes = true;
+ result.barBytes_ = value;
+ return this;
+ }
+ public Builder ClearBarBytes() {
+ PrepareBuilder();
+ result.hasBarBytes = false;
+ result.barBytes_ = (pb::ByteString) global::Google.ProtocolBuffers.TestProtos.TestOneof2.Descriptor.Fields[13].DefaultValue;
+ return this;
+ }
+
+ public bool HasBarEnum {
+ get { return result.hasBarEnum; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestOneof2.Types.NestedEnum BarEnum {
+ get { return result.BarEnum; }
+ set { SetBarEnum(value); }
+ }
+ public Builder SetBarEnum(global::Google.ProtocolBuffers.TestProtos.TestOneof2.Types.NestedEnum value) {
+ PrepareBuilder();
+ result.hasBarEnum = true;
+ result.barEnum_ = value;
+ return this;
+ }
+ public Builder ClearBarEnum() {
+ PrepareBuilder();
+ result.hasBarEnum = false;
+ result.barEnum_ = global::Google.ProtocolBuffers.TestProtos.TestOneof2.Types.NestedEnum.BAR;
+ return this;
+ }
+
+ public bool HasBazInt {
+ get { return result.hasBazInt; }
+ }
+ public int BazInt {
+ get { return result.BazInt; }
+ set { SetBazInt(value); }
+ }
+ public Builder SetBazInt(int value) {
+ PrepareBuilder();
+ result.hasBazInt = true;
+ result.bazInt_ = value;
+ return this;
+ }
+ public Builder ClearBazInt() {
+ PrepareBuilder();
+ result.hasBazInt = false;
+ result.bazInt_ = 0;
+ return this;
+ }
+
+ public bool HasBazString {
+ get { return result.hasBazString; }
+ }
+ public string BazString {
+ get { return result.BazString; }
+ set { SetBazString(value); }
+ }
+ public Builder SetBazString(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasBazString = true;
+ result.bazString_ = value;
+ return this;
+ }
+ public Builder ClearBazString() {
+ PrepareBuilder();
+ result.hasBazString = false;
+ result.bazString_ = "BAZ";
+ return this;
+ }
+ }
+ static TestOneof2() {
+ object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor, null);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class TestRequiredOneof : pb::GeneratedMessage<TestRequiredOneof, TestRequiredOneof.Builder> {
+ private TestRequiredOneof() { }
+ private static readonly TestRequiredOneof defaultInstance = new TestRequiredOneof().MakeReadOnly();
+ private static readonly string[] _testRequiredOneofFieldNames = new string[] { "foo_int", "foo_message", "foo_string" };
+ private static readonly uint[] _testRequiredOneofFieldTags = new uint[] { 8, 26, 18 };
+ public static TestRequiredOneof DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override TestRequiredOneof DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override TestRequiredOneof ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestRequiredOneof__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<TestRequiredOneof, TestRequiredOneof.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestRequiredOneof__FieldAccessorTable; }
+ }
+
+ #region Nested types
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public static partial class Types {
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class NestedMessage : pb::GeneratedMessage<NestedMessage, NestedMessage.Builder> {
+ private NestedMessage() { }
+ private static readonly NestedMessage defaultInstance = new NestedMessage().MakeReadOnly();
+ private static readonly string[] _nestedMessageFieldNames = new string[] { "required_double" };
+ private static readonly uint[] _nestedMessageFieldTags = new uint[] { 9 };
+ public static NestedMessage DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override NestedMessage DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override NestedMessage ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestRequiredOneof_NestedMessage__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<NestedMessage, NestedMessage.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestRequiredOneof_NestedMessage__FieldAccessorTable; }
+ }
+
+ public const int RequiredDoubleFieldNumber = 1;
+ private bool hasRequiredDouble;
+ private double requiredDouble_;
+ public bool HasRequiredDouble {
+ get { return hasRequiredDouble; }
+ }
+ public double RequiredDouble {
+ get { return requiredDouble_; }
+ }
+
+ public override bool IsInitialized {
+ get {
+ if (!hasRequiredDouble) return false;
+ return true;
+ }
+ }
+
+ public override void WriteTo(pb::ICodedOutputStream output) {
+ CalcSerializedSize();
+ string[] field_names = _nestedMessageFieldNames;
+ if (hasRequiredDouble) {
+ output.WriteDouble(1, field_names[0], RequiredDouble);
+ }
+ UnknownFields.WriteTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public override int SerializedSize {
+ get {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+ return CalcSerializedSize();
+ }
+ }
+
+ private int CalcSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (hasRequiredDouble) {
+ size += pb::CodedOutputStream.ComputeDoubleSize(1, RequiredDouble);
+ }
+ size += UnknownFields.SerializedSize;
+ memoizedSerializedSize = size;
+ return size;
+ }
+ public static NestedMessage ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static NestedMessage ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static NestedMessage ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static NestedMessage ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static NestedMessage ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static NestedMessage ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static NestedMessage ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static NestedMessage ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static NestedMessage ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static NestedMessage ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private NestedMessage 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(NestedMessage prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Builder : pb::GeneratedBuilder<NestedMessage, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(NestedMessage cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private NestedMessage result;
+
+ private NestedMessage PrepareBuilder() {
+ if (resultIsReadOnly) {
+ NestedMessage original = result;
+ result = new NestedMessage();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override NestedMessage 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.TestRequiredOneof.Types.NestedMessage.Descriptor; }
+ }
+
+ public override NestedMessage DefaultInstanceForType {
+ get { return global::Google.ProtocolBuffers.TestProtos.TestRequiredOneof.Types.NestedMessage.DefaultInstance; }
+ }
+
+ public override NestedMessage BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+ public override Builder MergeFrom(pb::IMessage other) {
+ if (other is NestedMessage) {
+ return MergeFrom((NestedMessage) other);
+ } else {
+ base.MergeFrom(other);
+ return this;
+ }
+ }
+
+ public override Builder MergeFrom(NestedMessage other) {
+ if (other == global::Google.ProtocolBuffers.TestProtos.TestRequiredOneof.Types.NestedMessage.DefaultInstance) return this;
+ PrepareBuilder();
+ if (other.HasRequiredDouble) {
+ RequiredDouble = other.RequiredDouble;
+ }
+ 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(_nestedMessageFieldNames, field_name, global::System.StringComparer.Ordinal);
+ if(field_ordinal >= 0)
+ tag = _nestedMessageFieldTags[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 9: {
+ result.hasRequiredDouble = input.ReadDouble(ref result.requiredDouble_);
+ break;
+ }
+ }
+ }
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
+ }
+
+
+ public bool HasRequiredDouble {
+ get { return result.hasRequiredDouble; }
+ }
+ public double RequiredDouble {
+ get { return result.RequiredDouble; }
+ set { SetRequiredDouble(value); }
+ }
+ public Builder SetRequiredDouble(double value) {
+ PrepareBuilder();
+ result.hasRequiredDouble = true;
+ result.requiredDouble_ = value;
+ return this;
+ }
+ public Builder ClearRequiredDouble() {
+ PrepareBuilder();
+ result.hasRequiredDouble = false;
+ result.requiredDouble_ = 0D;
+ return this;
+ }
+ }
+ static NestedMessage() {
+ object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor, null);
+ }
+ }
+
+ }
+ #endregion
+
+ public const int FooIntFieldNumber = 1;
+ private bool hasFooInt;
+ private int fooInt_;
+ public bool HasFooInt {
+ get { return hasFooInt; }
+ }
+ public int FooInt {
+ get { return fooInt_; }
+ }
+
+ public const int FooStringFieldNumber = 2;
+ private bool hasFooString;
+ private string fooString_ = "";
+ public bool HasFooString {
+ get { return hasFooString; }
+ }
+ public string FooString {
+ get { return fooString_; }
+ }
+
+ public const int FooMessageFieldNumber = 3;
+ private bool hasFooMessage;
+ private global::Google.ProtocolBuffers.TestProtos.TestRequiredOneof.Types.NestedMessage fooMessage_;
+ public bool HasFooMessage {
+ get { return hasFooMessage; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestRequiredOneof.Types.NestedMessage FooMessage {
+ get { return fooMessage_ ?? global::Google.ProtocolBuffers.TestProtos.TestRequiredOneof.Types.NestedMessage.DefaultInstance; }
+ }
+
+ public override bool IsInitialized {
+ get {
+ if (HasFooMessage) {
+ if (!FooMessage.IsInitialized) return false;
+ }
+ return true;
+ }
+ }
+
+ public override void WriteTo(pb::ICodedOutputStream output) {
+ CalcSerializedSize();
+ string[] field_names = _testRequiredOneofFieldNames;
+ if (hasFooInt) {
+ output.WriteInt32(1, field_names[0], FooInt);
+ }
+ if (hasFooString) {
+ output.WriteString(2, field_names[2], FooString);
+ }
+ if (hasFooMessage) {
+ output.WriteMessage(3, field_names[1], FooMessage);
+ }
+ UnknownFields.WriteTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public override int SerializedSize {
+ get {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+ return CalcSerializedSize();
+ }
+ }
+
+ private int CalcSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (hasFooInt) {
+ size += pb::CodedOutputStream.ComputeInt32Size(1, FooInt);
+ }
+ if (hasFooString) {
+ size += pb::CodedOutputStream.ComputeStringSize(2, FooString);
+ }
+ if (hasFooMessage) {
+ size += pb::CodedOutputStream.ComputeMessageSize(3, FooMessage);
+ }
+ size += UnknownFields.SerializedSize;
+ memoizedSerializedSize = size;
+ return size;
+ }
+ public static TestRequiredOneof ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static TestRequiredOneof ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static TestRequiredOneof ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static TestRequiredOneof ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static TestRequiredOneof ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static TestRequiredOneof ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static TestRequiredOneof ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static TestRequiredOneof ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static TestRequiredOneof ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static TestRequiredOneof ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private TestRequiredOneof 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(TestRequiredOneof prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Builder : pb::GeneratedBuilder<TestRequiredOneof, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(TestRequiredOneof cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private TestRequiredOneof result;
+
+ private TestRequiredOneof PrepareBuilder() {
+ if (resultIsReadOnly) {
+ TestRequiredOneof original = result;
+ result = new TestRequiredOneof();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override TestRequiredOneof 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.TestRequiredOneof.Descriptor; }
+ }
+
+ public override TestRequiredOneof DefaultInstanceForType {
+ get { return global::Google.ProtocolBuffers.TestProtos.TestRequiredOneof.DefaultInstance; }
+ }
+
+ public override TestRequiredOneof BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+ public override Builder MergeFrom(pb::IMessage other) {
+ if (other is TestRequiredOneof) {
+ return MergeFrom((TestRequiredOneof) other);
+ } else {
+ base.MergeFrom(other);
+ return this;
+ }
+ }
+
+ public override Builder MergeFrom(TestRequiredOneof other) {
+ if (other == global::Google.ProtocolBuffers.TestProtos.TestRequiredOneof.DefaultInstance) return this;
+ PrepareBuilder();
+ if (other.HasFooInt) {
+ FooInt = other.FooInt;
+ }
+ if (other.HasFooString) {
+ FooString = other.FooString;
+ }
+ if (other.HasFooMessage) {
+ MergeFooMessage(other.FooMessage);
+ }
+ 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(_testRequiredOneofFieldNames, field_name, global::System.StringComparer.Ordinal);
+ if(field_ordinal >= 0)
+ tag = _testRequiredOneofFieldTags[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.hasFooInt = input.ReadInt32(ref result.fooInt_);
+ break;
+ }
+ case 18: {
+ result.hasFooString = input.ReadString(ref result.fooString_);
+ break;
+ }
+ case 26: {
+ global::Google.ProtocolBuffers.TestProtos.TestRequiredOneof.Types.NestedMessage.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.TestRequiredOneof.Types.NestedMessage.CreateBuilder();
+ if (result.hasFooMessage) {
+ subBuilder.MergeFrom(FooMessage);
+ }
+ input.ReadMessage(subBuilder, extensionRegistry);
+ FooMessage = subBuilder.BuildPartial();
+ break;
+ }
+ }
+ }
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
+ }
+
+
+ public bool HasFooInt {
+ get { return result.hasFooInt; }
+ }
+ public int FooInt {
+ get { return result.FooInt; }
+ set { SetFooInt(value); }
+ }
+ public Builder SetFooInt(int value) {
+ PrepareBuilder();
+ result.hasFooInt = true;
+ result.fooInt_ = value;
+ return this;
+ }
+ public Builder ClearFooInt() {
+ PrepareBuilder();
+ result.hasFooInt = false;
+ result.fooInt_ = 0;
+ return this;
+ }
+
+ public bool HasFooString {
+ get { return result.hasFooString; }
+ }
+ public string FooString {
+ get { return result.FooString; }
+ set { SetFooString(value); }
+ }
+ public Builder SetFooString(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasFooString = true;
+ result.fooString_ = value;
+ return this;
+ }
+ public Builder ClearFooString() {
+ PrepareBuilder();
+ result.hasFooString = false;
+ result.fooString_ = "";
+ return this;
+ }
+
+ public bool HasFooMessage {
+ get { return result.hasFooMessage; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestRequiredOneof.Types.NestedMessage FooMessage {
+ get { return result.FooMessage; }
+ set { SetFooMessage(value); }
+ }
+ public Builder SetFooMessage(global::Google.ProtocolBuffers.TestProtos.TestRequiredOneof.Types.NestedMessage value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasFooMessage = true;
+ result.fooMessage_ = value;
+ return this;
+ }
+ public Builder SetFooMessage(global::Google.ProtocolBuffers.TestProtos.TestRequiredOneof.Types.NestedMessage.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.hasFooMessage = true;
+ result.fooMessage_ = builderForValue.Build();
+ return this;
+ }
+ public Builder MergeFooMessage(global::Google.ProtocolBuffers.TestProtos.TestRequiredOneof.Types.NestedMessage value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ if (result.hasFooMessage &&
+ result.fooMessage_ != global::Google.ProtocolBuffers.TestProtos.TestRequiredOneof.Types.NestedMessage.DefaultInstance) {
+ result.fooMessage_ = global::Google.ProtocolBuffers.TestProtos.TestRequiredOneof.Types.NestedMessage.CreateBuilder(result.fooMessage_).MergeFrom(value).BuildPartial();
+ } else {
+ result.fooMessage_ = value;
+ }
+ result.hasFooMessage = true;
+ return this;
+ }
+ public Builder ClearFooMessage() {
+ PrepareBuilder();
+ result.hasFooMessage = false;
+ result.fooMessage_ = null;
+ return this;
+ }
+ }
+ static TestRequiredOneof() {
+ object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor, null);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class TestPackedTypes : pb::GeneratedMessage<TestPackedTypes, TestPackedTypes.Builder> {
+ private TestPackedTypes() { }
+ private static readonly TestPackedTypes defaultInstance = new TestPackedTypes().MakeReadOnly();
+ private static readonly string[] _testPackedTypesFieldNames = new string[] { "packed_bool", "packed_double", "packed_enum", "packed_fixed32", "packed_fixed64", "packed_float", "packed_int32", "packed_int64", "packed_sfixed32", "packed_sfixed64", "packed_sint32", "packed_sint64", "packed_uint32", "packed_uint64" };
+ private static readonly uint[] _testPackedTypesFieldTags = new uint[] { 818, 810, 826, 770, 778, 802, 722, 730, 786, 794, 754, 762, 738, 746 };
+ public static TestPackedTypes DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override TestPackedTypes DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override TestPackedTypes ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestPackedTypes__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<TestPackedTypes, TestPackedTypes.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestPackedTypes__FieldAccessorTable; }
+ }
+
+ public const int PackedInt32FieldNumber = 90;
+ private int packedInt32MemoizedSerializedSize;
+ private pbc::PopsicleList<int> packedInt32_ = new pbc::PopsicleList<int>();
+ public scg::IList<int> PackedInt32List {
+ get { return pbc::Lists.AsReadOnly(packedInt32_); }
+ }
+ public int PackedInt32Count {
+ get { return packedInt32_.Count; }
+ }
+ public int GetPackedInt32(int index) {
+ return packedInt32_[index];
+ }
+
+ public const int PackedInt64FieldNumber = 91;
+ private int packedInt64MemoizedSerializedSize;
+ private pbc::PopsicleList<long> packedInt64_ = new pbc::PopsicleList<long>();
+ public scg::IList<long> PackedInt64List {
+ get { return pbc::Lists.AsReadOnly(packedInt64_); }
+ }
+ public int PackedInt64Count {
+ get { return packedInt64_.Count; }
+ }
+ public long GetPackedInt64(int index) {
+ return packedInt64_[index];
+ }
+
+ public const int PackedUint32FieldNumber = 92;
+ private int packedUint32MemoizedSerializedSize;
+ private pbc::PopsicleList<uint> packedUint32_ = new pbc::PopsicleList<uint>();
+ [global::System.CLSCompliant(false)]
+ public scg::IList<uint> PackedUint32List {
+ get { return pbc::Lists.AsReadOnly(packedUint32_); }
+ }
+ public int PackedUint32Count {
+ get { return packedUint32_.Count; }
+ }
+ [global::System.CLSCompliant(false)]
+ public uint GetPackedUint32(int index) {
+ return packedUint32_[index];
+ }
+
+ public const int PackedUint64FieldNumber = 93;
+ private int packedUint64MemoizedSerializedSize;
+ private pbc::PopsicleList<ulong> packedUint64_ = new pbc::PopsicleList<ulong>();
+ [global::System.CLSCompliant(false)]
+ public scg::IList<ulong> PackedUint64List {
+ get { return pbc::Lists.AsReadOnly(packedUint64_); }
+ }
+ public int PackedUint64Count {
+ get { return packedUint64_.Count; }
+ }
+ [global::System.CLSCompliant(false)]
+ public ulong GetPackedUint64(int index) {
+ return packedUint64_[index];
+ }
+
+ public const int PackedSint32FieldNumber = 94;
+ private int packedSint32MemoizedSerializedSize;
+ private pbc::PopsicleList<int> packedSint32_ = new pbc::PopsicleList<int>();
+ public scg::IList<int> PackedSint32List {
+ get { return pbc::Lists.AsReadOnly(packedSint32_); }
+ }
+ public int PackedSint32Count {
+ get { return packedSint32_.Count; }
+ }
+ public int GetPackedSint32(int index) {
+ return packedSint32_[index];
+ }
+
+ public const int PackedSint64FieldNumber = 95;
+ private int packedSint64MemoizedSerializedSize;
+ private pbc::PopsicleList<long> packedSint64_ = new pbc::PopsicleList<long>();
+ public scg::IList<long> PackedSint64List {
+ get { return pbc::Lists.AsReadOnly(packedSint64_); }
+ }
+ public int PackedSint64Count {
+ get { return packedSint64_.Count; }
+ }
+ public long GetPackedSint64(int index) {
+ return packedSint64_[index];
+ }
+
+ public const int PackedFixed32FieldNumber = 96;
+ private int packedFixed32MemoizedSerializedSize;
+ private pbc::PopsicleList<uint> packedFixed32_ = new pbc::PopsicleList<uint>();
+ [global::System.CLSCompliant(false)]
+ public scg::IList<uint> PackedFixed32List {
+ get { return pbc::Lists.AsReadOnly(packedFixed32_); }
+ }
+ public int PackedFixed32Count {
+ get { return packedFixed32_.Count; }
+ }
+ [global::System.CLSCompliant(false)]
+ public uint GetPackedFixed32(int index) {
+ return packedFixed32_[index];
+ }
+
+ public const int PackedFixed64FieldNumber = 97;
+ private int packedFixed64MemoizedSerializedSize;
+ private pbc::PopsicleList<ulong> packedFixed64_ = new pbc::PopsicleList<ulong>();
+ [global::System.CLSCompliant(false)]
+ public scg::IList<ulong> PackedFixed64List {
+ get { return pbc::Lists.AsReadOnly(packedFixed64_); }
+ }
+ public int PackedFixed64Count {
+ get { return packedFixed64_.Count; }
+ }
+ [global::System.CLSCompliant(false)]
+ public ulong GetPackedFixed64(int index) {
+ return packedFixed64_[index];
+ }
+
+ public const int PackedSfixed32FieldNumber = 98;
+ private int packedSfixed32MemoizedSerializedSize;
+ private pbc::PopsicleList<int> packedSfixed32_ = new pbc::PopsicleList<int>();
+ public scg::IList<int> PackedSfixed32List {
+ get { return pbc::Lists.AsReadOnly(packedSfixed32_); }
+ }
+ public int PackedSfixed32Count {
+ get { return packedSfixed32_.Count; }
+ }
+ public int GetPackedSfixed32(int index) {
+ return packedSfixed32_[index];
+ }
+
+ public const int PackedSfixed64FieldNumber = 99;
+ private int packedSfixed64MemoizedSerializedSize;
+ private pbc::PopsicleList<long> packedSfixed64_ = new pbc::PopsicleList<long>();
+ public scg::IList<long> PackedSfixed64List {
+ get { return pbc::Lists.AsReadOnly(packedSfixed64_); }
+ }
+ public int PackedSfixed64Count {
+ get { return packedSfixed64_.Count; }
+ }
+ public long GetPackedSfixed64(int index) {
+ return packedSfixed64_[index];
+ }
+
+ public const int PackedFloatFieldNumber = 100;
+ private int packedFloatMemoizedSerializedSize;
+ private pbc::PopsicleList<float> packedFloat_ = new pbc::PopsicleList<float>();
+ public scg::IList<float> PackedFloatList {
+ get { return pbc::Lists.AsReadOnly(packedFloat_); }
+ }
+ public int PackedFloatCount {
+ get { return packedFloat_.Count; }
+ }
+ public float GetPackedFloat(int index) {
+ return packedFloat_[index];
+ }
+
+ public const int PackedDoubleFieldNumber = 101;
+ private int packedDoubleMemoizedSerializedSize;
+ private pbc::PopsicleList<double> packedDouble_ = new pbc::PopsicleList<double>();
+ public scg::IList<double> PackedDoubleList {
+ get { return pbc::Lists.AsReadOnly(packedDouble_); }
+ }
+ public int PackedDoubleCount {
+ get { return packedDouble_.Count; }
+ }
+ public double GetPackedDouble(int index) {
+ return packedDouble_[index];
+ }
+
+ public const int PackedBoolFieldNumber = 102;
+ private int packedBoolMemoizedSerializedSize;
+ private pbc::PopsicleList<bool> packedBool_ = new pbc::PopsicleList<bool>();
+ public scg::IList<bool> PackedBoolList {
+ get { return pbc::Lists.AsReadOnly(packedBool_); }
+ }
+ public int PackedBoolCount {
+ get { return packedBool_.Count; }
+ }
+ public bool GetPackedBool(int index) {
+ return packedBool_[index];
+ }
+
+ public const int PackedEnumFieldNumber = 103;
+ private int packedEnumMemoizedSerializedSize;
+ private pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.ForeignEnum> packedEnum_ = new pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.ForeignEnum>();
+ public scg::IList<global::Google.ProtocolBuffers.TestProtos.ForeignEnum> PackedEnumList {
+ get { return pbc::Lists.AsReadOnly(packedEnum_); }
+ }
+ public int PackedEnumCount {
+ get { return packedEnum_.Count; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.ForeignEnum GetPackedEnum(int index) {
+ return packedEnum_[index];
+ }
+
+ public override bool IsInitialized {
+ get {
+ return true;
+ }
+ }
+
+ public override void WriteTo(pb::ICodedOutputStream output) {
+ CalcSerializedSize();
+ string[] field_names = _testPackedTypesFieldNames;
+ if (packedInt32_.Count > 0) {
+ output.WritePackedInt32Array(90, field_names[6], packedInt32MemoizedSerializedSize, packedInt32_);
+ }
+ if (packedInt64_.Count > 0) {
+ output.WritePackedInt64Array(91, field_names[7], packedInt64MemoizedSerializedSize, packedInt64_);
+ }
+ if (packedUint32_.Count > 0) {
+ output.WritePackedUInt32Array(92, field_names[12], packedUint32MemoizedSerializedSize, packedUint32_);
+ }
+ if (packedUint64_.Count > 0) {
+ output.WritePackedUInt64Array(93, field_names[13], packedUint64MemoizedSerializedSize, packedUint64_);
+ }
+ if (packedSint32_.Count > 0) {
+ output.WritePackedSInt32Array(94, field_names[10], packedSint32MemoizedSerializedSize, packedSint32_);
+ }
+ if (packedSint64_.Count > 0) {
+ output.WritePackedSInt64Array(95, field_names[11], packedSint64MemoizedSerializedSize, packedSint64_);
+ }
+ if (packedFixed32_.Count > 0) {
+ output.WritePackedFixed32Array(96, field_names[3], packedFixed32MemoizedSerializedSize, packedFixed32_);
+ }
+ if (packedFixed64_.Count > 0) {
+ output.WritePackedFixed64Array(97, field_names[4], packedFixed64MemoizedSerializedSize, packedFixed64_);
+ }
+ if (packedSfixed32_.Count > 0) {
+ output.WritePackedSFixed32Array(98, field_names[8], packedSfixed32MemoizedSerializedSize, packedSfixed32_);
+ }
+ if (packedSfixed64_.Count > 0) {
+ output.WritePackedSFixed64Array(99, field_names[9], packedSfixed64MemoizedSerializedSize, packedSfixed64_);
+ }
+ if (packedFloat_.Count > 0) {
+ output.WritePackedFloatArray(100, field_names[5], packedFloatMemoizedSerializedSize, packedFloat_);
+ }
+ if (packedDouble_.Count > 0) {
+ output.WritePackedDoubleArray(101, field_names[1], packedDoubleMemoizedSerializedSize, packedDouble_);
+ }
+ if (packedBool_.Count > 0) {
+ output.WritePackedBoolArray(102, field_names[0], packedBoolMemoizedSerializedSize, packedBool_);
+ }
+ if (packedEnum_.Count > 0) {
+ output.WritePackedEnumArray(103, field_names[2], packedEnumMemoizedSerializedSize, packedEnum_);
+ }
+ UnknownFields.WriteTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public override int SerializedSize {
+ get {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+ return CalcSerializedSize();
+ }
+ }
+
+ private int CalcSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ {
+ int dataSize = 0;
+ foreach (int element in PackedInt32List) {
+ dataSize += pb::CodedOutputStream.ComputeInt32SizeNoTag(element);
+ }
+ size += dataSize;
+ if (packedInt32_.Count != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32SizeNoTag(dataSize);
+ }
+ packedInt32MemoizedSerializedSize = dataSize;
+ }
+ {
+ int dataSize = 0;
+ foreach (long element in PackedInt64List) {
+ dataSize += pb::CodedOutputStream.ComputeInt64SizeNoTag(element);
+ }
+ size += dataSize;
+ if (packedInt64_.Count != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32SizeNoTag(dataSize);
+ }
+ packedInt64MemoizedSerializedSize = dataSize;
+ }
+ {
+ int dataSize = 0;
+ foreach (uint element in PackedUint32List) {
+ dataSize += pb::CodedOutputStream.ComputeUInt32SizeNoTag(element);
+ }
+ size += dataSize;
+ if (packedUint32_.Count != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32SizeNoTag(dataSize);
+ }
+ packedUint32MemoizedSerializedSize = dataSize;
+ }
+ {
+ int dataSize = 0;
+ foreach (ulong element in PackedUint64List) {
+ dataSize += pb::CodedOutputStream.ComputeUInt64SizeNoTag(element);
+ }
+ size += dataSize;
+ if (packedUint64_.Count != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32SizeNoTag(dataSize);
+ }
+ packedUint64MemoizedSerializedSize = dataSize;
+ }
+ {
+ int dataSize = 0;
+ foreach (int element in PackedSint32List) {
+ dataSize += pb::CodedOutputStream.ComputeSInt32SizeNoTag(element);
+ }
+ size += dataSize;
+ if (packedSint32_.Count != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32SizeNoTag(dataSize);
+ }
+ packedSint32MemoizedSerializedSize = dataSize;
+ }
+ {
+ int dataSize = 0;
+ foreach (long element in PackedSint64List) {
+ dataSize += pb::CodedOutputStream.ComputeSInt64SizeNoTag(element);
+ }
+ size += dataSize;
+ if (packedSint64_.Count != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32SizeNoTag(dataSize);
+ }
+ packedSint64MemoizedSerializedSize = dataSize;
+ }
+ {
+ int dataSize = 0;
+ dataSize = 4 * packedFixed32_.Count;
+ size += dataSize;
+ if (packedFixed32_.Count != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32SizeNoTag(dataSize);
+ }
+ packedFixed32MemoizedSerializedSize = dataSize;
+ }
+ {
+ int dataSize = 0;
+ dataSize = 8 * packedFixed64_.Count;
+ size += dataSize;
+ if (packedFixed64_.Count != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32SizeNoTag(dataSize);
+ }
+ packedFixed64MemoizedSerializedSize = dataSize;
+ }
+ {
+ int dataSize = 0;
+ dataSize = 4 * packedSfixed32_.Count;
+ size += dataSize;
+ if (packedSfixed32_.Count != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32SizeNoTag(dataSize);
+ }
+ packedSfixed32MemoizedSerializedSize = dataSize;
+ }
+ {
+ int dataSize = 0;
+ dataSize = 8 * packedSfixed64_.Count;
+ size += dataSize;
+ if (packedSfixed64_.Count != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32SizeNoTag(dataSize);
+ }
+ packedSfixed64MemoizedSerializedSize = dataSize;
+ }
+ {
+ int dataSize = 0;
+ dataSize = 4 * packedFloat_.Count;
+ size += dataSize;
+ if (packedFloat_.Count != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32SizeNoTag(dataSize);
+ }
+ packedFloatMemoizedSerializedSize = dataSize;
+ }
+ {
+ int dataSize = 0;
+ dataSize = 8 * packedDouble_.Count;
+ size += dataSize;
+ if (packedDouble_.Count != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32SizeNoTag(dataSize);
+ }
+ packedDoubleMemoizedSerializedSize = dataSize;
+ }
+ {
+ int dataSize = 0;
+ dataSize = 1 * packedBool_.Count;
+ size += dataSize;
+ if (packedBool_.Count != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32SizeNoTag(dataSize);
+ }
+ packedBoolMemoizedSerializedSize = dataSize;
+ }
+ {
+ int dataSize = 0;
+ if (packedEnum_.Count > 0) {
+ foreach (global::Google.ProtocolBuffers.TestProtos.ForeignEnum element in packedEnum_) {
+ dataSize += pb::CodedOutputStream.ComputeEnumSizeNoTag((int) element);
+ }
+ size += dataSize;
+ size += 2;
+ size += pb::CodedOutputStream.ComputeRawVarint32Size((uint) dataSize);
+ }
+ packedEnumMemoizedSerializedSize = dataSize;
+ }
+ size += UnknownFields.SerializedSize;
+ memoizedSerializedSize = size;
+ return size;
+ }
+ public static TestPackedTypes ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static TestPackedTypes ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static TestPackedTypes ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static TestPackedTypes ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static TestPackedTypes ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static TestPackedTypes ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static TestPackedTypes ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static TestPackedTypes ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static TestPackedTypes ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static TestPackedTypes ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private TestPackedTypes MakeReadOnly() {
+ packedInt32_.MakeReadOnly();
+ packedInt64_.MakeReadOnly();
+ packedUint32_.MakeReadOnly();
+ packedUint64_.MakeReadOnly();
+ packedSint32_.MakeReadOnly();
+ packedSint64_.MakeReadOnly();
+ packedFixed32_.MakeReadOnly();
+ packedFixed64_.MakeReadOnly();
+ packedSfixed32_.MakeReadOnly();
+ packedSfixed64_.MakeReadOnly();
+ packedFloat_.MakeReadOnly();
+ packedDouble_.MakeReadOnly();
+ packedBool_.MakeReadOnly();
+ packedEnum_.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(TestPackedTypes prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Builder : pb::GeneratedBuilder<TestPackedTypes, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(TestPackedTypes cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private TestPackedTypes result;
+
+ private TestPackedTypes PrepareBuilder() {
+ if (resultIsReadOnly) {
+ TestPackedTypes original = result;
+ result = new TestPackedTypes();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override TestPackedTypes 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.TestPackedTypes.Descriptor; }
+ }
+
+ public override TestPackedTypes DefaultInstanceForType {
+ get { return global::Google.ProtocolBuffers.TestProtos.TestPackedTypes.DefaultInstance; }
+ }
+
+ public override TestPackedTypes BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+ public override Builder MergeFrom(pb::IMessage other) {
+ if (other is TestPackedTypes) {
+ return MergeFrom((TestPackedTypes) other);
+ } else {
+ base.MergeFrom(other);
+ return this;
+ }
+ }
+
+ public override Builder MergeFrom(TestPackedTypes other) {
+ if (other == global::Google.ProtocolBuffers.TestProtos.TestPackedTypes.DefaultInstance) return this;
+ PrepareBuilder();
+ if (other.packedInt32_.Count != 0) {
+ result.packedInt32_.Add(other.packedInt32_);
+ }
+ if (other.packedInt64_.Count != 0) {
+ result.packedInt64_.Add(other.packedInt64_);
+ }
+ if (other.packedUint32_.Count != 0) {
+ result.packedUint32_.Add(other.packedUint32_);
+ }
+ if (other.packedUint64_.Count != 0) {
+ result.packedUint64_.Add(other.packedUint64_);
+ }
+ if (other.packedSint32_.Count != 0) {
+ result.packedSint32_.Add(other.packedSint32_);
+ }
+ if (other.packedSint64_.Count != 0) {
+ result.packedSint64_.Add(other.packedSint64_);
+ }
+ if (other.packedFixed32_.Count != 0) {
+ result.packedFixed32_.Add(other.packedFixed32_);
+ }
+ if (other.packedFixed64_.Count != 0) {
+ result.packedFixed64_.Add(other.packedFixed64_);
+ }
+ if (other.packedSfixed32_.Count != 0) {
+ result.packedSfixed32_.Add(other.packedSfixed32_);
+ }
+ if (other.packedSfixed64_.Count != 0) {
+ result.packedSfixed64_.Add(other.packedSfixed64_);
+ }
+ if (other.packedFloat_.Count != 0) {
+ result.packedFloat_.Add(other.packedFloat_);
+ }
+ if (other.packedDouble_.Count != 0) {
+ result.packedDouble_.Add(other.packedDouble_);
+ }
+ if (other.packedBool_.Count != 0) {
+ result.packedBool_.Add(other.packedBool_);
+ }
+ if (other.packedEnum_.Count != 0) {
+ result.packedEnum_.Add(other.packedEnum_);
+ }
+ 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(_testPackedTypesFieldNames, field_name, global::System.StringComparer.Ordinal);
+ if(field_ordinal >= 0)
+ tag = _testPackedTypesFieldTags[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 722:
+ case 720: {
+ input.ReadInt32Array(tag, field_name, result.packedInt32_);
+ break;
+ }
+ case 730:
+ case 728: {
+ input.ReadInt64Array(tag, field_name, result.packedInt64_);
+ break;
+ }
+ case 738:
+ case 736: {
+ input.ReadUInt32Array(tag, field_name, result.packedUint32_);
+ break;
+ }
+ case 746:
+ case 744: {
+ input.ReadUInt64Array(tag, field_name, result.packedUint64_);
+ break;
+ }
+ case 754:
+ case 752: {
+ input.ReadSInt32Array(tag, field_name, result.packedSint32_);
+ break;
+ }
+ case 762:
+ case 760: {
+ input.ReadSInt64Array(tag, field_name, result.packedSint64_);
+ break;
+ }
+ case 770:
+ case 773: {
+ input.ReadFixed32Array(tag, field_name, result.packedFixed32_);
+ break;
+ }
+ case 778:
+ case 777: {
+ input.ReadFixed64Array(tag, field_name, result.packedFixed64_);
+ break;
+ }
+ case 786:
+ case 789: {
+ input.ReadSFixed32Array(tag, field_name, result.packedSfixed32_);
+ break;
+ }
+ case 794:
+ case 793: {
+ input.ReadSFixed64Array(tag, field_name, result.packedSfixed64_);
+ break;
+ }
+ case 802:
+ case 805: {
+ input.ReadFloatArray(tag, field_name, result.packedFloat_);
+ break;
+ }
+ case 810:
+ case 809: {
+ input.ReadDoubleArray(tag, field_name, result.packedDouble_);
+ break;
+ }
+ case 818:
+ case 816: {
+ input.ReadBoolArray(tag, field_name, result.packedBool_);
+ break;
+ }
+ case 826:
+ case 824: {
+ scg::ICollection<object> unknownItems;
+ input.ReadEnumArray<global::Google.ProtocolBuffers.TestProtos.ForeignEnum>(tag, field_name, result.packedEnum_, out unknownItems);
+ if (unknownItems != null) {
+ if (unknownFields == null) {
+ unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+ }
+ foreach (object rawValue in unknownItems)
+ if (rawValue is int)
+ unknownFields.MergeVarintField(103, (ulong)(int)rawValue);
+ }
+ break;
+ }
+ }
+ }
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
+ }
+
+
+ public pbc::IPopsicleList<int> PackedInt32List {
+ get { return PrepareBuilder().packedInt32_; }
+ }
+ public int PackedInt32Count {
+ get { return result.PackedInt32Count; }
+ }
+ public int GetPackedInt32(int index) {
+ return result.GetPackedInt32(index);
+ }
+ public Builder SetPackedInt32(int index, int value) {
+ PrepareBuilder();
+ result.packedInt32_[index] = value;
+ return this;
+ }
+ public Builder AddPackedInt32(int value) {
+ PrepareBuilder();
+ result.packedInt32_.Add(value);
+ return this;
+ }
+ public Builder AddRangePackedInt32(scg::IEnumerable<int> values) {
+ PrepareBuilder();
+ result.packedInt32_.Add(values);
+ return this;
+ }
+ public Builder ClearPackedInt32() {
+ PrepareBuilder();
+ result.packedInt32_.Clear();
+ return this;
+ }
+
+ public pbc::IPopsicleList<long> PackedInt64List {
+ get { return PrepareBuilder().packedInt64_; }
+ }
+ public int PackedInt64Count {
+ get { return result.PackedInt64Count; }
+ }
+ public long GetPackedInt64(int index) {
+ return result.GetPackedInt64(index);
+ }
+ public Builder SetPackedInt64(int index, long value) {
+ PrepareBuilder();
+ result.packedInt64_[index] = value;
+ return this;
+ }
+ public Builder AddPackedInt64(long value) {
+ PrepareBuilder();
+ result.packedInt64_.Add(value);
+ return this;
+ }
+ public Builder AddRangePackedInt64(scg::IEnumerable<long> values) {
+ PrepareBuilder();
+ result.packedInt64_.Add(values);
+ return this;
+ }
+ public Builder ClearPackedInt64() {
+ PrepareBuilder();
+ result.packedInt64_.Clear();
+ return this;
+ }
+
+ [global::System.CLSCompliant(false)]
+ public pbc::IPopsicleList<uint> PackedUint32List {
+ get { return PrepareBuilder().packedUint32_; }
+ }
+ public int PackedUint32Count {
+ get { return result.PackedUint32Count; }
+ }
+ [global::System.CLSCompliant(false)]
+ public uint GetPackedUint32(int index) {
+ return result.GetPackedUint32(index);
+ }
+ [global::System.CLSCompliant(false)]
+ public Builder SetPackedUint32(int index, uint value) {
+ PrepareBuilder();
+ result.packedUint32_[index] = value;
+ return this;
+ }
+ [global::System.CLSCompliant(false)]
+ public Builder AddPackedUint32(uint value) {
+ PrepareBuilder();
+ result.packedUint32_.Add(value);
+ return this;
+ }
+ [global::System.CLSCompliant(false)]
+ public Builder AddRangePackedUint32(scg::IEnumerable<uint> values) {
+ PrepareBuilder();
+ result.packedUint32_.Add(values);
+ return this;
+ }
+ public Builder ClearPackedUint32() {
+ PrepareBuilder();
+ result.packedUint32_.Clear();
+ return this;
+ }
+
+ [global::System.CLSCompliant(false)]
+ public pbc::IPopsicleList<ulong> PackedUint64List {
+ get { return PrepareBuilder().packedUint64_; }
+ }
+ public int PackedUint64Count {
+ get { return result.PackedUint64Count; }
+ }
+ [global::System.CLSCompliant(false)]
+ public ulong GetPackedUint64(int index) {
+ return result.GetPackedUint64(index);
+ }
+ [global::System.CLSCompliant(false)]
+ public Builder SetPackedUint64(int index, ulong value) {
+ PrepareBuilder();
+ result.packedUint64_[index] = value;
+ return this;
+ }
+ [global::System.CLSCompliant(false)]
+ public Builder AddPackedUint64(ulong value) {
+ PrepareBuilder();
+ result.packedUint64_.Add(value);
+ return this;
+ }
+ [global::System.CLSCompliant(false)]
+ public Builder AddRangePackedUint64(scg::IEnumerable<ulong> values) {
+ PrepareBuilder();
+ result.packedUint64_.Add(values);
+ return this;
+ }
+ public Builder ClearPackedUint64() {
+ PrepareBuilder();
+ result.packedUint64_.Clear();
+ return this;
+ }
+
+ public pbc::IPopsicleList<int> PackedSint32List {
+ get { return PrepareBuilder().packedSint32_; }
+ }
+ public int PackedSint32Count {
+ get { return result.PackedSint32Count; }
+ }
+ public int GetPackedSint32(int index) {
+ return result.GetPackedSint32(index);
+ }
+ public Builder SetPackedSint32(int index, int value) {
+ PrepareBuilder();
+ result.packedSint32_[index] = value;
+ return this;
+ }
+ public Builder AddPackedSint32(int value) {
+ PrepareBuilder();
+ result.packedSint32_.Add(value);
+ return this;
+ }
+ public Builder AddRangePackedSint32(scg::IEnumerable<int> values) {
+ PrepareBuilder();
+ result.packedSint32_.Add(values);
+ return this;
+ }
+ public Builder ClearPackedSint32() {
+ PrepareBuilder();
+ result.packedSint32_.Clear();
+ return this;
+ }
+
+ public pbc::IPopsicleList<long> PackedSint64List {
+ get { return PrepareBuilder().packedSint64_; }
+ }
+ public int PackedSint64Count {
+ get { return result.PackedSint64Count; }
+ }
+ public long GetPackedSint64(int index) {
+ return result.GetPackedSint64(index);
+ }
+ public Builder SetPackedSint64(int index, long value) {
+ PrepareBuilder();
+ result.packedSint64_[index] = value;
+ return this;
+ }
+ public Builder AddPackedSint64(long value) {
+ PrepareBuilder();
+ result.packedSint64_.Add(value);
+ return this;
+ }
+ public Builder AddRangePackedSint64(scg::IEnumerable<long> values) {
+ PrepareBuilder();
+ result.packedSint64_.Add(values);
+ return this;
+ }
+ public Builder ClearPackedSint64() {
+ PrepareBuilder();
+ result.packedSint64_.Clear();
+ return this;
+ }
+
+ [global::System.CLSCompliant(false)]
+ public pbc::IPopsicleList<uint> PackedFixed32List {
+ get { return PrepareBuilder().packedFixed32_; }
+ }
+ public int PackedFixed32Count {
+ get { return result.PackedFixed32Count; }
+ }
+ [global::System.CLSCompliant(false)]
+ public uint GetPackedFixed32(int index) {
+ return result.GetPackedFixed32(index);
+ }
+ [global::System.CLSCompliant(false)]
+ public Builder SetPackedFixed32(int index, uint value) {
+ PrepareBuilder();
+ result.packedFixed32_[index] = value;
+ return this;
+ }
+ [global::System.CLSCompliant(false)]
+ public Builder AddPackedFixed32(uint value) {
+ PrepareBuilder();
+ result.packedFixed32_.Add(value);
+ return this;
+ }
+ [global::System.CLSCompliant(false)]
+ public Builder AddRangePackedFixed32(scg::IEnumerable<uint> values) {
+ PrepareBuilder();
+ result.packedFixed32_.Add(values);
+ return this;
+ }
+ public Builder ClearPackedFixed32() {
+ PrepareBuilder();
+ result.packedFixed32_.Clear();
+ return this;
+ }
+
+ [global::System.CLSCompliant(false)]
+ public pbc::IPopsicleList<ulong> PackedFixed64List {
+ get { return PrepareBuilder().packedFixed64_; }
+ }
+ public int PackedFixed64Count {
+ get { return result.PackedFixed64Count; }
+ }
+ [global::System.CLSCompliant(false)]
+ public ulong GetPackedFixed64(int index) {
+ return result.GetPackedFixed64(index);
+ }
+ [global::System.CLSCompliant(false)]
+ public Builder SetPackedFixed64(int index, ulong value) {
+ PrepareBuilder();
+ result.packedFixed64_[index] = value;
+ return this;
+ }
+ [global::System.CLSCompliant(false)]
+ public Builder AddPackedFixed64(ulong value) {
+ PrepareBuilder();
+ result.packedFixed64_.Add(value);
+ return this;
+ }
+ [global::System.CLSCompliant(false)]
+ public Builder AddRangePackedFixed64(scg::IEnumerable<ulong> values) {
+ PrepareBuilder();
+ result.packedFixed64_.Add(values);
+ return this;
+ }
+ public Builder ClearPackedFixed64() {
+ PrepareBuilder();
+ result.packedFixed64_.Clear();
+ return this;
+ }
+
+ public pbc::IPopsicleList<int> PackedSfixed32List {
+ get { return PrepareBuilder().packedSfixed32_; }
+ }
+ public int PackedSfixed32Count {
+ get { return result.PackedSfixed32Count; }
+ }
+ public int GetPackedSfixed32(int index) {
+ return result.GetPackedSfixed32(index);
+ }
+ public Builder SetPackedSfixed32(int index, int value) {
+ PrepareBuilder();
+ result.packedSfixed32_[index] = value;
+ return this;
+ }
+ public Builder AddPackedSfixed32(int value) {
+ PrepareBuilder();
+ result.packedSfixed32_.Add(value);
+ return this;
+ }
+ public Builder AddRangePackedSfixed32(scg::IEnumerable<int> values) {
+ PrepareBuilder();
+ result.packedSfixed32_.Add(values);
+ return this;
+ }
+ public Builder ClearPackedSfixed32() {
+ PrepareBuilder();
+ result.packedSfixed32_.Clear();
+ return this;
+ }
+
+ public pbc::IPopsicleList<long> PackedSfixed64List {
+ get { return PrepareBuilder().packedSfixed64_; }
+ }
+ public int PackedSfixed64Count {
+ get { return result.PackedSfixed64Count; }
+ }
+ public long GetPackedSfixed64(int index) {
+ return result.GetPackedSfixed64(index);
+ }
+ public Builder SetPackedSfixed64(int index, long value) {
+ PrepareBuilder();
+ result.packedSfixed64_[index] = value;
+ return this;
+ }
+ public Builder AddPackedSfixed64(long value) {
+ PrepareBuilder();
+ result.packedSfixed64_.Add(value);
+ return this;
+ }
+ public Builder AddRangePackedSfixed64(scg::IEnumerable<long> values) {
+ PrepareBuilder();
+ result.packedSfixed64_.Add(values);
+ return this;
+ }
+ public Builder ClearPackedSfixed64() {
+ PrepareBuilder();
+ result.packedSfixed64_.Clear();
+ return this;
+ }
+
+ public pbc::IPopsicleList<float> PackedFloatList {
+ get { return PrepareBuilder().packedFloat_; }
+ }
+ public int PackedFloatCount {
+ get { return result.PackedFloatCount; }
+ }
+ public float GetPackedFloat(int index) {
+ return result.GetPackedFloat(index);
+ }
+ public Builder SetPackedFloat(int index, float value) {
+ PrepareBuilder();
+ result.packedFloat_[index] = value;
+ return this;
+ }
+ public Builder AddPackedFloat(float value) {
+ PrepareBuilder();
+ result.packedFloat_.Add(value);
+ return this;
+ }
+ public Builder AddRangePackedFloat(scg::IEnumerable<float> values) {
+ PrepareBuilder();
+ result.packedFloat_.Add(values);
+ return this;
+ }
+ public Builder ClearPackedFloat() {
+ PrepareBuilder();
+ result.packedFloat_.Clear();
+ return this;
+ }
+
+ public pbc::IPopsicleList<double> PackedDoubleList {
+ get { return PrepareBuilder().packedDouble_; }
+ }
+ public int PackedDoubleCount {
+ get { return result.PackedDoubleCount; }
+ }
+ public double GetPackedDouble(int index) {
+ return result.GetPackedDouble(index);
+ }
+ public Builder SetPackedDouble(int index, double value) {
+ PrepareBuilder();
+ result.packedDouble_[index] = value;
+ return this;
+ }
+ public Builder AddPackedDouble(double value) {
+ PrepareBuilder();
+ result.packedDouble_.Add(value);
+ return this;
+ }
+ public Builder AddRangePackedDouble(scg::IEnumerable<double> values) {
+ PrepareBuilder();
+ result.packedDouble_.Add(values);
+ return this;
+ }
+ public Builder ClearPackedDouble() {
+ PrepareBuilder();
+ result.packedDouble_.Clear();
+ return this;
+ }
+
+ public pbc::IPopsicleList<bool> PackedBoolList {
+ get { return PrepareBuilder().packedBool_; }
+ }
+ public int PackedBoolCount {
+ get { return result.PackedBoolCount; }
+ }
+ public bool GetPackedBool(int index) {
+ return result.GetPackedBool(index);
+ }
+ public Builder SetPackedBool(int index, bool value) {
+ PrepareBuilder();
+ result.packedBool_[index] = value;
+ return this;
+ }
+ public Builder AddPackedBool(bool value) {
+ PrepareBuilder();
+ result.packedBool_.Add(value);
+ return this;
+ }
+ public Builder AddRangePackedBool(scg::IEnumerable<bool> values) {
+ PrepareBuilder();
+ result.packedBool_.Add(values);
+ return this;
+ }
+ public Builder ClearPackedBool() {
+ PrepareBuilder();
+ result.packedBool_.Clear();
+ return this;
+ }
+
+ public pbc::IPopsicleList<global::Google.ProtocolBuffers.TestProtos.ForeignEnum> PackedEnumList {
+ get { return PrepareBuilder().packedEnum_; }
+ }
+ public int PackedEnumCount {
+ get { return result.PackedEnumCount; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.ForeignEnum GetPackedEnum(int index) {
+ return result.GetPackedEnum(index);
+ }
+ public Builder SetPackedEnum(int index, global::Google.ProtocolBuffers.TestProtos.ForeignEnum value) {
+ PrepareBuilder();
+ result.packedEnum_[index] = value;
+ return this;
+ }
+ public Builder AddPackedEnum(global::Google.ProtocolBuffers.TestProtos.ForeignEnum value) {
+ PrepareBuilder();
+ result.packedEnum_.Add(value);
+ return this;
+ }
+ public Builder AddRangePackedEnum(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.ForeignEnum> values) {
+ PrepareBuilder();
+ result.packedEnum_.Add(values);
+ return this;
+ }
+ public Builder ClearPackedEnum() {
+ PrepareBuilder();
+ result.packedEnum_.Clear();
+ return this;
+ }
+ }
+ static TestPackedTypes() {
+ object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor, null);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class TestUnpackedTypes : pb::GeneratedMessage<TestUnpackedTypes, TestUnpackedTypes.Builder> {
+ private TestUnpackedTypes() { }
+ private static readonly TestUnpackedTypes defaultInstance = new TestUnpackedTypes().MakeReadOnly();
+ private static readonly string[] _testUnpackedTypesFieldNames = 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[] _testUnpackedTypesFieldTags = new uint[] { 816, 809, 824, 773, 777, 805, 720, 728, 789, 793, 752, 760, 736, 744 };
+ public static TestUnpackedTypes DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override TestUnpackedTypes DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override TestUnpackedTypes ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestUnpackedTypes__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<TestUnpackedTypes, TestUnpackedTypes.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestUnpackedTypes__FieldAccessorTable; }
+ }
+
+ 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.ForeignEnum> unpackedEnum_ = new pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.ForeignEnum>();
+ public scg::IList<global::Google.ProtocolBuffers.TestProtos.ForeignEnum> UnpackedEnumList {
+ get { return pbc::Lists.AsReadOnly(unpackedEnum_); }
+ }
+ public int UnpackedEnumCount {
+ get { return unpackedEnum_.Count; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.ForeignEnum GetUnpackedEnum(int index) {
+ return unpackedEnum_[index];
+ }
+
+ public override bool IsInitialized {
+ get {
+ return true;
+ }
+ }
+
+ public override void WriteTo(pb::ICodedOutputStream output) {
+ CalcSerializedSize();
+ string[] field_names = _testUnpackedTypesFieldNames;
+ 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_);
+ }
+ UnknownFields.WriteTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public override int SerializedSize {
+ get {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+ return CalcSerializedSize();
+ }
+ }
+
+ private int CalcSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ {
+ int dataSize = 0;
+ 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.ForeignEnum element in unpackedEnum_) {
+ dataSize += pb::CodedOutputStream.ComputeEnumSizeNoTag((int) element);
+ }
+ size += dataSize;
+ size += 2 * unpackedEnum_.Count;
+ }
+ }
+ size += UnknownFields.SerializedSize;
+ memoizedSerializedSize = size;
+ return size;
+ }
+ public static TestUnpackedTypes ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static TestUnpackedTypes ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static TestUnpackedTypes ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static TestUnpackedTypes ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static TestUnpackedTypes ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static TestUnpackedTypes ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static TestUnpackedTypes ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static TestUnpackedTypes ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static TestUnpackedTypes ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static TestUnpackedTypes ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private TestUnpackedTypes 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(TestUnpackedTypes prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Builder : pb::GeneratedBuilder<TestUnpackedTypes, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(TestUnpackedTypes cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private TestUnpackedTypes result;
+
+ private TestUnpackedTypes PrepareBuilder() {
+ if (resultIsReadOnly) {
+ TestUnpackedTypes original = result;
+ result = new TestUnpackedTypes();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override TestUnpackedTypes 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.TestUnpackedTypes.Descriptor; }
+ }
+
+ public override TestUnpackedTypes DefaultInstanceForType {
+ get { return global::Google.ProtocolBuffers.TestProtos.TestUnpackedTypes.DefaultInstance; }
+ }
+
+ public override TestUnpackedTypes BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+ public override Builder MergeFrom(pb::IMessage other) {
+ if (other is TestUnpackedTypes) {
+ return MergeFrom((TestUnpackedTypes) other);
+ } else {
+ base.MergeFrom(other);
+ return this;
+ }
+ }
+
+ public override Builder MergeFrom(TestUnpackedTypes other) {
+ if (other == global::Google.ProtocolBuffers.TestProtos.TestUnpackedTypes.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_);
+ }
+ 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(_testUnpackedTypesFieldNames, field_name, global::System.StringComparer.Ordinal);
+ if(field_ordinal >= 0)
+ tag = _testUnpackedTypesFieldTags[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 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.ForeignEnum>(tag, field_name, result.unpackedEnum_, out unknownItems);
+ if (unknownItems != null) {
+ if (unknownFields == null) {
+ unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+ }
+ foreach (object rawValue in unknownItems)
+ if (rawValue is int)
+ unknownFields.MergeVarintField(103, (ulong)(int)rawValue);
+ }
+ break;
+ }
+ }
+ }
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ 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.ForeignEnum> UnpackedEnumList {
+ get { return PrepareBuilder().unpackedEnum_; }
+ }
+ public int UnpackedEnumCount {
+ get { return result.UnpackedEnumCount; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.ForeignEnum GetUnpackedEnum(int index) {
+ return result.GetUnpackedEnum(index);
+ }
+ public Builder SetUnpackedEnum(int index, global::Google.ProtocolBuffers.TestProtos.ForeignEnum value) {
+ PrepareBuilder();
+ result.unpackedEnum_[index] = value;
+ return this;
+ }
+ public Builder AddUnpackedEnum(global::Google.ProtocolBuffers.TestProtos.ForeignEnum value) {
+ PrepareBuilder();
+ result.unpackedEnum_.Add(value);
+ return this;
+ }
+ public Builder AddRangeUnpackedEnum(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.ForeignEnum> values) {
+ PrepareBuilder();
+ result.unpackedEnum_.Add(values);
+ return this;
+ }
+ public Builder ClearUnpackedEnum() {
+ PrepareBuilder();
+ result.unpackedEnum_.Clear();
+ return this;
+ }
+ }
+ static TestUnpackedTypes() {
+ object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor, null);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class TestPackedExtensions : pb::ExtendableMessage<TestPackedExtensions, TestPackedExtensions.Builder> {
+ private TestPackedExtensions() { }
+ private static readonly TestPackedExtensions defaultInstance = new TestPackedExtensions().MakeReadOnly();
+ private static readonly string[] _testPackedExtensionsFieldNames = new string[] { };
+ private static readonly uint[] _testPackedExtensionsFieldTags = new uint[] { };
+ public static TestPackedExtensions DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override TestPackedExtensions DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override TestPackedExtensions ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestPackedExtensions__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<TestPackedExtensions, TestPackedExtensions.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestPackedExtensions__FieldAccessorTable; }
+ }
+
+ public override bool IsInitialized {
+ get {
+ if (!ExtensionsAreInitialized) return false;
+ return true;
+ }
+ }
+
+ public override void WriteTo(pb::ICodedOutputStream output) {
+ CalcSerializedSize();
+ string[] field_names = _testPackedExtensionsFieldNames;
+ pb::ExtendableMessage<TestPackedExtensions, TestPackedExtensions.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;
+ return CalcSerializedSize();
+ }
+ }
+
+ private int CalcSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ size += ExtensionsSerializedSize;
+ size += UnknownFields.SerializedSize;
+ memoizedSerializedSize = size;
+ return size;
+ }
+ public static TestPackedExtensions ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static TestPackedExtensions ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static TestPackedExtensions ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static TestPackedExtensions ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static TestPackedExtensions ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static TestPackedExtensions ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static TestPackedExtensions ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static TestPackedExtensions ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static TestPackedExtensions ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static TestPackedExtensions ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private TestPackedExtensions 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(TestPackedExtensions prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Builder : pb::ExtendableBuilder<TestPackedExtensions, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(TestPackedExtensions cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private TestPackedExtensions result;
+
+ private TestPackedExtensions PrepareBuilder() {
+ if (resultIsReadOnly) {
+ TestPackedExtensions original = result;
+ result = new TestPackedExtensions();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override TestPackedExtensions 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.TestPackedExtensions.Descriptor; }
+ }
+
+ public override TestPackedExtensions DefaultInstanceForType {
+ get { return global::Google.ProtocolBuffers.TestProtos.TestPackedExtensions.DefaultInstance; }
+ }
+
+ public override TestPackedExtensions BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+ public override Builder MergeFrom(pb::IMessage other) {
+ if (other is TestPackedExtensions) {
+ return MergeFrom((TestPackedExtensions) other);
+ } else {
+ base.MergeFrom(other);
+ return this;
+ }
+ }
+
+ public override Builder MergeFrom(TestPackedExtensions other) {
+ if (other == global::Google.ProtocolBuffers.TestProtos.TestPackedExtensions.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(_testPackedExtensionsFieldNames, field_name, global::System.StringComparer.Ordinal);
+ if(field_ordinal >= 0)
+ tag = _testPackedExtensionsFieldTags[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 TestPackedExtensions() {
+ object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor, null);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ 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.Unittest.internal__static_protobuf_unittest_TestUnpackedExtensions__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<TestUnpackedExtensions, TestUnpackedExtensions.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestUnpackedExtensions__FieldAccessorTable; }
+ }
+
+ public override bool IsInitialized {
+ get {
+ if (!ExtensionsAreInitialized) return false;
+ return true;
+ }
+ }
+
+ public override void WriteTo(pb::ICodedOutputStream output) {
+ CalcSerializedSize();
+ 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;
+ return CalcSerializedSize();
+ }
+ }
+
+ private int CalcSerializedSize() {
+ 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.Diagnostics.DebuggerNonUserCodeAttribute()]
+ 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.Unittest.Descriptor, null);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class TestDynamicExtensions : pb::GeneratedMessage<TestDynamicExtensions, TestDynamicExtensions.Builder> {
+ private TestDynamicExtensions() { }
+ private static readonly TestDynamicExtensions defaultInstance = new TestDynamicExtensions().MakeReadOnly();
+ private static readonly string[] _testDynamicExtensionsFieldNames = new string[] { "dynamic_enum_extension", "dynamic_message_extension", "enum_extension", "message_extension", "packed_extension", "repeated_extension", "scalar_extension" };
+ private static readonly uint[] _testDynamicExtensionsFieldTags = new uint[] { 16016, 16034, 16008, 16026, 16050, 16042, 16005 };
+ public static TestDynamicExtensions DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override TestDynamicExtensions DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override TestDynamicExtensions ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestDynamicExtensions__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<TestDynamicExtensions, TestDynamicExtensions.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestDynamicExtensions__FieldAccessorTable; }
+ }
+
+ #region Nested types
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public static partial class Types {
+ public enum DynamicEnumType {
+ DYNAMIC_FOO = 2200,
+ DYNAMIC_BAR = 2201,
+ DYNAMIC_BAZ = 2202,
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class DynamicMessageType : pb::GeneratedMessage<DynamicMessageType, DynamicMessageType.Builder> {
+ private DynamicMessageType() { }
+ private static readonly DynamicMessageType defaultInstance = new DynamicMessageType().MakeReadOnly();
+ private static readonly string[] _dynamicMessageTypeFieldNames = new string[] { "dynamic_field" };
+ private static readonly uint[] _dynamicMessageTypeFieldTags = new uint[] { 16800 };
+ public static DynamicMessageType DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override DynamicMessageType DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override DynamicMessageType ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestDynamicExtensions_DynamicMessageType__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<DynamicMessageType, DynamicMessageType.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestDynamicExtensions_DynamicMessageType__FieldAccessorTable; }
+ }
+
+ public const int DynamicFieldFieldNumber = 2100;
+ private bool hasDynamicField;
+ private int dynamicField_;
+ public bool HasDynamicField {
+ get { return hasDynamicField; }
+ }
+ public int DynamicField {
+ get { return dynamicField_; }
+ }
+
+ public override bool IsInitialized {
+ get {
+ return true;
+ }
+ }
+
+ public override void WriteTo(pb::ICodedOutputStream output) {
+ CalcSerializedSize();
+ string[] field_names = _dynamicMessageTypeFieldNames;
+ if (hasDynamicField) {
+ output.WriteInt32(2100, field_names[0], DynamicField);
+ }
+ UnknownFields.WriteTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public override int SerializedSize {
+ get {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+ return CalcSerializedSize();
+ }
+ }
+
+ private int CalcSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (hasDynamicField) {
+ size += pb::CodedOutputStream.ComputeInt32Size(2100, DynamicField);
+ }
+ size += UnknownFields.SerializedSize;
+ memoizedSerializedSize = size;
+ return size;
+ }
+ public static DynamicMessageType ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static DynamicMessageType ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static DynamicMessageType ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static DynamicMessageType ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static DynamicMessageType ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static DynamicMessageType ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static DynamicMessageType ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static DynamicMessageType ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static DynamicMessageType ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static DynamicMessageType ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private DynamicMessageType 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(DynamicMessageType prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Builder : pb::GeneratedBuilder<DynamicMessageType, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(DynamicMessageType cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private DynamicMessageType result;
+
+ private DynamicMessageType PrepareBuilder() {
+ if (resultIsReadOnly) {
+ DynamicMessageType original = result;
+ result = new DynamicMessageType();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override DynamicMessageType 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.TestDynamicExtensions.Types.DynamicMessageType.Descriptor; }
+ }
+
+ public override DynamicMessageType DefaultInstanceForType {
+ get { return global::Google.ProtocolBuffers.TestProtos.TestDynamicExtensions.Types.DynamicMessageType.DefaultInstance; }
+ }
+
+ public override DynamicMessageType BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+ public override Builder MergeFrom(pb::IMessage other) {
+ if (other is DynamicMessageType) {
+ return MergeFrom((DynamicMessageType) other);
+ } else {
+ base.MergeFrom(other);
+ return this;
+ }
+ }
+
+ public override Builder MergeFrom(DynamicMessageType other) {
+ if (other == global::Google.ProtocolBuffers.TestProtos.TestDynamicExtensions.Types.DynamicMessageType.DefaultInstance) return this;
+ PrepareBuilder();
+ if (other.HasDynamicField) {
+ DynamicField = other.DynamicField;
+ }
+ 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(_dynamicMessageTypeFieldNames, field_name, global::System.StringComparer.Ordinal);
+ if(field_ordinal >= 0)
+ tag = _dynamicMessageTypeFieldTags[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 16800: {
+ result.hasDynamicField = input.ReadInt32(ref result.dynamicField_);
+ break;
+ }
+ }
+ }
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
+ }
+
+
+ public bool HasDynamicField {
+ get { return result.hasDynamicField; }
+ }
+ public int DynamicField {
+ get { return result.DynamicField; }
+ set { SetDynamicField(value); }
+ }
+ public Builder SetDynamicField(int value) {
+ PrepareBuilder();
+ result.hasDynamicField = true;
+ result.dynamicField_ = value;
+ return this;
+ }
+ public Builder ClearDynamicField() {
+ PrepareBuilder();
+ result.hasDynamicField = false;
+ result.dynamicField_ = 0;
+ return this;
+ }
+ }
+ static DynamicMessageType() {
+ object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor, null);
+ }
+ }
+
+ }
+ #endregion
+
+ public const int ScalarExtensionFieldNumber = 2000;
+ private bool hasScalarExtension;
+ private uint scalarExtension_;
+ public bool HasScalarExtension {
+ get { return hasScalarExtension; }
+ }
+ [global::System.CLSCompliant(false)]
+ public uint ScalarExtension {
+ get { return scalarExtension_; }
+ }
+
+ public const int EnumExtensionFieldNumber = 2001;
+ private bool hasEnumExtension;
+ private global::Google.ProtocolBuffers.TestProtos.ForeignEnum enumExtension_ = global::Google.ProtocolBuffers.TestProtos.ForeignEnum.FOREIGN_FOO;
+ public bool HasEnumExtension {
+ get { return hasEnumExtension; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.ForeignEnum EnumExtension {
+ get { return enumExtension_; }
+ }
+
+ public const int DynamicEnumExtensionFieldNumber = 2002;
+ private bool hasDynamicEnumExtension;
+ private global::Google.ProtocolBuffers.TestProtos.TestDynamicExtensions.Types.DynamicEnumType dynamicEnumExtension_ = global::Google.ProtocolBuffers.TestProtos.TestDynamicExtensions.Types.DynamicEnumType.DYNAMIC_FOO;
+ public bool HasDynamicEnumExtension {
+ get { return hasDynamicEnumExtension; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestDynamicExtensions.Types.DynamicEnumType DynamicEnumExtension {
+ get { return dynamicEnumExtension_; }
+ }
+
+ public const int MessageExtensionFieldNumber = 2003;
+ private bool hasMessageExtension;
+ private global::Google.ProtocolBuffers.TestProtos.ForeignMessage messageExtension_;
+ public bool HasMessageExtension {
+ get { return hasMessageExtension; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.ForeignMessage MessageExtension {
+ get { return messageExtension_ ?? global::Google.ProtocolBuffers.TestProtos.ForeignMessage.DefaultInstance; }
+ }
+
+ public const int DynamicMessageExtensionFieldNumber = 2004;
+ private bool hasDynamicMessageExtension;
+ private global::Google.ProtocolBuffers.TestProtos.TestDynamicExtensions.Types.DynamicMessageType dynamicMessageExtension_;
+ public bool HasDynamicMessageExtension {
+ get { return hasDynamicMessageExtension; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestDynamicExtensions.Types.DynamicMessageType DynamicMessageExtension {
+ get { return dynamicMessageExtension_ ?? global::Google.ProtocolBuffers.TestProtos.TestDynamicExtensions.Types.DynamicMessageType.DefaultInstance; }
+ }
+
+ public const int RepeatedExtensionFieldNumber = 2005;
+ private pbc::PopsicleList<string> repeatedExtension_ = new pbc::PopsicleList<string>();
+ public scg::IList<string> RepeatedExtensionList {
+ get { return pbc::Lists.AsReadOnly(repeatedExtension_); }
+ }
+ public int RepeatedExtensionCount {
+ get { return repeatedExtension_.Count; }
+ }
+ public string GetRepeatedExtension(int index) {
+ return repeatedExtension_[index];
+ }
+
+ public const int PackedExtensionFieldNumber = 2006;
+ private int packedExtensionMemoizedSerializedSize;
+ private pbc::PopsicleList<int> packedExtension_ = new pbc::PopsicleList<int>();
+ public scg::IList<int> PackedExtensionList {
+ get { return pbc::Lists.AsReadOnly(packedExtension_); }
+ }
+ public int PackedExtensionCount {
+ get { return packedExtension_.Count; }
+ }
+ public int GetPackedExtension(int index) {
+ return packedExtension_[index];
+ }
+
+ public override bool IsInitialized {
+ get {
+ return true;
+ }
+ }
+
+ public override void WriteTo(pb::ICodedOutputStream output) {
+ CalcSerializedSize();
+ string[] field_names = _testDynamicExtensionsFieldNames;
+ if (hasScalarExtension) {
+ output.WriteFixed32(2000, field_names[6], ScalarExtension);
+ }
+ if (hasEnumExtension) {
+ output.WriteEnum(2001, field_names[2], (int) EnumExtension, EnumExtension);
+ }
+ if (hasDynamicEnumExtension) {
+ output.WriteEnum(2002, field_names[0], (int) DynamicEnumExtension, DynamicEnumExtension);
+ }
+ if (hasMessageExtension) {
+ output.WriteMessage(2003, field_names[3], MessageExtension);
+ }
+ if (hasDynamicMessageExtension) {
+ output.WriteMessage(2004, field_names[1], DynamicMessageExtension);
+ }
+ if (repeatedExtension_.Count > 0) {
+ output.WriteStringArray(2005, field_names[5], repeatedExtension_);
+ }
+ if (packedExtension_.Count > 0) {
+ output.WritePackedSInt32Array(2006, field_names[4], packedExtensionMemoizedSerializedSize, packedExtension_);
+ }
+ UnknownFields.WriteTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public override int SerializedSize {
+ get {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+ return CalcSerializedSize();
+ }
+ }
+
+ private int CalcSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (hasScalarExtension) {
+ size += pb::CodedOutputStream.ComputeFixed32Size(2000, ScalarExtension);
+ }
+ if (hasEnumExtension) {
+ size += pb::CodedOutputStream.ComputeEnumSize(2001, (int) EnumExtension);
+ }
+ if (hasDynamicEnumExtension) {
+ size += pb::CodedOutputStream.ComputeEnumSize(2002, (int) DynamicEnumExtension);
+ }
+ if (hasMessageExtension) {
+ size += pb::CodedOutputStream.ComputeMessageSize(2003, MessageExtension);
+ }
+ if (hasDynamicMessageExtension) {
+ size += pb::CodedOutputStream.ComputeMessageSize(2004, DynamicMessageExtension);
+ }
+ {
+ int dataSize = 0;
+ foreach (string element in RepeatedExtensionList) {
+ dataSize += pb::CodedOutputStream.ComputeStringSizeNoTag(element);
+ }
+ size += dataSize;
+ size += 2 * repeatedExtension_.Count;
+ }
+ {
+ int dataSize = 0;
+ foreach (int element in PackedExtensionList) {
+ dataSize += pb::CodedOutputStream.ComputeSInt32SizeNoTag(element);
+ }
+ size += dataSize;
+ if (packedExtension_.Count != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32SizeNoTag(dataSize);
+ }
+ packedExtensionMemoizedSerializedSize = dataSize;
+ }
+ size += UnknownFields.SerializedSize;
+ memoizedSerializedSize = size;
+ return size;
+ }
+ public static TestDynamicExtensions ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static TestDynamicExtensions ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static TestDynamicExtensions ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static TestDynamicExtensions ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static TestDynamicExtensions ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static TestDynamicExtensions ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static TestDynamicExtensions ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static TestDynamicExtensions ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static TestDynamicExtensions ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static TestDynamicExtensions ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private TestDynamicExtensions MakeReadOnly() {
+ repeatedExtension_.MakeReadOnly();
+ packedExtension_.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(TestDynamicExtensions prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Builder : pb::GeneratedBuilder<TestDynamicExtensions, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(TestDynamicExtensions cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private TestDynamicExtensions result;
+
+ private TestDynamicExtensions PrepareBuilder() {
+ if (resultIsReadOnly) {
+ TestDynamicExtensions original = result;
+ result = new TestDynamicExtensions();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override TestDynamicExtensions 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.TestDynamicExtensions.Descriptor; }
+ }
+
+ public override TestDynamicExtensions DefaultInstanceForType {
+ get { return global::Google.ProtocolBuffers.TestProtos.TestDynamicExtensions.DefaultInstance; }
+ }
+
+ public override TestDynamicExtensions BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+ public override Builder MergeFrom(pb::IMessage other) {
+ if (other is TestDynamicExtensions) {
+ return MergeFrom((TestDynamicExtensions) other);
+ } else {
+ base.MergeFrom(other);
+ return this;
+ }
+ }
+
+ public override Builder MergeFrom(TestDynamicExtensions other) {
+ if (other == global::Google.ProtocolBuffers.TestProtos.TestDynamicExtensions.DefaultInstance) return this;
+ PrepareBuilder();
+ if (other.HasScalarExtension) {
+ ScalarExtension = other.ScalarExtension;
+ }
+ if (other.HasEnumExtension) {
+ EnumExtension = other.EnumExtension;
+ }
+ if (other.HasDynamicEnumExtension) {
+ DynamicEnumExtension = other.DynamicEnumExtension;
+ }
+ if (other.HasMessageExtension) {
+ MergeMessageExtension(other.MessageExtension);
+ }
+ if (other.HasDynamicMessageExtension) {
+ MergeDynamicMessageExtension(other.DynamicMessageExtension);
+ }
+ if (other.repeatedExtension_.Count != 0) {
+ result.repeatedExtension_.Add(other.repeatedExtension_);
+ }
+ if (other.packedExtension_.Count != 0) {
+ result.packedExtension_.Add(other.packedExtension_);
+ }
+ 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(_testDynamicExtensionsFieldNames, field_name, global::System.StringComparer.Ordinal);
+ if(field_ordinal >= 0)
+ tag = _testDynamicExtensionsFieldTags[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 16005: {
+ result.hasScalarExtension = input.ReadFixed32(ref result.scalarExtension_);
+ break;
+ }
+ case 16008: {
+ object unknown;
+ if(input.ReadEnum(ref result.enumExtension_, out unknown)) {
+ result.hasEnumExtension = true;
+ } else if(unknown is int) {
+ if (unknownFields == null) {
+ unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+ }
+ unknownFields.MergeVarintField(2001, (ulong)(int)unknown);
+ }
+ break;
+ }
+ case 16016: {
+ object unknown;
+ if(input.ReadEnum(ref result.dynamicEnumExtension_, out unknown)) {
+ result.hasDynamicEnumExtension = true;
+ } else if(unknown is int) {
+ if (unknownFields == null) {
+ unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+ }
+ unknownFields.MergeVarintField(2002, (ulong)(int)unknown);
+ }
+ break;
+ }
+ case 16026: {
+ global::Google.ProtocolBuffers.TestProtos.ForeignMessage.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.ForeignMessage.CreateBuilder();
+ if (result.hasMessageExtension) {
+ subBuilder.MergeFrom(MessageExtension);
+ }
+ input.ReadMessage(subBuilder, extensionRegistry);
+ MessageExtension = subBuilder.BuildPartial();
+ break;
+ }
+ case 16034: {
+ global::Google.ProtocolBuffers.TestProtos.TestDynamicExtensions.Types.DynamicMessageType.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.TestDynamicExtensions.Types.DynamicMessageType.CreateBuilder();
+ if (result.hasDynamicMessageExtension) {
+ subBuilder.MergeFrom(DynamicMessageExtension);
+ }
+ input.ReadMessage(subBuilder, extensionRegistry);
+ DynamicMessageExtension = subBuilder.BuildPartial();
+ break;
+ }
+ case 16042: {
+ input.ReadStringArray(tag, field_name, result.repeatedExtension_);
+ break;
+ }
+ case 16050:
+ case 16048: {
+ input.ReadSInt32Array(tag, field_name, result.packedExtension_);
+ break;
+ }
+ }
+ }
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
+ }
+
+
+ public bool HasScalarExtension {
+ get { return result.hasScalarExtension; }
+ }
+ [global::System.CLSCompliant(false)]
+ public uint ScalarExtension {
+ get { return result.ScalarExtension; }
+ set { SetScalarExtension(value); }
+ }
+ [global::System.CLSCompliant(false)]
+ public Builder SetScalarExtension(uint value) {
+ PrepareBuilder();
+ result.hasScalarExtension = true;
+ result.scalarExtension_ = value;
+ return this;
+ }
+ public Builder ClearScalarExtension() {
+ PrepareBuilder();
+ result.hasScalarExtension = false;
+ result.scalarExtension_ = 0;
+ return this;
+ }
+
+ public bool HasEnumExtension {
+ get { return result.hasEnumExtension; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.ForeignEnum EnumExtension {
+ get { return result.EnumExtension; }
+ set { SetEnumExtension(value); }
+ }
+ public Builder SetEnumExtension(global::Google.ProtocolBuffers.TestProtos.ForeignEnum value) {
+ PrepareBuilder();
+ result.hasEnumExtension = true;
+ result.enumExtension_ = value;
+ return this;
+ }
+ public Builder ClearEnumExtension() {
+ PrepareBuilder();
+ result.hasEnumExtension = false;
+ result.enumExtension_ = global::Google.ProtocolBuffers.TestProtos.ForeignEnum.FOREIGN_FOO;
+ return this;
+ }
+
+ public bool HasDynamicEnumExtension {
+ get { return result.hasDynamicEnumExtension; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestDynamicExtensions.Types.DynamicEnumType DynamicEnumExtension {
+ get { return result.DynamicEnumExtension; }
+ set { SetDynamicEnumExtension(value); }
+ }
+ public Builder SetDynamicEnumExtension(global::Google.ProtocolBuffers.TestProtos.TestDynamicExtensions.Types.DynamicEnumType value) {
+ PrepareBuilder();
+ result.hasDynamicEnumExtension = true;
+ result.dynamicEnumExtension_ = value;
+ return this;
+ }
+ public Builder ClearDynamicEnumExtension() {
+ PrepareBuilder();
+ result.hasDynamicEnumExtension = false;
+ result.dynamicEnumExtension_ = global::Google.ProtocolBuffers.TestProtos.TestDynamicExtensions.Types.DynamicEnumType.DYNAMIC_FOO;
+ return this;
+ }
+
+ public bool HasMessageExtension {
+ get { return result.hasMessageExtension; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.ForeignMessage MessageExtension {
+ get { return result.MessageExtension; }
+ set { SetMessageExtension(value); }
+ }
+ public Builder SetMessageExtension(global::Google.ProtocolBuffers.TestProtos.ForeignMessage value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasMessageExtension = true;
+ result.messageExtension_ = value;
+ return this;
+ }
+ public Builder SetMessageExtension(global::Google.ProtocolBuffers.TestProtos.ForeignMessage.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.hasMessageExtension = true;
+ result.messageExtension_ = builderForValue.Build();
+ return this;
+ }
+ public Builder MergeMessageExtension(global::Google.ProtocolBuffers.TestProtos.ForeignMessage value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ if (result.hasMessageExtension &&
+ result.messageExtension_ != global::Google.ProtocolBuffers.TestProtos.ForeignMessage.DefaultInstance) {
+ result.messageExtension_ = global::Google.ProtocolBuffers.TestProtos.ForeignMessage.CreateBuilder(result.messageExtension_).MergeFrom(value).BuildPartial();
+ } else {
+ result.messageExtension_ = value;
+ }
+ result.hasMessageExtension = true;
+ return this;
+ }
+ public Builder ClearMessageExtension() {
+ PrepareBuilder();
+ result.hasMessageExtension = false;
+ result.messageExtension_ = null;
+ return this;
+ }
+
+ public bool HasDynamicMessageExtension {
+ get { return result.hasDynamicMessageExtension; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestDynamicExtensions.Types.DynamicMessageType DynamicMessageExtension {
+ get { return result.DynamicMessageExtension; }
+ set { SetDynamicMessageExtension(value); }
+ }
+ public Builder SetDynamicMessageExtension(global::Google.ProtocolBuffers.TestProtos.TestDynamicExtensions.Types.DynamicMessageType value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasDynamicMessageExtension = true;
+ result.dynamicMessageExtension_ = value;
+ return this;
+ }
+ public Builder SetDynamicMessageExtension(global::Google.ProtocolBuffers.TestProtos.TestDynamicExtensions.Types.DynamicMessageType.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.hasDynamicMessageExtension = true;
+ result.dynamicMessageExtension_ = builderForValue.Build();
+ return this;
+ }
+ public Builder MergeDynamicMessageExtension(global::Google.ProtocolBuffers.TestProtos.TestDynamicExtensions.Types.DynamicMessageType value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ if (result.hasDynamicMessageExtension &&
+ result.dynamicMessageExtension_ != global::Google.ProtocolBuffers.TestProtos.TestDynamicExtensions.Types.DynamicMessageType.DefaultInstance) {
+ result.dynamicMessageExtension_ = global::Google.ProtocolBuffers.TestProtos.TestDynamicExtensions.Types.DynamicMessageType.CreateBuilder(result.dynamicMessageExtension_).MergeFrom(value).BuildPartial();
+ } else {
+ result.dynamicMessageExtension_ = value;
+ }
+ result.hasDynamicMessageExtension = true;
+ return this;
+ }
+ public Builder ClearDynamicMessageExtension() {
+ PrepareBuilder();
+ result.hasDynamicMessageExtension = false;
+ result.dynamicMessageExtension_ = null;
+ return this;
+ }
+
+ public pbc::IPopsicleList<string> RepeatedExtensionList {
+ get { return PrepareBuilder().repeatedExtension_; }
+ }
+ public int RepeatedExtensionCount {
+ get { return result.RepeatedExtensionCount; }
+ }
+ public string GetRepeatedExtension(int index) {
+ return result.GetRepeatedExtension(index);
+ }
+ public Builder SetRepeatedExtension(int index, string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.repeatedExtension_[index] = value;
+ return this;
+ }
+ public Builder AddRepeatedExtension(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.repeatedExtension_.Add(value);
+ return this;
+ }
+ public Builder AddRangeRepeatedExtension(scg::IEnumerable<string> values) {
+ PrepareBuilder();
+ result.repeatedExtension_.Add(values);
+ return this;
+ }
+ public Builder ClearRepeatedExtension() {
+ PrepareBuilder();
+ result.repeatedExtension_.Clear();
+ return this;
+ }
+
+ public pbc::IPopsicleList<int> PackedExtensionList {
+ get { return PrepareBuilder().packedExtension_; }
+ }
+ public int PackedExtensionCount {
+ get { return result.PackedExtensionCount; }
+ }
+ public int GetPackedExtension(int index) {
+ return result.GetPackedExtension(index);
+ }
+ public Builder SetPackedExtension(int index, int value) {
+ PrepareBuilder();
+ result.packedExtension_[index] = value;
+ return this;
+ }
+ public Builder AddPackedExtension(int value) {
+ PrepareBuilder();
+ result.packedExtension_.Add(value);
+ return this;
+ }
+ public Builder AddRangePackedExtension(scg::IEnumerable<int> values) {
+ PrepareBuilder();
+ result.packedExtension_.Add(values);
+ return this;
+ }
+ public Builder ClearPackedExtension() {
+ PrepareBuilder();
+ result.packedExtension_.Clear();
+ return this;
+ }
+ }
+ static TestDynamicExtensions() {
+ object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor, null);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class TestRepeatedScalarDifferentTagSizes : pb::GeneratedMessage<TestRepeatedScalarDifferentTagSizes, TestRepeatedScalarDifferentTagSizes.Builder> {
+ private TestRepeatedScalarDifferentTagSizes() { }
+ private static readonly TestRepeatedScalarDifferentTagSizes defaultInstance = new TestRepeatedScalarDifferentTagSizes().MakeReadOnly();
+ private static readonly string[] _testRepeatedScalarDifferentTagSizesFieldNames = new string[] { "repeated_fixed32", "repeated_fixed64", "repeated_float", "repeated_int32", "repeated_int64", "repeated_uint64" };
+ private static readonly uint[] _testRepeatedScalarDifferentTagSizesFieldTags = new uint[] { 101, 16369, 2097141, 104, 16376, 2097144 };
+ public static TestRepeatedScalarDifferentTagSizes DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override TestRepeatedScalarDifferentTagSizes DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override TestRepeatedScalarDifferentTagSizes ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestRepeatedScalarDifferentTagSizes__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<TestRepeatedScalarDifferentTagSizes, TestRepeatedScalarDifferentTagSizes.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestRepeatedScalarDifferentTagSizes__FieldAccessorTable; }
+ }
+
+ public const int RepeatedFixed32FieldNumber = 12;
+ private pbc::PopsicleList<uint> repeatedFixed32_ = new pbc::PopsicleList<uint>();
+ [global::System.CLSCompliant(false)]
+ public scg::IList<uint> RepeatedFixed32List {
+ get { return pbc::Lists.AsReadOnly(repeatedFixed32_); }
+ }
+ public int RepeatedFixed32Count {
+ get { return repeatedFixed32_.Count; }
+ }
+ [global::System.CLSCompliant(false)]
+ public uint GetRepeatedFixed32(int index) {
+ return repeatedFixed32_[index];
+ }
+
+ public const int RepeatedInt32FieldNumber = 13;
+ private pbc::PopsicleList<int> repeatedInt32_ = new pbc::PopsicleList<int>();
+ public scg::IList<int> RepeatedInt32List {
+ get { return pbc::Lists.AsReadOnly(repeatedInt32_); }
+ }
+ public int RepeatedInt32Count {
+ get { return repeatedInt32_.Count; }
+ }
+ public int GetRepeatedInt32(int index) {
+ return repeatedInt32_[index];
+ }
+
+ public const int RepeatedFixed64FieldNumber = 2046;
+ private pbc::PopsicleList<ulong> repeatedFixed64_ = new pbc::PopsicleList<ulong>();
+ [global::System.CLSCompliant(false)]
+ public scg::IList<ulong> RepeatedFixed64List {
+ get { return pbc::Lists.AsReadOnly(repeatedFixed64_); }
+ }
+ public int RepeatedFixed64Count {
+ get { return repeatedFixed64_.Count; }
+ }
+ [global::System.CLSCompliant(false)]
+ public ulong GetRepeatedFixed64(int index) {
+ return repeatedFixed64_[index];
+ }
+
+ public const int RepeatedInt64FieldNumber = 2047;
+ private pbc::PopsicleList<long> repeatedInt64_ = new pbc::PopsicleList<long>();
+ public scg::IList<long> RepeatedInt64List {
+ get { return pbc::Lists.AsReadOnly(repeatedInt64_); }
+ }
+ public int RepeatedInt64Count {
+ get { return repeatedInt64_.Count; }
+ }
+ public long GetRepeatedInt64(int index) {
+ return repeatedInt64_[index];
+ }
+
+ public const int RepeatedFloatFieldNumber = 262142;
+ private pbc::PopsicleList<float> repeatedFloat_ = new pbc::PopsicleList<float>();
+ public scg::IList<float> RepeatedFloatList {
+ get { return pbc::Lists.AsReadOnly(repeatedFloat_); }
+ }
+ public int RepeatedFloatCount {
+ get { return repeatedFloat_.Count; }
+ }
+ public float GetRepeatedFloat(int index) {
+ return repeatedFloat_[index];
+ }
+
+ public const int RepeatedUint64FieldNumber = 262143;
+ private pbc::PopsicleList<ulong> repeatedUint64_ = new pbc::PopsicleList<ulong>();
+ [global::System.CLSCompliant(false)]
+ public scg::IList<ulong> RepeatedUint64List {
+ get { return pbc::Lists.AsReadOnly(repeatedUint64_); }
+ }
+ public int RepeatedUint64Count {
+ get { return repeatedUint64_.Count; }
+ }
+ [global::System.CLSCompliant(false)]
+ public ulong GetRepeatedUint64(int index) {
+ return repeatedUint64_[index];
+ }
+
+ public override bool IsInitialized {
+ get {
+ return true;
+ }
+ }
+
+ public override void WriteTo(pb::ICodedOutputStream output) {
+ CalcSerializedSize();
+ string[] field_names = _testRepeatedScalarDifferentTagSizesFieldNames;
+ if (repeatedFixed32_.Count > 0) {
+ output.WriteFixed32Array(12, field_names[0], repeatedFixed32_);
+ }
+ if (repeatedInt32_.Count > 0) {
+ output.WriteInt32Array(13, field_names[3], repeatedInt32_);
+ }
+ if (repeatedFixed64_.Count > 0) {
+ output.WriteFixed64Array(2046, field_names[1], repeatedFixed64_);
+ }
+ if (repeatedInt64_.Count > 0) {
+ output.WriteInt64Array(2047, field_names[4], repeatedInt64_);
+ }
+ if (repeatedFloat_.Count > 0) {
+ output.WriteFloatArray(262142, field_names[2], repeatedFloat_);
+ }
+ if (repeatedUint64_.Count > 0) {
+ output.WriteUInt64Array(262143, field_names[5], repeatedUint64_);
+ }
+ UnknownFields.WriteTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public override int SerializedSize {
+ get {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+ return CalcSerializedSize();
+ }
+ }
+
+ private int CalcSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ {
+ int dataSize = 0;
+ dataSize = 4 * repeatedFixed32_.Count;
+ size += dataSize;
+ size += 1 * repeatedFixed32_.Count;
+ }
+ {
+ int dataSize = 0;
+ foreach (int element in RepeatedInt32List) {
+ dataSize += pb::CodedOutputStream.ComputeInt32SizeNoTag(element);
+ }
+ size += dataSize;
+ size += 1 * repeatedInt32_.Count;
+ }
+ {
+ int dataSize = 0;
+ dataSize = 8 * repeatedFixed64_.Count;
+ size += dataSize;
+ size += 2 * repeatedFixed64_.Count;
+ }
+ {
+ int dataSize = 0;
+ foreach (long element in RepeatedInt64List) {
+ dataSize += pb::CodedOutputStream.ComputeInt64SizeNoTag(element);
+ }
+ size += dataSize;
+ size += 2 * repeatedInt64_.Count;
+ }
+ {
+ int dataSize = 0;
+ dataSize = 4 * repeatedFloat_.Count;
+ size += dataSize;
+ size += 3 * repeatedFloat_.Count;
+ }
+ {
+ int dataSize = 0;
+ foreach (ulong element in RepeatedUint64List) {
+ dataSize += pb::CodedOutputStream.ComputeUInt64SizeNoTag(element);
+ }
+ size += dataSize;
+ size += 3 * repeatedUint64_.Count;
+ }
+ size += UnknownFields.SerializedSize;
+ memoizedSerializedSize = size;
+ return size;
+ }
+ public static TestRepeatedScalarDifferentTagSizes ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static TestRepeatedScalarDifferentTagSizes ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static TestRepeatedScalarDifferentTagSizes ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static TestRepeatedScalarDifferentTagSizes ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static TestRepeatedScalarDifferentTagSizes ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static TestRepeatedScalarDifferentTagSizes ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static TestRepeatedScalarDifferentTagSizes ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static TestRepeatedScalarDifferentTagSizes ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static TestRepeatedScalarDifferentTagSizes ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static TestRepeatedScalarDifferentTagSizes ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private TestRepeatedScalarDifferentTagSizes MakeReadOnly() {
+ repeatedFixed32_.MakeReadOnly();
+ repeatedInt32_.MakeReadOnly();
+ repeatedFixed64_.MakeReadOnly();
+ repeatedInt64_.MakeReadOnly();
+ repeatedFloat_.MakeReadOnly();
+ repeatedUint64_.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(TestRepeatedScalarDifferentTagSizes prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Builder : pb::GeneratedBuilder<TestRepeatedScalarDifferentTagSizes, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(TestRepeatedScalarDifferentTagSizes cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private TestRepeatedScalarDifferentTagSizes result;
+
+ private TestRepeatedScalarDifferentTagSizes PrepareBuilder() {
+ if (resultIsReadOnly) {
+ TestRepeatedScalarDifferentTagSizes original = result;
+ result = new TestRepeatedScalarDifferentTagSizes();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override TestRepeatedScalarDifferentTagSizes 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.TestRepeatedScalarDifferentTagSizes.Descriptor; }
+ }
+
+ public override TestRepeatedScalarDifferentTagSizes DefaultInstanceForType {
+ get { return global::Google.ProtocolBuffers.TestProtos.TestRepeatedScalarDifferentTagSizes.DefaultInstance; }
+ }
+
+ public override TestRepeatedScalarDifferentTagSizes BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+ public override Builder MergeFrom(pb::IMessage other) {
+ if (other is TestRepeatedScalarDifferentTagSizes) {
+ return MergeFrom((TestRepeatedScalarDifferentTagSizes) other);
+ } else {
+ base.MergeFrom(other);
+ return this;
+ }
+ }
+
+ public override Builder MergeFrom(TestRepeatedScalarDifferentTagSizes other) {
+ if (other == global::Google.ProtocolBuffers.TestProtos.TestRepeatedScalarDifferentTagSizes.DefaultInstance) return this;
+ PrepareBuilder();
+ if (other.repeatedFixed32_.Count != 0) {
+ result.repeatedFixed32_.Add(other.repeatedFixed32_);
+ }
+ if (other.repeatedInt32_.Count != 0) {
+ result.repeatedInt32_.Add(other.repeatedInt32_);
+ }
+ if (other.repeatedFixed64_.Count != 0) {
+ result.repeatedFixed64_.Add(other.repeatedFixed64_);
+ }
+ if (other.repeatedInt64_.Count != 0) {
+ result.repeatedInt64_.Add(other.repeatedInt64_);
+ }
+ if (other.repeatedFloat_.Count != 0) {
+ result.repeatedFloat_.Add(other.repeatedFloat_);
+ }
+ if (other.repeatedUint64_.Count != 0) {
+ result.repeatedUint64_.Add(other.repeatedUint64_);
+ }
+ 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(_testRepeatedScalarDifferentTagSizesFieldNames, field_name, global::System.StringComparer.Ordinal);
+ if(field_ordinal >= 0)
+ tag = _testRepeatedScalarDifferentTagSizesFieldTags[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 98:
+ case 101: {
+ input.ReadFixed32Array(tag, field_name, result.repeatedFixed32_);
+ break;
+ }
+ case 106:
+ case 104: {
+ input.ReadInt32Array(tag, field_name, result.repeatedInt32_);
+ break;
+ }
+ case 16370:
+ case 16369: {
+ input.ReadFixed64Array(tag, field_name, result.repeatedFixed64_);
+ break;
+ }
+ case 16378:
+ case 16376: {
+ input.ReadInt64Array(tag, field_name, result.repeatedInt64_);
+ break;
+ }
+ case 2097138:
+ case 2097141: {
+ input.ReadFloatArray(tag, field_name, result.repeatedFloat_);
+ break;
+ }
+ case 2097146:
+ case 2097144: {
+ input.ReadUInt64Array(tag, field_name, result.repeatedUint64_);
+ break;
+ }
+ }
+ }
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
+ }
+
+
+ [global::System.CLSCompliant(false)]
+ public pbc::IPopsicleList<uint> RepeatedFixed32List {
+ get { return PrepareBuilder().repeatedFixed32_; }
+ }
+ public int RepeatedFixed32Count {
+ get { return result.RepeatedFixed32Count; }
+ }
+ [global::System.CLSCompliant(false)]
+ public uint GetRepeatedFixed32(int index) {
+ return result.GetRepeatedFixed32(index);
+ }
+ [global::System.CLSCompliant(false)]
+ public Builder SetRepeatedFixed32(int index, uint value) {
+ PrepareBuilder();
+ result.repeatedFixed32_[index] = value;
+ return this;
+ }
+ [global::System.CLSCompliant(false)]
+ public Builder AddRepeatedFixed32(uint value) {
+ PrepareBuilder();
+ result.repeatedFixed32_.Add(value);
+ return this;
+ }
+ [global::System.CLSCompliant(false)]
+ public Builder AddRangeRepeatedFixed32(scg::IEnumerable<uint> values) {
+ PrepareBuilder();
+ result.repeatedFixed32_.Add(values);
+ return this;
+ }
+ public Builder ClearRepeatedFixed32() {
+ PrepareBuilder();
+ result.repeatedFixed32_.Clear();
+ return this;
+ }
+
+ public pbc::IPopsicleList<int> RepeatedInt32List {
+ get { return PrepareBuilder().repeatedInt32_; }
+ }
+ public int RepeatedInt32Count {
+ get { return result.RepeatedInt32Count; }
+ }
+ public int GetRepeatedInt32(int index) {
+ return result.GetRepeatedInt32(index);
+ }
+ public Builder SetRepeatedInt32(int index, int value) {
+ PrepareBuilder();
+ result.repeatedInt32_[index] = value;
+ return this;
+ }
+ public Builder AddRepeatedInt32(int value) {
+ PrepareBuilder();
+ result.repeatedInt32_.Add(value);
+ return this;
+ }
+ public Builder AddRangeRepeatedInt32(scg::IEnumerable<int> values) {
+ PrepareBuilder();
+ result.repeatedInt32_.Add(values);
+ return this;
+ }
+ public Builder ClearRepeatedInt32() {
+ PrepareBuilder();
+ result.repeatedInt32_.Clear();
+ return this;
+ }
+
+ [global::System.CLSCompliant(false)]
+ public pbc::IPopsicleList<ulong> RepeatedFixed64List {
+ get { return PrepareBuilder().repeatedFixed64_; }
+ }
+ public int RepeatedFixed64Count {
+ get { return result.RepeatedFixed64Count; }
+ }
+ [global::System.CLSCompliant(false)]
+ public ulong GetRepeatedFixed64(int index) {
+ return result.GetRepeatedFixed64(index);
+ }
+ [global::System.CLSCompliant(false)]
+ public Builder SetRepeatedFixed64(int index, ulong value) {
+ PrepareBuilder();
+ result.repeatedFixed64_[index] = value;
+ return this;
+ }
+ [global::System.CLSCompliant(false)]
+ public Builder AddRepeatedFixed64(ulong value) {
+ PrepareBuilder();
+ result.repeatedFixed64_.Add(value);
+ return this;
+ }
+ [global::System.CLSCompliant(false)]
+ public Builder AddRangeRepeatedFixed64(scg::IEnumerable<ulong> values) {
+ PrepareBuilder();
+ result.repeatedFixed64_.Add(values);
+ return this;
+ }
+ public Builder ClearRepeatedFixed64() {
+ PrepareBuilder();
+ result.repeatedFixed64_.Clear();
+ return this;
+ }
+
+ public pbc::IPopsicleList<long> RepeatedInt64List {
+ get { return PrepareBuilder().repeatedInt64_; }
+ }
+ public int RepeatedInt64Count {
+ get { return result.RepeatedInt64Count; }
+ }
+ public long GetRepeatedInt64(int index) {
+ return result.GetRepeatedInt64(index);
+ }
+ public Builder SetRepeatedInt64(int index, long value) {
+ PrepareBuilder();
+ result.repeatedInt64_[index] = value;
+ return this;
+ }
+ public Builder AddRepeatedInt64(long value) {
+ PrepareBuilder();
+ result.repeatedInt64_.Add(value);
+ return this;
+ }
+ public Builder AddRangeRepeatedInt64(scg::IEnumerable<long> values) {
+ PrepareBuilder();
+ result.repeatedInt64_.Add(values);
+ return this;
+ }
+ public Builder ClearRepeatedInt64() {
+ PrepareBuilder();
+ result.repeatedInt64_.Clear();
+ return this;
+ }
+
+ public pbc::IPopsicleList<float> RepeatedFloatList {
+ get { return PrepareBuilder().repeatedFloat_; }
+ }
+ public int RepeatedFloatCount {
+ get { return result.RepeatedFloatCount; }
+ }
+ public float GetRepeatedFloat(int index) {
+ return result.GetRepeatedFloat(index);
+ }
+ public Builder SetRepeatedFloat(int index, float value) {
+ PrepareBuilder();
+ result.repeatedFloat_[index] = value;
+ return this;
+ }
+ public Builder AddRepeatedFloat(float value) {
+ PrepareBuilder();
+ result.repeatedFloat_.Add(value);
+ return this;
+ }
+ public Builder AddRangeRepeatedFloat(scg::IEnumerable<float> values) {
+ PrepareBuilder();
+ result.repeatedFloat_.Add(values);
+ return this;
+ }
+ public Builder ClearRepeatedFloat() {
+ PrepareBuilder();
+ result.repeatedFloat_.Clear();
+ return this;
+ }
+
+ [global::System.CLSCompliant(false)]
+ public pbc::IPopsicleList<ulong> RepeatedUint64List {
+ get { return PrepareBuilder().repeatedUint64_; }
+ }
+ public int RepeatedUint64Count {
+ get { return result.RepeatedUint64Count; }
+ }
+ [global::System.CLSCompliant(false)]
+ public ulong GetRepeatedUint64(int index) {
+ return result.GetRepeatedUint64(index);
+ }
+ [global::System.CLSCompliant(false)]
+ public Builder SetRepeatedUint64(int index, ulong value) {
+ PrepareBuilder();
+ result.repeatedUint64_[index] = value;
+ return this;
+ }
+ [global::System.CLSCompliant(false)]
+ public Builder AddRepeatedUint64(ulong value) {
+ PrepareBuilder();
+ result.repeatedUint64_.Add(value);
+ return this;
+ }
+ [global::System.CLSCompliant(false)]
+ public Builder AddRangeRepeatedUint64(scg::IEnumerable<ulong> values) {
+ PrepareBuilder();
+ result.repeatedUint64_.Add(values);
+ return this;
+ }
+ public Builder ClearRepeatedUint64() {
+ PrepareBuilder();
+ result.repeatedUint64_.Clear();
+ return this;
+ }
+ }
+ static TestRepeatedScalarDifferentTagSizes() {
+ object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor, null);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class TestParsingMerge : pb::ExtendableMessage<TestParsingMerge, TestParsingMerge.Builder> {
+ private TestParsingMerge() { }
+ private static readonly TestParsingMerge defaultInstance = new TestParsingMerge().MakeReadOnly();
+ private static readonly string[] _testParsingMergeFieldNames = new string[] { "optional_all_types", "optionalgroup", "repeated_all_types", "repeatedgroup", "required_all_types" };
+ private static readonly uint[] _testParsingMergeFieldTags = new uint[] { 18, 83, 26, 163, 10 };
+ public static TestParsingMerge DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override TestParsingMerge DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override TestParsingMerge ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestParsingMerge__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<TestParsingMerge, TestParsingMerge.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestParsingMerge__FieldAccessorTable; }
+ }
+
+ public const int OptionalExtFieldNumber = 1000;
+ public static pb::GeneratedExtensionBase<global::Google.ProtocolBuffers.TestProtos.TestAllTypes> OptionalExt;
+ public const int RepeatedExtFieldNumber = 1001;
+ public static pb::GeneratedExtensionBase<scg::IList<global::Google.ProtocolBuffers.TestProtos.TestAllTypes>> RepeatedExt;
+ #region Nested types
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public static partial class Types {
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class RepeatedFieldsGenerator : pb::GeneratedMessage<RepeatedFieldsGenerator, RepeatedFieldsGenerator.Builder> {
+ private RepeatedFieldsGenerator() { }
+ private static readonly RepeatedFieldsGenerator defaultInstance = new RepeatedFieldsGenerator().MakeReadOnly();
+ private static readonly string[] _repeatedFieldsGeneratorFieldNames = new string[] { "ext1", "ext2", "field1", "field2", "field3", "group1", "group2" };
+ private static readonly uint[] _repeatedFieldsGeneratorFieldTags = new uint[] { 8002, 8010, 10, 18, 26, 83, 163 };
+ public static RepeatedFieldsGenerator DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override RepeatedFieldsGenerator DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override RepeatedFieldsGenerator ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestParsingMerge_RepeatedFieldsGenerator__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<RepeatedFieldsGenerator, RepeatedFieldsGenerator.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestParsingMerge_RepeatedFieldsGenerator__FieldAccessorTable; }
+ }
+
+ #region Nested types
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public static partial class Types {
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Group1 : pb::GeneratedMessage<Group1, Group1.Builder> {
+ private Group1() { }
+ private static readonly Group1 defaultInstance = new Group1().MakeReadOnly();
+ private static readonly string[] _group1FieldNames = new string[] { "field1" };
+ private static readonly uint[] _group1FieldTags = new uint[] { 90 };
+ public static Group1 DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override Group1 DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override Group1 ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestParsingMerge_RepeatedFieldsGenerator_Group1__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<Group1, Group1.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestParsingMerge_RepeatedFieldsGenerator_Group1__FieldAccessorTable; }
+ }
+
+ public const int Field1FieldNumber = 11;
+ private bool hasField1;
+ private global::Google.ProtocolBuffers.TestProtos.TestAllTypes field1_;
+ public bool HasField1 {
+ get { return hasField1; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestAllTypes Field1 {
+ get { return field1_ ?? global::Google.ProtocolBuffers.TestProtos.TestAllTypes.DefaultInstance; }
+ }
+
+ public override bool IsInitialized {
+ get {
+ return true;
+ }
+ }
+
+ public override void WriteTo(pb::ICodedOutputStream output) {
+ CalcSerializedSize();
+ string[] field_names = _group1FieldNames;
+ if (hasField1) {
+ output.WriteMessage(11, field_names[0], Field1);
+ }
+ UnknownFields.WriteTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public override int SerializedSize {
+ get {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+ return CalcSerializedSize();
+ }
+ }
+
+ private int CalcSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (hasField1) {
+ size += pb::CodedOutputStream.ComputeMessageSize(11, Field1);
+ }
+ size += UnknownFields.SerializedSize;
+ memoizedSerializedSize = size;
+ return size;
+ }
+ public static Group1 ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static Group1 ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static Group1 ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static Group1 ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static Group1 ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static Group1 ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static Group1 ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static Group1 ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static Group1 ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static Group1 ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private Group1 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(Group1 prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Builder : pb::GeneratedBuilder<Group1, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(Group1 cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private Group1 result;
+
+ private Group1 PrepareBuilder() {
+ if (resultIsReadOnly) {
+ Group1 original = result;
+ result = new Group1();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override Group1 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.TestParsingMerge.Types.RepeatedFieldsGenerator.Types.Group1.Descriptor; }
+ }
+
+ public override Group1 DefaultInstanceForType {
+ get { return global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Types.RepeatedFieldsGenerator.Types.Group1.DefaultInstance; }
+ }
+
+ public override Group1 BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+ public override Builder MergeFrom(pb::IMessage other) {
+ if (other is Group1) {
+ return MergeFrom((Group1) other);
+ } else {
+ base.MergeFrom(other);
+ return this;
+ }
+ }
+
+ public override Builder MergeFrom(Group1 other) {
+ if (other == global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Types.RepeatedFieldsGenerator.Types.Group1.DefaultInstance) return this;
+ PrepareBuilder();
+ if (other.HasField1) {
+ MergeField1(other.Field1);
+ }
+ 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(_group1FieldNames, field_name, global::System.StringComparer.Ordinal);
+ if(field_ordinal >= 0)
+ tag = _group1FieldTags[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 90: {
+ global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.TestAllTypes.CreateBuilder();
+ if (result.hasField1) {
+ subBuilder.MergeFrom(Field1);
+ }
+ input.ReadMessage(subBuilder, extensionRegistry);
+ Field1 = subBuilder.BuildPartial();
+ break;
+ }
+ }
+ }
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
+ }
+
+
+ public bool HasField1 {
+ get { return result.hasField1; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestAllTypes Field1 {
+ get { return result.Field1; }
+ set { SetField1(value); }
+ }
+ public Builder SetField1(global::Google.ProtocolBuffers.TestProtos.TestAllTypes value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasField1 = true;
+ result.field1_ = value;
+ return this;
+ }
+ public Builder SetField1(global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.hasField1 = true;
+ result.field1_ = builderForValue.Build();
+ return this;
+ }
+ public Builder MergeField1(global::Google.ProtocolBuffers.TestProtos.TestAllTypes value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ if (result.hasField1 &&
+ result.field1_ != global::Google.ProtocolBuffers.TestProtos.TestAllTypes.DefaultInstance) {
+ result.field1_ = global::Google.ProtocolBuffers.TestProtos.TestAllTypes.CreateBuilder(result.field1_).MergeFrom(value).BuildPartial();
+ } else {
+ result.field1_ = value;
+ }
+ result.hasField1 = true;
+ return this;
+ }
+ public Builder ClearField1() {
+ PrepareBuilder();
+ result.hasField1 = false;
+ result.field1_ = null;
+ return this;
+ }
+ }
+ static Group1() {
+ object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor, null);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Group2 : pb::GeneratedMessage<Group2, Group2.Builder> {
+ private Group2() { }
+ private static readonly Group2 defaultInstance = new Group2().MakeReadOnly();
+ private static readonly string[] _group2FieldNames = new string[] { "field1" };
+ private static readonly uint[] _group2FieldTags = new uint[] { 170 };
+ public static Group2 DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override Group2 DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override Group2 ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestParsingMerge_RepeatedFieldsGenerator_Group2__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<Group2, Group2.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestParsingMerge_RepeatedFieldsGenerator_Group2__FieldAccessorTable; }
+ }
+
+ public const int Field1FieldNumber = 21;
+ private bool hasField1;
+ private global::Google.ProtocolBuffers.TestProtos.TestAllTypes field1_;
+ public bool HasField1 {
+ get { return hasField1; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestAllTypes Field1 {
+ get { return field1_ ?? global::Google.ProtocolBuffers.TestProtos.TestAllTypes.DefaultInstance; }
+ }
+
+ public override bool IsInitialized {
+ get {
+ return true;
+ }
+ }
+
+ public override void WriteTo(pb::ICodedOutputStream output) {
+ CalcSerializedSize();
+ string[] field_names = _group2FieldNames;
+ if (hasField1) {
+ output.WriteMessage(21, field_names[0], Field1);
+ }
+ UnknownFields.WriteTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public override int SerializedSize {
+ get {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+ return CalcSerializedSize();
+ }
+ }
+
+ private int CalcSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (hasField1) {
+ size += pb::CodedOutputStream.ComputeMessageSize(21, Field1);
+ }
+ size += UnknownFields.SerializedSize;
+ memoizedSerializedSize = size;
+ return size;
+ }
+ public static Group2 ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static Group2 ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static Group2 ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static Group2 ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static Group2 ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static Group2 ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static Group2 ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static Group2 ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static Group2 ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static Group2 ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private Group2 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(Group2 prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Builder : pb::GeneratedBuilder<Group2, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(Group2 cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private Group2 result;
+
+ private Group2 PrepareBuilder() {
+ if (resultIsReadOnly) {
+ Group2 original = result;
+ result = new Group2();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override Group2 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.TestParsingMerge.Types.RepeatedFieldsGenerator.Types.Group2.Descriptor; }
+ }
+
+ public override Group2 DefaultInstanceForType {
+ get { return global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Types.RepeatedFieldsGenerator.Types.Group2.DefaultInstance; }
+ }
+
+ public override Group2 BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+ public override Builder MergeFrom(pb::IMessage other) {
+ if (other is Group2) {
+ return MergeFrom((Group2) other);
+ } else {
+ base.MergeFrom(other);
+ return this;
+ }
+ }
+
+ public override Builder MergeFrom(Group2 other) {
+ if (other == global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Types.RepeatedFieldsGenerator.Types.Group2.DefaultInstance) return this;
+ PrepareBuilder();
+ if (other.HasField1) {
+ MergeField1(other.Field1);
+ }
+ 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(_group2FieldNames, field_name, global::System.StringComparer.Ordinal);
+ if(field_ordinal >= 0)
+ tag = _group2FieldTags[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 170: {
+ global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.TestAllTypes.CreateBuilder();
+ if (result.hasField1) {
+ subBuilder.MergeFrom(Field1);
+ }
+ input.ReadMessage(subBuilder, extensionRegistry);
+ Field1 = subBuilder.BuildPartial();
+ break;
+ }
+ }
+ }
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
+ }
+
+
+ public bool HasField1 {
+ get { return result.hasField1; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestAllTypes Field1 {
+ get { return result.Field1; }
+ set { SetField1(value); }
+ }
+ public Builder SetField1(global::Google.ProtocolBuffers.TestProtos.TestAllTypes value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasField1 = true;
+ result.field1_ = value;
+ return this;
+ }
+ public Builder SetField1(global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.hasField1 = true;
+ result.field1_ = builderForValue.Build();
+ return this;
+ }
+ public Builder MergeField1(global::Google.ProtocolBuffers.TestProtos.TestAllTypes value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ if (result.hasField1 &&
+ result.field1_ != global::Google.ProtocolBuffers.TestProtos.TestAllTypes.DefaultInstance) {
+ result.field1_ = global::Google.ProtocolBuffers.TestProtos.TestAllTypes.CreateBuilder(result.field1_).MergeFrom(value).BuildPartial();
+ } else {
+ result.field1_ = value;
+ }
+ result.hasField1 = true;
+ return this;
+ }
+ public Builder ClearField1() {
+ PrepareBuilder();
+ result.hasField1 = false;
+ result.field1_ = null;
+ return this;
+ }
+ }
+ static Group2() {
+ object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor, null);
+ }
+ }
+
+ }
+ #endregion
+
+ public const int Field1FieldNumber = 1;
+ private pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.TestAllTypes> field1_ = new pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.TestAllTypes>();
+ public scg::IList<global::Google.ProtocolBuffers.TestProtos.TestAllTypes> Field1List {
+ get { return field1_; }
+ }
+ public int Field1Count {
+ get { return field1_.Count; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestAllTypes GetField1(int index) {
+ return field1_[index];
+ }
+
+ public const int Field2FieldNumber = 2;
+ private pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.TestAllTypes> field2_ = new pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.TestAllTypes>();
+ public scg::IList<global::Google.ProtocolBuffers.TestProtos.TestAllTypes> Field2List {
+ get { return field2_; }
+ }
+ public int Field2Count {
+ get { return field2_.Count; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestAllTypes GetField2(int index) {
+ return field2_[index];
+ }
+
+ public const int Field3FieldNumber = 3;
+ private pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.TestAllTypes> field3_ = new pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.TestAllTypes>();
+ public scg::IList<global::Google.ProtocolBuffers.TestProtos.TestAllTypes> Field3List {
+ get { return field3_; }
+ }
+ public int Field3Count {
+ get { return field3_.Count; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestAllTypes GetField3(int index) {
+ return field3_[index];
+ }
+
+ public const int Group1FieldNumber = 10;
+ private pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Types.RepeatedFieldsGenerator.Types.Group1> group1_ = new pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Types.RepeatedFieldsGenerator.Types.Group1>();
+ public scg::IList<global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Types.RepeatedFieldsGenerator.Types.Group1> Group1List {
+ get { return group1_; }
+ }
+ public int Group1Count {
+ get { return group1_.Count; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Types.RepeatedFieldsGenerator.Types.Group1 GetGroup1(int index) {
+ return group1_[index];
+ }
+
+ public const int Group2FieldNumber = 20;
+ private pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Types.RepeatedFieldsGenerator.Types.Group2> group2_ = new pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Types.RepeatedFieldsGenerator.Types.Group2>();
+ public scg::IList<global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Types.RepeatedFieldsGenerator.Types.Group2> Group2List {
+ get { return group2_; }
+ }
+ public int Group2Count {
+ get { return group2_.Count; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Types.RepeatedFieldsGenerator.Types.Group2 GetGroup2(int index) {
+ return group2_[index];
+ }
+
+ public const int Ext1FieldNumber = 1000;
+ private pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.TestAllTypes> ext1_ = new pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.TestAllTypes>();
+ public scg::IList<global::Google.ProtocolBuffers.TestProtos.TestAllTypes> Ext1List {
+ get { return ext1_; }
+ }
+ public int Ext1Count {
+ get { return ext1_.Count; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestAllTypes GetExt1(int index) {
+ return ext1_[index];
+ }
+
+ public const int Ext2FieldNumber = 1001;
+ private pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.TestAllTypes> ext2_ = new pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.TestAllTypes>();
+ public scg::IList<global::Google.ProtocolBuffers.TestProtos.TestAllTypes> Ext2List {
+ get { return ext2_; }
+ }
+ public int Ext2Count {
+ get { return ext2_.Count; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestAllTypes GetExt2(int index) {
+ return ext2_[index];
+ }
+
+ public override bool IsInitialized {
+ get {
+ return true;
+ }
+ }
+
+ public override void WriteTo(pb::ICodedOutputStream output) {
+ CalcSerializedSize();
+ string[] field_names = _repeatedFieldsGeneratorFieldNames;
+ if (field1_.Count > 0) {
+ output.WriteMessageArray(1, field_names[2], field1_);
+ }
+ if (field2_.Count > 0) {
+ output.WriteMessageArray(2, field_names[3], field2_);
+ }
+ if (field3_.Count > 0) {
+ output.WriteMessageArray(3, field_names[4], field3_);
+ }
+ if (group1_.Count > 0) {
+ output.WriteGroupArray(10, field_names[5], group1_);
+ }
+ if (group2_.Count > 0) {
+ output.WriteGroupArray(20, field_names[6], group2_);
+ }
+ if (ext1_.Count > 0) {
+ output.WriteMessageArray(1000, field_names[0], ext1_);
+ }
+ if (ext2_.Count > 0) {
+ output.WriteMessageArray(1001, field_names[1], ext2_);
+ }
+ UnknownFields.WriteTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public override int SerializedSize {
+ get {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+ return CalcSerializedSize();
+ }
+ }
+
+ private int CalcSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ foreach (global::Google.ProtocolBuffers.TestProtos.TestAllTypes element in Field1List) {
+ size += pb::CodedOutputStream.ComputeMessageSize(1, element);
+ }
+ foreach (global::Google.ProtocolBuffers.TestProtos.TestAllTypes element in Field2List) {
+ size += pb::CodedOutputStream.ComputeMessageSize(2, element);
+ }
+ foreach (global::Google.ProtocolBuffers.TestProtos.TestAllTypes element in Field3List) {
+ size += pb::CodedOutputStream.ComputeMessageSize(3, element);
+ }
+ foreach (global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Types.RepeatedFieldsGenerator.Types.Group1 element in Group1List) {
+ size += pb::CodedOutputStream.ComputeGroupSize(10, element);
+ }
+ foreach (global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Types.RepeatedFieldsGenerator.Types.Group2 element in Group2List) {
+ size += pb::CodedOutputStream.ComputeGroupSize(20, element);
+ }
+ foreach (global::Google.ProtocolBuffers.TestProtos.TestAllTypes element in Ext1List) {
+ size += pb::CodedOutputStream.ComputeMessageSize(1000, element);
+ }
+ foreach (global::Google.ProtocolBuffers.TestProtos.TestAllTypes element in Ext2List) {
+ size += pb::CodedOutputStream.ComputeMessageSize(1001, element);
+ }
+ size += UnknownFields.SerializedSize;
+ memoizedSerializedSize = size;
+ return size;
+ }
+ public static RepeatedFieldsGenerator ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static RepeatedFieldsGenerator ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static RepeatedFieldsGenerator ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static RepeatedFieldsGenerator ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static RepeatedFieldsGenerator ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static RepeatedFieldsGenerator ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static RepeatedFieldsGenerator ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static RepeatedFieldsGenerator ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static RepeatedFieldsGenerator ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static RepeatedFieldsGenerator ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private RepeatedFieldsGenerator MakeReadOnly() {
+ field1_.MakeReadOnly();
+ field2_.MakeReadOnly();
+ field3_.MakeReadOnly();
+ group1_.MakeReadOnly();
+ group2_.MakeReadOnly();
+ ext1_.MakeReadOnly();
+ ext2_.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(RepeatedFieldsGenerator prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Builder : pb::GeneratedBuilder<RepeatedFieldsGenerator, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(RepeatedFieldsGenerator cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private RepeatedFieldsGenerator result;
+
+ private RepeatedFieldsGenerator PrepareBuilder() {
+ if (resultIsReadOnly) {
+ RepeatedFieldsGenerator original = result;
+ result = new RepeatedFieldsGenerator();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override RepeatedFieldsGenerator 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.TestParsingMerge.Types.RepeatedFieldsGenerator.Descriptor; }
+ }
+
+ public override RepeatedFieldsGenerator DefaultInstanceForType {
+ get { return global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Types.RepeatedFieldsGenerator.DefaultInstance; }
+ }
+
+ public override RepeatedFieldsGenerator BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+ public override Builder MergeFrom(pb::IMessage other) {
+ if (other is RepeatedFieldsGenerator) {
+ return MergeFrom((RepeatedFieldsGenerator) other);
+ } else {
+ base.MergeFrom(other);
+ return this;
+ }
+ }
+
+ public override Builder MergeFrom(RepeatedFieldsGenerator other) {
+ if (other == global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Types.RepeatedFieldsGenerator.DefaultInstance) return this;
+ PrepareBuilder();
+ if (other.field1_.Count != 0) {
+ result.field1_.Add(other.field1_);
+ }
+ if (other.field2_.Count != 0) {
+ result.field2_.Add(other.field2_);
+ }
+ if (other.field3_.Count != 0) {
+ result.field3_.Add(other.field3_);
+ }
+ if (other.group1_.Count != 0) {
+ result.group1_.Add(other.group1_);
+ }
+ if (other.group2_.Count != 0) {
+ result.group2_.Add(other.group2_);
+ }
+ if (other.ext1_.Count != 0) {
+ result.ext1_.Add(other.ext1_);
+ }
+ if (other.ext2_.Count != 0) {
+ result.ext2_.Add(other.ext2_);
+ }
+ 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(_repeatedFieldsGeneratorFieldNames, field_name, global::System.StringComparer.Ordinal);
+ if(field_ordinal >= 0)
+ tag = _repeatedFieldsGeneratorFieldTags[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.field1_, global::Google.ProtocolBuffers.TestProtos.TestAllTypes.DefaultInstance, extensionRegistry);
+ break;
+ }
+ case 18: {
+ input.ReadMessageArray(tag, field_name, result.field2_, global::Google.ProtocolBuffers.TestProtos.TestAllTypes.DefaultInstance, extensionRegistry);
+ break;
+ }
+ case 26: {
+ input.ReadMessageArray(tag, field_name, result.field3_, global::Google.ProtocolBuffers.TestProtos.TestAllTypes.DefaultInstance, extensionRegistry);
+ break;
+ }
+ case 83: {
+ input.ReadGroupArray(tag, field_name, result.group1_, global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Types.RepeatedFieldsGenerator.Types.Group1.DefaultInstance, extensionRegistry);
+ break;
+ }
+ case 163: {
+ input.ReadGroupArray(tag, field_name, result.group2_, global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Types.RepeatedFieldsGenerator.Types.Group2.DefaultInstance, extensionRegistry);
+ break;
+ }
+ case 8002: {
+ input.ReadMessageArray(tag, field_name, result.ext1_, global::Google.ProtocolBuffers.TestProtos.TestAllTypes.DefaultInstance, extensionRegistry);
+ break;
+ }
+ case 8010: {
+ input.ReadMessageArray(tag, field_name, result.ext2_, global::Google.ProtocolBuffers.TestProtos.TestAllTypes.DefaultInstance, extensionRegistry);
+ break;
+ }
+ }
+ }
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
+ }
+
+
+ public pbc::IPopsicleList<global::Google.ProtocolBuffers.TestProtos.TestAllTypes> Field1List {
+ get { return PrepareBuilder().field1_; }
+ }
+ public int Field1Count {
+ get { return result.Field1Count; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestAllTypes GetField1(int index) {
+ return result.GetField1(index);
+ }
+ public Builder SetField1(int index, global::Google.ProtocolBuffers.TestProtos.TestAllTypes value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.field1_[index] = value;
+ return this;
+ }
+ public Builder SetField1(int index, global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.field1_[index] = builderForValue.Build();
+ return this;
+ }
+ public Builder AddField1(global::Google.ProtocolBuffers.TestProtos.TestAllTypes value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.field1_.Add(value);
+ return this;
+ }
+ public Builder AddField1(global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.field1_.Add(builderForValue.Build());
+ return this;
+ }
+ public Builder AddRangeField1(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.TestAllTypes> values) {
+ PrepareBuilder();
+ result.field1_.Add(values);
+ return this;
+ }
+ public Builder ClearField1() {
+ PrepareBuilder();
+ result.field1_.Clear();
+ return this;
+ }
+
+ public pbc::IPopsicleList<global::Google.ProtocolBuffers.TestProtos.TestAllTypes> Field2List {
+ get { return PrepareBuilder().field2_; }
+ }
+ public int Field2Count {
+ get { return result.Field2Count; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestAllTypes GetField2(int index) {
+ return result.GetField2(index);
+ }
+ public Builder SetField2(int index, global::Google.ProtocolBuffers.TestProtos.TestAllTypes value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.field2_[index] = value;
+ return this;
+ }
+ public Builder SetField2(int index, global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.field2_[index] = builderForValue.Build();
+ return this;
+ }
+ public Builder AddField2(global::Google.ProtocolBuffers.TestProtos.TestAllTypes value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.field2_.Add(value);
+ return this;
+ }
+ public Builder AddField2(global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.field2_.Add(builderForValue.Build());
+ return this;
+ }
+ public Builder AddRangeField2(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.TestAllTypes> values) {
+ PrepareBuilder();
+ result.field2_.Add(values);
+ return this;
+ }
+ public Builder ClearField2() {
+ PrepareBuilder();
+ result.field2_.Clear();
+ return this;
+ }
+
+ public pbc::IPopsicleList<global::Google.ProtocolBuffers.TestProtos.TestAllTypes> Field3List {
+ get { return PrepareBuilder().field3_; }
+ }
+ public int Field3Count {
+ get { return result.Field3Count; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestAllTypes GetField3(int index) {
+ return result.GetField3(index);
+ }
+ public Builder SetField3(int index, global::Google.ProtocolBuffers.TestProtos.TestAllTypes value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.field3_[index] = value;
+ return this;
+ }
+ public Builder SetField3(int index, global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.field3_[index] = builderForValue.Build();
+ return this;
+ }
+ public Builder AddField3(global::Google.ProtocolBuffers.TestProtos.TestAllTypes value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.field3_.Add(value);
+ return this;
+ }
+ public Builder AddField3(global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.field3_.Add(builderForValue.Build());
+ return this;
+ }
+ public Builder AddRangeField3(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.TestAllTypes> values) {
+ PrepareBuilder();
+ result.field3_.Add(values);
+ return this;
+ }
+ public Builder ClearField3() {
+ PrepareBuilder();
+ result.field3_.Clear();
+ return this;
+ }
+
+ public pbc::IPopsicleList<global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Types.RepeatedFieldsGenerator.Types.Group1> Group1List {
+ get { return PrepareBuilder().group1_; }
+ }
+ public int Group1Count {
+ get { return result.Group1Count; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Types.RepeatedFieldsGenerator.Types.Group1 GetGroup1(int index) {
+ return result.GetGroup1(index);
+ }
+ public Builder SetGroup1(int index, global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Types.RepeatedFieldsGenerator.Types.Group1 value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.group1_[index] = value;
+ return this;
+ }
+ public Builder SetGroup1(int index, global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Types.RepeatedFieldsGenerator.Types.Group1.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.group1_[index] = builderForValue.Build();
+ return this;
+ }
+ public Builder AddGroup1(global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Types.RepeatedFieldsGenerator.Types.Group1 value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.group1_.Add(value);
+ return this;
+ }
+ public Builder AddGroup1(global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Types.RepeatedFieldsGenerator.Types.Group1.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.group1_.Add(builderForValue.Build());
+ return this;
+ }
+ public Builder AddRangeGroup1(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Types.RepeatedFieldsGenerator.Types.Group1> values) {
+ PrepareBuilder();
+ result.group1_.Add(values);
+ return this;
+ }
+ public Builder ClearGroup1() {
+ PrepareBuilder();
+ result.group1_.Clear();
+ return this;
+ }
+
+ public pbc::IPopsicleList<global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Types.RepeatedFieldsGenerator.Types.Group2> Group2List {
+ get { return PrepareBuilder().group2_; }
+ }
+ public int Group2Count {
+ get { return result.Group2Count; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Types.RepeatedFieldsGenerator.Types.Group2 GetGroup2(int index) {
+ return result.GetGroup2(index);
+ }
+ public Builder SetGroup2(int index, global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Types.RepeatedFieldsGenerator.Types.Group2 value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.group2_[index] = value;
+ return this;
+ }
+ public Builder SetGroup2(int index, global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Types.RepeatedFieldsGenerator.Types.Group2.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.group2_[index] = builderForValue.Build();
+ return this;
+ }
+ public Builder AddGroup2(global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Types.RepeatedFieldsGenerator.Types.Group2 value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.group2_.Add(value);
+ return this;
+ }
+ public Builder AddGroup2(global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Types.RepeatedFieldsGenerator.Types.Group2.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.group2_.Add(builderForValue.Build());
+ return this;
+ }
+ public Builder AddRangeGroup2(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Types.RepeatedFieldsGenerator.Types.Group2> values) {
+ PrepareBuilder();
+ result.group2_.Add(values);
+ return this;
+ }
+ public Builder ClearGroup2() {
+ PrepareBuilder();
+ result.group2_.Clear();
+ return this;
+ }
+
+ public pbc::IPopsicleList<global::Google.ProtocolBuffers.TestProtos.TestAllTypes> Ext1List {
+ get { return PrepareBuilder().ext1_; }
+ }
+ public int Ext1Count {
+ get { return result.Ext1Count; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestAllTypes GetExt1(int index) {
+ return result.GetExt1(index);
+ }
+ public Builder SetExt1(int index, global::Google.ProtocolBuffers.TestProtos.TestAllTypes value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.ext1_[index] = value;
+ return this;
+ }
+ public Builder SetExt1(int index, global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.ext1_[index] = builderForValue.Build();
+ return this;
+ }
+ public Builder AddExt1(global::Google.ProtocolBuffers.TestProtos.TestAllTypes value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.ext1_.Add(value);
+ return this;
+ }
+ public Builder AddExt1(global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.ext1_.Add(builderForValue.Build());
+ return this;
+ }
+ public Builder AddRangeExt1(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.TestAllTypes> values) {
+ PrepareBuilder();
+ result.ext1_.Add(values);
+ return this;
+ }
+ public Builder ClearExt1() {
+ PrepareBuilder();
+ result.ext1_.Clear();
+ return this;
+ }
+
+ public pbc::IPopsicleList<global::Google.ProtocolBuffers.TestProtos.TestAllTypes> Ext2List {
+ get { return PrepareBuilder().ext2_; }
+ }
+ public int Ext2Count {
+ get { return result.Ext2Count; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestAllTypes GetExt2(int index) {
+ return result.GetExt2(index);
+ }
+ public Builder SetExt2(int index, global::Google.ProtocolBuffers.TestProtos.TestAllTypes value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.ext2_[index] = value;
+ return this;
+ }
+ public Builder SetExt2(int index, global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.ext2_[index] = builderForValue.Build();
+ return this;
+ }
+ public Builder AddExt2(global::Google.ProtocolBuffers.TestProtos.TestAllTypes value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.ext2_.Add(value);
+ return this;
+ }
+ public Builder AddExt2(global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.ext2_.Add(builderForValue.Build());
+ return this;
+ }
+ public Builder AddRangeExt2(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.TestAllTypes> values) {
+ PrepareBuilder();
+ result.ext2_.Add(values);
+ return this;
+ }
+ public Builder ClearExt2() {
+ PrepareBuilder();
+ result.ext2_.Clear();
+ return this;
+ }
+ }
+ static RepeatedFieldsGenerator() {
+ object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor, null);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class OptionalGroup : pb::GeneratedMessage<OptionalGroup, OptionalGroup.Builder> {
+ private OptionalGroup() { }
+ private static readonly OptionalGroup defaultInstance = new OptionalGroup().MakeReadOnly();
+ private static readonly string[] _optionalGroupFieldNames = new string[] { "optional_group_all_types" };
+ private static readonly uint[] _optionalGroupFieldTags = new uint[] { 90 };
+ public static OptionalGroup DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override OptionalGroup DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override OptionalGroup ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestParsingMerge_OptionalGroup__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<OptionalGroup, OptionalGroup.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestParsingMerge_OptionalGroup__FieldAccessorTable; }
+ }
+
+ public const int OptionalGroupAllTypesFieldNumber = 11;
+ private bool hasOptionalGroupAllTypes;
+ private global::Google.ProtocolBuffers.TestProtos.TestAllTypes optionalGroupAllTypes_;
+ public bool HasOptionalGroupAllTypes {
+ get { return hasOptionalGroupAllTypes; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestAllTypes OptionalGroupAllTypes {
+ get { return optionalGroupAllTypes_ ?? global::Google.ProtocolBuffers.TestProtos.TestAllTypes.DefaultInstance; }
+ }
+
+ public override bool IsInitialized {
+ get {
+ return true;
+ }
+ }
+
+ public override void WriteTo(pb::ICodedOutputStream output) {
+ CalcSerializedSize();
+ string[] field_names = _optionalGroupFieldNames;
+ if (hasOptionalGroupAllTypes) {
+ output.WriteMessage(11, field_names[0], OptionalGroupAllTypes);
+ }
+ UnknownFields.WriteTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public override int SerializedSize {
+ get {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+ return CalcSerializedSize();
+ }
+ }
+
+ private int CalcSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (hasOptionalGroupAllTypes) {
+ size += pb::CodedOutputStream.ComputeMessageSize(11, OptionalGroupAllTypes);
+ }
+ size += UnknownFields.SerializedSize;
+ memoizedSerializedSize = size;
+ return size;
+ }
+ public static OptionalGroup ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static OptionalGroup ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static OptionalGroup ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static OptionalGroup ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static OptionalGroup ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static OptionalGroup ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static OptionalGroup ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static OptionalGroup ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static OptionalGroup ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static OptionalGroup ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private OptionalGroup 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(OptionalGroup prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Builder : pb::GeneratedBuilder<OptionalGroup, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(OptionalGroup cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private OptionalGroup result;
+
+ private OptionalGroup PrepareBuilder() {
+ if (resultIsReadOnly) {
+ OptionalGroup original = result;
+ result = new OptionalGroup();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override OptionalGroup 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.TestParsingMerge.Types.OptionalGroup.Descriptor; }
+ }
+
+ public override OptionalGroup DefaultInstanceForType {
+ get { return global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Types.OptionalGroup.DefaultInstance; }
+ }
+
+ public override OptionalGroup BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+ public override Builder MergeFrom(pb::IMessage other) {
+ if (other is OptionalGroup) {
+ return MergeFrom((OptionalGroup) other);
+ } else {
+ base.MergeFrom(other);
+ return this;
+ }
+ }
+
+ public override Builder MergeFrom(OptionalGroup other) {
+ if (other == global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Types.OptionalGroup.DefaultInstance) return this;
+ PrepareBuilder();
+ if (other.HasOptionalGroupAllTypes) {
+ MergeOptionalGroupAllTypes(other.OptionalGroupAllTypes);
+ }
+ 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(_optionalGroupFieldNames, field_name, global::System.StringComparer.Ordinal);
+ if(field_ordinal >= 0)
+ tag = _optionalGroupFieldTags[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 90: {
+ global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.TestAllTypes.CreateBuilder();
+ if (result.hasOptionalGroupAllTypes) {
+ subBuilder.MergeFrom(OptionalGroupAllTypes);
+ }
+ input.ReadMessage(subBuilder, extensionRegistry);
+ OptionalGroupAllTypes = subBuilder.BuildPartial();
+ break;
+ }
+ }
+ }
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
+ }
+
+
+ public bool HasOptionalGroupAllTypes {
+ get { return result.hasOptionalGroupAllTypes; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestAllTypes OptionalGroupAllTypes {
+ get { return result.OptionalGroupAllTypes; }
+ set { SetOptionalGroupAllTypes(value); }
+ }
+ public Builder SetOptionalGroupAllTypes(global::Google.ProtocolBuffers.TestProtos.TestAllTypes value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasOptionalGroupAllTypes = true;
+ result.optionalGroupAllTypes_ = value;
+ return this;
+ }
+ public Builder SetOptionalGroupAllTypes(global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.hasOptionalGroupAllTypes = true;
+ result.optionalGroupAllTypes_ = builderForValue.Build();
+ return this;
+ }
+ public Builder MergeOptionalGroupAllTypes(global::Google.ProtocolBuffers.TestProtos.TestAllTypes value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ if (result.hasOptionalGroupAllTypes &&
+ result.optionalGroupAllTypes_ != global::Google.ProtocolBuffers.TestProtos.TestAllTypes.DefaultInstance) {
+ result.optionalGroupAllTypes_ = global::Google.ProtocolBuffers.TestProtos.TestAllTypes.CreateBuilder(result.optionalGroupAllTypes_).MergeFrom(value).BuildPartial();
+ } else {
+ result.optionalGroupAllTypes_ = value;
+ }
+ result.hasOptionalGroupAllTypes = true;
+ return this;
+ }
+ public Builder ClearOptionalGroupAllTypes() {
+ PrepareBuilder();
+ result.hasOptionalGroupAllTypes = false;
+ result.optionalGroupAllTypes_ = null;
+ return this;
+ }
+ }
+ static OptionalGroup() {
+ object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor, null);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class RepeatedGroup : pb::GeneratedMessage<RepeatedGroup, RepeatedGroup.Builder> {
+ private RepeatedGroup() { }
+ private static readonly RepeatedGroup defaultInstance = new RepeatedGroup().MakeReadOnly();
+ private static readonly string[] _repeatedGroupFieldNames = new string[] { "repeated_group_all_types" };
+ private static readonly uint[] _repeatedGroupFieldTags = new uint[] { 170 };
+ public static RepeatedGroup DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override RepeatedGroup DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override RepeatedGroup ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestParsingMerge_RepeatedGroup__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<RepeatedGroup, RepeatedGroup.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestParsingMerge_RepeatedGroup__FieldAccessorTable; }
+ }
+
+ public const int RepeatedGroupAllTypesFieldNumber = 21;
+ private bool hasRepeatedGroupAllTypes;
+ private global::Google.ProtocolBuffers.TestProtos.TestAllTypes repeatedGroupAllTypes_;
+ public bool HasRepeatedGroupAllTypes {
+ get { return hasRepeatedGroupAllTypes; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestAllTypes RepeatedGroupAllTypes {
+ get { return repeatedGroupAllTypes_ ?? global::Google.ProtocolBuffers.TestProtos.TestAllTypes.DefaultInstance; }
+ }
+
+ public override bool IsInitialized {
+ get {
+ return true;
+ }
+ }
+
+ public override void WriteTo(pb::ICodedOutputStream output) {
+ CalcSerializedSize();
+ string[] field_names = _repeatedGroupFieldNames;
+ if (hasRepeatedGroupAllTypes) {
+ output.WriteMessage(21, field_names[0], RepeatedGroupAllTypes);
+ }
+ UnknownFields.WriteTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public override int SerializedSize {
+ get {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+ return CalcSerializedSize();
+ }
+ }
+
+ private int CalcSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (hasRepeatedGroupAllTypes) {
+ size += pb::CodedOutputStream.ComputeMessageSize(21, RepeatedGroupAllTypes);
+ }
+ size += UnknownFields.SerializedSize;
+ memoizedSerializedSize = size;
+ return size;
+ }
+ public static RepeatedGroup ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static RepeatedGroup ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static RepeatedGroup ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static RepeatedGroup ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static RepeatedGroup ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static RepeatedGroup ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static RepeatedGroup ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static RepeatedGroup ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static RepeatedGroup ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static RepeatedGroup ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private RepeatedGroup 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(RepeatedGroup prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Builder : pb::GeneratedBuilder<RepeatedGroup, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(RepeatedGroup cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private RepeatedGroup result;
+
+ private RepeatedGroup PrepareBuilder() {
+ if (resultIsReadOnly) {
+ RepeatedGroup original = result;
+ result = new RepeatedGroup();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override RepeatedGroup 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.TestParsingMerge.Types.RepeatedGroup.Descriptor; }
+ }
+
+ public override RepeatedGroup DefaultInstanceForType {
+ get { return global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Types.RepeatedGroup.DefaultInstance; }
+ }
+
+ public override RepeatedGroup BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+ public override Builder MergeFrom(pb::IMessage other) {
+ if (other is RepeatedGroup) {
+ return MergeFrom((RepeatedGroup) other);
+ } else {
+ base.MergeFrom(other);
+ return this;
+ }
+ }
+
+ public override Builder MergeFrom(RepeatedGroup other) {
+ if (other == global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Types.RepeatedGroup.DefaultInstance) return this;
+ PrepareBuilder();
+ if (other.HasRepeatedGroupAllTypes) {
+ MergeRepeatedGroupAllTypes(other.RepeatedGroupAllTypes);
+ }
+ 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(_repeatedGroupFieldNames, field_name, global::System.StringComparer.Ordinal);
+ if(field_ordinal >= 0)
+ tag = _repeatedGroupFieldTags[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 170: {
+ global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.TestAllTypes.CreateBuilder();
+ if (result.hasRepeatedGroupAllTypes) {
+ subBuilder.MergeFrom(RepeatedGroupAllTypes);
+ }
+ input.ReadMessage(subBuilder, extensionRegistry);
+ RepeatedGroupAllTypes = subBuilder.BuildPartial();
+ break;
+ }
+ }
+ }
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
+ }
+
+
+ public bool HasRepeatedGroupAllTypes {
+ get { return result.hasRepeatedGroupAllTypes; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestAllTypes RepeatedGroupAllTypes {
+ get { return result.RepeatedGroupAllTypes; }
+ set { SetRepeatedGroupAllTypes(value); }
+ }
+ public Builder SetRepeatedGroupAllTypes(global::Google.ProtocolBuffers.TestProtos.TestAllTypes value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasRepeatedGroupAllTypes = true;
+ result.repeatedGroupAllTypes_ = value;
+ return this;
+ }
+ public Builder SetRepeatedGroupAllTypes(global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.hasRepeatedGroupAllTypes = true;
+ result.repeatedGroupAllTypes_ = builderForValue.Build();
+ return this;
+ }
+ public Builder MergeRepeatedGroupAllTypes(global::Google.ProtocolBuffers.TestProtos.TestAllTypes value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ if (result.hasRepeatedGroupAllTypes &&
+ result.repeatedGroupAllTypes_ != global::Google.ProtocolBuffers.TestProtos.TestAllTypes.DefaultInstance) {
+ result.repeatedGroupAllTypes_ = global::Google.ProtocolBuffers.TestProtos.TestAllTypes.CreateBuilder(result.repeatedGroupAllTypes_).MergeFrom(value).BuildPartial();
+ } else {
+ result.repeatedGroupAllTypes_ = value;
+ }
+ result.hasRepeatedGroupAllTypes = true;
+ return this;
+ }
+ public Builder ClearRepeatedGroupAllTypes() {
+ PrepareBuilder();
+ result.hasRepeatedGroupAllTypes = false;
+ result.repeatedGroupAllTypes_ = null;
+ return this;
+ }
+ }
+ static RepeatedGroup() {
+ object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor, null);
+ }
+ }
+
+ }
+ #endregion
+
+ public const int RequiredAllTypesFieldNumber = 1;
+ private bool hasRequiredAllTypes;
+ private global::Google.ProtocolBuffers.TestProtos.TestAllTypes requiredAllTypes_;
+ public bool HasRequiredAllTypes {
+ get { return hasRequiredAllTypes; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestAllTypes RequiredAllTypes {
+ get { return requiredAllTypes_ ?? global::Google.ProtocolBuffers.TestProtos.TestAllTypes.DefaultInstance; }
+ }
+
+ public const int OptionalAllTypesFieldNumber = 2;
+ private bool hasOptionalAllTypes;
+ private global::Google.ProtocolBuffers.TestProtos.TestAllTypes optionalAllTypes_;
+ public bool HasOptionalAllTypes {
+ get { return hasOptionalAllTypes; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestAllTypes OptionalAllTypes {
+ get { return optionalAllTypes_ ?? global::Google.ProtocolBuffers.TestProtos.TestAllTypes.DefaultInstance; }
+ }
+
+ public const int RepeatedAllTypesFieldNumber = 3;
+ private pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.TestAllTypes> repeatedAllTypes_ = new pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.TestAllTypes>();
+ public scg::IList<global::Google.ProtocolBuffers.TestProtos.TestAllTypes> RepeatedAllTypesList {
+ get { return repeatedAllTypes_; }
+ }
+ public int RepeatedAllTypesCount {
+ get { return repeatedAllTypes_.Count; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestAllTypes GetRepeatedAllTypes(int index) {
+ return repeatedAllTypes_[index];
+ }
+
+ public const int OptionalGroupFieldNumber = 10;
+ private bool hasOptionalGroup;
+ private global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Types.OptionalGroup optionalGroup_;
+ public bool HasOptionalGroup {
+ get { return hasOptionalGroup; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Types.OptionalGroup OptionalGroup {
+ get { return optionalGroup_ ?? global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Types.OptionalGroup.DefaultInstance; }
+ }
+
+ public const int RepeatedGroupFieldNumber = 20;
+ private pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Types.RepeatedGroup> repeatedGroup_ = new pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Types.RepeatedGroup>();
+ public scg::IList<global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Types.RepeatedGroup> RepeatedGroupList {
+ get { return repeatedGroup_; }
+ }
+ public int RepeatedGroupCount {
+ get { return repeatedGroup_.Count; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Types.RepeatedGroup GetRepeatedGroup(int index) {
+ return repeatedGroup_[index];
+ }
+
+ public override bool IsInitialized {
+ get {
+ if (!hasRequiredAllTypes) return false;
+ if (!ExtensionsAreInitialized) return false;
+ return true;
+ }
+ }
+
+ public override void WriteTo(pb::ICodedOutputStream output) {
+ CalcSerializedSize();
+ string[] field_names = _testParsingMergeFieldNames;
+ pb::ExtendableMessage<TestParsingMerge, TestParsingMerge.Builder>.ExtensionWriter extensionWriter = CreateExtensionWriter(this);
+ if (hasRequiredAllTypes) {
+ output.WriteMessage(1, field_names[4], RequiredAllTypes);
+ }
+ if (hasOptionalAllTypes) {
+ output.WriteMessage(2, field_names[0], OptionalAllTypes);
+ }
+ if (repeatedAllTypes_.Count > 0) {
+ output.WriteMessageArray(3, field_names[2], repeatedAllTypes_);
+ }
+ if (hasOptionalGroup) {
+ output.WriteGroup(10, field_names[1], OptionalGroup);
+ }
+ if (repeatedGroup_.Count > 0) {
+ output.WriteGroupArray(20, field_names[3], repeatedGroup_);
+ }
+ extensionWriter.WriteUntil(536870912, output);
+ UnknownFields.WriteTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public override int SerializedSize {
+ get {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+ return CalcSerializedSize();
+ }
+ }
+
+ private int CalcSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (hasRequiredAllTypes) {
+ size += pb::CodedOutputStream.ComputeMessageSize(1, RequiredAllTypes);
+ }
+ if (hasOptionalAllTypes) {
+ size += pb::CodedOutputStream.ComputeMessageSize(2, OptionalAllTypes);
+ }
+ foreach (global::Google.ProtocolBuffers.TestProtos.TestAllTypes element in RepeatedAllTypesList) {
+ size += pb::CodedOutputStream.ComputeMessageSize(3, element);
+ }
+ if (hasOptionalGroup) {
+ size += pb::CodedOutputStream.ComputeGroupSize(10, OptionalGroup);
+ }
+ foreach (global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Types.RepeatedGroup element in RepeatedGroupList) {
+ size += pb::CodedOutputStream.ComputeGroupSize(20, element);
+ }
+ size += ExtensionsSerializedSize;
+ size += UnknownFields.SerializedSize;
+ memoizedSerializedSize = size;
+ return size;
+ }
+ public static TestParsingMerge ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static TestParsingMerge ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static TestParsingMerge ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static TestParsingMerge ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static TestParsingMerge ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static TestParsingMerge ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static TestParsingMerge ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static TestParsingMerge ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static TestParsingMerge ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static TestParsingMerge ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private TestParsingMerge MakeReadOnly() {
+ repeatedAllTypes_.MakeReadOnly();
+ repeatedGroup_.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(TestParsingMerge prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Builder : pb::ExtendableBuilder<TestParsingMerge, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(TestParsingMerge cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private TestParsingMerge result;
+
+ private TestParsingMerge PrepareBuilder() {
+ if (resultIsReadOnly) {
+ TestParsingMerge original = result;
+ result = new TestParsingMerge();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override TestParsingMerge 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.TestParsingMerge.Descriptor; }
+ }
+
+ public override TestParsingMerge DefaultInstanceForType {
+ get { return global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.DefaultInstance; }
+ }
+
+ public override TestParsingMerge BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+ public override Builder MergeFrom(pb::IMessage other) {
+ if (other is TestParsingMerge) {
+ return MergeFrom((TestParsingMerge) other);
+ } else {
+ base.MergeFrom(other);
+ return this;
+ }
+ }
+
+ public override Builder MergeFrom(TestParsingMerge other) {
+ if (other == global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.DefaultInstance) return this;
+ PrepareBuilder();
+ if (other.HasRequiredAllTypes) {
+ MergeRequiredAllTypes(other.RequiredAllTypes);
+ }
+ if (other.HasOptionalAllTypes) {
+ MergeOptionalAllTypes(other.OptionalAllTypes);
+ }
+ if (other.repeatedAllTypes_.Count != 0) {
+ result.repeatedAllTypes_.Add(other.repeatedAllTypes_);
+ }
+ if (other.HasOptionalGroup) {
+ MergeOptionalGroup(other.OptionalGroup);
+ }
+ if (other.repeatedGroup_.Count != 0) {
+ result.repeatedGroup_.Add(other.repeatedGroup_);
+ }
+ 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(_testParsingMergeFieldNames, field_name, global::System.StringComparer.Ordinal);
+ if(field_ordinal >= 0)
+ tag = _testParsingMergeFieldTags[field_ordinal];
+ else {
+ if (unknownFields == null) {
+ unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+ }
+ ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
+ continue;
+ }
+ }
+ switch (tag) {
+ case 0: {
+ throw pb::InvalidProtocolBufferException.InvalidTag();
+ }
+ default: {
+ if (pb::WireFormat.IsEndGroupTag(tag)) {
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
+ }
+ if (unknownFields == null) {
+ unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+ }
+ ParseUnknownField(input, unknownFields, extensionRegistry, tag, field_name);
+ break;
+ }
+ case 10: {
+ global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.TestAllTypes.CreateBuilder();
+ if (result.hasRequiredAllTypes) {
+ subBuilder.MergeFrom(RequiredAllTypes);
+ }
+ input.ReadMessage(subBuilder, extensionRegistry);
+ RequiredAllTypes = subBuilder.BuildPartial();
+ break;
+ }
+ case 18: {
+ global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.TestAllTypes.CreateBuilder();
+ if (result.hasOptionalAllTypes) {
+ subBuilder.MergeFrom(OptionalAllTypes);
+ }
+ input.ReadMessage(subBuilder, extensionRegistry);
+ OptionalAllTypes = subBuilder.BuildPartial();
+ break;
+ }
+ case 26: {
+ input.ReadMessageArray(tag, field_name, result.repeatedAllTypes_, global::Google.ProtocolBuffers.TestProtos.TestAllTypes.DefaultInstance, extensionRegistry);
+ break;
+ }
+ case 83: {
+ global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Types.OptionalGroup.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Types.OptionalGroup.CreateBuilder();
+ if (result.hasOptionalGroup) {
+ subBuilder.MergeFrom(OptionalGroup);
+ }
+ input.ReadGroup(10, subBuilder, extensionRegistry);
+ OptionalGroup = subBuilder.BuildPartial();
+ break;
+ }
+ case 163: {
+ input.ReadGroupArray(tag, field_name, result.repeatedGroup_, global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Types.RepeatedGroup.DefaultInstance, extensionRegistry);
+ break;
+ }
+ }
+ }
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
+ }
+
+
+ public bool HasRequiredAllTypes {
+ get { return result.hasRequiredAllTypes; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestAllTypes RequiredAllTypes {
+ get { return result.RequiredAllTypes; }
+ set { SetRequiredAllTypes(value); }
+ }
+ public Builder SetRequiredAllTypes(global::Google.ProtocolBuffers.TestProtos.TestAllTypes value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasRequiredAllTypes = true;
+ result.requiredAllTypes_ = value;
+ return this;
+ }
+ public Builder SetRequiredAllTypes(global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.hasRequiredAllTypes = true;
+ result.requiredAllTypes_ = builderForValue.Build();
+ return this;
+ }
+ public Builder MergeRequiredAllTypes(global::Google.ProtocolBuffers.TestProtos.TestAllTypes value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ if (result.hasRequiredAllTypes &&
+ result.requiredAllTypes_ != global::Google.ProtocolBuffers.TestProtos.TestAllTypes.DefaultInstance) {
+ result.requiredAllTypes_ = global::Google.ProtocolBuffers.TestProtos.TestAllTypes.CreateBuilder(result.requiredAllTypes_).MergeFrom(value).BuildPartial();
+ } else {
+ result.requiredAllTypes_ = value;
+ }
+ result.hasRequiredAllTypes = true;
+ return this;
+ }
+ public Builder ClearRequiredAllTypes() {
+ PrepareBuilder();
+ result.hasRequiredAllTypes = false;
+ result.requiredAllTypes_ = null;
+ return this;
+ }
+
+ public bool HasOptionalAllTypes {
+ get { return result.hasOptionalAllTypes; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestAllTypes OptionalAllTypes {
+ get { return result.OptionalAllTypes; }
+ set { SetOptionalAllTypes(value); }
+ }
+ public Builder SetOptionalAllTypes(global::Google.ProtocolBuffers.TestProtos.TestAllTypes value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasOptionalAllTypes = true;
+ result.optionalAllTypes_ = value;
+ return this;
+ }
+ public Builder SetOptionalAllTypes(global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.hasOptionalAllTypes = true;
+ result.optionalAllTypes_ = builderForValue.Build();
+ return this;
+ }
+ public Builder MergeOptionalAllTypes(global::Google.ProtocolBuffers.TestProtos.TestAllTypes value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ if (result.hasOptionalAllTypes &&
+ result.optionalAllTypes_ != global::Google.ProtocolBuffers.TestProtos.TestAllTypes.DefaultInstance) {
+ result.optionalAllTypes_ = global::Google.ProtocolBuffers.TestProtos.TestAllTypes.CreateBuilder(result.optionalAllTypes_).MergeFrom(value).BuildPartial();
+ } else {
+ result.optionalAllTypes_ = value;
+ }
+ result.hasOptionalAllTypes = true;
+ return this;
+ }
+ public Builder ClearOptionalAllTypes() {
+ PrepareBuilder();
+ result.hasOptionalAllTypes = false;
+ result.optionalAllTypes_ = null;
+ return this;
+ }
+
+ public pbc::IPopsicleList<global::Google.ProtocolBuffers.TestProtos.TestAllTypes> RepeatedAllTypesList {
+ get { return PrepareBuilder().repeatedAllTypes_; }
+ }
+ public int RepeatedAllTypesCount {
+ get { return result.RepeatedAllTypesCount; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestAllTypes GetRepeatedAllTypes(int index) {
+ return result.GetRepeatedAllTypes(index);
+ }
+ public Builder SetRepeatedAllTypes(int index, global::Google.ProtocolBuffers.TestProtos.TestAllTypes value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.repeatedAllTypes_[index] = value;
+ return this;
+ }
+ public Builder SetRepeatedAllTypes(int index, global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.repeatedAllTypes_[index] = builderForValue.Build();
+ return this;
+ }
+ public Builder AddRepeatedAllTypes(global::Google.ProtocolBuffers.TestProtos.TestAllTypes value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.repeatedAllTypes_.Add(value);
+ return this;
+ }
+ public Builder AddRepeatedAllTypes(global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.repeatedAllTypes_.Add(builderForValue.Build());
+ return this;
+ }
+ public Builder AddRangeRepeatedAllTypes(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.TestAllTypes> values) {
+ PrepareBuilder();
+ result.repeatedAllTypes_.Add(values);
+ return this;
+ }
+ public Builder ClearRepeatedAllTypes() {
+ PrepareBuilder();
+ result.repeatedAllTypes_.Clear();
+ return this;
+ }
+
+ public bool HasOptionalGroup {
+ get { return result.hasOptionalGroup; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Types.OptionalGroup OptionalGroup {
+ get { return result.OptionalGroup; }
+ set { SetOptionalGroup(value); }
+ }
+ public Builder SetOptionalGroup(global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Types.OptionalGroup value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasOptionalGroup = true;
+ result.optionalGroup_ = value;
+ return this;
+ }
+ public Builder SetOptionalGroup(global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Types.OptionalGroup.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.hasOptionalGroup = true;
+ result.optionalGroup_ = builderForValue.Build();
+ return this;
+ }
+ public Builder MergeOptionalGroup(global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Types.OptionalGroup value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ if (result.hasOptionalGroup &&
+ result.optionalGroup_ != global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Types.OptionalGroup.DefaultInstance) {
+ result.optionalGroup_ = global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Types.OptionalGroup.CreateBuilder(result.optionalGroup_).MergeFrom(value).BuildPartial();
+ } else {
+ result.optionalGroup_ = value;
+ }
+ result.hasOptionalGroup = true;
+ return this;
+ }
+ public Builder ClearOptionalGroup() {
+ PrepareBuilder();
+ result.hasOptionalGroup = false;
+ result.optionalGroup_ = null;
+ return this;
+ }
+
+ public pbc::IPopsicleList<global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Types.RepeatedGroup> RepeatedGroupList {
+ get { return PrepareBuilder().repeatedGroup_; }
+ }
+ public int RepeatedGroupCount {
+ get { return result.RepeatedGroupCount; }
+ }
+ public global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Types.RepeatedGroup GetRepeatedGroup(int index) {
+ return result.GetRepeatedGroup(index);
+ }
+ public Builder SetRepeatedGroup(int index, global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Types.RepeatedGroup value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.repeatedGroup_[index] = value;
+ return this;
+ }
+ public Builder SetRepeatedGroup(int index, global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Types.RepeatedGroup.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.repeatedGroup_[index] = builderForValue.Build();
+ return this;
+ }
+ public Builder AddRepeatedGroup(global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Types.RepeatedGroup value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.repeatedGroup_.Add(value);
+ return this;
+ }
+ public Builder AddRepeatedGroup(global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Types.RepeatedGroup.Builder builderForValue) {
+ pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
+ PrepareBuilder();
+ result.repeatedGroup_.Add(builderForValue.Build());
+ return this;
+ }
+ public Builder AddRangeRepeatedGroup(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.TestParsingMerge.Types.RepeatedGroup> values) {
+ PrepareBuilder();
+ result.repeatedGroup_.Add(values);
+ return this;
+ }
+ public Builder ClearRepeatedGroup() {
+ PrepareBuilder();
+ result.repeatedGroup_.Clear();
+ return this;
+ }
+ }
+ static TestParsingMerge() {
+ object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor, null);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class TestCommentInjectionMessage : pb::GeneratedMessage<TestCommentInjectionMessage, TestCommentInjectionMessage.Builder> {
+ private TestCommentInjectionMessage() { }
+ private static readonly TestCommentInjectionMessage defaultInstance = new TestCommentInjectionMessage().MakeReadOnly();
+ private static readonly string[] _testCommentInjectionMessageFieldNames = new string[] { "a" };
+ private static readonly uint[] _testCommentInjectionMessageFieldTags = new uint[] { 10 };
+ public static TestCommentInjectionMessage DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override TestCommentInjectionMessage DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override TestCommentInjectionMessage ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestCommentInjectionMessage__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<TestCommentInjectionMessage, TestCommentInjectionMessage.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_TestCommentInjectionMessage__FieldAccessorTable; }
+ }
+
+ public const int AFieldNumber = 1;
+ private bool hasA;
+ private string a_ = "*/ <- Neither should this.";
+ public bool HasA {
+ get { return hasA; }
+ }
+ public string A {
+ get { return a_; }
+ }
+
+ public override bool IsInitialized {
+ get {
+ return true;
+ }
+ }
+
+ public override void WriteTo(pb::ICodedOutputStream output) {
+ CalcSerializedSize();
+ string[] field_names = _testCommentInjectionMessageFieldNames;
+ if (hasA) {
+ output.WriteString(1, field_names[0], A);
+ }
+ UnknownFields.WriteTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public override int SerializedSize {
+ get {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+ return CalcSerializedSize();
+ }
+ }
+
+ private int CalcSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (hasA) {
+ size += pb::CodedOutputStream.ComputeStringSize(1, A);
+ }
+ size += UnknownFields.SerializedSize;
+ memoizedSerializedSize = size;
+ return size;
+ }
+ public static TestCommentInjectionMessage ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static TestCommentInjectionMessage ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static TestCommentInjectionMessage ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static TestCommentInjectionMessage ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static TestCommentInjectionMessage ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static TestCommentInjectionMessage ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static TestCommentInjectionMessage ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static TestCommentInjectionMessage ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static TestCommentInjectionMessage ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static TestCommentInjectionMessage ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private TestCommentInjectionMessage 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(TestCommentInjectionMessage prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Builder : pb::GeneratedBuilder<TestCommentInjectionMessage, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(TestCommentInjectionMessage cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private TestCommentInjectionMessage result;
+
+ private TestCommentInjectionMessage PrepareBuilder() {
+ if (resultIsReadOnly) {
+ TestCommentInjectionMessage original = result;
+ result = new TestCommentInjectionMessage();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override TestCommentInjectionMessage 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.TestCommentInjectionMessage.Descriptor; }
+ }
+
+ public override TestCommentInjectionMessage DefaultInstanceForType {
+ get { return global::Google.ProtocolBuffers.TestProtos.TestCommentInjectionMessage.DefaultInstance; }
+ }
+
+ public override TestCommentInjectionMessage BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+ public override Builder MergeFrom(pb::IMessage other) {
+ if (other is TestCommentInjectionMessage) {
+ return MergeFrom((TestCommentInjectionMessage) other);
+ } else {
+ base.MergeFrom(other);
+ return this;
+ }
+ }
+
+ public override Builder MergeFrom(TestCommentInjectionMessage other) {
+ if (other == global::Google.ProtocolBuffers.TestProtos.TestCommentInjectionMessage.DefaultInstance) return this;
+ PrepareBuilder();
+ if (other.HasA) {
+ A = other.A;
+ }
+ 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(_testCommentInjectionMessageFieldNames, field_name, global::System.StringComparer.Ordinal);
+ if(field_ordinal >= 0)
+ tag = _testCommentInjectionMessageFieldTags[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.hasA = input.ReadString(ref result.a_);
+ break;
+ }
+ }
+ }
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
+ }
+
+
+ public bool HasA {
+ get { return result.hasA; }
+ }
+ public string A {
+ get { return result.A; }
+ set { SetA(value); }
+ }
+ public Builder SetA(string value) {
+ pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
+ result.hasA = true;
+ result.a_ = value;
+ return this;
+ }
+ public Builder ClearA() {
+ PrepareBuilder();
+ result.hasA = false;
+ result.a_ = "*/ <- Neither should this.";
+ return this;
+ }
+ }
+ static TestCommentInjectionMessage() {
+ object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor, null);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class FooRequest : pb::GeneratedMessage<FooRequest, FooRequest.Builder> {
+ private FooRequest() { }
+ private static readonly FooRequest defaultInstance = new FooRequest().MakeReadOnly();
+ private static readonly string[] _fooRequestFieldNames = new string[] { };
+ private static readonly uint[] _fooRequestFieldTags = new uint[] { };
+ public static FooRequest DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override FooRequest DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override FooRequest ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_FooRequest__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<FooRequest, FooRequest.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_FooRequest__FieldAccessorTable; }
+ }
+
+ public override bool IsInitialized {
+ get {
+ return true;
+ }
+ }
+
+ public override void WriteTo(pb::ICodedOutputStream output) {
+ CalcSerializedSize();
+ string[] field_names = _fooRequestFieldNames;
+ UnknownFields.WriteTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public override int SerializedSize {
+ get {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+ return CalcSerializedSize();
+ }
+ }
+
+ private int CalcSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ size += UnknownFields.SerializedSize;
+ memoizedSerializedSize = size;
+ return size;
+ }
+ public static FooRequest ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static FooRequest ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static FooRequest ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static FooRequest ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static FooRequest ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static FooRequest ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static FooRequest ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static FooRequest ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static FooRequest ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static FooRequest ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private FooRequest 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(FooRequest prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Builder : pb::GeneratedBuilder<FooRequest, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(FooRequest cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private FooRequest result;
+
+ private FooRequest PrepareBuilder() {
+ if (resultIsReadOnly) {
+ FooRequest original = result;
+ result = new FooRequest();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override FooRequest 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.FooRequest.Descriptor; }
+ }
+
+ public override FooRequest DefaultInstanceForType {
+ get { return global::Google.ProtocolBuffers.TestProtos.FooRequest.DefaultInstance; }
+ }
+
+ public override FooRequest BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+ public override Builder MergeFrom(pb::IMessage other) {
+ if (other is FooRequest) {
+ return MergeFrom((FooRequest) other);
+ } else {
+ base.MergeFrom(other);
+ return this;
+ }
+ }
+
+ public override Builder MergeFrom(FooRequest other) {
+ if (other == global::Google.ProtocolBuffers.TestProtos.FooRequest.DefaultInstance) return this;
+ PrepareBuilder();
+ this.MergeUnknownFields(other.UnknownFields);
+ return this;
+ }
+
+ public override Builder MergeFrom(pb::ICodedInputStream input) {
+ return MergeFrom(input, pb::ExtensionRegistry.Empty);
+ }
+
+ public override Builder MergeFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ PrepareBuilder();
+ pb::UnknownFieldSet.Builder unknownFields = null;
+ uint tag;
+ string field_name;
+ while (input.ReadTag(out tag, out field_name)) {
+ if(tag == 0 && field_name != null) {
+ int field_ordinal = global::System.Array.BinarySearch(_fooRequestFieldNames, field_name, global::System.StringComparer.Ordinal);
+ if(field_ordinal >= 0)
+ tag = _fooRequestFieldTags[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 FooRequest() {
+ object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor, null);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class FooResponse : pb::GeneratedMessage<FooResponse, FooResponse.Builder> {
+ private FooResponse() { }
+ private static readonly FooResponse defaultInstance = new FooResponse().MakeReadOnly();
+ private static readonly string[] _fooResponseFieldNames = new string[] { };
+ private static readonly uint[] _fooResponseFieldTags = new uint[] { };
+ public static FooResponse DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override FooResponse DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override FooResponse ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_FooResponse__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<FooResponse, FooResponse.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_FooResponse__FieldAccessorTable; }
+ }
+
+ public override bool IsInitialized {
+ get {
+ return true;
+ }
+ }
+
+ public override void WriteTo(pb::ICodedOutputStream output) {
+ CalcSerializedSize();
+ string[] field_names = _fooResponseFieldNames;
+ UnknownFields.WriteTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public override int SerializedSize {
+ get {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+ return CalcSerializedSize();
+ }
+ }
+
+ private int CalcSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ size += UnknownFields.SerializedSize;
+ memoizedSerializedSize = size;
+ return size;
+ }
+ public static FooResponse ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static FooResponse ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static FooResponse ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static FooResponse ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static FooResponse ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static FooResponse ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static FooResponse ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static FooResponse ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static FooResponse ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static FooResponse ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private FooResponse 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(FooResponse prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Builder : pb::GeneratedBuilder<FooResponse, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(FooResponse cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private FooResponse result;
+
+ private FooResponse PrepareBuilder() {
+ if (resultIsReadOnly) {
+ FooResponse original = result;
+ result = new FooResponse();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override FooResponse 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.FooResponse.Descriptor; }
+ }
+
+ public override FooResponse DefaultInstanceForType {
+ get { return global::Google.ProtocolBuffers.TestProtos.FooResponse.DefaultInstance; }
+ }
+
+ public override FooResponse BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+ public override Builder MergeFrom(pb::IMessage other) {
+ if (other is FooResponse) {
+ return MergeFrom((FooResponse) other);
+ } else {
+ base.MergeFrom(other);
+ return this;
+ }
+ }
+
+ public override Builder MergeFrom(FooResponse other) {
+ if (other == global::Google.ProtocolBuffers.TestProtos.FooResponse.DefaultInstance) return this;
+ PrepareBuilder();
+ this.MergeUnknownFields(other.UnknownFields);
+ return this;
+ }
+
+ public override Builder MergeFrom(pb::ICodedInputStream input) {
+ return MergeFrom(input, pb::ExtensionRegistry.Empty);
+ }
+
+ public override Builder MergeFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ PrepareBuilder();
+ pb::UnknownFieldSet.Builder unknownFields = null;
+ uint tag;
+ string field_name;
+ while (input.ReadTag(out tag, out field_name)) {
+ if(tag == 0 && field_name != null) {
+ int field_ordinal = global::System.Array.BinarySearch(_fooResponseFieldNames, field_name, global::System.StringComparer.Ordinal);
+ if(field_ordinal >= 0)
+ tag = _fooResponseFieldTags[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 FooResponse() {
+ object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor, null);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class FooClientMessage : pb::GeneratedMessage<FooClientMessage, FooClientMessage.Builder> {
+ private FooClientMessage() { }
+ private static readonly FooClientMessage defaultInstance = new FooClientMessage().MakeReadOnly();
+ private static readonly string[] _fooClientMessageFieldNames = new string[] { };
+ private static readonly uint[] _fooClientMessageFieldTags = new uint[] { };
+ public static FooClientMessage DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override FooClientMessage DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override FooClientMessage ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_FooClientMessage__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<FooClientMessage, FooClientMessage.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_FooClientMessage__FieldAccessorTable; }
+ }
+
+ public override bool IsInitialized {
+ get {
+ return true;
+ }
+ }
+
+ public override void WriteTo(pb::ICodedOutputStream output) {
+ CalcSerializedSize();
+ string[] field_names = _fooClientMessageFieldNames;
+ UnknownFields.WriteTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public override int SerializedSize {
+ get {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+ return CalcSerializedSize();
+ }
+ }
+
+ private int CalcSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ size += UnknownFields.SerializedSize;
+ memoizedSerializedSize = size;
+ return size;
+ }
+ public static FooClientMessage ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static FooClientMessage ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static FooClientMessage ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static FooClientMessage ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static FooClientMessage ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static FooClientMessage ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static FooClientMessage ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static FooClientMessage ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static FooClientMessage ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static FooClientMessage ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private FooClientMessage 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(FooClientMessage prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Builder : pb::GeneratedBuilder<FooClientMessage, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(FooClientMessage cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private FooClientMessage result;
+
+ private FooClientMessage PrepareBuilder() {
+ if (resultIsReadOnly) {
+ FooClientMessage original = result;
+ result = new FooClientMessage();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override FooClientMessage 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.FooClientMessage.Descriptor; }
+ }
+
+ public override FooClientMessage DefaultInstanceForType {
+ get { return global::Google.ProtocolBuffers.TestProtos.FooClientMessage.DefaultInstance; }
+ }
+
+ public override FooClientMessage BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+ public override Builder MergeFrom(pb::IMessage other) {
+ if (other is FooClientMessage) {
+ return MergeFrom((FooClientMessage) other);
+ } else {
+ base.MergeFrom(other);
+ return this;
+ }
+ }
+
+ public override Builder MergeFrom(FooClientMessage other) {
+ if (other == global::Google.ProtocolBuffers.TestProtos.FooClientMessage.DefaultInstance) return this;
+ PrepareBuilder();
+ this.MergeUnknownFields(other.UnknownFields);
+ return this;
+ }
+
+ public override Builder MergeFrom(pb::ICodedInputStream input) {
+ return MergeFrom(input, pb::ExtensionRegistry.Empty);
+ }
+
+ public override Builder MergeFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ PrepareBuilder();
+ pb::UnknownFieldSet.Builder unknownFields = null;
+ uint tag;
+ string field_name;
+ while (input.ReadTag(out tag, out field_name)) {
+ if(tag == 0 && field_name != null) {
+ int field_ordinal = global::System.Array.BinarySearch(_fooClientMessageFieldNames, field_name, global::System.StringComparer.Ordinal);
+ if(field_ordinal >= 0)
+ tag = _fooClientMessageFieldTags[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 FooClientMessage() {
+ object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor, null);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class FooServerMessage : pb::GeneratedMessage<FooServerMessage, FooServerMessage.Builder> {
+ private FooServerMessage() { }
+ private static readonly FooServerMessage defaultInstance = new FooServerMessage().MakeReadOnly();
+ private static readonly string[] _fooServerMessageFieldNames = new string[] { };
+ private static readonly uint[] _fooServerMessageFieldTags = new uint[] { };
+ public static FooServerMessage DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override FooServerMessage DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override FooServerMessage ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_FooServerMessage__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<FooServerMessage, FooServerMessage.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_FooServerMessage__FieldAccessorTable; }
+ }
+
+ public override bool IsInitialized {
+ get {
+ return true;
+ }
+ }
+
+ public override void WriteTo(pb::ICodedOutputStream output) {
+ CalcSerializedSize();
+ string[] field_names = _fooServerMessageFieldNames;
+ UnknownFields.WriteTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public override int SerializedSize {
+ get {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+ return CalcSerializedSize();
+ }
+ }
+
+ private int CalcSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ size += UnknownFields.SerializedSize;
+ memoizedSerializedSize = size;
+ return size;
+ }
+ public static FooServerMessage ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static FooServerMessage ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static FooServerMessage ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static FooServerMessage ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static FooServerMessage ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static FooServerMessage ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static FooServerMessage ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static FooServerMessage ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static FooServerMessage ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static FooServerMessage ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private FooServerMessage 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(FooServerMessage prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Builder : pb::GeneratedBuilder<FooServerMessage, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(FooServerMessage cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private FooServerMessage result;
+
+ private FooServerMessage PrepareBuilder() {
+ if (resultIsReadOnly) {
+ FooServerMessage original = result;
+ result = new FooServerMessage();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override FooServerMessage 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.FooServerMessage.Descriptor; }
+ }
+
+ public override FooServerMessage DefaultInstanceForType {
+ get { return global::Google.ProtocolBuffers.TestProtos.FooServerMessage.DefaultInstance; }
+ }
+
+ public override FooServerMessage BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+ public override Builder MergeFrom(pb::IMessage other) {
+ if (other is FooServerMessage) {
+ return MergeFrom((FooServerMessage) other);
+ } else {
+ base.MergeFrom(other);
+ return this;
+ }
+ }
+
+ public override Builder MergeFrom(FooServerMessage other) {
+ if (other == global::Google.ProtocolBuffers.TestProtos.FooServerMessage.DefaultInstance) return this;
+ PrepareBuilder();
+ this.MergeUnknownFields(other.UnknownFields);
+ return this;
+ }
+
+ public override Builder MergeFrom(pb::ICodedInputStream input) {
+ return MergeFrom(input, pb::ExtensionRegistry.Empty);
+ }
+
+ public override Builder MergeFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ PrepareBuilder();
+ pb::UnknownFieldSet.Builder unknownFields = null;
+ uint tag;
+ string field_name;
+ while (input.ReadTag(out tag, out field_name)) {
+ if(tag == 0 && field_name != null) {
+ int field_ordinal = global::System.Array.BinarySearch(_fooServerMessageFieldNames, field_name, global::System.StringComparer.Ordinal);
+ if(field_ordinal >= 0)
+ tag = _fooServerMessageFieldTags[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 FooServerMessage() {
+ object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor, null);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class BarRequest : pb::GeneratedMessage<BarRequest, BarRequest.Builder> {
+ private BarRequest() { }
+ private static readonly BarRequest defaultInstance = new BarRequest().MakeReadOnly();
+ private static readonly string[] _barRequestFieldNames = new string[] { };
+ private static readonly uint[] _barRequestFieldTags = new uint[] { };
+ public static BarRequest DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override BarRequest DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override BarRequest ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_BarRequest__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<BarRequest, BarRequest.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_BarRequest__FieldAccessorTable; }
+ }
+
+ public override bool IsInitialized {
+ get {
+ return true;
+ }
+ }
+
+ public override void WriteTo(pb::ICodedOutputStream output) {
+ CalcSerializedSize();
+ string[] field_names = _barRequestFieldNames;
+ UnknownFields.WriteTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public override int SerializedSize {
+ get {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+ return CalcSerializedSize();
+ }
+ }
+
+ private int CalcSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ size += UnknownFields.SerializedSize;
+ memoizedSerializedSize = size;
+ return size;
+ }
+ public static BarRequest ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static BarRequest ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static BarRequest ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static BarRequest ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static BarRequest ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static BarRequest ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static BarRequest ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static BarRequest ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static BarRequest ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static BarRequest ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private BarRequest 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(BarRequest prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Builder : pb::GeneratedBuilder<BarRequest, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(BarRequest cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private BarRequest result;
+
+ private BarRequest PrepareBuilder() {
+ if (resultIsReadOnly) {
+ BarRequest original = result;
+ result = new BarRequest();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override BarRequest 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.BarRequest.Descriptor; }
+ }
+
+ public override BarRequest DefaultInstanceForType {
+ get { return global::Google.ProtocolBuffers.TestProtos.BarRequest.DefaultInstance; }
+ }
+
+ public override BarRequest BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+ public override Builder MergeFrom(pb::IMessage other) {
+ if (other is BarRequest) {
+ return MergeFrom((BarRequest) other);
+ } else {
+ base.MergeFrom(other);
+ return this;
+ }
+ }
+
+ public override Builder MergeFrom(BarRequest other) {
+ if (other == global::Google.ProtocolBuffers.TestProtos.BarRequest.DefaultInstance) return this;
+ PrepareBuilder();
+ this.MergeUnknownFields(other.UnknownFields);
+ return this;
+ }
+
+ public override Builder MergeFrom(pb::ICodedInputStream input) {
+ return MergeFrom(input, pb::ExtensionRegistry.Empty);
+ }
+
+ public override Builder MergeFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ PrepareBuilder();
+ pb::UnknownFieldSet.Builder unknownFields = null;
+ uint tag;
+ string field_name;
+ while (input.ReadTag(out tag, out field_name)) {
+ if(tag == 0 && field_name != null) {
+ int field_ordinal = global::System.Array.BinarySearch(_barRequestFieldNames, field_name, global::System.StringComparer.Ordinal);
+ if(field_ordinal >= 0)
+ tag = _barRequestFieldTags[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 BarRequest() {
+ object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor, null);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class BarResponse : pb::GeneratedMessage<BarResponse, BarResponse.Builder> {
+ private BarResponse() { }
+ private static readonly BarResponse defaultInstance = new BarResponse().MakeReadOnly();
+ private static readonly string[] _barResponseFieldNames = new string[] { };
+ private static readonly uint[] _barResponseFieldTags = new uint[] { };
+ public static BarResponse DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override BarResponse DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override BarResponse ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_BarResponse__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<BarResponse, BarResponse.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.Unittest.internal__static_protobuf_unittest_BarResponse__FieldAccessorTable; }
+ }
+
+ public override bool IsInitialized {
+ get {
+ return true;
+ }
+ }
+
+ public override void WriteTo(pb::ICodedOutputStream output) {
+ CalcSerializedSize();
+ string[] field_names = _barResponseFieldNames;
+ UnknownFields.WriteTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public override int SerializedSize {
+ get {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+ return CalcSerializedSize();
+ }
+ }
+
+ private int CalcSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ size += UnknownFields.SerializedSize;
+ memoizedSerializedSize = size;
+ return size;
+ }
+ public static BarResponse ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static BarResponse ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static BarResponse ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static BarResponse ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static BarResponse ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static BarResponse ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static BarResponse ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static BarResponse ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static BarResponse ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static BarResponse ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private BarResponse 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(BarResponse prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Builder : pb::GeneratedBuilder<BarResponse, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(BarResponse cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private BarResponse result;
+
+ private BarResponse PrepareBuilder() {
+ if (resultIsReadOnly) {
+ BarResponse original = result;
+ result = new BarResponse();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override BarResponse 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.BarResponse.Descriptor; }
+ }
+
+ public override BarResponse DefaultInstanceForType {
+ get { return global::Google.ProtocolBuffers.TestProtos.BarResponse.DefaultInstance; }
+ }
+
+ public override BarResponse BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+ public override Builder MergeFrom(pb::IMessage other) {
+ if (other is BarResponse) {
+ return MergeFrom((BarResponse) other);
+ } else {
+ base.MergeFrom(other);
+ return this;
+ }
+ }
+
+ public override Builder MergeFrom(BarResponse other) {
+ if (other == global::Google.ProtocolBuffers.TestProtos.BarResponse.DefaultInstance) return this;
+ PrepareBuilder();
+ this.MergeUnknownFields(other.UnknownFields);
+ return this;
+ }
+
+ public override Builder MergeFrom(pb::ICodedInputStream input) {
+ return MergeFrom(input, pb::ExtensionRegistry.Empty);
+ }
+
+ public override Builder MergeFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ PrepareBuilder();
+ pb::UnknownFieldSet.Builder unknownFields = null;
+ uint tag;
+ string field_name;
+ while (input.ReadTag(out tag, out field_name)) {
+ if(tag == 0 && field_name != null) {
+ int field_ordinal = global::System.Array.BinarySearch(_barResponseFieldNames, field_name, global::System.StringComparer.Ordinal);
+ if(field_ordinal >= 0)
+ tag = _barResponseFieldTags[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 BarResponse() {
+ object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.Unittest.Descriptor, null);
+ }
+ }
+
+ #endregion
+
+}
+
+#endregion Designer generated code
diff --git a/csharp/src/ProtoBench/TestProtos/UnitTestImportProtoFile.cs b/csharp/src/ProtoBench/UnittestImport.cs
similarity index 89%
rename from csharp/src/ProtoBench/TestProtos/UnitTestImportProtoFile.cs
rename to csharp/src/ProtoBench/UnittestImport.cs
index 4cae2b8..81f9ee5 100644
--- a/csharp/src/ProtoBench/TestProtos/UnitTestImportProtoFile.cs
+++ b/csharp/src/ProtoBench/UnittestImport.cs
@@ -1,346 +1,347 @@
-// Generated by ProtoGen, Version=2.4.1.555, Culture=neutral, PublicKeyToken=55f7125234beb589. DO NOT EDIT!
-#pragma warning disable 1591, 0612, 3021
-#region Designer generated code
-
-using pb = global::Google.ProtocolBuffers;
-using pbc = global::Google.ProtocolBuffers.Collections;
-using pbd = global::Google.ProtocolBuffers.Descriptors;
-using scg = global::System.Collections.Generic;
-namespace Google.ProtocolBuffers.TestProtos {
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public static partial class UnitTestImportProtoFile {
-
- #region Extension registration
- public static void RegisterAllExtensions(pb::ExtensionRegistry registry) {
- }
- #endregion
- #region Static variables
- internal static pbd::MessageDescriptor internal__static_protobuf_unittest_import_ImportMessage__Descriptor;
- internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.ImportMessage, global::Google.ProtocolBuffers.TestProtos.ImportMessage.Builder> internal__static_protobuf_unittest_import_ImportMessage__FieldAccessorTable;
- #endregion
- #region Descriptor
- public static pbd::FileDescriptor Descriptor {
- get { return descriptor; }
- }
- private static pbd::FileDescriptor descriptor;
-
- static UnitTestImportProtoFile() {
- byte[] descriptorData = global::System.Convert.FromBase64String(
- string.Concat(
- "CiVnb29nbGUvcHJvdG9idWYvdW5pdHRlc3RfaW1wb3J0LnByb3RvEhhwcm90",
- "b2J1Zl91bml0dGVzdF9pbXBvcnQaJGdvb2dsZS9wcm90b2J1Zi9jc2hhcnBf",
- "b3B0aW9ucy5wcm90byIaCg1JbXBvcnRNZXNzYWdlEgkKAWQYASABKAUqPAoK",
- "SW1wb3J0RW51bRIOCgpJTVBPUlRfRk9PEAcSDgoKSU1QT1JUX0JBUhAIEg4K",
- "CklNUE9SVF9CQVoQCUJbChhjb20uZ29vZ2xlLnByb3RvYnVmLnRlc3RIAcI+",
- "PAohR29vZ2xlLlByb3RvY29sQnVmZmVycy5UZXN0UHJvdG9zEhdVbml0VGVz",
- "dEltcG9ydFByb3RvRmlsZQ=="));
- pbd::FileDescriptor.InternalDescriptorAssigner assigner = delegate(pbd::FileDescriptor root) {
- descriptor = root;
- internal__static_protobuf_unittest_import_ImportMessage__Descriptor = Descriptor.MessageTypes[0];
- internal__static_protobuf_unittest_import_ImportMessage__FieldAccessorTable =
- new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.ImportMessage, global::Google.ProtocolBuffers.TestProtos.ImportMessage.Builder>(internal__static_protobuf_unittest_import_ImportMessage__Descriptor,
- new string[] { "D", });
- pb::ExtensionRegistry registry = pb::ExtensionRegistry.CreateInstance();
- RegisterAllExtensions(registry);
- global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.RegisterAllExtensions(registry);
- return registry;
- };
- pbd::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData,
- new pbd::FileDescriptor[] {
- global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.Descriptor,
- }, assigner);
- }
- #endregion
-
- }
- #region Enums
- public enum ImportEnum {
- IMPORT_FOO = 7,
- IMPORT_BAR = 8,
- IMPORT_BAZ = 9,
- }
-
- #endregion
-
- #region Messages
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class ImportMessage : pb::GeneratedMessage<ImportMessage, ImportMessage.Builder> {
- private ImportMessage() { }
- private static readonly ImportMessage defaultInstance = new ImportMessage().MakeReadOnly();
- private static readonly string[] _importMessageFieldNames = new string[] { "d" };
- private static readonly uint[] _importMessageFieldTags = new uint[] { 8 };
- public static ImportMessage DefaultInstance {
- get { return defaultInstance; }
- }
-
- public override ImportMessage DefaultInstanceForType {
- get { return DefaultInstance; }
- }
-
- protected override ImportMessage ThisMessage {
- get { return this; }
- }
-
- public static pbd::MessageDescriptor Descriptor {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestImportProtoFile.internal__static_protobuf_unittest_import_ImportMessage__Descriptor; }
- }
-
- protected override pb::FieldAccess.FieldAccessorTable<ImportMessage, ImportMessage.Builder> InternalFieldAccessors {
- get { return global::Google.ProtocolBuffers.TestProtos.UnitTestImportProtoFile.internal__static_protobuf_unittest_import_ImportMessage__FieldAccessorTable; }
- }
-
- public const int DFieldNumber = 1;
- private bool hasD;
- private int d_;
- public bool HasD {
- get { return hasD; }
- }
- public int D {
- get { return d_; }
- }
-
- public override bool IsInitialized {
- get {
- return true;
- }
- }
-
- public override void WriteTo(pb::ICodedOutputStream output) {
- CalcSerializedSize();
- string[] field_names = _importMessageFieldNames;
- if (hasD) {
- output.WriteInt32(1, field_names[0], D);
- }
- UnknownFields.WriteTo(output);
- }
-
- private int memoizedSerializedSize = -1;
- public override int SerializedSize {
- get {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
- return CalcSerializedSize();
- }
- }
-
- private int CalcSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- if (hasD) {
- size += pb::CodedOutputStream.ComputeInt32Size(1, D);
- }
- size += UnknownFields.SerializedSize;
- memoizedSerializedSize = size;
- return size;
- }
- public static ImportMessage ParseFrom(pb::ByteString data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static ImportMessage ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static ImportMessage ParseFrom(byte[] data) {
- return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
- }
- public static ImportMessage ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
- }
- public static ImportMessage ParseFrom(global::System.IO.Stream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static ImportMessage ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- public static ImportMessage ParseDelimitedFrom(global::System.IO.Stream input) {
- return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
- }
- public static ImportMessage ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
- return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
- }
- public static ImportMessage ParseFrom(pb::ICodedInputStream input) {
- return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
- }
- public static ImportMessage ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
- return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
- }
- private ImportMessage 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(ImportMessage prototype) {
- return new Builder(prototype);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class Builder : pb::GeneratedBuilder<ImportMessage, Builder> {
- protected override Builder ThisBuilder {
- get { return this; }
- }
- public Builder() {
- result = DefaultInstance;
- resultIsReadOnly = true;
- }
- internal Builder(ImportMessage cloneFrom) {
- result = cloneFrom;
- resultIsReadOnly = true;
- }
-
- private bool resultIsReadOnly;
- private ImportMessage result;
-
- private ImportMessage PrepareBuilder() {
- if (resultIsReadOnly) {
- ImportMessage original = result;
- result = new ImportMessage();
- resultIsReadOnly = false;
- MergeFrom(original);
- }
- return result;
- }
-
- public override bool IsInitialized {
- get { return result.IsInitialized; }
- }
-
- protected override ImportMessage 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.ImportMessage.Descriptor; }
- }
-
- public override ImportMessage DefaultInstanceForType {
- get { return global::Google.ProtocolBuffers.TestProtos.ImportMessage.DefaultInstance; }
- }
-
- public override ImportMessage BuildPartial() {
- if (resultIsReadOnly) {
- return result;
- }
- resultIsReadOnly = true;
- return result.MakeReadOnly();
- }
-
- public override Builder MergeFrom(pb::IMessage other) {
- if (other is ImportMessage) {
- return MergeFrom((ImportMessage) other);
- } else {
- base.MergeFrom(other);
- return this;
- }
- }
-
- public override Builder MergeFrom(ImportMessage other) {
- if (other == global::Google.ProtocolBuffers.TestProtos.ImportMessage.DefaultInstance) return this;
- PrepareBuilder();
- if (other.HasD) {
- D = other.D;
- }
- 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(_importMessageFieldNames, field_name, global::System.StringComparer.Ordinal);
- if(field_ordinal >= 0)
- tag = _importMessageFieldTags[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.hasD = input.ReadInt32(ref result.d_);
- break;
- }
- }
- }
-
- if (unknownFields != null) {
- this.UnknownFields = unknownFields.Build();
- }
- return this;
- }
-
-
- public bool HasD {
- get { return result.hasD; }
- }
- public int D {
- get { return result.D; }
- set { SetD(value); }
- }
- public Builder SetD(int value) {
- PrepareBuilder();
- result.hasD = true;
- result.d_ = value;
- return this;
- }
- public Builder ClearD() {
- PrepareBuilder();
- result.hasD = false;
- result.d_ = 0;
- return this;
- }
- }
- static ImportMessage() {
- object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestImportProtoFile.Descriptor, null);
- }
- }
-
- #endregion
-
-}
-
-#endregion Designer generated code
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/protobuf/unittest_import.proto
+#pragma warning disable 1591, 0612, 3021
+#region Designer generated code
+
+using pb = global::Google.ProtocolBuffers;
+using pbc = global::Google.ProtocolBuffers.Collections;
+using pbd = global::Google.ProtocolBuffers.Descriptors;
+using scg = global::System.Collections.Generic;
+namespace Google.ProtocolBuffers.TestProtos {
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public static partial class UnittestImport {
+
+ #region Extension registration
+ public static void RegisterAllExtensions(pb::ExtensionRegistry registry) {
+ }
+ #endregion
+ #region Static variables
+ internal static pbd::MessageDescriptor internal__static_protobuf_unittest_import_ImportMessage__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.ImportMessage, global::Google.ProtocolBuffers.TestProtos.ImportMessage.Builder> internal__static_protobuf_unittest_import_ImportMessage__FieldAccessorTable;
+ #endregion
+ #region Descriptor
+ public static pbd::FileDescriptor Descriptor {
+ get { return descriptor; }
+ }
+ private static pbd::FileDescriptor descriptor;
+
+ static UnittestImport() {
+ byte[] descriptorData = global::System.Convert.FromBase64String(
+ string.Concat(
+ "CiVnb29nbGUvcHJvdG9idWYvdW5pdHRlc3RfaW1wb3J0LnByb3RvEhhwcm90",
+ "b2J1Zl91bml0dGVzdF9pbXBvcnQaLGdvb2dsZS9wcm90b2J1Zi91bml0dGVz",
+ "dF9pbXBvcnRfcHVibGljLnByb3RvIhoKDUltcG9ydE1lc3NhZ2USCQoBZBgB",
+ "IAEoBSo8CgpJbXBvcnRFbnVtEg4KCklNUE9SVF9GT08QBxIOCgpJTVBPUlRf",
+ "QkFSEAgSDgoKSU1QT1JUX0JBWhAJQkMKGGNvbS5nb29nbGUucHJvdG9idWYu",
+ "dGVzdEgB+AEBqgIhR29vZ2xlLlByb3RvY29sQnVmZmVycy5UZXN0UHJvdG9z",
+ "UAA="));
+ pbd::FileDescriptor.InternalDescriptorAssigner assigner = delegate(pbd::FileDescriptor root) {
+ descriptor = root;
+ internal__static_protobuf_unittest_import_ImportMessage__Descriptor = Descriptor.MessageTypes[0];
+ internal__static_protobuf_unittest_import_ImportMessage__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.ImportMessage, global::Google.ProtocolBuffers.TestProtos.ImportMessage.Builder>(internal__static_protobuf_unittest_import_ImportMessage__Descriptor,
+ new string[] { "D", });
+ pb::ExtensionRegistry registry = pb::ExtensionRegistry.CreateInstance();
+ RegisterAllExtensions(registry);
+ global::Google.ProtocolBuffers.TestProtos.UnittestImportPublic.RegisterAllExtensions(registry);
+ return registry;
+ };
+ pbd::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData,
+ new pbd::FileDescriptor[] {
+ global::Google.ProtocolBuffers.TestProtos.UnittestImportPublic.Descriptor,
+ }, assigner);
+ }
+ #endregion
+
+ }
+ #region Enums
+ public enum ImportEnum {
+ IMPORT_FOO = 7,
+ IMPORT_BAR = 8,
+ IMPORT_BAZ = 9,
+ }
+
+ #endregion
+
+ #region Messages
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class ImportMessage : pb::GeneratedMessage<ImportMessage, ImportMessage.Builder> {
+ private ImportMessage() { }
+ private static readonly ImportMessage defaultInstance = new ImportMessage().MakeReadOnly();
+ private static readonly string[] _importMessageFieldNames = new string[] { "d" };
+ private static readonly uint[] _importMessageFieldTags = new uint[] { 8 };
+ public static ImportMessage DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override ImportMessage DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override ImportMessage ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::Google.ProtocolBuffers.TestProtos.UnittestImport.internal__static_protobuf_unittest_import_ImportMessage__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<ImportMessage, ImportMessage.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.UnittestImport.internal__static_protobuf_unittest_import_ImportMessage__FieldAccessorTable; }
+ }
+
+ public const int DFieldNumber = 1;
+ private bool hasD;
+ private int d_;
+ public bool HasD {
+ get { return hasD; }
+ }
+ public int D {
+ get { return d_; }
+ }
+
+ public override bool IsInitialized {
+ get {
+ return true;
+ }
+ }
+
+ public override void WriteTo(pb::ICodedOutputStream output) {
+ CalcSerializedSize();
+ string[] field_names = _importMessageFieldNames;
+ if (hasD) {
+ output.WriteInt32(1, field_names[0], D);
+ }
+ UnknownFields.WriteTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public override int SerializedSize {
+ get {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+ return CalcSerializedSize();
+ }
+ }
+
+ private int CalcSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (hasD) {
+ size += pb::CodedOutputStream.ComputeInt32Size(1, D);
+ }
+ size += UnknownFields.SerializedSize;
+ memoizedSerializedSize = size;
+ return size;
+ }
+ public static ImportMessage ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static ImportMessage ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static ImportMessage ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static ImportMessage ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static ImportMessage ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static ImportMessage ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static ImportMessage ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static ImportMessage ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static ImportMessage ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static ImportMessage ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private ImportMessage 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(ImportMessage prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Builder : pb::GeneratedBuilder<ImportMessage, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(ImportMessage cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private ImportMessage result;
+
+ private ImportMessage PrepareBuilder() {
+ if (resultIsReadOnly) {
+ ImportMessage original = result;
+ result = new ImportMessage();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override ImportMessage 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.ImportMessage.Descriptor; }
+ }
+
+ public override ImportMessage DefaultInstanceForType {
+ get { return global::Google.ProtocolBuffers.TestProtos.ImportMessage.DefaultInstance; }
+ }
+
+ public override ImportMessage BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+ public override Builder MergeFrom(pb::IMessage other) {
+ if (other is ImportMessage) {
+ return MergeFrom((ImportMessage) other);
+ } else {
+ base.MergeFrom(other);
+ return this;
+ }
+ }
+
+ public override Builder MergeFrom(ImportMessage other) {
+ if (other == global::Google.ProtocolBuffers.TestProtos.ImportMessage.DefaultInstance) return this;
+ PrepareBuilder();
+ if (other.HasD) {
+ D = other.D;
+ }
+ 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(_importMessageFieldNames, field_name, global::System.StringComparer.Ordinal);
+ if(field_ordinal >= 0)
+ tag = _importMessageFieldTags[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.hasD = input.ReadInt32(ref result.d_);
+ break;
+ }
+ }
+ }
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
+ }
+
+
+ public bool HasD {
+ get { return result.hasD; }
+ }
+ public int D {
+ get { return result.D; }
+ set { SetD(value); }
+ }
+ public Builder SetD(int value) {
+ PrepareBuilder();
+ result.hasD = true;
+ result.d_ = value;
+ return this;
+ }
+ public Builder ClearD() {
+ PrepareBuilder();
+ result.hasD = false;
+ result.d_ = 0;
+ return this;
+ }
+ }
+ static ImportMessage() {
+ object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnittestImport.Descriptor, null);
+ }
+ }
+
+ #endregion
+
+}
+
+#endregion Designer generated code
diff --git a/csharp/src/ProtoBench/UnittestImportPublic.cs b/csharp/src/ProtoBench/UnittestImportPublic.cs
new file mode 100644
index 0000000..4185cac
--- /dev/null
+++ b/csharp/src/ProtoBench/UnittestImportPublic.cs
@@ -0,0 +1,333 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/protobuf/unittest_import_public.proto
+#pragma warning disable 1591, 0612, 3021
+#region Designer generated code
+
+using pb = global::Google.ProtocolBuffers;
+using pbc = global::Google.ProtocolBuffers.Collections;
+using pbd = global::Google.ProtocolBuffers.Descriptors;
+using scg = global::System.Collections.Generic;
+namespace Google.ProtocolBuffers.TestProtos {
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public static partial class UnittestImportPublic {
+
+ #region Extension registration
+ public static void RegisterAllExtensions(pb::ExtensionRegistry registry) {
+ }
+ #endregion
+ #region Static variables
+ internal static pbd::MessageDescriptor internal__static_protobuf_unittest_import_PublicImportMessage__Descriptor;
+ internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.PublicImportMessage, global::Google.ProtocolBuffers.TestProtos.PublicImportMessage.Builder> internal__static_protobuf_unittest_import_PublicImportMessage__FieldAccessorTable;
+ #endregion
+ #region Descriptor
+ public static pbd::FileDescriptor Descriptor {
+ get { return descriptor; }
+ }
+ private static pbd::FileDescriptor descriptor;
+
+ static UnittestImportPublic() {
+ byte[] descriptorData = global::System.Convert.FromBase64String(
+ string.Concat(
+ "Cixnb29nbGUvcHJvdG9idWYvdW5pdHRlc3RfaW1wb3J0X3B1YmxpYy5wcm90",
+ "bxIYcHJvdG9idWZfdW5pdHRlc3RfaW1wb3J0IiAKE1B1YmxpY0ltcG9ydE1l",
+ "c3NhZ2USCQoBZRgBIAEoBUI+Chhjb20uZ29vZ2xlLnByb3RvYnVmLnRlc3Sq",
+ "AiFHb29nbGUuUHJvdG9jb2xCdWZmZXJzLlRlc3RQcm90b3M="));
+ pbd::FileDescriptor.InternalDescriptorAssigner assigner = delegate(pbd::FileDescriptor root) {
+ descriptor = root;
+ internal__static_protobuf_unittest_import_PublicImportMessage__Descriptor = Descriptor.MessageTypes[0];
+ internal__static_protobuf_unittest_import_PublicImportMessage__FieldAccessorTable =
+ new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.PublicImportMessage, global::Google.ProtocolBuffers.TestProtos.PublicImportMessage.Builder>(internal__static_protobuf_unittest_import_PublicImportMessage__Descriptor,
+ new string[] { "E", });
+ pb::ExtensionRegistry registry = pb::ExtensionRegistry.CreateInstance();
+ RegisterAllExtensions(registry);
+ return registry;
+ };
+ pbd::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData,
+ new pbd::FileDescriptor[] {
+ }, assigner);
+ }
+ #endregion
+
+ }
+ #region Messages
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class PublicImportMessage : pb::GeneratedMessage<PublicImportMessage, PublicImportMessage.Builder> {
+ private PublicImportMessage() { }
+ private static readonly PublicImportMessage defaultInstance = new PublicImportMessage().MakeReadOnly();
+ private static readonly string[] _publicImportMessageFieldNames = new string[] { "e" };
+ private static readonly uint[] _publicImportMessageFieldTags = new uint[] { 8 };
+ public static PublicImportMessage DefaultInstance {
+ get { return defaultInstance; }
+ }
+
+ public override PublicImportMessage DefaultInstanceForType {
+ get { return DefaultInstance; }
+ }
+
+ protected override PublicImportMessage ThisMessage {
+ get { return this; }
+ }
+
+ public static pbd::MessageDescriptor Descriptor {
+ get { return global::Google.ProtocolBuffers.TestProtos.UnittestImportPublic.internal__static_protobuf_unittest_import_PublicImportMessage__Descriptor; }
+ }
+
+ protected override pb::FieldAccess.FieldAccessorTable<PublicImportMessage, PublicImportMessage.Builder> InternalFieldAccessors {
+ get { return global::Google.ProtocolBuffers.TestProtos.UnittestImportPublic.internal__static_protobuf_unittest_import_PublicImportMessage__FieldAccessorTable; }
+ }
+
+ public const int EFieldNumber = 1;
+ private bool hasE;
+ private int e_;
+ public bool HasE {
+ get { return hasE; }
+ }
+ public int E {
+ get { return e_; }
+ }
+
+ public override bool IsInitialized {
+ get {
+ return true;
+ }
+ }
+
+ public override void WriteTo(pb::ICodedOutputStream output) {
+ CalcSerializedSize();
+ string[] field_names = _publicImportMessageFieldNames;
+ if (hasE) {
+ output.WriteInt32(1, field_names[0], E);
+ }
+ UnknownFields.WriteTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public override int SerializedSize {
+ get {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+ return CalcSerializedSize();
+ }
+ }
+
+ private int CalcSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (hasE) {
+ size += pb::CodedOutputStream.ComputeInt32Size(1, E);
+ }
+ size += UnknownFields.SerializedSize;
+ memoizedSerializedSize = size;
+ return size;
+ }
+ public static PublicImportMessage ParseFrom(pb::ByteString data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static PublicImportMessage ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static PublicImportMessage ParseFrom(byte[] data) {
+ return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+ }
+ public static PublicImportMessage ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+ }
+ public static PublicImportMessage ParseFrom(global::System.IO.Stream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static PublicImportMessage ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ public static PublicImportMessage ParseDelimitedFrom(global::System.IO.Stream input) {
+ return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
+ }
+ public static PublicImportMessage ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
+ return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
+ }
+ public static PublicImportMessage ParseFrom(pb::ICodedInputStream input) {
+ return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+ }
+ public static PublicImportMessage ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+ }
+ private PublicImportMessage 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(PublicImportMessage prototype) {
+ return new Builder(prototype);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Builder : pb::GeneratedBuilder<PublicImportMessage, Builder> {
+ protected override Builder ThisBuilder {
+ get { return this; }
+ }
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(PublicImportMessage cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private PublicImportMessage result;
+
+ private PublicImportMessage PrepareBuilder() {
+ if (resultIsReadOnly) {
+ PublicImportMessage original = result;
+ result = new PublicImportMessage();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
+
+ protected override PublicImportMessage 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.PublicImportMessage.Descriptor; }
+ }
+
+ public override PublicImportMessage DefaultInstanceForType {
+ get { return global::Google.ProtocolBuffers.TestProtos.PublicImportMessage.DefaultInstance; }
+ }
+
+ public override PublicImportMessage BuildPartial() {
+ if (resultIsReadOnly) {
+ return result;
+ }
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
+ }
+
+ public override Builder MergeFrom(pb::IMessage other) {
+ if (other is PublicImportMessage) {
+ return MergeFrom((PublicImportMessage) other);
+ } else {
+ base.MergeFrom(other);
+ return this;
+ }
+ }
+
+ public override Builder MergeFrom(PublicImportMessage other) {
+ if (other == global::Google.ProtocolBuffers.TestProtos.PublicImportMessage.DefaultInstance) return this;
+ PrepareBuilder();
+ if (other.HasE) {
+ E = other.E;
+ }
+ 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(_publicImportMessageFieldNames, field_name, global::System.StringComparer.Ordinal);
+ if(field_ordinal >= 0)
+ tag = _publicImportMessageFieldTags[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.hasE = input.ReadInt32(ref result.e_);
+ break;
+ }
+ }
+ }
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
+ }
+
+
+ public bool HasE {
+ get { return result.hasE; }
+ }
+ public int E {
+ get { return result.E; }
+ set { SetE(value); }
+ }
+ public Builder SetE(int value) {
+ PrepareBuilder();
+ result.hasE = true;
+ result.e_ = value;
+ return this;
+ }
+ public Builder ClearE() {
+ PrepareBuilder();
+ result.hasE = false;
+ result.e_ = 0;
+ return this;
+ }
+ }
+ static PublicImportMessage() {
+ object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnittestImportPublic.Descriptor, null);
+ }
+ }
+
+ #endregion
+
+}
+
+#endregion Designer generated code
diff --git a/csharp/src/ProtoBench/app.config b/csharp/src/ProtoBench/app.config
new file mode 100644
index 0000000..e2a5a18
--- /dev/null
+++ b/csharp/src/ProtoBench/app.config
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0,Profile=Client"/></startup></configuration>
diff --git a/csharp/src/ProtoDump/ProtoDump.csproj b/csharp/src/ProtoDump/ProtoDump.csproj
index f040d95..506d316 100644
--- a/csharp/src/ProtoDump/ProtoDump.csproj
+++ b/csharp/src/ProtoDump/ProtoDump.csproj
@@ -12,15 +12,16 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Google.ProtocolBuffers.ProtoDump</RootNamespace>
<AssemblyName>ProtoDump</AssemblyName>
- <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
+ <TargetFrameworkProfile>Client</TargetFrameworkProfile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
- <OutputPath>bin\NET35\Debug</OutputPath>
- <IntermediateOutputPath>obj\NET35\Debug\</IntermediateOutputPath>
+ <OutputPath>bin\Debug</OutputPath>
+ <IntermediateOutputPath>obj\Debug\</IntermediateOutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
@@ -31,8 +32,8 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
- <OutputPath>bin\NET35\Release</OutputPath>
- <IntermediateOutputPath>obj\NET35\Release\</IntermediateOutputPath>
+ <OutputPath>bin\Release</OutputPath>
+ <IntermediateOutputPath>obj\Release\</IntermediateOutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
@@ -54,6 +55,9 @@
<Name>ProtocolBuffers</Name>
</ProjectReference>
</ItemGroup>
+ <ItemGroup>
+ <None Include="app.config" />
+ </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
diff --git a/csharp/src/ProtoDump/app.config b/csharp/src/ProtoDump/app.config
new file mode 100644
index 0000000..e2a5a18
--- /dev/null
+++ b/csharp/src/ProtoDump/app.config
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0,Profile=Client"/></startup></configuration>
diff --git a/csharp/src/ProtoMunge/ProtoMunge.csproj b/csharp/src/ProtoMunge/ProtoMunge.csproj
index dae1a9a..7be2b3f 100644
--- a/csharp/src/ProtoMunge/ProtoMunge.csproj
+++ b/csharp/src/ProtoMunge/ProtoMunge.csproj
@@ -12,15 +12,16 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Google.ProtocolBuffers.ProtoMunge</RootNamespace>
<AssemblyName>ProtoMunge</AssemblyName>
- <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
+ <TargetFrameworkProfile>Client</TargetFrameworkProfile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
- <OutputPath>bin\NET35\Debug</OutputPath>
- <IntermediateOutputPath>obj\NET35\Debug\</IntermediateOutputPath>
+ <OutputPath>bin\Debug</OutputPath>
+ <IntermediateOutputPath>obj\Debug\</IntermediateOutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
@@ -31,8 +32,8 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
- <OutputPath>bin\NET35\Release</OutputPath>
- <IntermediateOutputPath>obj\NET35\Release\</IntermediateOutputPath>
+ <OutputPath>bin\Release</OutputPath>
+ <IntermediateOutputPath>obj\Release\</IntermediateOutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
@@ -54,6 +55,9 @@
<Name>ProtocolBuffers</Name>
</ProjectReference>
</ItemGroup>
+ <ItemGroup>
+ <None Include="app.config" />
+ </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
diff --git a/csharp/src/ProtoMunge/app.config b/csharp/src/ProtoMunge/app.config
new file mode 100644
index 0000000..e2a5a18
--- /dev/null
+++ b/csharp/src/ProtoMunge/app.config
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0,Profile=Client"/></startup></configuration>
diff --git a/csharp/src/ProtocolBuffers.Serialization/ProtocolBuffers.Serialization.csproj b/csharp/src/ProtocolBuffers.Serialization/ProtocolBuffers.Serialization.csproj
index b9f728b..4ee41ab 100644
--- a/csharp/src/ProtocolBuffers.Serialization/ProtocolBuffers.Serialization.csproj
+++ b/csharp/src/ProtocolBuffers.Serialization/ProtocolBuffers.Serialization.csproj
@@ -1,8 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
- <EnvironmentFlavor>CLIENTPROFILE</EnvironmentFlavor>
- <EnvironmentTemplate>NET35</EnvironmentTemplate>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
@@ -12,7 +10,9 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Google.ProtocolBuffers.Serialization</RootNamespace>
<AssemblyName>Google.ProtocolBuffers.Serialization</AssemblyName>
- <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <TargetFrameworkProfile>Profile92</TargetFrameworkProfile>
+ <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\..\keys\Google.ProtocolBuffers.snk</AssemblyOriginatorKeyFile>
@@ -22,8 +22,8 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
- <OutputPath>bin\NET35\Debug</OutputPath>
- <IntermediateOutputPath>obj\NET35\Debug\</IntermediateOutputPath>
+ <OutputPath>bin\Debug</OutputPath>
+ <IntermediateOutputPath>obj\Debug\</IntermediateOutputPath>
<DocumentationFile>$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
<NoWarn>1591, 1570, 1571, 1572, 1573, 1574</NoWarn>
<DefineConstants>DEBUG;TRACE;$(EnvironmentFlavor);$(EnvironmentTemplate)</DefineConstants>
@@ -35,8 +35,8 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
- <OutputPath>bin\NET35\Release</OutputPath>
- <IntermediateOutputPath>obj\NET35\Release\</IntermediateOutputPath>
+ <OutputPath>bin\Release</OutputPath>
+ <IntermediateOutputPath>obj\Release\</IntermediateOutputPath>
<DocumentationFile>$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
<NoWarn>1591, 1570, 1571, 1572, 1573, 1574</NoWarn>
<DefineConstants>TRACE;$(EnvironmentFlavor);$(EnvironmentTemplate)</DefineConstants>
@@ -82,7 +82,7 @@
<Private>False</Private>
</ProjectReference>
</ItemGroup>
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
diff --git a/csharp/src/ProtocolBuffers.Serialization/ProtocolBuffersLite.Serialization.csproj b/csharp/src/ProtocolBuffers.Serialization/ProtocolBuffersLite.Serialization.csproj
index c1754cf..5faa74f 100644
--- a/csharp/src/ProtocolBuffers.Serialization/ProtocolBuffersLite.Serialization.csproj
+++ b/csharp/src/ProtocolBuffers.Serialization/ProtocolBuffersLite.Serialization.csproj
@@ -1,8 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
- <EnvironmentFlavor>CLIENTPROFILE</EnvironmentFlavor>
- <EnvironmentTemplate>NET35</EnvironmentTemplate>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
@@ -12,7 +10,9 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Google.ProtocolBuffers.Serialization</RootNamespace>
<AssemblyName>Google.ProtocolBuffersLite.Serialization</AssemblyName>
- <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <TargetFrameworkProfile>Profile92</TargetFrameworkProfile>
+ <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\..\keys\Google.ProtocolBuffers.snk</AssemblyOriginatorKeyFile>
@@ -22,8 +22,8 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
- <OutputPath>bin\NET35\Debug</OutputPath>
- <IntermediateOutputPath>obj\NET35\Debug\</IntermediateOutputPath>
+ <OutputPath>bin\Debug</OutputPath>
+ <IntermediateOutputPath>obj\Debug\</IntermediateOutputPath>
<DocumentationFile>$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
<NoWarn>1591, 1570, 1571, 1572, 1573, 1574</NoWarn>
<DefineConstants>DEBUG;TRACE;LITE;$(EnvironmentFlavor);$(EnvironmentTemplate)</DefineConstants>
@@ -35,8 +35,8 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
- <OutputPath>bin\NET35\Release</OutputPath>
- <IntermediateOutputPath>obj\NET35\Release\</IntermediateOutputPath>
+ <OutputPath>bin\Release</OutputPath>
+ <IntermediateOutputPath>obj\Release\</IntermediateOutputPath>
<DocumentationFile>$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
<NoWarn>1591, 1570, 1571, 1572, 1573, 1574</NoWarn>
<DefineConstants>TRACE;LITE;$(EnvironmentFlavor);$(EnvironmentTemplate)</DefineConstants>
@@ -82,7 +82,7 @@
<Private>False</Private>
</ProjectReference>
</ItemGroup>
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
diff --git a/csharp/src/ProtocolBuffers.Test/AbstractMessageTest.cs b/csharp/src/ProtocolBuffers.Test/AbstractMessageTest.cs
index 54f400c..51606a3 100644
--- a/csharp/src/ProtocolBuffers.Test/AbstractMessageTest.cs
+++ b/csharp/src/ProtocolBuffers.Test/AbstractMessageTest.cs
@@ -38,15 +38,14 @@
using System.Collections.Generic;
using System.IO;
using Google.ProtocolBuffers.Descriptors;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
using Google.ProtocolBuffers.TestProtos;
+using Xunit;
namespace Google.ProtocolBuffers
{
- [TestClass]
public class AbstractMessageTest
{
- [TestMethod]
+ [Fact]
public void Clear()
{
AbstractMessageWrapper message =
@@ -54,7 +53,7 @@
TestUtil.AssertClear((TestAllTypes) message.WrappedMessage);
}
- [TestMethod]
+ [Fact]
public void Copy()
{
AbstractMessageWrapper message =
@@ -62,31 +61,31 @@
TestUtil.AssertAllFieldsSet((TestAllTypes) message.WrappedMessage);
}
- [TestMethod]
+ [Fact]
public void CreateAndBuild()
{
TestAllTypes.CreateBuilder()
.Build();
}
- [TestMethod]
+ [Fact]
public void SerializedSize()
{
TestAllTypes message = TestUtil.GetAllSet();
IMessage abstractMessage = new AbstractMessageWrapper(TestUtil.GetAllSet());
- Assert.AreEqual(message.SerializedSize, abstractMessage.SerializedSize);
+ Assert.Equal(message.SerializedSize, abstractMessage.SerializedSize);
}
- [TestMethod]
+ [Fact]
public void Serialization()
{
IMessage abstractMessage = new AbstractMessageWrapper(TestUtil.GetAllSet());
TestUtil.AssertAllFieldsSet(TestAllTypes.ParseFrom(abstractMessage.ToByteString()));
- Assert.AreEqual(TestUtil.GetAllSet().ToByteString(), abstractMessage.ToByteString());
+ Assert.Equal(TestUtil.GetAllSet().ToByteString(), abstractMessage.ToByteString());
}
- [TestMethod]
+ [Fact]
public void Parsing()
{
IBuilder builder = new AbstractMessageWrapper.Builder(TestAllTypes.CreateBuilder());
@@ -95,15 +94,15 @@
TestUtil.AssertAllFieldsSet((TestAllTypes) message.WrappedMessage);
}
- [TestMethod]
+ [Fact]
public void PackedSerialization()
{
IMessage abstractMessage = new AbstractMessageWrapper(TestUtil.GetPackedSet());
TestUtil.AssertPackedFieldsSet(TestPackedTypes.ParseFrom(abstractMessage.ToByteString()));
- Assert.AreEqual(TestUtil.GetPackedSet().ToByteString(), abstractMessage.ToByteString());
+ Assert.Equal(TestUtil.GetPackedSet().ToByteString(), abstractMessage.ToByteString());
}
- [TestMethod]
+ [Fact]
public void PackedParsing()
{
AbstractMessageWrapper.Builder builder = new AbstractMessageWrapper.Builder(TestPackedTypes.CreateBuilder());
@@ -111,7 +110,7 @@
TestUtil.AssertPackedFieldsSet((TestPackedTypes)message.WrappedMessage);
}
- [TestMethod]
+ [Fact]
public void UnpackedParsingOfPackedInput()
{
byte[] bytes = TestUtil.GetPackedSet().ToByteArray();
@@ -119,7 +118,7 @@
TestUtil.AssertUnpackedFieldsSet(message);
}
- [TestMethod]
+ [Fact]
public void PackedParsingOfUnpackedInput()
{
byte[] bytes = TestUnpackedTypes.ParseFrom(TestUtil.GetPackedSet().ToByteArray()).ToByteArray();
@@ -127,7 +126,7 @@
TestUtil.AssertPackedFieldsSet(message);
}
- [TestMethod]
+ [Fact]
public void UnpackedParsingOfPackedInputExtensions()
{
byte[] bytes = TestUtil.GetPackedSet().ToByteArray();
@@ -138,7 +137,7 @@
TestUtil.AssertUnpackedExtensionsSet(message);
}
- [TestMethod]
+ [Fact]
public void PackedParsingOfUnpackedInputExtensions()
{
byte[] bytes = TestUnpackedTypes.ParseFrom(TestUtil.GetPackedSet().ToByteArray()).ToByteArray();
@@ -148,13 +147,13 @@
TestUtil.AssertPackedExtensionsSet(message);
}
- [TestMethod]
+ [Fact]
public void OptimizedForSize()
{
// We're mostly only Checking that this class was compiled successfully.
TestOptimizedForSize message = TestOptimizedForSize.CreateBuilder().SetI(1).Build();
message = TestOptimizedForSize.ParseFrom(message.ToByteString());
- Assert.AreEqual(2, message.SerializedSize);
+ Assert.Equal(2, message.SerializedSize);
}
// -----------------------------------------------------------------
@@ -165,40 +164,40 @@
private static readonly TestRequired TestRequiredInitialized =
TestRequired.CreateBuilder().SetA(1).SetB(2).SetC(3).Build();
- [TestMethod]
+ [Fact]
public void IsInitialized()
{
TestRequired.Builder builder = TestRequired.CreateBuilder();
AbstractMessageWrapper.Builder abstractBuilder = new AbstractMessageWrapper.Builder(builder);
- Assert.IsFalse(abstractBuilder.IsInitialized);
+ Assert.False(abstractBuilder.IsInitialized);
builder.A = 1;
- Assert.IsFalse(abstractBuilder.IsInitialized);
+ Assert.False(abstractBuilder.IsInitialized);
builder.B = 1;
- Assert.IsFalse(abstractBuilder.IsInitialized);
+ Assert.False(abstractBuilder.IsInitialized);
builder.C = 1;
- Assert.IsTrue(abstractBuilder.IsInitialized);
+ Assert.True(abstractBuilder.IsInitialized);
}
- [TestMethod]
+ [Fact]
public void ForeignIsInitialized()
{
TestRequiredForeign.Builder builder = TestRequiredForeign.CreateBuilder();
AbstractMessageWrapper.Builder abstractBuilder = new AbstractMessageWrapper.Builder(builder);
- Assert.IsTrue(abstractBuilder.IsInitialized);
+ Assert.True(abstractBuilder.IsInitialized);
builder.SetOptionalMessage(TestRequiredUninitialized);
- Assert.IsFalse(abstractBuilder.IsInitialized);
+ Assert.False(abstractBuilder.IsInitialized);
builder.SetOptionalMessage(TestRequiredInitialized);
- Assert.IsTrue(abstractBuilder.IsInitialized);
+ Assert.True(abstractBuilder.IsInitialized);
builder.AddRepeatedMessage(TestRequiredUninitialized);
- Assert.IsFalse(abstractBuilder.IsInitialized);
+ Assert.False(abstractBuilder.IsInitialized);
builder.SetRepeatedMessage(0, TestRequiredInitialized);
- Assert.IsTrue(abstractBuilder.IsInitialized);
+ Assert.True(abstractBuilder.IsInitialized);
}
// -----------------------------------------------------------------
@@ -227,7 +226,7 @@
"repeated_string: \"qux\"\n" +
"repeated_string: \"bar\"\n";
- [TestMethod]
+ [Fact]
public void MergeFrom()
{
AbstractMessageWrapper result = (AbstractMessageWrapper)
@@ -235,13 +234,13 @@
.MergeFrom(MergeSource)
.Build();
- Assert.AreEqual(MergeResultText, result.ToString());
+ Assert.Equal(MergeResultText, result.ToString());
}
// -----------------------------------------------------------------
// Tests for equals and hashCode
- [TestMethod]
+ [Fact]
public void EqualsAndHashCode()
{
TestAllTypes a = TestUtil.GetAllSet();
@@ -297,7 +296,7 @@
private static void CheckEqualsIsConsistent(IMessage message)
{
// Object should be equal to itself.
- Assert.AreEqual(message, message);
+ Assert.Equal(message, message);
// Object should be equal to a dynamic copy of itself.
DynamicMessage dynamic = DynamicMessage.CreateBuilder(message).Build();
@@ -309,9 +308,11 @@
/// </summary>
private static void CheckEqualsIsConsistent(IMessage message1, IMessage message2)
{
- Assert.AreEqual(message1, message2);
- Assert.AreEqual(message2, message1);
- Assert.AreEqual(message2.GetHashCode(), message1.GetHashCode());
+ // Not using Assert.AreEqual as that checks for type equality, which isn't
+ // what we want bearing in mind the dynamic message checks.
+ Assert.True(message1.Equals(message2));
+ Assert.True(message2.Equals(message1));
+ Assert.Equal(message2.GetHashCode(), message1.GetHashCode());
}
/// <summary>
@@ -325,10 +326,10 @@
private static void CheckNotEqual(IMessage m1, IMessage m2)
{
String equalsError = string.Format("{0} should not be equal to {1}", m1, m2);
- Assert.IsFalse(m1.Equals(m2), equalsError);
- Assert.IsFalse(m2.Equals(m1), equalsError);
+ Assert.False(m1.Equals(m2), equalsError);
+ Assert.False(m2.Equals(m1), equalsError);
- Assert.IsFalse(m1.GetHashCode() == m2.GetHashCode(),
+ Assert.False(m1.GetHashCode() == m2.GetHashCode(),
string.Format("{0} should have a different hash code from {1}", m1, m2));
}
diff --git a/csharp/src/ProtocolBuffers.Test/ByteStringTest.cs b/csharp/src/ProtocolBuffers.Test/ByteStringTest.cs
index 003307a..92c4ef0 100644
--- a/csharp/src/ProtocolBuffers.Test/ByteStringTest.cs
+++ b/csharp/src/ProtocolBuffers.Test/ByteStringTest.cs
@@ -36,113 +36,112 @@
using System;
using System.Text;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Xunit;
namespace Google.ProtocolBuffers
{
- [TestClass]
public class ByteStringTest
{
- [TestMethod]
+ [Fact]
public void EmptyByteStringHasZeroSize()
{
- Assert.AreEqual(0, ByteString.Empty.Length);
+ Assert.Equal(0, ByteString.Empty.Length);
}
- [TestMethod]
+ [Fact]
public void CopyFromStringWithExplicitEncoding()
{
ByteString bs = ByteString.CopyFrom("AB", Encoding.Unicode);
- Assert.AreEqual(4, bs.Length);
- Assert.AreEqual(65, bs[0]);
- Assert.AreEqual(0, bs[1]);
- Assert.AreEqual(66, bs[2]);
- Assert.AreEqual(0, bs[3]);
+ Assert.Equal(4, bs.Length);
+ Assert.Equal(65, bs[0]);
+ Assert.Equal(0, bs[1]);
+ Assert.Equal(66, bs[2]);
+ Assert.Equal(0, bs[3]);
}
- [TestMethod]
+ [Fact]
public void IsEmptyWhenEmpty()
{
- Assert.IsTrue(ByteString.CopyFromUtf8("").IsEmpty);
+ Assert.True(ByteString.CopyFromUtf8("").IsEmpty);
}
- [TestMethod]
+ [Fact]
public void IsEmptyWhenNotEmpty()
{
- Assert.IsFalse(ByteString.CopyFromUtf8("X").IsEmpty);
+ Assert.False(ByteString.CopyFromUtf8("X").IsEmpty);
}
- [TestMethod]
+ [Fact]
public void CopyFromByteArrayCopiesContents()
{
byte[] data = new byte[1];
data[0] = 10;
ByteString bs = ByteString.CopyFrom(data);
- Assert.AreEqual(10, bs[0]);
+ Assert.Equal(10, bs[0]);
data[0] = 5;
- Assert.AreEqual(10, bs[0]);
+ Assert.Equal(10, bs[0]);
}
- [TestMethod]
+ [Fact]
public void ToByteArrayCopiesContents()
{
ByteString bs = ByteString.CopyFromUtf8("Hello");
byte[] data = bs.ToByteArray();
- Assert.AreEqual((byte)'H', data[0]);
- Assert.AreEqual((byte)'H', bs[0]);
+ Assert.Equal((byte)'H', data[0]);
+ Assert.Equal((byte)'H', bs[0]);
data[0] = 0;
- Assert.AreEqual(0, data[0]);
- Assert.AreEqual((byte)'H', bs[0]);
+ Assert.Equal(0, data[0]);
+ Assert.Equal((byte)'H', bs[0]);
}
- [TestMethod]
+ [Fact]
public void CopyFromUtf8UsesUtf8()
{
ByteString bs = ByteString.CopyFromUtf8("\u20ac");
- Assert.AreEqual(3, bs.Length);
- Assert.AreEqual(0xe2, bs[0]);
- Assert.AreEqual(0x82, bs[1]);
- Assert.AreEqual(0xac, bs[2]);
+ Assert.Equal(3, bs.Length);
+ Assert.Equal(0xe2, bs[0]);
+ Assert.Equal(0x82, bs[1]);
+ Assert.Equal(0xac, bs[2]);
}
- [TestMethod]
+ [Fact]
public void CopyFromPortion()
{
byte[] data = new byte[] {0, 1, 2, 3, 4, 5, 6};
ByteString bs = ByteString.CopyFrom(data, 2, 3);
- Assert.AreEqual(3, bs.Length);
- Assert.AreEqual(2, bs[0]);
- Assert.AreEqual(3, bs[1]);
+ Assert.Equal(3, bs.Length);
+ Assert.Equal(2, bs[0]);
+ Assert.Equal(3, bs[1]);
}
- [TestMethod]
+ [Fact]
public void ToStringUtf8()
{
ByteString bs = ByteString.CopyFromUtf8("\u20ac");
- Assert.AreEqual("\u20ac", bs.ToStringUtf8());
+ Assert.Equal("\u20ac", bs.ToStringUtf8());
}
- [TestMethod]
+ [Fact]
public void ToStringWithExplicitEncoding()
{
ByteString bs = ByteString.CopyFrom("\u20ac", Encoding.Unicode);
- Assert.AreEqual("\u20ac", bs.ToString(Encoding.Unicode));
+ Assert.Equal("\u20ac", bs.ToString(Encoding.Unicode));
}
- [TestMethod]
+ [Fact]
public void FromBase64_WithText()
{
byte[] data = new byte[] {0, 1, 2, 3, 4, 5, 6};
string base64 = Convert.ToBase64String(data);
ByteString bs = ByteString.FromBase64(base64);
- TestUtil.AssertBytesEqual(data, bs.ToByteArray());
+ Assert.Equal(data, bs.ToByteArray());
}
- [TestMethod]
+ [Fact]
public void FromBase64_Empty()
{
// Optimization which also fixes issue 61.
- Assert.AreSame(ByteString.Empty, ByteString.FromBase64(""));
+ Assert.Same(ByteString.Empty, ByteString.FromBase64(""));
}
}
}
\ No newline at end of file
diff --git a/csharp/src/ProtocolBuffers.Test/CodedInputStreamTest.cs b/csharp/src/ProtocolBuffers.Test/CodedInputStreamTest.cs
index b09d334..20bfef9 100644
--- a/csharp/src/ProtocolBuffers.Test/CodedInputStreamTest.cs
+++ b/csharp/src/ProtocolBuffers.Test/CodedInputStreamTest.cs
@@ -39,12 +39,10 @@
using System.IO;
using Google.ProtocolBuffers.Descriptors;
using Google.ProtocolBuffers.TestProtos;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using System.Diagnostics;
+using Xunit;
namespace Google.ProtocolBuffers
{
- [TestClass]
public class CodedInputStreamTest
{
/// <summary>
@@ -68,21 +66,21 @@
private static void AssertReadVarint(byte[] data, ulong value)
{
CodedInputStream input = CodedInputStream.CreateInstance(data);
- Assert.AreEqual((uint) value, input.ReadRawVarint32());
+ Assert.Equal((uint) value, input.ReadRawVarint32());
input = CodedInputStream.CreateInstance(data);
- Assert.AreEqual(value, input.ReadRawVarint64());
- Assert.IsTrue(input.IsAtEnd);
+ Assert.Equal(value, input.ReadRawVarint64());
+ Assert.True(input.IsAtEnd);
// Try different block sizes.
for (int bufferSize = 1; bufferSize <= 16; bufferSize *= 2)
{
input = CodedInputStream.CreateInstance(new SmallBlockInputStream(data, bufferSize));
- Assert.AreEqual((uint) value, input.ReadRawVarint32());
+ Assert.Equal((uint) value, input.ReadRawVarint32());
input = CodedInputStream.CreateInstance(new SmallBlockInputStream(data, bufferSize));
- Assert.AreEqual(value, input.ReadRawVarint64());
- Assert.IsTrue(input.IsAtEnd);
+ Assert.Equal(value, input.ReadRawVarint64());
+ Assert.True(input.IsAtEnd);
}
// Try reading directly from a MemoryStream. We want to verify that it
@@ -92,8 +90,8 @@
memoryStream.Write(data, 0, data.Length);
memoryStream.WriteByte(0);
memoryStream.Position = 0;
- Assert.AreEqual((uint) value, CodedInputStream.ReadRawVarint32(memoryStream));
- Assert.AreEqual(data.Length, memoryStream.Position);
+ Assert.Equal((uint) value, CodedInputStream.ReadRawVarint32(memoryStream));
+ Assert.Equal(data.Length, memoryStream.Position);
}
/// <summary>
@@ -104,40 +102,19 @@
private static void AssertReadVarintFailure(InvalidProtocolBufferException expected, byte[] data)
{
CodedInputStream input = CodedInputStream.CreateInstance(data);
- try
- {
- input.ReadRawVarint32();
- Assert.Fail("Should have thrown an exception.");
- }
- catch (InvalidProtocolBufferException e)
- {
- Assert.AreEqual(expected.Message, e.Message);
- }
+ var exception = Assert.Throws<InvalidProtocolBufferException>(() => input.ReadRawVarint32());
+ Assert.Equal(expected.Message, exception.Message);
input = CodedInputStream.CreateInstance(data);
- try
- {
- input.ReadRawVarint64();
- Assert.Fail("Should have thrown an exception.");
- }
- catch (InvalidProtocolBufferException e)
- {
- Assert.AreEqual(expected.Message, e.Message);
- }
+ exception = Assert.Throws<InvalidProtocolBufferException>(() => input.ReadRawVarint64());
+ Assert.Equal(expected.Message, exception.Message);
// Make sure we get the same error when reading directly from a Stream.
- try
- {
- CodedInputStream.ReadRawVarint32(new MemoryStream(data));
- Assert.Fail("Should have thrown an exception.");
- }
- catch (InvalidProtocolBufferException e)
- {
- Assert.AreEqual(expected.Message, e.Message);
- }
+ exception = Assert.Throws<InvalidProtocolBufferException>(() => CodedInputStream.ReadRawVarint32(new MemoryStream(data)));
+ Assert.Equal(expected.Message, exception.Message);
}
- [TestMethod]
+ [Fact]
public void ReadVarint()
{
AssertReadVarint(Bytes(0x00), 0);
@@ -182,16 +159,16 @@
private static void AssertReadLittleEndian32(byte[] data, uint value)
{
CodedInputStream input = CodedInputStream.CreateInstance(data);
- Assert.AreEqual(value, input.ReadRawLittleEndian32());
- Assert.IsTrue(input.IsAtEnd);
+ Assert.Equal(value, input.ReadRawLittleEndian32());
+ Assert.True(input.IsAtEnd);
// Try different block sizes.
for (int blockSize = 1; blockSize <= 16; blockSize *= 2)
{
input = CodedInputStream.CreateInstance(
new SmallBlockInputStream(data, blockSize));
- Assert.AreEqual(value, input.ReadRawLittleEndian32());
- Assert.IsTrue(input.IsAtEnd);
+ Assert.Equal(value, input.ReadRawLittleEndian32());
+ Assert.True(input.IsAtEnd);
}
}
@@ -202,20 +179,20 @@
private static void AssertReadLittleEndian64(byte[] data, ulong value)
{
CodedInputStream input = CodedInputStream.CreateInstance(data);
- Assert.AreEqual(value, input.ReadRawLittleEndian64());
- Assert.IsTrue(input.IsAtEnd);
+ Assert.Equal(value, input.ReadRawLittleEndian64());
+ Assert.True(input.IsAtEnd);
// Try different block sizes.
for (int blockSize = 1; blockSize <= 16; blockSize *= 2)
{
input = CodedInputStream.CreateInstance(
new SmallBlockInputStream(data, blockSize));
- Assert.AreEqual(value, input.ReadRawLittleEndian64());
- Assert.IsTrue(input.IsAtEnd);
+ Assert.Equal(value, input.ReadRawLittleEndian64());
+ Assert.True(input.IsAtEnd);
}
}
- [TestMethod]
+ [Fact]
public void ReadLittleEndian()
{
AssertReadLittleEndian32(Bytes(0x78, 0x56, 0x34, 0x12), 0x12345678);
@@ -227,41 +204,41 @@
Bytes(0x78, 0x56, 0x34, 0x12, 0xf0, 0xde, 0xbc, 0x9a), 0x9abcdef012345678UL);
}
- [TestMethod]
+ [Fact]
public void DecodeZigZag32()
{
- Assert.AreEqual(0, CodedInputStream.DecodeZigZag32(0));
- Assert.AreEqual(-1, CodedInputStream.DecodeZigZag32(1));
- Assert.AreEqual(1, CodedInputStream.DecodeZigZag32(2));
- Assert.AreEqual(-2, CodedInputStream.DecodeZigZag32(3));
- Assert.AreEqual(0x3FFFFFFF, CodedInputStream.DecodeZigZag32(0x7FFFFFFE));
- Assert.AreEqual(unchecked((int) 0xC0000000), CodedInputStream.DecodeZigZag32(0x7FFFFFFF));
- Assert.AreEqual(0x7FFFFFFF, CodedInputStream.DecodeZigZag32(0xFFFFFFFE));
- Assert.AreEqual(unchecked((int) 0x80000000), CodedInputStream.DecodeZigZag32(0xFFFFFFFF));
+ Assert.Equal(0, CodedInputStream.DecodeZigZag32(0));
+ Assert.Equal(-1, CodedInputStream.DecodeZigZag32(1));
+ Assert.Equal(1, CodedInputStream.DecodeZigZag32(2));
+ Assert.Equal(-2, CodedInputStream.DecodeZigZag32(3));
+ Assert.Equal(0x3FFFFFFF, CodedInputStream.DecodeZigZag32(0x7FFFFFFE));
+ Assert.Equal(unchecked((int) 0xC0000000), CodedInputStream.DecodeZigZag32(0x7FFFFFFF));
+ Assert.Equal(0x7FFFFFFF, CodedInputStream.DecodeZigZag32(0xFFFFFFFE));
+ Assert.Equal(unchecked((int) 0x80000000), CodedInputStream.DecodeZigZag32(0xFFFFFFFF));
}
- [TestMethod]
+ [Fact]
public void DecodeZigZag64()
{
- Assert.AreEqual(0, CodedInputStream.DecodeZigZag64(0));
- Assert.AreEqual(-1, CodedInputStream.DecodeZigZag64(1));
- Assert.AreEqual(1, CodedInputStream.DecodeZigZag64(2));
- Assert.AreEqual(-2, CodedInputStream.DecodeZigZag64(3));
- Assert.AreEqual(0x000000003FFFFFFFL, CodedInputStream.DecodeZigZag64(0x000000007FFFFFFEL));
- Assert.AreEqual(unchecked((long) 0xFFFFFFFFC0000000L), CodedInputStream.DecodeZigZag64(0x000000007FFFFFFFL));
- Assert.AreEqual(0x000000007FFFFFFFL, CodedInputStream.DecodeZigZag64(0x00000000FFFFFFFEL));
- Assert.AreEqual(unchecked((long) 0xFFFFFFFF80000000L), CodedInputStream.DecodeZigZag64(0x00000000FFFFFFFFL));
- Assert.AreEqual(0x7FFFFFFFFFFFFFFFL, CodedInputStream.DecodeZigZag64(0xFFFFFFFFFFFFFFFEL));
- Assert.AreEqual(unchecked((long) 0x8000000000000000L), CodedInputStream.DecodeZigZag64(0xFFFFFFFFFFFFFFFFL));
+ Assert.Equal(0, CodedInputStream.DecodeZigZag64(0));
+ Assert.Equal(-1, CodedInputStream.DecodeZigZag64(1));
+ Assert.Equal(1, CodedInputStream.DecodeZigZag64(2));
+ Assert.Equal(-2, CodedInputStream.DecodeZigZag64(3));
+ Assert.Equal(0x000000003FFFFFFFL, CodedInputStream.DecodeZigZag64(0x000000007FFFFFFEL));
+ Assert.Equal(unchecked((long) 0xFFFFFFFFC0000000L), CodedInputStream.DecodeZigZag64(0x000000007FFFFFFFL));
+ Assert.Equal(0x000000007FFFFFFFL, CodedInputStream.DecodeZigZag64(0x00000000FFFFFFFEL));
+ Assert.Equal(unchecked((long) 0xFFFFFFFF80000000L), CodedInputStream.DecodeZigZag64(0x00000000FFFFFFFFL));
+ Assert.Equal(0x7FFFFFFFFFFFFFFFL, CodedInputStream.DecodeZigZag64(0xFFFFFFFFFFFFFFFEL));
+ Assert.Equal(unchecked((long) 0x8000000000000000L), CodedInputStream.DecodeZigZag64(0xFFFFFFFFFFFFFFFFL));
}
- [TestMethod]
+ [Fact]
public void ReadWholeMessage()
{
TestAllTypes message = TestUtil.GetAllSet();
byte[] rawBytes = message.ToByteArray();
- Assert.AreEqual(rawBytes.Length, message.SerializedSize);
+ Assert.Equal(rawBytes.Length, message.SerializedSize);
TestAllTypes message2 = TestAllTypes.ParseFrom(rawBytes);
TestUtil.AssertAllFieldsSet(message2);
@@ -273,7 +250,7 @@
}
}
- [TestMethod]
+ [Fact]
public void SkipWholeMessage()
{
TestAllTypes message = TestUtil.GetAllSet();
@@ -290,8 +267,8 @@
while (input1.ReadTag(out tag, out name))
{
uint tag2;
- Assert.IsTrue(input2.ReadTag(out tag2, out name));
- Assert.AreEqual(tag, tag2);
+ Assert.True(input2.ReadTag(out tag2, out name));
+ Assert.Equal(tag, tag2);
unknownFields.MergeFieldFrom(tag, input1);
input2.SkipField();
@@ -302,7 +279,7 @@
/// Test that a bug in SkipRawBytes has been fixed: if the skip
/// skips exactly up to a limit, this should bnot break things
/// </summary>
- [TestMethod]
+ [Fact]
public void SkipRawBytesBug()
{
byte[] rawBytes = new byte[] {1, 2};
@@ -311,7 +288,7 @@
int limit = input.PushLimit(1);
input.SkipRawBytes(1);
input.PopLimit(limit);
- Assert.AreEqual(2, input.ReadRawByte());
+ Assert.Equal(2, input.ReadRawByte());
}
public void ReadHugeBlob()
@@ -334,7 +311,7 @@
// reading.
TestAllTypes message2 = TestAllTypes.ParseFrom(message.ToByteString().CreateCodedInput());
- Assert.AreEqual(message.OptionalBytes, message2.OptionalBytes);
+ Assert.Equal(message.OptionalBytes, message2.OptionalBytes);
// Make sure all the other fields were parsed correctly.
TestAllTypes message3 = TestAllTypes.CreateBuilder(message2)
@@ -343,7 +320,7 @@
TestUtil.AssertAllFieldsSet(message3);
}
- [TestMethod]
+ [Fact]
public void ReadMaliciouslyLargeBlob()
{
MemoryStream ms = new MemoryStream();
@@ -359,19 +336,12 @@
CodedInputStream input = CodedInputStream.CreateInstance(ms);
uint testtag;
string ignore;
- Assert.IsTrue(input.ReadTag(out testtag, out ignore));
- Assert.AreEqual(tag, testtag);
+ Assert.True(input.ReadTag(out testtag, out ignore));
+ Assert.Equal(tag, testtag);
- try
- {
- ByteString bytes = null;
- input.ReadBytes(ref bytes);
- Assert.Fail("Should have thrown an exception!");
- }
- catch (InvalidProtocolBufferException)
- {
- // success.
- }
+ ByteString bytes = null;
+ // TODO(jonskeet): Should this be ArgumentNullException instead?
+ Assert.Throws<InvalidProtocolBufferException>(() => input.ReadBytes(ref bytes));
}
private static TestRecursiveMessage MakeRecursiveMessage(int depth)
@@ -391,17 +361,17 @@
{
if (depth == 0)
{
- Assert.IsFalse(message.HasA);
- Assert.AreEqual(5, message.I);
+ Assert.False(message.HasA);
+ Assert.Equal(5, message.I);
}
else
{
- Assert.IsTrue(message.HasA);
+ Assert.True(message.HasA);
AssertMessageDepth(message.A, depth - 1);
}
}
- [TestMethod]
+ [Fact]
public void MaliciousRecursion()
{
ByteString data64 = MakeRecursiveMessage(64).ToByteString();
@@ -409,30 +379,14 @@
AssertMessageDepth(TestRecursiveMessage.ParseFrom(data64), 64);
- try
- {
- TestRecursiveMessage.ParseFrom(data65);
- Assert.Fail("Should have thrown an exception!");
- }
- catch (InvalidProtocolBufferException)
- {
- // success.
- }
+ Assert.Throws<InvalidProtocolBufferException>(() => TestRecursiveMessage.ParseFrom(data65));
CodedInputStream input = data64.CreateCodedInput();
input.SetRecursionLimit(8);
- try
- {
- TestRecursiveMessage.ParseFrom(input);
- Assert.Fail("Should have thrown an exception!");
- }
- catch (InvalidProtocolBufferException)
- {
- // success.
- }
+ Assert.Throws<InvalidProtocolBufferException>(() => TestRecursiveMessage.ParseFrom(input));
}
- [TestMethod]
+ [Fact]
public void SizeLimit()
{
// Have to use a Stream rather than ByteString.CreateCodedInput as SizeLimit doesn't
@@ -441,18 +395,10 @@
CodedInputStream input = CodedInputStream.CreateInstance(ms);
input.SetSizeLimit(16);
- try
- {
- TestAllTypes.ParseFrom(input);
- Assert.Fail("Should have thrown an exception!");
- }
- catch (InvalidProtocolBufferException)
- {
- // success.
- }
+ Assert.Throws<InvalidProtocolBufferException>(() => TestAllTypes.ParseFrom(input));
}
- [TestMethod]
+ [Fact]
public void ResetSizeCounter()
{
CodedInputStream input = CodedInputStream.CreateInstance(
@@ -460,28 +406,12 @@
input.SetSizeLimit(16);
input.ReadRawBytes(16);
- try
- {
- input.ReadRawByte();
- Assert.Fail("Should have thrown an exception!");
- }
- catch (InvalidProtocolBufferException)
- {
- // Success.
- }
+ Assert.Throws<InvalidProtocolBufferException>(() => input.ReadRawByte());
input.ResetSizeCounter();
input.ReadRawByte(); // No exception thrown.
- try
- {
- input.ReadRawBytes(16); // Hits limit again.
- Assert.Fail("Should have thrown an exception!");
- }
- catch (InvalidProtocolBufferException)
- {
- // Success.
- }
+ Assert.Throws<InvalidProtocolBufferException>(() => input.ReadRawBytes(16));
}
/// <summary>
@@ -489,7 +419,7 @@
/// is thrown. Instead, the invalid bytes are replaced with the Unicode
/// "replacement character" U+FFFD.
/// </summary>
- [TestMethod]
+ [Fact]
public void ReadInvalidUtf8()
{
MemoryStream ms = new MemoryStream();
@@ -507,11 +437,11 @@
uint testtag;
string ignored;
- Assert.IsTrue(input.ReadTag(out testtag, out ignored));
- Assert.AreEqual(tag, testtag);
+ Assert.True(input.ReadTag(out testtag, out ignored));
+ Assert.Equal(tag, testtag);
string text = null;
input.ReadString(ref text);
- Assert.AreEqual('\ufffd', text[0]);
+ Assert.Equal('\ufffd', text[0]);
}
/// <summary>
@@ -537,7 +467,7 @@
enum TestNegEnum { None = 0, Value = -2 }
- [TestMethod]
+ [Fact]
public void TestNegativeEnum()
{
byte[] bytes = new byte[10] { 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01 };
@@ -545,12 +475,12 @@
object unk;
TestNegEnum val = TestNegEnum.None;
- Assert.IsTrue(input.ReadEnum(ref val, out unk));
- Assert.IsTrue(input.IsAtEnd);
- Assert.AreEqual(TestNegEnum.Value, val);
+ Assert.True(input.ReadEnum(ref val, out unk));
+ Assert.True(input.IsAtEnd);
+ Assert.Equal(TestNegEnum.Value, val);
}
- [TestMethod]
+ [Fact]
public void TestNegativeEnumPackedArray()
{
int arraySize = 1 + (10 * 5);
@@ -559,26 +489,26 @@
CodedOutputStream output = CodedOutputStream.CreateInstance(bytes);
output.WritePackedInt32Array(8, "", arraySize, new int[] { 0, -1, -2, -3, -4, -5 });
- Assert.AreEqual(0, output.SpaceLeft);
+ Assert.Equal(0, output.SpaceLeft);
CodedInputStream input = CodedInputStream.CreateInstance(bytes);
uint tag;
string name;
- Assert.IsTrue(input.ReadTag(out tag, out name));
+ Assert.True(input.ReadTag(out tag, out name));
List<TestNegEnum> values = new List<TestNegEnum>();
ICollection<object> unk;
input.ReadEnumArray(tag, name, values, out unk);
- Assert.AreEqual(2, values.Count);
- Assert.AreEqual(TestNegEnum.None, values[0]);
- Assert.AreEqual(TestNegEnum.Value, values[1]);
+ Assert.Equal(2, values.Count);
+ Assert.Equal(TestNegEnum.None, values[0]);
+ Assert.Equal(TestNegEnum.Value, values[1]);
- Assert.IsNotNull(unk);
- Assert.AreEqual(4, unk.Count);
+ Assert.NotNull(unk);
+ Assert.Equal(4, unk.Count);
}
- [TestMethod]
+ [Fact]
public void TestNegativeEnumArray()
{
int arraySize = 1 + 1 + (11 * 5);
@@ -587,27 +517,27 @@
CodedOutputStream output = CodedOutputStream.CreateInstance(bytes);
output.WriteInt32Array(8, "", new int[] { 0, -1, -2, -3, -4, -5 });
- Assert.AreEqual(0, output.SpaceLeft);
+ Assert.Equal(0, output.SpaceLeft);
CodedInputStream input = CodedInputStream.CreateInstance(bytes);
uint tag;
string name;
- Assert.IsTrue(input.ReadTag(out tag, out name));
+ Assert.True(input.ReadTag(out tag, out name));
List<TestNegEnum> values = new List<TestNegEnum>();
ICollection<object> unk;
input.ReadEnumArray(tag, name, values, out unk);
- Assert.AreEqual(2, values.Count);
- Assert.AreEqual(TestNegEnum.None, values[0]);
- Assert.AreEqual(TestNegEnum.Value, values[1]);
+ Assert.Equal(2, values.Count);
+ Assert.Equal(TestNegEnum.None, values[0]);
+ Assert.Equal(TestNegEnum.Value, values[1]);
- Assert.IsNotNull(unk);
- Assert.AreEqual(4, unk.Count);
+ Assert.NotNull(unk);
+ Assert.Equal(4, unk.Count);
}
//Issue 71: CodedInputStream.ReadBytes go to slow path unnecessarily
- [TestMethod]
+ [Fact]
public void TestSlowPathAvoidance()
{
using (var ms = new MemoryStream())
@@ -624,15 +554,15 @@
string ignore;
ByteString value;
- Assert.IsTrue(input.ReadTag(out tag, out ignore));
- Assert.AreEqual(1, WireFormat.GetTagFieldNumber(tag));
+ Assert.True(input.ReadTag(out tag, out ignore));
+ Assert.Equal(1, WireFormat.GetTagFieldNumber(tag));
value = ByteString.Empty;
- Assert.IsTrue(input.ReadBytes(ref value) && value.Length == 100);
+ Assert.True(input.ReadBytes(ref value) && value.Length == 100);
- Assert.IsTrue(input.ReadTag(out tag, out ignore));
- Assert.AreEqual(2, WireFormat.GetTagFieldNumber(tag));
+ Assert.True(input.ReadTag(out tag, out ignore));
+ Assert.Equal(2, WireFormat.GetTagFieldNumber(tag));
value = ByteString.Empty;
- Assert.IsTrue(input.ReadBytes(ref value) && value.Length == 100);
+ Assert.True(input.ReadBytes(ref value) && value.Length == 100);
}
}
}
diff --git a/csharp/src/ProtocolBuffers.Test/CodedOutputStreamTest.cs b/csharp/src/ProtocolBuffers.Test/CodedOutputStreamTest.cs
index 8e4e909..d9f53d7 100644
--- a/csharp/src/ProtocolBuffers.Test/CodedOutputStreamTest.cs
+++ b/csharp/src/ProtocolBuffers.Test/CodedOutputStreamTest.cs
@@ -38,11 +38,10 @@
using System.Collections.Generic;
using System.IO;
using Google.ProtocolBuffers.TestProtos;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Xunit;
namespace Google.ProtocolBuffers
{
- [TestClass]
public class CodedOutputStreamTest
{
/// <summary>
@@ -58,9 +57,9 @@
CodedOutputStream output = CodedOutputStream.CreateInstance(rawOutput);
output.WriteRawVarint32((uint) value);
output.Flush();
- TestUtil.AssertBytesEqual(data, rawOutput.ToArray());
+ Assert.Equal(data, rawOutput.ToArray());
// Also try computing size.
- Assert.AreEqual(data.Length, CodedOutputStream.ComputeRawVarint32Size((uint) value));
+ Assert.Equal(data.Length, CodedOutputStream.ComputeRawVarint32Size((uint) value));
}
{
@@ -68,10 +67,10 @@
CodedOutputStream output = CodedOutputStream.CreateInstance(rawOutput);
output.WriteRawVarint64(value);
output.Flush();
- TestUtil.AssertBytesEqual(data, rawOutput.ToArray());
+ Assert.Equal(data, rawOutput.ToArray());
// Also try computing size.
- Assert.AreEqual(data.Length, CodedOutputStream.ComputeRawVarint64Size(value));
+ Assert.Equal(data.Length, CodedOutputStream.ComputeRawVarint64Size(value));
}
// Try different buffer sizes.
@@ -85,7 +84,7 @@
CodedOutputStream.CreateInstance(rawOutput, bufferSize);
output.WriteRawVarint32((uint) value);
output.Flush();
- TestUtil.AssertBytesEqual(data, rawOutput.ToArray());
+ Assert.Equal(data, rawOutput.ToArray());
}
{
@@ -93,7 +92,7 @@
CodedOutputStream output = CodedOutputStream.CreateInstance(rawOutput, bufferSize);
output.WriteRawVarint64(value);
output.Flush();
- TestUtil.AssertBytesEqual(data, rawOutput.ToArray());
+ Assert.Equal(data, rawOutput.ToArray());
}
}
}
@@ -101,7 +100,7 @@
/// <summary>
/// Tests WriteRawVarint32() and WriteRawVarint64()
/// </summary>
- [TestMethod]
+ [Fact]
public void WriteVarint()
{
AssertWriteVarint(new byte[] {0x00}, 0);
@@ -143,7 +142,7 @@
CodedOutputStream output = CodedOutputStream.CreateInstance(rawOutput);
output.WriteRawLittleEndian32(value);
output.Flush();
- TestUtil.AssertBytesEqual(data, rawOutput.ToArray());
+ Assert.Equal(data, rawOutput.ToArray());
// Try different buffer sizes.
for (int bufferSize = 1; bufferSize <= 16; bufferSize *= 2)
@@ -152,7 +151,7 @@
output = CodedOutputStream.CreateInstance(rawOutput, bufferSize);
output.WriteRawLittleEndian32(value);
output.Flush();
- TestUtil.AssertBytesEqual(data, rawOutput.ToArray());
+ Assert.Equal(data, rawOutput.ToArray());
}
}
@@ -166,7 +165,7 @@
CodedOutputStream output = CodedOutputStream.CreateInstance(rawOutput);
output.WriteRawLittleEndian64(value);
output.Flush();
- TestUtil.AssertBytesEqual(data, rawOutput.ToArray());
+ Assert.Equal(data, rawOutput.ToArray());
// Try different block sizes.
for (int blockSize = 1; blockSize <= 16; blockSize *= 2)
@@ -175,14 +174,14 @@
output = CodedOutputStream.CreateInstance(rawOutput, blockSize);
output.WriteRawLittleEndian64(value);
output.Flush();
- TestUtil.AssertBytesEqual(data, rawOutput.ToArray());
+ Assert.Equal(data, rawOutput.ToArray());
}
}
/// <summary>
/// Tests writeRawLittleEndian32() and writeRawLittleEndian64().
/// </summary>
- [TestMethod]
+ [Fact]
public void WriteLittleEndian()
{
AssertWriteLittleEndian32(new byte[] {0x78, 0x56, 0x34, 0x12}, 0x12345678);
@@ -196,7 +195,7 @@
0x9abcdef012345678UL);
}
- [TestMethod]
+ [Fact]
public void WriteWholeMessage()
{
TestAllTypes message = TestUtil.GetAllSet();
@@ -220,7 +219,7 @@
/// Tests writing a whole message with every packed field type. Ensures the
/// wire format of packed fields is compatible with C++.
/// </summary>
- [TestMethod]
+ [Fact]
public void WriteWholePackedFieldsMessage()
{
TestPackedTypes message = TestUtil.GetPackedSet();
@@ -230,97 +229,97 @@
rawBytes);
}
- [TestMethod]
+ [Fact]
public void EncodeZigZag32()
{
- Assert.AreEqual(0u, CodedOutputStream.EncodeZigZag32(0));
- Assert.AreEqual(1u, CodedOutputStream.EncodeZigZag32(-1));
- Assert.AreEqual(2u, CodedOutputStream.EncodeZigZag32(1));
- Assert.AreEqual(3u, CodedOutputStream.EncodeZigZag32(-2));
- Assert.AreEqual(0x7FFFFFFEu, CodedOutputStream.EncodeZigZag32(0x3FFFFFFF));
- Assert.AreEqual(0x7FFFFFFFu, CodedOutputStream.EncodeZigZag32(unchecked((int) 0xC0000000)));
- Assert.AreEqual(0xFFFFFFFEu, CodedOutputStream.EncodeZigZag32(0x7FFFFFFF));
- Assert.AreEqual(0xFFFFFFFFu, CodedOutputStream.EncodeZigZag32(unchecked((int) 0x80000000)));
+ Assert.Equal(0u, CodedOutputStream.EncodeZigZag32(0));
+ Assert.Equal(1u, CodedOutputStream.EncodeZigZag32(-1));
+ Assert.Equal(2u, CodedOutputStream.EncodeZigZag32(1));
+ Assert.Equal(3u, CodedOutputStream.EncodeZigZag32(-2));
+ Assert.Equal(0x7FFFFFFEu, CodedOutputStream.EncodeZigZag32(0x3FFFFFFF));
+ Assert.Equal(0x7FFFFFFFu, CodedOutputStream.EncodeZigZag32(unchecked((int) 0xC0000000)));
+ Assert.Equal(0xFFFFFFFEu, CodedOutputStream.EncodeZigZag32(0x7FFFFFFF));
+ Assert.Equal(0xFFFFFFFFu, CodedOutputStream.EncodeZigZag32(unchecked((int) 0x80000000)));
}
- [TestMethod]
+ [Fact]
public void EncodeZigZag64()
{
- Assert.AreEqual(0u, CodedOutputStream.EncodeZigZag64(0));
- Assert.AreEqual(1u, CodedOutputStream.EncodeZigZag64(-1));
- Assert.AreEqual(2u, CodedOutputStream.EncodeZigZag64(1));
- Assert.AreEqual(3u, CodedOutputStream.EncodeZigZag64(-2));
- Assert.AreEqual(0x000000007FFFFFFEuL,
+ Assert.Equal(0u, CodedOutputStream.EncodeZigZag64(0));
+ Assert.Equal(1u, CodedOutputStream.EncodeZigZag64(-1));
+ Assert.Equal(2u, CodedOutputStream.EncodeZigZag64(1));
+ Assert.Equal(3u, CodedOutputStream.EncodeZigZag64(-2));
+ Assert.Equal(0x000000007FFFFFFEuL,
CodedOutputStream.EncodeZigZag64(unchecked((long) 0x000000003FFFFFFFUL)));
- Assert.AreEqual(0x000000007FFFFFFFuL,
+ Assert.Equal(0x000000007FFFFFFFuL,
CodedOutputStream.EncodeZigZag64(unchecked((long) 0xFFFFFFFFC0000000UL)));
- Assert.AreEqual(0x00000000FFFFFFFEuL,
+ Assert.Equal(0x00000000FFFFFFFEuL,
CodedOutputStream.EncodeZigZag64(unchecked((long) 0x000000007FFFFFFFUL)));
- Assert.AreEqual(0x00000000FFFFFFFFuL,
+ Assert.Equal(0x00000000FFFFFFFFuL,
CodedOutputStream.EncodeZigZag64(unchecked((long) 0xFFFFFFFF80000000UL)));
- Assert.AreEqual(0xFFFFFFFFFFFFFFFEL,
+ Assert.Equal(0xFFFFFFFFFFFFFFFEL,
CodedOutputStream.EncodeZigZag64(unchecked((long) 0x7FFFFFFFFFFFFFFFUL)));
- Assert.AreEqual(0xFFFFFFFFFFFFFFFFL,
+ Assert.Equal(0xFFFFFFFFFFFFFFFFL,
CodedOutputStream.EncodeZigZag64(unchecked((long) 0x8000000000000000UL)));
}
- [TestMethod]
+ [Fact]
public void RoundTripZigZag32()
{
// Some easier-to-verify round-trip tests. The inputs (other than 0, 1, -1)
// were chosen semi-randomly via keyboard bashing.
- Assert.AreEqual(0, CodedInputStream.DecodeZigZag32(CodedOutputStream.EncodeZigZag32(0)));
- Assert.AreEqual(1, CodedInputStream.DecodeZigZag32(CodedOutputStream.EncodeZigZag32(1)));
- Assert.AreEqual(-1, CodedInputStream.DecodeZigZag32(CodedOutputStream.EncodeZigZag32(-1)));
- Assert.AreEqual(14927, CodedInputStream.DecodeZigZag32(CodedOutputStream.EncodeZigZag32(14927)));
- Assert.AreEqual(-3612, CodedInputStream.DecodeZigZag32(CodedOutputStream.EncodeZigZag32(-3612)));
+ Assert.Equal(0, CodedInputStream.DecodeZigZag32(CodedOutputStream.EncodeZigZag32(0)));
+ Assert.Equal(1, CodedInputStream.DecodeZigZag32(CodedOutputStream.EncodeZigZag32(1)));
+ Assert.Equal(-1, CodedInputStream.DecodeZigZag32(CodedOutputStream.EncodeZigZag32(-1)));
+ Assert.Equal(14927, CodedInputStream.DecodeZigZag32(CodedOutputStream.EncodeZigZag32(14927)));
+ Assert.Equal(-3612, CodedInputStream.DecodeZigZag32(CodedOutputStream.EncodeZigZag32(-3612)));
}
- [TestMethod]
+ [Fact]
public void RoundTripZigZag64()
{
- Assert.AreEqual(0, CodedInputStream.DecodeZigZag64(CodedOutputStream.EncodeZigZag64(0)));
- Assert.AreEqual(1, CodedInputStream.DecodeZigZag64(CodedOutputStream.EncodeZigZag64(1)));
- Assert.AreEqual(-1, CodedInputStream.DecodeZigZag64(CodedOutputStream.EncodeZigZag64(-1)));
- Assert.AreEqual(14927, CodedInputStream.DecodeZigZag64(CodedOutputStream.EncodeZigZag64(14927)));
- Assert.AreEqual(-3612, CodedInputStream.DecodeZigZag64(CodedOutputStream.EncodeZigZag64(-3612)));
+ Assert.Equal(0, CodedInputStream.DecodeZigZag64(CodedOutputStream.EncodeZigZag64(0)));
+ Assert.Equal(1, CodedInputStream.DecodeZigZag64(CodedOutputStream.EncodeZigZag64(1)));
+ Assert.Equal(-1, CodedInputStream.DecodeZigZag64(CodedOutputStream.EncodeZigZag64(-1)));
+ Assert.Equal(14927, CodedInputStream.DecodeZigZag64(CodedOutputStream.EncodeZigZag64(14927)));
+ Assert.Equal(-3612, CodedInputStream.DecodeZigZag64(CodedOutputStream.EncodeZigZag64(-3612)));
- Assert.AreEqual(856912304801416L,
+ Assert.Equal(856912304801416L,
CodedInputStream.DecodeZigZag64(CodedOutputStream.EncodeZigZag64(856912304801416L)));
- Assert.AreEqual(-75123905439571256L,
+ Assert.Equal(-75123905439571256L,
CodedInputStream.DecodeZigZag64(CodedOutputStream.EncodeZigZag64(-75123905439571256L)));
}
- [TestMethod]
+ [Fact]
public void TestNegativeEnumNoTag()
{
- Assert.AreEqual(10, CodedOutputStream.ComputeInt32SizeNoTag(-2));
- Assert.AreEqual(10, CodedOutputStream.ComputeEnumSizeNoTag(-2));
+ Assert.Equal(10, CodedOutputStream.ComputeInt32SizeNoTag(-2));
+ Assert.Equal(10, CodedOutputStream.ComputeEnumSizeNoTag(-2));
byte[] bytes = new byte[10];
CodedOutputStream output = CodedOutputStream.CreateInstance(bytes);
output.WriteEnumNoTag(-2);
- Assert.AreEqual(0, output.SpaceLeft);
- Assert.AreEqual("FE-FF-FF-FF-FF-FF-FF-FF-FF-01", BitConverter.ToString(bytes));
+ Assert.Equal(0, output.SpaceLeft);
+ Assert.Equal("FE-FF-FF-FF-FF-FF-FF-FF-FF-01", BitConverter.ToString(bytes));
}
- [TestMethod]
+ [Fact]
public void TestNegativeEnumWithTag()
{
- Assert.AreEqual(11, CodedOutputStream.ComputeInt32Size(8, -2));
- Assert.AreEqual(11, CodedOutputStream.ComputeEnumSize(8, -2));
+ Assert.Equal(11, CodedOutputStream.ComputeInt32Size(8, -2));
+ Assert.Equal(11, CodedOutputStream.ComputeEnumSize(8, -2));
byte[] bytes = new byte[11];
CodedOutputStream output = CodedOutputStream.CreateInstance(bytes);
output.WriteEnum(8, "", -2, -2);
- Assert.AreEqual(0, output.SpaceLeft);
+ Assert.Equal(0, output.SpaceLeft);
//fyi, 0x40 == 0x08 << 3 + 0, field num + wire format shift
- Assert.AreEqual("40-FE-FF-FF-FF-FF-FF-FF-FF-FF-01", BitConverter.ToString(bytes));
+ Assert.Equal("40-FE-FF-FF-FF-FF-FF-FF-FF-FF-01", BitConverter.ToString(bytes));
}
- [TestMethod]
+ [Fact]
public void TestNegativeEnumArrayPacked()
{
int arraySize = 1 + (10 * 5);
@@ -329,22 +328,22 @@
CodedOutputStream output = CodedOutputStream.CreateInstance(bytes);
output.WritePackedEnumArray(8, "", arraySize, new int[] { 0, -1, -2, -3, -4, -5 });
- Assert.AreEqual(0, output.SpaceLeft);
+ Assert.Equal(0, output.SpaceLeft);
CodedInputStream input = CodedInputStream.CreateInstance(bytes);
uint tag;
string name;
- Assert.IsTrue(input.ReadTag(out tag, out name));
+ Assert.True(input.ReadTag(out tag, out name));
List<int> values = new List<int>();
input.ReadInt32Array(tag, name, values);
- Assert.AreEqual(6, values.Count);
+ Assert.Equal(6, values.Count);
for (int i = 0; i > -6; i--)
- Assert.AreEqual(i, values[Math.Abs(i)]);
+ Assert.Equal(i, values[Math.Abs(i)]);
}
- [TestMethod]
+ [Fact]
public void TestNegativeEnumArray()
{
int arraySize = 1 + 1 + (11 * 5);
@@ -353,22 +352,22 @@
CodedOutputStream output = CodedOutputStream.CreateInstance(bytes);
output.WriteEnumArray(8, "", new int[] { 0, -1, -2, -3, -4, -5 });
- Assert.AreEqual(0, output.SpaceLeft);
+ Assert.Equal(0, output.SpaceLeft);
CodedInputStream input = CodedInputStream.CreateInstance(bytes);
uint tag;
string name;
- Assert.IsTrue(input.ReadTag(out tag, out name));
+ Assert.True(input.ReadTag(out tag, out name));
List<int> values = new List<int>();
input.ReadInt32Array(tag, name, values);
- Assert.AreEqual(6, values.Count);
+ Assert.Equal(6, values.Count);
for (int i = 0; i > -6; i--)
- Assert.AreEqual(i, values[Math.Abs(i)]);
+ Assert.Equal(i, values[Math.Abs(i)]);
}
- [TestMethod]
+ [Fact]
public void TestCodedInputOutputPosition()
{
byte[] content = new byte[110];
@@ -381,19 +380,19 @@
CodedOutputStream cout = CodedOutputStream.CreateInstance(ms, 20);
// Field 11: numeric value: 500
cout.WriteTag(11, WireFormat.WireType.Varint);
- Assert.AreEqual(1, cout.Position);
+ Assert.Equal(1, cout.Position);
cout.WriteInt32NoTag(500);
- Assert.AreEqual(3, cout.Position);
+ Assert.Equal(3, cout.Position);
//Field 12: length delimited 120 bytes
cout.WriteTag(12, WireFormat.WireType.LengthDelimited);
- Assert.AreEqual(4, cout.Position);
+ Assert.Equal(4, cout.Position);
cout.WriteBytesNoTag(ByteString.CopyFrom(content));
- Assert.AreEqual(115, cout.Position);
+ Assert.Equal(115, cout.Position);
// Field 13: fixed numeric value: 501
cout.WriteTag(13, WireFormat.WireType.Fixed32);
- Assert.AreEqual(116, cout.Position);
+ Assert.Equal(116, cout.Position);
cout.WriteSFixed32NoTag(501);
- Assert.AreEqual(120, cout.Position);
+ Assert.Equal(120, cout.Position);
cout.Flush();
}
@@ -402,19 +401,19 @@
CodedOutputStream cout = CodedOutputStream.CreateInstance(bytes);
// Field 1: numeric value: 500
cout.WriteTag(1, WireFormat.WireType.Varint);
- Assert.AreEqual(1, cout.Position);
+ Assert.Equal(1, cout.Position);
cout.WriteInt32NoTag(500);
- Assert.AreEqual(3, cout.Position);
+ Assert.Equal(3, cout.Position);
//Field 2: length delimited 120 bytes
cout.WriteTag(2, WireFormat.WireType.LengthDelimited);
- Assert.AreEqual(4, cout.Position);
+ Assert.Equal(4, cout.Position);
cout.WriteBytesNoTag(ByteString.CopyFrom(child));
- Assert.AreEqual(125, cout.Position);
+ Assert.Equal(125, cout.Position);
// Field 3: fixed numeric value: 500
cout.WriteTag(3, WireFormat.WireType.Fixed32);
- Assert.AreEqual(126, cout.Position);
+ Assert.Equal(126, cout.Position);
cout.WriteSFixed32NoTag(501);
- Assert.AreEqual(130, cout.Position);
+ Assert.Equal(130, cout.Position);
cout.Flush();
}
//Now test Input stream:
@@ -423,49 +422,49 @@
uint tag;
int intValue = 0;
string ignore;
- Assert.AreEqual(0, cin.Position);
+ Assert.Equal(0, cin.Position);
// Field 1:
- Assert.IsTrue(cin.ReadTag(out tag, out ignore) && tag >> 3 == 1);
- Assert.AreEqual(1, cin.Position);
- Assert.IsTrue(cin.ReadInt32(ref intValue) && intValue == 500);
- Assert.AreEqual(3, cin.Position);
+ Assert.True(cin.ReadTag(out tag, out ignore) && tag >> 3 == 1);
+ Assert.Equal(1, cin.Position);
+ Assert.True(cin.ReadInt32(ref intValue) && intValue == 500);
+ Assert.Equal(3, cin.Position);
//Field 2:
- Assert.IsTrue(cin.ReadTag(out tag, out ignore) && tag >> 3 == 2);
- Assert.AreEqual(4, cin.Position);
+ Assert.True(cin.ReadTag(out tag, out ignore) && tag >> 3 == 2);
+ Assert.Equal(4, cin.Position);
uint childlen = cin.ReadRawVarint32();
- Assert.AreEqual(120u, childlen);
- Assert.AreEqual(5, cin.Position);
+ Assert.Equal(120u, childlen);
+ Assert.Equal(5, cin.Position);
int oldlimit = cin.PushLimit((int)childlen);
- Assert.AreEqual(5, cin.Position);
+ Assert.Equal(5, cin.Position);
// Now we are reading child message
{
// Field 11: numeric value: 500
- Assert.IsTrue(cin.ReadTag(out tag, out ignore) && tag >> 3 == 11);
- Assert.AreEqual(6, cin.Position);
- Assert.IsTrue(cin.ReadInt32(ref intValue) && intValue == 500);
- Assert.AreEqual(8, cin.Position);
+ Assert.True(cin.ReadTag(out tag, out ignore) && tag >> 3 == 11);
+ Assert.Equal(6, cin.Position);
+ Assert.True(cin.ReadInt32(ref intValue) && intValue == 500);
+ Assert.Equal(8, cin.Position);
//Field 12: length delimited 120 bytes
- Assert.IsTrue(cin.ReadTag(out tag, out ignore) && tag >> 3 == 12);
- Assert.AreEqual(9, cin.Position);
+ Assert.True(cin.ReadTag(out tag, out ignore) && tag >> 3 == 12);
+ Assert.Equal(9, cin.Position);
ByteString bstr = null;
- Assert.IsTrue(cin.ReadBytes(ref bstr) && bstr.Length == 110 && bstr.ToByteArray()[109] == 109);
- Assert.AreEqual(120, cin.Position);
+ Assert.True(cin.ReadBytes(ref bstr) && bstr.Length == 110 && bstr.ToByteArray()[109] == 109);
+ Assert.Equal(120, cin.Position);
// Field 13: fixed numeric value: 501
- Assert.IsTrue(cin.ReadTag(out tag, out ignore) && tag >> 3 == 13);
+ Assert.True(cin.ReadTag(out tag, out ignore) && tag >> 3 == 13);
// ROK - Previously broken here, this returned 126 failing to account for bufferSizeAfterLimit
- Assert.AreEqual(121, cin.Position);
- Assert.IsTrue(cin.ReadSFixed32(ref intValue) && intValue == 501);
- Assert.AreEqual(125, cin.Position);
- Assert.IsTrue(cin.IsAtEnd);
+ Assert.Equal(121, cin.Position);
+ Assert.True(cin.ReadSFixed32(ref intValue) && intValue == 501);
+ Assert.Equal(125, cin.Position);
+ Assert.True(cin.IsAtEnd);
}
cin.PopLimit(oldlimit);
- Assert.AreEqual(125, cin.Position);
+ Assert.Equal(125, cin.Position);
// Field 3: fixed numeric value: 501
- Assert.IsTrue(cin.ReadTag(out tag, out ignore) && tag >> 3 == 3);
- Assert.AreEqual(126, cin.Position);
- Assert.IsTrue(cin.ReadSFixed32(ref intValue) && intValue == 501);
- Assert.AreEqual(130, cin.Position);
- Assert.IsTrue(cin.IsAtEnd);
+ Assert.True(cin.ReadTag(out tag, out ignore) && tag >> 3 == 3);
+ Assert.Equal(126, cin.Position);
+ Assert.True(cin.ReadSFixed32(ref intValue) && intValue == 501);
+ Assert.Equal(130, cin.Position);
+ Assert.True(cin.IsAtEnd);
}
}
}
diff --git a/csharp/src/ProtocolBuffers.Test/Collections/PopsicleListTest.cs b/csharp/src/ProtocolBuffers.Test/Collections/PopsicleListTest.cs
index 0bce60d..2958470 100644
--- a/csharp/src/ProtocolBuffers.Test/Collections/PopsicleListTest.cs
+++ b/csharp/src/ProtocolBuffers.Test/Collections/PopsicleListTest.cs
@@ -36,40 +36,39 @@
using System;
using System.Collections.Generic;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Xunit;
namespace Google.ProtocolBuffers.Collections
{
- [TestClass]
public class PopsicleListTest
{
- [TestMethod]
+ [Fact]
public void MutatingOperationsOnFrozenList()
{
PopsicleList<string> list = new PopsicleList<string>();
list.MakeReadOnly();
- TestUtil.AssertNotSupported(() => list.Add(""));
- TestUtil.AssertNotSupported(() => list.Clear());
- TestUtil.AssertNotSupported(() => list.Insert(0, ""));
- TestUtil.AssertNotSupported(() => list.Remove(""));
- TestUtil.AssertNotSupported(() => list.RemoveAt(0));
- TestUtil.AssertNotSupported(() => list.Add(new[] { "", "" }));
+ Assert.Throws<NotSupportedException>(() => list.Add(""));
+ Assert.Throws<NotSupportedException>(() => list.Clear());
+ Assert.Throws<NotSupportedException>(() => list.Insert(0, ""));
+ Assert.Throws<NotSupportedException>(() => list.Remove(""));
+ Assert.Throws<NotSupportedException>(() => list.RemoveAt(0));
+ Assert.Throws<NotSupportedException>(() => list.Add(new[] { "", "" }));
}
- [TestMethod]
+ [Fact]
public void NonMutatingOperationsOnFrozenList()
{
PopsicleList<string> list = new PopsicleList<string>();
list.MakeReadOnly();
- Assert.IsFalse(list.Contains(""));
- Assert.AreEqual(0, list.Count);
+ Assert.False(list.Contains(""));
+ Assert.Equal(0, list.Count);
list.CopyTo(new string[5], 0);
list.GetEnumerator();
- Assert.AreEqual(-1, list.IndexOf(""));
- Assert.IsTrue(list.IsReadOnly);
+ Assert.Equal(-1, list.IndexOf(""));
+ Assert.True(list.IsReadOnly);
}
- [TestMethod]
+ [Fact]
public void MutatingOperationsOnFluidList()
{
PopsicleList<string> list = new PopsicleList<string>();
@@ -81,73 +80,46 @@
list.RemoveAt(0);
}
- [TestMethod]
+ [Fact]
public void NonMutatingOperationsOnFluidList()
{
PopsicleList<string> list = new PopsicleList<string>();
- Assert.IsFalse(list.Contains(""));
- Assert.AreEqual(0, list.Count);
+ Assert.False(list.Contains(""));
+ Assert.Equal(0, list.Count);
list.CopyTo(new string[5], 0);
list.GetEnumerator();
- Assert.AreEqual(-1, list.IndexOf(""));
- Assert.IsFalse(list.IsReadOnly);
+ Assert.Equal(-1, list.IndexOf(""));
+ Assert.False(list.IsReadOnly);
}
- [TestMethod]
+ [Fact]
public void DoesNotAddNullEnumerable()
{
PopsicleList<string> list = new PopsicleList<string>();
- try
- {
- list.Add((IEnumerable<string>)null);
- }
- catch (ArgumentNullException)
- { return; }
-
- Assert.Fail("List should not allow nulls.");
+ Assert.Throws<ArgumentNullException>(() => list.Add((IEnumerable<string>) null));
}
- [TestMethod]
+ [Fact]
public void DoesNotAddRangeWithNull()
{
PopsicleList<string> list = new PopsicleList<string>();
- try
- {
- list.Add(new[] { "a", "b", null });
- }
- catch (ArgumentNullException)
- { return; }
-
- Assert.Fail("List should not allow nulls.");
+ // TODO(jonskeet): Change to ArgumentException? The argument isn't null...
+ Assert.Throws<ArgumentNullException>(() => list.Add(new[] {"a", "b", null}));
}
- [TestMethod]
+ [Fact]
public void DoesNotAddNull()
{
PopsicleList<string> list = new PopsicleList<string>();
- try
- {
- list.Add((string)null);
- }
- catch (ArgumentNullException)
- { return; }
-
- Assert.Fail("List should not allow nulls.");
+ Assert.Throws<ArgumentNullException>(() => list.Add((string) null));
}
- [TestMethod]
+ [Fact]
public void DoesNotSetNull()
{
PopsicleList<string> list = new PopsicleList<string>();
list.Add("a");
- try
- {
- list[0] = null;
- }
- catch (ArgumentNullException)
- { return; }
-
- Assert.Fail("List should not allow nulls.");
+ Assert.Throws<ArgumentNullException>(() => list[0] = null);
}
}
}
\ No newline at end of file
diff --git a/csharp/src/ProtocolBuffers.Test/Compatibility/BinaryCompatibilityTests.cs b/csharp/src/ProtocolBuffers.Test/Compatibility/BinaryCompatibilityTests.cs
index 9707f8e..30d257a 100644
--- a/csharp/src/ProtocolBuffers.Test/Compatibility/BinaryCompatibilityTests.cs
+++ b/csharp/src/ProtocolBuffers.Test/Compatibility/BinaryCompatibilityTests.cs
@@ -1,9 +1,7 @@
using System;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace Google.ProtocolBuffers.Compatibility
{
- [TestClass]
public class BinaryCompatibilityTests : CompatibilityTests
{
protected override object SerializeMessage<TMessage, TBuilder>(TMessage message)
diff --git a/csharp/src/ProtocolBuffers.Test/Compatibility/CompatibilityTests.cs b/csharp/src/ProtocolBuffers.Test/Compatibility/CompatibilityTests.cs
index 5befe96..d918c92 100644
--- a/csharp/src/ProtocolBuffers.Test/Compatibility/CompatibilityTests.cs
+++ b/csharp/src/ProtocolBuffers.Test/Compatibility/CompatibilityTests.cs
@@ -1,6 +1,6 @@
using System;
using Google.ProtocolBuffers.TestProtos;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Xunit;
namespace Google.ProtocolBuffers.Compatibility
@@ -22,10 +22,10 @@
protected virtual void AssertOutputEquals(object lhs, object rhs)
{
- Assert.AreEqual<object>(lhs, rhs);
+ Assert.Equal<object>(lhs, rhs);
}
- [TestMethod]
+ [Fact]
public virtual void RoundTripWithEmptyChildMessageSize()
{
SizeMessage1 msg = SizeMessage1.CreateBuilder()
@@ -37,12 +37,12 @@
SizeMessage1 copy = DeserializeMessage<SizeMessage1, SizeMessage1.Builder>(content, SizeMessage1.CreateBuilder(), ExtensionRegistry.Empty).BuildPartial();
- Assert.AreEqual(msg, copy);
+ Assert.Equal(msg, copy);
AssertOutputEquals(content, SerializeMessage<SizeMessage1, SizeMessage1.Builder>(copy));
- Assert.AreEqual(Convert.ToBase64String(contents), Convert.ToBase64String(copy.ToByteArray()));
+ Assert.Equal(Convert.ToBase64String(contents), Convert.ToBase64String(copy.ToByteArray()));
}
- [TestMethod]
+ [Fact]
public virtual void RoundTripWithEmptyChildMessageSpeed()
{
SpeedMessage1 msg = SpeedMessage1.CreateBuilder()
@@ -54,12 +54,12 @@
SpeedMessage1 copy = DeserializeMessage<SpeedMessage1, SpeedMessage1.Builder>(content, SpeedMessage1.CreateBuilder(), ExtensionRegistry.Empty).BuildPartial();
- Assert.AreEqual(msg, copy);
+ Assert.Equal(msg, copy);
AssertOutputEquals(content, SerializeMessage<SpeedMessage1, SpeedMessage1.Builder>(copy));
- Assert.AreEqual(Convert.ToBase64String(contents), Convert.ToBase64String(copy.ToByteArray()));
+ Assert.Equal(Convert.ToBase64String(contents), Convert.ToBase64String(copy.ToByteArray()));
}
- [TestMethod]
+ [Fact]
public virtual void RoundTripMessage1OptimizeSize()
{
SizeMessage1 msg = SizeMessage1.CreateBuilder().MergeFrom(TestResources.google_message1).Build();
@@ -67,12 +67,12 @@
SizeMessage1 copy = DeserializeMessage<SizeMessage1, SizeMessage1.Builder>(content, SizeMessage1.CreateBuilder(), ExtensionRegistry.Empty).Build();
- Assert.AreEqual(msg, copy);
+ Assert.Equal(msg, copy);
AssertOutputEquals(content, SerializeMessage<SizeMessage1, SizeMessage1.Builder>(copy));
- Assert.AreEqual(Convert.ToBase64String(TestResources.google_message1), Convert.ToBase64String(copy.ToByteArray()));
+ Assert.Equal(Convert.ToBase64String(TestResources.google_message1), Convert.ToBase64String(copy.ToByteArray()));
}
- [TestMethod]
+ [Fact]
public virtual void RoundTripMessage2OptimizeSize()
{
SizeMessage2 msg = SizeMessage2.CreateBuilder().MergeFrom(TestResources.google_message2).Build();
@@ -80,12 +80,12 @@
SizeMessage2 copy = DeserializeMessage<SizeMessage2, SizeMessage2.Builder>(content, SizeMessage2.CreateBuilder(), ExtensionRegistry.Empty).Build();
- Assert.AreEqual(msg, copy);
+ Assert.Equal(msg, copy);
AssertOutputEquals(content, SerializeMessage<SizeMessage2, SizeMessage2.Builder>(copy));
- Assert.AreEqual(Convert.ToBase64String(TestResources.google_message2), Convert.ToBase64String(copy.ToByteArray()));
+ Assert.Equal(Convert.ToBase64String(TestResources.google_message2), Convert.ToBase64String(copy.ToByteArray()));
}
- [TestMethod]
+ [Fact]
public virtual void RoundTripMessage1OptimizeSpeed()
{
SpeedMessage1 msg = SpeedMessage1.CreateBuilder().MergeFrom(TestResources.google_message1).Build();
@@ -93,12 +93,12 @@
SpeedMessage1 copy = DeserializeMessage<SpeedMessage1, SpeedMessage1.Builder>(content, SpeedMessage1.CreateBuilder(), ExtensionRegistry.Empty).Build();
- Assert.AreEqual(msg, copy);
+ Assert.Equal(msg, copy);
AssertOutputEquals(content, SerializeMessage<SpeedMessage1, SpeedMessage1.Builder>(copy));
- Assert.AreEqual(Convert.ToBase64String(TestResources.google_message1), Convert.ToBase64String(copy.ToByteArray()));
+ Assert.Equal(Convert.ToBase64String(TestResources.google_message1), Convert.ToBase64String(copy.ToByteArray()));
}
- [TestMethod]
+ [Fact]
public virtual void RoundTripMessage2OptimizeSpeed()
{
SpeedMessage2 msg = SpeedMessage2.CreateBuilder().MergeFrom(TestResources.google_message2).Build();
@@ -106,9 +106,9 @@
SpeedMessage2 copy = DeserializeMessage<SpeedMessage2, SpeedMessage2.Builder>(content, SpeedMessage2.CreateBuilder(), ExtensionRegistry.Empty).Build();
- Assert.AreEqual(msg, copy);
+ Assert.Equal(msg, copy);
AssertOutputEquals(content, SerializeMessage<SpeedMessage2, SpeedMessage2.Builder>(copy));
- Assert.AreEqual(Convert.ToBase64String(TestResources.google_message2), Convert.ToBase64String(copy.ToByteArray()));
+ Assert.Equal(Convert.ToBase64String(TestResources.google_message2), Convert.ToBase64String(copy.ToByteArray()));
}
#region Test message builders
@@ -185,7 +185,7 @@
#endregion
- [TestMethod]
+ [Fact]
public void TestRoundTripAllTypes()
{
TestAllTypes msg = AddAllTypes(new TestAllTypes.Builder()).Build();
@@ -193,12 +193,12 @@
TestAllTypes copy = DeserializeMessage<TestAllTypes, TestAllTypes.Builder>(content, TestAllTypes.CreateBuilder(), ExtensionRegistry.Empty).Build();
- Assert.AreEqual(msg, copy);
+ Assert.Equal(msg, copy);
AssertOutputEquals(content, SerializeMessage<TestAllTypes, TestAllTypes.Builder>(copy));
- Assert.AreEqual(Convert.ToBase64String(msg.ToByteArray()), Convert.ToBase64String(copy.ToByteArray()));
+ Assert.Equal(Convert.ToBase64String(msg.ToByteArray()), Convert.ToBase64String(copy.ToByteArray()));
}
- [TestMethod]
+ [Fact]
public void TestRoundTripRepeatedTypes()
{
TestAllTypes msg = AddRepeatedTypes(new TestAllTypes.Builder(), 5).Build();
@@ -206,12 +206,12 @@
TestAllTypes copy = DeserializeMessage<TestAllTypes, TestAllTypes.Builder>(content, TestAllTypes.CreateBuilder(), ExtensionRegistry.Empty).Build();
- Assert.AreEqual(msg, copy);
+ Assert.Equal(msg, copy);
AssertOutputEquals(content, SerializeMessage<TestAllTypes, TestAllTypes.Builder>(copy));
- Assert.AreEqual(Convert.ToBase64String(msg.ToByteArray()), Convert.ToBase64String(copy.ToByteArray()));
+ Assert.Equal(Convert.ToBase64String(msg.ToByteArray()), Convert.ToBase64String(copy.ToByteArray()));
}
- [TestMethod]
+ [Fact]
public void TestRoundTripPackedTypes()
{
TestPackedTypes msg = AddPackedTypes(new TestPackedTypes.Builder(), 5).Build();
@@ -219,9 +219,9 @@
TestPackedTypes copy = DeserializeMessage<TestPackedTypes, TestPackedTypes.Builder>(content, TestPackedTypes.CreateBuilder(), ExtensionRegistry.Empty).Build();
- Assert.AreEqual(msg, copy);
+ Assert.Equal(msg, copy);
AssertOutputEquals(content, SerializeMessage<TestPackedTypes, TestPackedTypes.Builder>(copy));
- Assert.AreEqual(Convert.ToBase64String(msg.ToByteArray()), Convert.ToBase64String(copy.ToByteArray()));
+ Assert.Equal(Convert.ToBase64String(msg.ToByteArray()), Convert.ToBase64String(copy.ToByteArray()));
}
}
}
diff --git a/csharp/src/ProtocolBuffers.Test/Compatibility/DictionaryCompatibilityTests.cs b/csharp/src/ProtocolBuffers.Test/Compatibility/DictionaryCompatibilityTests.cs
index 73037cc..f555b10 100644
--- a/csharp/src/ProtocolBuffers.Test/Compatibility/DictionaryCompatibilityTests.cs
+++ b/csharp/src/ProtocolBuffers.Test/Compatibility/DictionaryCompatibilityTests.cs
@@ -1,13 +1,10 @@
using System;
using System.Collections.Generic;
-using System.IO;
-using System.Text;
using Google.ProtocolBuffers.Serialization;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Xunit;
namespace Google.ProtocolBuffers.Compatibility
{
- [TestClass]
public class DictionaryCompatibilityTests : CompatibilityTests
{
protected override object SerializeMessage<TMessage, TBuilder>(TMessage message)
@@ -28,7 +25,7 @@
IDictionary<string, object> left = (IDictionary<string, object>)lhs;
IDictionary<string, object> right = (IDictionary<string, object>)rhs;
- Assert.AreEqual(
+ Assert.Equal(
String.Join(",", new List<string>(left.Keys).ToArray()),
String.Join(",", new List<string>(right.Keys).ToArray())
);
diff --git a/csharp/src/ProtocolBuffers.Test/Compatibility/JsonCompatibilityTests.cs b/csharp/src/ProtocolBuffers.Test/Compatibility/JsonCompatibilityTests.cs
index 7460310..3c943d3 100644
--- a/csharp/src/ProtocolBuffers.Test/Compatibility/JsonCompatibilityTests.cs
+++ b/csharp/src/ProtocolBuffers.Test/Compatibility/JsonCompatibilityTests.cs
@@ -1,11 +1,8 @@
using System.IO;
-using System.Text;
using Google.ProtocolBuffers.Serialization;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace Google.ProtocolBuffers.Compatibility
{
- [TestClass]
public class JsonCompatibilityTests : CompatibilityTests
{
protected override object SerializeMessage<TMessage, TBuilder>(TMessage message)
@@ -23,7 +20,6 @@
}
}
- [TestClass]
public class JsonCompatibilityFormattedTests : CompatibilityTests
{
protected override object SerializeMessage<TMessage, TBuilder>(TMessage message)
diff --git a/csharp/src/ProtocolBuffers.Test/Compatibility/TestResources.cs b/csharp/src/ProtocolBuffers.Test/Compatibility/TestResources.cs
index c3ce588..4d1187a 100644
--- a/csharp/src/ProtocolBuffers.Test/Compatibility/TestResources.cs
+++ b/csharp/src/ProtocolBuffers.Test/Compatibility/TestResources.cs
@@ -1,8 +1,5 @@
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Text;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
+using System.IO;
+using Xunit;
namespace Google.ProtocolBuffers.Compatibility
{
@@ -15,11 +12,11 @@
Stream resource = typeof(TestResources).Assembly.GetManifestResourceStream(
typeof(TestResources).Namespace + ".google_message1.dat");
- Assert.IsNotNull(resource, "Unable to the locate resource: google_message1");
+ Assert.NotNull(resource);
byte[] bytes = new byte[resource.Length];
int amtRead = resource.Read(bytes, 0, bytes.Length);
- Assert.AreEqual(bytes.Length, amtRead);
+ Assert.Equal(bytes.Length, amtRead);
return bytes;
}
}
@@ -30,11 +27,10 @@
Stream resource = typeof(TestResources).Assembly.GetManifestResourceStream(
typeof(TestResources).Namespace + ".google_message2.dat");
- Assert.IsNotNull(resource, "Unable to the locate resource: google_message2");
-
+ Assert.NotNull(resource);
byte[] bytes = new byte[resource.Length];
int amtRead = resource.Read(bytes, 0, bytes.Length);
- Assert.AreEqual(bytes.Length, amtRead);
+ Assert.Equal(bytes.Length, amtRead);
return bytes;
}
}
diff --git a/csharp/src/ProtocolBuffers.Test/Compatibility/TextCompatibilityTests.cs b/csharp/src/ProtocolBuffers.Test/Compatibility/TextCompatibilityTests.cs
index c2eaadf..2d74cf9 100644
--- a/csharp/src/ProtocolBuffers.Test/Compatibility/TextCompatibilityTests.cs
+++ b/csharp/src/ProtocolBuffers.Test/Compatibility/TextCompatibilityTests.cs
@@ -1,10 +1,8 @@
-using System.ComponentModel;
using System.IO;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Xunit;
namespace Google.ProtocolBuffers.Compatibility
{
- [TestClass]
public class TextCompatibilityTests : CompatibilityTests
{
protected override object SerializeMessage<TMessage, TBuilder>(TMessage message)
@@ -20,14 +18,14 @@
return builder;
}
//This test can take a very long time to run.
- [TestMethod]
+ [Fact]
public override void RoundTripMessage2OptimizeSize()
{
//base.RoundTripMessage2OptimizeSize();
}
//This test can take a very long time to run.
- [TestMethod]
+ [Fact]
public override void RoundTripMessage2OptimizeSpeed()
{
//base.RoundTripMessage2OptimizeSpeed();
diff --git a/csharp/src/ProtocolBuffers.Test/Compatibility/XmlCompatibilityTests.cs b/csharp/src/ProtocolBuffers.Test/Compatibility/XmlCompatibilityTests.cs
index 7061474..313523e 100644
--- a/csharp/src/ProtocolBuffers.Test/Compatibility/XmlCompatibilityTests.cs
+++ b/csharp/src/ProtocolBuffers.Test/Compatibility/XmlCompatibilityTests.cs
@@ -1,12 +1,9 @@
using System.IO;
using System.Xml;
using Google.ProtocolBuffers.Serialization;
-using Google.ProtocolBuffers.TestProtos;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace Google.ProtocolBuffers.Compatibility
{
- [TestClass]
public class XmlCompatibilityTests : CompatibilityTests
{
protected override object SerializeMessage<TMessage, TBuilder>(TMessage message)
@@ -24,7 +21,6 @@
}
}
- [TestClass]
public class XmlCompatibilityFormattedTests : CompatibilityTests
{
protected override object SerializeMessage<TMessage, TBuilder>(TMessage message)
diff --git a/csharp/src/ProtocolBuffers.Test/DeprecatedMemberTest.cs b/csharp/src/ProtocolBuffers.Test/DeprecatedMemberTest.cs
index 0901f04..21d2192 100644
--- a/csharp/src/ProtocolBuffers.Test/DeprecatedMemberTest.cs
+++ b/csharp/src/ProtocolBuffers.Test/DeprecatedMemberTest.cs
@@ -1,22 +1,19 @@
using System;
-using System.Collections.Generic;
using System.Reflection;
-using System.Text;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
using UnitTest.Issues.TestProtos;
+using Xunit;
namespace Google.ProtocolBuffers
{
- [TestClass]
public class DeprecatedMemberTest
{
private static void AssertIsDeprecated(MemberInfo member)
{
- Assert.IsNotNull(member);
- Assert.IsTrue(member.IsDefined(typeof(ObsoleteAttribute), false), "Member not obsolete: " + member);
+ Assert.NotNull(member);
+ Assert.True(member.IsDefined(typeof(ObsoleteAttribute), false), "Member not obsolete: " + member);
}
- [TestMethod]
+ [Fact]
public void TestDepreatedPrimitiveValue()
{
AssertIsDeprecated(typeof(DeprecatedFieldsMessage).GetProperty("HasPrimitiveValue"));
@@ -27,7 +24,7 @@
AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetMethod("ClearPrimitiveValue"));
AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetMethod("SetPrimitiveValue"));
}
- [TestMethod]
+ [Fact]
public void TestDepreatedPrimitiveArray()
{
AssertIsDeprecated(typeof(DeprecatedFieldsMessage).GetProperty("PrimitiveArrayList"));
@@ -42,7 +39,7 @@
AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetMethod("AddRangePrimitiveArray"));
AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetMethod("ClearPrimitiveArray"));
}
- [TestMethod]
+ [Fact]
public void TestDepreatedMessageValue()
{
AssertIsDeprecated(typeof(DeprecatedFieldsMessage).GetProperty("HasMessageValue"));
@@ -55,7 +52,7 @@
AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetMethod("SetMessageValue", new[] { typeof(DeprecatedChild) }));
AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetMethod("SetMessageValue", new[] { typeof(DeprecatedChild.Builder) }));
}
- [TestMethod]
+ [Fact]
public void TestDepreatedMessageArray()
{
AssertIsDeprecated(typeof(DeprecatedFieldsMessage).GetProperty("MessageArrayList"));
@@ -72,7 +69,7 @@
AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetMethod("AddRangeMessageArray"));
AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetMethod("ClearMessageArray"));
}
- [TestMethod]
+ [Fact]
public void TestDepreatedEnumValue()
{
AssertIsDeprecated(typeof(DeprecatedFieldsMessage).GetProperty("HasEnumValue"));
@@ -83,7 +80,7 @@
AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetMethod("ClearEnumValue"));
AssertIsDeprecated(typeof(DeprecatedFieldsMessage.Builder).GetMethod("SetEnumValue"));
}
- [TestMethod]
+ [Fact]
public void TestDepreatedEnumArray()
{
AssertIsDeprecated(typeof(DeprecatedFieldsMessage).GetProperty("EnumArrayList"));
diff --git a/csharp/src/ProtocolBuffers.Test/DescriptorsTest.cs b/csharp/src/ProtocolBuffers.Test/DescriptorsTest.cs
index e74236f..680887d 100644
--- a/csharp/src/ProtocolBuffers.Test/DescriptorsTest.cs
+++ b/csharp/src/ProtocolBuffers.Test/DescriptorsTest.cs
@@ -34,10 +34,9 @@
#endregion
-using System.Text;
using Google.ProtocolBuffers.Descriptors;
using Google.ProtocolBuffers.TestProtos;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Xunit;
namespace Google.ProtocolBuffers
{
@@ -45,106 +44,105 @@
/// Tests for descriptors. (Not in its own namespace or broken up into individual classes as the
/// size doesn't warrant it. On the other hand, this makes me feel a bit dirty...)
/// </summary>
- [TestClass]
public class DescriptorsTest
{
- [TestMethod]
+ [Fact]
public void FileDescriptor()
{
FileDescriptor file = Unittest.Descriptor;
- Assert.AreEqual("google/protobuf/unittest.proto", file.Name);
- Assert.AreEqual("protobuf_unittest", file.Package);
+ Assert.Equal("google/protobuf/unittest.proto", file.Name);
+ Assert.Equal("protobuf_unittest", file.Package);
- Assert.AreEqual("UnittestProto", file.Options.JavaOuterClassname);
- Assert.AreEqual("google/protobuf/unittest.proto", file.Proto.Name);
+ Assert.Equal("UnittestProto", file.Options.JavaOuterClassname);
+ Assert.Equal("google/protobuf/unittest.proto", file.Proto.Name);
// unittest.proto doesn't have any public imports, but unittest_import.proto does.
- Assert.AreEqual(0, file.PublicDependencies.Count);
- Assert.AreEqual(1, UnittestImport.Descriptor.PublicDependencies.Count);
- Assert.AreEqual(UnittestImportPublic.Descriptor, UnittestImport.Descriptor.PublicDependencies[0]);
+ Assert.Equal(0, file.PublicDependencies.Count);
+ Assert.Equal(1, UnittestImport.Descriptor.PublicDependencies.Count);
+ Assert.Equal(UnittestImportPublic.Descriptor, UnittestImport.Descriptor.PublicDependencies[0]);
- Assert.AreEqual(1, file.Dependencies.Count);
- Assert.AreEqual(UnittestImport.Descriptor, file.Dependencies[0]);
+ Assert.Equal(1, file.Dependencies.Count);
+ Assert.Equal(UnittestImport.Descriptor, file.Dependencies[0]);
MessageDescriptor messageType = TestAllTypes.Descriptor;
- Assert.AreEqual(messageType, file.MessageTypes[0]);
- Assert.AreEqual(messageType, file.FindTypeByName<MessageDescriptor>("TestAllTypes"));
- Assert.IsNull(file.FindTypeByName<MessageDescriptor>("NoSuchType"));
- Assert.IsNull(file.FindTypeByName<MessageDescriptor>("protobuf_unittest.TestAllTypes"));
+ Assert.Equal(messageType, file.MessageTypes[0]);
+ Assert.Equal(messageType, file.FindTypeByName<MessageDescriptor>("TestAllTypes"));
+ Assert.Null(file.FindTypeByName<MessageDescriptor>("NoSuchType"));
+ Assert.Null(file.FindTypeByName<MessageDescriptor>("protobuf_unittest.TestAllTypes"));
for (int i = 0; i < file.MessageTypes.Count; i++)
{
- Assert.AreEqual(i, file.MessageTypes[i].Index);
+ Assert.Equal(i, file.MessageTypes[i].Index);
}
- Assert.AreEqual(file.EnumTypes[0], file.FindTypeByName<EnumDescriptor>("ForeignEnum"));
- Assert.IsNull(file.FindTypeByName<EnumDescriptor>("NoSuchType"));
- Assert.IsNull(file.FindTypeByName<EnumDescriptor>("protobuf_unittest.ForeignEnum"));
- Assert.AreEqual(1, UnittestImport.Descriptor.EnumTypes.Count);
- Assert.AreEqual("ImportEnum", UnittestImport.Descriptor.EnumTypes[0].Name);
+ Assert.Equal(file.EnumTypes[0], file.FindTypeByName<EnumDescriptor>("ForeignEnum"));
+ Assert.Null(file.FindTypeByName<EnumDescriptor>("NoSuchType"));
+ Assert.Null(file.FindTypeByName<EnumDescriptor>("protobuf_unittest.ForeignEnum"));
+ Assert.Equal(1, UnittestImport.Descriptor.EnumTypes.Count);
+ Assert.Equal("ImportEnum", UnittestImport.Descriptor.EnumTypes[0].Name);
for (int i = 0; i < file.EnumTypes.Count; i++)
{
- Assert.AreEqual(i, file.EnumTypes[i].Index);
+ Assert.Equal(i, file.EnumTypes[i].Index);
}
FieldDescriptor extension = Unittest.OptionalInt32Extension.Descriptor;
- Assert.AreEqual(extension, file.Extensions[0]);
- Assert.AreEqual(extension, file.FindTypeByName<FieldDescriptor>("optional_int32_extension"));
- Assert.IsNull(file.FindTypeByName<FieldDescriptor>("no_such_ext"));
- Assert.IsNull(file.FindTypeByName<FieldDescriptor>("protobuf_unittest.optional_int32_extension"));
- Assert.AreEqual(0, UnittestImport.Descriptor.Extensions.Count);
+ Assert.Equal(extension, file.Extensions[0]);
+ Assert.Equal(extension, file.FindTypeByName<FieldDescriptor>("optional_int32_extension"));
+ Assert.Null(file.FindTypeByName<FieldDescriptor>("no_such_ext"));
+ Assert.Null(file.FindTypeByName<FieldDescriptor>("protobuf_unittest.optional_int32_extension"));
+ Assert.Equal(0, UnittestImport.Descriptor.Extensions.Count);
for (int i = 0; i < file.Extensions.Count; i++)
{
- Assert.AreEqual(i, file.Extensions[i].Index);
+ Assert.Equal(i, file.Extensions[i].Index);
}
}
- [TestMethod]
+ [Fact]
public void MessageDescriptor()
{
MessageDescriptor messageType = TestAllTypes.Descriptor;
MessageDescriptor nestedType = TestAllTypes.Types.NestedMessage.Descriptor;
- Assert.AreEqual("TestAllTypes", messageType.Name);
- Assert.AreEqual("protobuf_unittest.TestAllTypes", messageType.FullName);
- Assert.AreEqual(Unittest.Descriptor, messageType.File);
- Assert.IsNull(messageType.ContainingType);
- Assert.AreEqual(DescriptorProtos.MessageOptions.DefaultInstance, messageType.Options);
- Assert.AreEqual("TestAllTypes", messageType.Proto.Name);
+ Assert.Equal("TestAllTypes", messageType.Name);
+ Assert.Equal("protobuf_unittest.TestAllTypes", messageType.FullName);
+ Assert.Equal(Unittest.Descriptor, messageType.File);
+ Assert.Null(messageType.ContainingType);
+ Assert.Equal(DescriptorProtos.MessageOptions.DefaultInstance, messageType.Options);
+ Assert.Equal("TestAllTypes", messageType.Proto.Name);
- Assert.AreEqual("NestedMessage", nestedType.Name);
- Assert.AreEqual("protobuf_unittest.TestAllTypes.NestedMessage", nestedType.FullName);
- Assert.AreEqual(Unittest.Descriptor, nestedType.File);
- Assert.AreEqual(messageType, nestedType.ContainingType);
+ Assert.Equal("NestedMessage", nestedType.Name);
+ Assert.Equal("protobuf_unittest.TestAllTypes.NestedMessage", nestedType.FullName);
+ Assert.Equal(Unittest.Descriptor, nestedType.File);
+ Assert.Equal(messageType, nestedType.ContainingType);
FieldDescriptor field = messageType.Fields[0];
- Assert.AreEqual("optional_int32", field.Name);
- Assert.AreEqual(field, messageType.FindDescriptor<FieldDescriptor>("optional_int32"));
- Assert.IsNull(messageType.FindDescriptor<FieldDescriptor>("no_such_field"));
- Assert.AreEqual(field, messageType.FindFieldByNumber(1));
- Assert.IsNull(messageType.FindFieldByNumber(571283));
+ Assert.Equal("optional_int32", field.Name);
+ Assert.Equal(field, messageType.FindDescriptor<FieldDescriptor>("optional_int32"));
+ Assert.Null(messageType.FindDescriptor<FieldDescriptor>("no_such_field"));
+ Assert.Equal(field, messageType.FindFieldByNumber(1));
+ Assert.Null(messageType.FindFieldByNumber(571283));
for (int i = 0; i < messageType.Fields.Count; i++)
{
- Assert.AreEqual(i, messageType.Fields[i].Index);
+ Assert.Equal(i, messageType.Fields[i].Index);
}
- Assert.AreEqual(nestedType, messageType.NestedTypes[0]);
- Assert.AreEqual(nestedType, messageType.FindDescriptor<MessageDescriptor>("NestedMessage"));
- Assert.IsNull(messageType.FindDescriptor<MessageDescriptor>("NoSuchType"));
+ Assert.Equal(nestedType, messageType.NestedTypes[0]);
+ Assert.Equal(nestedType, messageType.FindDescriptor<MessageDescriptor>("NestedMessage"));
+ Assert.Null(messageType.FindDescriptor<MessageDescriptor>("NoSuchType"));
for (int i = 0; i < messageType.NestedTypes.Count; i++)
{
- Assert.AreEqual(i, messageType.NestedTypes[i].Index);
+ Assert.Equal(i, messageType.NestedTypes[i].Index);
}
- Assert.AreEqual(messageType.EnumTypes[0], messageType.FindDescriptor<EnumDescriptor>("NestedEnum"));
- Assert.IsNull(messageType.FindDescriptor<EnumDescriptor>("NoSuchType"));
+ Assert.Equal(messageType.EnumTypes[0], messageType.FindDescriptor<EnumDescriptor>("NestedEnum"));
+ Assert.Null(messageType.FindDescriptor<EnumDescriptor>("NoSuchType"));
for (int i = 0; i < messageType.EnumTypes.Count; i++)
{
- Assert.AreEqual(i, messageType.EnumTypes[i].Index);
+ Assert.Equal(i, messageType.EnumTypes[i].Index);
}
}
- [TestMethod]
+ [Fact]
public void FieldDescriptor()
{
MessageDescriptor messageType = TestAllTypes.Descriptor;
@@ -155,54 +153,54 @@
FieldDescriptor extension = Unittest.OptionalInt32Extension.Descriptor;
FieldDescriptor nestedExtension = TestRequired.Single.Descriptor;
- Assert.AreEqual("optional_int32", primitiveField.Name);
- Assert.AreEqual("protobuf_unittest.TestAllTypes.optional_int32",
+ Assert.Equal("optional_int32", primitiveField.Name);
+ Assert.Equal("protobuf_unittest.TestAllTypes.optional_int32",
primitiveField.FullName);
- Assert.AreEqual(1, primitiveField.FieldNumber);
- Assert.AreEqual(messageType, primitiveField.ContainingType);
- Assert.AreEqual(Unittest.Descriptor, primitiveField.File);
- Assert.AreEqual(FieldType.Int32, primitiveField.FieldType);
- Assert.AreEqual(MappedType.Int32, primitiveField.MappedType);
- Assert.AreEqual(DescriptorProtos.FieldOptions.DefaultInstance, primitiveField.Options);
- Assert.IsFalse(primitiveField.IsExtension);
- Assert.AreEqual("optional_int32", primitiveField.Proto.Name);
+ Assert.Equal(1, primitiveField.FieldNumber);
+ Assert.Equal(messageType, primitiveField.ContainingType);
+ Assert.Equal(Unittest.Descriptor, primitiveField.File);
+ Assert.Equal(FieldType.Int32, primitiveField.FieldType);
+ Assert.Equal(MappedType.Int32, primitiveField.MappedType);
+ Assert.Equal(DescriptorProtos.FieldOptions.DefaultInstance, primitiveField.Options);
+ Assert.False(primitiveField.IsExtension);
+ Assert.Equal("optional_int32", primitiveField.Proto.Name);
- Assert.AreEqual("optional_nested_enum", enumField.Name);
- Assert.AreEqual(FieldType.Enum, enumField.FieldType);
- Assert.AreEqual(MappedType.Enum, enumField.MappedType);
- // Assert.AreEqual(TestAllTypes.Types.NestedEnum.DescriptorProtoFile, enumField.EnumType);
+ Assert.Equal("optional_nested_enum", enumField.Name);
+ Assert.Equal(FieldType.Enum, enumField.FieldType);
+ Assert.Equal(MappedType.Enum, enumField.MappedType);
+ // Assert.Equal(TestAllTypes.Types.NestedEnum.DescriptorProtoFile, enumField.EnumType);
- Assert.AreEqual("optional_foreign_message", messageField.Name);
- Assert.AreEqual(FieldType.Message, messageField.FieldType);
- Assert.AreEqual(MappedType.Message, messageField.MappedType);
- Assert.AreEqual(ForeignMessage.Descriptor, messageField.MessageType);
+ Assert.Equal("optional_foreign_message", messageField.Name);
+ Assert.Equal(FieldType.Message, messageField.FieldType);
+ Assert.Equal(MappedType.Message, messageField.MappedType);
+ Assert.Equal(ForeignMessage.Descriptor, messageField.MessageType);
- Assert.AreEqual("optional_cord", cordField.Name);
- Assert.AreEqual(FieldType.String, cordField.FieldType);
- Assert.AreEqual(MappedType.String, cordField.MappedType);
- Assert.AreEqual(DescriptorProtos.FieldOptions.Types.CType.CORD, cordField.Options.Ctype);
+ Assert.Equal("optional_cord", cordField.Name);
+ Assert.Equal(FieldType.String, cordField.FieldType);
+ Assert.Equal(MappedType.String, cordField.MappedType);
+ Assert.Equal(DescriptorProtos.FieldOptions.Types.CType.CORD, cordField.Options.Ctype);
- Assert.AreEqual("optional_int32_extension", extension.Name);
- Assert.AreEqual("protobuf_unittest.optional_int32_extension", extension.FullName);
- Assert.AreEqual(1, extension.FieldNumber);
- Assert.AreEqual(TestAllExtensions.Descriptor, extension.ContainingType);
- Assert.AreEqual(Unittest.Descriptor, extension.File);
- Assert.AreEqual(FieldType.Int32, extension.FieldType);
- Assert.AreEqual(MappedType.Int32, extension.MappedType);
- Assert.AreEqual(DescriptorProtos.FieldOptions.DefaultInstance,
+ Assert.Equal("optional_int32_extension", extension.Name);
+ Assert.Equal("protobuf_unittest.optional_int32_extension", extension.FullName);
+ Assert.Equal(1, extension.FieldNumber);
+ Assert.Equal(TestAllExtensions.Descriptor, extension.ContainingType);
+ Assert.Equal(Unittest.Descriptor, extension.File);
+ Assert.Equal(FieldType.Int32, extension.FieldType);
+ Assert.Equal(MappedType.Int32, extension.MappedType);
+ Assert.Equal(DescriptorProtos.FieldOptions.DefaultInstance,
extension.Options);
- Assert.IsTrue(extension.IsExtension);
- Assert.AreEqual(null, extension.ExtensionScope);
- Assert.AreEqual("optional_int32_extension", extension.Proto.Name);
+ Assert.True(extension.IsExtension);
+ Assert.Equal(null, extension.ExtensionScope);
+ Assert.Equal("optional_int32_extension", extension.Proto.Name);
- Assert.AreEqual("single", nestedExtension.Name);
- Assert.AreEqual("protobuf_unittest.TestRequired.single",
+ Assert.Equal("single", nestedExtension.Name);
+ Assert.Equal("protobuf_unittest.TestRequired.single",
nestedExtension.FullName);
- Assert.AreEqual(TestRequired.Descriptor,
+ Assert.Equal(TestRequired.Descriptor,
nestedExtension.ExtensionScope);
}
- [TestMethod]
+ [Fact]
public void FieldDescriptorLabel()
{
FieldDescriptor requiredField =
@@ -212,76 +210,76 @@
FieldDescriptor repeatedField =
TestAllTypes.Descriptor.FindDescriptor<FieldDescriptor>("repeated_int32");
- Assert.IsTrue(requiredField.IsRequired);
- Assert.IsFalse(requiredField.IsRepeated);
- Assert.IsFalse(optionalField.IsRequired);
- Assert.IsFalse(optionalField.IsRepeated);
- Assert.IsFalse(repeatedField.IsRequired);
- Assert.IsTrue(repeatedField.IsRepeated);
+ Assert.True(requiredField.IsRequired);
+ Assert.False(requiredField.IsRepeated);
+ Assert.False(optionalField.IsRequired);
+ Assert.False(optionalField.IsRepeated);
+ Assert.False(repeatedField.IsRequired);
+ Assert.True(repeatedField.IsRepeated);
}
- [TestMethod]
+ [Fact]
public void FieldDescriptorDefault()
{
MessageDescriptor d = TestAllTypes.Descriptor;
- Assert.IsFalse(d.FindDescriptor<FieldDescriptor>("optional_int32").HasDefaultValue);
- Assert.AreEqual<object>(0, d.FindDescriptor<FieldDescriptor>("optional_int32").DefaultValue);
- Assert.IsTrue(d.FindDescriptor<FieldDescriptor>("default_int32").HasDefaultValue);
- Assert.AreEqual<object>(41, d.FindDescriptor<FieldDescriptor>("default_int32").DefaultValue);
+ Assert.False(d.FindDescriptor<FieldDescriptor>("optional_int32").HasDefaultValue);
+ Assert.Equal<object>(0, d.FindDescriptor<FieldDescriptor>("optional_int32").DefaultValue);
+ Assert.True(d.FindDescriptor<FieldDescriptor>("default_int32").HasDefaultValue);
+ Assert.Equal<object>(41, d.FindDescriptor<FieldDescriptor>("default_int32").DefaultValue);
d = TestExtremeDefaultValues.Descriptor;
- Assert.AreEqual<object>(TestExtremeDefaultValues.DefaultInstance.EscapedBytes,
+ Assert.Equal<object>(TestExtremeDefaultValues.DefaultInstance.EscapedBytes,
d.FindDescriptor<FieldDescriptor>("escaped_bytes").DefaultValue);
- Assert.AreEqual<object>(uint.MaxValue, d.FindDescriptor<FieldDescriptor>("large_uint32").DefaultValue);
- Assert.AreEqual<object>(ulong.MaxValue, d.FindDescriptor<FieldDescriptor>("large_uint64").DefaultValue);
+ Assert.Equal<object>(uint.MaxValue, d.FindDescriptor<FieldDescriptor>("large_uint32").DefaultValue);
+ Assert.Equal<object>(ulong.MaxValue, d.FindDescriptor<FieldDescriptor>("large_uint64").DefaultValue);
}
- [TestMethod]
+ [Fact]
public void EnumDescriptor()
{
// Note: this test is a bit different to the Java version because there's no static way of getting to the descriptor
EnumDescriptor enumType = Unittest.Descriptor.FindTypeByName<EnumDescriptor>("ForeignEnum");
EnumDescriptor nestedType = TestAllTypes.Descriptor.FindDescriptor<EnumDescriptor>("NestedEnum");
- Assert.AreEqual("ForeignEnum", enumType.Name);
- Assert.AreEqual("protobuf_unittest.ForeignEnum", enumType.FullName);
- Assert.AreEqual(Unittest.Descriptor, enumType.File);
- Assert.IsNull(enumType.ContainingType);
- Assert.AreEqual(DescriptorProtos.EnumOptions.DefaultInstance,
+ Assert.Equal("ForeignEnum", enumType.Name);
+ Assert.Equal("protobuf_unittest.ForeignEnum", enumType.FullName);
+ Assert.Equal(Unittest.Descriptor, enumType.File);
+ Assert.Null(enumType.ContainingType);
+ Assert.Equal(DescriptorProtos.EnumOptions.DefaultInstance,
enumType.Options);
- Assert.AreEqual("NestedEnum", nestedType.Name);
- Assert.AreEqual("protobuf_unittest.TestAllTypes.NestedEnum",
+ Assert.Equal("NestedEnum", nestedType.Name);
+ Assert.Equal("protobuf_unittest.TestAllTypes.NestedEnum",
nestedType.FullName);
- Assert.AreEqual(Unittest.Descriptor, nestedType.File);
- Assert.AreEqual(TestAllTypes.Descriptor, nestedType.ContainingType);
+ Assert.Equal(Unittest.Descriptor, nestedType.File);
+ Assert.Equal(TestAllTypes.Descriptor, nestedType.ContainingType);
EnumValueDescriptor value = enumType.FindValueByName("FOREIGN_FOO");
- Assert.AreEqual(value, enumType.Values[0]);
- Assert.AreEqual("FOREIGN_FOO", value.Name);
- Assert.AreEqual(4, value.Number);
- Assert.AreEqual((int) ForeignEnum.FOREIGN_FOO, value.Number);
- Assert.AreEqual(value, enumType.FindValueByNumber(4));
- Assert.IsNull(enumType.FindValueByName("NO_SUCH_VALUE"));
+ Assert.Equal(value, enumType.Values[0]);
+ Assert.Equal("FOREIGN_FOO", value.Name);
+ Assert.Equal(4, value.Number);
+ Assert.Equal((int) ForeignEnum.FOREIGN_FOO, value.Number);
+ Assert.Equal(value, enumType.FindValueByNumber(4));
+ Assert.Null(enumType.FindValueByName("NO_SUCH_VALUE"));
for (int i = 0; i < enumType.Values.Count; i++)
{
- Assert.AreEqual(i, enumType.Values[i].Index);
+ Assert.Equal(i, enumType.Values[i].Index);
}
}
- [TestMethod]
+ [Fact]
public void CustomOptions()
{
MessageDescriptor descriptor = TestMessageWithCustomOptions.Descriptor;
- Assert.IsTrue(descriptor.Options.HasExtension(UnittestCustomOptions.MessageOpt1));
- Assert.AreEqual(-56, descriptor.Options.GetExtension(UnittestCustomOptions.MessageOpt1));
+ Assert.True(descriptor.Options.HasExtension(UnittestCustomOptions.MessageOpt1));
+ Assert.Equal(-56, descriptor.Options.GetExtension(UnittestCustomOptions.MessageOpt1));
FieldDescriptor field = descriptor.FindFieldByName("field1");
- Assert.IsNotNull(field);
+ Assert.NotNull(field);
- Assert.IsTrue(field.Options.HasExtension(UnittestCustomOptions.FieldOpt1));
- Assert.AreEqual(8765432109uL, field.Options.GetExtension(UnittestCustomOptions.FieldOpt1));
+ Assert.True(field.Options.HasExtension(UnittestCustomOptions.FieldOpt1));
+ Assert.Equal(8765432109uL, field.Options.GetExtension(UnittestCustomOptions.FieldOpt1));
}
}
diff --git a/csharp/src/ProtocolBuffers.Test/DynamicMessageTest.cs b/csharp/src/ProtocolBuffers.Test/DynamicMessageTest.cs
index 9251599..39f122a 100644
--- a/csharp/src/ProtocolBuffers.Test/DynamicMessageTest.cs
+++ b/csharp/src/ProtocolBuffers.Test/DynamicMessageTest.cs
@@ -37,26 +37,24 @@
using System;
using System.Collections.Generic;
using Google.ProtocolBuffers.TestProtos;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Xunit;
namespace Google.ProtocolBuffers
{
- [TestClass]
public class DynamicMessageTest
{
private ReflectionTester reflectionTester;
private ReflectionTester extensionsReflectionTester;
private ReflectionTester packedReflectionTester;
- [TestInitialize]
- public void SetUp()
+ public DynamicMessageTest()
{
reflectionTester = ReflectionTester.CreateTestAllTypesInstance();
extensionsReflectionTester = ReflectionTester.CreateTestAllExtensionsInstance();
packedReflectionTester = ReflectionTester.CreateTestPackedTypesInstance();
}
- [TestMethod]
+ [Fact]
public void DynamicMessageAccessors()
{
IBuilder builder = DynamicMessage.CreateBuilder(TestAllTypes.Descriptor);
@@ -65,30 +63,22 @@
reflectionTester.AssertAllFieldsSetViaReflection(message);
}
- [TestMethod]
+ [Fact]
public void DoubleBuildError()
{
DynamicMessage.Builder builder = DynamicMessage.CreateBuilder(TestAllTypes.Descriptor);
builder.Build();
- try
- {
- builder.Build();
- Assert.Fail("Should have thrown exception.");
- }
- catch (InvalidOperationException)
- {
- // Success.
- }
+ Assert.Throws<InvalidOperationException>(() => builder.Build());
}
- [TestMethod]
+ [Fact]
public void DynamicMessageSettersRejectNull()
{
IBuilder builder = DynamicMessage.CreateBuilder(TestAllTypes.Descriptor);
reflectionTester.AssertReflectionSettersRejectNull(builder);
}
- [TestMethod]
+ [Fact]
public void DynamicMessageExtensionAccessors()
{
// We don't need to extensively test DynamicMessage's handling of
@@ -100,14 +90,14 @@
extensionsReflectionTester.AssertAllFieldsSetViaReflection(message);
}
- [TestMethod]
+ [Fact]
public void DynamicMessageExtensionSettersRejectNull()
{
IBuilder builder = DynamicMessage.CreateBuilder(TestAllExtensions.Descriptor);
extensionsReflectionTester.AssertReflectionSettersRejectNull(builder);
}
- [TestMethod]
+ [Fact]
public void DynamicMessageRepeatedSetters()
{
IBuilder builder = DynamicMessage.CreateBuilder(TestAllTypes.Descriptor);
@@ -117,21 +107,21 @@
reflectionTester.AssertRepeatedFieldsModifiedViaReflection(message);
}
- [TestMethod]
+ [Fact]
public void DynamicMessageRepeatedSettersRejectNull()
{
IBuilder builder = DynamicMessage.CreateBuilder(TestAllTypes.Descriptor);
reflectionTester.AssertReflectionRepeatedSettersRejectNull(builder);
}
- [TestMethod]
+ [Fact]
public void DynamicMessageDefaults()
{
reflectionTester.AssertClearViaReflection(DynamicMessage.GetDefaultInstance(TestAllTypes.Descriptor));
reflectionTester.AssertClearViaReflection(DynamicMessage.CreateBuilder(TestAllTypes.Descriptor).Build());
}
- [TestMethod]
+ [Fact]
public void DynamicMessageSerializedSize()
{
TestAllTypes message = TestUtil.GetAllSet();
@@ -140,10 +130,10 @@
reflectionTester.SetAllFieldsViaReflection(dynamicBuilder);
IMessage dynamicMessage = dynamicBuilder.WeakBuild();
- Assert.AreEqual(message.SerializedSize, dynamicMessage.SerializedSize);
+ Assert.Equal(message.SerializedSize, dynamicMessage.SerializedSize);
}
- [TestMethod]
+ [Fact]
public void DynamicMessageSerialization()
{
IBuilder builder = DynamicMessage.CreateBuilder(TestAllTypes.Descriptor);
@@ -156,10 +146,10 @@
TestUtil.AssertAllFieldsSet(message2);
// In fact, the serialized forms should be exactly the same, byte-for-byte.
- Assert.AreEqual(TestUtil.GetAllSet().ToByteString(), rawBytes);
+ Assert.Equal(TestUtil.GetAllSet().ToByteString(), rawBytes);
}
- [TestMethod]
+ [Fact]
public void DynamicMessageParsing()
{
TestAllTypes.Builder builder = TestAllTypes.CreateBuilder();
@@ -172,7 +162,7 @@
reflectionTester.AssertAllFieldsSetViaReflection(message2);
}
- [TestMethod]
+ [Fact]
public void DynamicMessagePackedSerialization()
{
IBuilder builder = DynamicMessage.CreateBuilder(TestPackedTypes.Descriptor);
@@ -185,11 +175,11 @@
TestUtil.AssertPackedFieldsSet(message2);
// In fact, the serialized forms should be exactly the same, byte-for-byte.
- Assert.AreEqual(TestUtil.GetPackedSet().ToByteString(), rawBytes);
+ Assert.Equal(TestUtil.GetPackedSet().ToByteString(), rawBytes);
}
- [TestMethod]
- public void testDynamicMessagePackedParsing()
+ [Fact]
+ public void DynamicMessagePackedParsing()
{
TestPackedTypes.Builder builder = TestPackedTypes.CreateBuilder();
TestUtil.SetPackedFields(builder);
@@ -201,7 +191,7 @@
packedReflectionTester.AssertPackedFieldsSetViaReflection(message2);
}
- [TestMethod]
+ [Fact]
public void DynamicMessageCopy()
{
TestAllTypes.Builder builder = TestAllTypes.CreateBuilder();
@@ -212,7 +202,7 @@
reflectionTester.AssertAllFieldsSetViaReflection(copy);
}
- [TestMethod]
+ [Fact]
public void ToBuilder()
{
DynamicMessage.Builder builder =
@@ -230,8 +220,8 @@
reflectionTester.AssertAllFieldsSetViaReflection(derived);
IList<ulong> values = derived.UnknownFields.FieldDictionary[unknownFieldNum].VarintList;
- Assert.AreEqual(1, values.Count);
- Assert.AreEqual(unknownFieldVal, values[0]);
+ Assert.Equal(1, values.Count);
+ Assert.Equal(unknownFieldVal, values[0]);
}
}
}
\ No newline at end of file
diff --git a/csharp/src/ProtocolBuffers.Test/ExtendableMessageTest.cs b/csharp/src/ProtocolBuffers.Test/ExtendableMessageTest.cs
index 4e0bf8e..f329270 100644
--- a/csharp/src/ProtocolBuffers.Test/ExtendableMessageTest.cs
+++ b/csharp/src/ProtocolBuffers.Test/ExtendableMessageTest.cs
@@ -35,24 +35,22 @@
#endregion
using System;
-using System.Collections.Generic;
-using Google.ProtocolBuffers;
using Google.ProtocolBuffers.TestProtos;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Xunit;
namespace Google.ProtocolBuffers
{
- [TestClass]
public class ExtendableMessageTest
{
- [TestMethod, ExpectedException(typeof(ArgumentException))]
+ [Fact]
public void ExtensionWriterInvalidExtension()
{
- TestPackedExtensions.CreateBuilder()[Unittest.OptionalForeignMessageExtension.Descriptor] =
- ForeignMessage.DefaultInstance;
+ Assert.Throws<ArgumentException>(() =>
+ TestPackedExtensions.CreateBuilder()[Unittest.OptionalForeignMessageExtension.Descriptor] =
+ ForeignMessage.DefaultInstance);
}
- [TestMethod]
+ [Fact]
public void ExtensionWriterTest()
{
TestAllExtensions.Builder builder = TestAllExtensions.CreateBuilder()
@@ -128,75 +126,75 @@
registry);
TestAllExtensions copy = copyBuilder.Build();
- TestUtil.AssertBytesEqual(msg.ToByteArray(), copy.ToByteArray());
+ Assert.Equal(msg.ToByteArray(), copy.ToByteArray());
- Assert.AreEqual(true, copy.GetExtension(Unittest.DefaultBoolExtension));
- Assert.AreEqual(ByteString.CopyFromUtf8("123"), copy.GetExtension(Unittest.DefaultBytesExtension));
- Assert.AreEqual("123", copy.GetExtension(Unittest.DefaultCordExtension));
- Assert.AreEqual(123, copy.GetExtension(Unittest.DefaultDoubleExtension));
- Assert.AreEqual(123u, copy.GetExtension(Unittest.DefaultFixed32Extension));
- Assert.AreEqual(123u, copy.GetExtension(Unittest.DefaultFixed64Extension));
- Assert.AreEqual(123, copy.GetExtension(Unittest.DefaultFloatExtension));
- Assert.AreEqual(ForeignEnum.FOREIGN_BAZ, copy.GetExtension(Unittest.DefaultForeignEnumExtension));
- Assert.AreEqual(ImportEnum.IMPORT_BAZ, copy.GetExtension(Unittest.DefaultImportEnumExtension));
- Assert.AreEqual(123, copy.GetExtension(Unittest.DefaultInt32Extension));
- Assert.AreEqual(123, copy.GetExtension(Unittest.DefaultInt64Extension));
- Assert.AreEqual(TestAllTypes.Types.NestedEnum.FOO,
+ Assert.Equal(true, copy.GetExtension(Unittest.DefaultBoolExtension));
+ Assert.Equal(ByteString.CopyFromUtf8("123"), copy.GetExtension(Unittest.DefaultBytesExtension));
+ Assert.Equal("123", copy.GetExtension(Unittest.DefaultCordExtension));
+ Assert.Equal(123, copy.GetExtension(Unittest.DefaultDoubleExtension));
+ Assert.Equal(123u, copy.GetExtension(Unittest.DefaultFixed32Extension));
+ Assert.Equal(123u, copy.GetExtension(Unittest.DefaultFixed64Extension));
+ Assert.Equal(123, copy.GetExtension(Unittest.DefaultFloatExtension));
+ Assert.Equal(ForeignEnum.FOREIGN_BAZ, copy.GetExtension(Unittest.DefaultForeignEnumExtension));
+ Assert.Equal(ImportEnum.IMPORT_BAZ, copy.GetExtension(Unittest.DefaultImportEnumExtension));
+ Assert.Equal(123, copy.GetExtension(Unittest.DefaultInt32Extension));
+ Assert.Equal(123, copy.GetExtension(Unittest.DefaultInt64Extension));
+ Assert.Equal(TestAllTypes.Types.NestedEnum.FOO,
copy.GetExtension(Unittest.DefaultNestedEnumExtension));
- Assert.AreEqual(123, copy.GetExtension(Unittest.DefaultSfixed32Extension));
- Assert.AreEqual(123, copy.GetExtension(Unittest.DefaultSfixed64Extension));
- Assert.AreEqual(123, copy.GetExtension(Unittest.DefaultSint32Extension));
- Assert.AreEqual(123, copy.GetExtension(Unittest.DefaultSint64Extension));
- Assert.AreEqual("123", copy.GetExtension(Unittest.DefaultStringExtension));
- Assert.AreEqual("123", copy.GetExtension(Unittest.DefaultStringPieceExtension));
- Assert.AreEqual(123u, copy.GetExtension(Unittest.DefaultUint32Extension));
- Assert.AreEqual(123u, copy.GetExtension(Unittest.DefaultUint64Extension));
+ Assert.Equal(123, copy.GetExtension(Unittest.DefaultSfixed32Extension));
+ Assert.Equal(123, copy.GetExtension(Unittest.DefaultSfixed64Extension));
+ Assert.Equal(123, copy.GetExtension(Unittest.DefaultSint32Extension));
+ Assert.Equal(123, copy.GetExtension(Unittest.DefaultSint64Extension));
+ Assert.Equal("123", copy.GetExtension(Unittest.DefaultStringExtension));
+ Assert.Equal("123", copy.GetExtension(Unittest.DefaultStringPieceExtension));
+ Assert.Equal(123u, copy.GetExtension(Unittest.DefaultUint32Extension));
+ Assert.Equal(123u, copy.GetExtension(Unittest.DefaultUint64Extension));
- Assert.AreEqual(true, copy.GetExtension(Unittest.OptionalBoolExtension));
- Assert.AreEqual(ByteString.CopyFromUtf8("123"), copy.GetExtension(Unittest.OptionalBytesExtension));
- Assert.AreEqual("123", copy.GetExtension(Unittest.OptionalCordExtension));
- Assert.AreEqual(123, copy.GetExtension(Unittest.OptionalDoubleExtension));
- Assert.AreEqual(123u, copy.GetExtension(Unittest.OptionalFixed32Extension));
- Assert.AreEqual(123u, copy.GetExtension(Unittest.OptionalFixed64Extension));
- Assert.AreEqual(123, copy.GetExtension(Unittest.OptionalFloatExtension));
- Assert.AreEqual(ForeignEnum.FOREIGN_BAZ, copy.GetExtension(Unittest.OptionalForeignEnumExtension));
- Assert.AreEqual(ImportEnum.IMPORT_BAZ, copy.GetExtension(Unittest.OptionalImportEnumExtension));
- Assert.AreEqual(123, copy.GetExtension(Unittest.OptionalInt32Extension));
- Assert.AreEqual(123, copy.GetExtension(Unittest.OptionalInt64Extension));
- Assert.AreEqual(TestAllTypes.Types.NestedEnum.FOO,
+ Assert.Equal(true, copy.GetExtension(Unittest.OptionalBoolExtension));
+ Assert.Equal(ByteString.CopyFromUtf8("123"), copy.GetExtension(Unittest.OptionalBytesExtension));
+ Assert.Equal("123", copy.GetExtension(Unittest.OptionalCordExtension));
+ Assert.Equal(123, copy.GetExtension(Unittest.OptionalDoubleExtension));
+ Assert.Equal(123u, copy.GetExtension(Unittest.OptionalFixed32Extension));
+ Assert.Equal(123u, copy.GetExtension(Unittest.OptionalFixed64Extension));
+ Assert.Equal(123, copy.GetExtension(Unittest.OptionalFloatExtension));
+ Assert.Equal(ForeignEnum.FOREIGN_BAZ, copy.GetExtension(Unittest.OptionalForeignEnumExtension));
+ Assert.Equal(ImportEnum.IMPORT_BAZ, copy.GetExtension(Unittest.OptionalImportEnumExtension));
+ Assert.Equal(123, copy.GetExtension(Unittest.OptionalInt32Extension));
+ Assert.Equal(123, copy.GetExtension(Unittest.OptionalInt64Extension));
+ Assert.Equal(TestAllTypes.Types.NestedEnum.FOO,
copy.GetExtension(Unittest.OptionalNestedEnumExtension));
- Assert.AreEqual(123, copy.GetExtension(Unittest.OptionalSfixed32Extension));
- Assert.AreEqual(123, copy.GetExtension(Unittest.OptionalSfixed64Extension));
- Assert.AreEqual(123, copy.GetExtension(Unittest.OptionalSint32Extension));
- Assert.AreEqual(123, copy.GetExtension(Unittest.OptionalSint64Extension));
- Assert.AreEqual("123", copy.GetExtension(Unittest.OptionalStringExtension));
- Assert.AreEqual("123", copy.GetExtension(Unittest.OptionalStringPieceExtension));
- Assert.AreEqual(123u, copy.GetExtension(Unittest.OptionalUint32Extension));
- Assert.AreEqual(123u, copy.GetExtension(Unittest.OptionalUint64Extension));
+ Assert.Equal(123, copy.GetExtension(Unittest.OptionalSfixed32Extension));
+ Assert.Equal(123, copy.GetExtension(Unittest.OptionalSfixed64Extension));
+ Assert.Equal(123, copy.GetExtension(Unittest.OptionalSint32Extension));
+ Assert.Equal(123, copy.GetExtension(Unittest.OptionalSint64Extension));
+ Assert.Equal("123", copy.GetExtension(Unittest.OptionalStringExtension));
+ Assert.Equal("123", copy.GetExtension(Unittest.OptionalStringPieceExtension));
+ Assert.Equal(123u, copy.GetExtension(Unittest.OptionalUint32Extension));
+ Assert.Equal(123u, copy.GetExtension(Unittest.OptionalUint64Extension));
- Assert.AreEqual(true, copy.GetExtension(Unittest.RepeatedBoolExtension, 0));
- Assert.AreEqual(ByteString.CopyFromUtf8("123"),
+ Assert.Equal(true, copy.GetExtension(Unittest.RepeatedBoolExtension, 0));
+ Assert.Equal(ByteString.CopyFromUtf8("123"),
copy.GetExtension(Unittest.RepeatedBytesExtension, 0));
- Assert.AreEqual("123", copy.GetExtension(Unittest.RepeatedCordExtension, 0));
- Assert.AreEqual(123, copy.GetExtension(Unittest.RepeatedDoubleExtension, 0));
- Assert.AreEqual(123u, copy.GetExtension(Unittest.RepeatedFixed32Extension, 0));
- Assert.AreEqual(123u, copy.GetExtension(Unittest.RepeatedFixed64Extension, 0));
- Assert.AreEqual(123, copy.GetExtension(Unittest.RepeatedFloatExtension, 0));
- Assert.AreEqual(ForeignEnum.FOREIGN_BAZ,
+ Assert.Equal("123", copy.GetExtension(Unittest.RepeatedCordExtension, 0));
+ Assert.Equal(123, copy.GetExtension(Unittest.RepeatedDoubleExtension, 0));
+ Assert.Equal(123u, copy.GetExtension(Unittest.RepeatedFixed32Extension, 0));
+ Assert.Equal(123u, copy.GetExtension(Unittest.RepeatedFixed64Extension, 0));
+ Assert.Equal(123, copy.GetExtension(Unittest.RepeatedFloatExtension, 0));
+ Assert.Equal(ForeignEnum.FOREIGN_BAZ,
copy.GetExtension(Unittest.RepeatedForeignEnumExtension, 0));
- Assert.AreEqual(ImportEnum.IMPORT_BAZ, copy.GetExtension(Unittest.RepeatedImportEnumExtension, 0));
- Assert.AreEqual(123, copy.GetExtension(Unittest.RepeatedInt32Extension, 0));
- Assert.AreEqual(123, copy.GetExtension(Unittest.RepeatedInt64Extension, 0));
- Assert.AreEqual(TestAllTypes.Types.NestedEnum.FOO,
+ Assert.Equal(ImportEnum.IMPORT_BAZ, copy.GetExtension(Unittest.RepeatedImportEnumExtension, 0));
+ Assert.Equal(123, copy.GetExtension(Unittest.RepeatedInt32Extension, 0));
+ Assert.Equal(123, copy.GetExtension(Unittest.RepeatedInt64Extension, 0));
+ Assert.Equal(TestAllTypes.Types.NestedEnum.FOO,
copy.GetExtension(Unittest.RepeatedNestedEnumExtension, 0));
- Assert.AreEqual(123, copy.GetExtension(Unittest.RepeatedSfixed32Extension, 0));
- Assert.AreEqual(123, copy.GetExtension(Unittest.RepeatedSfixed64Extension, 0));
- Assert.AreEqual(123, copy.GetExtension(Unittest.RepeatedSint32Extension, 0));
- Assert.AreEqual(123, copy.GetExtension(Unittest.RepeatedSint64Extension, 0));
- Assert.AreEqual("123", copy.GetExtension(Unittest.RepeatedStringExtension, 0));
- Assert.AreEqual("123", copy.GetExtension(Unittest.RepeatedStringPieceExtension, 0));
- Assert.AreEqual(123u, copy.GetExtension(Unittest.RepeatedUint32Extension, 0));
- Assert.AreEqual(123u, copy.GetExtension(Unittest.RepeatedUint64Extension, 0));
+ Assert.Equal(123, copy.GetExtension(Unittest.RepeatedSfixed32Extension, 0));
+ Assert.Equal(123, copy.GetExtension(Unittest.RepeatedSfixed64Extension, 0));
+ Assert.Equal(123, copy.GetExtension(Unittest.RepeatedSint32Extension, 0));
+ Assert.Equal(123, copy.GetExtension(Unittest.RepeatedSint64Extension, 0));
+ Assert.Equal("123", copy.GetExtension(Unittest.RepeatedStringExtension, 0));
+ Assert.Equal("123", copy.GetExtension(Unittest.RepeatedStringPieceExtension, 0));
+ Assert.Equal(123u, copy.GetExtension(Unittest.RepeatedUint32Extension, 0));
+ Assert.Equal(123u, copy.GetExtension(Unittest.RepeatedUint64Extension, 0));
}
}
}
\ No newline at end of file
diff --git a/csharp/src/ProtocolBuffers.Test/GeneratedBuilderTest.cs b/csharp/src/ProtocolBuffers.Test/GeneratedBuilderTest.cs
index 1dcb1c2..692bfd1 100644
--- a/csharp/src/ProtocolBuffers.Test/GeneratedBuilderTest.cs
+++ b/csharp/src/ProtocolBuffers.Test/GeneratedBuilderTest.cs
@@ -1,12 +1,10 @@
using System;
using System.Collections.Generic;
-using System.Text;
using Google.ProtocolBuffers.TestProtos;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Xunit;
namespace Google.ProtocolBuffers
{
- [TestClass]
public class GeneratedBuilderTest
{
class OneTimeEnumerator<T> : IEnumerable<T>
@@ -19,107 +17,86 @@
}
public IEnumerator<T> GetEnumerator()
{
- Assert.IsFalse(_enumerated, "The collection {0} has already been enumerated", GetType());
+ Assert.False(_enumerated);
_enumerated = true;
yield return _item;
}
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
- { return GetEnumerator(); }
+ {
+ return GetEnumerator();
+ }
}
- [TestMethod]
+ [Fact]
public void DoesNotEnumerateTwiceForMessageList()
{
TestAllTypes.Builder b = new TestAllTypes.Builder();
- b.AddRangeRepeatedForeignMessage(
- new OneTimeEnumerator<ForeignMessage>(
- ForeignMessage.DefaultInstance));
+ b.AddRangeRepeatedForeignMessage(new OneTimeEnumerator<ForeignMessage>(ForeignMessage.DefaultInstance));
}
- [TestMethod]
+
+ [Fact]
public void DoesNotEnumerateTwiceForPrimitiveList()
{
TestAllTypes.Builder b = new TestAllTypes.Builder();
b.AddRangeRepeatedInt32(new OneTimeEnumerator<int>(1));
}
- [TestMethod]
+
+ [Fact]
public void DoesNotEnumerateTwiceForStringList()
{
TestAllTypes.Builder b = new TestAllTypes.Builder();
b.AddRangeRepeatedString(new OneTimeEnumerator<string>("test"));
}
- [TestMethod]
+
+ [Fact]
public void DoesNotEnumerateTwiceForEnumList()
{
TestAllTypes.Builder b = new TestAllTypes.Builder();
b.AddRangeRepeatedForeignEnum(new OneTimeEnumerator<ForeignEnum>(ForeignEnum.FOREIGN_BAR));
}
-
- private delegate void TestMethod();
-
- private static void AssertThrows<T>(TestMethod method) where T : Exception
- {
- try
- {
- method();
- }
- catch (Exception error)
- {
- if (error is T)
- return;
- throw;
- }
- Assert.Fail("Expected exception of type " + typeof(T));
- }
-
- [TestMethod]
+
+ [Fact]
public void DoesNotAddNullToMessageListByAddRange()
{
TestAllTypes.Builder b = new TestAllTypes.Builder();
- AssertThrows<ArgumentNullException>(
- () => b.AddRangeRepeatedForeignMessage(new ForeignMessage[] { null })
- );
+ Assert.Throws<ArgumentNullException>(() => b.AddRangeRepeatedForeignMessage(new ForeignMessage[] { null }));
}
- [TestMethod]
+
+ [Fact]
public void DoesNotAddNullToMessageListByAdd()
{
TestAllTypes.Builder b = new TestAllTypes.Builder();
- AssertThrows<ArgumentNullException>(
- () => b.AddRepeatedForeignMessage((ForeignMessage)null)
- );
+ Assert.Throws<ArgumentNullException>(() => b.AddRepeatedForeignMessage((ForeignMessage)null));
}
- [TestMethod]
+
+ [Fact]
public void DoesNotAddNullToMessageListBySet()
{
TestAllTypes.Builder b = new TestAllTypes.Builder();
b.AddRepeatedForeignMessage(ForeignMessage.DefaultInstance);
- AssertThrows<ArgumentNullException>(
- () => b.SetRepeatedForeignMessage(0, (ForeignMessage)null)
- );
+ Assert.Throws<ArgumentNullException>(() => b.SetRepeatedForeignMessage(0, (ForeignMessage)null));
}
- [TestMethod]
+
+ [Fact]
public void DoesNotAddNullToStringListByAddRange()
{
TestAllTypes.Builder b = new TestAllTypes.Builder();
- AssertThrows<ArgumentNullException>(
- () => b.AddRangeRepeatedString(new String[] { null })
- );
+ Assert.Throws<ArgumentNullException>(() => b.AddRangeRepeatedString(new String[] { null }));
}
- [TestMethod]
+
+ [Fact]
public void DoesNotAddNullToStringListByAdd()
{
TestAllTypes.Builder b = new TestAllTypes.Builder();
- AssertThrows<ArgumentNullException>(
- () => b.AddRepeatedString(null)
- );
+ Assert.Throws<ArgumentNullException>(() => b.AddRepeatedString(null));
}
- [TestMethod]
+
+ [Fact]
public void DoesNotAddNullToStringListBySet()
{
TestAllTypes.Builder b = new TestAllTypes.Builder();
b.AddRepeatedString("one");
- AssertThrows<ArgumentNullException>(
- () => b.SetRepeatedString(0, null)
- );
+ Assert.Throws<ArgumentNullException>(() => b.SetRepeatedString(0, null));
}
}
}
diff --git a/csharp/src/ProtocolBuffers.Test/GeneratedMessageTest.cs b/csharp/src/ProtocolBuffers.Test/GeneratedMessageTest.cs
index 0e8b980..a905295 100644
--- a/csharp/src/ProtocolBuffers.Test/GeneratedMessageTest.cs
+++ b/csharp/src/ProtocolBuffers.Test/GeneratedMessageTest.cs
@@ -38,31 +38,29 @@
using System.Collections.Generic;
using Google.ProtocolBuffers.Collections;
using Google.ProtocolBuffers.TestProtos;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Xunit;
namespace Google.ProtocolBuffers
{
- [TestClass]
public class GeneratedMessageTest
{
- private ReflectionTester reflectionTester;
- private ReflectionTester extensionsReflectionTester;
+ private readonly ReflectionTester reflectionTester;
+ private readonly ReflectionTester extensionsReflectionTester;
- [TestInitialize]
- public void SetUp()
+ public GeneratedMessageTest()
{
reflectionTester = ReflectionTester.CreateTestAllTypesInstance();
extensionsReflectionTester = ReflectionTester.CreateTestAllExtensionsInstance();
}
- [TestMethod]
+ [Fact]
public void RepeatedAddPrimitiveBeforeBuild()
{
TestAllTypes message = new TestAllTypes.Builder {RepeatedInt32List = {1, 2, 3}}.Build();
TestUtil.AssertEqual(new int[] {1, 2, 3}, message.RepeatedInt32List);
}
- [TestMethod]
+ [Fact]
public void AddPrimitiveFailsAfterBuild()
{
TestAllTypes.Builder builder = new TestAllTypes.Builder();
@@ -70,18 +68,10 @@
list.Add(1); // Fine
builder.Build();
- try
- {
- list.Add(2);
- Assert.Fail("List should be frozen");
- }
- catch (NotSupportedException)
- {
- // Expected
- }
+ Assert.Throws<NotSupportedException>(() => list.Add(2));
}
- [TestMethod]
+ [Fact]
public void RepeatedAddMessageBeforeBuild()
{
TestAllTypes message = new TestAllTypes.Builder
@@ -89,36 +79,28 @@
RepeatedNestedMessageList =
{new TestAllTypes.Types.NestedMessage.Builder {Bb = 10}.Build()}
}.Build();
- Assert.AreEqual(1, message.RepeatedNestedMessageCount);
- Assert.AreEqual(10, message.RepeatedNestedMessageList[0].Bb);
+ Assert.Equal(1, message.RepeatedNestedMessageCount);
+ Assert.Equal(10, message.RepeatedNestedMessageList[0].Bb);
}
- [TestMethod]
+ [Fact]
public void AddMessageFailsAfterBuild()
{
TestAllTypes.Builder builder = new TestAllTypes.Builder();
IList<TestAllTypes.Types.NestedMessage> list = builder.RepeatedNestedMessageList;
builder.Build();
- try
- {
- list.Add(new TestAllTypes.Types.NestedMessage.Builder {Bb = 10}.Build());
- Assert.Fail("List should be frozen");
- }
- catch (NotSupportedException)
- {
- // Expected
- }
+ Assert.Throws<NotSupportedException>(() => list.Add(new TestAllTypes.Types.NestedMessage.Builder { Bb = 10 }.Build()));
}
- [TestMethod]
+ [Fact]
public void DefaultInstance()
{
- Assert.AreSame(TestAllTypes.DefaultInstance, TestAllTypes.DefaultInstance.DefaultInstanceForType);
- Assert.AreSame(TestAllTypes.DefaultInstance, TestAllTypes.CreateBuilder().DefaultInstanceForType);
+ Assert.Same(TestAllTypes.DefaultInstance, TestAllTypes.DefaultInstance.DefaultInstanceForType);
+ Assert.Same(TestAllTypes.DefaultInstance, TestAllTypes.CreateBuilder().DefaultInstanceForType);
}
- [TestMethod]
+ [Fact]
public void Accessors()
{
TestAllTypes.Builder builder = TestAllTypes.CreateBuilder();
@@ -127,25 +109,25 @@
TestUtil.AssertAllFieldsSet(message);
}
- [TestMethod]
+ [Fact]
public void SettersRejectNull()
{
TestAllTypes.Builder builder = TestAllTypes.CreateBuilder();
- TestUtil.AssertArgumentNullException(() => builder.SetOptionalString(null));
- TestUtil.AssertArgumentNullException(() => builder.SetOptionalBytes(null));
- TestUtil.AssertArgumentNullException(
+ Assert.Throws<ArgumentNullException>(() => builder.SetOptionalString(null));
+ Assert.Throws<ArgumentNullException>(() => builder.SetOptionalBytes(null));
+ Assert.Throws<ArgumentNullException>(
() => builder.SetOptionalNestedMessage((TestAllTypes.Types.NestedMessage) null));
- TestUtil.AssertArgumentNullException(
+ Assert.Throws<ArgumentNullException>(
() => builder.SetOptionalNestedMessage((TestAllTypes.Types.NestedMessage.Builder) null));
- TestUtil.AssertArgumentNullException(() => builder.AddRepeatedString(null));
- TestUtil.AssertArgumentNullException(() => builder.AddRepeatedBytes(null));
- TestUtil.AssertArgumentNullException(
+ Assert.Throws<ArgumentNullException>(() => builder.AddRepeatedString(null));
+ Assert.Throws<ArgumentNullException>(() => builder.AddRepeatedBytes(null));
+ Assert.Throws<ArgumentNullException>(
() => builder.AddRepeatedNestedMessage((TestAllTypes.Types.NestedMessage) null));
- TestUtil.AssertArgumentNullException(
+ Assert.Throws<ArgumentNullException>(
() => builder.AddRepeatedNestedMessage((TestAllTypes.Types.NestedMessage.Builder) null));
}
- [TestMethod]
+ [Fact]
public void RepeatedSetters()
{
TestAllTypes.Builder builder = TestAllTypes.CreateBuilder();
@@ -155,7 +137,7 @@
TestUtil.AssertRepeatedFieldsModified(message);
}
- [TestMethod]
+ [Fact]
public void RepeatedAppend()
{
TestAllTypes.Builder builder = TestAllTypes.CreateBuilder();
@@ -169,26 +151,26 @@
TestAllTypes message = builder.Build();
TestUtil.AssertEqual(message.RepeatedInt32List, new int[] {1, 2, 3, 4});
TestUtil.AssertEqual(message.RepeatedForeignEnumList, new ForeignEnum[] {ForeignEnum.FOREIGN_BAZ});
- Assert.AreEqual(1, message.RepeatedForeignMessageCount);
- Assert.AreEqual(12, message.GetRepeatedForeignMessage(0).C);
+ Assert.Equal(1, message.RepeatedForeignMessageCount);
+ Assert.Equal(12, message.GetRepeatedForeignMessage(0).C);
}
- [TestMethod]
+ [Fact]
public void RepeatedAppendRejectsNull()
{
TestAllTypes.Builder builder = TestAllTypes.CreateBuilder();
ForeignMessage foreignMessage = ForeignMessage.CreateBuilder().SetC(12).Build();
- TestUtil.AssertArgumentNullException(
+ Assert.Throws<ArgumentNullException>(
() => builder.AddRangeRepeatedForeignMessage(new[] {foreignMessage, null}));
- TestUtil.AssertArgumentNullException(() => builder.AddRangeRepeatedForeignMessage(null));
- TestUtil.AssertArgumentNullException(() => builder.AddRangeRepeatedForeignEnum(null));
- TestUtil.AssertArgumentNullException(() => builder.AddRangeRepeatedString(new[] {"one", null}));
- TestUtil.AssertArgumentNullException(
+ Assert.Throws<ArgumentNullException>(() => builder.AddRangeRepeatedForeignMessage(null));
+ Assert.Throws<ArgumentNullException>(() => builder.AddRangeRepeatedForeignEnum(null));
+ Assert.Throws<ArgumentNullException>(() => builder.AddRangeRepeatedString(new[] {"one", null}));
+ Assert.Throws<ArgumentNullException>(
() => builder.AddRangeRepeatedBytes(new[] {TestUtil.ToBytes("one"), null}));
}
- [TestMethod]
+ [Fact]
public void SettingForeignMessageUsingBuilder()
{
TestAllTypes message = TestAllTypes.CreateBuilder()
@@ -199,10 +181,10 @@
// Create expected version passing foreign message instance explicitly.
.SetOptionalForeignMessage(ForeignMessage.CreateBuilder().SetC(123).Build())
.Build();
- Assert.AreEqual(expectedMessage, message);
+ Assert.Equal(expectedMessage, message);
}
- [TestMethod]
+ [Fact]
public void SettingRepeatedForeignMessageUsingBuilder()
{
TestAllTypes message = TestAllTypes.CreateBuilder()
@@ -213,10 +195,10 @@
// Create expected version passing foreign message instance explicitly.
.AddRepeatedForeignMessage(ForeignMessage.CreateBuilder().SetC(456).Build())
.Build();
- Assert.AreEqual(expectedMessage, message);
+ Assert.Equal(expectedMessage, message);
}
- [TestMethod]
+ [Fact]
public void SettingRepeatedValuesUsingRangeInCollectionInitializer()
{
int[] values = {1, 2, 3};
@@ -224,29 +206,29 @@
{
RepeatedSint32List = {values}
}.Build();
- Assert.IsTrue(Lists.Equals(values, message.RepeatedSint32List));
+ Assert.True(Lists.Equals(values, message.RepeatedSint32List));
}
- [TestMethod]
+ [Fact]
public void SettingRepeatedValuesUsingIndividualValuesInCollectionInitializer()
{
TestAllTypes message = new TestAllTypes.Builder
{
RepeatedSint32List = {6, 7}
}.Build();
- Assert.IsTrue(Lists.Equals(new int[] {6, 7}, message.RepeatedSint32List));
+ Assert.True(Lists.Equals(new int[] {6, 7}, message.RepeatedSint32List));
}
- [TestMethod]
+ [Fact]
public void Defaults()
{
TestUtil.AssertClear(TestAllTypes.DefaultInstance);
TestUtil.AssertClear(TestAllTypes.CreateBuilder().Build());
- Assert.AreEqual("\u1234", TestExtremeDefaultValues.DefaultInstance.Utf8String);
+ Assert.Equal("\u1234", TestExtremeDefaultValues.DefaultInstance.Utf8String);
}
- [TestMethod]
+ [Fact]
public void ReflectionGetters()
{
TestAllTypes.Builder builder = TestAllTypes.CreateBuilder();
@@ -255,7 +237,7 @@
reflectionTester.AssertAllFieldsSetViaReflection(message);
}
- [TestMethod]
+ [Fact]
public void ReflectionSetters()
{
TestAllTypes.Builder builder = TestAllTypes.CreateBuilder();
@@ -264,7 +246,7 @@
TestUtil.AssertAllFieldsSet(message);
}
- [TestMethod]
+ [Fact]
public void ReflectionClear()
{
TestAllTypes.Builder builder = TestAllTypes.CreateBuilder();
@@ -274,14 +256,14 @@
TestUtil.AssertClear(message);
}
- [TestMethod]
+ [Fact]
public void ReflectionSettersRejectNull()
{
TestAllTypes.Builder builder = TestAllTypes.CreateBuilder();
reflectionTester.AssertReflectionSettersRejectNull(builder);
}
- [TestMethod]
+ [Fact]
public void ReflectionRepeatedSetters()
{
TestAllTypes.Builder builder = TestAllTypes.CreateBuilder();
@@ -291,14 +273,14 @@
TestUtil.AssertRepeatedFieldsModified(message);
}
- [TestMethod]
+ [Fact]
public void TestReflectionRepeatedSettersRejectNull()
{
TestAllTypes.Builder builder = TestAllTypes.CreateBuilder();
reflectionTester.AssertReflectionRepeatedSettersRejectNull(builder);
}
- [TestMethod]
+ [Fact]
public void ReflectionDefaults()
{
TestUtil.TestInMultipleCultures(() =>
@@ -313,7 +295,7 @@
// =================================================================
// Extensions.
- [TestMethod]
+ [Fact]
public void ExtensionAccessors()
{
TestAllExtensions.Builder builder = TestAllExtensions.CreateBuilder();
@@ -322,7 +304,7 @@
TestUtil.AssertAllExtensionsSet(message);
}
- [TestMethod]
+ [Fact]
public void ExtensionRepeatedSetters()
{
TestAllExtensions.Builder builder = TestAllExtensions.CreateBuilder();
@@ -332,14 +314,14 @@
TestUtil.AssertRepeatedExtensionsModified(message);
}
- [TestMethod]
+ [Fact]
public void ExtensionDefaults()
{
TestUtil.AssertExtensionsClear(TestAllExtensions.DefaultInstance);
TestUtil.AssertExtensionsClear(TestAllExtensions.CreateBuilder().Build());
}
- [TestMethod]
+ [Fact]
public void ExtensionReflectionGetters()
{
TestAllExtensions.Builder builder = TestAllExtensions.CreateBuilder();
@@ -348,7 +330,7 @@
extensionsReflectionTester.AssertAllFieldsSetViaReflection(message);
}
- [TestMethod]
+ [Fact]
public void ExtensionReflectionSetters()
{
TestAllExtensions.Builder builder = TestAllExtensions.CreateBuilder();
@@ -357,14 +339,14 @@
TestUtil.AssertAllExtensionsSet(message);
}
- [TestMethod]
+ [Fact]
public void ExtensionReflectionSettersRejectNull()
{
TestAllExtensions.Builder builder = TestAllExtensions.CreateBuilder();
extensionsReflectionTester.AssertReflectionSettersRejectNull(builder);
}
- [TestMethod]
+ [Fact]
public void ExtensionReflectionRepeatedSetters()
{
TestAllExtensions.Builder builder = TestAllExtensions.CreateBuilder();
@@ -374,14 +356,14 @@
TestUtil.AssertRepeatedExtensionsModified(message);
}
- [TestMethod]
+ [Fact]
public void ExtensionReflectionRepeatedSettersRejectNull()
{
TestAllExtensions.Builder builder = TestAllExtensions.CreateBuilder();
extensionsReflectionTester.AssertReflectionRepeatedSettersRejectNull(builder);
}
- [TestMethod]
+ [Fact]
public void ExtensionReflectionDefaults()
{
TestUtil.TestInMultipleCultures(() =>
@@ -393,33 +375,33 @@
});
}
- [TestMethod]
+ [Fact]
public void ClearExtension()
{
// ClearExtension() is not actually used in TestUtil, so try it manually.
- Assert.IsFalse(TestAllExtensions.CreateBuilder()
+ Assert.False(TestAllExtensions.CreateBuilder()
.SetExtension(Unittest.OptionalInt32Extension, 1)
.ClearExtension(Unittest.OptionalInt32Extension)
.HasExtension(Unittest.OptionalInt32Extension));
- Assert.AreEqual(0, TestAllExtensions.CreateBuilder()
+ Assert.Equal(0, TestAllExtensions.CreateBuilder()
.AddExtension(Unittest.RepeatedInt32Extension, 1)
.ClearExtension(Unittest.RepeatedInt32Extension)
.GetExtensionCount(Unittest.RepeatedInt32Extension));
}
- [TestMethod]
+ [Fact]
public void ExtensionMergeFrom()
{
TestAllExtensions original = TestAllExtensions.CreateBuilder()
.SetExtension(Unittest.OptionalInt32Extension, 1).Build();
TestAllExtensions merged =
TestAllExtensions.CreateBuilder().MergeFrom(original).Build();
- Assert.IsTrue((merged.HasExtension(Unittest.OptionalInt32Extension)));
- Assert.AreEqual(1, (int) merged.GetExtension(Unittest.OptionalInt32Extension));
+ Assert.True((merged.HasExtension(Unittest.OptionalInt32Extension)));
+ Assert.Equal(1, (int) merged.GetExtension(Unittest.OptionalInt32Extension));
}
/* Removed multiple files option for the moment
- [TestMethod]
+ [Fact]
public void MultipleFilesOption() {
// We mostly just want to check that things compile.
MessageWithNoOuter message = MessageWithNoOuter.CreateBuilder()
@@ -428,63 +410,63 @@
.SetNestedEnum(MessageWithNoOuter.Types.NestedEnum.BAZ)
.SetForeignEnum(EnumWithNoOuter.BAR)
.Build();
- Assert.AreEqual(message, MessageWithNoOuter.ParseFrom(message.ToByteString()));
+ Assert.Equal(message, MessageWithNoOuter.ParseFrom(message.ToByteString()));
- Assert.AreEqual(MultiFileProto.DescriptorProtoFile, MessageWithNoOuter.DescriptorProtoFile.File);
+ Assert.Equal(MultiFileProto.DescriptorProtoFile, MessageWithNoOuter.DescriptorProtoFile.File);
FieldDescriptor field = MessageWithNoOuter.DescriptorProtoFile.FindDescriptor<FieldDescriptor>("foreign_enum");
- Assert.AreEqual(MultiFileProto.DescriptorProtoFile.FindTypeByName<EnumDescriptor>("EnumWithNoOuter")
+ Assert.Equal(MultiFileProto.DescriptorProtoFile.FindTypeByName<EnumDescriptor>("EnumWithNoOuter")
.FindValueByNumber((int)EnumWithNoOuter.BAR), message[field]);
- Assert.AreEqual(MultiFileProto.DescriptorProtoFile, ServiceWithNoOuter.DescriptorProtoFile.File);
+ Assert.Equal(MultiFileProto.DescriptorProtoFile, ServiceWithNoOuter.DescriptorProtoFile.File);
- Assert.IsFalse(TestAllExtensions.DefaultInstance.HasExtension(MultiFileProto.ExtensionWithOuter));
+ Assert.False(TestAllExtensions.DefaultInstance.HasExtension(MultiFileProto.ExtensionWithOuter));
}*/
- [TestMethod]
+ [Fact]
public void OptionalFieldWithRequiredSubfieldsOptimizedForSize()
{
TestOptionalOptimizedForSize message = TestOptionalOptimizedForSize.DefaultInstance;
- Assert.IsTrue(message.IsInitialized);
+ Assert.True(message.IsInitialized);
message = TestOptionalOptimizedForSize.CreateBuilder().SetO(
TestRequiredOptimizedForSize.CreateBuilder().BuildPartial()
).BuildPartial();
- Assert.IsFalse(message.IsInitialized);
+ Assert.False(message.IsInitialized);
message = TestOptionalOptimizedForSize.CreateBuilder().SetO(
TestRequiredOptimizedForSize.CreateBuilder().SetX(5).BuildPartial()
).BuildPartial();
- Assert.IsTrue(message.IsInitialized);
+ Assert.True(message.IsInitialized);
}
- [TestMethod]
+ [Fact]
public void OptimizedForSizeMergeUsesAllFieldsFromTarget()
{
TestOptimizedForSize withFieldSet = new TestOptimizedForSize.Builder {I = 10}.Build();
TestOptimizedForSize.Builder builder = new TestOptimizedForSize.Builder();
builder.MergeFrom(withFieldSet);
TestOptimizedForSize built = builder.Build();
- Assert.AreEqual(10, built.I);
+ Assert.Equal(10, built.I);
}
- [TestMethod]
+ [Fact]
public void UninitializedExtensionInOptimizedForSizeMakesMessageUninitialized()
{
TestOptimizedForSize.Builder builder = new TestOptimizedForSize.Builder();
builder.SetExtension(TestOptimizedForSize.TestExtension2,
new TestRequiredOptimizedForSize.Builder().BuildPartial());
- Assert.IsFalse(builder.IsInitialized);
- Assert.IsFalse(builder.BuildPartial().IsInitialized);
+ Assert.False(builder.IsInitialized);
+ Assert.False(builder.BuildPartial().IsInitialized);
builder = new TestOptimizedForSize.Builder();
builder.SetExtension(TestOptimizedForSize.TestExtension2,
new TestRequiredOptimizedForSize.Builder {X = 10}.BuildPartial());
- Assert.IsTrue(builder.IsInitialized);
- Assert.IsTrue(builder.BuildPartial().IsInitialized);
+ Assert.True(builder.IsInitialized);
+ Assert.True(builder.BuildPartial().IsInitialized);
}
- [TestMethod]
+ [Fact]
public void ToBuilder()
{
TestAllTypes.Builder builder = TestAllTypes.CreateBuilder();
@@ -493,40 +475,40 @@
TestUtil.AssertAllFieldsSet(message.ToBuilder().Build());
}
- [TestMethod]
+ [Fact]
public void FieldConstantValues()
{
- Assert.AreEqual(TestAllTypes.Types.NestedMessage.BbFieldNumber, 1);
- Assert.AreEqual(TestAllTypes.OptionalInt32FieldNumber, 1);
- Assert.AreEqual(TestAllTypes.OptionalGroupFieldNumber, 16);
- Assert.AreEqual(TestAllTypes.OptionalNestedMessageFieldNumber, 18);
- Assert.AreEqual(TestAllTypes.OptionalNestedEnumFieldNumber, 21);
- Assert.AreEqual(TestAllTypes.RepeatedInt32FieldNumber, 31);
- Assert.AreEqual(TestAllTypes.RepeatedGroupFieldNumber, 46);
- Assert.AreEqual(TestAllTypes.RepeatedNestedMessageFieldNumber, 48);
- Assert.AreEqual(TestAllTypes.RepeatedNestedEnumFieldNumber, 51);
+ Assert.Equal(TestAllTypes.Types.NestedMessage.BbFieldNumber, 1);
+ Assert.Equal(TestAllTypes.OptionalInt32FieldNumber, 1);
+ Assert.Equal(TestAllTypes.OptionalGroupFieldNumber, 16);
+ Assert.Equal(TestAllTypes.OptionalNestedMessageFieldNumber, 18);
+ Assert.Equal(TestAllTypes.OptionalNestedEnumFieldNumber, 21);
+ Assert.Equal(TestAllTypes.RepeatedInt32FieldNumber, 31);
+ Assert.Equal(TestAllTypes.RepeatedGroupFieldNumber, 46);
+ Assert.Equal(TestAllTypes.RepeatedNestedMessageFieldNumber, 48);
+ Assert.Equal(TestAllTypes.RepeatedNestedEnumFieldNumber, 51);
}
- [TestMethod]
+ [Fact]
public void ExtensionConstantValues()
{
- Assert.AreEqual(TestRequired.SingleFieldNumber, 1000);
- Assert.AreEqual(TestRequired.MultiFieldNumber, 1001);
- Assert.AreEqual(Unittest.OptionalInt32ExtensionFieldNumber, 1);
- Assert.AreEqual(Unittest.OptionalGroupExtensionFieldNumber, 16);
- Assert.AreEqual(Unittest.OptionalNestedMessageExtensionFieldNumber, 18);
- Assert.AreEqual(Unittest.OptionalNestedEnumExtensionFieldNumber, 21);
- Assert.AreEqual(Unittest.RepeatedInt32ExtensionFieldNumber, 31);
- Assert.AreEqual(Unittest.RepeatedGroupExtensionFieldNumber, 46);
- Assert.AreEqual(Unittest.RepeatedNestedMessageExtensionFieldNumber, 48);
- Assert.AreEqual(Unittest.RepeatedNestedEnumExtensionFieldNumber, 51);
+ Assert.Equal(TestRequired.SingleFieldNumber, 1000);
+ Assert.Equal(TestRequired.MultiFieldNumber, 1001);
+ Assert.Equal(Unittest.OptionalInt32ExtensionFieldNumber, 1);
+ Assert.Equal(Unittest.OptionalGroupExtensionFieldNumber, 16);
+ Assert.Equal(Unittest.OptionalNestedMessageExtensionFieldNumber, 18);
+ Assert.Equal(Unittest.OptionalNestedEnumExtensionFieldNumber, 21);
+ Assert.Equal(Unittest.RepeatedInt32ExtensionFieldNumber, 31);
+ Assert.Equal(Unittest.RepeatedGroupExtensionFieldNumber, 46);
+ Assert.Equal(Unittest.RepeatedNestedMessageExtensionFieldNumber, 48);
+ Assert.Equal(Unittest.RepeatedNestedEnumExtensionFieldNumber, 51);
}
- [TestMethod]
+ [Fact]
public void EmptyPackedValue()
{
TestPackedTypes empty = new TestPackedTypes.Builder().Build();
- Assert.AreEqual(0, empty.SerializedSize);
+ Assert.Equal(0, empty.SerializedSize);
}
}
}
\ No newline at end of file
diff --git a/csharp/src/ProtocolBuffers.Test/IssuesTest.cs b/csharp/src/ProtocolBuffers.Test/IssuesTest.cs
index a80021c..afd93f8 100644
--- a/csharp/src/ProtocolBuffers.Test/IssuesTest.cs
+++ b/csharp/src/ProtocolBuffers.Test/IssuesTest.cs
@@ -35,13 +35,9 @@
#endregion
-using System;
-using System.Collections.Generic;
-using Google.ProtocolBuffers.Collections;
using Google.ProtocolBuffers.Descriptors;
-using Google.ProtocolBuffers.TestProtos;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
using UnitTest.Issues.TestProtos;
+using Xunit;
namespace Google.ProtocolBuffers
@@ -49,17 +45,16 @@
/// <summary>
/// Tests for issues which aren't easily compartmentalized into other unit tests.
/// </summary>
- [TestClass]
public class IssuesTest
{
// Issue 45
- [TestMethod]
+ [Fact]
public void FieldCalledItem()
{
ItemField message = new ItemField.Builder { Item = 3 }.Build();
FieldDescriptor field = ItemField.Descriptor.FindFieldByName("item");
- Assert.IsNotNull(field);
- Assert.AreEqual(3, (int)message[field]);
+ Assert.NotNull(field);
+ Assert.Equal(3, (int)message[field]);
}
}
}
diff --git a/csharp/src/ProtocolBuffers.Test/MessageStreamIteratorTest.cs b/csharp/src/ProtocolBuffers.Test/MessageStreamIteratorTest.cs
index 78f059f..7304861 100644
--- a/csharp/src/ProtocolBuffers.Test/MessageStreamIteratorTest.cs
+++ b/csharp/src/ProtocolBuffers.Test/MessageStreamIteratorTest.cs
@@ -37,28 +37,27 @@
using System.Collections.Generic;
using System.IO;
using Google.ProtocolBuffers.TestProtos;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Xunit;
using NestedMessage = Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage;
namespace Google.ProtocolBuffers
{
- [TestClass]
public class MessageStreamIteratorTest
{
- [TestMethod]
+ [Fact]
public void ThreeMessagesInMemory()
{
MemoryStream stream = new MemoryStream(MessageStreamWriterTest.ThreeMessageData);
IEnumerable<NestedMessage> iterator = MessageStreamIterator<NestedMessage>.FromStreamProvider(() => stream);
List<NestedMessage> messages = new List<NestedMessage>(iterator);
- Assert.AreEqual(3, messages.Count);
- Assert.AreEqual(5, messages[0].Bb);
- Assert.AreEqual(1500, messages[1].Bb);
- Assert.IsFalse(messages[2].HasBb);
+ Assert.Equal(3, messages.Count);
+ Assert.Equal(5, messages[0].Bb);
+ Assert.Equal(1500, messages[1].Bb);
+ Assert.False(messages[2].HasBb);
}
- [TestMethod]
+ [Fact]
public void ManyMessagesShouldNotTriggerSizeAlert()
{
int messageSize = TestUtil.GetAllSet().SerializedSize;
@@ -84,7 +83,7 @@
count++;
TestUtil.AssertAllFieldsSet(message);
}
- Assert.AreEqual(correctCount, count);
+ Assert.Equal(correctCount, count);
}
}
}
diff --git a/csharp/src/ProtocolBuffers.Test/MessageStreamWriterTest.cs b/csharp/src/ProtocolBuffers.Test/MessageStreamWriterTest.cs
index 5377252..3bcc5ff 100644
--- a/csharp/src/ProtocolBuffers.Test/MessageStreamWriterTest.cs
+++ b/csharp/src/ProtocolBuffers.Test/MessageStreamWriterTest.cs
@@ -35,12 +35,11 @@
#endregion
using System.IO;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Xunit;
using NestedMessage = Google.ProtocolBuffers.TestProtos.TestAllTypes.Types.NestedMessage;
namespace Google.ProtocolBuffers
{
- [TestClass]
public class MessageStreamWriterTest
{
internal static readonly byte[] ThreeMessageData = new byte[]
@@ -55,7 +54,7 @@
(1 << 3) | 2, 0, // Field 1, no data (third message)
};
- [TestMethod]
+ [Fact]
public void ThreeMessages()
{
NestedMessage message1 = new NestedMessage.Builder {Bb = 5}.Build();
diff --git a/csharp/src/ProtocolBuffers.Test/MessageTest.cs b/csharp/src/ProtocolBuffers.Test/MessageTest.cs
index 8bb0fac..8c8e644 100644
--- a/csharp/src/ProtocolBuffers.Test/MessageTest.cs
+++ b/csharp/src/ProtocolBuffers.Test/MessageTest.cs
@@ -37,7 +37,7 @@
using System.IO;
using Google.ProtocolBuffers.Descriptors;
using Google.ProtocolBuffers.TestProtos;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Xunit;
namespace Google.ProtocolBuffers
{
@@ -45,7 +45,6 @@
/// Miscellaneous tests for message operations that apply to both
/// generated and dynamic messages.
/// </summary>
- [TestClass]
public class MessageTest
{
// =================================================================
@@ -77,12 +76,12 @@
"repeated_string: \"qux\"\n" +
"repeated_string: \"bar\"\n";
- [TestMethod]
+ [Fact]
public void MergeFrom()
{
TestAllTypes result = TestAllTypes.CreateBuilder(MergeDest).MergeFrom(MergeSource).Build();
- Assert.AreEqual(MergeResultText, result.ToString());
+ Assert.Equal(MergeResultText, result.ToString());
}
/// <summary>
@@ -90,20 +89,20 @@
/// As long as they have the same descriptor, this should work, but it is an
/// entirely different code path.
/// </summary>
- [TestMethod]
+ [Fact]
public void MergeFromDynamic()
{
TestAllTypes result = (TestAllTypes) TestAllTypes.CreateBuilder(MergeDest)
.MergeFrom(DynamicMessage.CreateBuilder(MergeSource).Build())
.Build();
- Assert.AreEqual(MergeResultText, result.ToString());
+ Assert.Equal(MergeResultText, result.ToString());
}
/// <summary>
/// Test merging two DynamicMessages.
/// </summary>
- [TestMethod]
+ [Fact]
public void DynamicMergeFrom()
{
DynamicMessage result = (DynamicMessage) DynamicMessage.CreateBuilder(MergeDest)
@@ -112,7 +111,7 @@
DynamicMessage.CreateBuilder(MergeSource).Build())
.Build();
- Assert.AreEqual(MergeResultText, result.ToString());
+ Assert.Equal(MergeResultText, result.ToString());
}
// =================================================================
@@ -127,157 +126,143 @@
C = 3
}.Build();
- [TestMethod]
+ [Fact]
public void Initialization()
{
TestRequired.Builder builder = TestRequired.CreateBuilder();
- Assert.IsFalse(builder.IsInitialized);
+ Assert.False(builder.IsInitialized);
builder.A = 1;
- Assert.IsFalse(builder.IsInitialized);
+ Assert.False(builder.IsInitialized);
builder.B = 1;
- Assert.IsFalse(builder.IsInitialized);
+ Assert.False(builder.IsInitialized);
builder.C = 1;
- Assert.IsTrue(builder.IsInitialized);
+ Assert.True(builder.IsInitialized);
}
- [TestMethod]
+ [Fact]
public void UninitializedBuilderToString()
{
TestRequired.Builder builder = TestRequired.CreateBuilder().SetA(1);
- Assert.AreEqual("a: 1\n", builder.ToString());
+ Assert.Equal("a: 1\n", builder.ToString());
}
- [TestMethod]
+ [Fact]
public void RequiredForeign()
{
TestRequiredForeign.Builder builder = TestRequiredForeign.CreateBuilder();
- Assert.IsTrue(builder.IsInitialized);
+ Assert.True(builder.IsInitialized);
builder.SetOptionalMessage(TestRequiredUninitialized);
- Assert.IsFalse(builder.IsInitialized);
+ Assert.False(builder.IsInitialized);
builder.SetOptionalMessage(TestRequiredInitialized);
- Assert.IsTrue(builder.IsInitialized);
+ Assert.True(builder.IsInitialized);
builder.AddRepeatedMessage(TestRequiredUninitialized);
- Assert.IsFalse(builder.IsInitialized);
+ Assert.False(builder.IsInitialized);
builder.SetRepeatedMessage(0, TestRequiredInitialized);
- Assert.IsTrue(builder.IsInitialized);
+ Assert.True(builder.IsInitialized);
}
- [TestMethod]
+ [Fact]
public void RequiredExtension()
{
TestAllExtensions.Builder builder = TestAllExtensions.CreateBuilder();
- Assert.IsTrue(builder.IsInitialized);
+ Assert.True(builder.IsInitialized);
builder.SetExtension(TestRequired.Single, TestRequiredUninitialized);
- Assert.IsFalse(builder.IsInitialized);
+ Assert.False(builder.IsInitialized);
builder.SetExtension(TestRequired.Single, TestRequiredInitialized);
- Assert.IsTrue(builder.IsInitialized);
+ Assert.True(builder.IsInitialized);
builder.AddExtension(TestRequired.Multi, TestRequiredUninitialized);
- Assert.IsFalse(builder.IsInitialized);
+ Assert.False(builder.IsInitialized);
builder.SetExtension(TestRequired.Multi, 0, TestRequiredInitialized);
- Assert.IsTrue(builder.IsInitialized);
+ Assert.True(builder.IsInitialized);
}
- [TestMethod]
+ [Fact]
public void RequiredDynamic()
{
MessageDescriptor descriptor = TestRequired.Descriptor;
DynamicMessage.Builder builder = DynamicMessage.CreateBuilder(descriptor);
- Assert.IsFalse(builder.IsInitialized);
+ Assert.False(builder.IsInitialized);
builder[descriptor.FindDescriptor<FieldDescriptor>("a")] = 1;
- Assert.IsFalse(builder.IsInitialized);
+ Assert.False(builder.IsInitialized);
builder[descriptor.FindDescriptor<FieldDescriptor>("b")] = 1;
- Assert.IsFalse(builder.IsInitialized);
+ Assert.False(builder.IsInitialized);
builder[descriptor.FindDescriptor<FieldDescriptor>("c")] = 1;
- Assert.IsTrue(builder.IsInitialized);
+ Assert.True(builder.IsInitialized);
}
- [TestMethod]
+ [Fact]
public void RequiredDynamicForeign()
{
MessageDescriptor descriptor = TestRequiredForeign.Descriptor;
DynamicMessage.Builder builder = DynamicMessage.CreateBuilder(descriptor);
- Assert.IsTrue(builder.IsInitialized);
+ Assert.True(builder.IsInitialized);
builder[descriptor.FindDescriptor<FieldDescriptor>("optional_message")] = TestRequiredUninitialized;
- Assert.IsFalse(builder.IsInitialized);
+ Assert.False(builder.IsInitialized);
builder[descriptor.FindDescriptor<FieldDescriptor>("optional_message")] = TestRequiredInitialized;
- Assert.IsTrue(builder.IsInitialized);
+ Assert.True(builder.IsInitialized);
builder.AddRepeatedField(descriptor.FindDescriptor<FieldDescriptor>("repeated_message"),
TestRequiredUninitialized);
- Assert.IsFalse(builder.IsInitialized);
+ Assert.False(builder.IsInitialized);
builder.SetRepeatedField(descriptor.FindDescriptor<FieldDescriptor>("repeated_message"), 0,
TestRequiredInitialized);
- Assert.IsTrue(builder.IsInitialized);
+ Assert.True(builder.IsInitialized);
}
- [TestMethod]
+ [Fact]
public void UninitializedException()
{
- try
- {
- TestRequired.CreateBuilder().Build();
- Assert.Fail("Should have thrown an exception.");
- }
- catch (UninitializedMessageException e)
- {
- Assert.AreEqual("Message missing required fields: a, b, c", e.Message);
- }
+ var e = Assert.Throws<UninitializedMessageException>(() => TestRequired.CreateBuilder().Build());
+ Assert.Equal("Message missing required fields: a, b, c", e.Message);
}
- [TestMethod]
+ [Fact]
public void BuildPartial()
{
// We're mostly testing that no exception is thrown.
TestRequired message = TestRequired.CreateBuilder().BuildPartial();
- Assert.IsFalse(message.IsInitialized);
+ Assert.False(message.IsInitialized);
}
- [TestMethod]
+ [Fact]
public void NestedUninitializedException()
{
- try
- {
- TestRequiredForeign.CreateBuilder()
+ var e = Assert.Throws<UninitializedMessageException>(() => TestRequiredForeign.CreateBuilder()
.SetOptionalMessage(TestRequiredUninitialized)
.AddRepeatedMessage(TestRequiredUninitialized)
.AddRepeatedMessage(TestRequiredUninitialized)
- .Build();
- Assert.Fail("Should have thrown an exception.");
- }
- catch (UninitializedMessageException e)
- {
- Assert.AreEqual(
- "Message missing required fields: " +
- "optional_message.a, " +
- "optional_message.b, " +
- "optional_message.c, " +
- "repeated_message[0].a, " +
- "repeated_message[0].b, " +
- "repeated_message[0].c, " +
- "repeated_message[1].a, " +
- "repeated_message[1].b, " +
- "repeated_message[1].c",
- e.Message);
- }
+ .Build());
+ Assert.Equal(
+ "Message missing required fields: " +
+ "optional_message.a, " +
+ "optional_message.b, " +
+ "optional_message.c, " +
+ "repeated_message[0].a, " +
+ "repeated_message[0].b, " +
+ "repeated_message[0].c, " +
+ "repeated_message[1].a, " +
+ "repeated_message[1].b, " +
+ "repeated_message[1].c",
+ e.Message);
}
- [TestMethod]
+ [Fact]
public void BuildNestedPartial()
{
// We're mostly testing that no exception is thrown.
@@ -287,24 +272,17 @@
.AddRepeatedMessage(TestRequiredUninitialized)
.AddRepeatedMessage(TestRequiredUninitialized)
.BuildPartial();
- Assert.IsFalse(message.IsInitialized);
+ Assert.False(message.IsInitialized);
}
- [TestMethod]
- public void ParseUnititialized()
+ [Fact]
+ public void ParseUninitialized()
{
- try
- {
- TestRequired.ParseFrom(ByteString.Empty);
- Assert.Fail("Should have thrown an exception.");
- }
- catch (InvalidProtocolBufferException e)
- {
- Assert.AreEqual("Message missing required fields: a, b, c", e.Message);
- }
+ var e = Assert.Throws<InvalidProtocolBufferException>(() => TestRequired.ParseFrom(ByteString.Empty));
+ Assert.Equal("Message missing required fields: a, b, c", e.Message);
}
- [TestMethod]
+ [Fact]
public void ParseNestedUnititialized()
{
ByteString data =
@@ -314,66 +292,45 @@
.AddRepeatedMessage(TestRequiredUninitialized)
.BuildPartial().ToByteString();
- try
- {
- TestRequiredForeign.ParseFrom(data);
- Assert.Fail("Should have thrown an exception.");
- }
- catch (InvalidProtocolBufferException e)
- {
- Assert.AreEqual(
- "Message missing required fields: " +
- "optional_message.a, " +
- "optional_message.b, " +
- "optional_message.c, " +
- "repeated_message[0].a, " +
- "repeated_message[0].b, " +
- "repeated_message[0].c, " +
- "repeated_message[1].a, " +
- "repeated_message[1].b, " +
- "repeated_message[1].c",
- e.Message);
- }
+ var e = Assert.Throws<InvalidProtocolBufferException>(() => TestRequiredForeign.ParseFrom(data));
+ Assert.Equal(
+ "Message missing required fields: " +
+ "optional_message.a, " +
+ "optional_message.b, " +
+ "optional_message.c, " +
+ "repeated_message[0].a, " +
+ "repeated_message[0].b, " +
+ "repeated_message[0].c, " +
+ "repeated_message[1].a, " +
+ "repeated_message[1].b, " +
+ "repeated_message[1].c",
+ e.Message);
}
- [TestMethod]
+ [Fact]
public void DynamicUninitializedException()
{
- try
- {
- DynamicMessage.CreateBuilder(TestRequired.Descriptor).Build();
- Assert.Fail("Should have thrown an exception.");
- }
- catch (UninitializedMessageException e)
- {
- Assert.AreEqual("Message missing required fields: a, b, c", e.Message);
- }
+ var e = Assert.Throws<UninitializedMessageException>(() => DynamicMessage.CreateBuilder(TestRequired.Descriptor).Build());
+ Assert.Equal("Message missing required fields: a, b, c", e.Message);
}
- [TestMethod]
+ [Fact]
public void DynamicBuildPartial()
{
// We're mostly testing that no exception is thrown.
DynamicMessage message = DynamicMessage.CreateBuilder(TestRequired.Descriptor).BuildPartial();
- Assert.IsFalse(message.Initialized);
+ Assert.False(message.Initialized);
}
- [TestMethod]
+ [Fact]
public void DynamicParseUnititialized()
{
- try
- {
- MessageDescriptor descriptor = TestRequired.Descriptor;
- DynamicMessage.ParseFrom(descriptor, ByteString.Empty);
- Assert.Fail("Should have thrown an exception.");
- }
- catch (InvalidProtocolBufferException e)
- {
- Assert.AreEqual("Message missing required fields: a, b, c", e.Message);
- }
+ MessageDescriptor descriptor = TestRequired.Descriptor;
+ var e = Assert.Throws<InvalidProtocolBufferException>(() => DynamicMessage.ParseFrom(descriptor, ByteString.Empty));
+ Assert.Equal("Message missing required fields: a, b, c", e.Message);
}
- [TestMethod]
+ [Fact]
public void PackedTypesWrittenDirectlyToStream()
{
TestPackedTypes message = new TestPackedTypes.Builder {PackedInt32List = {0, 1, 2}}.Build();
@@ -381,7 +338,7 @@
message.WriteTo(stream);
stream.Position = 0;
TestPackedTypes readMessage = TestPackedTypes.ParseFrom(stream);
- Assert.AreEqual(message, readMessage);
+ Assert.Equal(message, readMessage);
}
}
}
\ No newline at end of file
diff --git a/csharp/src/ProtocolBuffers.Test/MessageUtilTest.cs b/csharp/src/ProtocolBuffers.Test/MessageUtilTest.cs
index 4c33dbb..186d939 100644
--- a/csharp/src/ProtocolBuffers.Test/MessageUtilTest.cs
+++ b/csharp/src/ProtocolBuffers.Test/MessageUtilTest.cs
@@ -36,52 +36,47 @@
using System;
using Google.ProtocolBuffers.TestProtos;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Xunit;
namespace Google.ProtocolBuffers
{
- [TestClass]
public class MessageUtilTest
{
- [TestMethod]
- [ExpectedException(typeof(ArgumentNullException))]
+ [Fact]
public void NullTypeName()
{
- MessageUtil.GetDefaultMessage((string) null);
+ Assert.Throws<ArgumentNullException>(() => MessageUtil.GetDefaultMessage((string) null));
}
- [TestMethod]
- [ExpectedException(typeof(ArgumentException))]
+ [Fact]
public void InvalidTypeName()
{
- MessageUtil.GetDefaultMessage("invalidtypename");
+ Assert.Throws<ArgumentException>(() => MessageUtil.GetDefaultMessage("invalidtypename"));
}
- [TestMethod]
+ [Fact]
public void ValidTypeName()
{
- Assert.AreSame(TestAllTypes.DefaultInstance,
+ Assert.Same(TestAllTypes.DefaultInstance,
MessageUtil.GetDefaultMessage(typeof(TestAllTypes).AssemblyQualifiedName));
}
- [TestMethod]
- [ExpectedException(typeof(ArgumentNullException))]
+ [Fact]
public void NullType()
{
- MessageUtil.GetDefaultMessage((Type) null);
+ Assert.Throws<ArgumentNullException>(() => MessageUtil.GetDefaultMessage((Type)null));
}
- [TestMethod]
- [ExpectedException(typeof(ArgumentException))]
+ [Fact]
public void NonMessageType()
{
- MessageUtil.GetDefaultMessage(typeof(string));
+ Assert.Throws<ArgumentException>(() => MessageUtil.GetDefaultMessage(typeof(string)));
}
- [TestMethod]
+ [Fact]
public void ValidType()
{
- Assert.AreSame(TestAllTypes.DefaultInstance, MessageUtil.GetDefaultMessage(typeof(TestAllTypes)));
+ Assert.Same(TestAllTypes.DefaultInstance, MessageUtil.GetDefaultMessage(typeof(TestAllTypes)));
}
}
}
\ No newline at end of file
diff --git a/csharp/src/ProtocolBuffers.Test/NameHelpersTest.cs b/csharp/src/ProtocolBuffers.Test/NameHelpersTest.cs
index 50ab373..034bbf1 100644
--- a/csharp/src/ProtocolBuffers.Test/NameHelpersTest.cs
+++ b/csharp/src/ProtocolBuffers.Test/NameHelpersTest.cs
@@ -34,49 +34,48 @@
#endregion
-using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Xunit;
namespace Google.ProtocolBuffers
{
- [TestClass]
public class NameHelpersTest
{
- [TestMethod]
+ [Fact]
public void UnderscoresToPascalCase()
{
- Assert.AreEqual("FooBar", NameHelpers.UnderscoresToPascalCase("Foo_bar"));
- Assert.AreEqual("FooBar", NameHelpers.UnderscoresToPascalCase("foo_bar"));
- Assert.AreEqual("Foo0Bar", NameHelpers.UnderscoresToPascalCase("Foo0bar"));
- Assert.AreEqual("FooBar", NameHelpers.UnderscoresToPascalCase("Foo_+_Bar"));
+ Assert.Equal("FooBar", NameHelpers.UnderscoresToPascalCase("Foo_bar"));
+ Assert.Equal("FooBar", NameHelpers.UnderscoresToPascalCase("foo_bar"));
+ Assert.Equal("Foo0Bar", NameHelpers.UnderscoresToPascalCase("Foo0bar"));
+ Assert.Equal("FooBar", NameHelpers.UnderscoresToPascalCase("Foo_+_Bar"));
- Assert.AreEqual("Bar", NameHelpers.UnderscoresToPascalCase("__+bar"));
- Assert.AreEqual("Bar", NameHelpers.UnderscoresToPascalCase("bar_"));
- Assert.AreEqual("_0Bar", NameHelpers.UnderscoresToPascalCase("_0bar"));
- Assert.AreEqual("_1Bar", NameHelpers.UnderscoresToPascalCase("_1_bar"));
+ Assert.Equal("Bar", NameHelpers.UnderscoresToPascalCase("__+bar"));
+ Assert.Equal("Bar", NameHelpers.UnderscoresToPascalCase("bar_"));
+ Assert.Equal("_0Bar", NameHelpers.UnderscoresToPascalCase("_0bar"));
+ Assert.Equal("_1Bar", NameHelpers.UnderscoresToPascalCase("_1_bar"));
}
- [TestMethod]
+ [Fact]
public void UnderscoresToCamelCase()
{
- Assert.AreEqual("fooBar", NameHelpers.UnderscoresToCamelCase("Foo_bar"));
- Assert.AreEqual("fooBar", NameHelpers.UnderscoresToCamelCase("foo_bar"));
- Assert.AreEqual("foo0Bar", NameHelpers.UnderscoresToCamelCase("Foo0bar"));
- Assert.AreEqual("fooBar", NameHelpers.UnderscoresToCamelCase("Foo_+_Bar"));
+ Assert.Equal("fooBar", NameHelpers.UnderscoresToCamelCase("Foo_bar"));
+ Assert.Equal("fooBar", NameHelpers.UnderscoresToCamelCase("foo_bar"));
+ Assert.Equal("foo0Bar", NameHelpers.UnderscoresToCamelCase("Foo0bar"));
+ Assert.Equal("fooBar", NameHelpers.UnderscoresToCamelCase("Foo_+_Bar"));
- Assert.AreEqual("bar", NameHelpers.UnderscoresToCamelCase("__+bar"));
- Assert.AreEqual("bar", NameHelpers.UnderscoresToCamelCase("bar_"));
- Assert.AreEqual("_0Bar", NameHelpers.UnderscoresToCamelCase("_0bar"));
- Assert.AreEqual("_1Bar", NameHelpers.UnderscoresToCamelCase("_1_bar"));
+ Assert.Equal("bar", NameHelpers.UnderscoresToCamelCase("__+bar"));
+ Assert.Equal("bar", NameHelpers.UnderscoresToCamelCase("bar_"));
+ Assert.Equal("_0Bar", NameHelpers.UnderscoresToCamelCase("_0bar"));
+ Assert.Equal("_1Bar", NameHelpers.UnderscoresToCamelCase("_1_bar"));
}
- [TestMethod]
+ [Fact]
public void StripSuffix()
{
string text = "FooBar";
- Assert.IsFalse(NameHelpers.StripSuffix(ref text, "Foo"));
- Assert.AreEqual("FooBar", text);
- Assert.IsTrue(NameHelpers.StripSuffix(ref text, "Bar"));
- Assert.AreEqual("Foo", text);
+ Assert.False(NameHelpers.StripSuffix(ref text, "Foo"));
+ Assert.Equal("FooBar", text);
+ Assert.True(NameHelpers.StripSuffix(ref text, "Bar"));
+ Assert.Equal("Foo", text);
}
}
}
\ No newline at end of file
diff --git a/csharp/src/ProtocolBuffers.Test/ProtocolBuffers.Test.CF20.csproj b/csharp/src/ProtocolBuffers.Test/ProtocolBuffers.Test.CF20.csproj
deleted file mode 100644
index 9ac3eaf..0000000
--- a/csharp/src/ProtocolBuffers.Test/ProtocolBuffers.Test.CF20.csproj
+++ /dev/null
@@ -1,190 +0,0 @@
-<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <EnvironmentFlavor>COMPACT_FRAMEWORK</EnvironmentFlavor>
- <EnvironmentTemplate>CF20</EnvironmentTemplate>
- <EnvironmentProjectType>TEST</EnvironmentProjectType>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{DD01ED24-3750-4567-9A23-1DB676A15610}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>Google.ProtocolBuffers</RootNamespace>
- <AssemblyName>Google.ProtocolBuffers.Test</AssemblyName>
- <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- <SignAssembly>true</SignAssembly>
- <AssemblyOriginatorKeyFile>..\..\keys\Google.ProtocolBuffers.snk</AssemblyOriginatorKeyFile>
- <OldToolsVersion>3.5</OldToolsVersion>
- <ProjectTypeGuids>{4D628B5B-2FBC-4AA6-8C16-197242AEB884};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
- <PlatformFamilyName>Smartphone</PlatformFamilyName>
- <PlatformID>f27da329-3269-4191-98e0-c87d3d7f1db9</PlatformID>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\CF20\Debug</OutputPath>
- <IntermediateOutputPath>obj\CF20\Debug\</IntermediateOutputPath>
- <DefineConstants>DEBUG;TRACE;$(EnvironmentFlavor);$(EnvironmentTemplate);NOSERIALIZABLE;NOFILEVERSION;NOEXTENSIONS</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoStdLib>true</NoStdLib>
- <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
- <NoConfig>true</NoConfig>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\CF20\Release</OutputPath>
- <IntermediateOutputPath>obj\CF20\Release\</IntermediateOutputPath>
- <DefineConstants>TRACE;$(EnvironmentFlavor);$(EnvironmentTemplate);NOSERIALIZABLE;NOFILEVERSION;NOEXTENSIONS</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoStdLib>true</NoStdLib>
- <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
- <NoConfig>true</NoConfig>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="mscorlib" />
- <Reference Include="System" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup Condition=" '$(EnvironmentFlavor)' == 'CLIENTPROFILE' ">
- <Reference Include="nunit.framework">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\NUnit\lib\nunit.framework.dll</HintPath>
- </Reference>
- </ItemGroup>
- <ItemGroup Condition=" '$(EnvironmentFlavor)' != 'CLIENTPROFILE' ">
- <Reference Include="Microsoft.Silverlight.Testing, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\Microsoft.Silverlight.Testing\April2010\Microsoft.Silverlight.Testing.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\Microsoft.Silverlight.Testing\April2010\Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.dll</HintPath>
- </Reference>
- </ItemGroup>
- <ItemGroup>
- <Compile Include="..\..\lib\NUnit-config\Microsoft.VisualStudio.TestTools.cs">
- <Link>Microsoft.VisualStudio.TestTools.cs</Link>
- </Compile>
- <Compile Include="AbstractMessageTest.cs" />
- <Compile Include="ByteStringTest.cs" />
- <Compile Include="CodedInputStreamTest.cs" />
- <Compile Include="CodedOutputStreamTest.cs" />
- <Compile Include="Collections\PopsicleListTest.cs" />
- <Compile Include="Compatibility\BinaryCompatibilityTests.cs" />
- <Compile Include="Compatibility\CompatibilityTests.cs" />
- <Compile Include="Compatibility\DictionaryCompatibilityTests.cs" />
- <Compile Include="Compatibility\JsonCompatibilityTests.cs" />
- <Compile Include="Compatibility\TestResources.cs" />
- <Compile Include="Compatibility\TextCompatibilityTests.cs" />
- <Compile Include="Compatibility\XmlCompatibilityTests.cs" />
- <Compile Include="SerializableAttribute.cs" />
- <Compile Include="TestProtos\UnitTestExtrasProtoFile.cs" />
- <Compile Include="TestResources.cs" />
- <Compile Include="TestRpcForMimeTypes.cs" />
- <Compile Include="TestReaderForUrlEncoded.cs" />
- <Compile Include="CSharpOptionsTest.cs" />
- <Compile Include="DeprecatedMemberTest.cs" />
- <Compile Include="DescriptorsTest.cs" />
- <Compile Include="Descriptors\MessageDescriptorTest.cs" />
- <Compile Include="DynamicMessageTest.cs" />
- <Compile Include="ExtendableMessageTest.cs" />
- <Compile Include="GeneratedBuilderTest.cs" />
- <Compile Include="GeneratedMessageTest.cs" />
- <Compile Include="IssuesTest.cs" />
- <Compile Include="MessageStreamIteratorTest.cs" />
- <Compile Include="MessageStreamWriterTest.cs" />
- <Compile Include="MessageTest.cs" />
- <Compile Include="MessageUtilTest.cs" />
- <Compile Include="NameHelpersTest.cs" />
- <Compile Include="Properties\AssemblyInfo.cs" />
- <Compile Include="ReflectionTester.cs" />
- <Compile Include="ReusableBuilderTest.cs" />
- <Compile Include="SerializableTest.cs" />
- <Compile Include="ServiceTest.cs" />
- <Compile Include="TestCornerCases.cs" />
- <Compile Include="TestMimeMessageFormats.cs" />
- <Compile Include="TestProtos\UnitTestCSharpOptionsProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestCustomOptionsProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestEmbedOptimizeForProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestEmptyProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestExtrasIssuesProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestGenericServices.cs" />
- <Compile Include="TestProtos\UnitTestGoogleSizeProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestGoogleSpeedProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestImportLiteProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestImportProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestMessageSetProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestNoGenericServicesProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestOptimizeForProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestRpcInterop.cs" />
- <Compile Include="TestProtos\UnitTestXmlSerializerTestProtoFile.cs" />
- <Compile Include="TestRpcGenerator.cs" />
- <Compile Include="TestUtil.cs" />
- <Compile Include="TestWriterFormatJson.cs" />
- <Compile Include="TestWriterFormatXml.cs" />
- <Compile Include="TextFormatTest.cs" />
- <Compile Include="UnknownFieldSetTest.cs" />
- <Compile Include="WireFormatTest.cs" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\ProtocolBuffers.Serialization\ProtocolBuffers.Serialization.CF20.csproj">
- <Project>{231391AF-449C-4a39-986C-AD7F270F4750}</Project>
- <Name>ProtocolBuffers.Serialization</Name>
- </ProjectReference>
- <ProjectReference Include="..\ProtocolBuffers\ProtocolBuffers.CF20.csproj">
- <Project>{6908BDCE-D925-43F3-94AC-A531E6DF2591}</Project>
- <Name>ProtocolBuffers</Name>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
- <Visible>False</Visible>
- <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
- <Install>false</Install>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
- <Visible>False</Visible>
- <ProductName>.NET Framework 3.5 SP1</ProductName>
- <Install>true</Install>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
- <Visible>False</Visible>
- <ProductName>Windows Installer 3.1</ProductName>
- <Install>true</Install>
- </BootstrapperPackage>
- </ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="Compatibility\google_message1.dat" />
- <EmbeddedResource Include="Compatibility\google_message2.dat" />
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets" />
- <ProjectExtensions>
- <VisualStudio>
- <FlavorProperties GUID="{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}">
- <HostingProcess disable="1" />
- </FlavorProperties>
- </VisualStudio>
- </ProjectExtensions>
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
- <PropertyGroup Condition=" '$(EnvironmentFlavor)' == 'CLIENTPROFILE' ">
- <StartAction>Program</StartAction>
- <StartProgram>$(ProjectDir)..\..\lib\NUnit\tools\nunit-console.exe</StartProgram>
- <StartArguments>/nologo /noshadow /labels /wait $(AssemblyName).dll</StartArguments>
- <StartWorkingDirectory>$(ProjectDir)$(OutputPath)</StartWorkingDirectory>
- </PropertyGroup>
-</Project>
\ No newline at end of file
diff --git a/csharp/src/ProtocolBuffers.Test/ProtocolBuffers.Test.CF35.csproj b/csharp/src/ProtocolBuffers.Test/ProtocolBuffers.Test.CF35.csproj
deleted file mode 100644
index 0c6344e..0000000
--- a/csharp/src/ProtocolBuffers.Test/ProtocolBuffers.Test.CF35.csproj
+++ /dev/null
@@ -1,191 +0,0 @@
-<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <EnvironmentFlavor>COMPACT_FRAMEWORK</EnvironmentFlavor>
- <EnvironmentTemplate>CF35</EnvironmentTemplate>
- <EnvironmentProjectType>TEST</EnvironmentProjectType>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{DD01ED24-3750-4567-9A23-1DB676A15610}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>Google.ProtocolBuffers</RootNamespace>
- <AssemblyName>Google.ProtocolBuffers.Test</AssemblyName>
- <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- <SignAssembly>true</SignAssembly>
- <AssemblyOriginatorKeyFile>..\..\keys\Google.ProtocolBuffers.snk</AssemblyOriginatorKeyFile>
- <OldToolsVersion>3.5</OldToolsVersion>
- <ProjectTypeGuids>{4D628B5B-2FBC-4AA6-8C16-197242AEB884};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
- <PlatformFamilyName>Smartphone</PlatformFamilyName>
- <PlatformID>f27da329-3269-4191-98e0-c87d3d7f1db9</PlatformID>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\CF35\Debug</OutputPath>
- <IntermediateOutputPath>obj\CF35\Debug\</IntermediateOutputPath>
- <DefineConstants>DEBUG;TRACE;$(EnvironmentFlavor);$(EnvironmentTemplate);NOSERIALIZABLE;NOFILEVERSION</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoStdLib>true</NoStdLib>
- <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
- <NoConfig>true</NoConfig>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\CF35\Release</OutputPath>
- <IntermediateOutputPath>obj\CF35\Release\</IntermediateOutputPath>
- <DefineConstants>TRACE;$(EnvironmentFlavor);$(EnvironmentTemplate);NOSERIALIZABLE;NOFILEVERSION</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoStdLib>true</NoStdLib>
- <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
- <NoConfig>true</NoConfig>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="mscorlib" />
- <Reference Include="System" />
- <Reference Include="System.Xml" />
- <Reference Include="System.Core" />
- </ItemGroup>
- <ItemGroup Condition=" '$(EnvironmentFlavor)' == 'CLIENTPROFILE' ">
- <Reference Include="nunit.framework">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\NUnit\lib\nunit.framework.dll</HintPath>
- </Reference>
- </ItemGroup>
- <ItemGroup Condition=" '$(EnvironmentFlavor)' != 'CLIENTPROFILE' ">
- <Reference Include="Microsoft.Silverlight.Testing, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\Microsoft.Silverlight.Testing\April2010\Microsoft.Silverlight.Testing.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\Microsoft.Silverlight.Testing\April2010\Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.dll</HintPath>
- </Reference>
- </ItemGroup>
- <ItemGroup>
- <Compile Include="..\..\lib\NUnit-config\Microsoft.VisualStudio.TestTools.cs">
- <Link>Microsoft.VisualStudio.TestTools.cs</Link>
- </Compile>
- <Compile Include="AbstractMessageTest.cs" />
- <Compile Include="ByteStringTest.cs" />
- <Compile Include="CodedInputStreamTest.cs" />
- <Compile Include="CodedOutputStreamTest.cs" />
- <Compile Include="Collections\PopsicleListTest.cs" />
- <Compile Include="Compatibility\BinaryCompatibilityTests.cs" />
- <Compile Include="Compatibility\CompatibilityTests.cs" />
- <Compile Include="Compatibility\DictionaryCompatibilityTests.cs" />
- <Compile Include="Compatibility\JsonCompatibilityTests.cs" />
- <Compile Include="Compatibility\TestResources.cs" />
- <Compile Include="Compatibility\TextCompatibilityTests.cs" />
- <Compile Include="Compatibility\XmlCompatibilityTests.cs" />
- <Compile Include="SerializableAttribute.cs" />
- <Compile Include="TestProtos\UnitTestExtrasProtoFile.cs" />
- <Compile Include="TestResources.cs" />
- <Compile Include="TestRpcForMimeTypes.cs" />
- <Compile Include="TestReaderForUrlEncoded.cs" />
- <Compile Include="CSharpOptionsTest.cs" />
- <Compile Include="DeprecatedMemberTest.cs" />
- <Compile Include="DescriptorsTest.cs" />
- <Compile Include="Descriptors\MessageDescriptorTest.cs" />
- <Compile Include="DynamicMessageTest.cs" />
- <Compile Include="ExtendableMessageTest.cs" />
- <Compile Include="GeneratedBuilderTest.cs" />
- <Compile Include="GeneratedMessageTest.cs" />
- <Compile Include="IssuesTest.cs" />
- <Compile Include="MessageStreamIteratorTest.cs" />
- <Compile Include="MessageStreamWriterTest.cs" />
- <Compile Include="MessageTest.cs" />
- <Compile Include="MessageUtilTest.cs" />
- <Compile Include="NameHelpersTest.cs" />
- <Compile Include="Properties\AssemblyInfo.cs" />
- <Compile Include="ReflectionTester.cs" />
- <Compile Include="ReusableBuilderTest.cs" />
- <Compile Include="SerializableTest.cs" />
- <Compile Include="ServiceTest.cs" />
- <Compile Include="TestCornerCases.cs" />
- <Compile Include="TestMimeMessageFormats.cs" />
- <Compile Include="TestProtos\UnitTestCSharpOptionsProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestCustomOptionsProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestEmbedOptimizeForProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestEmptyProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestExtrasIssuesProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestGenericServices.cs" />
- <Compile Include="TestProtos\UnitTestGoogleSizeProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestGoogleSpeedProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestImportLiteProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestImportProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestMessageSetProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestNoGenericServicesProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestOptimizeForProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestRpcInterop.cs" />
- <Compile Include="TestProtos\UnitTestXmlSerializerTestProtoFile.cs" />
- <Compile Include="TestRpcGenerator.cs" />
- <Compile Include="TestUtil.cs" />
- <Compile Include="TestWriterFormatJson.cs" />
- <Compile Include="TestWriterFormatXml.cs" />
- <Compile Include="TextFormatTest.cs" />
- <Compile Include="UnknownFieldSetTest.cs" />
- <Compile Include="WireFormatTest.cs" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\ProtocolBuffers.Serialization\ProtocolBuffers.Serialization.CF35.csproj">
- <Project>{231391AF-449C-4a39-986C-AD7F270F4750}</Project>
- <Name>ProtocolBuffers.Serialization</Name>
- </ProjectReference>
- <ProjectReference Include="..\ProtocolBuffers\ProtocolBuffers.CF35.csproj">
- <Project>{6908BDCE-D925-43F3-94AC-A531E6DF2591}</Project>
- <Name>ProtocolBuffers</Name>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
- <Visible>False</Visible>
- <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
- <Install>false</Install>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
- <Visible>False</Visible>
- <ProductName>.NET Framework 3.5 SP1</ProductName>
- <Install>true</Install>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
- <Visible>False</Visible>
- <ProductName>Windows Installer 3.1</ProductName>
- <Install>true</Install>
- </BootstrapperPackage>
- </ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="Compatibility\google_message1.dat" />
- <EmbeddedResource Include="Compatibility\google_message2.dat" />
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets" />
- <ProjectExtensions>
- <VisualStudio>
- <FlavorProperties GUID="{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}">
- <HostingProcess disable="1" />
- </FlavorProperties>
- </VisualStudio>
- </ProjectExtensions>
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
- <PropertyGroup Condition=" '$(EnvironmentFlavor)' == 'CLIENTPROFILE' ">
- <StartAction>Program</StartAction>
- <StartProgram>$(ProjectDir)..\..\lib\NUnit\tools\nunit-console.exe</StartProgram>
- <StartArguments>/nologo /noshadow /labels /wait $(AssemblyName).dll</StartArguments>
- <StartWorkingDirectory>$(ProjectDir)$(OutputPath)</StartWorkingDirectory>
- </PropertyGroup>
-</Project>
\ No newline at end of file
diff --git a/csharp/src/ProtocolBuffers.Test/ProtocolBuffers.Test.NET20.csproj b/csharp/src/ProtocolBuffers.Test/ProtocolBuffers.Test.NET20.csproj
deleted file mode 100644
index f0453fa..0000000
--- a/csharp/src/ProtocolBuffers.Test/ProtocolBuffers.Test.NET20.csproj
+++ /dev/null
@@ -1,178 +0,0 @@
-<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <EnvironmentFlavor>CLIENTPROFILE</EnvironmentFlavor>
- <EnvironmentTemplate>NET20</EnvironmentTemplate>
- <EnvironmentProjectType>TEST</EnvironmentProjectType>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{DD01ED24-3750-4567-9A23-1DB676A15610}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>Google.ProtocolBuffers</RootNamespace>
- <AssemblyName>Google.ProtocolBuffers.Test</AssemblyName>
- <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- <SignAssembly>true</SignAssembly>
- <AssemblyOriginatorKeyFile>..\..\keys\Google.ProtocolBuffers.snk</AssemblyOriginatorKeyFile>
- <OldToolsVersion>3.5</OldToolsVersion>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\NET20\Debug</OutputPath>
- <IntermediateOutputPath>obj\NET20\Debug\</IntermediateOutputPath>
- <DefineConstants>DEBUG;TRACE;$(EnvironmentFlavor);$(EnvironmentTemplate);NOEXTENSIONS</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoStdLib>true</NoStdLib>
- <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\NET20\Release</OutputPath>
- <IntermediateOutputPath>obj\NET20\Release\</IntermediateOutputPath>
- <DefineConstants>TRACE;$(EnvironmentFlavor);$(EnvironmentTemplate);NOEXTENSIONS</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoStdLib>true</NoStdLib>
- <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="mscorlib" />
- <Reference Include="System" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup Condition=" '$(EnvironmentFlavor)' == 'CLIENTPROFILE' ">
- <Reference Include="nunit.framework">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\NUnit\lib\nunit.framework.dll</HintPath>
- </Reference>
- </ItemGroup>
- <ItemGroup Condition=" '$(EnvironmentFlavor)' != 'CLIENTPROFILE' ">
- <Reference Include="Microsoft.Silverlight.Testing, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\Microsoft.Silverlight.Testing\April2010\Microsoft.Silverlight.Testing.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\Microsoft.Silverlight.Testing\April2010\Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.dll</HintPath>
- </Reference>
- </ItemGroup>
- <ItemGroup>
- <Compile Include="..\..\lib\NUnit-config\Microsoft.VisualStudio.TestTools.cs">
- <Link>Microsoft.VisualStudio.TestTools.cs</Link>
- </Compile>
- <Compile Include="AbstractMessageTest.cs" />
- <Compile Include="ByteStringTest.cs" />
- <Compile Include="CodedInputStreamTest.cs" />
- <Compile Include="CodedOutputStreamTest.cs" />
- <Compile Include="Collections\PopsicleListTest.cs" />
- <Compile Include="Compatibility\BinaryCompatibilityTests.cs" />
- <Compile Include="Compatibility\CompatibilityTests.cs" />
- <Compile Include="Compatibility\DictionaryCompatibilityTests.cs" />
- <Compile Include="Compatibility\JsonCompatibilityTests.cs" />
- <Compile Include="Compatibility\TestResources.cs" />
- <Compile Include="Compatibility\TextCompatibilityTests.cs" />
- <Compile Include="Compatibility\XmlCompatibilityTests.cs" />
- <Compile Include="SerializableAttribute.cs" />
- <Compile Include="TestProtos\UnitTestExtrasProtoFile.cs" />
- <Compile Include="TestResources.cs" />
- <Compile Include="TestRpcForMimeTypes.cs" />
- <Compile Include="TestReaderForUrlEncoded.cs" />
- <Compile Include="CSharpOptionsTest.cs" />
- <Compile Include="DeprecatedMemberTest.cs" />
- <Compile Include="DescriptorsTest.cs" />
- <Compile Include="Descriptors\MessageDescriptorTest.cs" />
- <Compile Include="DynamicMessageTest.cs" />
- <Compile Include="ExtendableMessageTest.cs" />
- <Compile Include="GeneratedBuilderTest.cs" />
- <Compile Include="GeneratedMessageTest.cs" />
- <Compile Include="IssuesTest.cs" />
- <Compile Include="MessageStreamIteratorTest.cs" />
- <Compile Include="MessageStreamWriterTest.cs" />
- <Compile Include="MessageTest.cs" />
- <Compile Include="MessageUtilTest.cs" />
- <Compile Include="NameHelpersTest.cs" />
- <Compile Include="Properties\AssemblyInfo.cs" />
- <Compile Include="ReflectionTester.cs" />
- <Compile Include="ReusableBuilderTest.cs" />
- <Compile Include="SerializableTest.cs" />
- <Compile Include="ServiceTest.cs" />
- <Compile Include="TestCornerCases.cs" />
- <Compile Include="TestMimeMessageFormats.cs" />
- <Compile Include="TestProtos\UnitTestCSharpOptionsProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestCustomOptionsProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestEmbedOptimizeForProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestEmptyProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestExtrasIssuesProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestGenericServices.cs" />
- <Compile Include="TestProtos\UnitTestGoogleSizeProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestGoogleSpeedProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestImportLiteProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestImportProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestMessageSetProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestNoGenericServicesProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestOptimizeForProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestRpcInterop.cs" />
- <Compile Include="TestProtos\UnitTestXmlSerializerTestProtoFile.cs" />
- <Compile Include="TestRpcGenerator.cs" />
- <Compile Include="TestUtil.cs" />
- <Compile Include="TestWriterFormatJson.cs" />
- <Compile Include="TestWriterFormatXml.cs" />
- <Compile Include="TextFormatTest.cs" />
- <Compile Include="UnknownFieldSetTest.cs" />
- <Compile Include="WireFormatTest.cs" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\ProtocolBuffers.Serialization\ProtocolBuffers.Serialization.NET20.csproj">
- <Project>{231391AF-449C-4a39-986C-AD7F270F4750}</Project>
- <Name>ProtocolBuffers.Serialization</Name>
- </ProjectReference>
- <ProjectReference Include="..\ProtocolBuffers\ProtocolBuffers.NET20.csproj">
- <Project>{6908BDCE-D925-43F3-94AC-A531E6DF2591}</Project>
- <Name>ProtocolBuffers</Name>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
- <Visible>False</Visible>
- <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
- <Install>false</Install>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
- <Visible>False</Visible>
- <ProductName>.NET Framework 3.5 SP1</ProductName>
- <Install>true</Install>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
- <Visible>False</Visible>
- <ProductName>Windows Installer 3.1</ProductName>
- <Install>true</Install>
- </BootstrapperPackage>
- </ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="Compatibility\google_message1.dat" />
- <EmbeddedResource Include="Compatibility\google_message2.dat" />
- </ItemGroup>
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
- <PropertyGroup Condition=" '$(EnvironmentFlavor)' == 'CLIENTPROFILE' ">
- <StartAction>Program</StartAction>
- <StartProgram>$(ProjectDir)..\..\lib\NUnit\tools\nunit-console.exe</StartProgram>
- <StartArguments>/nologo /noshadow /labels /wait $(AssemblyName).dll</StartArguments>
- <StartWorkingDirectory>$(ProjectDir)$(OutputPath)</StartWorkingDirectory>
- </PropertyGroup>
-</Project>
\ No newline at end of file
diff --git a/csharp/src/ProtocolBuffers.Test/ProtocolBuffers.Test.NET35.csproj b/csharp/src/ProtocolBuffers.Test/ProtocolBuffers.Test.NET35.csproj
deleted file mode 100644
index 33630b4..0000000
--- a/csharp/src/ProtocolBuffers.Test/ProtocolBuffers.Test.NET35.csproj
+++ /dev/null
@@ -1,179 +0,0 @@
-<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <EnvironmentFlavor>CLIENTPROFILE</EnvironmentFlavor>
- <EnvironmentTemplate>NET35</EnvironmentTemplate>
- <EnvironmentProjectType>TEST</EnvironmentProjectType>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{DD01ED24-3750-4567-9A23-1DB676A15610}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>Google.ProtocolBuffers</RootNamespace>
- <AssemblyName>Google.ProtocolBuffers.Test</AssemblyName>
- <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- <SignAssembly>true</SignAssembly>
- <AssemblyOriginatorKeyFile>..\..\keys\Google.ProtocolBuffers.snk</AssemblyOriginatorKeyFile>
- <OldToolsVersion>3.5</OldToolsVersion>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\NET35\Debug</OutputPath>
- <IntermediateOutputPath>obj\NET35\Debug\</IntermediateOutputPath>
- <DefineConstants>DEBUG;TRACE;$(EnvironmentFlavor);$(EnvironmentTemplate)</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoStdLib>true</NoStdLib>
- <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\NET35\Release</OutputPath>
- <IntermediateOutputPath>obj\NET35\Release\</IntermediateOutputPath>
- <DefineConstants>TRACE;$(EnvironmentFlavor);$(EnvironmentTemplate)</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoStdLib>true</NoStdLib>
- <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="mscorlib" />
- <Reference Include="System" />
- <Reference Include="System.Xml" />
- <Reference Include="System.Core" />
- </ItemGroup>
- <ItemGroup Condition=" '$(EnvironmentFlavor)' == 'CLIENTPROFILE' ">
- <Reference Include="nunit.framework">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\NUnit\lib\nunit.framework.dll</HintPath>
- </Reference>
- </ItemGroup>
- <ItemGroup Condition=" '$(EnvironmentFlavor)' != 'CLIENTPROFILE' ">
- <Reference Include="Microsoft.Silverlight.Testing, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\Microsoft.Silverlight.Testing\April2010\Microsoft.Silverlight.Testing.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\Microsoft.Silverlight.Testing\April2010\Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.dll</HintPath>
- </Reference>
- </ItemGroup>
- <ItemGroup>
- <Compile Include="..\..\lib\NUnit-config\Microsoft.VisualStudio.TestTools.cs">
- <Link>Microsoft.VisualStudio.TestTools.cs</Link>
- </Compile>
- <Compile Include="AbstractMessageTest.cs" />
- <Compile Include="ByteStringTest.cs" />
- <Compile Include="CodedInputStreamTest.cs" />
- <Compile Include="CodedOutputStreamTest.cs" />
- <Compile Include="Collections\PopsicleListTest.cs" />
- <Compile Include="Compatibility\BinaryCompatibilityTests.cs" />
- <Compile Include="Compatibility\CompatibilityTests.cs" />
- <Compile Include="Compatibility\DictionaryCompatibilityTests.cs" />
- <Compile Include="Compatibility\JsonCompatibilityTests.cs" />
- <Compile Include="Compatibility\TestResources.cs" />
- <Compile Include="Compatibility\TextCompatibilityTests.cs" />
- <Compile Include="Compatibility\XmlCompatibilityTests.cs" />
- <Compile Include="SerializableAttribute.cs" />
- <Compile Include="TestProtos\UnitTestExtrasProtoFile.cs" />
- <Compile Include="TestResources.cs" />
- <Compile Include="TestRpcForMimeTypes.cs" />
- <Compile Include="TestReaderForUrlEncoded.cs" />
- <Compile Include="CSharpOptionsTest.cs" />
- <Compile Include="DeprecatedMemberTest.cs" />
- <Compile Include="DescriptorsTest.cs" />
- <Compile Include="Descriptors\MessageDescriptorTest.cs" />
- <Compile Include="DynamicMessageTest.cs" />
- <Compile Include="ExtendableMessageTest.cs" />
- <Compile Include="GeneratedBuilderTest.cs" />
- <Compile Include="GeneratedMessageTest.cs" />
- <Compile Include="IssuesTest.cs" />
- <Compile Include="MessageStreamIteratorTest.cs" />
- <Compile Include="MessageStreamWriterTest.cs" />
- <Compile Include="MessageTest.cs" />
- <Compile Include="MessageUtilTest.cs" />
- <Compile Include="NameHelpersTest.cs" />
- <Compile Include="Properties\AssemblyInfo.cs" />
- <Compile Include="ReflectionTester.cs" />
- <Compile Include="ReusableBuilderTest.cs" />
- <Compile Include="SerializableTest.cs" />
- <Compile Include="ServiceTest.cs" />
- <Compile Include="TestCornerCases.cs" />
- <Compile Include="TestMimeMessageFormats.cs" />
- <Compile Include="TestProtos\UnitTestCSharpOptionsProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestCustomOptionsProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestEmbedOptimizeForProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestEmptyProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestExtrasIssuesProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestGenericServices.cs" />
- <Compile Include="TestProtos\UnitTestGoogleSizeProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestGoogleSpeedProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestImportLiteProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestImportProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestMessageSetProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestNoGenericServicesProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestOptimizeForProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestRpcInterop.cs" />
- <Compile Include="TestProtos\UnitTestXmlSerializerTestProtoFile.cs" />
- <Compile Include="TestRpcGenerator.cs" />
- <Compile Include="TestUtil.cs" />
- <Compile Include="TestWriterFormatJson.cs" />
- <Compile Include="TestWriterFormatXml.cs" />
- <Compile Include="TextFormatTest.cs" />
- <Compile Include="UnknownFieldSetTest.cs" />
- <Compile Include="WireFormatTest.cs" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\ProtocolBuffers.Serialization\ProtocolBuffers.Serialization.NET35.csproj">
- <Project>{231391AF-449C-4a39-986C-AD7F270F4750}</Project>
- <Name>ProtocolBuffers.Serialization</Name>
- </ProjectReference>
- <ProjectReference Include="..\ProtocolBuffers\ProtocolBuffers.NET35.csproj">
- <Project>{6908BDCE-D925-43F3-94AC-A531E6DF2591}</Project>
- <Name>ProtocolBuffers</Name>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
- <Visible>False</Visible>
- <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
- <Install>false</Install>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
- <Visible>False</Visible>
- <ProductName>.NET Framework 3.5 SP1</ProductName>
- <Install>true</Install>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
- <Visible>False</Visible>
- <ProductName>Windows Installer 3.1</ProductName>
- <Install>true</Install>
- </BootstrapperPackage>
- </ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="Compatibility\google_message1.dat" />
- <EmbeddedResource Include="Compatibility\google_message2.dat" />
- </ItemGroup>
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
- <PropertyGroup Condition=" '$(EnvironmentFlavor)' == 'CLIENTPROFILE' ">
- <StartAction>Program</StartAction>
- <StartProgram>$(ProjectDir)..\..\lib\NUnit\tools\nunit-console.exe</StartProgram>
- <StartArguments>/nologo /noshadow /labels /wait $(AssemblyName).dll</StartArguments>
- <StartWorkingDirectory>$(ProjectDir)$(OutputPath)</StartWorkingDirectory>
- </PropertyGroup>
-</Project>
\ No newline at end of file
diff --git a/csharp/src/ProtocolBuffers.Test/ProtocolBuffers.Test.NET40.csproj b/csharp/src/ProtocolBuffers.Test/ProtocolBuffers.Test.NET40.csproj
deleted file mode 100644
index 74ea721..0000000
--- a/csharp/src/ProtocolBuffers.Test/ProtocolBuffers.Test.NET40.csproj
+++ /dev/null
@@ -1,179 +0,0 @@
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <EnvironmentFlavor>CLIENTPROFILE</EnvironmentFlavor>
- <EnvironmentTemplate>NET40</EnvironmentTemplate>
- <EnvironmentProjectType>TEST</EnvironmentProjectType>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{DD01ED24-3750-4567-9A23-1DB676A15610}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>Google.ProtocolBuffers</RootNamespace>
- <AssemblyName>Google.ProtocolBuffers.Test</AssemblyName>
- <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- <SignAssembly>true</SignAssembly>
- <AssemblyOriginatorKeyFile>..\..\keys\Google.ProtocolBuffers.snk</AssemblyOriginatorKeyFile>
- <OldToolsVersion>3.5</OldToolsVersion>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\NET40\Debug</OutputPath>
- <IntermediateOutputPath>obj\NET40\Debug\</IntermediateOutputPath>
- <DefineConstants>DEBUG;TRACE;$(EnvironmentFlavor);$(EnvironmentTemplate)</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoStdLib>true</NoStdLib>
- <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\NET40\Release</OutputPath>
- <IntermediateOutputPath>obj\NET40\Release\</IntermediateOutputPath>
- <DefineConstants>TRACE;$(EnvironmentFlavor);$(EnvironmentTemplate)</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoStdLib>true</NoStdLib>
- <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="mscorlib" />
- <Reference Include="System" />
- <Reference Include="System.Xml" />
- <Reference Include="System.Core" />
- </ItemGroup>
- <ItemGroup Condition=" '$(EnvironmentFlavor)' == 'CLIENTPROFILE' ">
- <Reference Include="nunit.framework">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\NUnit\lib\nunit.framework.dll</HintPath>
- </Reference>
- </ItemGroup>
- <ItemGroup Condition=" '$(EnvironmentFlavor)' != 'CLIENTPROFILE' ">
- <Reference Include="Microsoft.Silverlight.Testing, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\Microsoft.Silverlight.Testing\April2010\Microsoft.Silverlight.Testing.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\Microsoft.Silverlight.Testing\April2010\Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.dll</HintPath>
- </Reference>
- </ItemGroup>
- <ItemGroup>
- <Compile Include="..\..\lib\NUnit-config\Microsoft.VisualStudio.TestTools.cs">
- <Link>Microsoft.VisualStudio.TestTools.cs</Link>
- </Compile>
- <Compile Include="AbstractMessageTest.cs" />
- <Compile Include="ByteStringTest.cs" />
- <Compile Include="CodedInputStreamTest.cs" />
- <Compile Include="CodedOutputStreamTest.cs" />
- <Compile Include="Collections\PopsicleListTest.cs" />
- <Compile Include="Compatibility\BinaryCompatibilityTests.cs" />
- <Compile Include="Compatibility\CompatibilityTests.cs" />
- <Compile Include="Compatibility\DictionaryCompatibilityTests.cs" />
- <Compile Include="Compatibility\JsonCompatibilityTests.cs" />
- <Compile Include="Compatibility\TestResources.cs" />
- <Compile Include="Compatibility\TextCompatibilityTests.cs" />
- <Compile Include="Compatibility\XmlCompatibilityTests.cs" />
- <Compile Include="SerializableAttribute.cs" />
- <Compile Include="TestProtos\UnitTestExtrasProtoFile.cs" />
- <Compile Include="TestResources.cs" />
- <Compile Include="TestRpcForMimeTypes.cs" />
- <Compile Include="TestReaderForUrlEncoded.cs" />
- <Compile Include="CSharpOptionsTest.cs" />
- <Compile Include="DeprecatedMemberTest.cs" />
- <Compile Include="DescriptorsTest.cs" />
- <Compile Include="Descriptors\MessageDescriptorTest.cs" />
- <Compile Include="DynamicMessageTest.cs" />
- <Compile Include="ExtendableMessageTest.cs" />
- <Compile Include="GeneratedBuilderTest.cs" />
- <Compile Include="GeneratedMessageTest.cs" />
- <Compile Include="IssuesTest.cs" />
- <Compile Include="MessageStreamIteratorTest.cs" />
- <Compile Include="MessageStreamWriterTest.cs" />
- <Compile Include="MessageTest.cs" />
- <Compile Include="MessageUtilTest.cs" />
- <Compile Include="NameHelpersTest.cs" />
- <Compile Include="Properties\AssemblyInfo.cs" />
- <Compile Include="ReflectionTester.cs" />
- <Compile Include="ReusableBuilderTest.cs" />
- <Compile Include="SerializableTest.cs" />
- <Compile Include="ServiceTest.cs" />
- <Compile Include="TestCornerCases.cs" />
- <Compile Include="TestMimeMessageFormats.cs" />
- <Compile Include="TestProtos\UnitTestCSharpOptionsProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestCustomOptionsProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestEmbedOptimizeForProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestEmptyProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestExtrasIssuesProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestGenericServices.cs" />
- <Compile Include="TestProtos\UnitTestGoogleSizeProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestGoogleSpeedProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestImportLiteProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestImportProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestMessageSetProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestNoGenericServicesProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestOptimizeForProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestRpcInterop.cs" />
- <Compile Include="TestProtos\UnitTestXmlSerializerTestProtoFile.cs" />
- <Compile Include="TestRpcGenerator.cs" />
- <Compile Include="TestUtil.cs" />
- <Compile Include="TestWriterFormatJson.cs" />
- <Compile Include="TestWriterFormatXml.cs" />
- <Compile Include="TextFormatTest.cs" />
- <Compile Include="UnknownFieldSetTest.cs" />
- <Compile Include="WireFormatTest.cs" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\ProtocolBuffers.Serialization\ProtocolBuffers.Serialization.NET40.csproj">
- <Project>{231391AF-449C-4a39-986C-AD7F270F4750}</Project>
- <Name>ProtocolBuffers.Serialization</Name>
- </ProjectReference>
- <ProjectReference Include="..\ProtocolBuffers\ProtocolBuffers.NET40.csproj">
- <Project>{6908BDCE-D925-43F3-94AC-A531E6DF2591}</Project>
- <Name>ProtocolBuffers</Name>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
- <Visible>False</Visible>
- <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
- <Install>false</Install>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
- <Visible>False</Visible>
- <ProductName>.NET Framework 3.5 SP1</ProductName>
- <Install>true</Install>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
- <Visible>False</Visible>
- <ProductName>Windows Installer 3.1</ProductName>
- <Install>true</Install>
- </BootstrapperPackage>
- </ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="Compatibility\google_message1.dat" />
- <EmbeddedResource Include="Compatibility\google_message2.dat" />
- </ItemGroup>
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
- <PropertyGroup Condition=" '$(EnvironmentFlavor)' == 'CLIENTPROFILE' ">
- <StartAction>Program</StartAction>
- <StartProgram>$(ProjectDir)..\..\lib\NUnit\tools\nunit-console.exe</StartProgram>
- <StartArguments>/nologo /noshadow /labels /wait $(AssemblyName).dll</StartArguments>
- <StartWorkingDirectory>$(ProjectDir)$(OutputPath)</StartWorkingDirectory>
- </PropertyGroup>
-</Project>
\ No newline at end of file
diff --git a/csharp/src/ProtocolBuffers.Test/ProtocolBuffers.Test.PL40.csproj b/csharp/src/ProtocolBuffers.Test/ProtocolBuffers.Test.PL40.csproj
deleted file mode 100644
index 018cf9d..0000000
--- a/csharp/src/ProtocolBuffers.Test/ProtocolBuffers.Test.PL40.csproj
+++ /dev/null
@@ -1,213 +0,0 @@
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" xmlns:cs="urn:schemas-csharp-project:template">
- <PropertyGroup>
- <EnvironmentFlavor>PORTABLE_LIBRARY</EnvironmentFlavor>
- <EnvironmentTemplate>PL40</EnvironmentTemplate>
- <EnvironmentProjectType>TEST</EnvironmentProjectType>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{DD01ED24-3750-4567-9A23-1DB676A15610}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>Google.ProtocolBuffers</RootNamespace>
- <AssemblyName>Google.ProtocolBuffers.Test</AssemblyName>
- <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- <SignAssembly>true</SignAssembly>
- <AssemblyOriginatorKeyFile>..\..\keys\Google.ProtocolBuffers.snk</AssemblyOriginatorKeyFile>
- <OldToolsVersion>3.5</OldToolsVersion>
- <MinimumVisualStudioVersion>10.0</MinimumVisualStudioVersion>
- <ProjectTypeGuids>{A1591282-1198-4647-A2B1-27E5FF5F6F3B};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
- <TargetFrameworkProfile />
- <ValidateXaml>false</ValidateXaml>
- <ThrowErrorsInValidation>false</ThrowErrorsInValidation>
- <SilverlightApplication>true</SilverlightApplication>
- <XapOutputs>true</XapOutputs>
- <GenerateSilverlightManifest>true</GenerateSilverlightManifest>
- <XapFilename>Google.ProtocolBuffers.Test.xap</XapFilename>
- <SilverlightManifestTemplate>Properties\AppManifest.xml</SilverlightManifestTemplate>
- <SilverlightAppEntry>Google.ProtocolBuffers.App</SilverlightAppEntry>
- <TestPageFileName>TestPage.html</TestPageFileName>
- <CreateTestPage>true</CreateTestPage>
- <SilverlightVersion>v4.0</SilverlightVersion>
- <OutOfBrowserSettingsFile>Properties\OutOfBrowserSettings.xml</OutOfBrowserSettingsFile>
- <EnableOutOfBrowser>true</EnableOutOfBrowser>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\PL40\Debug</OutputPath>
- <IntermediateOutputPath>obj\PL40\Debug\</IntermediateOutputPath>
- <DefineConstants>DEBUG;TRACE;$(EnvironmentFlavor);$(EnvironmentTemplate);NOSERIALIZABLE;NOSORTEDLIST</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoStdLib>true</NoStdLib>
- <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\PL40\Release</OutputPath>
- <IntermediateOutputPath>obj\PL40\Release\</IntermediateOutputPath>
- <DefineConstants>TRACE;$(EnvironmentFlavor);$(EnvironmentTemplate);NOSERIALIZABLE;NOSORTEDLIST</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoStdLib>true</NoStdLib>
- <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="mscorlib" />
- <Reference Include="System" />
- <Reference Include="System.Xml" />
- <Reference Include="System.Core" />
- <Reference Include="System.Windows" />
- <Reference Include="System.Windows.Browser" />
- </ItemGroup>
- <ItemGroup Condition=" '$(EnvironmentFlavor)' == 'CLIENTPROFILE' ">
- <Reference Include="nunit.framework">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\NUnit\lib\nunit.framework.dll</HintPath>
- </Reference>
- </ItemGroup>
- <ItemGroup Condition=" '$(EnvironmentFlavor)' != 'CLIENTPROFILE' ">
- <Reference Include="Microsoft.Silverlight.Testing, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\Microsoft.Silverlight.Testing\April2010\Microsoft.Silverlight.Testing.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\Microsoft.Silverlight.Testing\April2010\Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.dll</HintPath>
- </Reference>
- </ItemGroup>
- <ItemGroup>
- <Compile Include="..\..\lib\NUnit-config\Microsoft.VisualStudio.TestTools.cs">
- <Link>Microsoft.VisualStudio.TestTools.cs</Link>
- </Compile>
- <Compile Include="AbstractMessageTest.cs" />
- <Compile Include="ByteStringTest.cs" />
- <Compile Include="CodedInputStreamTest.cs" />
- <Compile Include="CodedOutputStreamTest.cs" />
- <Compile Include="Collections\PopsicleListTest.cs" />
- <Compile Include="Compatibility\BinaryCompatibilityTests.cs" />
- <Compile Include="Compatibility\CompatibilityTests.cs" />
- <Compile Include="Compatibility\DictionaryCompatibilityTests.cs" />
- <Compile Include="Compatibility\JsonCompatibilityTests.cs" />
- <Compile Include="Compatibility\TestResources.cs" />
- <Compile Include="Compatibility\TextCompatibilityTests.cs" />
- <Compile Include="Compatibility\XmlCompatibilityTests.cs" />
- <Compile Include="SerializableAttribute.cs" />
- <Compile Include="TestProtos\UnitTestExtrasProtoFile.cs" />
- <Compile Include="TestResources.cs" />
- <Compile Include="TestRpcForMimeTypes.cs" />
- <Compile Include="TestReaderForUrlEncoded.cs" />
- <Compile Include="CSharpOptionsTest.cs" />
- <Compile Include="DeprecatedMemberTest.cs" />
- <Compile Include="DescriptorsTest.cs" />
- <Compile Include="Descriptors\MessageDescriptorTest.cs" />
- <Compile Include="DynamicMessageTest.cs" />
- <Compile Include="ExtendableMessageTest.cs" />
- <Compile Include="GeneratedBuilderTest.cs" />
- <Compile Include="GeneratedMessageTest.cs" />
- <Compile Include="IssuesTest.cs" />
- <Compile Include="MessageStreamIteratorTest.cs" />
- <Compile Include="MessageStreamWriterTest.cs" />
- <Compile Include="MessageTest.cs" />
- <Compile Include="MessageUtilTest.cs" />
- <Compile Include="NameHelpersTest.cs" />
- <Compile Include="Properties\AssemblyInfo.cs" />
- <Compile Include="ReflectionTester.cs" />
- <Compile Include="ReusableBuilderTest.cs" />
- <Compile Include="SerializableTest.cs" />
- <Compile Include="ServiceTest.cs" />
- <Compile Include="TestCornerCases.cs" />
- <Compile Include="TestMimeMessageFormats.cs" />
- <Compile Include="TestProtos\UnitTestCSharpOptionsProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestCustomOptionsProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestEmbedOptimizeForProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestEmptyProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestExtrasIssuesProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestGenericServices.cs" />
- <Compile Include="TestProtos\UnitTestGoogleSizeProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestGoogleSpeedProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestImportLiteProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestImportProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestMessageSetProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestNoGenericServicesProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestOptimizeForProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestRpcInterop.cs" />
- <Compile Include="TestProtos\UnitTestXmlSerializerTestProtoFile.cs" />
- <Compile Include="TestRpcGenerator.cs" />
- <Compile Include="TestUtil.cs" />
- <Compile Include="TestWriterFormatJson.cs" />
- <Compile Include="TestWriterFormatXml.cs" />
- <Compile Include="TextFormatTest.cs" />
- <Compile Include="UnknownFieldSetTest.cs" />
- <Compile Include="WireFormatTest.cs" />
- <Compile Include="App.xaml.cs">
- <DependentUpon>App.xaml</DependentUpon>
- </Compile>
- <None Include="Properties\AppManifest.xml" />
- <None Include="Properties\OutOfBrowserSettings.xml" />
- <ApplicationDefinition Include="App.xaml">
- <Generator>MSBuild:Compile</Generator>
- <SubType>Designer</SubType>
- </ApplicationDefinition>
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\ProtocolBuffers.Serialization\ProtocolBuffers.Serialization.PL40.csproj">
- <Project>{231391AF-449C-4a39-986C-AD7F270F4750}</Project>
- <Name>ProtocolBuffers.Serialization</Name>
- </ProjectReference>
- <ProjectReference Include="..\ProtocolBuffers\ProtocolBuffers.PL40.csproj">
- <Project>{6908BDCE-D925-43F3-94AC-A531E6DF2591}</Project>
- <Name>ProtocolBuffers</Name>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
- <Visible>False</Visible>
- <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
- <Install>false</Install>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
- <Visible>False</Visible>
- <ProductName>.NET Framework 3.5 SP1</ProductName>
- <Install>true</Install>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
- <Visible>False</Visible>
- <ProductName>Windows Installer 3.1</ProductName>
- <Install>true</Install>
- </BootstrapperPackage>
- </ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="Compatibility\google_message1.dat" />
- <EmbeddedResource Include="Compatibility\google_message2.dat" />
- </ItemGroup>
- <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets" />
- <ProjectExtensions>
- <VisualStudio>
- <FlavorProperties GUID="{A1591282-1198-4647-A2B1-27E5FF5F6F3B}">
- <SilverlightProjectProperties />
- </FlavorProperties>
- </VisualStudio>
- </ProjectExtensions>
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
- <PropertyGroup Condition=" '$(EnvironmentFlavor)' == 'CLIENTPROFILE' ">
- <StartAction>Program</StartAction>
- <StartProgram>$(ProjectDir)..\..\lib\NUnit\tools\nunit-console.exe</StartProgram>
- <StartArguments>/nologo /noshadow /labels /wait $(AssemblyName).dll</StartArguments>
- <StartWorkingDirectory>$(ProjectDir)$(OutputPath)</StartWorkingDirectory>
- </PropertyGroup>
-</Project>
\ No newline at end of file
diff --git a/csharp/src/ProtocolBuffers.Test/ProtocolBuffers.Test.SL20.csproj b/csharp/src/ProtocolBuffers.Test/ProtocolBuffers.Test.SL20.csproj
deleted file mode 100644
index e54fa25..0000000
--- a/csharp/src/ProtocolBuffers.Test/ProtocolBuffers.Test.SL20.csproj
+++ /dev/null
@@ -1,214 +0,0 @@
-<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" xmlns:cs="urn:schemas-csharp-project:template">
- <PropertyGroup>
- <EnvironmentFlavor>SILVERLIGHT</EnvironmentFlavor>
- <EnvironmentTemplate>SL20</EnvironmentTemplate>
- <EnvironmentProjectType>TEST</EnvironmentProjectType>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{DD01ED24-3750-4567-9A23-1DB676A15610}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>Google.ProtocolBuffers</RootNamespace>
- <AssemblyName>Google.ProtocolBuffers.Test</AssemblyName>
- <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- <SignAssembly>true</SignAssembly>
- <AssemblyOriginatorKeyFile>..\..\keys\Google.ProtocolBuffers.snk</AssemblyOriginatorKeyFile>
- <OldToolsVersion>3.5</OldToolsVersion>
- <ProjectTypeGuids>{A1591282-1198-4647-A2B1-27E5FF5F6F3B};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
- <SilverlightApplication>true</SilverlightApplication>
- <ValidateXaml>false</ValidateXaml>
- <ThrowErrorsInValidation>false</ThrowErrorsInValidation>
- <XapOutputs>true</XapOutputs>
- <GenerateSilverlightManifest>true</GenerateSilverlightManifest>
- <XapFilename>Google.ProtocolBuffers.Test.xap</XapFilename>
- <SilverlightManifestTemplate>Properties\AppManifest.xml</SilverlightManifestTemplate>
- <SilverlightAppEntry>Google.ProtocolBuffers.App</SilverlightAppEntry>
- <TestPageFileName>TestPage.html</TestPageFileName>
- <CreateTestPage>true</CreateTestPage>
- <SilverlightVersion>v2.0</SilverlightVersion>
- <OutOfBrowserSettingsFile>Properties\OutOfBrowserSettings.xml</OutOfBrowserSettingsFile>
- <EnableOutOfBrowser>true</EnableOutOfBrowser>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\SL20\Debug</OutputPath>
- <IntermediateOutputPath>obj\SL20\Debug\</IntermediateOutputPath>
- <DefineConstants>DEBUG;TRACE;$(EnvironmentFlavor);$(EnvironmentTemplate);NOSERIALIZABLE;NOSORTEDLIST;NOEXTENSIONS</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoStdLib>true</NoStdLib>
- <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
- <NoConfig>true</NoConfig>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\SL20\Release</OutputPath>
- <IntermediateOutputPath>obj\SL20\Release\</IntermediateOutputPath>
- <DefineConstants>TRACE;$(EnvironmentFlavor);$(EnvironmentTemplate);NOSERIALIZABLE;NOSORTEDLIST;NOEXTENSIONS</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoStdLib>true</NoStdLib>
- <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
- <NoConfig>true</NoConfig>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="mscorlib" />
- <Reference Include="System" />
- <Reference Include="System.Xml" />
- <Reference Include="System.Windows" />
- <Reference Include="System.Windows.Browser" />
- </ItemGroup>
- <ItemGroup Condition=" '$(EnvironmentFlavor)' == 'CLIENTPROFILE' ">
- <Reference Include="nunit.framework">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\NUnit\lib\nunit.framework.dll</HintPath>
- </Reference>
- </ItemGroup>
- <ItemGroup Condition=" '$(EnvironmentFlavor)' != 'CLIENTPROFILE' ">
- <Reference Include="Microsoft.Silverlight.Testing, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\Microsoft.Silverlight.Testing\April2010\Microsoft.Silverlight.Testing.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\Microsoft.Silverlight.Testing\April2010\Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.dll</HintPath>
- </Reference>
- </ItemGroup>
- <ItemGroup>
- <Compile Include="..\..\lib\NUnit-config\Microsoft.VisualStudio.TestTools.cs">
- <Link>Microsoft.VisualStudio.TestTools.cs</Link>
- </Compile>
- <Compile Include="AbstractMessageTest.cs" />
- <Compile Include="ByteStringTest.cs" />
- <Compile Include="CodedInputStreamTest.cs" />
- <Compile Include="CodedOutputStreamTest.cs" />
- <Compile Include="Collections\PopsicleListTest.cs" />
- <Compile Include="Compatibility\BinaryCompatibilityTests.cs" />
- <Compile Include="Compatibility\CompatibilityTests.cs" />
- <Compile Include="Compatibility\DictionaryCompatibilityTests.cs" />
- <Compile Include="Compatibility\JsonCompatibilityTests.cs" />
- <Compile Include="Compatibility\TestResources.cs" />
- <Compile Include="Compatibility\TextCompatibilityTests.cs" />
- <Compile Include="Compatibility\XmlCompatibilityTests.cs" />
- <Compile Include="SerializableAttribute.cs" />
- <Compile Include="TestProtos\UnitTestExtrasProtoFile.cs" />
- <Compile Include="TestResources.cs" />
- <Compile Include="TestRpcForMimeTypes.cs" />
- <Compile Include="TestReaderForUrlEncoded.cs" />
- <Compile Include="CSharpOptionsTest.cs" />
- <Compile Include="DeprecatedMemberTest.cs" />
- <Compile Include="DescriptorsTest.cs" />
- <Compile Include="Descriptors\MessageDescriptorTest.cs" />
- <Compile Include="DynamicMessageTest.cs" />
- <Compile Include="ExtendableMessageTest.cs" />
- <Compile Include="GeneratedBuilderTest.cs" />
- <Compile Include="GeneratedMessageTest.cs" />
- <Compile Include="IssuesTest.cs" />
- <Compile Include="MessageStreamIteratorTest.cs" />
- <Compile Include="MessageStreamWriterTest.cs" />
- <Compile Include="MessageTest.cs" />
- <Compile Include="MessageUtilTest.cs" />
- <Compile Include="NameHelpersTest.cs" />
- <Compile Include="Properties\AssemblyInfo.cs" />
- <Compile Include="ReflectionTester.cs" />
- <Compile Include="ReusableBuilderTest.cs" />
- <Compile Include="SerializableTest.cs" />
- <Compile Include="ServiceTest.cs" />
- <Compile Include="TestCornerCases.cs" />
- <Compile Include="TestMimeMessageFormats.cs" />
- <Compile Include="TestProtos\UnitTestCSharpOptionsProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestCustomOptionsProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestEmbedOptimizeForProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestEmptyProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestExtrasIssuesProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestGenericServices.cs" />
- <Compile Include="TestProtos\UnitTestGoogleSizeProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestGoogleSpeedProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestImportLiteProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestImportProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestMessageSetProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestNoGenericServicesProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestOptimizeForProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestRpcInterop.cs" />
- <Compile Include="TestProtos\UnitTestXmlSerializerTestProtoFile.cs" />
- <Compile Include="TestRpcGenerator.cs" />
- <Compile Include="TestUtil.cs" />
- <Compile Include="TestWriterFormatJson.cs" />
- <Compile Include="TestWriterFormatXml.cs" />
- <Compile Include="TextFormatTest.cs" />
- <Compile Include="UnknownFieldSetTest.cs" />
- <Compile Include="WireFormatTest.cs" />
- <Compile Include="App.xaml.cs">
- <DependentUpon>App.xaml</DependentUpon>
- </Compile>
- <None Include="Properties\AppManifest.xml" />
- <None Include="Properties\OutOfBrowserSettings.xml" />
- <ApplicationDefinition Include="App.xaml">
- <Generator>MSBuild:Compile</Generator>
- <SubType>Designer</SubType>
- </ApplicationDefinition>
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\ProtocolBuffers.Serialization\ProtocolBuffers.Serialization.SL20.csproj">
- <Project>{231391AF-449C-4a39-986C-AD7F270F4750}</Project>
- <Name>ProtocolBuffers.Serialization</Name>
- </ProjectReference>
- <ProjectReference Include="..\ProtocolBuffers\ProtocolBuffers.SL20.csproj">
- <Project>{6908BDCE-D925-43F3-94AC-A531E6DF2591}</Project>
- <Name>ProtocolBuffers</Name>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
- <Visible>False</Visible>
- <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
- <Install>false</Install>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
- <Visible>False</Visible>
- <ProductName>.NET Framework 3.5 SP1</ProductName>
- <Install>true</Install>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
- <Visible>False</Visible>
- <ProductName>Windows Installer 3.1</ProductName>
- <Install>true</Install>
- </BootstrapperPackage>
- </ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="Compatibility\google_message1.dat" />
- <EmbeddedResource Include="Compatibility\google_message2.dat" />
- </ItemGroup>
- <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\v2.0\Microsoft.Silverlight.CSharp.targets" />
- <ProjectExtensions>
- <VisualStudio>
- <FlavorProperties GUID="{A1591282-1198-4647-A2B1-27E5FF5F6F3B}">
- <SilverlightProjectProperties>
- <StartAction>OfflineApplication</StartAction>
- </SilverlightProjectProperties>
- </FlavorProperties>
- </VisualStudio>
- </ProjectExtensions>
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
- <PropertyGroup Condition=" '$(EnvironmentFlavor)' == 'CLIENTPROFILE' ">
- <StartAction>Program</StartAction>
- <StartProgram>$(ProjectDir)..\..\lib\NUnit\tools\nunit-console.exe</StartProgram>
- <StartArguments>/nologo /noshadow /labels /wait $(AssemblyName).dll</StartArguments>
- <StartWorkingDirectory>$(ProjectDir)$(OutputPath)</StartWorkingDirectory>
- </PropertyGroup>
-</Project>
\ No newline at end of file
diff --git a/csharp/src/ProtocolBuffers.Test/ProtocolBuffers.Test.SL30.csproj b/csharp/src/ProtocolBuffers.Test/ProtocolBuffers.Test.SL30.csproj
deleted file mode 100644
index 76f6b1a..0000000
--- a/csharp/src/ProtocolBuffers.Test/ProtocolBuffers.Test.SL30.csproj
+++ /dev/null
@@ -1,215 +0,0 @@
-<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" xmlns:cs="urn:schemas-csharp-project:template">
- <PropertyGroup>
- <EnvironmentFlavor>SILVERLIGHT</EnvironmentFlavor>
- <EnvironmentTemplate>SL30</EnvironmentTemplate>
- <EnvironmentProjectType>TEST</EnvironmentProjectType>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{DD01ED24-3750-4567-9A23-1DB676A15610}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>Google.ProtocolBuffers</RootNamespace>
- <AssemblyName>Google.ProtocolBuffers.Test</AssemblyName>
- <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- <SignAssembly>true</SignAssembly>
- <AssemblyOriginatorKeyFile>..\..\keys\Google.ProtocolBuffers.snk</AssemblyOriginatorKeyFile>
- <OldToolsVersion>3.5</OldToolsVersion>
- <ProjectTypeGuids>{A1591282-1198-4647-A2B1-27E5FF5F6F3B};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
- <SilverlightApplication>true</SilverlightApplication>
- <ValidateXaml>false</ValidateXaml>
- <ThrowErrorsInValidation>false</ThrowErrorsInValidation>
- <XapOutputs>true</XapOutputs>
- <GenerateSilverlightManifest>true</GenerateSilverlightManifest>
- <XapFilename>Google.ProtocolBuffers.Test.xap</XapFilename>
- <SilverlightManifestTemplate>Properties\AppManifest.xml</SilverlightManifestTemplate>
- <SilverlightAppEntry>Google.ProtocolBuffers.App</SilverlightAppEntry>
- <TestPageFileName>TestPage.html</TestPageFileName>
- <CreateTestPage>true</CreateTestPage>
- <SilverlightVersion>v3.5</SilverlightVersion>
- <OutOfBrowserSettingsFile>Properties\OutOfBrowserSettings.xml</OutOfBrowserSettingsFile>
- <EnableOutOfBrowser>true</EnableOutOfBrowser>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\SL30\Debug</OutputPath>
- <IntermediateOutputPath>obj\SL30\Debug\</IntermediateOutputPath>
- <DefineConstants>DEBUG;TRACE;$(EnvironmentFlavor);$(EnvironmentTemplate);NOSERIALIZABLE;NOSORTEDLIST</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoStdLib>true</NoStdLib>
- <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
- <NoConfig>true</NoConfig>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\SL30\Release</OutputPath>
- <IntermediateOutputPath>obj\SL30\Release\</IntermediateOutputPath>
- <DefineConstants>TRACE;$(EnvironmentFlavor);$(EnvironmentTemplate);NOSERIALIZABLE;NOSORTEDLIST</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoStdLib>true</NoStdLib>
- <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
- <NoConfig>true</NoConfig>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="mscorlib" />
- <Reference Include="System" />
- <Reference Include="System.Xml" />
- <Reference Include="System.Core" />
- <Reference Include="System.Windows" />
- <Reference Include="System.Windows.Browser" />
- </ItemGroup>
- <ItemGroup Condition=" '$(EnvironmentFlavor)' == 'CLIENTPROFILE' ">
- <Reference Include="nunit.framework">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\NUnit\lib\nunit.framework.dll</HintPath>
- </Reference>
- </ItemGroup>
- <ItemGroup Condition=" '$(EnvironmentFlavor)' != 'CLIENTPROFILE' ">
- <Reference Include="Microsoft.Silverlight.Testing, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\Microsoft.Silverlight.Testing\April2010\Microsoft.Silverlight.Testing.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\Microsoft.Silverlight.Testing\April2010\Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.dll</HintPath>
- </Reference>
- </ItemGroup>
- <ItemGroup>
- <Compile Include="..\..\lib\NUnit-config\Microsoft.VisualStudio.TestTools.cs">
- <Link>Microsoft.VisualStudio.TestTools.cs</Link>
- </Compile>
- <Compile Include="AbstractMessageTest.cs" />
- <Compile Include="ByteStringTest.cs" />
- <Compile Include="CodedInputStreamTest.cs" />
- <Compile Include="CodedOutputStreamTest.cs" />
- <Compile Include="Collections\PopsicleListTest.cs" />
- <Compile Include="Compatibility\BinaryCompatibilityTests.cs" />
- <Compile Include="Compatibility\CompatibilityTests.cs" />
- <Compile Include="Compatibility\DictionaryCompatibilityTests.cs" />
- <Compile Include="Compatibility\JsonCompatibilityTests.cs" />
- <Compile Include="Compatibility\TestResources.cs" />
- <Compile Include="Compatibility\TextCompatibilityTests.cs" />
- <Compile Include="Compatibility\XmlCompatibilityTests.cs" />
- <Compile Include="SerializableAttribute.cs" />
- <Compile Include="TestProtos\UnitTestExtrasProtoFile.cs" />
- <Compile Include="TestResources.cs" />
- <Compile Include="TestRpcForMimeTypes.cs" />
- <Compile Include="TestReaderForUrlEncoded.cs" />
- <Compile Include="CSharpOptionsTest.cs" />
- <Compile Include="DeprecatedMemberTest.cs" />
- <Compile Include="DescriptorsTest.cs" />
- <Compile Include="Descriptors\MessageDescriptorTest.cs" />
- <Compile Include="DynamicMessageTest.cs" />
- <Compile Include="ExtendableMessageTest.cs" />
- <Compile Include="GeneratedBuilderTest.cs" />
- <Compile Include="GeneratedMessageTest.cs" />
- <Compile Include="IssuesTest.cs" />
- <Compile Include="MessageStreamIteratorTest.cs" />
- <Compile Include="MessageStreamWriterTest.cs" />
- <Compile Include="MessageTest.cs" />
- <Compile Include="MessageUtilTest.cs" />
- <Compile Include="NameHelpersTest.cs" />
- <Compile Include="Properties\AssemblyInfo.cs" />
- <Compile Include="ReflectionTester.cs" />
- <Compile Include="ReusableBuilderTest.cs" />
- <Compile Include="SerializableTest.cs" />
- <Compile Include="ServiceTest.cs" />
- <Compile Include="TestCornerCases.cs" />
- <Compile Include="TestMimeMessageFormats.cs" />
- <Compile Include="TestProtos\UnitTestCSharpOptionsProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestCustomOptionsProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestEmbedOptimizeForProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestEmptyProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestExtrasIssuesProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestGenericServices.cs" />
- <Compile Include="TestProtos\UnitTestGoogleSizeProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestGoogleSpeedProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestImportLiteProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestImportProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestMessageSetProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestNoGenericServicesProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestOptimizeForProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestRpcInterop.cs" />
- <Compile Include="TestProtos\UnitTestXmlSerializerTestProtoFile.cs" />
- <Compile Include="TestRpcGenerator.cs" />
- <Compile Include="TestUtil.cs" />
- <Compile Include="TestWriterFormatJson.cs" />
- <Compile Include="TestWriterFormatXml.cs" />
- <Compile Include="TextFormatTest.cs" />
- <Compile Include="UnknownFieldSetTest.cs" />
- <Compile Include="WireFormatTest.cs" />
- <Compile Include="App.xaml.cs">
- <DependentUpon>App.xaml</DependentUpon>
- </Compile>
- <None Include="Properties\AppManifest.xml" />
- <None Include="Properties\OutOfBrowserSettings.xml" />
- <ApplicationDefinition Include="App.xaml">
- <Generator>MSBuild:Compile</Generator>
- <SubType>Designer</SubType>
- </ApplicationDefinition>
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\ProtocolBuffers.Serialization\ProtocolBuffers.Serialization.SL30.csproj">
- <Project>{231391AF-449C-4a39-986C-AD7F270F4750}</Project>
- <Name>ProtocolBuffers.Serialization</Name>
- </ProjectReference>
- <ProjectReference Include="..\ProtocolBuffers\ProtocolBuffers.SL30.csproj">
- <Project>{6908BDCE-D925-43F3-94AC-A531E6DF2591}</Project>
- <Name>ProtocolBuffers</Name>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
- <Visible>False</Visible>
- <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
- <Install>false</Install>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
- <Visible>False</Visible>
- <ProductName>.NET Framework 3.5 SP1</ProductName>
- <Install>true</Install>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
- <Visible>False</Visible>
- <ProductName>Windows Installer 3.1</ProductName>
- <Install>true</Install>
- </BootstrapperPackage>
- </ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="Compatibility\google_message1.dat" />
- <EmbeddedResource Include="Compatibility\google_message2.dat" />
- </ItemGroup>
- <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\v3.0\Microsoft.Silverlight.CSharp.targets" />
- <ProjectExtensions>
- <VisualStudio>
- <FlavorProperties GUID="{A1591282-1198-4647-A2B1-27E5FF5F6F3B}">
- <SilverlightProjectProperties>
- <StartAction>OfflineApplication</StartAction>
- </SilverlightProjectProperties>
- </FlavorProperties>
- </VisualStudio>
- </ProjectExtensions>
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
- <PropertyGroup Condition=" '$(EnvironmentFlavor)' == 'CLIENTPROFILE' ">
- <StartAction>Program</StartAction>
- <StartProgram>$(ProjectDir)..\..\lib\NUnit\tools\nunit-console.exe</StartProgram>
- <StartArguments>/nologo /noshadow /labels /wait $(AssemblyName).dll</StartArguments>
- <StartWorkingDirectory>$(ProjectDir)$(OutputPath)</StartWorkingDirectory>
- </PropertyGroup>
-</Project>
\ No newline at end of file
diff --git a/csharp/src/ProtocolBuffers.Test/ProtocolBuffers.Test.SL40.csproj b/csharp/src/ProtocolBuffers.Test/ProtocolBuffers.Test.SL40.csproj
deleted file mode 100644
index ade3dc3..0000000
--- a/csharp/src/ProtocolBuffers.Test/ProtocolBuffers.Test.SL40.csproj
+++ /dev/null
@@ -1,215 +0,0 @@
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" xmlns:cs="urn:schemas-csharp-project:template">
- <PropertyGroup>
- <EnvironmentFlavor>SILVERLIGHT</EnvironmentFlavor>
- <EnvironmentTemplate>SL40</EnvironmentTemplate>
- <EnvironmentProjectType>TEST</EnvironmentProjectType>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{DD01ED24-3750-4567-9A23-1DB676A15610}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>Google.ProtocolBuffers</RootNamespace>
- <AssemblyName>Google.ProtocolBuffers.Test</AssemblyName>
- <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- <SignAssembly>true</SignAssembly>
- <AssemblyOriginatorKeyFile>..\..\keys\Google.ProtocolBuffers.snk</AssemblyOriginatorKeyFile>
- <OldToolsVersion>3.5</OldToolsVersion>
- <ProjectTypeGuids>{A1591282-1198-4647-A2B1-27E5FF5F6F3B};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
- <SilverlightApplication>true</SilverlightApplication>
- <ValidateXaml>false</ValidateXaml>
- <ThrowErrorsInValidation>false</ThrowErrorsInValidation>
- <SilverlightVersion>v4.0</SilverlightVersion>
- <XapOutputs>true</XapOutputs>
- <GenerateSilverlightManifest>true</GenerateSilverlightManifest>
- <XapFilename>Google.ProtocolBuffers.Test.xap</XapFilename>
- <SilverlightManifestTemplate>Properties\AppManifest.xml</SilverlightManifestTemplate>
- <SilverlightAppEntry>Google.ProtocolBuffers.App</SilverlightAppEntry>
- <TestPageFileName>TestPage.html</TestPageFileName>
- <CreateTestPage>true</CreateTestPage>
- <OutOfBrowserSettingsFile>Properties\OutOfBrowserSettings.xml</OutOfBrowserSettingsFile>
- <EnableOutOfBrowser>true</EnableOutOfBrowser>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\SL40\Debug</OutputPath>
- <IntermediateOutputPath>obj\SL40\Debug\</IntermediateOutputPath>
- <DefineConstants>DEBUG;TRACE;$(EnvironmentFlavor);$(EnvironmentTemplate);NOSERIALIZABLE;NOSORTEDLIST</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoStdLib>true</NoStdLib>
- <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
- <NoConfig>true</NoConfig>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\SL40\Release</OutputPath>
- <IntermediateOutputPath>obj\SL40\Release\</IntermediateOutputPath>
- <DefineConstants>TRACE;$(EnvironmentFlavor);$(EnvironmentTemplate);NOSERIALIZABLE;NOSORTEDLIST</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoStdLib>true</NoStdLib>
- <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
- <NoConfig>true</NoConfig>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="mscorlib" />
- <Reference Include="System" />
- <Reference Include="System.Xml" />
- <Reference Include="System.Core" />
- <Reference Include="System.Windows" />
- <Reference Include="System.Windows.Browser" />
- </ItemGroup>
- <ItemGroup Condition=" '$(EnvironmentFlavor)' == 'CLIENTPROFILE' ">
- <Reference Include="nunit.framework">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\NUnit\lib\nunit.framework.dll</HintPath>
- </Reference>
- </ItemGroup>
- <ItemGroup Condition=" '$(EnvironmentFlavor)' != 'CLIENTPROFILE' ">
- <Reference Include="Microsoft.Silverlight.Testing, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\Microsoft.Silverlight.Testing\April2010\Microsoft.Silverlight.Testing.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\Microsoft.Silverlight.Testing\April2010\Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.dll</HintPath>
- </Reference>
- </ItemGroup>
- <ItemGroup>
- <Compile Include="..\..\lib\NUnit-config\Microsoft.VisualStudio.TestTools.cs">
- <Link>Microsoft.VisualStudio.TestTools.cs</Link>
- </Compile>
- <Compile Include="AbstractMessageTest.cs" />
- <Compile Include="ByteStringTest.cs" />
- <Compile Include="CodedInputStreamTest.cs" />
- <Compile Include="CodedOutputStreamTest.cs" />
- <Compile Include="Collections\PopsicleListTest.cs" />
- <Compile Include="Compatibility\BinaryCompatibilityTests.cs" />
- <Compile Include="Compatibility\CompatibilityTests.cs" />
- <Compile Include="Compatibility\DictionaryCompatibilityTests.cs" />
- <Compile Include="Compatibility\JsonCompatibilityTests.cs" />
- <Compile Include="Compatibility\TestResources.cs" />
- <Compile Include="Compatibility\TextCompatibilityTests.cs" />
- <Compile Include="Compatibility\XmlCompatibilityTests.cs" />
- <Compile Include="SerializableAttribute.cs" />
- <Compile Include="TestProtos\UnitTestExtrasProtoFile.cs" />
- <Compile Include="TestResources.cs" />
- <Compile Include="TestRpcForMimeTypes.cs" />
- <Compile Include="TestReaderForUrlEncoded.cs" />
- <Compile Include="CSharpOptionsTest.cs" />
- <Compile Include="DeprecatedMemberTest.cs" />
- <Compile Include="DescriptorsTest.cs" />
- <Compile Include="Descriptors\MessageDescriptorTest.cs" />
- <Compile Include="DynamicMessageTest.cs" />
- <Compile Include="ExtendableMessageTest.cs" />
- <Compile Include="GeneratedBuilderTest.cs" />
- <Compile Include="GeneratedMessageTest.cs" />
- <Compile Include="IssuesTest.cs" />
- <Compile Include="MessageStreamIteratorTest.cs" />
- <Compile Include="MessageStreamWriterTest.cs" />
- <Compile Include="MessageTest.cs" />
- <Compile Include="MessageUtilTest.cs" />
- <Compile Include="NameHelpersTest.cs" />
- <Compile Include="Properties\AssemblyInfo.cs" />
- <Compile Include="ReflectionTester.cs" />
- <Compile Include="ReusableBuilderTest.cs" />
- <Compile Include="SerializableTest.cs" />
- <Compile Include="ServiceTest.cs" />
- <Compile Include="TestCornerCases.cs" />
- <Compile Include="TestMimeMessageFormats.cs" />
- <Compile Include="TestProtos\UnitTestCSharpOptionsProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestCustomOptionsProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestEmbedOptimizeForProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestEmptyProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestExtrasIssuesProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestGenericServices.cs" />
- <Compile Include="TestProtos\UnitTestGoogleSizeProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestGoogleSpeedProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestImportLiteProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestImportProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestMessageSetProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestNoGenericServicesProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestOptimizeForProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestRpcInterop.cs" />
- <Compile Include="TestProtos\UnitTestXmlSerializerTestProtoFile.cs" />
- <Compile Include="TestRpcGenerator.cs" />
- <Compile Include="TestUtil.cs" />
- <Compile Include="TestWriterFormatJson.cs" />
- <Compile Include="TestWriterFormatXml.cs" />
- <Compile Include="TextFormatTest.cs" />
- <Compile Include="UnknownFieldSetTest.cs" />
- <Compile Include="WireFormatTest.cs" />
- <Compile Include="App.xaml.cs">
- <DependentUpon>App.xaml</DependentUpon>
- </Compile>
- <None Include="Properties\AppManifest.xml" />
- <None Include="Properties\OutOfBrowserSettings.xml" />
- <ApplicationDefinition Include="App.xaml">
- <Generator>MSBuild:Compile</Generator>
- <SubType>Designer</SubType>
- </ApplicationDefinition>
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\ProtocolBuffers.Serialization\ProtocolBuffers.Serialization.SL40.csproj">
- <Project>{231391AF-449C-4a39-986C-AD7F270F4750}</Project>
- <Name>ProtocolBuffers.Serialization</Name>
- </ProjectReference>
- <ProjectReference Include="..\ProtocolBuffers\ProtocolBuffers.SL40.csproj">
- <Project>{6908BDCE-D925-43F3-94AC-A531E6DF2591}</Project>
- <Name>ProtocolBuffers</Name>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
- <Visible>False</Visible>
- <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
- <Install>false</Install>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
- <Visible>False</Visible>
- <ProductName>.NET Framework 3.5 SP1</ProductName>
- <Install>true</Install>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
- <Visible>False</Visible>
- <ProductName>Windows Installer 3.1</ProductName>
- <Install>true</Install>
- </BootstrapperPackage>
- </ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="Compatibility\google_message1.dat" />
- <EmbeddedResource Include="Compatibility\google_message2.dat" />
- </ItemGroup>
- <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets" />
- <ProjectExtensions>
- <VisualStudio>
- <FlavorProperties GUID="{A1591282-1198-4647-A2B1-27E5FF5F6F3B}">
- <SilverlightProjectProperties>
- <StartAction>OfflineApplication</StartAction>
- </SilverlightProjectProperties>
- </FlavorProperties>
- </VisualStudio>
- </ProjectExtensions>
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
- <PropertyGroup Condition=" '$(EnvironmentFlavor)' == 'CLIENTPROFILE' ">
- <StartAction>Program</StartAction>
- <StartProgram>$(ProjectDir)..\..\lib\NUnit\tools\nunit-console.exe</StartProgram>
- <StartArguments>/nologo /noshadow /labels /wait $(AssemblyName).dll</StartArguments>
- <StartWorkingDirectory>$(ProjectDir)$(OutputPath)</StartWorkingDirectory>
- </PropertyGroup>
-</Project>
\ No newline at end of file
diff --git a/csharp/src/ProtocolBuffers.Test/ProtocolBuffers.Test.csproj b/csharp/src/ProtocolBuffers.Test/ProtocolBuffers.Test.csproj
index 98119be..055f5fd 100644
--- a/csharp/src/ProtocolBuffers.Test/ProtocolBuffers.Test.csproj
+++ b/csharp/src/ProtocolBuffers.Test/ProtocolBuffers.Test.csproj
@@ -1,9 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="..\packages\xunit.runner.visualstudio.2.0.0\build\net20\xunit.runner.visualstudio.props" Condition="Exists('..\packages\xunit.runner.visualstudio.2.0.0\build\net20\xunit.runner.visualstudio.props')" />
+ <Import Project="..\packages\xunit.core.2.0.0\build\portable-net45+win+wpa81+wp80+monotouch+monoandroid+Xamarin.iOS\xunit.core.props" Condition="Exists('..\packages\xunit.core.2.0.0\build\portable-net45+win+wpa81+wp80+monotouch+monoandroid+Xamarin.iOS\xunit.core.props')" />
<PropertyGroup>
- <EnvironmentFlavor>CLIENTPROFILE</EnvironmentFlavor>
- <EnvironmentTemplate>NET35</EnvironmentTemplate>
- <EnvironmentProjectType>TEST</EnvironmentProjectType>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
@@ -13,62 +12,57 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Google.ProtocolBuffers</RootNamespace>
<AssemblyName>Google.ProtocolBuffers.Test</AssemblyName>
- <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\..\keys\Google.ProtocolBuffers.snk</AssemblyOriginatorKeyFile>
<OldToolsVersion>3.5</OldToolsVersion>
+ <TargetFrameworkProfile>
+ </TargetFrameworkProfile>
+ <NuGetPackageImportStamp>d37384c8</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
- <OutputPath>bin\NET35\Debug</OutputPath>
- <IntermediateOutputPath>obj\NET35\Debug\</IntermediateOutputPath>
+ <OutputPath>bin\Debug</OutputPath>
+ <IntermediateOutputPath>obj\Debug\</IntermediateOutputPath>
<DefineConstants>DEBUG;TRACE;$(EnvironmentFlavor);$(EnvironmentTemplate)</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<NoStdLib>true</NoStdLib>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
+ <Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
- <OutputPath>bin\NET35\Release</OutputPath>
- <IntermediateOutputPath>obj\NET35\Release\</IntermediateOutputPath>
+ <OutputPath>bin\Release</OutputPath>
+ <IntermediateOutputPath>obj\Release\</IntermediateOutputPath>
<DefineConstants>TRACE;$(EnvironmentFlavor);$(EnvironmentTemplate)</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<NoStdLib>true</NoStdLib>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
+ <Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="mscorlib" />
<Reference Include="System" />
<Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup Condition=" '$(EnvironmentFlavor)' == 'CLIENTPROFILE' ">
- <Reference Include="nunit.framework">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\NUnit\lib\nunit.framework.dll</HintPath>
+ <Reference Include="xunit.abstractions">
+ <HintPath>..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll</HintPath>
</Reference>
- </ItemGroup>
- <ItemGroup Condition=" '$(EnvironmentFlavor)' != 'CLIENTPROFILE' ">
- <Reference Include="Microsoft.Silverlight.Testing, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\Microsoft.Silverlight.Testing\April2010\Microsoft.Silverlight.Testing.dll</HintPath>
+ <Reference Include="xunit.assert">
+ <HintPath>..\packages\xunit.assert.2.0.0\lib\portable-net45+win+wpa81+wp80+monotouch+monoandroid+Xamarin.iOS\xunit.assert.dll</HintPath>
</Reference>
- <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\Microsoft.Silverlight.Testing\April2010\Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.dll</HintPath>
+ <Reference Include="xunit.core">
+ <HintPath>..\packages\xunit.extensibility.core.2.0.0\lib\portable-net45+win+wpa81+wp80+monotouch+monoandroid+Xamarin.iOS\xunit.core.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
- <Compile Include="..\..\lib\NUnit-config\Microsoft.VisualStudio.TestTools.cs">
- <Link>Microsoft.VisualStudio.TestTools.cs</Link>
- </Compile>
<Compile Include="AbstractMessageTest.cs" />
<Compile Include="ByteStringTest.cs" />
<Compile Include="FieldPresenceTest.cs" />
@@ -133,27 +127,15 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
- <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
- <Visible>False</Visible>
- <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
- <Install>false</Install>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
- <Visible>False</Visible>
- <ProductName>.NET Framework 3.5 SP1</ProductName>
- <Install>true</Install>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
- <Visible>False</Visible>
- <ProductName>Windows Installer 3.1</ProductName>
- <Install>true</Install>
- </BootstrapperPackage>
- </ItemGroup>
- <ItemGroup>
<EmbeddedResource Include="Compatibility\google_message1.dat" />
<EmbeddedResource Include="Compatibility\google_message2.dat" />
</ItemGroup>
- <ItemGroup />
+ <ItemGroup>
+ <None Include="packages.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
@@ -162,10 +144,11 @@
<Target Name="AfterBuild">
</Target>
-->
- <PropertyGroup Condition=" '$(EnvironmentFlavor)' == 'CLIENTPROFILE' ">
- <StartAction>Program</StartAction>
- <StartProgram>$(ProjectDir)..\..\lib\NUnit\tools\nunit-console.exe</StartProgram>
- <StartArguments>/nologo /noshadow /labels /wait $(AssemblyName).dll</StartArguments>
- <StartWorkingDirectory>$(ProjectDir)$(OutputPath)</StartWorkingDirectory>
- </PropertyGroup>
+ <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
+ <PropertyGroup>
+ <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
+ </PropertyGroup>
+ <Error Condition="!Exists('..\packages\xunit.core.2.0.0\build\portable-net45+win+wpa81+wp80+monotouch+monoandroid+Xamarin.iOS\xunit.core.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\xunit.core.2.0.0\build\portable-net45+win+wpa81+wp80+monotouch+monoandroid+Xamarin.iOS\xunit.core.props'))" />
+ <Error Condition="!Exists('..\packages\xunit.runner.visualstudio.2.0.0\build\net20\xunit.runner.visualstudio.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\xunit.runner.visualstudio.2.0.0\build\net20\xunit.runner.visualstudio.props'))" />
+ </Target>
</Project>
diff --git a/csharp/src/ProtocolBuffers.Test/ReflectionTester.cs b/csharp/src/ProtocolBuffers.Test/ReflectionTester.cs
index 5385d31..5fa22fe 100644
--- a/csharp/src/ProtocolBuffers.Test/ReflectionTester.cs
+++ b/csharp/src/ProtocolBuffers.Test/ReflectionTester.cs
@@ -37,7 +37,7 @@
using System;
using Google.ProtocolBuffers.Descriptors;
using Google.ProtocolBuffers.TestProtos;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Xunit;
#pragma warning disable 618 // Disable warning about obsolete use miss-matched assert arguments
@@ -97,7 +97,7 @@
this.extensionRegistry = extensionRegistry;
this.file = baseDescriptor.File;
- Assert.AreEqual(1, file.Dependencies.Count);
+ Assert.Equal(1, file.Dependencies.Count);
this.importFile = file.Dependencies[0];
MessageDescriptor testAllTypes;
@@ -108,7 +108,7 @@
else
{
testAllTypes = file.FindTypeByName<MessageDescriptor>("TestAllTypes");
- Assert.IsNotNull(testAllTypes);
+ Assert.NotNull(testAllTypes);
}
if (extensionRegistry == null)
@@ -136,14 +136,14 @@
this.foreignEnum = file.FindTypeByName<EnumDescriptor>("ForeignEnum");
this.importEnum = importFile.FindTypeByName<EnumDescriptor>("ImportEnum");
- Assert.IsNotNull(optionalGroup);
- Assert.IsNotNull(repeatedGroup);
- Assert.IsNotNull(nestedMessage);
- Assert.IsNotNull(foreignMessage);
- Assert.IsNotNull(importMessage);
- Assert.IsNotNull(nestedEnum);
- Assert.IsNotNull(foreignEnum);
- Assert.IsNotNull(importEnum);
+ Assert.NotNull(optionalGroup);
+ Assert.NotNull(repeatedGroup);
+ Assert.NotNull(nestedMessage);
+ Assert.NotNull(foreignMessage);
+ Assert.NotNull(importMessage);
+ Assert.NotNull(nestedEnum);
+ Assert.NotNull(foreignEnum);
+ Assert.NotNull(importEnum);
this.nestedB = nestedMessage.FindDescriptor<FieldDescriptor>("bb");
this.foreignC = foreignMessage.FindDescriptor<FieldDescriptor>("c");
@@ -161,20 +161,20 @@
this.groupA = optionalGroup.FindDescriptor<FieldDescriptor>("a");
this.repeatedGroupA = repeatedGroup.FindDescriptor<FieldDescriptor>("a");
- Assert.IsNotNull(groupA);
- Assert.IsNotNull(repeatedGroupA);
- Assert.IsNotNull(nestedB);
- Assert.IsNotNull(foreignC);
- Assert.IsNotNull(importD);
- Assert.IsNotNull(nestedFoo);
- Assert.IsNotNull(nestedBar);
- Assert.IsNotNull(nestedBaz);
- Assert.IsNotNull(foreignFoo);
- Assert.IsNotNull(foreignBar);
- Assert.IsNotNull(foreignBaz);
- Assert.IsNotNull(importFoo);
- Assert.IsNotNull(importBar);
- Assert.IsNotNull(importBaz);
+ Assert.NotNull(groupA);
+ Assert.NotNull(repeatedGroupA);
+ Assert.NotNull(nestedB);
+ Assert.NotNull(foreignC);
+ Assert.NotNull(importD);
+ Assert.NotNull(nestedFoo);
+ Assert.NotNull(nestedBar);
+ Assert.NotNull(nestedBaz);
+ Assert.NotNull(foreignFoo);
+ Assert.NotNull(foreignBar);
+ Assert.NotNull(foreignBaz);
+ Assert.NotNull(importFoo);
+ Assert.NotNull(importBar);
+ Assert.NotNull(importBaz);
}
/// <summary>
@@ -216,7 +216,7 @@
{
result = file.FindTypeByName<FieldDescriptor>(name + "_extension");
}
- Assert.IsNotNull(result);
+ Assert.NotNull(result);
return result;
}
@@ -233,8 +233,8 @@
else
{
ExtensionInfo extension = extensionRegistry[field.ContainingType, field.FieldNumber];
- Assert.IsNotNull(extension);
- Assert.IsNotNull(extension.DefaultInstance);
+ Assert.NotNull(extension);
+ Assert.NotNull(extension.DefaultInstance);
return (IBuilder) extension.DefaultInstance.WeakCreateBuilderForType();
}
}
@@ -449,199 +449,199 @@
/// </summary>
public void AssertAllFieldsSetViaReflection(IMessage message)
{
- Assert.IsTrue(message.HasField(f("optional_int32")));
- Assert.IsTrue(message.HasField(f("optional_int64")));
- Assert.IsTrue(message.HasField(f("optional_uint32")));
- Assert.IsTrue(message.HasField(f("optional_uint64")));
- Assert.IsTrue(message.HasField(f("optional_sint32")));
- Assert.IsTrue(message.HasField(f("optional_sint64")));
- Assert.IsTrue(message.HasField(f("optional_fixed32")));
- Assert.IsTrue(message.HasField(f("optional_fixed64")));
- Assert.IsTrue(message.HasField(f("optional_sfixed32")));
- Assert.IsTrue(message.HasField(f("optional_sfixed64")));
- Assert.IsTrue(message.HasField(f("optional_float")));
- Assert.IsTrue(message.HasField(f("optional_double")));
- Assert.IsTrue(message.HasField(f("optional_bool")));
- Assert.IsTrue(message.HasField(f("optional_string")));
- Assert.IsTrue(message.HasField(f("optional_bytes")));
+ Assert.True(message.HasField(f("optional_int32")));
+ Assert.True(message.HasField(f("optional_int64")));
+ Assert.True(message.HasField(f("optional_uint32")));
+ Assert.True(message.HasField(f("optional_uint64")));
+ Assert.True(message.HasField(f("optional_sint32")));
+ Assert.True(message.HasField(f("optional_sint64")));
+ Assert.True(message.HasField(f("optional_fixed32")));
+ Assert.True(message.HasField(f("optional_fixed64")));
+ Assert.True(message.HasField(f("optional_sfixed32")));
+ Assert.True(message.HasField(f("optional_sfixed64")));
+ Assert.True(message.HasField(f("optional_float")));
+ Assert.True(message.HasField(f("optional_double")));
+ Assert.True(message.HasField(f("optional_bool")));
+ Assert.True(message.HasField(f("optional_string")));
+ Assert.True(message.HasField(f("optional_bytes")));
- Assert.IsTrue(message.HasField(f("optionalgroup")));
- Assert.IsTrue(message.HasField(f("optional_nested_message")));
- Assert.IsTrue(message.HasField(f("optional_foreign_message")));
- Assert.IsTrue(message.HasField(f("optional_import_message")));
+ Assert.True(message.HasField(f("optionalgroup")));
+ Assert.True(message.HasField(f("optional_nested_message")));
+ Assert.True(message.HasField(f("optional_foreign_message")));
+ Assert.True(message.HasField(f("optional_import_message")));
- Assert.IsTrue(((IMessage) message[f("optionalgroup")]).HasField(groupA));
- Assert.IsTrue(((IMessage) message[f("optional_nested_message")]).HasField(nestedB));
- Assert.IsTrue(((IMessage) message[f("optional_foreign_message")]).HasField(foreignC));
- Assert.IsTrue(((IMessage) message[f("optional_import_message")]).HasField(importD));
+ Assert.True(((IMessage) message[f("optionalgroup")]).HasField(groupA));
+ Assert.True(((IMessage) message[f("optional_nested_message")]).HasField(nestedB));
+ Assert.True(((IMessage) message[f("optional_foreign_message")]).HasField(foreignC));
+ Assert.True(((IMessage) message[f("optional_import_message")]).HasField(importD));
- Assert.IsTrue(message.HasField(f("optional_nested_enum")));
- Assert.IsTrue(message.HasField(f("optional_foreign_enum")));
- Assert.IsTrue(message.HasField(f("optional_import_enum")));
+ Assert.True(message.HasField(f("optional_nested_enum")));
+ Assert.True(message.HasField(f("optional_foreign_enum")));
+ Assert.True(message.HasField(f("optional_import_enum")));
- Assert.IsTrue(message.HasField(f("optional_string_piece")));
- Assert.IsTrue(message.HasField(f("optional_cord")));
+ Assert.True(message.HasField(f("optional_string_piece")));
+ Assert.True(message.HasField(f("optional_cord")));
- Assert.AreEqual(101, message[f("optional_int32")]);
- Assert.AreEqual(102L, message[f("optional_int64")]);
- Assert.AreEqual(103u, message[f("optional_uint32")]);
- Assert.AreEqual(104UL, message[f("optional_uint64")]);
- Assert.AreEqual(105, message[f("optional_sint32")]);
- Assert.AreEqual(106L, message[f("optional_sint64")]);
- Assert.AreEqual(107U, message[f("optional_fixed32")]);
- Assert.AreEqual(108UL, message[f("optional_fixed64")]);
- Assert.AreEqual(109, message[f("optional_sfixed32")]);
- Assert.AreEqual(110L, message[f("optional_sfixed64")]);
- Assert.AreEqual(111F, message[f("optional_float")]);
- Assert.AreEqual(112D, message[f("optional_double")]);
- Assert.AreEqual(true, message[f("optional_bool")]);
- Assert.AreEqual("115", message[f("optional_string")]);
- Assert.AreEqual(TestUtil.ToBytes("116"), message[f("optional_bytes")]);
+ Assert.Equal(101, message[f("optional_int32")]);
+ Assert.Equal(102L, message[f("optional_int64")]);
+ Assert.Equal(103u, message[f("optional_uint32")]);
+ Assert.Equal(104UL, message[f("optional_uint64")]);
+ Assert.Equal(105, message[f("optional_sint32")]);
+ Assert.Equal(106L, message[f("optional_sint64")]);
+ Assert.Equal(107U, message[f("optional_fixed32")]);
+ Assert.Equal(108UL, message[f("optional_fixed64")]);
+ Assert.Equal(109, message[f("optional_sfixed32")]);
+ Assert.Equal(110L, message[f("optional_sfixed64")]);
+ Assert.Equal(111F, message[f("optional_float")]);
+ Assert.Equal(112D, message[f("optional_double")]);
+ Assert.Equal(true, message[f("optional_bool")]);
+ Assert.Equal("115", message[f("optional_string")]);
+ Assert.Equal(TestUtil.ToBytes("116"), message[f("optional_bytes")]);
- Assert.AreEqual(117, ((IMessage) message[f("optionalgroup")])[groupA]);
- Assert.AreEqual(118, ((IMessage) message[f("optional_nested_message")])[nestedB]);
- Assert.AreEqual(119, ((IMessage) message[f("optional_foreign_message")])[foreignC]);
- Assert.AreEqual(120, ((IMessage) message[f("optional_import_message")])[importD]);
+ Assert.Equal(117, ((IMessage) message[f("optionalgroup")])[groupA]);
+ Assert.Equal(118, ((IMessage) message[f("optional_nested_message")])[nestedB]);
+ Assert.Equal(119, ((IMessage) message[f("optional_foreign_message")])[foreignC]);
+ Assert.Equal(120, ((IMessage) message[f("optional_import_message")])[importD]);
- Assert.AreEqual(nestedBaz, message[f("optional_nested_enum")]);
- Assert.AreEqual(foreignBaz, message[f("optional_foreign_enum")]);
- Assert.AreEqual(importBaz, message[f("optional_import_enum")]);
+ Assert.Equal(nestedBaz, message[f("optional_nested_enum")]);
+ Assert.Equal(foreignBaz, message[f("optional_foreign_enum")]);
+ Assert.Equal(importBaz, message[f("optional_import_enum")]);
- Assert.AreEqual("124", message[f("optional_string_piece")]);
- Assert.AreEqual("125", message[f("optional_cord")]);
+ Assert.Equal("124", message[f("optional_string_piece")]);
+ Assert.Equal("125", message[f("optional_cord")]);
// -----------------------------------------------------------------
- Assert.AreEqual(2, message.GetRepeatedFieldCount(f("repeated_int32")));
- Assert.AreEqual(2, message.GetRepeatedFieldCount(f("repeated_int64")));
- Assert.AreEqual(2, message.GetRepeatedFieldCount(f("repeated_uint32")));
- Assert.AreEqual(2, message.GetRepeatedFieldCount(f("repeated_uint64")));
- Assert.AreEqual(2, message.GetRepeatedFieldCount(f("repeated_sint32")));
- Assert.AreEqual(2, message.GetRepeatedFieldCount(f("repeated_sint64")));
- Assert.AreEqual(2, message.GetRepeatedFieldCount(f("repeated_fixed32")));
- Assert.AreEqual(2, message.GetRepeatedFieldCount(f("repeated_fixed64")));
- Assert.AreEqual(2, message.GetRepeatedFieldCount(f("repeated_sfixed32")));
- Assert.AreEqual(2, message.GetRepeatedFieldCount(f("repeated_sfixed64")));
- Assert.AreEqual(2, message.GetRepeatedFieldCount(f("repeated_float")));
- Assert.AreEqual(2, message.GetRepeatedFieldCount(f("repeated_double")));
- Assert.AreEqual(2, message.GetRepeatedFieldCount(f("repeated_bool")));
- Assert.AreEqual(2, message.GetRepeatedFieldCount(f("repeated_string")));
- Assert.AreEqual(2, message.GetRepeatedFieldCount(f("repeated_bytes")));
+ Assert.Equal(2, message.GetRepeatedFieldCount(f("repeated_int32")));
+ Assert.Equal(2, message.GetRepeatedFieldCount(f("repeated_int64")));
+ Assert.Equal(2, message.GetRepeatedFieldCount(f("repeated_uint32")));
+ Assert.Equal(2, message.GetRepeatedFieldCount(f("repeated_uint64")));
+ Assert.Equal(2, message.GetRepeatedFieldCount(f("repeated_sint32")));
+ Assert.Equal(2, message.GetRepeatedFieldCount(f("repeated_sint64")));
+ Assert.Equal(2, message.GetRepeatedFieldCount(f("repeated_fixed32")));
+ Assert.Equal(2, message.GetRepeatedFieldCount(f("repeated_fixed64")));
+ Assert.Equal(2, message.GetRepeatedFieldCount(f("repeated_sfixed32")));
+ Assert.Equal(2, message.GetRepeatedFieldCount(f("repeated_sfixed64")));
+ Assert.Equal(2, message.GetRepeatedFieldCount(f("repeated_float")));
+ Assert.Equal(2, message.GetRepeatedFieldCount(f("repeated_double")));
+ Assert.Equal(2, message.GetRepeatedFieldCount(f("repeated_bool")));
+ Assert.Equal(2, message.GetRepeatedFieldCount(f("repeated_string")));
+ Assert.Equal(2, message.GetRepeatedFieldCount(f("repeated_bytes")));
- Assert.AreEqual(2, message.GetRepeatedFieldCount(f("repeatedgroup")));
- Assert.AreEqual(2, message.GetRepeatedFieldCount(f("repeated_nested_message")));
- Assert.AreEqual(2, message.GetRepeatedFieldCount(f("repeated_foreign_message")));
- Assert.AreEqual(2, message.GetRepeatedFieldCount(f("repeated_import_message")));
- Assert.AreEqual(2, message.GetRepeatedFieldCount(f("repeated_nested_enum")));
- Assert.AreEqual(2, message.GetRepeatedFieldCount(f("repeated_foreign_enum")));
- Assert.AreEqual(2, message.GetRepeatedFieldCount(f("repeated_import_enum")));
+ Assert.Equal(2, message.GetRepeatedFieldCount(f("repeatedgroup")));
+ Assert.Equal(2, message.GetRepeatedFieldCount(f("repeated_nested_message")));
+ Assert.Equal(2, message.GetRepeatedFieldCount(f("repeated_foreign_message")));
+ Assert.Equal(2, message.GetRepeatedFieldCount(f("repeated_import_message")));
+ Assert.Equal(2, message.GetRepeatedFieldCount(f("repeated_nested_enum")));
+ Assert.Equal(2, message.GetRepeatedFieldCount(f("repeated_foreign_enum")));
+ Assert.Equal(2, message.GetRepeatedFieldCount(f("repeated_import_enum")));
- Assert.AreEqual(2, message.GetRepeatedFieldCount(f("repeated_string_piece")));
- Assert.AreEqual(2, message.GetRepeatedFieldCount(f("repeated_cord")));
+ Assert.Equal(2, message.GetRepeatedFieldCount(f("repeated_string_piece")));
+ Assert.Equal(2, message.GetRepeatedFieldCount(f("repeated_cord")));
- Assert.AreEqual(201, message[f("repeated_int32"), 0]);
- Assert.AreEqual(202L, message[f("repeated_int64"), 0]);
- Assert.AreEqual(203U, message[f("repeated_uint32"), 0]);
- Assert.AreEqual(204UL, message[f("repeated_uint64"), 0]);
- Assert.AreEqual(205, message[f("repeated_sint32"), 0]);
- Assert.AreEqual(206L, message[f("repeated_sint64"), 0]);
- Assert.AreEqual(207U, message[f("repeated_fixed32"), 0]);
- Assert.AreEqual(208UL, message[f("repeated_fixed64"), 0]);
- Assert.AreEqual(209, message[f("repeated_sfixed32"), 0]);
- Assert.AreEqual(210L, message[f("repeated_sfixed64"), 0]);
- Assert.AreEqual(211F, message[f("repeated_float"), 0]);
- Assert.AreEqual(212D, message[f("repeated_double"), 0]);
- Assert.AreEqual(true, message[f("repeated_bool"), 0]);
- Assert.AreEqual("215", message[f("repeated_string"), 0]);
- Assert.AreEqual(TestUtil.ToBytes("216"), message[f("repeated_bytes"), 0]);
+ Assert.Equal(201, message[f("repeated_int32"), 0]);
+ Assert.Equal(202L, message[f("repeated_int64"), 0]);
+ Assert.Equal(203U, message[f("repeated_uint32"), 0]);
+ Assert.Equal(204UL, message[f("repeated_uint64"), 0]);
+ Assert.Equal(205, message[f("repeated_sint32"), 0]);
+ Assert.Equal(206L, message[f("repeated_sint64"), 0]);
+ Assert.Equal(207U, message[f("repeated_fixed32"), 0]);
+ Assert.Equal(208UL, message[f("repeated_fixed64"), 0]);
+ Assert.Equal(209, message[f("repeated_sfixed32"), 0]);
+ Assert.Equal(210L, message[f("repeated_sfixed64"), 0]);
+ Assert.Equal(211F, message[f("repeated_float"), 0]);
+ Assert.Equal(212D, message[f("repeated_double"), 0]);
+ Assert.Equal(true, message[f("repeated_bool"), 0]);
+ Assert.Equal("215", message[f("repeated_string"), 0]);
+ Assert.Equal(TestUtil.ToBytes("216"), message[f("repeated_bytes"), 0]);
- Assert.AreEqual(217, ((IMessage) message[f("repeatedgroup"), 0])[repeatedGroupA]);
- Assert.AreEqual(218, ((IMessage) message[f("repeated_nested_message"), 0])[nestedB]);
- Assert.AreEqual(219, ((IMessage) message[f("repeated_foreign_message"), 0])[foreignC]);
- Assert.AreEqual(220, ((IMessage) message[f("repeated_import_message"), 0])[importD]);
+ Assert.Equal(217, ((IMessage) message[f("repeatedgroup"), 0])[repeatedGroupA]);
+ Assert.Equal(218, ((IMessage) message[f("repeated_nested_message"), 0])[nestedB]);
+ Assert.Equal(219, ((IMessage) message[f("repeated_foreign_message"), 0])[foreignC]);
+ Assert.Equal(220, ((IMessage) message[f("repeated_import_message"), 0])[importD]);
- Assert.AreEqual(nestedBar, message[f("repeated_nested_enum"), 0]);
- Assert.AreEqual(foreignBar, message[f("repeated_foreign_enum"), 0]);
- Assert.AreEqual(importBar, message[f("repeated_import_enum"), 0]);
+ Assert.Equal(nestedBar, message[f("repeated_nested_enum"), 0]);
+ Assert.Equal(foreignBar, message[f("repeated_foreign_enum"), 0]);
+ Assert.Equal(importBar, message[f("repeated_import_enum"), 0]);
- Assert.AreEqual("224", message[f("repeated_string_piece"), 0]);
- Assert.AreEqual("225", message[f("repeated_cord"), 0]);
+ Assert.Equal("224", message[f("repeated_string_piece"), 0]);
+ Assert.Equal("225", message[f("repeated_cord"), 0]);
- Assert.AreEqual(301, message[f("repeated_int32"), 1]);
- Assert.AreEqual(302L, message[f("repeated_int64"), 1]);
- Assert.AreEqual(303U, message[f("repeated_uint32"), 1]);
- Assert.AreEqual(304UL, message[f("repeated_uint64"), 1]);
- Assert.AreEqual(305, message[f("repeated_sint32"), 1]);
- Assert.AreEqual(306L, message[f("repeated_sint64"), 1]);
- Assert.AreEqual(307U, message[f("repeated_fixed32"), 1]);
- Assert.AreEqual(308UL, message[f("repeated_fixed64"), 1]);
- Assert.AreEqual(309, message[f("repeated_sfixed32"), 1]);
- Assert.AreEqual(310L, message[f("repeated_sfixed64"), 1]);
- Assert.AreEqual(311F, message[f("repeated_float"), 1]);
- Assert.AreEqual(312D, message[f("repeated_double"), 1]);
- Assert.AreEqual(false, message[f("repeated_bool"), 1]);
- Assert.AreEqual("315", message[f("repeated_string"), 1]);
- Assert.AreEqual(TestUtil.ToBytes("316"), message[f("repeated_bytes"), 1]);
+ Assert.Equal(301, message[f("repeated_int32"), 1]);
+ Assert.Equal(302L, message[f("repeated_int64"), 1]);
+ Assert.Equal(303U, message[f("repeated_uint32"), 1]);
+ Assert.Equal(304UL, message[f("repeated_uint64"), 1]);
+ Assert.Equal(305, message[f("repeated_sint32"), 1]);
+ Assert.Equal(306L, message[f("repeated_sint64"), 1]);
+ Assert.Equal(307U, message[f("repeated_fixed32"), 1]);
+ Assert.Equal(308UL, message[f("repeated_fixed64"), 1]);
+ Assert.Equal(309, message[f("repeated_sfixed32"), 1]);
+ Assert.Equal(310L, message[f("repeated_sfixed64"), 1]);
+ Assert.Equal(311F, message[f("repeated_float"), 1]);
+ Assert.Equal(312D, message[f("repeated_double"), 1]);
+ Assert.Equal(false, message[f("repeated_bool"), 1]);
+ Assert.Equal("315", message[f("repeated_string"), 1]);
+ Assert.Equal(TestUtil.ToBytes("316"), message[f("repeated_bytes"), 1]);
- Assert.AreEqual(317, ((IMessage) message[f("repeatedgroup"), 1])[repeatedGroupA]);
- Assert.AreEqual(318, ((IMessage) message[f("repeated_nested_message"), 1])[nestedB]);
- Assert.AreEqual(319, ((IMessage) message[f("repeated_foreign_message"), 1])[foreignC]);
- Assert.AreEqual(320, ((IMessage) message[f("repeated_import_message"), 1])[importD]);
+ Assert.Equal(317, ((IMessage) message[f("repeatedgroup"), 1])[repeatedGroupA]);
+ Assert.Equal(318, ((IMessage) message[f("repeated_nested_message"), 1])[nestedB]);
+ Assert.Equal(319, ((IMessage) message[f("repeated_foreign_message"), 1])[foreignC]);
+ Assert.Equal(320, ((IMessage) message[f("repeated_import_message"), 1])[importD]);
- Assert.AreEqual(nestedBaz, message[f("repeated_nested_enum"), 1]);
- Assert.AreEqual(foreignBaz, message[f("repeated_foreign_enum"), 1]);
- Assert.AreEqual(importBaz, message[f("repeated_import_enum"), 1]);
+ Assert.Equal(nestedBaz, message[f("repeated_nested_enum"), 1]);
+ Assert.Equal(foreignBaz, message[f("repeated_foreign_enum"), 1]);
+ Assert.Equal(importBaz, message[f("repeated_import_enum"), 1]);
- Assert.AreEqual("324", message[f("repeated_string_piece"), 1]);
- Assert.AreEqual("325", message[f("repeated_cord"), 1]);
+ Assert.Equal("324", message[f("repeated_string_piece"), 1]);
+ Assert.Equal("325", message[f("repeated_cord"), 1]);
// -----------------------------------------------------------------
- Assert.IsTrue(message.HasField(f("default_int32")));
- Assert.IsTrue(message.HasField(f("default_int64")));
- Assert.IsTrue(message.HasField(f("default_uint32")));
- Assert.IsTrue(message.HasField(f("default_uint64")));
- Assert.IsTrue(message.HasField(f("default_sint32")));
- Assert.IsTrue(message.HasField(f("default_sint64")));
- Assert.IsTrue(message.HasField(f("default_fixed32")));
- Assert.IsTrue(message.HasField(f("default_fixed64")));
- Assert.IsTrue(message.HasField(f("default_sfixed32")));
- Assert.IsTrue(message.HasField(f("default_sfixed64")));
- Assert.IsTrue(message.HasField(f("default_float")));
- Assert.IsTrue(message.HasField(f("default_double")));
- Assert.IsTrue(message.HasField(f("default_bool")));
- Assert.IsTrue(message.HasField(f("default_string")));
- Assert.IsTrue(message.HasField(f("default_bytes")));
+ Assert.True(message.HasField(f("default_int32")));
+ Assert.True(message.HasField(f("default_int64")));
+ Assert.True(message.HasField(f("default_uint32")));
+ Assert.True(message.HasField(f("default_uint64")));
+ Assert.True(message.HasField(f("default_sint32")));
+ Assert.True(message.HasField(f("default_sint64")));
+ Assert.True(message.HasField(f("default_fixed32")));
+ Assert.True(message.HasField(f("default_fixed64")));
+ Assert.True(message.HasField(f("default_sfixed32")));
+ Assert.True(message.HasField(f("default_sfixed64")));
+ Assert.True(message.HasField(f("default_float")));
+ Assert.True(message.HasField(f("default_double")));
+ Assert.True(message.HasField(f("default_bool")));
+ Assert.True(message.HasField(f("default_string")));
+ Assert.True(message.HasField(f("default_bytes")));
- Assert.IsTrue(message.HasField(f("default_nested_enum")));
- Assert.IsTrue(message.HasField(f("default_foreign_enum")));
- Assert.IsTrue(message.HasField(f("default_import_enum")));
+ Assert.True(message.HasField(f("default_nested_enum")));
+ Assert.True(message.HasField(f("default_foreign_enum")));
+ Assert.True(message.HasField(f("default_import_enum")));
- Assert.IsTrue(message.HasField(f("default_string_piece")));
- Assert.IsTrue(message.HasField(f("default_cord")));
+ Assert.True(message.HasField(f("default_string_piece")));
+ Assert.True(message.HasField(f("default_cord")));
- Assert.AreEqual(401, message[f("default_int32")]);
- Assert.AreEqual(402L, message[f("default_int64")]);
- Assert.AreEqual(403U, message[f("default_uint32")]);
- Assert.AreEqual(404UL, message[f("default_uint64")]);
- Assert.AreEqual(405, message[f("default_sint32")]);
- Assert.AreEqual(406L, message[f("default_sint64")]);
- Assert.AreEqual(407U, message[f("default_fixed32")]);
- Assert.AreEqual(408UL, message[f("default_fixed64")]);
- Assert.AreEqual(409, message[f("default_sfixed32")]);
- Assert.AreEqual(410L, message[f("default_sfixed64")]);
- Assert.AreEqual(411F, message[f("default_float")]);
- Assert.AreEqual(412D, message[f("default_double")]);
- Assert.AreEqual(false, message[f("default_bool")]);
- Assert.AreEqual("415", message[f("default_string")]);
- Assert.AreEqual(TestUtil.ToBytes("416"), message[f("default_bytes")]);
+ Assert.Equal(401, message[f("default_int32")]);
+ Assert.Equal(402L, message[f("default_int64")]);
+ Assert.Equal(403U, message[f("default_uint32")]);
+ Assert.Equal(404UL, message[f("default_uint64")]);
+ Assert.Equal(405, message[f("default_sint32")]);
+ Assert.Equal(406L, message[f("default_sint64")]);
+ Assert.Equal(407U, message[f("default_fixed32")]);
+ Assert.Equal(408UL, message[f("default_fixed64")]);
+ Assert.Equal(409, message[f("default_sfixed32")]);
+ Assert.Equal(410L, message[f("default_sfixed64")]);
+ Assert.Equal(411F, message[f("default_float")]);
+ Assert.Equal(412D, message[f("default_double")]);
+ Assert.Equal(false, message[f("default_bool")]);
+ Assert.Equal("415", message[f("default_string")]);
+ Assert.Equal(TestUtil.ToBytes("416"), message[f("default_bytes")]);
- Assert.AreEqual(nestedFoo, message[f("default_nested_enum")]);
- Assert.AreEqual(foreignFoo, message[f("default_foreign_enum")]);
- Assert.AreEqual(importFoo, message[f("default_import_enum")]);
+ Assert.Equal(nestedFoo, message[f("default_nested_enum")]);
+ Assert.Equal(foreignFoo, message[f("default_foreign_enum")]);
+ Assert.Equal(importFoo, message[f("default_import_enum")]);
- Assert.AreEqual("424", message[f("default_string_piece")]);
- Assert.AreEqual("425", message[f("default_cord")]);
+ Assert.Equal("424", message[f("default_string_piece")]);
+ Assert.Equal("425", message[f("default_cord")]);
}
/// <summary>
@@ -651,148 +651,148 @@
public void AssertClearViaReflection(IMessage message)
{
// has_blah() should initially be false for all optional fields.
- Assert.IsFalse(message.HasField(f("optional_int32")));
- Assert.IsFalse(message.HasField(f("optional_int64")));
- Assert.IsFalse(message.HasField(f("optional_uint32")));
- Assert.IsFalse(message.HasField(f("optional_uint64")));
- Assert.IsFalse(message.HasField(f("optional_sint32")));
- Assert.IsFalse(message.HasField(f("optional_sint64")));
- Assert.IsFalse(message.HasField(f("optional_fixed32")));
- Assert.IsFalse(message.HasField(f("optional_fixed64")));
- Assert.IsFalse(message.HasField(f("optional_sfixed32")));
- Assert.IsFalse(message.HasField(f("optional_sfixed64")));
- Assert.IsFalse(message.HasField(f("optional_float")));
- Assert.IsFalse(message.HasField(f("optional_double")));
- Assert.IsFalse(message.HasField(f("optional_bool")));
- Assert.IsFalse(message.HasField(f("optional_string")));
- Assert.IsFalse(message.HasField(f("optional_bytes")));
+ Assert.False(message.HasField(f("optional_int32")));
+ Assert.False(message.HasField(f("optional_int64")));
+ Assert.False(message.HasField(f("optional_uint32")));
+ Assert.False(message.HasField(f("optional_uint64")));
+ Assert.False(message.HasField(f("optional_sint32")));
+ Assert.False(message.HasField(f("optional_sint64")));
+ Assert.False(message.HasField(f("optional_fixed32")));
+ Assert.False(message.HasField(f("optional_fixed64")));
+ Assert.False(message.HasField(f("optional_sfixed32")));
+ Assert.False(message.HasField(f("optional_sfixed64")));
+ Assert.False(message.HasField(f("optional_float")));
+ Assert.False(message.HasField(f("optional_double")));
+ Assert.False(message.HasField(f("optional_bool")));
+ Assert.False(message.HasField(f("optional_string")));
+ Assert.False(message.HasField(f("optional_bytes")));
- Assert.IsFalse(message.HasField(f("optionalgroup")));
- Assert.IsFalse(message.HasField(f("optional_nested_message")));
- Assert.IsFalse(message.HasField(f("optional_foreign_message")));
- Assert.IsFalse(message.HasField(f("optional_import_message")));
+ Assert.False(message.HasField(f("optionalgroup")));
+ Assert.False(message.HasField(f("optional_nested_message")));
+ Assert.False(message.HasField(f("optional_foreign_message")));
+ Assert.False(message.HasField(f("optional_import_message")));
- Assert.IsFalse(message.HasField(f("optional_nested_enum")));
- Assert.IsFalse(message.HasField(f("optional_foreign_enum")));
- Assert.IsFalse(message.HasField(f("optional_import_enum")));
+ Assert.False(message.HasField(f("optional_nested_enum")));
+ Assert.False(message.HasField(f("optional_foreign_enum")));
+ Assert.False(message.HasField(f("optional_import_enum")));
- Assert.IsFalse(message.HasField(f("optional_string_piece")));
- Assert.IsFalse(message.HasField(f("optional_cord")));
+ Assert.False(message.HasField(f("optional_string_piece")));
+ Assert.False(message.HasField(f("optional_cord")));
// Optional fields without defaults are set to zero or something like it.
- Assert.AreEqual(0, message[f("optional_int32")]);
- Assert.AreEqual(0L, message[f("optional_int64")]);
- Assert.AreEqual(0U, message[f("optional_uint32")]);
- Assert.AreEqual(0UL, message[f("optional_uint64")]);
- Assert.AreEqual(0, message[f("optional_sint32")]);
- Assert.AreEqual(0L, message[f("optional_sint64")]);
- Assert.AreEqual(0U, message[f("optional_fixed32")]);
- Assert.AreEqual(0UL, message[f("optional_fixed64")]);
- Assert.AreEqual(0, message[f("optional_sfixed32")]);
- Assert.AreEqual(0L, message[f("optional_sfixed64")]);
- Assert.AreEqual(0F, message[f("optional_float")]);
- Assert.AreEqual(0D, message[f("optional_double")]);
- Assert.AreEqual(false, message[f("optional_bool")]);
- Assert.AreEqual("", message[f("optional_string")]);
- Assert.AreEqual(ByteString.Empty, message[f("optional_bytes")]);
+ Assert.Equal(0, message[f("optional_int32")]);
+ Assert.Equal(0L, message[f("optional_int64")]);
+ Assert.Equal(0U, message[f("optional_uint32")]);
+ Assert.Equal(0UL, message[f("optional_uint64")]);
+ Assert.Equal(0, message[f("optional_sint32")]);
+ Assert.Equal(0L, message[f("optional_sint64")]);
+ Assert.Equal(0U, message[f("optional_fixed32")]);
+ Assert.Equal(0UL, message[f("optional_fixed64")]);
+ Assert.Equal(0, message[f("optional_sfixed32")]);
+ Assert.Equal(0L, message[f("optional_sfixed64")]);
+ Assert.Equal(0F, message[f("optional_float")]);
+ Assert.Equal(0D, message[f("optional_double")]);
+ Assert.Equal(false, message[f("optional_bool")]);
+ Assert.Equal("", message[f("optional_string")]);
+ Assert.Equal(ByteString.Empty, message[f("optional_bytes")]);
// Embedded messages should also be clear.
- Assert.IsFalse(((IMessage) message[f("optionalgroup")]).HasField(groupA));
- Assert.IsFalse(((IMessage) message[f("optional_nested_message")])
+ Assert.False(((IMessage) message[f("optionalgroup")]).HasField(groupA));
+ Assert.False(((IMessage) message[f("optional_nested_message")])
.HasField(nestedB));
- Assert.IsFalse(((IMessage) message[f("optional_foreign_message")])
+ Assert.False(((IMessage) message[f("optional_foreign_message")])
.HasField(foreignC));
- Assert.IsFalse(((IMessage) message[f("optional_import_message")])
+ Assert.False(((IMessage) message[f("optional_import_message")])
.HasField(importD));
- Assert.AreEqual(0, ((IMessage) message[f("optionalgroup")])[groupA]);
- Assert.AreEqual(0, ((IMessage) message[f("optional_nested_message")])[nestedB]);
- Assert.AreEqual(0, ((IMessage) message[f("optional_foreign_message")])[foreignC]);
- Assert.AreEqual(0, ((IMessage) message[f("optional_import_message")])[importD]);
+ Assert.Equal(0, ((IMessage) message[f("optionalgroup")])[groupA]);
+ Assert.Equal(0, ((IMessage) message[f("optional_nested_message")])[nestedB]);
+ Assert.Equal(0, ((IMessage) message[f("optional_foreign_message")])[foreignC]);
+ Assert.Equal(0, ((IMessage) message[f("optional_import_message")])[importD]);
// Enums without defaults are set to the first value in the enum.
- Assert.AreEqual(nestedFoo, message[f("optional_nested_enum")]);
- Assert.AreEqual(foreignFoo, message[f("optional_foreign_enum")]);
- Assert.AreEqual(importFoo, message[f("optional_import_enum")]);
+ Assert.Equal(nestedFoo, message[f("optional_nested_enum")]);
+ Assert.Equal(foreignFoo, message[f("optional_foreign_enum")]);
+ Assert.Equal(importFoo, message[f("optional_import_enum")]);
- Assert.AreEqual("", message[f("optional_string_piece")]);
- Assert.AreEqual("", message[f("optional_cord")]);
+ Assert.Equal("", message[f("optional_string_piece")]);
+ Assert.Equal("", message[f("optional_cord")]);
// Repeated fields are empty.
- Assert.AreEqual(0, message.GetRepeatedFieldCount(f("repeated_int32")));
- Assert.AreEqual(0, message.GetRepeatedFieldCount(f("repeated_int64")));
- Assert.AreEqual(0, message.GetRepeatedFieldCount(f("repeated_uint32")));
- Assert.AreEqual(0, message.GetRepeatedFieldCount(f("repeated_uint64")));
- Assert.AreEqual(0, message.GetRepeatedFieldCount(f("repeated_sint32")));
- Assert.AreEqual(0, message.GetRepeatedFieldCount(f("repeated_sint64")));
- Assert.AreEqual(0, message.GetRepeatedFieldCount(f("repeated_fixed32")));
- Assert.AreEqual(0, message.GetRepeatedFieldCount(f("repeated_fixed64")));
- Assert.AreEqual(0, message.GetRepeatedFieldCount(f("repeated_sfixed32")));
- Assert.AreEqual(0, message.GetRepeatedFieldCount(f("repeated_sfixed64")));
- Assert.AreEqual(0, message.GetRepeatedFieldCount(f("repeated_float")));
- Assert.AreEqual(0, message.GetRepeatedFieldCount(f("repeated_double")));
- Assert.AreEqual(0, message.GetRepeatedFieldCount(f("repeated_bool")));
- Assert.AreEqual(0, message.GetRepeatedFieldCount(f("repeated_string")));
- Assert.AreEqual(0, message.GetRepeatedFieldCount(f("repeated_bytes")));
+ Assert.Equal(0, message.GetRepeatedFieldCount(f("repeated_int32")));
+ Assert.Equal(0, message.GetRepeatedFieldCount(f("repeated_int64")));
+ Assert.Equal(0, message.GetRepeatedFieldCount(f("repeated_uint32")));
+ Assert.Equal(0, message.GetRepeatedFieldCount(f("repeated_uint64")));
+ Assert.Equal(0, message.GetRepeatedFieldCount(f("repeated_sint32")));
+ Assert.Equal(0, message.GetRepeatedFieldCount(f("repeated_sint64")));
+ Assert.Equal(0, message.GetRepeatedFieldCount(f("repeated_fixed32")));
+ Assert.Equal(0, message.GetRepeatedFieldCount(f("repeated_fixed64")));
+ Assert.Equal(0, message.GetRepeatedFieldCount(f("repeated_sfixed32")));
+ Assert.Equal(0, message.GetRepeatedFieldCount(f("repeated_sfixed64")));
+ Assert.Equal(0, message.GetRepeatedFieldCount(f("repeated_float")));
+ Assert.Equal(0, message.GetRepeatedFieldCount(f("repeated_double")));
+ Assert.Equal(0, message.GetRepeatedFieldCount(f("repeated_bool")));
+ Assert.Equal(0, message.GetRepeatedFieldCount(f("repeated_string")));
+ Assert.Equal(0, message.GetRepeatedFieldCount(f("repeated_bytes")));
- Assert.AreEqual(0, message.GetRepeatedFieldCount(f("repeatedgroup")));
- Assert.AreEqual(0, message.GetRepeatedFieldCount(f("repeated_nested_message")));
- Assert.AreEqual(0, message.GetRepeatedFieldCount(f("repeated_foreign_message")));
- Assert.AreEqual(0, message.GetRepeatedFieldCount(f("repeated_import_message")));
- Assert.AreEqual(0, message.GetRepeatedFieldCount(f("repeated_nested_enum")));
- Assert.AreEqual(0, message.GetRepeatedFieldCount(f("repeated_foreign_enum")));
- Assert.AreEqual(0, message.GetRepeatedFieldCount(f("repeated_import_enum")));
+ Assert.Equal(0, message.GetRepeatedFieldCount(f("repeatedgroup")));
+ Assert.Equal(0, message.GetRepeatedFieldCount(f("repeated_nested_message")));
+ Assert.Equal(0, message.GetRepeatedFieldCount(f("repeated_foreign_message")));
+ Assert.Equal(0, message.GetRepeatedFieldCount(f("repeated_import_message")));
+ Assert.Equal(0, message.GetRepeatedFieldCount(f("repeated_nested_enum")));
+ Assert.Equal(0, message.GetRepeatedFieldCount(f("repeated_foreign_enum")));
+ Assert.Equal(0, message.GetRepeatedFieldCount(f("repeated_import_enum")));
- Assert.AreEqual(0, message.GetRepeatedFieldCount(f("repeated_string_piece")));
- Assert.AreEqual(0, message.GetRepeatedFieldCount(f("repeated_cord")));
+ Assert.Equal(0, message.GetRepeatedFieldCount(f("repeated_string_piece")));
+ Assert.Equal(0, message.GetRepeatedFieldCount(f("repeated_cord")));
// has_blah() should also be false for all default fields.
- Assert.IsFalse(message.HasField(f("default_int32")));
- Assert.IsFalse(message.HasField(f("default_int64")));
- Assert.IsFalse(message.HasField(f("default_uint32")));
- Assert.IsFalse(message.HasField(f("default_uint64")));
- Assert.IsFalse(message.HasField(f("default_sint32")));
- Assert.IsFalse(message.HasField(f("default_sint64")));
- Assert.IsFalse(message.HasField(f("default_fixed32")));
- Assert.IsFalse(message.HasField(f("default_fixed64")));
- Assert.IsFalse(message.HasField(f("default_sfixed32")));
- Assert.IsFalse(message.HasField(f("default_sfixed64")));
- Assert.IsFalse(message.HasField(f("default_float")));
- Assert.IsFalse(message.HasField(f("default_double")));
- Assert.IsFalse(message.HasField(f("default_bool")));
- Assert.IsFalse(message.HasField(f("default_string")));
- Assert.IsFalse(message.HasField(f("default_bytes")));
+ Assert.False(message.HasField(f("default_int32")));
+ Assert.False(message.HasField(f("default_int64")));
+ Assert.False(message.HasField(f("default_uint32")));
+ Assert.False(message.HasField(f("default_uint64")));
+ Assert.False(message.HasField(f("default_sint32")));
+ Assert.False(message.HasField(f("default_sint64")));
+ Assert.False(message.HasField(f("default_fixed32")));
+ Assert.False(message.HasField(f("default_fixed64")));
+ Assert.False(message.HasField(f("default_sfixed32")));
+ Assert.False(message.HasField(f("default_sfixed64")));
+ Assert.False(message.HasField(f("default_float")));
+ Assert.False(message.HasField(f("default_double")));
+ Assert.False(message.HasField(f("default_bool")));
+ Assert.False(message.HasField(f("default_string")));
+ Assert.False(message.HasField(f("default_bytes")));
- Assert.IsFalse(message.HasField(f("default_nested_enum")));
- Assert.IsFalse(message.HasField(f("default_foreign_enum")));
- Assert.IsFalse(message.HasField(f("default_import_enum")));
+ Assert.False(message.HasField(f("default_nested_enum")));
+ Assert.False(message.HasField(f("default_foreign_enum")));
+ Assert.False(message.HasField(f("default_import_enum")));
- Assert.IsFalse(message.HasField(f("default_string_piece")));
- Assert.IsFalse(message.HasField(f("default_cord")));
+ Assert.False(message.HasField(f("default_string_piece")));
+ Assert.False(message.HasField(f("default_cord")));
// Fields with defaults have their default values (duh).
- Assert.AreEqual(41, message[f("default_int32")]);
- Assert.AreEqual(42L, message[f("default_int64")]);
- Assert.AreEqual(43U, message[f("default_uint32")]);
- Assert.AreEqual(44UL, message[f("default_uint64")]);
- Assert.AreEqual(-45, message[f("default_sint32")]);
- Assert.AreEqual(46L, message[f("default_sint64")]);
- Assert.AreEqual(47U, message[f("default_fixed32")]);
- Assert.AreEqual(48UL, message[f("default_fixed64")]);
- Assert.AreEqual(49, message[f("default_sfixed32")]);
- Assert.AreEqual(-50L, message[f("default_sfixed64")]);
- Assert.AreEqual(51.5F, message[f("default_float")]);
- Assert.AreEqual(52e3D, message[f("default_double")]);
- Assert.AreEqual(true, message[f("default_bool")]);
- Assert.AreEqual("hello", message[f("default_string")]);
- Assert.AreEqual(TestUtil.ToBytes("world"), message[f("default_bytes")]);
+ Assert.Equal(41, message[f("default_int32")]);
+ Assert.Equal(42L, message[f("default_int64")]);
+ Assert.Equal(43U, message[f("default_uint32")]);
+ Assert.Equal(44UL, message[f("default_uint64")]);
+ Assert.Equal(-45, message[f("default_sint32")]);
+ Assert.Equal(46L, message[f("default_sint64")]);
+ Assert.Equal(47U, message[f("default_fixed32")]);
+ Assert.Equal(48UL, message[f("default_fixed64")]);
+ Assert.Equal(49, message[f("default_sfixed32")]);
+ Assert.Equal(-50L, message[f("default_sfixed64")]);
+ Assert.Equal(51.5F, message[f("default_float")]);
+ Assert.Equal(52e3D, message[f("default_double")]);
+ Assert.Equal(true, message[f("default_bool")]);
+ Assert.Equal("hello", message[f("default_string")]);
+ Assert.Equal(TestUtil.ToBytes("world"), message[f("default_bytes")]);
- Assert.AreEqual(nestedBar, message[f("default_nested_enum")]);
- Assert.AreEqual(foreignBar, message[f("default_foreign_enum")]);
- Assert.AreEqual(importBar, message[f("default_import_enum")]);
+ Assert.Equal(nestedBar, message[f("default_nested_enum")]);
+ Assert.Equal(foreignBar, message[f("default_foreign_enum")]);
+ Assert.Equal(importBar, message[f("default_import_enum")]);
- Assert.AreEqual("abc", message[f("default_string_piece")]);
- Assert.AreEqual("123", message[f("default_cord")]);
+ Assert.Equal("abc", message[f("default_string_piece")]);
+ Assert.Equal("123", message[f("default_cord")]);
}
// ---------------------------------------------------------------
@@ -802,88 +802,88 @@
// ModifyRepeatedFields only sets the second repeated element of each
// field. In addition to verifying this, we also verify that the first
// element and size were *not* modified.
- Assert.AreEqual(2, message.GetRepeatedFieldCount(f("repeated_int32")));
- Assert.AreEqual(2, message.GetRepeatedFieldCount(f("repeated_int64")));
- Assert.AreEqual(2, message.GetRepeatedFieldCount(f("repeated_uint32")));
- Assert.AreEqual(2, message.GetRepeatedFieldCount(f("repeated_uint64")));
- Assert.AreEqual(2, message.GetRepeatedFieldCount(f("repeated_sint32")));
- Assert.AreEqual(2, message.GetRepeatedFieldCount(f("repeated_sint64")));
- Assert.AreEqual(2, message.GetRepeatedFieldCount(f("repeated_fixed32")));
- Assert.AreEqual(2, message.GetRepeatedFieldCount(f("repeated_fixed64")));
- Assert.AreEqual(2, message.GetRepeatedFieldCount(f("repeated_sfixed32")));
- Assert.AreEqual(2, message.GetRepeatedFieldCount(f("repeated_sfixed64")));
- Assert.AreEqual(2, message.GetRepeatedFieldCount(f("repeated_float")));
- Assert.AreEqual(2, message.GetRepeatedFieldCount(f("repeated_double")));
- Assert.AreEqual(2, message.GetRepeatedFieldCount(f("repeated_bool")));
- Assert.AreEqual(2, message.GetRepeatedFieldCount(f("repeated_string")));
- Assert.AreEqual(2, message.GetRepeatedFieldCount(f("repeated_bytes")));
+ Assert.Equal(2, message.GetRepeatedFieldCount(f("repeated_int32")));
+ Assert.Equal(2, message.GetRepeatedFieldCount(f("repeated_int64")));
+ Assert.Equal(2, message.GetRepeatedFieldCount(f("repeated_uint32")));
+ Assert.Equal(2, message.GetRepeatedFieldCount(f("repeated_uint64")));
+ Assert.Equal(2, message.GetRepeatedFieldCount(f("repeated_sint32")));
+ Assert.Equal(2, message.GetRepeatedFieldCount(f("repeated_sint64")));
+ Assert.Equal(2, message.GetRepeatedFieldCount(f("repeated_fixed32")));
+ Assert.Equal(2, message.GetRepeatedFieldCount(f("repeated_fixed64")));
+ Assert.Equal(2, message.GetRepeatedFieldCount(f("repeated_sfixed32")));
+ Assert.Equal(2, message.GetRepeatedFieldCount(f("repeated_sfixed64")));
+ Assert.Equal(2, message.GetRepeatedFieldCount(f("repeated_float")));
+ Assert.Equal(2, message.GetRepeatedFieldCount(f("repeated_double")));
+ Assert.Equal(2, message.GetRepeatedFieldCount(f("repeated_bool")));
+ Assert.Equal(2, message.GetRepeatedFieldCount(f("repeated_string")));
+ Assert.Equal(2, message.GetRepeatedFieldCount(f("repeated_bytes")));
- Assert.AreEqual(2, message.GetRepeatedFieldCount(f("repeatedgroup")));
- Assert.AreEqual(2, message.GetRepeatedFieldCount(f("repeated_nested_message")));
- Assert.AreEqual(2, message.GetRepeatedFieldCount(f("repeated_foreign_message")));
- Assert.AreEqual(2, message.GetRepeatedFieldCount(f("repeated_import_message")));
- Assert.AreEqual(2, message.GetRepeatedFieldCount(f("repeated_nested_enum")));
- Assert.AreEqual(2, message.GetRepeatedFieldCount(f("repeated_foreign_enum")));
- Assert.AreEqual(2, message.GetRepeatedFieldCount(f("repeated_import_enum")));
+ Assert.Equal(2, message.GetRepeatedFieldCount(f("repeatedgroup")));
+ Assert.Equal(2, message.GetRepeatedFieldCount(f("repeated_nested_message")));
+ Assert.Equal(2, message.GetRepeatedFieldCount(f("repeated_foreign_message")));
+ Assert.Equal(2, message.GetRepeatedFieldCount(f("repeated_import_message")));
+ Assert.Equal(2, message.GetRepeatedFieldCount(f("repeated_nested_enum")));
+ Assert.Equal(2, message.GetRepeatedFieldCount(f("repeated_foreign_enum")));
+ Assert.Equal(2, message.GetRepeatedFieldCount(f("repeated_import_enum")));
- Assert.AreEqual(2, message.GetRepeatedFieldCount(f("repeated_string_piece")));
- Assert.AreEqual(2, message.GetRepeatedFieldCount(f("repeated_cord")));
+ Assert.Equal(2, message.GetRepeatedFieldCount(f("repeated_string_piece")));
+ Assert.Equal(2, message.GetRepeatedFieldCount(f("repeated_cord")));
- Assert.AreEqual(201, message[f("repeated_int32"), 0]);
- Assert.AreEqual(202L, message[f("repeated_int64"), 0]);
- Assert.AreEqual(203U, message[f("repeated_uint32"), 0]);
- Assert.AreEqual(204UL, message[f("repeated_uint64"), 0]);
- Assert.AreEqual(205, message[f("repeated_sint32"), 0]);
- Assert.AreEqual(206L, message[f("repeated_sint64"), 0]);
- Assert.AreEqual(207U, message[f("repeated_fixed32"), 0]);
- Assert.AreEqual(208UL, message[f("repeated_fixed64"), 0]);
- Assert.AreEqual(209, message[f("repeated_sfixed32"), 0]);
- Assert.AreEqual(210L, message[f("repeated_sfixed64"), 0]);
- Assert.AreEqual(211F, message[f("repeated_float"), 0]);
- Assert.AreEqual(212D, message[f("repeated_double"), 0]);
- Assert.AreEqual(true, message[f("repeated_bool"), 0]);
- Assert.AreEqual("215", message[f("repeated_string"), 0]);
- Assert.AreEqual(TestUtil.ToBytes("216"), message[f("repeated_bytes"), 0]);
+ Assert.Equal(201, message[f("repeated_int32"), 0]);
+ Assert.Equal(202L, message[f("repeated_int64"), 0]);
+ Assert.Equal(203U, message[f("repeated_uint32"), 0]);
+ Assert.Equal(204UL, message[f("repeated_uint64"), 0]);
+ Assert.Equal(205, message[f("repeated_sint32"), 0]);
+ Assert.Equal(206L, message[f("repeated_sint64"), 0]);
+ Assert.Equal(207U, message[f("repeated_fixed32"), 0]);
+ Assert.Equal(208UL, message[f("repeated_fixed64"), 0]);
+ Assert.Equal(209, message[f("repeated_sfixed32"), 0]);
+ Assert.Equal(210L, message[f("repeated_sfixed64"), 0]);
+ Assert.Equal(211F, message[f("repeated_float"), 0]);
+ Assert.Equal(212D, message[f("repeated_double"), 0]);
+ Assert.Equal(true, message[f("repeated_bool"), 0]);
+ Assert.Equal("215", message[f("repeated_string"), 0]);
+ Assert.Equal(TestUtil.ToBytes("216"), message[f("repeated_bytes"), 0]);
- Assert.AreEqual(217, ((IMessage) message[f("repeatedgroup"), 0])[repeatedGroupA]);
- Assert.AreEqual(218, ((IMessage) message[f("repeated_nested_message"), 0])[nestedB]);
- Assert.AreEqual(219, ((IMessage) message[f("repeated_foreign_message"), 0])[foreignC]);
- Assert.AreEqual(220, ((IMessage) message[f("repeated_import_message"), 0])[importD]);
+ Assert.Equal(217, ((IMessage) message[f("repeatedgroup"), 0])[repeatedGroupA]);
+ Assert.Equal(218, ((IMessage) message[f("repeated_nested_message"), 0])[nestedB]);
+ Assert.Equal(219, ((IMessage) message[f("repeated_foreign_message"), 0])[foreignC]);
+ Assert.Equal(220, ((IMessage) message[f("repeated_import_message"), 0])[importD]);
- Assert.AreEqual(nestedBar, message[f("repeated_nested_enum"), 0]);
- Assert.AreEqual(foreignBar, message[f("repeated_foreign_enum"), 0]);
- Assert.AreEqual(importBar, message[f("repeated_import_enum"), 0]);
+ Assert.Equal(nestedBar, message[f("repeated_nested_enum"), 0]);
+ Assert.Equal(foreignBar, message[f("repeated_foreign_enum"), 0]);
+ Assert.Equal(importBar, message[f("repeated_import_enum"), 0]);
- Assert.AreEqual("224", message[f("repeated_string_piece"), 0]);
- Assert.AreEqual("225", message[f("repeated_cord"), 0]);
+ Assert.Equal("224", message[f("repeated_string_piece"), 0]);
+ Assert.Equal("225", message[f("repeated_cord"), 0]);
- Assert.AreEqual(501, message[f("repeated_int32"), 1]);
- Assert.AreEqual(502L, message[f("repeated_int64"), 1]);
- Assert.AreEqual(503U, message[f("repeated_uint32"), 1]);
- Assert.AreEqual(504UL, message[f("repeated_uint64"), 1]);
- Assert.AreEqual(505, message[f("repeated_sint32"), 1]);
- Assert.AreEqual(506L, message[f("repeated_sint64"), 1]);
- Assert.AreEqual(507U, message[f("repeated_fixed32"), 1]);
- Assert.AreEqual(508UL, message[f("repeated_fixed64"), 1]);
- Assert.AreEqual(509, message[f("repeated_sfixed32"), 1]);
- Assert.AreEqual(510L, message[f("repeated_sfixed64"), 1]);
- Assert.AreEqual(511F, message[f("repeated_float"), 1]);
- Assert.AreEqual(512D, message[f("repeated_double"), 1]);
- Assert.AreEqual(true, message[f("repeated_bool"), 1]);
- Assert.AreEqual("515", message[f("repeated_string"), 1]);
- Assert.AreEqual(TestUtil.ToBytes("516"), message[f("repeated_bytes"), 1]);
+ Assert.Equal(501, message[f("repeated_int32"), 1]);
+ Assert.Equal(502L, message[f("repeated_int64"), 1]);
+ Assert.Equal(503U, message[f("repeated_uint32"), 1]);
+ Assert.Equal(504UL, message[f("repeated_uint64"), 1]);
+ Assert.Equal(505, message[f("repeated_sint32"), 1]);
+ Assert.Equal(506L, message[f("repeated_sint64"), 1]);
+ Assert.Equal(507U, message[f("repeated_fixed32"), 1]);
+ Assert.Equal(508UL, message[f("repeated_fixed64"), 1]);
+ Assert.Equal(509, message[f("repeated_sfixed32"), 1]);
+ Assert.Equal(510L, message[f("repeated_sfixed64"), 1]);
+ Assert.Equal(511F, message[f("repeated_float"), 1]);
+ Assert.Equal(512D, message[f("repeated_double"), 1]);
+ Assert.Equal(true, message[f("repeated_bool"), 1]);
+ Assert.Equal("515", message[f("repeated_string"), 1]);
+ Assert.Equal(TestUtil.ToBytes("516"), message[f("repeated_bytes"), 1]);
- Assert.AreEqual(517, ((IMessage) message[f("repeatedgroup"), 1])[repeatedGroupA]);
- Assert.AreEqual(518, ((IMessage) message[f("repeated_nested_message"), 1])[nestedB]);
- Assert.AreEqual(519, ((IMessage) message[f("repeated_foreign_message"), 1])[foreignC]);
- Assert.AreEqual(520, ((IMessage) message[f("repeated_import_message"), 1])[importD]);
+ Assert.Equal(517, ((IMessage) message[f("repeatedgroup"), 1])[repeatedGroupA]);
+ Assert.Equal(518, ((IMessage) message[f("repeated_nested_message"), 1])[nestedB]);
+ Assert.Equal(519, ((IMessage) message[f("repeated_foreign_message"), 1])[foreignC]);
+ Assert.Equal(520, ((IMessage) message[f("repeated_import_message"), 1])[importD]);
- Assert.AreEqual(nestedFoo, message[f("repeated_nested_enum"), 1]);
- Assert.AreEqual(foreignFoo, message[f("repeated_foreign_enum"), 1]);
- Assert.AreEqual(importFoo, message[f("repeated_import_enum"), 1]);
+ Assert.Equal(nestedFoo, message[f("repeated_nested_enum"), 1]);
+ Assert.Equal(foreignFoo, message[f("repeated_foreign_enum"), 1]);
+ Assert.Equal(importFoo, message[f("repeated_import_enum"), 1]);
- Assert.AreEqual("524", message[f("repeated_string_piece"), 1]);
- Assert.AreEqual("525", message[f("repeated_cord"), 1]);
+ Assert.Equal("524", message[f("repeated_string_piece"), 1]);
+ Assert.Equal("525", message[f("repeated_cord"), 1]);
}
/// <summary>
@@ -892,15 +892,15 @@
/// </summary>
public void AssertReflectionSettersRejectNull(IBuilder builder)
{
- TestUtil.AssertArgumentNullException(() => builder[f("optional_string")] = null);
- TestUtil.AssertArgumentNullException(() => builder[f("optional_bytes")] = null);
- TestUtil.AssertArgumentNullException(() => builder[f("optional_nested_enum")] = null);
- TestUtil.AssertArgumentNullException(() => builder[f("optional_nested_message")] = null);
- TestUtil.AssertArgumentNullException(() => builder[f("optional_nested_message")] = null);
- TestUtil.AssertArgumentNullException(() => builder.WeakAddRepeatedField(f("repeated_string"), null));
- TestUtil.AssertArgumentNullException(() => builder.WeakAddRepeatedField(f("repeated_bytes"), null));
- TestUtil.AssertArgumentNullException(() => builder.WeakAddRepeatedField(f("repeated_nested_enum"), null));
- TestUtil.AssertArgumentNullException(() => builder.WeakAddRepeatedField(f("repeated_nested_message"), null));
+ Assert.Throws<ArgumentNullException>(() => builder[f("optional_string")] = null);
+ Assert.Throws<ArgumentNullException>(() => builder[f("optional_bytes")] = null);
+ Assert.Throws<ArgumentNullException>(() => builder[f("optional_nested_enum")] = null);
+ Assert.Throws<ArgumentNullException>(() => builder[f("optional_nested_message")] = null);
+ Assert.Throws<ArgumentNullException>(() => builder[f("optional_nested_message")] = null);
+ Assert.Throws<ArgumentNullException>(() => builder.WeakAddRepeatedField(f("repeated_string"), null));
+ Assert.Throws<ArgumentNullException>(() => builder.WeakAddRepeatedField(f("repeated_bytes"), null));
+ Assert.Throws<ArgumentNullException>(() => builder.WeakAddRepeatedField(f("repeated_nested_enum"), null));
+ Assert.Throws<ArgumentNullException>(() => builder.WeakAddRepeatedField(f("repeated_nested_message"), null));
}
/// <summary>
@@ -910,14 +910,14 @@
public void AssertReflectionRepeatedSettersRejectNull(IBuilder builder)
{
builder.WeakAddRepeatedField(f("repeated_string"), "one");
- TestUtil.AssertArgumentNullException(() => builder.SetRepeatedField(f("repeated_string"), 0, null));
+ Assert.Throws<ArgumentNullException>(() => builder.SetRepeatedField(f("repeated_string"), 0, null));
builder.WeakAddRepeatedField(f("repeated_bytes"), TestUtil.ToBytes("one"));
- TestUtil.AssertArgumentNullException(() => builder.SetRepeatedField(f("repeated_bytes"), 0, null));
+ Assert.Throws<ArgumentNullException>(() => builder.SetRepeatedField(f("repeated_bytes"), 0, null));
builder.WeakAddRepeatedField(f("repeated_nested_enum"), nestedBaz);
- TestUtil.AssertArgumentNullException(() => builder.SetRepeatedField(f("repeated_nested_enum"), 0, null));
+ Assert.Throws<ArgumentNullException>(() => builder.SetRepeatedField(f("repeated_nested_enum"), 0, null));
builder.WeakAddRepeatedField(f("repeated_nested_message"),
new TestAllTypes.Types.NestedMessage.Builder {Bb = 218}.Build());
- TestUtil.AssertArgumentNullException(() => builder.SetRepeatedField(f("repeated_nested_message"), 0, null));
+ Assert.Throws<ArgumentNullException>(() => builder.SetRepeatedField(f("repeated_nested_message"), 0, null));
}
public void SetPackedFieldsViaReflection(IBuilder message)
@@ -955,50 +955,50 @@
public void AssertPackedFieldsSetViaReflection(IMessage message)
{
- Assert.AreEqual(2, message.GetRepeatedFieldCount(f("packed_int32")));
- Assert.AreEqual(2, message.GetRepeatedFieldCount(f("packed_int64")));
- Assert.AreEqual(2, message.GetRepeatedFieldCount(f("packed_uint32")));
- Assert.AreEqual(2, message.GetRepeatedFieldCount(f("packed_uint64")));
- Assert.AreEqual(2, message.GetRepeatedFieldCount(f("packed_sint32")));
- Assert.AreEqual(2, message.GetRepeatedFieldCount(f("packed_sint64")));
- Assert.AreEqual(2, message.GetRepeatedFieldCount(f("packed_fixed32")));
- Assert.AreEqual(2, message.GetRepeatedFieldCount(f("packed_fixed64")));
- Assert.AreEqual(2, message.GetRepeatedFieldCount(f("packed_sfixed32")));
- Assert.AreEqual(2, message.GetRepeatedFieldCount(f("packed_sfixed64")));
- Assert.AreEqual(2, message.GetRepeatedFieldCount(f("packed_float")));
- Assert.AreEqual(2, message.GetRepeatedFieldCount(f("packed_double")));
- Assert.AreEqual(2, message.GetRepeatedFieldCount(f("packed_bool")));
- Assert.AreEqual(2, message.GetRepeatedFieldCount(f("packed_enum")));
+ Assert.Equal(2, message.GetRepeatedFieldCount(f("packed_int32")));
+ Assert.Equal(2, message.GetRepeatedFieldCount(f("packed_int64")));
+ Assert.Equal(2, message.GetRepeatedFieldCount(f("packed_uint32")));
+ Assert.Equal(2, message.GetRepeatedFieldCount(f("packed_uint64")));
+ Assert.Equal(2, message.GetRepeatedFieldCount(f("packed_sint32")));
+ Assert.Equal(2, message.GetRepeatedFieldCount(f("packed_sint64")));
+ Assert.Equal(2, message.GetRepeatedFieldCount(f("packed_fixed32")));
+ Assert.Equal(2, message.GetRepeatedFieldCount(f("packed_fixed64")));
+ Assert.Equal(2, message.GetRepeatedFieldCount(f("packed_sfixed32")));
+ Assert.Equal(2, message.GetRepeatedFieldCount(f("packed_sfixed64")));
+ Assert.Equal(2, message.GetRepeatedFieldCount(f("packed_float")));
+ Assert.Equal(2, message.GetRepeatedFieldCount(f("packed_double")));
+ Assert.Equal(2, message.GetRepeatedFieldCount(f("packed_bool")));
+ Assert.Equal(2, message.GetRepeatedFieldCount(f("packed_enum")));
- Assert.AreEqual(601, message[f("packed_int32"), 0]);
- Assert.AreEqual(602L, message[f("packed_int64"), 0]);
- Assert.AreEqual(603u, message[f("packed_uint32"), 0]);
- Assert.AreEqual(604uL, message[f("packed_uint64"), 0]);
- Assert.AreEqual(605, message[f("packed_sint32"), 0]);
- Assert.AreEqual(606L, message[f("packed_sint64"), 0]);
- Assert.AreEqual(607u, message[f("packed_fixed32"), 0]);
- Assert.AreEqual(608uL, message[f("packed_fixed64"), 0]);
- Assert.AreEqual(609, message[f("packed_sfixed32"), 0]);
- Assert.AreEqual(610L, message[f("packed_sfixed64"), 0]);
- Assert.AreEqual(611F, message[f("packed_float"), 0]);
- Assert.AreEqual(612D, message[f("packed_double"), 0]);
- Assert.AreEqual(true, message[f("packed_bool"), 0]);
- Assert.AreEqual(foreignBar, message[f("packed_enum"), 0]);
+ Assert.Equal(601, message[f("packed_int32"), 0]);
+ Assert.Equal(602L, message[f("packed_int64"), 0]);
+ Assert.Equal(603u, message[f("packed_uint32"), 0]);
+ Assert.Equal(604uL, message[f("packed_uint64"), 0]);
+ Assert.Equal(605, message[f("packed_sint32"), 0]);
+ Assert.Equal(606L, message[f("packed_sint64"), 0]);
+ Assert.Equal(607u, message[f("packed_fixed32"), 0]);
+ Assert.Equal(608uL, message[f("packed_fixed64"), 0]);
+ Assert.Equal(609, message[f("packed_sfixed32"), 0]);
+ Assert.Equal(610L, message[f("packed_sfixed64"), 0]);
+ Assert.Equal(611F, message[f("packed_float"), 0]);
+ Assert.Equal(612D, message[f("packed_double"), 0]);
+ Assert.Equal(true, message[f("packed_bool"), 0]);
+ Assert.Equal(foreignBar, message[f("packed_enum"), 0]);
- Assert.AreEqual(701, message[f("packed_int32"), 1]);
- Assert.AreEqual(702L, message[f("packed_int64"), 1]);
- Assert.AreEqual(703u, message[f("packed_uint32"), 1]);
- Assert.AreEqual(704uL, message[f("packed_uint64"), 1]);
- Assert.AreEqual(705, message[f("packed_sint32"), 1]);
- Assert.AreEqual(706L, message[f("packed_sint64"), 1]);
- Assert.AreEqual(707u, message[f("packed_fixed32"), 1]);
- Assert.AreEqual(708uL, message[f("packed_fixed64"), 1]);
- Assert.AreEqual(709, message[f("packed_sfixed32"), 1]);
- Assert.AreEqual(710L, message[f("packed_sfixed64"), 1]);
- Assert.AreEqual(711F, message[f("packed_float"), 1]);
- Assert.AreEqual(712D, message[f("packed_double"), 1]);
- Assert.AreEqual(false, message[f("packed_bool"), 1]);
- Assert.AreEqual(foreignBaz, message[f("packed_enum"), 1]);
+ Assert.Equal(701, message[f("packed_int32"), 1]);
+ Assert.Equal(702L, message[f("packed_int64"), 1]);
+ Assert.Equal(703u, message[f("packed_uint32"), 1]);
+ Assert.Equal(704uL, message[f("packed_uint64"), 1]);
+ Assert.Equal(705, message[f("packed_sint32"), 1]);
+ Assert.Equal(706L, message[f("packed_sint64"), 1]);
+ Assert.Equal(707u, message[f("packed_fixed32"), 1]);
+ Assert.Equal(708uL, message[f("packed_fixed64"), 1]);
+ Assert.Equal(709, message[f("packed_sfixed32"), 1]);
+ Assert.Equal(710L, message[f("packed_sfixed64"), 1]);
+ Assert.Equal(711F, message[f("packed_float"), 1]);
+ Assert.Equal(712D, message[f("packed_double"), 1]);
+ Assert.Equal(false, message[f("packed_bool"), 1]);
+ Assert.Equal(foreignBaz, message[f("packed_enum"), 1]);
}
}
}
\ No newline at end of file
diff --git a/csharp/src/ProtocolBuffers.Test/ReusableBuilderTest.cs b/csharp/src/ProtocolBuffers.Test/ReusableBuilderTest.cs
index a63f657..e6b6a1b 100644
--- a/csharp/src/ProtocolBuffers.Test/ReusableBuilderTest.cs
+++ b/csharp/src/ProtocolBuffers.Test/ReusableBuilderTest.cs
@@ -1,48 +1,43 @@
using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Text;
using Google.ProtocolBuffers.Collections;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
using Google.ProtocolBuffers.TestProtos;
-using Google.ProtocolBuffers.Serialization;
using UnitTest.Issues.TestProtos;
+using Xunit;
namespace Google.ProtocolBuffers
{
- [TestClass]
public class ReusableBuilderTest
{
//Issue 28: Circular message dependencies result in null defaults for DefaultInstance
- [TestMethod]
+ [Fact]
public void EnsureStaticCicularReference()
{
MyMessageAReferenceB ab = MyMessageAReferenceB.DefaultInstance;
- Assert.IsNotNull(ab);
- Assert.IsNotNull(ab.Value);
+ Assert.NotNull(ab);
+ Assert.NotNull(ab.Value);
MyMessageBReferenceA ba = MyMessageBReferenceA.DefaultInstance;
- Assert.IsNotNull(ba);
- Assert.IsNotNull(ba.Value);
+ Assert.NotNull(ba);
+ Assert.NotNull(ba.Value);
}
- [TestMethod]
+ [Fact]
public void TestModifyDefaultInstance()
{
//verify that the default instance has correctly been marked as read-only
- Assert.AreEqual(typeof(PopsicleList<bool>), TestAllTypes.DefaultInstance.RepeatedBoolList.GetType());
+ Assert.Equal(typeof(PopsicleList<bool>), TestAllTypes.DefaultInstance.RepeatedBoolList.GetType());
PopsicleList<bool> list = (PopsicleList<bool>)TestAllTypes.DefaultInstance.RepeatedBoolList;
- Assert.IsTrue(list.IsReadOnly);
+ Assert.True(list.IsReadOnly);
}
- [TestMethod]
+ [Fact]
public void TestUnmodifiedDefaultInstance()
{
//Simply calling ToBuilder().Build() no longer creates a copy of the message
TestAllTypes.Builder builder = TestAllTypes.DefaultInstance.ToBuilder();
- Assert.IsTrue(ReferenceEquals(TestAllTypes.DefaultInstance, builder.Build()));
+ Assert.True(ReferenceEquals(TestAllTypes.DefaultInstance, builder.Build()));
}
- [TestMethod]
+ [Fact]
public void BuildMultipleWithoutChange()
{
//Calling Build() or BuildPartial() does not require a copy of the message
@@ -51,31 +46,31 @@
TestAllTypes first = builder.BuildPartial();
//Still the same instance?
- Assert.IsTrue(ReferenceEquals(first, builder.Build()));
+ Assert.True(ReferenceEquals(first, builder.Build()));
//Still the same instance?
- Assert.IsTrue(ReferenceEquals(first, builder.BuildPartial().ToBuilder().Build()));
+ Assert.True(ReferenceEquals(first, builder.BuildPartial().ToBuilder().Build()));
}
- [TestMethod]
+ [Fact]
public void MergeFromDefaultInstance()
{
TestAllTypes.Builder builder = TestAllTypes.DefaultInstance.ToBuilder();
- Assert.IsTrue(ReferenceEquals(TestAllTypes.DefaultInstance, builder.Build()));
+ Assert.True(ReferenceEquals(TestAllTypes.DefaultInstance, builder.Build()));
builder.MergeFrom(TestAllTypes.DefaultInstance);
- Assert.IsTrue(ReferenceEquals(TestAllTypes.DefaultInstance, builder.Build()));
+ Assert.True(ReferenceEquals(TestAllTypes.DefaultInstance, builder.Build()));
}
- [TestMethod]
+ [Fact]
public void BuildNewBuilderIsDefaultInstance()
{
- Assert.IsTrue(ReferenceEquals(TestAllTypes.DefaultInstance, new TestAllTypes.Builder().Build()));
- Assert.IsTrue(ReferenceEquals(TestAllTypes.DefaultInstance, TestAllTypes.CreateBuilder().Build()));
+ Assert.True(ReferenceEquals(TestAllTypes.DefaultInstance, new TestAllTypes.Builder().Build()));
+ Assert.True(ReferenceEquals(TestAllTypes.DefaultInstance, TestAllTypes.CreateBuilder().Build()));
//last test, if you clear a builder it reverts to default instance
- Assert.IsTrue(ReferenceEquals(TestAllTypes.DefaultInstance,
+ Assert.True(ReferenceEquals(TestAllTypes.DefaultInstance,
TestAllTypes.CreateBuilder().SetOptionalBool(true).Build().ToBuilder().Clear().Build()));
}
- [TestMethod]
+ [Fact]
public void BuildModifyAndRebuild()
{
TestAllTypes.Builder b1 = new TestAllTypes.Builder();
@@ -91,80 +86,80 @@
TestAllTypes m2 = b1.Build();
- Assert.AreEqual("{\"optional_foreign_message\":{},\"repeated_int32\":[2],\"default_int32\":1}", Extensions.ToJson(m1));
- Assert.AreEqual("{\"optional_foreign_message\":{\"c\":7},\"repeated_int32\":[2,6],\"default_int32\":5}", Extensions.ToJson(m2));
+ Assert.Equal("{\"optional_foreign_message\":{},\"repeated_int32\":[2],\"default_int32\":1}", Extensions.ToJson(m1));
+ Assert.Equal("{\"optional_foreign_message\":{\"c\":7},\"repeated_int32\":[2,6],\"default_int32\":5}", Extensions.ToJson(m2));
}
- [TestMethod]
+ [Fact]
public void CloneOnChangePrimitive()
{
TestAllTypes.Builder builder = TestAllTypes.DefaultInstance.ToBuilder();
- Assert.IsTrue(ReferenceEquals(TestAllTypes.DefaultInstance, builder.Build()));
+ Assert.True(ReferenceEquals(TestAllTypes.DefaultInstance, builder.Build()));
builder.SetDefaultBool(true);
- Assert.IsFalse(ReferenceEquals(TestAllTypes.DefaultInstance, builder.Build()));
+ Assert.False(ReferenceEquals(TestAllTypes.DefaultInstance, builder.Build()));
}
- [TestMethod]
+ [Fact]
public void CloneOnAddRepeatedBool()
{
TestAllTypes.Builder builder = TestAllTypes.DefaultInstance.ToBuilder();
- Assert.IsTrue(ReferenceEquals(TestAllTypes.DefaultInstance, builder.Build()));
+ Assert.True(ReferenceEquals(TestAllTypes.DefaultInstance, builder.Build()));
builder.AddRepeatedBool(true);
- Assert.IsFalse(ReferenceEquals(TestAllTypes.DefaultInstance, builder.Build()));
+ Assert.False(ReferenceEquals(TestAllTypes.DefaultInstance, builder.Build()));
}
- [TestMethod]
+ [Fact]
public void CloneOnGetRepeatedBoolList()
{
TestAllTypes.Builder builder = TestAllTypes.DefaultInstance.ToBuilder();
- Assert.IsTrue(ReferenceEquals(TestAllTypes.DefaultInstance, builder.Build()));
+ Assert.True(ReferenceEquals(TestAllTypes.DefaultInstance, builder.Build()));
GC.KeepAlive(builder.RepeatedBoolList);
- Assert.IsFalse(ReferenceEquals(TestAllTypes.DefaultInstance, builder.Build()));
+ Assert.False(ReferenceEquals(TestAllTypes.DefaultInstance, builder.Build()));
}
- [TestMethod]
+ [Fact]
public void CloneOnChangeMessage()
{
TestAllTypes.Builder builder = TestAllTypes.DefaultInstance.ToBuilder();
- Assert.IsTrue(ReferenceEquals(TestAllTypes.DefaultInstance, builder.Build()));
+ Assert.True(ReferenceEquals(TestAllTypes.DefaultInstance, builder.Build()));
builder.SetOptionalForeignMessage(new ForeignMessage.Builder());
- Assert.IsFalse(ReferenceEquals(TestAllTypes.DefaultInstance, builder.Build()));
+ Assert.False(ReferenceEquals(TestAllTypes.DefaultInstance, builder.Build()));
}
- [TestMethod]
+ [Fact]
public void CloneOnClearMessage()
{
TestAllTypes.Builder builder = TestAllTypes.DefaultInstance.ToBuilder();
- Assert.IsTrue(ReferenceEquals(TestAllTypes.DefaultInstance, builder.Build()));
+ Assert.True(ReferenceEquals(TestAllTypes.DefaultInstance, builder.Build()));
builder.ClearOptionalForeignMessage();
- Assert.IsFalse(ReferenceEquals(TestAllTypes.DefaultInstance, builder.Build()));
+ Assert.False(ReferenceEquals(TestAllTypes.DefaultInstance, builder.Build()));
}
- [TestMethod]
+ [Fact]
public void CloneOnGetRepeatedForeignMessageList()
{
TestAllTypes.Builder builder = TestAllTypes.DefaultInstance.ToBuilder();
- Assert.IsTrue(ReferenceEquals(TestAllTypes.DefaultInstance, builder.Build()));
+ Assert.True(ReferenceEquals(TestAllTypes.DefaultInstance, builder.Build()));
GC.KeepAlive(builder.RepeatedForeignMessageList);
- Assert.IsFalse(ReferenceEquals(TestAllTypes.DefaultInstance, builder.Build()));
+ Assert.False(ReferenceEquals(TestAllTypes.DefaultInstance, builder.Build()));
}
- [TestMethod]
+ [Fact]
public void CloneOnChangeEnumValue()
{
TestAllTypes.Builder builder = TestAllTypes.DefaultInstance.ToBuilder();
- Assert.IsTrue(ReferenceEquals(TestAllTypes.DefaultInstance, builder.Build()));
+ Assert.True(ReferenceEquals(TestAllTypes.DefaultInstance, builder.Build()));
builder.SetOptionalForeignEnum(ForeignEnum.FOREIGN_BAR);
- Assert.IsFalse(ReferenceEquals(TestAllTypes.DefaultInstance, builder.Build()));
+ Assert.False(ReferenceEquals(TestAllTypes.DefaultInstance, builder.Build()));
}
- [TestMethod]
+ [Fact]
public void CloneOnGetRepeatedForeignEnumList()
{
TestAllTypes.Builder builder = TestAllTypes.DefaultInstance.ToBuilder();
- Assert.IsTrue(ReferenceEquals(TestAllTypes.DefaultInstance, builder.Build()));
+ Assert.True(ReferenceEquals(TestAllTypes.DefaultInstance, builder.Build()));
GC.KeepAlive(builder.RepeatedForeignEnumList);
- Assert.IsFalse(ReferenceEquals(TestAllTypes.DefaultInstance, builder.Build()));
+ Assert.False(ReferenceEquals(TestAllTypes.DefaultInstance, builder.Build()));
}
}
diff --git a/csharp/src/ProtocolBuffers.Test/TestCornerCases.cs b/csharp/src/ProtocolBuffers.Test/TestCornerCases.cs
index 0be4e1d..5bec24f 100644
--- a/csharp/src/ProtocolBuffers.Test/TestCornerCases.cs
+++ b/csharp/src/ProtocolBuffers.Test/TestCornerCases.cs
@@ -1,15 +1,11 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using UnitTest.Issues.TestProtos;
+using UnitTest.Issues.TestProtos;
+using Xunit;
namespace Google.ProtocolBuffers
{
- [TestClass]
public class TestCornerCases
{
- [TestMethod]
+ [Fact]
public void TestRoundTripNegativeEnums()
{
NegativeEnumMessage msg = NegativeEnumMessage.CreateBuilder()
@@ -23,16 +19,16 @@
.AddPackedValues(NegativeEnum.FiveBelow) //10
.Build();
- Assert.AreEqual(58, msg.SerializedSize);
+ Assert.Equal(58, msg.SerializedSize);
byte[] bytes = new byte[58];
CodedOutputStream output = CodedOutputStream.CreateInstance(bytes);
msg.WriteTo(output);
- Assert.AreEqual(0, output.SpaceLeft);
+ Assert.Equal(0, output.SpaceLeft);
NegativeEnumMessage copy = NegativeEnumMessage.ParseFrom(bytes);
- Assert.AreEqual(msg, copy);
+ Assert.Equal(msg, copy);
}
}
}
diff --git a/csharp/src/ProtocolBuffers.Test/TestMimeMessageFormats.cs b/csharp/src/ProtocolBuffers.Test/TestMimeMessageFormats.cs
index c16f567..5caa2e2 100644
--- a/csharp/src/ProtocolBuffers.Test/TestMimeMessageFormats.cs
+++ b/csharp/src/ProtocolBuffers.Test/TestMimeMessageFormats.cs
@@ -5,11 +5,10 @@
using Google.ProtocolBuffers.Serialization;
using Google.ProtocolBuffers.Serialization.Http;
using Google.ProtocolBuffers.TestProtos;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Xunit;
namespace Google.ProtocolBuffers
{
- [TestClass]
public class TestMimeMessageFormats
{
// There is a whole host of various json mime types in use around the net, this is the set we accept...
@@ -17,85 +16,91 @@
readonly IEnumerable<string> XmlTypes = new string[] { "text/xml", "application/xml" };
readonly IEnumerable<string> ProtobufTypes = new string[] { "application/binary", "application/x-protobuf", "application/vnd.google.protobuf" };
- [TestMethod]
+ [Fact]
public void TestReadJsonMimeTypes()
{
foreach (string type in JsonTypes)
{
- Assert.IsTrue(
+ Assert.True(
MessageFormatFactory.CreateInputStream(new MessageFormatOptions(), type, Stream.Null)
is JsonFormatReader);
}
- Assert.IsTrue(
+ Assert.True(
MessageFormatFactory.CreateInputStream(new MessageFormatOptions() { DefaultContentType = "application/json" }, null, Stream.Null)
is JsonFormatReader);
}
- [TestMethod]
+
+ [Fact]
public void TestWriteJsonMimeTypes()
{
foreach (string type in JsonTypes)
{
- Assert.IsTrue(
+ Assert.True(
MessageFormatFactory.CreateOutputStream(new MessageFormatOptions(), type, Stream.Null)
is JsonFormatWriter);
}
- Assert.IsTrue(
+ Assert.True(
MessageFormatFactory.CreateOutputStream(new MessageFormatOptions() { DefaultContentType = "application/json" }, null, Stream.Null)
is JsonFormatWriter);
}
- [TestMethod]
+
+ [Fact]
public void TestReadXmlMimeTypes()
{
foreach (string type in XmlTypes)
{
- Assert.IsTrue(
+ Assert.True(
MessageFormatFactory.CreateInputStream(new MessageFormatOptions(), type, Stream.Null)
is XmlFormatReader);
}
- Assert.IsTrue(
+ Assert.True(
MessageFormatFactory.CreateInputStream(new MessageFormatOptions() { DefaultContentType = "application/xml" }, null, Stream.Null)
is XmlFormatReader);
}
- [TestMethod]
+
+ [Fact]
public void TestWriteXmlMimeTypes()
{
foreach (string type in XmlTypes)
{
- Assert.IsTrue(
+ Assert.True(
MessageFormatFactory.CreateOutputStream(new MessageFormatOptions(), type, Stream.Null)
is XmlFormatWriter);
}
- Assert.IsTrue(
+ Assert.True(
MessageFormatFactory.CreateOutputStream(new MessageFormatOptions() { DefaultContentType = "application/xml" }, null, Stream.Null)
is XmlFormatWriter);
}
- [TestMethod]
+
+ [Fact]
public void TestReadProtoMimeTypes()
{
foreach (string type in ProtobufTypes)
{
- Assert.IsTrue(
+ Assert.True(
MessageFormatFactory.CreateInputStream(new MessageFormatOptions(), type, Stream.Null)
is CodedInputStream);
}
- Assert.IsTrue(
+ Assert.True(
MessageFormatFactory.CreateInputStream(new MessageFormatOptions() { DefaultContentType = "application/vnd.google.protobuf" }, null, Stream.Null)
is CodedInputStream);
}
- [TestMethod]
+
+ [Fact]
public void TestWriteProtoMimeTypes()
{
foreach (string type in ProtobufTypes)
{
- Assert.IsTrue(
+ Assert.True(
MessageFormatFactory.CreateOutputStream(new MessageFormatOptions(), type, Stream.Null)
is CodedOutputStream);
}
- Assert.IsTrue(
+ Assert.True(
MessageFormatFactory.CreateOutputStream(new MessageFormatOptions() { DefaultContentType = "application/vnd.google.protobuf" }, null, Stream.Null)
is CodedOutputStream);
}
- [TestMethod]
+
+ [Fact]
public void TestMergeFromJsonType()
{
TestXmlMessage msg = Extensions.MergeFrom(new TestXmlMessage.Builder(),
@@ -103,10 +108,11 @@
Extensions.ToJson(TestXmlMessage.CreateBuilder().SetText("a").SetNumber(1).Build())
)))
.Build();
- Assert.AreEqual("a", msg.Text);
- Assert.AreEqual(1, msg.Number);
+ Assert.Equal("a", msg.Text);
+ Assert.Equal(1, msg.Number);
}
- [TestMethod]
+
+ [Fact]
public void TestMergeFromXmlType()
{
TestXmlMessage msg = Extensions.MergeFrom(new TestXmlMessage.Builder(),
@@ -114,10 +120,10 @@
Extensions.ToXml(TestXmlMessage.CreateBuilder().SetText("a").SetNumber(1).Build())
)))
.Build();
- Assert.AreEqual("a", msg.Text);
- Assert.AreEqual(1, msg.Number);
+ Assert.Equal("a", msg.Text);
+ Assert.Equal(1, msg.Number);
}
- [TestMethod]
+ [Fact]
public void TestMergeFromProtoType()
{
TestXmlMessage msg = Extensions.MergeFrom(new TestXmlMessage.Builder(),
@@ -125,28 +131,30 @@
TestXmlMessage.CreateBuilder().SetText("a").SetNumber(1).Build().ToByteArray()
))
.Build();
- Assert.AreEqual("a", msg.Text);
- Assert.AreEqual(1, msg.Number);
+ Assert.Equal("a", msg.Text);
+ Assert.Equal(1, msg.Number);
}
- [TestMethod]
+
+ [Fact]
public void TestWriteToJsonType()
{
MemoryStream ms = new MemoryStream();
Extensions.WriteTo(TestXmlMessage.CreateBuilder().SetText("a").SetNumber(1).Build(),
new MessageFormatOptions(), "application/json", ms);
- Assert.AreEqual(@"{""text"":""a"",""number"":1}", Encoding.UTF8.GetString(ms.ToArray(), 0, (int)ms.Length));
+ Assert.Equal(@"{""text"":""a"",""number"":1}", Encoding.UTF8.GetString(ms.ToArray(), 0, (int)ms.Length));
}
- [TestMethod]
+
+ [Fact]
public void TestWriteToXmlType()
{
MemoryStream ms = new MemoryStream();
Extensions.WriteTo(TestXmlMessage.CreateBuilder().SetText("a").SetNumber(1).Build(),
new MessageFormatOptions(), "application/xml", ms);
- Assert.AreEqual("<root><text>a</text><number>1</number></root>", Encoding.UTF8.GetString(ms.ToArray(), 0, (int)ms.Length));
+ Assert.Equal("<root><text>a</text><number>1</number></root>", Encoding.UTF8.GetString(ms.ToArray(), 0, (int)ms.Length));
}
- [TestMethod]
+ [Fact]
public void TestWriteToProtoType()
{
MemoryStream ms = new MemoryStream();
@@ -154,9 +162,10 @@
new MessageFormatOptions(), "application/vnd.google.protobuf", ms);
byte[] bytes = TestXmlMessage.CreateBuilder().SetText("a").SetNumber(1).Build().ToByteArray();
- TestUtil.AssertBytesEqual(bytes, ms.ToArray());
+ Assert.Equal(bytes, ms.ToArray());
}
- [TestMethod]
+
+ [Fact]
public void TestXmlReaderOptions()
{
MemoryStream ms = new MemoryStream();
@@ -175,12 +184,13 @@
options, "application/xml", ms)
.Build();
- Assert.AreEqual("a", msg.Text);
- Assert.AreEqual(1, msg.NumbersList[0]);
- Assert.AreEqual(2, msg.NumbersList[1]);
+ Assert.Equal("a", msg.Text);
+ Assert.Equal(1, msg.NumbersList[0]);
+ Assert.Equal(2, msg.NumbersList[1]);
}
- [TestMethod]
+
+ [Fact]
public void TestXmlWriterOptions()
{
TestXmlMessage message = TestXmlMessage.CreateBuilder().SetText("a").AddNumbers(1).AddNumbers(2).Build();
@@ -199,30 +209,32 @@
.SetOptions(XmlReaderOptions.ReadNestedArrays)
.Merge("root-node", builder);
- Assert.AreEqual("a", builder.Text);
- Assert.AreEqual(1, builder.NumbersList[0]);
- Assert.AreEqual(2, builder.NumbersList[1]);
+ Assert.Equal("a", builder.Text);
+ Assert.Equal(1, builder.NumbersList[0]);
+ Assert.Equal(2, builder.NumbersList[1]);
}
- [TestMethod]
+
+ [Fact]
public void TestJsonFormatted()
{
MemoryStream ms = new MemoryStream();
Extensions.WriteTo(TestXmlMessage.CreateBuilder().SetText("a").SetNumber(1).Build(),
new MessageFormatOptions() { FormattedOutput = true }, "application/json", ms);
- Assert.AreEqual("{\r\n \"text\": \"a\",\r\n \"number\": 1\r\n}", Encoding.UTF8.GetString(ms.ToArray(), 0, (int)ms.Length));
+ Assert.Equal("{\r\n \"text\": \"a\",\r\n \"number\": 1\r\n}", Encoding.UTF8.GetString(ms.ToArray(), 0, (int)ms.Length));
}
- [TestMethod]
+
+ [Fact]
public void TestXmlFormatted()
{
MemoryStream ms = new MemoryStream();
Extensions.WriteTo(TestXmlMessage.CreateBuilder().SetText("a").SetNumber(1).Build(),
new MessageFormatOptions() { FormattedOutput = true }, "application/xml", ms);
- Assert.AreEqual("<root>\r\n <text>a</text>\r\n <number>1</number>\r\n</root>", Encoding.UTF8.GetString(ms.ToArray(), 0, (int)ms.Length));
+ Assert.Equal("<root>\r\n <text>a</text>\r\n <number>1</number>\r\n</root>", Encoding.UTF8.GetString(ms.ToArray(), 0, (int)ms.Length));
}
- [TestMethod]
+ [Fact]
public void TestReadCustomMimeTypes()
{
var options = new MessageFormatOptions();
@@ -230,7 +242,7 @@
options.MimeInputTypes.Clear();
//Add our own
options.MimeInputTypes.Add("-custom-XML-mime-type-", XmlFormatReader.CreateInstance);
- Assert.AreEqual(1, options.MimeInputTypes.Count);
+ Assert.Equal(1, options.MimeInputTypes.Count);
Stream xmlStream = new MemoryStream(Encoding.UTF8.GetBytes(
Extensions.ToXml(TestXmlMessage.CreateBuilder().SetText("a").SetNumber(1).Build())
@@ -239,11 +251,11 @@
TestXmlMessage msg = Extensions.MergeFrom(new TestXmlMessage.Builder(),
options, "-custom-XML-mime-type-", xmlStream)
.Build();
- Assert.AreEqual("a", msg.Text);
- Assert.AreEqual(1, msg.Number);
+ Assert.Equal("a", msg.Text);
+ Assert.Equal(1, msg.Number);
}
- [TestMethod]
+ [Fact]
public void TestWriteToCustomType()
{
var options = new MessageFormatOptions();
@@ -252,13 +264,13 @@
//Add our own
options.MimeOutputTypes.Add("-custom-XML-mime-type-", XmlFormatWriter.CreateInstance);
- Assert.AreEqual(1, options.MimeOutputTypes.Count);
+ Assert.Equal(1, options.MimeOutputTypes.Count);
MemoryStream ms = new MemoryStream();
Extensions.WriteTo(TestXmlMessage.CreateBuilder().SetText("a").SetNumber(1).Build(),
options, "-custom-XML-mime-type-", ms);
- Assert.AreEqual("<root><text>a</text><number>1</number></root>", Encoding.UTF8.GetString(ms.ToArray(), 0, (int)ms.Length));
+ Assert.Equal("<root><text>a</text><number>1</number></root>", Encoding.UTF8.GetString(ms.ToArray(), 0, (int)ms.Length));
}
}
}
\ No newline at end of file
diff --git a/csharp/src/ProtocolBuffers.Test/TestReaderForUrlEncoded.cs b/csharp/src/ProtocolBuffers.Test/TestReaderForUrlEncoded.cs
index 1c43e24..b262667 100644
--- a/csharp/src/ProtocolBuffers.Test/TestReaderForUrlEncoded.cs
+++ b/csharp/src/ProtocolBuffers.Test/TestReaderForUrlEncoded.cs
@@ -1,16 +1,15 @@
using System;
using System.IO;
using System.Text;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
using Google.ProtocolBuffers.TestProtos;
using Google.ProtocolBuffers.Serialization.Http;
+using Xunit;
namespace Google.ProtocolBuffers
{
- [TestClass]
public class TestReaderForUrlEncoded
{
- [TestMethod]
+ [Fact]
public void Example_FromQueryString()
{
Uri sampleUri = new Uri("http://sample.com/Path/File.ext?text=two+three%20four&valid=true&numbers=1&numbers=2", UriKind.Absolute);
@@ -21,14 +20,14 @@
builder.MergeFrom(input);
TestXmlMessage message = builder.Build();
- Assert.AreEqual(true, message.Valid);
- Assert.AreEqual("two three four", message.Text);
- Assert.AreEqual(2, message.NumbersCount);
- Assert.AreEqual(1, message.NumbersList[0]);
- Assert.AreEqual(2, message.NumbersList[1]);
+ Assert.Equal(true, message.Valid);
+ Assert.Equal("two three four", message.Text);
+ Assert.Equal(2, message.NumbersCount);
+ Assert.Equal(1, message.NumbersList[0]);
+ Assert.Equal(2, message.NumbersList[1]);
}
- [TestMethod]
+ [Fact]
public void Example_FromFormData()
{
Stream rawPost = new MemoryStream(Encoding.UTF8.GetBytes("text=two+three%20four&valid=true&numbers=1&numbers=2"), false);
@@ -39,46 +38,46 @@
builder.MergeFrom(input);
TestXmlMessage message = builder.Build();
- Assert.AreEqual(true, message.Valid);
- Assert.AreEqual("two three four", message.Text);
- Assert.AreEqual(2, message.NumbersCount);
- Assert.AreEqual(1, message.NumbersList[0]);
- Assert.AreEqual(2, message.NumbersList[1]);
+ Assert.Equal(true, message.Valid);
+ Assert.Equal("two three four", message.Text);
+ Assert.Equal(2, message.NumbersCount);
+ Assert.Equal(1, message.NumbersList[0]);
+ Assert.Equal(2, message.NumbersList[1]);
}
- [TestMethod]
+ [Fact]
public void TestEmptyValues()
{
ICodedInputStream input = FormUrlEncodedReader.CreateInstance("valid=true&text=&numbers=1");
TestXmlMessage.Builder builder = TestXmlMessage.CreateBuilder();
builder.MergeFrom(input);
- Assert.IsTrue(builder.Valid);
- Assert.IsTrue(builder.HasText);
- Assert.AreEqual("", builder.Text);
- Assert.AreEqual(1, builder.NumbersCount);
- Assert.AreEqual(1, builder.NumbersList[0]);
+ Assert.True(builder.Valid);
+ Assert.True(builder.HasText);
+ Assert.Equal("", builder.Text);
+ Assert.Equal(1, builder.NumbersCount);
+ Assert.Equal(1, builder.NumbersList[0]);
}
- [TestMethod]
+ [Fact]
public void TestNoValue()
{
ICodedInputStream input = FormUrlEncodedReader.CreateInstance("valid=true&text&numbers=1");
TestXmlMessage.Builder builder = TestXmlMessage.CreateBuilder();
builder.MergeFrom(input);
- Assert.IsTrue(builder.Valid);
- Assert.IsTrue(builder.HasText);
- Assert.AreEqual("", builder.Text);
- Assert.AreEqual(1, builder.NumbersCount);
- Assert.AreEqual(1, builder.NumbersList[0]);
+ Assert.True(builder.Valid);
+ Assert.True(builder.HasText);
+ Assert.Equal("", builder.Text);
+ Assert.Equal(1, builder.NumbersCount);
+ Assert.Equal(1, builder.NumbersList[0]);
}
- [TestMethod, ExpectedException(typeof(NotSupportedException))]
+ [Fact]
public void FormUrlEncodedReaderDoesNotSupportChildren()
{
ICodedInputStream input = FormUrlEncodedReader.CreateInstance("child=uh0");
- TestXmlMessage.CreateBuilder().MergeFrom(input);
+ Assert.Throws<NotSupportedException>(() => TestXmlMessage.CreateBuilder().MergeFrom(input));
}
}
}
diff --git a/csharp/src/ProtocolBuffers.Test/TestUtil.cs b/csharp/src/ProtocolBuffers.Test/TestUtil.cs
index ec30cbc..83509c1 100644
--- a/csharp/src/ProtocolBuffers.Test/TestUtil.cs
+++ b/csharp/src/ProtocolBuffers.Test/TestUtil.cs
@@ -41,7 +41,7 @@
using System.Text;
using System.Threading;
using Google.ProtocolBuffers.TestProtos;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Xunit;
namespace Google.ProtocolBuffers
{
@@ -324,343 +324,343 @@
/// </summary>
internal static void AssertAllFieldsSet(TestAllTypes message)
{
- Assert.IsTrue(message.HasOptionalInt32);
- Assert.IsTrue(message.HasOptionalInt64);
- Assert.IsTrue(message.HasOptionalUint32);
- Assert.IsTrue(message.HasOptionalUint64);
- Assert.IsTrue(message.HasOptionalSint32);
- Assert.IsTrue(message.HasOptionalSint64);
- Assert.IsTrue(message.HasOptionalFixed32);
- Assert.IsTrue(message.HasOptionalFixed64);
- Assert.IsTrue(message.HasOptionalSfixed32);
- Assert.IsTrue(message.HasOptionalSfixed64);
- Assert.IsTrue(message.HasOptionalFloat);
- Assert.IsTrue(message.HasOptionalDouble);
- Assert.IsTrue(message.HasOptionalBool);
- Assert.IsTrue(message.HasOptionalString);
- Assert.IsTrue(message.HasOptionalBytes);
+ Assert.True(message.HasOptionalInt32);
+ Assert.True(message.HasOptionalInt64);
+ Assert.True(message.HasOptionalUint32);
+ Assert.True(message.HasOptionalUint64);
+ Assert.True(message.HasOptionalSint32);
+ Assert.True(message.HasOptionalSint64);
+ Assert.True(message.HasOptionalFixed32);
+ Assert.True(message.HasOptionalFixed64);
+ Assert.True(message.HasOptionalSfixed32);
+ Assert.True(message.HasOptionalSfixed64);
+ Assert.True(message.HasOptionalFloat);
+ Assert.True(message.HasOptionalDouble);
+ Assert.True(message.HasOptionalBool);
+ Assert.True(message.HasOptionalString);
+ Assert.True(message.HasOptionalBytes);
- Assert.IsTrue(message.HasOptionalGroup);
- Assert.IsTrue(message.HasOptionalNestedMessage);
- Assert.IsTrue(message.HasOptionalForeignMessage);
- Assert.IsTrue(message.HasOptionalImportMessage);
+ Assert.True(message.HasOptionalGroup);
+ Assert.True(message.HasOptionalNestedMessage);
+ Assert.True(message.HasOptionalForeignMessage);
+ Assert.True(message.HasOptionalImportMessage);
- Assert.IsTrue(message.OptionalGroup.HasA);
- Assert.IsTrue(message.OptionalNestedMessage.HasBb);
- Assert.IsTrue(message.OptionalForeignMessage.HasC);
- Assert.IsTrue(message.OptionalImportMessage.HasD);
+ Assert.True(message.OptionalGroup.HasA);
+ Assert.True(message.OptionalNestedMessage.HasBb);
+ Assert.True(message.OptionalForeignMessage.HasC);
+ Assert.True(message.OptionalImportMessage.HasD);
- Assert.IsTrue(message.HasOptionalNestedEnum);
- Assert.IsTrue(message.HasOptionalForeignEnum);
- Assert.IsTrue(message.HasOptionalImportEnum);
+ Assert.True(message.HasOptionalNestedEnum);
+ Assert.True(message.HasOptionalForeignEnum);
+ Assert.True(message.HasOptionalImportEnum);
- Assert.IsTrue(message.HasOptionalStringPiece);
- Assert.IsTrue(message.HasOptionalCord);
+ Assert.True(message.HasOptionalStringPiece);
+ Assert.True(message.HasOptionalCord);
- Assert.AreEqual(101, message.OptionalInt32);
- Assert.AreEqual(102, message.OptionalInt64);
- Assert.AreEqual(103u, message.OptionalUint32);
- Assert.AreEqual(104u, message.OptionalUint64);
- Assert.AreEqual(105, message.OptionalSint32);
- Assert.AreEqual(106, message.OptionalSint64);
- Assert.AreEqual(107u, message.OptionalFixed32);
- Assert.AreEqual(108u, message.OptionalFixed64);
- Assert.AreEqual(109, message.OptionalSfixed32);
- Assert.AreEqual(110, message.OptionalSfixed64);
- Assert.AreEqual(111, message.OptionalFloat);
- Assert.AreEqual(112, message.OptionalDouble);
- Assert.AreEqual(true, message.OptionalBool);
- Assert.AreEqual("115", message.OptionalString);
- Assert.AreEqual(ToBytes("116"), message.OptionalBytes);
+ Assert.Equal(101, message.OptionalInt32);
+ Assert.Equal(102, message.OptionalInt64);
+ Assert.Equal(103u, message.OptionalUint32);
+ Assert.Equal(104u, message.OptionalUint64);
+ Assert.Equal(105, message.OptionalSint32);
+ Assert.Equal(106, message.OptionalSint64);
+ Assert.Equal(107u, message.OptionalFixed32);
+ Assert.Equal(108u, message.OptionalFixed64);
+ Assert.Equal(109, message.OptionalSfixed32);
+ Assert.Equal(110, message.OptionalSfixed64);
+ Assert.Equal(111, message.OptionalFloat);
+ Assert.Equal(112, message.OptionalDouble);
+ Assert.Equal(true, message.OptionalBool);
+ Assert.Equal("115", message.OptionalString);
+ Assert.Equal(ToBytes("116"), message.OptionalBytes);
- Assert.AreEqual(117, message.OptionalGroup.A);
- Assert.AreEqual(118, message.OptionalNestedMessage.Bb);
- Assert.AreEqual(119, message.OptionalForeignMessage.C);
- Assert.AreEqual(120, message.OptionalImportMessage.D);
+ Assert.Equal(117, message.OptionalGroup.A);
+ Assert.Equal(118, message.OptionalNestedMessage.Bb);
+ Assert.Equal(119, message.OptionalForeignMessage.C);
+ Assert.Equal(120, message.OptionalImportMessage.D);
- Assert.AreEqual(TestAllTypes.Types.NestedEnum.BAZ, message.OptionalNestedEnum);
- Assert.AreEqual(ForeignEnum.FOREIGN_BAZ, message.OptionalForeignEnum);
- Assert.AreEqual(ImportEnum.IMPORT_BAZ, message.OptionalImportEnum);
+ Assert.Equal(TestAllTypes.Types.NestedEnum.BAZ, message.OptionalNestedEnum);
+ Assert.Equal(ForeignEnum.FOREIGN_BAZ, message.OptionalForeignEnum);
+ Assert.Equal(ImportEnum.IMPORT_BAZ, message.OptionalImportEnum);
- Assert.AreEqual("124", message.OptionalStringPiece);
- Assert.AreEqual("125", message.OptionalCord);
+ Assert.Equal("124", message.OptionalStringPiece);
+ Assert.Equal("125", message.OptionalCord);
// -----------------------------------------------------------------
- Assert.AreEqual(2, message.RepeatedInt32Count);
- Assert.AreEqual(2, message.RepeatedInt64Count);
- Assert.AreEqual(2, message.RepeatedUint32Count);
- Assert.AreEqual(2, message.RepeatedUint64Count);
- Assert.AreEqual(2, message.RepeatedSint32Count);
- Assert.AreEqual(2, message.RepeatedSint64Count);
- Assert.AreEqual(2, message.RepeatedFixed32Count);
- Assert.AreEqual(2, message.RepeatedFixed64Count);
- Assert.AreEqual(2, message.RepeatedSfixed32Count);
- Assert.AreEqual(2, message.RepeatedSfixed64Count);
- Assert.AreEqual(2, message.RepeatedFloatCount);
- Assert.AreEqual(2, message.RepeatedDoubleCount);
- Assert.AreEqual(2, message.RepeatedBoolCount);
- Assert.AreEqual(2, message.RepeatedStringCount);
- Assert.AreEqual(2, message.RepeatedBytesCount);
+ Assert.Equal(2, message.RepeatedInt32Count);
+ Assert.Equal(2, message.RepeatedInt64Count);
+ Assert.Equal(2, message.RepeatedUint32Count);
+ Assert.Equal(2, message.RepeatedUint64Count);
+ Assert.Equal(2, message.RepeatedSint32Count);
+ Assert.Equal(2, message.RepeatedSint64Count);
+ Assert.Equal(2, message.RepeatedFixed32Count);
+ Assert.Equal(2, message.RepeatedFixed64Count);
+ Assert.Equal(2, message.RepeatedSfixed32Count);
+ Assert.Equal(2, message.RepeatedSfixed64Count);
+ Assert.Equal(2, message.RepeatedFloatCount);
+ Assert.Equal(2, message.RepeatedDoubleCount);
+ Assert.Equal(2, message.RepeatedBoolCount);
+ Assert.Equal(2, message.RepeatedStringCount);
+ Assert.Equal(2, message.RepeatedBytesCount);
- Assert.AreEqual(2, message.RepeatedGroupCount);
- Assert.AreEqual(2, message.RepeatedNestedMessageCount);
- Assert.AreEqual(2, message.RepeatedForeignMessageCount);
- Assert.AreEqual(2, message.RepeatedImportMessageCount);
- Assert.AreEqual(2, message.RepeatedNestedEnumCount);
- Assert.AreEqual(2, message.RepeatedForeignEnumCount);
- Assert.AreEqual(2, message.RepeatedImportEnumCount);
+ Assert.Equal(2, message.RepeatedGroupCount);
+ Assert.Equal(2, message.RepeatedNestedMessageCount);
+ Assert.Equal(2, message.RepeatedForeignMessageCount);
+ Assert.Equal(2, message.RepeatedImportMessageCount);
+ Assert.Equal(2, message.RepeatedNestedEnumCount);
+ Assert.Equal(2, message.RepeatedForeignEnumCount);
+ Assert.Equal(2, message.RepeatedImportEnumCount);
- Assert.AreEqual(2, message.RepeatedStringPieceCount);
- Assert.AreEqual(2, message.RepeatedCordCount);
+ Assert.Equal(2, message.RepeatedStringPieceCount);
+ Assert.Equal(2, message.RepeatedCordCount);
- Assert.AreEqual(201, message.GetRepeatedInt32(0));
- Assert.AreEqual(202, message.GetRepeatedInt64(0));
- Assert.AreEqual(203u, message.GetRepeatedUint32(0));
- Assert.AreEqual(204u, message.GetRepeatedUint64(0));
- Assert.AreEqual(205, message.GetRepeatedSint32(0));
- Assert.AreEqual(206, message.GetRepeatedSint64(0));
- Assert.AreEqual(207u, message.GetRepeatedFixed32(0));
- Assert.AreEqual(208u, message.GetRepeatedFixed64(0));
- Assert.AreEqual(209, message.GetRepeatedSfixed32(0));
- Assert.AreEqual(210, message.GetRepeatedSfixed64(0));
- Assert.AreEqual(211, message.GetRepeatedFloat(0));
- Assert.AreEqual(212, message.GetRepeatedDouble(0));
- Assert.AreEqual(true, message.GetRepeatedBool(0));
- Assert.AreEqual("215", message.GetRepeatedString(0));
- Assert.AreEqual(ToBytes("216"), message.GetRepeatedBytes(0));
+ Assert.Equal(201, message.GetRepeatedInt32(0));
+ Assert.Equal(202, message.GetRepeatedInt64(0));
+ Assert.Equal(203u, message.GetRepeatedUint32(0));
+ Assert.Equal(204u, message.GetRepeatedUint64(0));
+ Assert.Equal(205, message.GetRepeatedSint32(0));
+ Assert.Equal(206, message.GetRepeatedSint64(0));
+ Assert.Equal(207u, message.GetRepeatedFixed32(0));
+ Assert.Equal(208u, message.GetRepeatedFixed64(0));
+ Assert.Equal(209, message.GetRepeatedSfixed32(0));
+ Assert.Equal(210, message.GetRepeatedSfixed64(0));
+ Assert.Equal(211, message.GetRepeatedFloat(0));
+ Assert.Equal(212, message.GetRepeatedDouble(0));
+ Assert.Equal(true, message.GetRepeatedBool(0));
+ Assert.Equal("215", message.GetRepeatedString(0));
+ Assert.Equal(ToBytes("216"), message.GetRepeatedBytes(0));
- Assert.AreEqual(217, message.GetRepeatedGroup(0).A);
- Assert.AreEqual(218, message.GetRepeatedNestedMessage(0).Bb);
- Assert.AreEqual(219, message.GetRepeatedForeignMessage(0).C);
- Assert.AreEqual(220, message.GetRepeatedImportMessage(0).D);
+ Assert.Equal(217, message.GetRepeatedGroup(0).A);
+ Assert.Equal(218, message.GetRepeatedNestedMessage(0).Bb);
+ Assert.Equal(219, message.GetRepeatedForeignMessage(0).C);
+ Assert.Equal(220, message.GetRepeatedImportMessage(0).D);
- Assert.AreEqual(TestAllTypes.Types.NestedEnum.BAR, message.GetRepeatedNestedEnum(0));
- Assert.AreEqual(ForeignEnum.FOREIGN_BAR, message.GetRepeatedForeignEnum(0));
- Assert.AreEqual(ImportEnum.IMPORT_BAR, message.GetRepeatedImportEnum(0));
+ Assert.Equal(TestAllTypes.Types.NestedEnum.BAR, message.GetRepeatedNestedEnum(0));
+ Assert.Equal(ForeignEnum.FOREIGN_BAR, message.GetRepeatedForeignEnum(0));
+ Assert.Equal(ImportEnum.IMPORT_BAR, message.GetRepeatedImportEnum(0));
- Assert.AreEqual("224", message.GetRepeatedStringPiece(0));
- Assert.AreEqual("225", message.GetRepeatedCord(0));
+ Assert.Equal("224", message.GetRepeatedStringPiece(0));
+ Assert.Equal("225", message.GetRepeatedCord(0));
- Assert.AreEqual(301, message.GetRepeatedInt32(1));
- Assert.AreEqual(302, message.GetRepeatedInt64(1));
- Assert.AreEqual(303u, message.GetRepeatedUint32(1));
- Assert.AreEqual(304u, message.GetRepeatedUint64(1));
- Assert.AreEqual(305, message.GetRepeatedSint32(1));
- Assert.AreEqual(306, message.GetRepeatedSint64(1));
- Assert.AreEqual(307u, message.GetRepeatedFixed32(1));
- Assert.AreEqual(308u, message.GetRepeatedFixed64(1));
- Assert.AreEqual(309, message.GetRepeatedSfixed32(1));
- Assert.AreEqual(310, message.GetRepeatedSfixed64(1));
- Assert.AreEqual(311, message.GetRepeatedFloat(1), 0.0);
- Assert.AreEqual(312, message.GetRepeatedDouble(1), 0.0);
- Assert.AreEqual(false, message.GetRepeatedBool(1));
- Assert.AreEqual("315", message.GetRepeatedString(1));
- Assert.AreEqual(ToBytes("316"), message.GetRepeatedBytes(1));
+ Assert.Equal(301, message.GetRepeatedInt32(1));
+ Assert.Equal(302, message.GetRepeatedInt64(1));
+ Assert.Equal(303u, message.GetRepeatedUint32(1));
+ Assert.Equal(304u, message.GetRepeatedUint64(1));
+ Assert.Equal(305, message.GetRepeatedSint32(1));
+ Assert.Equal(306, message.GetRepeatedSint64(1));
+ Assert.Equal(307u, message.GetRepeatedFixed32(1));
+ Assert.Equal(308u, message.GetRepeatedFixed64(1));
+ Assert.Equal(309, message.GetRepeatedSfixed32(1));
+ Assert.Equal(310, message.GetRepeatedSfixed64(1));
+ Assert.Equal(311f, message.GetRepeatedFloat(1));
+ Assert.Equal(312d, message.GetRepeatedDouble(1));
+ Assert.Equal(false, message.GetRepeatedBool(1));
+ Assert.Equal("315", message.GetRepeatedString(1));
+ Assert.Equal(ToBytes("316"), message.GetRepeatedBytes(1));
- Assert.AreEqual(317, message.GetRepeatedGroup(1).A);
- Assert.AreEqual(318, message.GetRepeatedNestedMessage(1).Bb);
- Assert.AreEqual(319, message.GetRepeatedForeignMessage(1).C);
- Assert.AreEqual(320, message.GetRepeatedImportMessage(1).D);
+ Assert.Equal(317, message.GetRepeatedGroup(1).A);
+ Assert.Equal(318, message.GetRepeatedNestedMessage(1).Bb);
+ Assert.Equal(319, message.GetRepeatedForeignMessage(1).C);
+ Assert.Equal(320, message.GetRepeatedImportMessage(1).D);
- Assert.AreEqual(TestAllTypes.Types.NestedEnum.BAZ, message.GetRepeatedNestedEnum(1));
- Assert.AreEqual(ForeignEnum.FOREIGN_BAZ, message.GetRepeatedForeignEnum(1));
- Assert.AreEqual(ImportEnum.IMPORT_BAZ, message.GetRepeatedImportEnum(1));
+ Assert.Equal(TestAllTypes.Types.NestedEnum.BAZ, message.GetRepeatedNestedEnum(1));
+ Assert.Equal(ForeignEnum.FOREIGN_BAZ, message.GetRepeatedForeignEnum(1));
+ Assert.Equal(ImportEnum.IMPORT_BAZ, message.GetRepeatedImportEnum(1));
- Assert.AreEqual("324", message.GetRepeatedStringPiece(1));
- Assert.AreEqual("325", message.GetRepeatedCord(1));
+ Assert.Equal("324", message.GetRepeatedStringPiece(1));
+ Assert.Equal("325", message.GetRepeatedCord(1));
// -----------------------------------------------------------------
- Assert.IsTrue(message.HasDefaultInt32);
- Assert.IsTrue(message.HasDefaultInt64);
- Assert.IsTrue(message.HasDefaultUint32);
- Assert.IsTrue(message.HasDefaultUint64);
- Assert.IsTrue(message.HasDefaultSint32);
- Assert.IsTrue(message.HasDefaultSint64);
- Assert.IsTrue(message.HasDefaultFixed32);
- Assert.IsTrue(message.HasDefaultFixed64);
- Assert.IsTrue(message.HasDefaultSfixed32);
- Assert.IsTrue(message.HasDefaultSfixed64);
- Assert.IsTrue(message.HasDefaultFloat);
- Assert.IsTrue(message.HasDefaultDouble);
- Assert.IsTrue(message.HasDefaultBool);
- Assert.IsTrue(message.HasDefaultString);
- Assert.IsTrue(message.HasDefaultBytes);
+ Assert.True(message.HasDefaultInt32);
+ Assert.True(message.HasDefaultInt64);
+ Assert.True(message.HasDefaultUint32);
+ Assert.True(message.HasDefaultUint64);
+ Assert.True(message.HasDefaultSint32);
+ Assert.True(message.HasDefaultSint64);
+ Assert.True(message.HasDefaultFixed32);
+ Assert.True(message.HasDefaultFixed64);
+ Assert.True(message.HasDefaultSfixed32);
+ Assert.True(message.HasDefaultSfixed64);
+ Assert.True(message.HasDefaultFloat);
+ Assert.True(message.HasDefaultDouble);
+ Assert.True(message.HasDefaultBool);
+ Assert.True(message.HasDefaultString);
+ Assert.True(message.HasDefaultBytes);
- Assert.IsTrue(message.HasDefaultNestedEnum);
- Assert.IsTrue(message.HasDefaultForeignEnum);
- Assert.IsTrue(message.HasDefaultImportEnum);
+ Assert.True(message.HasDefaultNestedEnum);
+ Assert.True(message.HasDefaultForeignEnum);
+ Assert.True(message.HasDefaultImportEnum);
- Assert.IsTrue(message.HasDefaultStringPiece);
- Assert.IsTrue(message.HasDefaultCord);
+ Assert.True(message.HasDefaultStringPiece);
+ Assert.True(message.HasDefaultCord);
- Assert.AreEqual(401, message.DefaultInt32);
- Assert.AreEqual(402, message.DefaultInt64);
- Assert.AreEqual(403u, message.DefaultUint32);
- Assert.AreEqual(404u, message.DefaultUint64);
- Assert.AreEqual(405, message.DefaultSint32);
- Assert.AreEqual(406, message.DefaultSint64);
- Assert.AreEqual(407u, message.DefaultFixed32);
- Assert.AreEqual(408u, message.DefaultFixed64);
- Assert.AreEqual(409, message.DefaultSfixed32);
- Assert.AreEqual(410, message.DefaultSfixed64);
- Assert.AreEqual(411, message.DefaultFloat);
- Assert.AreEqual(412, message.DefaultDouble);
- Assert.AreEqual(false, message.DefaultBool);
- Assert.AreEqual("415", message.DefaultString);
- Assert.AreEqual(ToBytes("416"), message.DefaultBytes);
+ Assert.Equal(401, message.DefaultInt32);
+ Assert.Equal(402, message.DefaultInt64);
+ Assert.Equal(403u, message.DefaultUint32);
+ Assert.Equal(404u, message.DefaultUint64);
+ Assert.Equal(405, message.DefaultSint32);
+ Assert.Equal(406, message.DefaultSint64);
+ Assert.Equal(407u, message.DefaultFixed32);
+ Assert.Equal(408u, message.DefaultFixed64);
+ Assert.Equal(409, message.DefaultSfixed32);
+ Assert.Equal(410, message.DefaultSfixed64);
+ Assert.Equal(411, message.DefaultFloat);
+ Assert.Equal(412, message.DefaultDouble);
+ Assert.Equal(false, message.DefaultBool);
+ Assert.Equal("415", message.DefaultString);
+ Assert.Equal(ToBytes("416"), message.DefaultBytes);
- Assert.AreEqual(TestAllTypes.Types.NestedEnum.FOO, message.DefaultNestedEnum);
- Assert.AreEqual(ForeignEnum.FOREIGN_FOO, message.DefaultForeignEnum);
- Assert.AreEqual(ImportEnum.IMPORT_FOO, message.DefaultImportEnum);
+ Assert.Equal(TestAllTypes.Types.NestedEnum.FOO, message.DefaultNestedEnum);
+ Assert.Equal(ForeignEnum.FOREIGN_FOO, message.DefaultForeignEnum);
+ Assert.Equal(ImportEnum.IMPORT_FOO, message.DefaultImportEnum);
- Assert.AreEqual("424", message.DefaultStringPiece);
- Assert.AreEqual("425", message.DefaultCord);
+ Assert.Equal("424", message.DefaultStringPiece);
+ Assert.Equal("425", message.DefaultCord);
}
internal static void AssertClear(TestAllTypes message)
{
// HasBlah() should initially be false for all optional fields.
- Assert.IsFalse(message.HasOptionalInt32);
- Assert.IsFalse(message.HasOptionalInt64);
- Assert.IsFalse(message.HasOptionalUint32);
- Assert.IsFalse(message.HasOptionalUint64);
- Assert.IsFalse(message.HasOptionalSint32);
- Assert.IsFalse(message.HasOptionalSint64);
- Assert.IsFalse(message.HasOptionalFixed32);
- Assert.IsFalse(message.HasOptionalFixed64);
- Assert.IsFalse(message.HasOptionalSfixed32);
- Assert.IsFalse(message.HasOptionalSfixed64);
- Assert.IsFalse(message.HasOptionalFloat);
- Assert.IsFalse(message.HasOptionalDouble);
- Assert.IsFalse(message.HasOptionalBool);
- Assert.IsFalse(message.HasOptionalString);
- Assert.IsFalse(message.HasOptionalBytes);
+ Assert.False(message.HasOptionalInt32);
+ Assert.False(message.HasOptionalInt64);
+ Assert.False(message.HasOptionalUint32);
+ Assert.False(message.HasOptionalUint64);
+ Assert.False(message.HasOptionalSint32);
+ Assert.False(message.HasOptionalSint64);
+ Assert.False(message.HasOptionalFixed32);
+ Assert.False(message.HasOptionalFixed64);
+ Assert.False(message.HasOptionalSfixed32);
+ Assert.False(message.HasOptionalSfixed64);
+ Assert.False(message.HasOptionalFloat);
+ Assert.False(message.HasOptionalDouble);
+ Assert.False(message.HasOptionalBool);
+ Assert.False(message.HasOptionalString);
+ Assert.False(message.HasOptionalBytes);
- Assert.IsFalse(message.HasOptionalGroup);
- Assert.IsFalse(message.HasOptionalNestedMessage);
- Assert.IsFalse(message.HasOptionalForeignMessage);
- Assert.IsFalse(message.HasOptionalImportMessage);
+ Assert.False(message.HasOptionalGroup);
+ Assert.False(message.HasOptionalNestedMessage);
+ Assert.False(message.HasOptionalForeignMessage);
+ Assert.False(message.HasOptionalImportMessage);
- Assert.IsFalse(message.HasOptionalNestedEnum);
- Assert.IsFalse(message.HasOptionalForeignEnum);
- Assert.IsFalse(message.HasOptionalImportEnum);
+ Assert.False(message.HasOptionalNestedEnum);
+ Assert.False(message.HasOptionalForeignEnum);
+ Assert.False(message.HasOptionalImportEnum);
- Assert.IsFalse(message.HasOptionalStringPiece);
- Assert.IsFalse(message.HasOptionalCord);
+ Assert.False(message.HasOptionalStringPiece);
+ Assert.False(message.HasOptionalCord);
// Optional fields without defaults are set to zero or something like it.
- Assert.AreEqual(0, message.OptionalInt32);
- Assert.AreEqual(0, message.OptionalInt64);
- Assert.AreEqual(0u, message.OptionalUint32);
- Assert.AreEqual(0u, message.OptionalUint64);
- Assert.AreEqual(0, message.OptionalSint32);
- Assert.AreEqual(0, message.OptionalSint64);
- Assert.AreEqual(0u, message.OptionalFixed32);
- Assert.AreEqual(0u, message.OptionalFixed64);
- Assert.AreEqual(0, message.OptionalSfixed32);
- Assert.AreEqual(0, message.OptionalSfixed64);
- Assert.AreEqual(0, message.OptionalFloat);
- Assert.AreEqual(0, message.OptionalDouble);
- Assert.AreEqual(false, message.OptionalBool);
- Assert.AreEqual("", message.OptionalString);
- Assert.AreEqual(ByteString.Empty, message.OptionalBytes);
+ Assert.Equal(0, message.OptionalInt32);
+ Assert.Equal(0, message.OptionalInt64);
+ Assert.Equal(0u, message.OptionalUint32);
+ Assert.Equal(0u, message.OptionalUint64);
+ Assert.Equal(0, message.OptionalSint32);
+ Assert.Equal(0, message.OptionalSint64);
+ Assert.Equal(0u, message.OptionalFixed32);
+ Assert.Equal(0u, message.OptionalFixed64);
+ Assert.Equal(0, message.OptionalSfixed32);
+ Assert.Equal(0, message.OptionalSfixed64);
+ Assert.Equal(0, message.OptionalFloat);
+ Assert.Equal(0, message.OptionalDouble);
+ Assert.Equal(false, message.OptionalBool);
+ Assert.Equal("", message.OptionalString);
+ Assert.Equal(ByteString.Empty, message.OptionalBytes);
// Embedded messages should also be clear.
- Assert.IsFalse(message.OptionalGroup.HasA);
- Assert.IsFalse(message.OptionalNestedMessage.HasBb);
- Assert.IsFalse(message.OptionalForeignMessage.HasC);
- Assert.IsFalse(message.OptionalImportMessage.HasD);
+ Assert.False(message.OptionalGroup.HasA);
+ Assert.False(message.OptionalNestedMessage.HasBb);
+ Assert.False(message.OptionalForeignMessage.HasC);
+ Assert.False(message.OptionalImportMessage.HasD);
- Assert.AreEqual(0, message.OptionalGroup.A);
- Assert.AreEqual(0, message.OptionalNestedMessage.Bb);
- Assert.AreEqual(0, message.OptionalForeignMessage.C);
- Assert.AreEqual(0, message.OptionalImportMessage.D);
+ Assert.Equal(0, message.OptionalGroup.A);
+ Assert.Equal(0, message.OptionalNestedMessage.Bb);
+ Assert.Equal(0, message.OptionalForeignMessage.C);
+ Assert.Equal(0, message.OptionalImportMessage.D);
// Enums without defaults are set to the first value in the enum.
- Assert.AreEqual(TestAllTypes.Types.NestedEnum.FOO, message.OptionalNestedEnum);
- Assert.AreEqual(ForeignEnum.FOREIGN_FOO, message.OptionalForeignEnum);
- Assert.AreEqual(ImportEnum.IMPORT_FOO, message.OptionalImportEnum);
+ Assert.Equal(TestAllTypes.Types.NestedEnum.FOO, message.OptionalNestedEnum);
+ Assert.Equal(ForeignEnum.FOREIGN_FOO, message.OptionalForeignEnum);
+ Assert.Equal(ImportEnum.IMPORT_FOO, message.OptionalImportEnum);
- Assert.AreEqual("", message.OptionalStringPiece);
- Assert.AreEqual("", message.OptionalCord);
+ Assert.Equal("", message.OptionalStringPiece);
+ Assert.Equal("", message.OptionalCord);
// Repeated fields are empty.
- Assert.AreEqual(0, message.RepeatedInt32Count);
- Assert.AreEqual(0, message.RepeatedInt64Count);
- Assert.AreEqual(0, message.RepeatedUint32Count);
- Assert.AreEqual(0, message.RepeatedUint64Count);
- Assert.AreEqual(0, message.RepeatedSint32Count);
- Assert.AreEqual(0, message.RepeatedSint64Count);
- Assert.AreEqual(0, message.RepeatedFixed32Count);
- Assert.AreEqual(0, message.RepeatedFixed64Count);
- Assert.AreEqual(0, message.RepeatedSfixed32Count);
- Assert.AreEqual(0, message.RepeatedSfixed64Count);
- Assert.AreEqual(0, message.RepeatedFloatCount);
- Assert.AreEqual(0, message.RepeatedDoubleCount);
- Assert.AreEqual(0, message.RepeatedBoolCount);
- Assert.AreEqual(0, message.RepeatedStringCount);
- Assert.AreEqual(0, message.RepeatedBytesCount);
+ Assert.Equal(0, message.RepeatedInt32Count);
+ Assert.Equal(0, message.RepeatedInt64Count);
+ Assert.Equal(0, message.RepeatedUint32Count);
+ Assert.Equal(0, message.RepeatedUint64Count);
+ Assert.Equal(0, message.RepeatedSint32Count);
+ Assert.Equal(0, message.RepeatedSint64Count);
+ Assert.Equal(0, message.RepeatedFixed32Count);
+ Assert.Equal(0, message.RepeatedFixed64Count);
+ Assert.Equal(0, message.RepeatedSfixed32Count);
+ Assert.Equal(0, message.RepeatedSfixed64Count);
+ Assert.Equal(0, message.RepeatedFloatCount);
+ Assert.Equal(0, message.RepeatedDoubleCount);
+ Assert.Equal(0, message.RepeatedBoolCount);
+ Assert.Equal(0, message.RepeatedStringCount);
+ Assert.Equal(0, message.RepeatedBytesCount);
- Assert.AreEqual(0, message.RepeatedGroupCount);
- Assert.AreEqual(0, message.RepeatedNestedMessageCount);
- Assert.AreEqual(0, message.RepeatedForeignMessageCount);
- Assert.AreEqual(0, message.RepeatedImportMessageCount);
- Assert.AreEqual(0, message.RepeatedNestedEnumCount);
- Assert.AreEqual(0, message.RepeatedForeignEnumCount);
- Assert.AreEqual(0, message.RepeatedImportEnumCount);
+ Assert.Equal(0, message.RepeatedGroupCount);
+ Assert.Equal(0, message.RepeatedNestedMessageCount);
+ Assert.Equal(0, message.RepeatedForeignMessageCount);
+ Assert.Equal(0, message.RepeatedImportMessageCount);
+ Assert.Equal(0, message.RepeatedNestedEnumCount);
+ Assert.Equal(0, message.RepeatedForeignEnumCount);
+ Assert.Equal(0, message.RepeatedImportEnumCount);
- Assert.AreEqual(0, message.RepeatedStringPieceCount);
- Assert.AreEqual(0, message.RepeatedCordCount);
+ Assert.Equal(0, message.RepeatedStringPieceCount);
+ Assert.Equal(0, message.RepeatedCordCount);
// HasBlah() should also be false for all default fields.
- Assert.IsFalse(message.HasDefaultInt32);
- Assert.IsFalse(message.HasDefaultInt64);
- Assert.IsFalse(message.HasDefaultUint32);
- Assert.IsFalse(message.HasDefaultUint64);
- Assert.IsFalse(message.HasDefaultSint32);
- Assert.IsFalse(message.HasDefaultSint64);
- Assert.IsFalse(message.HasDefaultFixed32);
- Assert.IsFalse(message.HasDefaultFixed64);
- Assert.IsFalse(message.HasDefaultSfixed32);
- Assert.IsFalse(message.HasDefaultSfixed64);
- Assert.IsFalse(message.HasDefaultFloat);
- Assert.IsFalse(message.HasDefaultDouble);
- Assert.IsFalse(message.HasDefaultBool);
- Assert.IsFalse(message.HasDefaultString);
- Assert.IsFalse(message.HasDefaultBytes);
+ Assert.False(message.HasDefaultInt32);
+ Assert.False(message.HasDefaultInt64);
+ Assert.False(message.HasDefaultUint32);
+ Assert.False(message.HasDefaultUint64);
+ Assert.False(message.HasDefaultSint32);
+ Assert.False(message.HasDefaultSint64);
+ Assert.False(message.HasDefaultFixed32);
+ Assert.False(message.HasDefaultFixed64);
+ Assert.False(message.HasDefaultSfixed32);
+ Assert.False(message.HasDefaultSfixed64);
+ Assert.False(message.HasDefaultFloat);
+ Assert.False(message.HasDefaultDouble);
+ Assert.False(message.HasDefaultBool);
+ Assert.False(message.HasDefaultString);
+ Assert.False(message.HasDefaultBytes);
- Assert.IsFalse(message.HasDefaultNestedEnum);
- Assert.IsFalse(message.HasDefaultForeignEnum);
- Assert.IsFalse(message.HasDefaultImportEnum);
+ Assert.False(message.HasDefaultNestedEnum);
+ Assert.False(message.HasDefaultForeignEnum);
+ Assert.False(message.HasDefaultImportEnum);
- Assert.IsFalse(message.HasDefaultStringPiece);
- Assert.IsFalse(message.HasDefaultCord);
+ Assert.False(message.HasDefaultStringPiece);
+ Assert.False(message.HasDefaultCord);
// Fields with defaults have their default values (duh).
- Assert.AreEqual(41, message.DefaultInt32);
- Assert.AreEqual(42, message.DefaultInt64);
- Assert.AreEqual(43u, message.DefaultUint32);
- Assert.AreEqual(44u, message.DefaultUint64);
- Assert.AreEqual(-45, message.DefaultSint32);
- Assert.AreEqual(46, message.DefaultSint64);
- Assert.AreEqual(47u, message.DefaultFixed32);
- Assert.AreEqual(48u, message.DefaultFixed64);
- Assert.AreEqual(49, message.DefaultSfixed32);
- Assert.AreEqual(-50, message.DefaultSfixed64);
- Assert.AreEqual(51.5, message.DefaultFloat, 0.0);
- Assert.AreEqual(52e3, message.DefaultDouble, 0.0);
- Assert.AreEqual(true, message.DefaultBool);
- Assert.AreEqual("hello", message.DefaultString);
- Assert.AreEqual(ToBytes("world"), message.DefaultBytes);
+ Assert.Equal(41, message.DefaultInt32);
+ Assert.Equal(42, message.DefaultInt64);
+ Assert.Equal(43u, message.DefaultUint32);
+ Assert.Equal(44u, message.DefaultUint64);
+ Assert.Equal(-45, message.DefaultSint32);
+ Assert.Equal(46, message.DefaultSint64);
+ Assert.Equal(47u, message.DefaultFixed32);
+ Assert.Equal(48u, message.DefaultFixed64);
+ Assert.Equal(49, message.DefaultSfixed32);
+ Assert.Equal(-50, message.DefaultSfixed64);
+ Assert.Equal(51.5f, message.DefaultFloat);
+ Assert.Equal(52e3d, message.DefaultDouble);
+ Assert.Equal(true, message.DefaultBool);
+ Assert.Equal("hello", message.DefaultString);
+ Assert.Equal(ToBytes("world"), message.DefaultBytes);
- Assert.AreEqual(TestAllTypes.Types.NestedEnum.BAR, message.DefaultNestedEnum);
- Assert.AreEqual(ForeignEnum.FOREIGN_BAR, message.DefaultForeignEnum);
- Assert.AreEqual(ImportEnum.IMPORT_BAR, message.DefaultImportEnum);
+ Assert.Equal(TestAllTypes.Types.NestedEnum.BAR, message.DefaultNestedEnum);
+ Assert.Equal(ForeignEnum.FOREIGN_BAR, message.DefaultForeignEnum);
+ Assert.Equal(ImportEnum.IMPORT_BAR, message.DefaultImportEnum);
- Assert.AreEqual("abc", message.DefaultStringPiece);
- Assert.AreEqual("123", message.DefaultCord);
+ Assert.Equal("abc", message.DefaultStringPiece);
+ Assert.Equal("123", message.DefaultCord);
}
/// <summary>
@@ -855,89 +855,89 @@
// ModifyRepeatedFields only sets the second repeated element of each
// field. In addition to verifying this, we also verify that the first
// element and size were *not* modified.
- Assert.AreEqual(2, message.RepeatedInt32Count);
- Assert.AreEqual(2, message.RepeatedInt64Count);
- Assert.AreEqual(2, message.RepeatedUint32Count);
- Assert.AreEqual(2, message.RepeatedUint64Count);
- Assert.AreEqual(2, message.RepeatedSint32Count);
- Assert.AreEqual(2, message.RepeatedSint64Count);
- Assert.AreEqual(2, message.RepeatedFixed32Count);
- Assert.AreEqual(2, message.RepeatedFixed64Count);
- Assert.AreEqual(2, message.RepeatedSfixed32Count);
- Assert.AreEqual(2, message.RepeatedSfixed64Count);
- Assert.AreEqual(2, message.RepeatedFloatCount);
- Assert.AreEqual(2, message.RepeatedDoubleCount);
- Assert.AreEqual(2, message.RepeatedBoolCount);
- Assert.AreEqual(2, message.RepeatedStringCount);
- Assert.AreEqual(2, message.RepeatedBytesCount);
+ Assert.Equal(2, message.RepeatedInt32Count);
+ Assert.Equal(2, message.RepeatedInt64Count);
+ Assert.Equal(2, message.RepeatedUint32Count);
+ Assert.Equal(2, message.RepeatedUint64Count);
+ Assert.Equal(2, message.RepeatedSint32Count);
+ Assert.Equal(2, message.RepeatedSint64Count);
+ Assert.Equal(2, message.RepeatedFixed32Count);
+ Assert.Equal(2, message.RepeatedFixed64Count);
+ Assert.Equal(2, message.RepeatedSfixed32Count);
+ Assert.Equal(2, message.RepeatedSfixed64Count);
+ Assert.Equal(2, message.RepeatedFloatCount);
+ Assert.Equal(2, message.RepeatedDoubleCount);
+ Assert.Equal(2, message.RepeatedBoolCount);
+ Assert.Equal(2, message.RepeatedStringCount);
+ Assert.Equal(2, message.RepeatedBytesCount);
- Assert.AreEqual(2, message.RepeatedGroupCount);
- Assert.AreEqual(2, message.RepeatedNestedMessageCount);
- Assert.AreEqual(2, message.RepeatedForeignMessageCount);
- Assert.AreEqual(2, message.RepeatedImportMessageCount);
- Assert.AreEqual(2, message.RepeatedNestedEnumCount);
- Assert.AreEqual(2, message.RepeatedForeignEnumCount);
- Assert.AreEqual(2, message.RepeatedImportEnumCount);
+ Assert.Equal(2, message.RepeatedGroupCount);
+ Assert.Equal(2, message.RepeatedNestedMessageCount);
+ Assert.Equal(2, message.RepeatedForeignMessageCount);
+ Assert.Equal(2, message.RepeatedImportMessageCount);
+ Assert.Equal(2, message.RepeatedNestedEnumCount);
+ Assert.Equal(2, message.RepeatedForeignEnumCount);
+ Assert.Equal(2, message.RepeatedImportEnumCount);
- Assert.AreEqual(2, message.RepeatedStringPieceCount);
- Assert.AreEqual(2, message.RepeatedCordCount);
+ Assert.Equal(2, message.RepeatedStringPieceCount);
+ Assert.Equal(2, message.RepeatedCordCount);
- Assert.AreEqual(201, message.GetRepeatedInt32(0));
- Assert.AreEqual(202L, message.GetRepeatedInt64(0));
- Assert.AreEqual(203U, message.GetRepeatedUint32(0));
- Assert.AreEqual(204UL, message.GetRepeatedUint64(0));
- Assert.AreEqual(205, message.GetRepeatedSint32(0));
- Assert.AreEqual(206L, message.GetRepeatedSint64(0));
- Assert.AreEqual(207U, message.GetRepeatedFixed32(0));
- Assert.AreEqual(208UL, message.GetRepeatedFixed64(0));
- Assert.AreEqual(209, message.GetRepeatedSfixed32(0));
- Assert.AreEqual(210L, message.GetRepeatedSfixed64(0));
- Assert.AreEqual(211F, message.GetRepeatedFloat(0));
- Assert.AreEqual(212D, message.GetRepeatedDouble(0));
- Assert.AreEqual(true, message.GetRepeatedBool(0));
- Assert.AreEqual("215", message.GetRepeatedString(0));
- Assert.AreEqual(ToBytes("216"), message.GetRepeatedBytes(0));
+ Assert.Equal(201, message.GetRepeatedInt32(0));
+ Assert.Equal(202L, message.GetRepeatedInt64(0));
+ Assert.Equal(203U, message.GetRepeatedUint32(0));
+ Assert.Equal(204UL, message.GetRepeatedUint64(0));
+ Assert.Equal(205, message.GetRepeatedSint32(0));
+ Assert.Equal(206L, message.GetRepeatedSint64(0));
+ Assert.Equal(207U, message.GetRepeatedFixed32(0));
+ Assert.Equal(208UL, message.GetRepeatedFixed64(0));
+ Assert.Equal(209, message.GetRepeatedSfixed32(0));
+ Assert.Equal(210L, message.GetRepeatedSfixed64(0));
+ Assert.Equal(211F, message.GetRepeatedFloat(0));
+ Assert.Equal(212D, message.GetRepeatedDouble(0));
+ Assert.Equal(true, message.GetRepeatedBool(0));
+ Assert.Equal("215", message.GetRepeatedString(0));
+ Assert.Equal(ToBytes("216"), message.GetRepeatedBytes(0));
- Assert.AreEqual(217, message.GetRepeatedGroup(0).A);
- Assert.AreEqual(218, message.GetRepeatedNestedMessage(0).Bb);
- Assert.AreEqual(219, message.GetRepeatedForeignMessage(0).C);
- Assert.AreEqual(220, message.GetRepeatedImportMessage(0).D);
+ Assert.Equal(217, message.GetRepeatedGroup(0).A);
+ Assert.Equal(218, message.GetRepeatedNestedMessage(0).Bb);
+ Assert.Equal(219, message.GetRepeatedForeignMessage(0).C);
+ Assert.Equal(220, message.GetRepeatedImportMessage(0).D);
- Assert.AreEqual(TestAllTypes.Types.NestedEnum.BAR, message.GetRepeatedNestedEnum(0));
- Assert.AreEqual(ForeignEnum.FOREIGN_BAR, message.GetRepeatedForeignEnum(0));
- Assert.AreEqual(ImportEnum.IMPORT_BAR, message.GetRepeatedImportEnum(0));
+ Assert.Equal(TestAllTypes.Types.NestedEnum.BAR, message.GetRepeatedNestedEnum(0));
+ Assert.Equal(ForeignEnum.FOREIGN_BAR, message.GetRepeatedForeignEnum(0));
+ Assert.Equal(ImportEnum.IMPORT_BAR, message.GetRepeatedImportEnum(0));
- Assert.AreEqual("224", message.GetRepeatedStringPiece(0));
- Assert.AreEqual("225", message.GetRepeatedCord(0));
+ Assert.Equal("224", message.GetRepeatedStringPiece(0));
+ Assert.Equal("225", message.GetRepeatedCord(0));
// Actually verify the second (modified) elements now.
- Assert.AreEqual(501, message.GetRepeatedInt32(1));
- Assert.AreEqual(502L, message.GetRepeatedInt64(1));
- Assert.AreEqual(503U, message.GetRepeatedUint32(1));
- Assert.AreEqual(504UL, message.GetRepeatedUint64(1));
- Assert.AreEqual(505, message.GetRepeatedSint32(1));
- Assert.AreEqual(506L, message.GetRepeatedSint64(1));
- Assert.AreEqual(507U, message.GetRepeatedFixed32(1));
- Assert.AreEqual(508UL, message.GetRepeatedFixed64(1));
- Assert.AreEqual(509, message.GetRepeatedSfixed32(1));
- Assert.AreEqual(510L, message.GetRepeatedSfixed64(1));
- Assert.AreEqual(511F, message.GetRepeatedFloat(1));
- Assert.AreEqual(512D, message.GetRepeatedDouble(1));
- Assert.AreEqual(true, message.GetRepeatedBool(1));
- Assert.AreEqual("515", message.GetRepeatedString(1));
- Assert.AreEqual(ToBytes("516"), message.GetRepeatedBytes(1));
+ Assert.Equal(501, message.GetRepeatedInt32(1));
+ Assert.Equal(502L, message.GetRepeatedInt64(1));
+ Assert.Equal(503U, message.GetRepeatedUint32(1));
+ Assert.Equal(504UL, message.GetRepeatedUint64(1));
+ Assert.Equal(505, message.GetRepeatedSint32(1));
+ Assert.Equal(506L, message.GetRepeatedSint64(1));
+ Assert.Equal(507U, message.GetRepeatedFixed32(1));
+ Assert.Equal(508UL, message.GetRepeatedFixed64(1));
+ Assert.Equal(509, message.GetRepeatedSfixed32(1));
+ Assert.Equal(510L, message.GetRepeatedSfixed64(1));
+ Assert.Equal(511F, message.GetRepeatedFloat(1));
+ Assert.Equal(512D, message.GetRepeatedDouble(1));
+ Assert.Equal(true, message.GetRepeatedBool(1));
+ Assert.Equal("515", message.GetRepeatedString(1));
+ Assert.Equal(ToBytes("516"), message.GetRepeatedBytes(1));
- Assert.AreEqual(517, message.GetRepeatedGroup(1).A);
- Assert.AreEqual(518, message.GetRepeatedNestedMessage(1).Bb);
- Assert.AreEqual(519, message.GetRepeatedForeignMessage(1).C);
- Assert.AreEqual(520, message.GetRepeatedImportMessage(1).D);
+ Assert.Equal(517, message.GetRepeatedGroup(1).A);
+ Assert.Equal(518, message.GetRepeatedNestedMessage(1).Bb);
+ Assert.Equal(519, message.GetRepeatedForeignMessage(1).C);
+ Assert.Equal(520, message.GetRepeatedImportMessage(1).D);
- Assert.AreEqual(TestAllTypes.Types.NestedEnum.FOO, message.GetRepeatedNestedEnum(1));
- Assert.AreEqual(ForeignEnum.FOREIGN_FOO, message.GetRepeatedForeignEnum(1));
- Assert.AreEqual(ImportEnum.IMPORT_FOO, message.GetRepeatedImportEnum(1));
+ Assert.Equal(TestAllTypes.Types.NestedEnum.FOO, message.GetRepeatedNestedEnum(1));
+ Assert.Equal(ForeignEnum.FOREIGN_FOO, message.GetRepeatedForeignEnum(1));
+ Assert.Equal(ImportEnum.IMPORT_FOO, message.GetRepeatedImportEnum(1));
- Assert.AreEqual("524", message.GetRepeatedStringPiece(1));
- Assert.AreEqual("525", message.GetRepeatedCord(1));
+ Assert.Equal("524", message.GetRepeatedStringPiece(1));
+ Assert.Equal("525", message.GetRepeatedCord(1));
}
/// <summary>
@@ -949,222 +949,222 @@
{
foreach (T secondElement in second)
{
- Assert.IsTrue(firstEnumerator.MoveNext(), "First enumerator ran out of elements too early.");
- Assert.AreEqual(firstEnumerator.Current, secondElement);
+ Assert.True(firstEnumerator.MoveNext(), "First enumerator ran out of elements too early.");
+ Assert.Equal(firstEnumerator.Current, secondElement);
}
- Assert.IsFalse(firstEnumerator.MoveNext(), "Second enumerator ran out of elements too early.");
+ Assert.False(firstEnumerator.MoveNext(), "Second enumerator ran out of elements too early.");
}
}
internal static void AssertEqualBytes(byte[] expected, byte[] actual)
{
- Assert.AreEqual(ByteString.CopyFrom(expected), ByteString.CopyFrom(actual));
+ Assert.Equal(ByteString.CopyFrom(expected), ByteString.CopyFrom(actual));
}
internal static void AssertAllExtensionsSet(TestAllExtensions message)
{
- Assert.IsTrue(message.HasExtension(Unittest.OptionalInt32Extension));
- Assert.IsTrue(message.HasExtension(Unittest.OptionalInt64Extension));
- Assert.IsTrue(message.HasExtension(Unittest.OptionalUint32Extension));
- Assert.IsTrue(message.HasExtension(Unittest.OptionalUint64Extension));
- Assert.IsTrue(message.HasExtension(Unittest.OptionalSint32Extension));
- Assert.IsTrue(message.HasExtension(Unittest.OptionalSint64Extension));
- Assert.IsTrue(message.HasExtension(Unittest.OptionalFixed32Extension));
- Assert.IsTrue(message.HasExtension(Unittest.OptionalFixed64Extension));
- Assert.IsTrue(message.HasExtension(Unittest.OptionalSfixed32Extension));
- Assert.IsTrue(message.HasExtension(Unittest.OptionalSfixed64Extension));
- Assert.IsTrue(message.HasExtension(Unittest.OptionalFloatExtension));
- Assert.IsTrue(message.HasExtension(Unittest.OptionalDoubleExtension));
- Assert.IsTrue(message.HasExtension(Unittest.OptionalBoolExtension));
- Assert.IsTrue(message.HasExtension(Unittest.OptionalStringExtension));
- Assert.IsTrue(message.HasExtension(Unittest.OptionalBytesExtension));
+ Assert.True(message.HasExtension(Unittest.OptionalInt32Extension));
+ Assert.True(message.HasExtension(Unittest.OptionalInt64Extension));
+ Assert.True(message.HasExtension(Unittest.OptionalUint32Extension));
+ Assert.True(message.HasExtension(Unittest.OptionalUint64Extension));
+ Assert.True(message.HasExtension(Unittest.OptionalSint32Extension));
+ Assert.True(message.HasExtension(Unittest.OptionalSint64Extension));
+ Assert.True(message.HasExtension(Unittest.OptionalFixed32Extension));
+ Assert.True(message.HasExtension(Unittest.OptionalFixed64Extension));
+ Assert.True(message.HasExtension(Unittest.OptionalSfixed32Extension));
+ Assert.True(message.HasExtension(Unittest.OptionalSfixed64Extension));
+ Assert.True(message.HasExtension(Unittest.OptionalFloatExtension));
+ Assert.True(message.HasExtension(Unittest.OptionalDoubleExtension));
+ Assert.True(message.HasExtension(Unittest.OptionalBoolExtension));
+ Assert.True(message.HasExtension(Unittest.OptionalStringExtension));
+ Assert.True(message.HasExtension(Unittest.OptionalBytesExtension));
- Assert.IsTrue(message.HasExtension(Unittest.OptionalGroupExtension));
- Assert.IsTrue(message.HasExtension(Unittest.OptionalNestedMessageExtension));
- Assert.IsTrue(message.HasExtension(Unittest.OptionalForeignMessageExtension));
- Assert.IsTrue(message.HasExtension(Unittest.OptionalImportMessageExtension));
+ Assert.True(message.HasExtension(Unittest.OptionalGroupExtension));
+ Assert.True(message.HasExtension(Unittest.OptionalNestedMessageExtension));
+ Assert.True(message.HasExtension(Unittest.OptionalForeignMessageExtension));
+ Assert.True(message.HasExtension(Unittest.OptionalImportMessageExtension));
- Assert.IsTrue(message.GetExtension(Unittest.OptionalGroupExtension).HasA);
- Assert.IsTrue(message.GetExtension(Unittest.OptionalNestedMessageExtension).HasBb);
- Assert.IsTrue(message.GetExtension(Unittest.OptionalForeignMessageExtension).HasC);
- Assert.IsTrue(message.GetExtension(Unittest.OptionalImportMessageExtension).HasD);
+ Assert.True(message.GetExtension(Unittest.OptionalGroupExtension).HasA);
+ Assert.True(message.GetExtension(Unittest.OptionalNestedMessageExtension).HasBb);
+ Assert.True(message.GetExtension(Unittest.OptionalForeignMessageExtension).HasC);
+ Assert.True(message.GetExtension(Unittest.OptionalImportMessageExtension).HasD);
- Assert.IsTrue(message.HasExtension(Unittest.OptionalNestedEnumExtension));
- Assert.IsTrue(message.HasExtension(Unittest.OptionalForeignEnumExtension));
- Assert.IsTrue(message.HasExtension(Unittest.OptionalImportEnumExtension));
+ Assert.True(message.HasExtension(Unittest.OptionalNestedEnumExtension));
+ Assert.True(message.HasExtension(Unittest.OptionalForeignEnumExtension));
+ Assert.True(message.HasExtension(Unittest.OptionalImportEnumExtension));
- Assert.IsTrue(message.HasExtension(Unittest.OptionalStringPieceExtension));
- Assert.IsTrue(message.HasExtension(Unittest.OptionalCordExtension));
+ Assert.True(message.HasExtension(Unittest.OptionalStringPieceExtension));
+ Assert.True(message.HasExtension(Unittest.OptionalCordExtension));
- Assert.AreEqual(101, message.GetExtension(Unittest.OptionalInt32Extension));
- Assert.AreEqual(102L, message.GetExtension(Unittest.OptionalInt64Extension));
- Assert.AreEqual(103U, message.GetExtension(Unittest.OptionalUint32Extension));
- Assert.AreEqual(104UL, message.GetExtension(Unittest.OptionalUint64Extension));
- Assert.AreEqual(105, message.GetExtension(Unittest.OptionalSint32Extension));
- Assert.AreEqual(106L, message.GetExtension(Unittest.OptionalSint64Extension));
- Assert.AreEqual(107U, message.GetExtension(Unittest.OptionalFixed32Extension));
- Assert.AreEqual(108UL, message.GetExtension(Unittest.OptionalFixed64Extension));
- Assert.AreEqual(109, message.GetExtension(Unittest.OptionalSfixed32Extension));
- Assert.AreEqual(110L, message.GetExtension(Unittest.OptionalSfixed64Extension));
- Assert.AreEqual(111F, message.GetExtension(Unittest.OptionalFloatExtension));
- Assert.AreEqual(112D, message.GetExtension(Unittest.OptionalDoubleExtension));
- Assert.AreEqual(true, message.GetExtension(Unittest.OptionalBoolExtension));
- Assert.AreEqual("115", message.GetExtension(Unittest.OptionalStringExtension));
- Assert.AreEqual(ToBytes("116"), message.GetExtension(Unittest.OptionalBytesExtension));
+ Assert.Equal(101, message.GetExtension(Unittest.OptionalInt32Extension));
+ Assert.Equal(102L, message.GetExtension(Unittest.OptionalInt64Extension));
+ Assert.Equal(103U, message.GetExtension(Unittest.OptionalUint32Extension));
+ Assert.Equal(104UL, message.GetExtension(Unittest.OptionalUint64Extension));
+ Assert.Equal(105, message.GetExtension(Unittest.OptionalSint32Extension));
+ Assert.Equal(106L, message.GetExtension(Unittest.OptionalSint64Extension));
+ Assert.Equal(107U, message.GetExtension(Unittest.OptionalFixed32Extension));
+ Assert.Equal(108UL, message.GetExtension(Unittest.OptionalFixed64Extension));
+ Assert.Equal(109, message.GetExtension(Unittest.OptionalSfixed32Extension));
+ Assert.Equal(110L, message.GetExtension(Unittest.OptionalSfixed64Extension));
+ Assert.Equal(111F, message.GetExtension(Unittest.OptionalFloatExtension));
+ Assert.Equal(112D, message.GetExtension(Unittest.OptionalDoubleExtension));
+ Assert.Equal(true, message.GetExtension(Unittest.OptionalBoolExtension));
+ Assert.Equal("115", message.GetExtension(Unittest.OptionalStringExtension));
+ Assert.Equal(ToBytes("116"), message.GetExtension(Unittest.OptionalBytesExtension));
- Assert.AreEqual(117, message.GetExtension(Unittest.OptionalGroupExtension).A);
- Assert.AreEqual(118, message.GetExtension(Unittest.OptionalNestedMessageExtension).Bb);
- Assert.AreEqual(119, message.GetExtension(Unittest.OptionalForeignMessageExtension).C);
- Assert.AreEqual(120, message.GetExtension(Unittest.OptionalImportMessageExtension).D);
+ Assert.Equal(117, message.GetExtension(Unittest.OptionalGroupExtension).A);
+ Assert.Equal(118, message.GetExtension(Unittest.OptionalNestedMessageExtension).Bb);
+ Assert.Equal(119, message.GetExtension(Unittest.OptionalForeignMessageExtension).C);
+ Assert.Equal(120, message.GetExtension(Unittest.OptionalImportMessageExtension).D);
- Assert.AreEqual(TestAllTypes.Types.NestedEnum.BAZ,
+ Assert.Equal(TestAllTypes.Types.NestedEnum.BAZ,
message.GetExtension(Unittest.OptionalNestedEnumExtension));
- Assert.AreEqual(ForeignEnum.FOREIGN_BAZ,
+ Assert.Equal(ForeignEnum.FOREIGN_BAZ,
message.GetExtension(Unittest.OptionalForeignEnumExtension));
- Assert.AreEqual(ImportEnum.IMPORT_BAZ, message.GetExtension(Unittest.OptionalImportEnumExtension));
+ Assert.Equal(ImportEnum.IMPORT_BAZ, message.GetExtension(Unittest.OptionalImportEnumExtension));
- Assert.AreEqual("124", message.GetExtension(Unittest.OptionalStringPieceExtension));
- Assert.AreEqual("125", message.GetExtension(Unittest.OptionalCordExtension));
+ Assert.Equal("124", message.GetExtension(Unittest.OptionalStringPieceExtension));
+ Assert.Equal("125", message.GetExtension(Unittest.OptionalCordExtension));
// -----------------------------------------------------------------
- Assert.AreEqual(2, message.GetExtensionCount(Unittest.RepeatedInt32Extension));
- Assert.AreEqual(2, message.GetExtensionCount(Unittest.RepeatedInt64Extension));
- Assert.AreEqual(2, message.GetExtensionCount(Unittest.RepeatedUint32Extension));
- Assert.AreEqual(2, message.GetExtensionCount(Unittest.RepeatedUint64Extension));
- Assert.AreEqual(2, message.GetExtensionCount(Unittest.RepeatedSint32Extension));
- Assert.AreEqual(2, message.GetExtensionCount(Unittest.RepeatedSint64Extension));
- Assert.AreEqual(2, message.GetExtensionCount(Unittest.RepeatedFixed32Extension));
- Assert.AreEqual(2, message.GetExtensionCount(Unittest.RepeatedFixed64Extension));
- Assert.AreEqual(2, message.GetExtensionCount(Unittest.RepeatedSfixed32Extension));
- Assert.AreEqual(2, message.GetExtensionCount(Unittest.RepeatedSfixed64Extension));
- Assert.AreEqual(2, message.GetExtensionCount(Unittest.RepeatedFloatExtension));
- Assert.AreEqual(2, message.GetExtensionCount(Unittest.RepeatedDoubleExtension));
- Assert.AreEqual(2, message.GetExtensionCount(Unittest.RepeatedBoolExtension));
- Assert.AreEqual(2, message.GetExtensionCount(Unittest.RepeatedStringExtension));
- Assert.AreEqual(2, message.GetExtensionCount(Unittest.RepeatedBytesExtension));
+ Assert.Equal(2, message.GetExtensionCount(Unittest.RepeatedInt32Extension));
+ Assert.Equal(2, message.GetExtensionCount(Unittest.RepeatedInt64Extension));
+ Assert.Equal(2, message.GetExtensionCount(Unittest.RepeatedUint32Extension));
+ Assert.Equal(2, message.GetExtensionCount(Unittest.RepeatedUint64Extension));
+ Assert.Equal(2, message.GetExtensionCount(Unittest.RepeatedSint32Extension));
+ Assert.Equal(2, message.GetExtensionCount(Unittest.RepeatedSint64Extension));
+ Assert.Equal(2, message.GetExtensionCount(Unittest.RepeatedFixed32Extension));
+ Assert.Equal(2, message.GetExtensionCount(Unittest.RepeatedFixed64Extension));
+ Assert.Equal(2, message.GetExtensionCount(Unittest.RepeatedSfixed32Extension));
+ Assert.Equal(2, message.GetExtensionCount(Unittest.RepeatedSfixed64Extension));
+ Assert.Equal(2, message.GetExtensionCount(Unittest.RepeatedFloatExtension));
+ Assert.Equal(2, message.GetExtensionCount(Unittest.RepeatedDoubleExtension));
+ Assert.Equal(2, message.GetExtensionCount(Unittest.RepeatedBoolExtension));
+ Assert.Equal(2, message.GetExtensionCount(Unittest.RepeatedStringExtension));
+ Assert.Equal(2, message.GetExtensionCount(Unittest.RepeatedBytesExtension));
- Assert.AreEqual(2, message.GetExtensionCount(Unittest.RepeatedGroupExtension));
- Assert.AreEqual(2, message.GetExtensionCount(Unittest.RepeatedNestedMessageExtension));
- Assert.AreEqual(2, message.GetExtensionCount(Unittest.RepeatedForeignMessageExtension));
- Assert.AreEqual(2, message.GetExtensionCount(Unittest.RepeatedImportMessageExtension));
- Assert.AreEqual(2, message.GetExtensionCount(Unittest.RepeatedNestedEnumExtension));
- Assert.AreEqual(2, message.GetExtensionCount(Unittest.RepeatedForeignEnumExtension));
- Assert.AreEqual(2, message.GetExtensionCount(Unittest.RepeatedImportEnumExtension));
+ Assert.Equal(2, message.GetExtensionCount(Unittest.RepeatedGroupExtension));
+ Assert.Equal(2, message.GetExtensionCount(Unittest.RepeatedNestedMessageExtension));
+ Assert.Equal(2, message.GetExtensionCount(Unittest.RepeatedForeignMessageExtension));
+ Assert.Equal(2, message.GetExtensionCount(Unittest.RepeatedImportMessageExtension));
+ Assert.Equal(2, message.GetExtensionCount(Unittest.RepeatedNestedEnumExtension));
+ Assert.Equal(2, message.GetExtensionCount(Unittest.RepeatedForeignEnumExtension));
+ Assert.Equal(2, message.GetExtensionCount(Unittest.RepeatedImportEnumExtension));
- Assert.AreEqual(2, message.GetExtensionCount(Unittest.RepeatedStringPieceExtension));
- Assert.AreEqual(2, message.GetExtensionCount(Unittest.RepeatedCordExtension));
+ Assert.Equal(2, message.GetExtensionCount(Unittest.RepeatedStringPieceExtension));
+ Assert.Equal(2, message.GetExtensionCount(Unittest.RepeatedCordExtension));
- Assert.AreEqual(201, message.GetExtension(Unittest.RepeatedInt32Extension, 0));
- Assert.AreEqual(202L, message.GetExtension(Unittest.RepeatedInt64Extension, 0));
- Assert.AreEqual(203U, message.GetExtension(Unittest.RepeatedUint32Extension, 0));
- Assert.AreEqual(204UL, message.GetExtension(Unittest.RepeatedUint64Extension, 0));
- Assert.AreEqual(205, message.GetExtension(Unittest.RepeatedSint32Extension, 0));
- Assert.AreEqual(206L, message.GetExtension(Unittest.RepeatedSint64Extension, 0));
- Assert.AreEqual(207U, message.GetExtension(Unittest.RepeatedFixed32Extension, 0));
- Assert.AreEqual(208UL, message.GetExtension(Unittest.RepeatedFixed64Extension, 0));
- Assert.AreEqual(209, message.GetExtension(Unittest.RepeatedSfixed32Extension, 0));
- Assert.AreEqual(210L, message.GetExtension(Unittest.RepeatedSfixed64Extension, 0));
- Assert.AreEqual(211F, message.GetExtension(Unittest.RepeatedFloatExtension, 0));
- Assert.AreEqual(212D, message.GetExtension(Unittest.RepeatedDoubleExtension, 0));
- Assert.AreEqual(true, message.GetExtension(Unittest.RepeatedBoolExtension, 0));
- Assert.AreEqual("215", message.GetExtension(Unittest.RepeatedStringExtension, 0));
- Assert.AreEqual(ToBytes("216"), message.GetExtension(Unittest.RepeatedBytesExtension, 0));
+ Assert.Equal(201, message.GetExtension(Unittest.RepeatedInt32Extension, 0));
+ Assert.Equal(202L, message.GetExtension(Unittest.RepeatedInt64Extension, 0));
+ Assert.Equal(203U, message.GetExtension(Unittest.RepeatedUint32Extension, 0));
+ Assert.Equal(204UL, message.GetExtension(Unittest.RepeatedUint64Extension, 0));
+ Assert.Equal(205, message.GetExtension(Unittest.RepeatedSint32Extension, 0));
+ Assert.Equal(206L, message.GetExtension(Unittest.RepeatedSint64Extension, 0));
+ Assert.Equal(207U, message.GetExtension(Unittest.RepeatedFixed32Extension, 0));
+ Assert.Equal(208UL, message.GetExtension(Unittest.RepeatedFixed64Extension, 0));
+ Assert.Equal(209, message.GetExtension(Unittest.RepeatedSfixed32Extension, 0));
+ Assert.Equal(210L, message.GetExtension(Unittest.RepeatedSfixed64Extension, 0));
+ Assert.Equal(211F, message.GetExtension(Unittest.RepeatedFloatExtension, 0));
+ Assert.Equal(212D, message.GetExtension(Unittest.RepeatedDoubleExtension, 0));
+ Assert.Equal(true, message.GetExtension(Unittest.RepeatedBoolExtension, 0));
+ Assert.Equal("215", message.GetExtension(Unittest.RepeatedStringExtension, 0));
+ Assert.Equal(ToBytes("216"), message.GetExtension(Unittest.RepeatedBytesExtension, 0));
- Assert.AreEqual(217, message.GetExtension(Unittest.RepeatedGroupExtension, 0).A);
- Assert.AreEqual(218, message.GetExtension(Unittest.RepeatedNestedMessageExtension, 0).Bb);
- Assert.AreEqual(219, message.GetExtension(Unittest.RepeatedForeignMessageExtension, 0).C);
- Assert.AreEqual(220, message.GetExtension(Unittest.RepeatedImportMessageExtension, 0).D);
+ Assert.Equal(217, message.GetExtension(Unittest.RepeatedGroupExtension, 0).A);
+ Assert.Equal(218, message.GetExtension(Unittest.RepeatedNestedMessageExtension, 0).Bb);
+ Assert.Equal(219, message.GetExtension(Unittest.RepeatedForeignMessageExtension, 0).C);
+ Assert.Equal(220, message.GetExtension(Unittest.RepeatedImportMessageExtension, 0).D);
- Assert.AreEqual(TestAllTypes.Types.NestedEnum.BAR,
+ Assert.Equal(TestAllTypes.Types.NestedEnum.BAR,
message.GetExtension(Unittest.RepeatedNestedEnumExtension, 0));
- Assert.AreEqual(ForeignEnum.FOREIGN_BAR,
+ Assert.Equal(ForeignEnum.FOREIGN_BAR,
message.GetExtension(Unittest.RepeatedForeignEnumExtension, 0));
- Assert.AreEqual(ImportEnum.IMPORT_BAR,
+ Assert.Equal(ImportEnum.IMPORT_BAR,
message.GetExtension(Unittest.RepeatedImportEnumExtension, 0));
- Assert.AreEqual("224", message.GetExtension(Unittest.RepeatedStringPieceExtension, 0));
- Assert.AreEqual("225", message.GetExtension(Unittest.RepeatedCordExtension, 0));
+ Assert.Equal("224", message.GetExtension(Unittest.RepeatedStringPieceExtension, 0));
+ Assert.Equal("225", message.GetExtension(Unittest.RepeatedCordExtension, 0));
- Assert.AreEqual(301, message.GetExtension(Unittest.RepeatedInt32Extension, 1));
- Assert.AreEqual(302L, message.GetExtension(Unittest.RepeatedInt64Extension, 1));
- Assert.AreEqual(303U, message.GetExtension(Unittest.RepeatedUint32Extension, 1));
- Assert.AreEqual(304UL, message.GetExtension(Unittest.RepeatedUint64Extension, 1));
- Assert.AreEqual(305, message.GetExtension(Unittest.RepeatedSint32Extension, 1));
- Assert.AreEqual(306L, message.GetExtension(Unittest.RepeatedSint64Extension, 1));
- Assert.AreEqual(307U, message.GetExtension(Unittest.RepeatedFixed32Extension, 1));
- Assert.AreEqual(308UL, message.GetExtension(Unittest.RepeatedFixed64Extension, 1));
- Assert.AreEqual(309, message.GetExtension(Unittest.RepeatedSfixed32Extension, 1));
- Assert.AreEqual(310L, message.GetExtension(Unittest.RepeatedSfixed64Extension, 1));
- Assert.AreEqual(311F, message.GetExtension(Unittest.RepeatedFloatExtension, 1));
- Assert.AreEqual(312D, message.GetExtension(Unittest.RepeatedDoubleExtension, 1));
- Assert.AreEqual(false, message.GetExtension(Unittest.RepeatedBoolExtension, 1));
- Assert.AreEqual("315", message.GetExtension(Unittest.RepeatedStringExtension, 1));
- Assert.AreEqual(ToBytes("316"), message.GetExtension(Unittest.RepeatedBytesExtension, 1));
+ Assert.Equal(301, message.GetExtension(Unittest.RepeatedInt32Extension, 1));
+ Assert.Equal(302L, message.GetExtension(Unittest.RepeatedInt64Extension, 1));
+ Assert.Equal(303U, message.GetExtension(Unittest.RepeatedUint32Extension, 1));
+ Assert.Equal(304UL, message.GetExtension(Unittest.RepeatedUint64Extension, 1));
+ Assert.Equal(305, message.GetExtension(Unittest.RepeatedSint32Extension, 1));
+ Assert.Equal(306L, message.GetExtension(Unittest.RepeatedSint64Extension, 1));
+ Assert.Equal(307U, message.GetExtension(Unittest.RepeatedFixed32Extension, 1));
+ Assert.Equal(308UL, message.GetExtension(Unittest.RepeatedFixed64Extension, 1));
+ Assert.Equal(309, message.GetExtension(Unittest.RepeatedSfixed32Extension, 1));
+ Assert.Equal(310L, message.GetExtension(Unittest.RepeatedSfixed64Extension, 1));
+ Assert.Equal(311F, message.GetExtension(Unittest.RepeatedFloatExtension, 1));
+ Assert.Equal(312D, message.GetExtension(Unittest.RepeatedDoubleExtension, 1));
+ Assert.Equal(false, message.GetExtension(Unittest.RepeatedBoolExtension, 1));
+ Assert.Equal("315", message.GetExtension(Unittest.RepeatedStringExtension, 1));
+ Assert.Equal(ToBytes("316"), message.GetExtension(Unittest.RepeatedBytesExtension, 1));
- Assert.AreEqual(317, message.GetExtension(Unittest.RepeatedGroupExtension, 1).A);
- Assert.AreEqual(318, message.GetExtension(Unittest.RepeatedNestedMessageExtension, 1).Bb);
- Assert.AreEqual(319, message.GetExtension(Unittest.RepeatedForeignMessageExtension, 1).C);
- Assert.AreEqual(320, message.GetExtension(Unittest.RepeatedImportMessageExtension, 1).D);
+ Assert.Equal(317, message.GetExtension(Unittest.RepeatedGroupExtension, 1).A);
+ Assert.Equal(318, message.GetExtension(Unittest.RepeatedNestedMessageExtension, 1).Bb);
+ Assert.Equal(319, message.GetExtension(Unittest.RepeatedForeignMessageExtension, 1).C);
+ Assert.Equal(320, message.GetExtension(Unittest.RepeatedImportMessageExtension, 1).D);
- Assert.AreEqual(TestAllTypes.Types.NestedEnum.BAZ,
+ Assert.Equal(TestAllTypes.Types.NestedEnum.BAZ,
message.GetExtension(Unittest.RepeatedNestedEnumExtension, 1));
- Assert.AreEqual(ForeignEnum.FOREIGN_BAZ,
+ Assert.Equal(ForeignEnum.FOREIGN_BAZ,
message.GetExtension(Unittest.RepeatedForeignEnumExtension, 1));
- Assert.AreEqual(ImportEnum.IMPORT_BAZ,
+ Assert.Equal(ImportEnum.IMPORT_BAZ,
message.GetExtension(Unittest.RepeatedImportEnumExtension, 1));
- Assert.AreEqual("324", message.GetExtension(Unittest.RepeatedStringPieceExtension, 1));
- Assert.AreEqual("325", message.GetExtension(Unittest.RepeatedCordExtension, 1));
+ Assert.Equal("324", message.GetExtension(Unittest.RepeatedStringPieceExtension, 1));
+ Assert.Equal("325", message.GetExtension(Unittest.RepeatedCordExtension, 1));
// -----------------------------------------------------------------
- Assert.IsTrue(message.HasExtension(Unittest.DefaultInt32Extension));
- Assert.IsTrue(message.HasExtension(Unittest.DefaultInt64Extension));
- Assert.IsTrue(message.HasExtension(Unittest.DefaultUint32Extension));
- Assert.IsTrue(message.HasExtension(Unittest.DefaultUint64Extension));
- Assert.IsTrue(message.HasExtension(Unittest.DefaultSint32Extension));
- Assert.IsTrue(message.HasExtension(Unittest.DefaultSint64Extension));
- Assert.IsTrue(message.HasExtension(Unittest.DefaultFixed32Extension));
- Assert.IsTrue(message.HasExtension(Unittest.DefaultFixed64Extension));
- Assert.IsTrue(message.HasExtension(Unittest.DefaultSfixed32Extension));
- Assert.IsTrue(message.HasExtension(Unittest.DefaultSfixed64Extension));
- Assert.IsTrue(message.HasExtension(Unittest.DefaultFloatExtension));
- Assert.IsTrue(message.HasExtension(Unittest.DefaultDoubleExtension));
- Assert.IsTrue(message.HasExtension(Unittest.DefaultBoolExtension));
- Assert.IsTrue(message.HasExtension(Unittest.DefaultStringExtension));
- Assert.IsTrue(message.HasExtension(Unittest.DefaultBytesExtension));
+ Assert.True(message.HasExtension(Unittest.DefaultInt32Extension));
+ Assert.True(message.HasExtension(Unittest.DefaultInt64Extension));
+ Assert.True(message.HasExtension(Unittest.DefaultUint32Extension));
+ Assert.True(message.HasExtension(Unittest.DefaultUint64Extension));
+ Assert.True(message.HasExtension(Unittest.DefaultSint32Extension));
+ Assert.True(message.HasExtension(Unittest.DefaultSint64Extension));
+ Assert.True(message.HasExtension(Unittest.DefaultFixed32Extension));
+ Assert.True(message.HasExtension(Unittest.DefaultFixed64Extension));
+ Assert.True(message.HasExtension(Unittest.DefaultSfixed32Extension));
+ Assert.True(message.HasExtension(Unittest.DefaultSfixed64Extension));
+ Assert.True(message.HasExtension(Unittest.DefaultFloatExtension));
+ Assert.True(message.HasExtension(Unittest.DefaultDoubleExtension));
+ Assert.True(message.HasExtension(Unittest.DefaultBoolExtension));
+ Assert.True(message.HasExtension(Unittest.DefaultStringExtension));
+ Assert.True(message.HasExtension(Unittest.DefaultBytesExtension));
- Assert.IsTrue(message.HasExtension(Unittest.DefaultNestedEnumExtension));
- Assert.IsTrue(message.HasExtension(Unittest.DefaultForeignEnumExtension));
- Assert.IsTrue(message.HasExtension(Unittest.DefaultImportEnumExtension));
+ Assert.True(message.HasExtension(Unittest.DefaultNestedEnumExtension));
+ Assert.True(message.HasExtension(Unittest.DefaultForeignEnumExtension));
+ Assert.True(message.HasExtension(Unittest.DefaultImportEnumExtension));
- Assert.IsTrue(message.HasExtension(Unittest.DefaultStringPieceExtension));
- Assert.IsTrue(message.HasExtension(Unittest.DefaultCordExtension));
+ Assert.True(message.HasExtension(Unittest.DefaultStringPieceExtension));
+ Assert.True(message.HasExtension(Unittest.DefaultCordExtension));
- Assert.AreEqual(401, message.GetExtension(Unittest.DefaultInt32Extension));
- Assert.AreEqual(402L, message.GetExtension(Unittest.DefaultInt64Extension));
- Assert.AreEqual(403U, message.GetExtension(Unittest.DefaultUint32Extension));
- Assert.AreEqual(404UL, message.GetExtension(Unittest.DefaultUint64Extension));
- Assert.AreEqual(405, message.GetExtension(Unittest.DefaultSint32Extension));
- Assert.AreEqual(406L, message.GetExtension(Unittest.DefaultSint64Extension));
- Assert.AreEqual(407U, message.GetExtension(Unittest.DefaultFixed32Extension));
- Assert.AreEqual(408UL, message.GetExtension(Unittest.DefaultFixed64Extension));
- Assert.AreEqual(409, message.GetExtension(Unittest.DefaultSfixed32Extension));
- Assert.AreEqual(410L, message.GetExtension(Unittest.DefaultSfixed64Extension));
- Assert.AreEqual(411F, message.GetExtension(Unittest.DefaultFloatExtension));
- Assert.AreEqual(412D, message.GetExtension(Unittest.DefaultDoubleExtension));
- Assert.AreEqual(false, message.GetExtension(Unittest.DefaultBoolExtension));
- Assert.AreEqual("415", message.GetExtension(Unittest.DefaultStringExtension));
- Assert.AreEqual(ToBytes("416"), message.GetExtension(Unittest.DefaultBytesExtension));
+ Assert.Equal(401, message.GetExtension(Unittest.DefaultInt32Extension));
+ Assert.Equal(402L, message.GetExtension(Unittest.DefaultInt64Extension));
+ Assert.Equal(403U, message.GetExtension(Unittest.DefaultUint32Extension));
+ Assert.Equal(404UL, message.GetExtension(Unittest.DefaultUint64Extension));
+ Assert.Equal(405, message.GetExtension(Unittest.DefaultSint32Extension));
+ Assert.Equal(406L, message.GetExtension(Unittest.DefaultSint64Extension));
+ Assert.Equal(407U, message.GetExtension(Unittest.DefaultFixed32Extension));
+ Assert.Equal(408UL, message.GetExtension(Unittest.DefaultFixed64Extension));
+ Assert.Equal(409, message.GetExtension(Unittest.DefaultSfixed32Extension));
+ Assert.Equal(410L, message.GetExtension(Unittest.DefaultSfixed64Extension));
+ Assert.Equal(411F, message.GetExtension(Unittest.DefaultFloatExtension));
+ Assert.Equal(412D, message.GetExtension(Unittest.DefaultDoubleExtension));
+ Assert.Equal(false, message.GetExtension(Unittest.DefaultBoolExtension));
+ Assert.Equal("415", message.GetExtension(Unittest.DefaultStringExtension));
+ Assert.Equal(ToBytes("416"), message.GetExtension(Unittest.DefaultBytesExtension));
- Assert.AreEqual(TestAllTypes.Types.NestedEnum.FOO,
+ Assert.Equal(TestAllTypes.Types.NestedEnum.FOO,
message.GetExtension(Unittest.DefaultNestedEnumExtension));
- Assert.AreEqual(ForeignEnum.FOREIGN_FOO, message.GetExtension(Unittest.DefaultForeignEnumExtension));
- Assert.AreEqual(ImportEnum.IMPORT_FOO, message.GetExtension(Unittest.DefaultImportEnumExtension));
+ Assert.Equal(ForeignEnum.FOREIGN_FOO, message.GetExtension(Unittest.DefaultForeignEnumExtension));
+ Assert.Equal(ImportEnum.IMPORT_FOO, message.GetExtension(Unittest.DefaultImportEnumExtension));
- Assert.AreEqual("424", message.GetExtension(Unittest.DefaultStringPieceExtension));
- Assert.AreEqual("425", message.GetExtension(Unittest.DefaultCordExtension));
+ Assert.Equal("424", message.GetExtension(Unittest.DefaultStringPieceExtension));
+ Assert.Equal("425", message.GetExtension(Unittest.DefaultCordExtension));
}
/// <summary>
@@ -1215,242 +1215,242 @@
// ModifyRepeatedFields only sets the second repeated element of each
// field. In addition to verifying this, we also verify that the first
// element and size were *not* modified.
- Assert.AreEqual(2, message.GetExtensionCount(Unittest.RepeatedInt32Extension));
- Assert.AreEqual(2, message.GetExtensionCount(Unittest.RepeatedInt64Extension));
- Assert.AreEqual(2, message.GetExtensionCount(Unittest.RepeatedUint32Extension));
- Assert.AreEqual(2, message.GetExtensionCount(Unittest.RepeatedUint64Extension));
- Assert.AreEqual(2, message.GetExtensionCount(Unittest.RepeatedSint32Extension));
- Assert.AreEqual(2, message.GetExtensionCount(Unittest.RepeatedSint64Extension));
- Assert.AreEqual(2, message.GetExtensionCount(Unittest.RepeatedFixed32Extension));
- Assert.AreEqual(2, message.GetExtensionCount(Unittest.RepeatedFixed64Extension));
- Assert.AreEqual(2, message.GetExtensionCount(Unittest.RepeatedSfixed32Extension));
- Assert.AreEqual(2, message.GetExtensionCount(Unittest.RepeatedSfixed64Extension));
- Assert.AreEqual(2, message.GetExtensionCount(Unittest.RepeatedFloatExtension));
- Assert.AreEqual(2, message.GetExtensionCount(Unittest.RepeatedDoubleExtension));
- Assert.AreEqual(2, message.GetExtensionCount(Unittest.RepeatedBoolExtension));
- Assert.AreEqual(2, message.GetExtensionCount(Unittest.RepeatedStringExtension));
- Assert.AreEqual(2, message.GetExtensionCount(Unittest.RepeatedBytesExtension));
+ Assert.Equal(2, message.GetExtensionCount(Unittest.RepeatedInt32Extension));
+ Assert.Equal(2, message.GetExtensionCount(Unittest.RepeatedInt64Extension));
+ Assert.Equal(2, message.GetExtensionCount(Unittest.RepeatedUint32Extension));
+ Assert.Equal(2, message.GetExtensionCount(Unittest.RepeatedUint64Extension));
+ Assert.Equal(2, message.GetExtensionCount(Unittest.RepeatedSint32Extension));
+ Assert.Equal(2, message.GetExtensionCount(Unittest.RepeatedSint64Extension));
+ Assert.Equal(2, message.GetExtensionCount(Unittest.RepeatedFixed32Extension));
+ Assert.Equal(2, message.GetExtensionCount(Unittest.RepeatedFixed64Extension));
+ Assert.Equal(2, message.GetExtensionCount(Unittest.RepeatedSfixed32Extension));
+ Assert.Equal(2, message.GetExtensionCount(Unittest.RepeatedSfixed64Extension));
+ Assert.Equal(2, message.GetExtensionCount(Unittest.RepeatedFloatExtension));
+ Assert.Equal(2, message.GetExtensionCount(Unittest.RepeatedDoubleExtension));
+ Assert.Equal(2, message.GetExtensionCount(Unittest.RepeatedBoolExtension));
+ Assert.Equal(2, message.GetExtensionCount(Unittest.RepeatedStringExtension));
+ Assert.Equal(2, message.GetExtensionCount(Unittest.RepeatedBytesExtension));
- Assert.AreEqual(2, message.GetExtensionCount(Unittest.RepeatedGroupExtension));
- Assert.AreEqual(2, message.GetExtensionCount(Unittest.RepeatedNestedMessageExtension));
- Assert.AreEqual(2, message.GetExtensionCount(Unittest.RepeatedForeignMessageExtension));
- Assert.AreEqual(2, message.GetExtensionCount(Unittest.RepeatedImportMessageExtension));
- Assert.AreEqual(2, message.GetExtensionCount(Unittest.RepeatedNestedEnumExtension));
- Assert.AreEqual(2, message.GetExtensionCount(Unittest.RepeatedForeignEnumExtension));
- Assert.AreEqual(2, message.GetExtensionCount(Unittest.RepeatedImportEnumExtension));
+ Assert.Equal(2, message.GetExtensionCount(Unittest.RepeatedGroupExtension));
+ Assert.Equal(2, message.GetExtensionCount(Unittest.RepeatedNestedMessageExtension));
+ Assert.Equal(2, message.GetExtensionCount(Unittest.RepeatedForeignMessageExtension));
+ Assert.Equal(2, message.GetExtensionCount(Unittest.RepeatedImportMessageExtension));
+ Assert.Equal(2, message.GetExtensionCount(Unittest.RepeatedNestedEnumExtension));
+ Assert.Equal(2, message.GetExtensionCount(Unittest.RepeatedForeignEnumExtension));
+ Assert.Equal(2, message.GetExtensionCount(Unittest.RepeatedImportEnumExtension));
- Assert.AreEqual(2, message.GetExtensionCount(Unittest.RepeatedStringPieceExtension));
- Assert.AreEqual(2, message.GetExtensionCount(Unittest.RepeatedCordExtension));
+ Assert.Equal(2, message.GetExtensionCount(Unittest.RepeatedStringPieceExtension));
+ Assert.Equal(2, message.GetExtensionCount(Unittest.RepeatedCordExtension));
- Assert.AreEqual(201, message.GetExtension(Unittest.RepeatedInt32Extension, 0));
- Assert.AreEqual(202L, message.GetExtension(Unittest.RepeatedInt64Extension, 0));
- Assert.AreEqual(203U, message.GetExtension(Unittest.RepeatedUint32Extension, 0));
- Assert.AreEqual(204UL, message.GetExtension(Unittest.RepeatedUint64Extension, 0));
- Assert.AreEqual(205, message.GetExtension(Unittest.RepeatedSint32Extension, 0));
- Assert.AreEqual(206L, message.GetExtension(Unittest.RepeatedSint64Extension, 0));
- Assert.AreEqual(207U, message.GetExtension(Unittest.RepeatedFixed32Extension, 0));
- Assert.AreEqual(208UL, message.GetExtension(Unittest.RepeatedFixed64Extension, 0));
- Assert.AreEqual(209, message.GetExtension(Unittest.RepeatedSfixed32Extension, 0));
- Assert.AreEqual(210L, message.GetExtension(Unittest.RepeatedSfixed64Extension, 0));
- Assert.AreEqual(211F, message.GetExtension(Unittest.RepeatedFloatExtension, 0));
- Assert.AreEqual(212D, message.GetExtension(Unittest.RepeatedDoubleExtension, 0));
- Assert.AreEqual(true, message.GetExtension(Unittest.RepeatedBoolExtension, 0));
- Assert.AreEqual("215", message.GetExtension(Unittest.RepeatedStringExtension, 0));
- Assert.AreEqual(ToBytes("216"), message.GetExtension(Unittest.RepeatedBytesExtension, 0));
+ Assert.Equal(201, message.GetExtension(Unittest.RepeatedInt32Extension, 0));
+ Assert.Equal(202L, message.GetExtension(Unittest.RepeatedInt64Extension, 0));
+ Assert.Equal(203U, message.GetExtension(Unittest.RepeatedUint32Extension, 0));
+ Assert.Equal(204UL, message.GetExtension(Unittest.RepeatedUint64Extension, 0));
+ Assert.Equal(205, message.GetExtension(Unittest.RepeatedSint32Extension, 0));
+ Assert.Equal(206L, message.GetExtension(Unittest.RepeatedSint64Extension, 0));
+ Assert.Equal(207U, message.GetExtension(Unittest.RepeatedFixed32Extension, 0));
+ Assert.Equal(208UL, message.GetExtension(Unittest.RepeatedFixed64Extension, 0));
+ Assert.Equal(209, message.GetExtension(Unittest.RepeatedSfixed32Extension, 0));
+ Assert.Equal(210L, message.GetExtension(Unittest.RepeatedSfixed64Extension, 0));
+ Assert.Equal(211F, message.GetExtension(Unittest.RepeatedFloatExtension, 0));
+ Assert.Equal(212D, message.GetExtension(Unittest.RepeatedDoubleExtension, 0));
+ Assert.Equal(true, message.GetExtension(Unittest.RepeatedBoolExtension, 0));
+ Assert.Equal("215", message.GetExtension(Unittest.RepeatedStringExtension, 0));
+ Assert.Equal(ToBytes("216"), message.GetExtension(Unittest.RepeatedBytesExtension, 0));
- Assert.AreEqual(217, message.GetExtension(Unittest.RepeatedGroupExtension, 0).A);
- Assert.AreEqual(218, message.GetExtension(Unittest.RepeatedNestedMessageExtension, 0).Bb);
- Assert.AreEqual(219, message.GetExtension(Unittest.RepeatedForeignMessageExtension, 0).C);
- Assert.AreEqual(220, message.GetExtension(Unittest.RepeatedImportMessageExtension, 0).D);
+ Assert.Equal(217, message.GetExtension(Unittest.RepeatedGroupExtension, 0).A);
+ Assert.Equal(218, message.GetExtension(Unittest.RepeatedNestedMessageExtension, 0).Bb);
+ Assert.Equal(219, message.GetExtension(Unittest.RepeatedForeignMessageExtension, 0).C);
+ Assert.Equal(220, message.GetExtension(Unittest.RepeatedImportMessageExtension, 0).D);
- Assert.AreEqual(TestAllTypes.Types.NestedEnum.BAR,
+ Assert.Equal(TestAllTypes.Types.NestedEnum.BAR,
message.GetExtension(Unittest.RepeatedNestedEnumExtension, 0));
- Assert.AreEqual(ForeignEnum.FOREIGN_BAR,
+ Assert.Equal(ForeignEnum.FOREIGN_BAR,
message.GetExtension(Unittest.RepeatedForeignEnumExtension, 0));
- Assert.AreEqual(ImportEnum.IMPORT_BAR,
+ Assert.Equal(ImportEnum.IMPORT_BAR,
message.GetExtension(Unittest.RepeatedImportEnumExtension, 0));
- Assert.AreEqual("224", message.GetExtension(Unittest.RepeatedStringPieceExtension, 0));
- Assert.AreEqual("225", message.GetExtension(Unittest.RepeatedCordExtension, 0));
+ Assert.Equal("224", message.GetExtension(Unittest.RepeatedStringPieceExtension, 0));
+ Assert.Equal("225", message.GetExtension(Unittest.RepeatedCordExtension, 0));
// Actually verify the second (modified) elements now.
- Assert.AreEqual(501, message.GetExtension(Unittest.RepeatedInt32Extension, 1));
- Assert.AreEqual(502L, message.GetExtension(Unittest.RepeatedInt64Extension, 1));
- Assert.AreEqual(503U, message.GetExtension(Unittest.RepeatedUint32Extension, 1));
- Assert.AreEqual(504UL, message.GetExtension(Unittest.RepeatedUint64Extension, 1));
- Assert.AreEqual(505, message.GetExtension(Unittest.RepeatedSint32Extension, 1));
- Assert.AreEqual(506L, message.GetExtension(Unittest.RepeatedSint64Extension, 1));
- Assert.AreEqual(507U, message.GetExtension(Unittest.RepeatedFixed32Extension, 1));
- Assert.AreEqual(508UL, message.GetExtension(Unittest.RepeatedFixed64Extension, 1));
- Assert.AreEqual(509, message.GetExtension(Unittest.RepeatedSfixed32Extension, 1));
- Assert.AreEqual(510L, message.GetExtension(Unittest.RepeatedSfixed64Extension, 1));
- Assert.AreEqual(511F, message.GetExtension(Unittest.RepeatedFloatExtension, 1));
- Assert.AreEqual(512D, message.GetExtension(Unittest.RepeatedDoubleExtension, 1));
- Assert.AreEqual(true, message.GetExtension(Unittest.RepeatedBoolExtension, 1));
- Assert.AreEqual("515", message.GetExtension(Unittest.RepeatedStringExtension, 1));
- Assert.AreEqual(ToBytes("516"), message.GetExtension(Unittest.RepeatedBytesExtension, 1));
+ Assert.Equal(501, message.GetExtension(Unittest.RepeatedInt32Extension, 1));
+ Assert.Equal(502L, message.GetExtension(Unittest.RepeatedInt64Extension, 1));
+ Assert.Equal(503U, message.GetExtension(Unittest.RepeatedUint32Extension, 1));
+ Assert.Equal(504UL, message.GetExtension(Unittest.RepeatedUint64Extension, 1));
+ Assert.Equal(505, message.GetExtension(Unittest.RepeatedSint32Extension, 1));
+ Assert.Equal(506L, message.GetExtension(Unittest.RepeatedSint64Extension, 1));
+ Assert.Equal(507U, message.GetExtension(Unittest.RepeatedFixed32Extension, 1));
+ Assert.Equal(508UL, message.GetExtension(Unittest.RepeatedFixed64Extension, 1));
+ Assert.Equal(509, message.GetExtension(Unittest.RepeatedSfixed32Extension, 1));
+ Assert.Equal(510L, message.GetExtension(Unittest.RepeatedSfixed64Extension, 1));
+ Assert.Equal(511F, message.GetExtension(Unittest.RepeatedFloatExtension, 1));
+ Assert.Equal(512D, message.GetExtension(Unittest.RepeatedDoubleExtension, 1));
+ Assert.Equal(true, message.GetExtension(Unittest.RepeatedBoolExtension, 1));
+ Assert.Equal("515", message.GetExtension(Unittest.RepeatedStringExtension, 1));
+ Assert.Equal(ToBytes("516"), message.GetExtension(Unittest.RepeatedBytesExtension, 1));
- Assert.AreEqual(517, message.GetExtension(Unittest.RepeatedGroupExtension, 1).A);
- Assert.AreEqual(518, message.GetExtension(Unittest.RepeatedNestedMessageExtension, 1).Bb);
- Assert.AreEqual(519, message.GetExtension(Unittest.RepeatedForeignMessageExtension, 1).C);
- Assert.AreEqual(520, message.GetExtension(Unittest.RepeatedImportMessageExtension, 1).D);
+ Assert.Equal(517, message.GetExtension(Unittest.RepeatedGroupExtension, 1).A);
+ Assert.Equal(518, message.GetExtension(Unittest.RepeatedNestedMessageExtension, 1).Bb);
+ Assert.Equal(519, message.GetExtension(Unittest.RepeatedForeignMessageExtension, 1).C);
+ Assert.Equal(520, message.GetExtension(Unittest.RepeatedImportMessageExtension, 1).D);
- Assert.AreEqual(TestAllTypes.Types.NestedEnum.FOO,
+ Assert.Equal(TestAllTypes.Types.NestedEnum.FOO,
message.GetExtension(Unittest.RepeatedNestedEnumExtension, 1));
- Assert.AreEqual(ForeignEnum.FOREIGN_FOO,
+ Assert.Equal(ForeignEnum.FOREIGN_FOO,
message.GetExtension(Unittest.RepeatedForeignEnumExtension, 1));
- Assert.AreEqual(ImportEnum.IMPORT_FOO,
+ Assert.Equal(ImportEnum.IMPORT_FOO,
message.GetExtension(Unittest.RepeatedImportEnumExtension, 1));
- Assert.AreEqual("524", message.GetExtension(Unittest.RepeatedStringPieceExtension, 1));
- Assert.AreEqual("525", message.GetExtension(Unittest.RepeatedCordExtension, 1));
+ Assert.Equal("524", message.GetExtension(Unittest.RepeatedStringPieceExtension, 1));
+ Assert.Equal("525", message.GetExtension(Unittest.RepeatedCordExtension, 1));
}
internal static void AssertExtensionsClear(TestAllExtensions message)
{
// HasBlah() should initially be false for all optional fields.
- Assert.IsFalse(message.HasExtension(Unittest.OptionalInt32Extension));
- Assert.IsFalse(message.HasExtension(Unittest.OptionalInt64Extension));
- Assert.IsFalse(message.HasExtension(Unittest.OptionalUint32Extension));
- Assert.IsFalse(message.HasExtension(Unittest.OptionalUint64Extension));
- Assert.IsFalse(message.HasExtension(Unittest.OptionalSint32Extension));
- Assert.IsFalse(message.HasExtension(Unittest.OptionalSint64Extension));
- Assert.IsFalse(message.HasExtension(Unittest.OptionalFixed32Extension));
- Assert.IsFalse(message.HasExtension(Unittest.OptionalFixed64Extension));
- Assert.IsFalse(message.HasExtension(Unittest.OptionalSfixed32Extension));
- Assert.IsFalse(message.HasExtension(Unittest.OptionalSfixed64Extension));
- Assert.IsFalse(message.HasExtension(Unittest.OptionalFloatExtension));
- Assert.IsFalse(message.HasExtension(Unittest.OptionalDoubleExtension));
- Assert.IsFalse(message.HasExtension(Unittest.OptionalBoolExtension));
- Assert.IsFalse(message.HasExtension(Unittest.OptionalStringExtension));
- Assert.IsFalse(message.HasExtension(Unittest.OptionalBytesExtension));
+ Assert.False(message.HasExtension(Unittest.OptionalInt32Extension));
+ Assert.False(message.HasExtension(Unittest.OptionalInt64Extension));
+ Assert.False(message.HasExtension(Unittest.OptionalUint32Extension));
+ Assert.False(message.HasExtension(Unittest.OptionalUint64Extension));
+ Assert.False(message.HasExtension(Unittest.OptionalSint32Extension));
+ Assert.False(message.HasExtension(Unittest.OptionalSint64Extension));
+ Assert.False(message.HasExtension(Unittest.OptionalFixed32Extension));
+ Assert.False(message.HasExtension(Unittest.OptionalFixed64Extension));
+ Assert.False(message.HasExtension(Unittest.OptionalSfixed32Extension));
+ Assert.False(message.HasExtension(Unittest.OptionalSfixed64Extension));
+ Assert.False(message.HasExtension(Unittest.OptionalFloatExtension));
+ Assert.False(message.HasExtension(Unittest.OptionalDoubleExtension));
+ Assert.False(message.HasExtension(Unittest.OptionalBoolExtension));
+ Assert.False(message.HasExtension(Unittest.OptionalStringExtension));
+ Assert.False(message.HasExtension(Unittest.OptionalBytesExtension));
- Assert.IsFalse(message.HasExtension(Unittest.OptionalGroupExtension));
- Assert.IsFalse(message.HasExtension(Unittest.OptionalNestedMessageExtension));
- Assert.IsFalse(message.HasExtension(Unittest.OptionalForeignMessageExtension));
- Assert.IsFalse(message.HasExtension(Unittest.OptionalImportMessageExtension));
+ Assert.False(message.HasExtension(Unittest.OptionalGroupExtension));
+ Assert.False(message.HasExtension(Unittest.OptionalNestedMessageExtension));
+ Assert.False(message.HasExtension(Unittest.OptionalForeignMessageExtension));
+ Assert.False(message.HasExtension(Unittest.OptionalImportMessageExtension));
- Assert.IsFalse(message.HasExtension(Unittest.OptionalNestedEnumExtension));
- Assert.IsFalse(message.HasExtension(Unittest.OptionalForeignEnumExtension));
- Assert.IsFalse(message.HasExtension(Unittest.OptionalImportEnumExtension));
+ Assert.False(message.HasExtension(Unittest.OptionalNestedEnumExtension));
+ Assert.False(message.HasExtension(Unittest.OptionalForeignEnumExtension));
+ Assert.False(message.HasExtension(Unittest.OptionalImportEnumExtension));
- Assert.IsFalse(message.HasExtension(Unittest.OptionalStringPieceExtension));
- Assert.IsFalse(message.HasExtension(Unittest.OptionalCordExtension));
+ Assert.False(message.HasExtension(Unittest.OptionalStringPieceExtension));
+ Assert.False(message.HasExtension(Unittest.OptionalCordExtension));
// Optional fields without defaults are set to zero or something like it.
- Assert.AreEqual(0, message.GetExtension(Unittest.OptionalInt32Extension));
- Assert.AreEqual(0L, message.GetExtension(Unittest.OptionalInt64Extension));
- Assert.AreEqual(0U, message.GetExtension(Unittest.OptionalUint32Extension));
- Assert.AreEqual(0UL, message.GetExtension(Unittest.OptionalUint64Extension));
- Assert.AreEqual(0, message.GetExtension(Unittest.OptionalSint32Extension));
- Assert.AreEqual(0L, message.GetExtension(Unittest.OptionalSint64Extension));
- Assert.AreEqual(0U, message.GetExtension(Unittest.OptionalFixed32Extension));
- Assert.AreEqual(0UL, message.GetExtension(Unittest.OptionalFixed64Extension));
- Assert.AreEqual(0, message.GetExtension(Unittest.OptionalSfixed32Extension));
- Assert.AreEqual(0L, message.GetExtension(Unittest.OptionalSfixed64Extension));
- Assert.AreEqual(0F, message.GetExtension(Unittest.OptionalFloatExtension));
- Assert.AreEqual(0D, message.GetExtension(Unittest.OptionalDoubleExtension));
- Assert.AreEqual(false, message.GetExtension(Unittest.OptionalBoolExtension));
- Assert.AreEqual("", message.GetExtension(Unittest.OptionalStringExtension));
- Assert.AreEqual(ByteString.Empty, message.GetExtension(Unittest.OptionalBytesExtension));
+ Assert.Equal(0, message.GetExtension(Unittest.OptionalInt32Extension));
+ Assert.Equal(0L, message.GetExtension(Unittest.OptionalInt64Extension));
+ Assert.Equal(0U, message.GetExtension(Unittest.OptionalUint32Extension));
+ Assert.Equal(0UL, message.GetExtension(Unittest.OptionalUint64Extension));
+ Assert.Equal(0, message.GetExtension(Unittest.OptionalSint32Extension));
+ Assert.Equal(0L, message.GetExtension(Unittest.OptionalSint64Extension));
+ Assert.Equal(0U, message.GetExtension(Unittest.OptionalFixed32Extension));
+ Assert.Equal(0UL, message.GetExtension(Unittest.OptionalFixed64Extension));
+ Assert.Equal(0, message.GetExtension(Unittest.OptionalSfixed32Extension));
+ Assert.Equal(0L, message.GetExtension(Unittest.OptionalSfixed64Extension));
+ Assert.Equal(0F, message.GetExtension(Unittest.OptionalFloatExtension));
+ Assert.Equal(0D, message.GetExtension(Unittest.OptionalDoubleExtension));
+ Assert.Equal(false, message.GetExtension(Unittest.OptionalBoolExtension));
+ Assert.Equal("", message.GetExtension(Unittest.OptionalStringExtension));
+ Assert.Equal(ByteString.Empty, message.GetExtension(Unittest.OptionalBytesExtension));
// Embedded messages should also be clear.
- Assert.IsFalse(message.GetExtension(Unittest.OptionalGroupExtension).HasA);
- Assert.IsFalse(message.GetExtension(Unittest.OptionalNestedMessageExtension).HasBb);
- Assert.IsFalse(message.GetExtension(Unittest.OptionalForeignMessageExtension).HasC);
- Assert.IsFalse(message.GetExtension(Unittest.OptionalImportMessageExtension).HasD);
+ Assert.False(message.GetExtension(Unittest.OptionalGroupExtension).HasA);
+ Assert.False(message.GetExtension(Unittest.OptionalNestedMessageExtension).HasBb);
+ Assert.False(message.GetExtension(Unittest.OptionalForeignMessageExtension).HasC);
+ Assert.False(message.GetExtension(Unittest.OptionalImportMessageExtension).HasD);
- Assert.AreEqual(0, message.GetExtension(Unittest.OptionalGroupExtension).A);
- Assert.AreEqual(0, message.GetExtension(Unittest.OptionalNestedMessageExtension).Bb);
- Assert.AreEqual(0, message.GetExtension(Unittest.OptionalForeignMessageExtension).C);
- Assert.AreEqual(0, message.GetExtension(Unittest.OptionalImportMessageExtension).D);
+ Assert.Equal(0, message.GetExtension(Unittest.OptionalGroupExtension).A);
+ Assert.Equal(0, message.GetExtension(Unittest.OptionalNestedMessageExtension).Bb);
+ Assert.Equal(0, message.GetExtension(Unittest.OptionalForeignMessageExtension).C);
+ Assert.Equal(0, message.GetExtension(Unittest.OptionalImportMessageExtension).D);
// Enums without defaults are set to the first value in the enum.
- Assert.AreEqual(TestAllTypes.Types.NestedEnum.FOO,
+ Assert.Equal(TestAllTypes.Types.NestedEnum.FOO,
message.GetExtension(Unittest.OptionalNestedEnumExtension));
- Assert.AreEqual(ForeignEnum.FOREIGN_FOO,
+ Assert.Equal(ForeignEnum.FOREIGN_FOO,
message.GetExtension(Unittest.OptionalForeignEnumExtension));
- Assert.AreEqual(ImportEnum.IMPORT_FOO, message.GetExtension(Unittest.OptionalImportEnumExtension));
+ Assert.Equal(ImportEnum.IMPORT_FOO, message.GetExtension(Unittest.OptionalImportEnumExtension));
- Assert.AreEqual("", message.GetExtension(Unittest.OptionalStringPieceExtension));
- Assert.AreEqual("", message.GetExtension(Unittest.OptionalCordExtension));
+ Assert.Equal("", message.GetExtension(Unittest.OptionalStringPieceExtension));
+ Assert.Equal("", message.GetExtension(Unittest.OptionalCordExtension));
// Repeated fields are empty.
- Assert.AreEqual(0, message.GetExtensionCount(Unittest.RepeatedInt32Extension));
- Assert.AreEqual(0, message.GetExtensionCount(Unittest.RepeatedInt64Extension));
- Assert.AreEqual(0, message.GetExtensionCount(Unittest.RepeatedUint32Extension));
- Assert.AreEqual(0, message.GetExtensionCount(Unittest.RepeatedUint64Extension));
- Assert.AreEqual(0, message.GetExtensionCount(Unittest.RepeatedSint32Extension));
- Assert.AreEqual(0, message.GetExtensionCount(Unittest.RepeatedSint64Extension));
- Assert.AreEqual(0, message.GetExtensionCount(Unittest.RepeatedFixed32Extension));
- Assert.AreEqual(0, message.GetExtensionCount(Unittest.RepeatedFixed64Extension));
- Assert.AreEqual(0, message.GetExtensionCount(Unittest.RepeatedSfixed32Extension));
- Assert.AreEqual(0, message.GetExtensionCount(Unittest.RepeatedSfixed64Extension));
- Assert.AreEqual(0, message.GetExtensionCount(Unittest.RepeatedFloatExtension));
- Assert.AreEqual(0, message.GetExtensionCount(Unittest.RepeatedDoubleExtension));
- Assert.AreEqual(0, message.GetExtensionCount(Unittest.RepeatedBoolExtension));
- Assert.AreEqual(0, message.GetExtensionCount(Unittest.RepeatedStringExtension));
- Assert.AreEqual(0, message.GetExtensionCount(Unittest.RepeatedBytesExtension));
+ Assert.Equal(0, message.GetExtensionCount(Unittest.RepeatedInt32Extension));
+ Assert.Equal(0, message.GetExtensionCount(Unittest.RepeatedInt64Extension));
+ Assert.Equal(0, message.GetExtensionCount(Unittest.RepeatedUint32Extension));
+ Assert.Equal(0, message.GetExtensionCount(Unittest.RepeatedUint64Extension));
+ Assert.Equal(0, message.GetExtensionCount(Unittest.RepeatedSint32Extension));
+ Assert.Equal(0, message.GetExtensionCount(Unittest.RepeatedSint64Extension));
+ Assert.Equal(0, message.GetExtensionCount(Unittest.RepeatedFixed32Extension));
+ Assert.Equal(0, message.GetExtensionCount(Unittest.RepeatedFixed64Extension));
+ Assert.Equal(0, message.GetExtensionCount(Unittest.RepeatedSfixed32Extension));
+ Assert.Equal(0, message.GetExtensionCount(Unittest.RepeatedSfixed64Extension));
+ Assert.Equal(0, message.GetExtensionCount(Unittest.RepeatedFloatExtension));
+ Assert.Equal(0, message.GetExtensionCount(Unittest.RepeatedDoubleExtension));
+ Assert.Equal(0, message.GetExtensionCount(Unittest.RepeatedBoolExtension));
+ Assert.Equal(0, message.GetExtensionCount(Unittest.RepeatedStringExtension));
+ Assert.Equal(0, message.GetExtensionCount(Unittest.RepeatedBytesExtension));
- Assert.AreEqual(0, message.GetExtensionCount(Unittest.RepeatedGroupExtension));
- Assert.AreEqual(0, message.GetExtensionCount(Unittest.RepeatedNestedMessageExtension));
- Assert.AreEqual(0, message.GetExtensionCount(Unittest.RepeatedForeignMessageExtension));
- Assert.AreEqual(0, message.GetExtensionCount(Unittest.RepeatedImportMessageExtension));
- Assert.AreEqual(0, message.GetExtensionCount(Unittest.RepeatedNestedEnumExtension));
- Assert.AreEqual(0, message.GetExtensionCount(Unittest.RepeatedForeignEnumExtension));
- Assert.AreEqual(0, message.GetExtensionCount(Unittest.RepeatedImportEnumExtension));
+ Assert.Equal(0, message.GetExtensionCount(Unittest.RepeatedGroupExtension));
+ Assert.Equal(0, message.GetExtensionCount(Unittest.RepeatedNestedMessageExtension));
+ Assert.Equal(0, message.GetExtensionCount(Unittest.RepeatedForeignMessageExtension));
+ Assert.Equal(0, message.GetExtensionCount(Unittest.RepeatedImportMessageExtension));
+ Assert.Equal(0, message.GetExtensionCount(Unittest.RepeatedNestedEnumExtension));
+ Assert.Equal(0, message.GetExtensionCount(Unittest.RepeatedForeignEnumExtension));
+ Assert.Equal(0, message.GetExtensionCount(Unittest.RepeatedImportEnumExtension));
- Assert.AreEqual(0, message.GetExtensionCount(Unittest.RepeatedStringPieceExtension));
- Assert.AreEqual(0, message.GetExtensionCount(Unittest.RepeatedCordExtension));
+ Assert.Equal(0, message.GetExtensionCount(Unittest.RepeatedStringPieceExtension));
+ Assert.Equal(0, message.GetExtensionCount(Unittest.RepeatedCordExtension));
// HasBlah() should also be false for all default fields.
- Assert.IsFalse(message.HasExtension(Unittest.DefaultInt32Extension));
- Assert.IsFalse(message.HasExtension(Unittest.DefaultInt64Extension));
- Assert.IsFalse(message.HasExtension(Unittest.DefaultUint32Extension));
- Assert.IsFalse(message.HasExtension(Unittest.DefaultUint64Extension));
- Assert.IsFalse(message.HasExtension(Unittest.DefaultSint32Extension));
- Assert.IsFalse(message.HasExtension(Unittest.DefaultSint64Extension));
- Assert.IsFalse(message.HasExtension(Unittest.DefaultFixed32Extension));
- Assert.IsFalse(message.HasExtension(Unittest.DefaultFixed64Extension));
- Assert.IsFalse(message.HasExtension(Unittest.DefaultSfixed32Extension));
- Assert.IsFalse(message.HasExtension(Unittest.DefaultSfixed64Extension));
- Assert.IsFalse(message.HasExtension(Unittest.DefaultFloatExtension));
- Assert.IsFalse(message.HasExtension(Unittest.DefaultDoubleExtension));
- Assert.IsFalse(message.HasExtension(Unittest.DefaultBoolExtension));
- Assert.IsFalse(message.HasExtension(Unittest.DefaultStringExtension));
- Assert.IsFalse(message.HasExtension(Unittest.DefaultBytesExtension));
+ Assert.False(message.HasExtension(Unittest.DefaultInt32Extension));
+ Assert.False(message.HasExtension(Unittest.DefaultInt64Extension));
+ Assert.False(message.HasExtension(Unittest.DefaultUint32Extension));
+ Assert.False(message.HasExtension(Unittest.DefaultUint64Extension));
+ Assert.False(message.HasExtension(Unittest.DefaultSint32Extension));
+ Assert.False(message.HasExtension(Unittest.DefaultSint64Extension));
+ Assert.False(message.HasExtension(Unittest.DefaultFixed32Extension));
+ Assert.False(message.HasExtension(Unittest.DefaultFixed64Extension));
+ Assert.False(message.HasExtension(Unittest.DefaultSfixed32Extension));
+ Assert.False(message.HasExtension(Unittest.DefaultSfixed64Extension));
+ Assert.False(message.HasExtension(Unittest.DefaultFloatExtension));
+ Assert.False(message.HasExtension(Unittest.DefaultDoubleExtension));
+ Assert.False(message.HasExtension(Unittest.DefaultBoolExtension));
+ Assert.False(message.HasExtension(Unittest.DefaultStringExtension));
+ Assert.False(message.HasExtension(Unittest.DefaultBytesExtension));
- Assert.IsFalse(message.HasExtension(Unittest.DefaultNestedEnumExtension));
- Assert.IsFalse(message.HasExtension(Unittest.DefaultForeignEnumExtension));
- Assert.IsFalse(message.HasExtension(Unittest.DefaultImportEnumExtension));
+ Assert.False(message.HasExtension(Unittest.DefaultNestedEnumExtension));
+ Assert.False(message.HasExtension(Unittest.DefaultForeignEnumExtension));
+ Assert.False(message.HasExtension(Unittest.DefaultImportEnumExtension));
- Assert.IsFalse(message.HasExtension(Unittest.DefaultStringPieceExtension));
- Assert.IsFalse(message.HasExtension(Unittest.DefaultCordExtension));
+ Assert.False(message.HasExtension(Unittest.DefaultStringPieceExtension));
+ Assert.False(message.HasExtension(Unittest.DefaultCordExtension));
// Fields with defaults have their default values (duh).
- Assert.AreEqual(41, message.GetExtension(Unittest.DefaultInt32Extension));
- Assert.AreEqual(42L, message.GetExtension(Unittest.DefaultInt64Extension));
- Assert.AreEqual(43U, message.GetExtension(Unittest.DefaultUint32Extension));
- Assert.AreEqual(44UL, message.GetExtension(Unittest.DefaultUint64Extension));
- Assert.AreEqual(-45, message.GetExtension(Unittest.DefaultSint32Extension));
- Assert.AreEqual(46L, message.GetExtension(Unittest.DefaultSint64Extension));
- Assert.AreEqual(47U, message.GetExtension(Unittest.DefaultFixed32Extension));
- Assert.AreEqual(48UL, message.GetExtension(Unittest.DefaultFixed64Extension));
- Assert.AreEqual(49, message.GetExtension(Unittest.DefaultSfixed32Extension));
- Assert.AreEqual(-50L, message.GetExtension(Unittest.DefaultSfixed64Extension));
- Assert.AreEqual(51.5F, message.GetExtension(Unittest.DefaultFloatExtension));
- Assert.AreEqual(52e3D, message.GetExtension(Unittest.DefaultDoubleExtension));
- Assert.AreEqual(true, message.GetExtension(Unittest.DefaultBoolExtension));
- Assert.AreEqual("hello", message.GetExtension(Unittest.DefaultStringExtension));
- Assert.AreEqual(ToBytes("world"), message.GetExtension(Unittest.DefaultBytesExtension));
+ Assert.Equal(41, message.GetExtension(Unittest.DefaultInt32Extension));
+ Assert.Equal(42L, message.GetExtension(Unittest.DefaultInt64Extension));
+ Assert.Equal(43U, message.GetExtension(Unittest.DefaultUint32Extension));
+ Assert.Equal(44UL, message.GetExtension(Unittest.DefaultUint64Extension));
+ Assert.Equal(-45, message.GetExtension(Unittest.DefaultSint32Extension));
+ Assert.Equal(46L, message.GetExtension(Unittest.DefaultSint64Extension));
+ Assert.Equal(47U, message.GetExtension(Unittest.DefaultFixed32Extension));
+ Assert.Equal(48UL, message.GetExtension(Unittest.DefaultFixed64Extension));
+ Assert.Equal(49, message.GetExtension(Unittest.DefaultSfixed32Extension));
+ Assert.Equal(-50L, message.GetExtension(Unittest.DefaultSfixed64Extension));
+ Assert.Equal(51.5F, message.GetExtension(Unittest.DefaultFloatExtension));
+ Assert.Equal(52e3D, message.GetExtension(Unittest.DefaultDoubleExtension));
+ Assert.Equal(true, message.GetExtension(Unittest.DefaultBoolExtension));
+ Assert.Equal("hello", message.GetExtension(Unittest.DefaultStringExtension));
+ Assert.Equal(ToBytes("world"), message.GetExtension(Unittest.DefaultBytesExtension));
- Assert.AreEqual(TestAllTypes.Types.NestedEnum.BAR,
+ Assert.Equal(TestAllTypes.Types.NestedEnum.BAR,
message.GetExtension(Unittest.DefaultNestedEnumExtension));
- Assert.AreEqual(ForeignEnum.FOREIGN_BAR, message.GetExtension(Unittest.DefaultForeignEnumExtension));
- Assert.AreEqual(ImportEnum.IMPORT_BAR, message.GetExtension(Unittest.DefaultImportEnumExtension));
+ Assert.Equal(ForeignEnum.FOREIGN_BAR, message.GetExtension(Unittest.DefaultForeignEnumExtension));
+ Assert.Equal(ImportEnum.IMPORT_BAR, message.GetExtension(Unittest.DefaultImportEnumExtension));
- Assert.AreEqual("abc", message.GetExtension(Unittest.DefaultStringPieceExtension));
- Assert.AreEqual("123", message.GetExtension(Unittest.DefaultCordExtension));
+ Assert.Equal("abc", message.GetExtension(Unittest.DefaultStringPieceExtension));
+ Assert.Equal("123", message.GetExtension(Unittest.DefaultCordExtension));
}
/// <summary>
@@ -1495,48 +1495,48 @@
/// </summary>
public static void AssertPackedFieldsSet(TestPackedTypes message)
{
- Assert.AreEqual(2, message.PackedInt32Count);
- Assert.AreEqual(2, message.PackedInt64Count);
- Assert.AreEqual(2, message.PackedUint32Count);
- Assert.AreEqual(2, message.PackedUint64Count);
- Assert.AreEqual(2, message.PackedSint32Count);
- Assert.AreEqual(2, message.PackedSint64Count);
- Assert.AreEqual(2, message.PackedFixed32Count);
- Assert.AreEqual(2, message.PackedFixed64Count);
- Assert.AreEqual(2, message.PackedSfixed32Count);
- Assert.AreEqual(2, message.PackedSfixed64Count);
- Assert.AreEqual(2, message.PackedFloatCount);
- Assert.AreEqual(2, message.PackedDoubleCount);
- Assert.AreEqual(2, message.PackedBoolCount);
- Assert.AreEqual(2, message.PackedEnumCount);
- Assert.AreEqual(601, message.GetPackedInt32(0));
- Assert.AreEqual(602, message.GetPackedInt64(0));
- Assert.AreEqual(603u, message.GetPackedUint32(0));
- Assert.AreEqual(604u, message.GetPackedUint64(0));
- Assert.AreEqual(605, message.GetPackedSint32(0));
- Assert.AreEqual(606, message.GetPackedSint64(0));
- Assert.AreEqual(607u, message.GetPackedFixed32(0));
- Assert.AreEqual(608u, message.GetPackedFixed64(0));
- Assert.AreEqual(609, message.GetPackedSfixed32(0));
- Assert.AreEqual(610, message.GetPackedSfixed64(0));
- Assert.AreEqual(611, message.GetPackedFloat(0), 0.0);
- Assert.AreEqual(612, message.GetPackedDouble(0), 0.0);
- Assert.AreEqual(true, message.GetPackedBool(0));
- Assert.AreEqual(ForeignEnum.FOREIGN_BAR, message.GetPackedEnum(0));
- Assert.AreEqual(701, message.GetPackedInt32(1));
- Assert.AreEqual(702, message.GetPackedInt64(1));
- Assert.AreEqual(703u, message.GetPackedUint32(1));
- Assert.AreEqual(704u, message.GetPackedUint64(1));
- Assert.AreEqual(705, message.GetPackedSint32(1));
- Assert.AreEqual(706, message.GetPackedSint64(1));
- Assert.AreEqual(707u, message.GetPackedFixed32(1));
- Assert.AreEqual(708u, message.GetPackedFixed64(1));
- Assert.AreEqual(709, message.GetPackedSfixed32(1));
- Assert.AreEqual(710, message.GetPackedSfixed64(1));
- Assert.AreEqual(711, message.GetPackedFloat(1), 0.0);
- Assert.AreEqual(712, message.GetPackedDouble(1), 0.0);
- Assert.AreEqual(false, message.GetPackedBool(1));
- Assert.AreEqual(ForeignEnum.FOREIGN_BAZ, message.GetPackedEnum(1));
+ Assert.Equal(2, message.PackedInt32Count);
+ Assert.Equal(2, message.PackedInt64Count);
+ Assert.Equal(2, message.PackedUint32Count);
+ Assert.Equal(2, message.PackedUint64Count);
+ Assert.Equal(2, message.PackedSint32Count);
+ Assert.Equal(2, message.PackedSint64Count);
+ Assert.Equal(2, message.PackedFixed32Count);
+ Assert.Equal(2, message.PackedFixed64Count);
+ Assert.Equal(2, message.PackedSfixed32Count);
+ Assert.Equal(2, message.PackedSfixed64Count);
+ Assert.Equal(2, message.PackedFloatCount);
+ Assert.Equal(2, message.PackedDoubleCount);
+ Assert.Equal(2, message.PackedBoolCount);
+ Assert.Equal(2, message.PackedEnumCount);
+ Assert.Equal(601, message.GetPackedInt32(0));
+ Assert.Equal(602, message.GetPackedInt64(0));
+ Assert.Equal(603u, message.GetPackedUint32(0));
+ Assert.Equal(604u, message.GetPackedUint64(0));
+ Assert.Equal(605, message.GetPackedSint32(0));
+ Assert.Equal(606, message.GetPackedSint64(0));
+ Assert.Equal(607u, message.GetPackedFixed32(0));
+ Assert.Equal(608u, message.GetPackedFixed64(0));
+ Assert.Equal(609, message.GetPackedSfixed32(0));
+ Assert.Equal(610, message.GetPackedSfixed64(0));
+ Assert.Equal(611f, message.GetPackedFloat(0));
+ Assert.Equal(612d, message.GetPackedDouble(0));
+ Assert.Equal(true, message.GetPackedBool(0));
+ Assert.Equal(ForeignEnum.FOREIGN_BAR, message.GetPackedEnum(0));
+ Assert.Equal(701, message.GetPackedInt32(1));
+ Assert.Equal(702, message.GetPackedInt64(1));
+ Assert.Equal(703u, message.GetPackedUint32(1));
+ Assert.Equal(704u, message.GetPackedUint64(1));
+ Assert.Equal(705, message.GetPackedSint32(1));
+ Assert.Equal(706, message.GetPackedSint64(1));
+ Assert.Equal(707u, message.GetPackedFixed32(1));
+ Assert.Equal(708u, message.GetPackedFixed64(1));
+ Assert.Equal(709, message.GetPackedSfixed32(1));
+ Assert.Equal(710, message.GetPackedSfixed64(1));
+ Assert.Equal(711f, message.GetPackedFloat(1));
+ Assert.Equal(712d, message.GetPackedDouble(1));
+ Assert.Equal(false, message.GetPackedBool(1));
+ Assert.Equal(ForeignEnum.FOREIGN_BAZ, message.GetPackedEnum(1));
}
/// <summary>
/// Asserts that all the fields of the specified message are set to the values assigned
@@ -1544,48 +1544,48 @@
/// </summary>
public static void AssertUnpackedFieldsSet(TestUnpackedTypes message)
{
- Assert.AreEqual(2, message.UnpackedInt32Count);
- Assert.AreEqual(2, message.UnpackedInt64Count);
- Assert.AreEqual(2, message.UnpackedUint32Count);
- Assert.AreEqual(2, message.UnpackedUint64Count);
- Assert.AreEqual(2, message.UnpackedSint32Count);
- Assert.AreEqual(2, message.UnpackedSint64Count);
- Assert.AreEqual(2, message.UnpackedFixed32Count);
- Assert.AreEqual(2, message.UnpackedFixed64Count);
- Assert.AreEqual(2, message.UnpackedSfixed32Count);
- Assert.AreEqual(2, message.UnpackedSfixed64Count);
- Assert.AreEqual(2, message.UnpackedFloatCount);
- Assert.AreEqual(2, message.UnpackedDoubleCount);
- Assert.AreEqual(2, message.UnpackedBoolCount);
- Assert.AreEqual(2, message.UnpackedEnumCount);
- Assert.AreEqual(601, message.GetUnpackedInt32(0));
- Assert.AreEqual(602, message.GetUnpackedInt64(0));
- Assert.AreEqual(603u, message.GetUnpackedUint32(0));
- Assert.AreEqual(604u, message.GetUnpackedUint64(0));
- Assert.AreEqual(605, message.GetUnpackedSint32(0));
- Assert.AreEqual(606, message.GetUnpackedSint64(0));
- Assert.AreEqual(607u, message.GetUnpackedFixed32(0));
- Assert.AreEqual(608u, message.GetUnpackedFixed64(0));
- Assert.AreEqual(609, message.GetUnpackedSfixed32(0));
- Assert.AreEqual(610, message.GetUnpackedSfixed64(0));
- Assert.AreEqual(611, message.GetUnpackedFloat(0), 0.0);
- Assert.AreEqual(612, message.GetUnpackedDouble(0), 0.0);
- Assert.AreEqual(true, message.GetUnpackedBool(0));
- Assert.AreEqual(ForeignEnum.FOREIGN_BAR, message.GetUnpackedEnum(0));
- Assert.AreEqual(701, message.GetUnpackedInt32(1));
- Assert.AreEqual(702, message.GetUnpackedInt64(1));
- Assert.AreEqual(703u, message.GetUnpackedUint32(1));
- Assert.AreEqual(704u, message.GetUnpackedUint64(1));
- Assert.AreEqual(705, message.GetUnpackedSint32(1));
- Assert.AreEqual(706, message.GetUnpackedSint64(1));
- Assert.AreEqual(707u, message.GetUnpackedFixed32(1));
- Assert.AreEqual(708u, message.GetUnpackedFixed64(1));
- Assert.AreEqual(709, message.GetUnpackedSfixed32(1));
- Assert.AreEqual(710, message.GetUnpackedSfixed64(1));
- Assert.AreEqual(711, message.GetUnpackedFloat(1), 0.0);
- Assert.AreEqual(712, message.GetUnpackedDouble(1), 0.0);
- Assert.AreEqual(false, message.GetUnpackedBool(1));
- Assert.AreEqual(ForeignEnum.FOREIGN_BAZ, message.GetUnpackedEnum(1));
+ Assert.Equal(2, message.UnpackedInt32Count);
+ Assert.Equal(2, message.UnpackedInt64Count);
+ Assert.Equal(2, message.UnpackedUint32Count);
+ Assert.Equal(2, message.UnpackedUint64Count);
+ Assert.Equal(2, message.UnpackedSint32Count);
+ Assert.Equal(2, message.UnpackedSint64Count);
+ Assert.Equal(2, message.UnpackedFixed32Count);
+ Assert.Equal(2, message.UnpackedFixed64Count);
+ Assert.Equal(2, message.UnpackedSfixed32Count);
+ Assert.Equal(2, message.UnpackedSfixed64Count);
+ Assert.Equal(2, message.UnpackedFloatCount);
+ Assert.Equal(2, message.UnpackedDoubleCount);
+ Assert.Equal(2, message.UnpackedBoolCount);
+ Assert.Equal(2, message.UnpackedEnumCount);
+ Assert.Equal(601, message.GetUnpackedInt32(0));
+ Assert.Equal(602, message.GetUnpackedInt64(0));
+ Assert.Equal(603u, message.GetUnpackedUint32(0));
+ Assert.Equal(604u, message.GetUnpackedUint64(0));
+ Assert.Equal(605, message.GetUnpackedSint32(0));
+ Assert.Equal(606, message.GetUnpackedSint64(0));
+ Assert.Equal(607u, message.GetUnpackedFixed32(0));
+ Assert.Equal(608u, message.GetUnpackedFixed64(0));
+ Assert.Equal(609, message.GetUnpackedSfixed32(0));
+ Assert.Equal(610, message.GetUnpackedSfixed64(0));
+ Assert.Equal(611f, message.GetUnpackedFloat(0));
+ Assert.Equal(612d, message.GetUnpackedDouble(0));
+ Assert.Equal(true, message.GetUnpackedBool(0));
+ Assert.Equal(ForeignEnum.FOREIGN_BAR, message.GetUnpackedEnum(0));
+ Assert.Equal(701, message.GetUnpackedInt32(1));
+ Assert.Equal(702, message.GetUnpackedInt64(1));
+ Assert.Equal(703u, message.GetUnpackedUint32(1));
+ Assert.Equal(704u, message.GetUnpackedUint64(1));
+ Assert.Equal(705, message.GetUnpackedSint32(1));
+ Assert.Equal(706, message.GetUnpackedSint64(1));
+ Assert.Equal(707u, message.GetUnpackedFixed32(1));
+ Assert.Equal(708u, message.GetUnpackedFixed64(1));
+ Assert.Equal(709, message.GetUnpackedSfixed32(1));
+ Assert.Equal(710, message.GetUnpackedSfixed64(1));
+ Assert.Equal(711f, message.GetUnpackedFloat(1));
+ Assert.Equal(712d, message.GetUnpackedDouble(1));
+ Assert.Equal(false, message.GetUnpackedBool(1));
+ Assert.Equal(ForeignEnum.FOREIGN_BAZ, message.GetUnpackedEnum(1));
}
public static void SetPackedExtensions(TestPackedExtensions.Builder message)
@@ -1623,95 +1623,95 @@
public static void AssertPackedExtensionsSet(TestPackedExtensions message)
{
- Assert.AreEqual(2, message.GetExtensionCount(Unittest.PackedInt32Extension));
- Assert.AreEqual(2, message.GetExtensionCount(Unittest.PackedInt64Extension));
- Assert.AreEqual(2, message.GetExtensionCount(Unittest.PackedUint32Extension));
- Assert.AreEqual(2, message.GetExtensionCount(Unittest.PackedUint64Extension));
- Assert.AreEqual(2, message.GetExtensionCount(Unittest.PackedSint32Extension));
- Assert.AreEqual(2, message.GetExtensionCount(Unittest.PackedSint64Extension));
- Assert.AreEqual(2, message.GetExtensionCount(Unittest.PackedFixed32Extension));
- Assert.AreEqual(2, message.GetExtensionCount(Unittest.PackedFixed64Extension));
- Assert.AreEqual(2, message.GetExtensionCount(Unittest.PackedSfixed32Extension));
- Assert.AreEqual(2, message.GetExtensionCount(Unittest.PackedSfixed64Extension));
- Assert.AreEqual(2, message.GetExtensionCount(Unittest.PackedFloatExtension));
- Assert.AreEqual(2, message.GetExtensionCount(Unittest.PackedDoubleExtension));
- Assert.AreEqual(2, message.GetExtensionCount(Unittest.PackedBoolExtension));
- Assert.AreEqual(2, message.GetExtensionCount(Unittest.PackedEnumExtension));
- Assert.AreEqual(601, message.GetExtension(Unittest.PackedInt32Extension, 0));
- Assert.AreEqual(602L, message.GetExtension(Unittest.PackedInt64Extension, 0));
- Assert.AreEqual(603u, message.GetExtension(Unittest.PackedUint32Extension, 0));
- Assert.AreEqual(604uL, message.GetExtension(Unittest.PackedUint64Extension, 0));
- Assert.AreEqual(605, message.GetExtension(Unittest.PackedSint32Extension, 0));
- Assert.AreEqual(606L, message.GetExtension(Unittest.PackedSint64Extension, 0));
- Assert.AreEqual(607u, message.GetExtension(Unittest.PackedFixed32Extension, 0));
- Assert.AreEqual(608uL, message.GetExtension(Unittest.PackedFixed64Extension, 0));
- Assert.AreEqual(609, message.GetExtension(Unittest.PackedSfixed32Extension, 0));
- Assert.AreEqual(610L, message.GetExtension(Unittest.PackedSfixed64Extension, 0));
- Assert.AreEqual(611F, message.GetExtension(Unittest.PackedFloatExtension, 0));
- Assert.AreEqual(612D, message.GetExtension(Unittest.PackedDoubleExtension, 0));
- Assert.AreEqual(true, message.GetExtension(Unittest.PackedBoolExtension, 0));
- Assert.AreEqual(ForeignEnum.FOREIGN_BAR,
+ Assert.Equal(2, message.GetExtensionCount(Unittest.PackedInt32Extension));
+ Assert.Equal(2, message.GetExtensionCount(Unittest.PackedInt64Extension));
+ Assert.Equal(2, message.GetExtensionCount(Unittest.PackedUint32Extension));
+ Assert.Equal(2, message.GetExtensionCount(Unittest.PackedUint64Extension));
+ Assert.Equal(2, message.GetExtensionCount(Unittest.PackedSint32Extension));
+ Assert.Equal(2, message.GetExtensionCount(Unittest.PackedSint64Extension));
+ Assert.Equal(2, message.GetExtensionCount(Unittest.PackedFixed32Extension));
+ Assert.Equal(2, message.GetExtensionCount(Unittest.PackedFixed64Extension));
+ Assert.Equal(2, message.GetExtensionCount(Unittest.PackedSfixed32Extension));
+ Assert.Equal(2, message.GetExtensionCount(Unittest.PackedSfixed64Extension));
+ Assert.Equal(2, message.GetExtensionCount(Unittest.PackedFloatExtension));
+ Assert.Equal(2, message.GetExtensionCount(Unittest.PackedDoubleExtension));
+ Assert.Equal(2, message.GetExtensionCount(Unittest.PackedBoolExtension));
+ Assert.Equal(2, message.GetExtensionCount(Unittest.PackedEnumExtension));
+ Assert.Equal(601, message.GetExtension(Unittest.PackedInt32Extension, 0));
+ Assert.Equal(602L, message.GetExtension(Unittest.PackedInt64Extension, 0));
+ Assert.Equal(603u, message.GetExtension(Unittest.PackedUint32Extension, 0));
+ Assert.Equal(604uL, message.GetExtension(Unittest.PackedUint64Extension, 0));
+ Assert.Equal(605, message.GetExtension(Unittest.PackedSint32Extension, 0));
+ Assert.Equal(606L, message.GetExtension(Unittest.PackedSint64Extension, 0));
+ Assert.Equal(607u, message.GetExtension(Unittest.PackedFixed32Extension, 0));
+ Assert.Equal(608uL, message.GetExtension(Unittest.PackedFixed64Extension, 0));
+ Assert.Equal(609, message.GetExtension(Unittest.PackedSfixed32Extension, 0));
+ Assert.Equal(610L, message.GetExtension(Unittest.PackedSfixed64Extension, 0));
+ Assert.Equal(611F, message.GetExtension(Unittest.PackedFloatExtension, 0));
+ Assert.Equal(612D, message.GetExtension(Unittest.PackedDoubleExtension, 0));
+ Assert.Equal(true, message.GetExtension(Unittest.PackedBoolExtension, 0));
+ Assert.Equal(ForeignEnum.FOREIGN_BAR,
message.GetExtension(Unittest.PackedEnumExtension, 0));
- Assert.AreEqual(701, message.GetExtension(Unittest.PackedInt32Extension, 1));
- Assert.AreEqual(702L, message.GetExtension(Unittest.PackedInt64Extension, 1));
- Assert.AreEqual(703u, message.GetExtension(Unittest.PackedUint32Extension, 1));
- Assert.AreEqual(704uL, message.GetExtension(Unittest.PackedUint64Extension, 1));
- Assert.AreEqual(705, message.GetExtension(Unittest.PackedSint32Extension, 1));
- Assert.AreEqual(706L, message.GetExtension(Unittest.PackedSint64Extension, 1));
- Assert.AreEqual(707u, message.GetExtension(Unittest.PackedFixed32Extension, 1));
- Assert.AreEqual(708uL, message.GetExtension(Unittest.PackedFixed64Extension, 1));
- Assert.AreEqual(709, message.GetExtension(Unittest.PackedSfixed32Extension, 1));
- Assert.AreEqual(710L, message.GetExtension(Unittest.PackedSfixed64Extension, 1));
- Assert.AreEqual(711F, message.GetExtension(Unittest.PackedFloatExtension, 1));
- Assert.AreEqual(712D, message.GetExtension(Unittest.PackedDoubleExtension, 1));
- Assert.AreEqual(false, message.GetExtension(Unittest.PackedBoolExtension, 1));
- Assert.AreEqual(ForeignEnum.FOREIGN_BAZ, message.GetExtension(Unittest.PackedEnumExtension, 1));
+ Assert.Equal(701, message.GetExtension(Unittest.PackedInt32Extension, 1));
+ Assert.Equal(702L, message.GetExtension(Unittest.PackedInt64Extension, 1));
+ Assert.Equal(703u, message.GetExtension(Unittest.PackedUint32Extension, 1));
+ Assert.Equal(704uL, message.GetExtension(Unittest.PackedUint64Extension, 1));
+ Assert.Equal(705, message.GetExtension(Unittest.PackedSint32Extension, 1));
+ Assert.Equal(706L, message.GetExtension(Unittest.PackedSint64Extension, 1));
+ Assert.Equal(707u, message.GetExtension(Unittest.PackedFixed32Extension, 1));
+ Assert.Equal(708uL, message.GetExtension(Unittest.PackedFixed64Extension, 1));
+ Assert.Equal(709, message.GetExtension(Unittest.PackedSfixed32Extension, 1));
+ Assert.Equal(710L, message.GetExtension(Unittest.PackedSfixed64Extension, 1));
+ Assert.Equal(711F, message.GetExtension(Unittest.PackedFloatExtension, 1));
+ Assert.Equal(712D, message.GetExtension(Unittest.PackedDoubleExtension, 1));
+ Assert.Equal(false, message.GetExtension(Unittest.PackedBoolExtension, 1));
+ Assert.Equal(ForeignEnum.FOREIGN_BAZ, message.GetExtension(Unittest.PackedEnumExtension, 1));
}
public static void AssertUnpackedExtensionsSet(TestUnpackedExtensions message)
{
- Assert.AreEqual(2, message.GetExtensionCount(Unittest.UnpackedInt32Extension));
- Assert.AreEqual(2, message.GetExtensionCount(Unittest.UnpackedInt64Extension));
- Assert.AreEqual(2, message.GetExtensionCount(Unittest.UnpackedUint32Extension));
- Assert.AreEqual(2, message.GetExtensionCount(Unittest.UnpackedUint64Extension));
- Assert.AreEqual(2, message.GetExtensionCount(Unittest.UnpackedSint32Extension));
- Assert.AreEqual(2, message.GetExtensionCount(Unittest.UnpackedSint64Extension));
- Assert.AreEqual(2, message.GetExtensionCount(Unittest.UnpackedFixed32Extension));
- Assert.AreEqual(2, message.GetExtensionCount(Unittest.UnpackedFixed64Extension));
- Assert.AreEqual(2, message.GetExtensionCount(Unittest.UnpackedSfixed32Extension));
- Assert.AreEqual(2, message.GetExtensionCount(Unittest.UnpackedSfixed64Extension));
- Assert.AreEqual(2, message.GetExtensionCount(Unittest.UnpackedFloatExtension));
- Assert.AreEqual(2, message.GetExtensionCount(Unittest.UnpackedDoubleExtension));
- Assert.AreEqual(2, message.GetExtensionCount(Unittest.UnpackedBoolExtension));
- Assert.AreEqual(2, message.GetExtensionCount(Unittest.UnpackedEnumExtension));
- Assert.AreEqual(601, message.GetExtension(Unittest.UnpackedInt32Extension, 0));
- Assert.AreEqual(602L, message.GetExtension(Unittest.UnpackedInt64Extension, 0));
- Assert.AreEqual(603u, message.GetExtension(Unittest.UnpackedUint32Extension, 0));
- Assert.AreEqual(604uL, message.GetExtension(Unittest.UnpackedUint64Extension, 0));
- Assert.AreEqual(605, message.GetExtension(Unittest.UnpackedSint32Extension, 0));
- Assert.AreEqual(606L, message.GetExtension(Unittest.UnpackedSint64Extension, 0));
- Assert.AreEqual(607u, message.GetExtension(Unittest.UnpackedFixed32Extension, 0));
- Assert.AreEqual(608uL, message.GetExtension(Unittest.UnpackedFixed64Extension, 0));
- Assert.AreEqual(609, message.GetExtension(Unittest.UnpackedSfixed32Extension, 0));
- Assert.AreEqual(610L, message.GetExtension(Unittest.UnpackedSfixed64Extension, 0));
- Assert.AreEqual(611F, message.GetExtension(Unittest.UnpackedFloatExtension, 0));
- Assert.AreEqual(612D, message.GetExtension(Unittest.UnpackedDoubleExtension, 0));
- Assert.AreEqual(true, message.GetExtension(Unittest.UnpackedBoolExtension, 0));
- Assert.AreEqual(ForeignEnum.FOREIGN_BAR, message.GetExtension(Unittest.UnpackedEnumExtension, 0));
- Assert.AreEqual(701, message.GetExtension(Unittest.UnpackedInt32Extension, 1));
- Assert.AreEqual(702L, message.GetExtension(Unittest.UnpackedInt64Extension, 1));
- Assert.AreEqual(703u, message.GetExtension(Unittest.UnpackedUint32Extension, 1));
- Assert.AreEqual(704uL, message.GetExtension(Unittest.UnpackedUint64Extension, 1));
- Assert.AreEqual(705, message.GetExtension(Unittest.UnpackedSint32Extension, 1));
- Assert.AreEqual(706L, message.GetExtension(Unittest.UnpackedSint64Extension, 1));
- Assert.AreEqual(707u, message.GetExtension(Unittest.UnpackedFixed32Extension, 1));
- Assert.AreEqual(708uL, message.GetExtension(Unittest.UnpackedFixed64Extension, 1));
- Assert.AreEqual(709, message.GetExtension(Unittest.UnpackedSfixed32Extension, 1));
- Assert.AreEqual(710L, message.GetExtension(Unittest.UnpackedSfixed64Extension, 1));
- Assert.AreEqual(711F, message.GetExtension(Unittest.UnpackedFloatExtension, 1));
- Assert.AreEqual(712D, message.GetExtension(Unittest.UnpackedDoubleExtension, 1));
- Assert.AreEqual(false, message.GetExtension(Unittest.UnpackedBoolExtension, 1));
- Assert.AreEqual(ForeignEnum.FOREIGN_BAZ, message.GetExtension(Unittest.UnpackedEnumExtension, 1));
+ Assert.Equal(2, message.GetExtensionCount(Unittest.UnpackedInt32Extension));
+ Assert.Equal(2, message.GetExtensionCount(Unittest.UnpackedInt64Extension));
+ Assert.Equal(2, message.GetExtensionCount(Unittest.UnpackedUint32Extension));
+ Assert.Equal(2, message.GetExtensionCount(Unittest.UnpackedUint64Extension));
+ Assert.Equal(2, message.GetExtensionCount(Unittest.UnpackedSint32Extension));
+ Assert.Equal(2, message.GetExtensionCount(Unittest.UnpackedSint64Extension));
+ Assert.Equal(2, message.GetExtensionCount(Unittest.UnpackedFixed32Extension));
+ Assert.Equal(2, message.GetExtensionCount(Unittest.UnpackedFixed64Extension));
+ Assert.Equal(2, message.GetExtensionCount(Unittest.UnpackedSfixed32Extension));
+ Assert.Equal(2, message.GetExtensionCount(Unittest.UnpackedSfixed64Extension));
+ Assert.Equal(2, message.GetExtensionCount(Unittest.UnpackedFloatExtension));
+ Assert.Equal(2, message.GetExtensionCount(Unittest.UnpackedDoubleExtension));
+ Assert.Equal(2, message.GetExtensionCount(Unittest.UnpackedBoolExtension));
+ Assert.Equal(2, message.GetExtensionCount(Unittest.UnpackedEnumExtension));
+ Assert.Equal(601, message.GetExtension(Unittest.UnpackedInt32Extension, 0));
+ Assert.Equal(602L, message.GetExtension(Unittest.UnpackedInt64Extension, 0));
+ Assert.Equal(603u, message.GetExtension(Unittest.UnpackedUint32Extension, 0));
+ Assert.Equal(604uL, message.GetExtension(Unittest.UnpackedUint64Extension, 0));
+ Assert.Equal(605, message.GetExtension(Unittest.UnpackedSint32Extension, 0));
+ Assert.Equal(606L, message.GetExtension(Unittest.UnpackedSint64Extension, 0));
+ Assert.Equal(607u, message.GetExtension(Unittest.UnpackedFixed32Extension, 0));
+ Assert.Equal(608uL, message.GetExtension(Unittest.UnpackedFixed64Extension, 0));
+ Assert.Equal(609, message.GetExtension(Unittest.UnpackedSfixed32Extension, 0));
+ Assert.Equal(610L, message.GetExtension(Unittest.UnpackedSfixed64Extension, 0));
+ Assert.Equal(611F, message.GetExtension(Unittest.UnpackedFloatExtension, 0));
+ Assert.Equal(612D, message.GetExtension(Unittest.UnpackedDoubleExtension, 0));
+ Assert.Equal(true, message.GetExtension(Unittest.UnpackedBoolExtension, 0));
+ Assert.Equal(ForeignEnum.FOREIGN_BAR, message.GetExtension(Unittest.UnpackedEnumExtension, 0));
+ Assert.Equal(701, message.GetExtension(Unittest.UnpackedInt32Extension, 1));
+ Assert.Equal(702L, message.GetExtension(Unittest.UnpackedInt64Extension, 1));
+ Assert.Equal(703u, message.GetExtension(Unittest.UnpackedUint32Extension, 1));
+ Assert.Equal(704uL, message.GetExtension(Unittest.UnpackedUint64Extension, 1));
+ Assert.Equal(705, message.GetExtension(Unittest.UnpackedSint32Extension, 1));
+ Assert.Equal(706L, message.GetExtension(Unittest.UnpackedSint64Extension, 1));
+ Assert.Equal(707u, message.GetExtension(Unittest.UnpackedFixed32Extension, 1));
+ Assert.Equal(708uL, message.GetExtension(Unittest.UnpackedFixed64Extension, 1));
+ Assert.Equal(709, message.GetExtension(Unittest.UnpackedSfixed32Extension, 1));
+ Assert.Equal(710L, message.GetExtension(Unittest.UnpackedSfixed64Extension, 1));
+ Assert.Equal(711F, message.GetExtension(Unittest.UnpackedFloatExtension, 1));
+ Assert.Equal(712D, message.GetExtension(Unittest.UnpackedDoubleExtension, 1));
+ Assert.Equal(false, message.GetExtension(Unittest.UnpackedBoolExtension, 1));
+ Assert.Equal(ForeignEnum.FOREIGN_BAZ, message.GetExtension(Unittest.UnpackedEnumExtension, 1));
}
private static readonly string[] TestCultures = {"en-US", "en-GB", "fr-FR", "de-DE"};
@@ -1751,61 +1751,5 @@
}
return bytes;
}
-
-
- internal delegate void Action();
-
- internal static void AssertNotSupported(Action action)
- {
- try
- {
- action();
- Assert.Fail("Expected NotSupportedException");
- }
- catch (NotSupportedException)
- {
- // Expected
- }
- }
-
- internal static void AssertArgumentNullException(Action action)
- {
- try
- {
- action();
- Assert.Fail("Exception was not thrown");
- }
- // Not a general case, however, Compact Framework v2 does use Invoke
- catch (System.Reflection.TargetInvocationException te)
- {
- if (te.InnerException.GetType() != typeof(ArgumentNullException))
- throw;
- }
- // Normally expected exception
- catch (ArgumentNullException)
- {
- // We expect this exception.
- }
- }
-
- internal static void AssertBytesEqual(byte[] a, byte[]b)
- {
- if (a == null || b == null)
- {
- Assert.AreEqual<object>(a, b);
- }
- else
- {
- Assert.AreEqual(a.Length, b.Length, "The byte[] is not of the expected length.");
-
- for (int i = 0; i < a.Length; i++)
- {
- if (a[i] != b[i])
- {
- Assert.AreEqual(a[i], b[i], "Byte[] differs at index " + i);
- }
- }
- }
- }
}
}
\ No newline at end of file
diff --git a/csharp/src/ProtocolBuffers.Test/TestWriterFormatJson.cs b/csharp/src/ProtocolBuffers.Test/TestWriterFormatJson.cs
index b4472a6..ad5c052 100644
--- a/csharp/src/ProtocolBuffers.Test/TestWriterFormatJson.cs
+++ b/csharp/src/ProtocolBuffers.Test/TestWriterFormatJson.cs
@@ -1,18 +1,18 @@
using System;
using System.IO;
+using System.Runtime.InteropServices;
using System.Text;
+using EnumOptions = Google.ProtocolBuffers.TestProtos.EnumOptions;
using Google.ProtocolBuffers.DescriptorProtos;
using Google.ProtocolBuffers.Serialization;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
using Google.ProtocolBuffers.TestProtos;
-using EnumOptions = Google.ProtocolBuffers.TestProtos.EnumOptions;
+using Xunit;
namespace Google.ProtocolBuffers
{
- [TestClass]
public class TestWriterFormatJson
{
- [TestMethod]
+ [Fact]
public void Example_FromJson()
{
TestXmlMessage.Builder builder = TestXmlMessage.CreateBuilder();
@@ -21,10 +21,10 @@
Extensions.MergeFromJson(builder, @"{""valid"":true}");
TestXmlMessage message = builder.Build();
- Assert.AreEqual(true, message.Valid);
+ Assert.Equal(true, message.Valid);
}
- [TestMethod]
+ [Fact]
public void Example_ToJson()
{
TestXmlMessage message =
@@ -35,10 +35,10 @@
//3.5: string json = message.ToJson();
string json = Extensions.ToJson(message);
- Assert.AreEqual(@"{""valid"":true}", json);
+ Assert.Equal(@"{""valid"":true}", json);
}
- [TestMethod]
+ [Fact]
public void Example_WriteJsonUsingICodedOutputStream()
{
TestXmlMessage message =
@@ -52,20 +52,20 @@
writer.WriteMessageStart(); //manually begin the message, output is '{'
writer.Flush();
- Assert.AreEqual("{", output.ToString());
+ Assert.Equal("{", output.ToString());
ICodedOutputStream stream = writer;
message.WriteTo(stream); //write the message normally
writer.Flush();
- Assert.AreEqual(@"{""valid"":true", output.ToString());
+ Assert.Equal(@"{""valid"":true", output.ToString());
writer.WriteMessageEnd(); //manually write the end message '}'
- Assert.AreEqual(@"{""valid"":true}", output.ToString());
+ Assert.Equal(@"{""valid"":true}", output.ToString());
}
}
- [TestMethod]
+ [Fact]
public void Example_ReadJsonUsingICodedInputStream()
{
TestXmlMessage.Builder builder = TestXmlMessage.CreateBuilder();
@@ -94,35 +94,37 @@
JsonFormatReader.CreateInstance(Content)
.Merge(message.WeakCreateBuilderForType(), registry).WeakBuild();
- Assert.AreEqual(typeof(TMessage), copy.GetType());
- Assert.AreEqual(message, copy);
+ Assert.Equal(typeof(TMessage), copy.GetType());
+ Assert.Equal(message, copy);
foreach (string expect in expecting)
- Assert.IsTrue(Content.IndexOf(expect) >= 0, "Expected to find content '{0}' in: \r\n{1}", expect, Content);
+ {
+ Assert.True(Content.IndexOf(expect) >= 0);
+ }
}
- [TestMethod]
+ [Fact]
public void TestToJsonParseFromJson()
{
TestAllTypes msg = new TestAllTypes.Builder().SetDefaultBool(true).Build();
string json = Extensions.ToJson(msg);
- Assert.AreEqual("{\"default_bool\":true}", json);
+ Assert.Equal("{\"default_bool\":true}", json);
TestAllTypes copy = Extensions.MergeFromJson(new TestAllTypes.Builder(), json).Build();
- Assert.IsTrue(copy.HasDefaultBool && copy.DefaultBool);
- Assert.AreEqual(msg, copy);
+ Assert.True(copy.HasDefaultBool && copy.DefaultBool);
+ Assert.Equal(msg, copy);
}
- [TestMethod]
+ [Fact]
public void TestToJsonParseFromJsonReader()
{
TestAllTypes msg = new TestAllTypes.Builder().SetDefaultBool(true).Build();
string json = Extensions.ToJson(msg);
- Assert.AreEqual("{\"default_bool\":true}", json);
+ Assert.Equal("{\"default_bool\":true}", json);
TestAllTypes copy = Extensions.MergeFromJson(new TestAllTypes.Builder(), new StringReader(json)).Build();
- Assert.IsTrue(copy.HasDefaultBool && copy.DefaultBool);
- Assert.AreEqual(msg, copy);
+ Assert.True(copy.HasDefaultBool && copy.DefaultBool);
+ Assert.Equal(msg, copy);
}
- [TestMethod]
+ [Fact]
public void TestJsonFormatted()
{
TestXmlMessage message = TestXmlMessage.CreateBuilder()
@@ -142,10 +144,10 @@
TestXmlMessage copy = JsonFormatReader.CreateInstance(json)
.Merge(TestXmlMessage.CreateBuilder()).Build();
- Assert.AreEqual(message, copy);
+ Assert.Equal(message, copy);
}
- [TestMethod]
+ [Fact]
public void TestEmptyMessage()
{
FormatterAssert(
@@ -155,7 +157,7 @@
);
}
- [TestMethod]
+ [Fact]
public void TestRepeatedField()
{
FormatterAssert(
@@ -167,7 +169,7 @@
);
}
- [TestMethod]
+ [Fact]
public void TestNestedEmptyMessage()
{
FormatterAssert(
@@ -178,7 +180,7 @@
);
}
- [TestMethod]
+ [Fact]
public void TestNestedMessage()
{
FormatterAssert(
@@ -189,7 +191,7 @@
);
}
- [TestMethod]
+ [Fact]
public void TestBooleanTypes()
{
FormatterAssert(
@@ -200,7 +202,7 @@
);
}
- [TestMethod]
+ [Fact]
public void TestFullMessage()
{
FormatterAssert(
@@ -230,7 +232,7 @@
);
}
- [TestMethod]
+ [Fact]
public void TestMessageWithXmlText()
{
FormatterAssert(
@@ -241,7 +243,7 @@
);
}
- [TestMethod]
+ [Fact]
public void TestWithEscapeChars()
{
FormatterAssert(
@@ -252,7 +254,7 @@
);
}
- [TestMethod]
+ [Fact]
public void TestWithExtensionText()
{
FormatterAssert(
@@ -264,7 +266,7 @@
);
}
- [TestMethod]
+ [Fact]
public void TestWithExtensionNumber()
{
FormatterAssert(
@@ -276,7 +278,7 @@
);
}
- [TestMethod]
+ [Fact]
public void TestWithExtensionArray()
{
FormatterAssert(
@@ -289,7 +291,7 @@
);
}
- [TestMethod]
+ [Fact]
public void TestWithExtensionEnum()
{
FormatterAssert(
@@ -300,7 +302,7 @@
);
}
- [TestMethod]
+ [Fact]
public void TestMessageWithExtensions()
{
FormatterAssert(
@@ -323,7 +325,7 @@
);
}
- [TestMethod]
+ [Fact]
public void TestMessageMissingExtensions()
{
TestXmlMessage original = TestXmlMessage.CreateBuilder()
@@ -351,23 +353,23 @@
IMessageLite copy = JsonFormatReader.CreateInstance(Content)
.Merge(message.CreateBuilderForType()).Build();
- Assert.AreNotEqual(original, message);
- Assert.AreNotEqual(original, copy);
- Assert.AreEqual(message, copy);
+ Assert.NotEqual(original, message);
+ Assert.NotEqual(original, copy);
+ Assert.Equal(message, copy);
}
- [TestMethod]
+ [Fact]
public void TestMergeFields()
{
TestXmlMessage.Builder builder = TestXmlMessage.CreateBuilder();
builder.MergeFrom(JsonFormatReader.CreateInstance("\"valid\": true"));
builder.MergeFrom(JsonFormatReader.CreateInstance("\"text\": \"text\", \"number\": \"411\""));
- Assert.AreEqual(true, builder.Valid);
- Assert.AreEqual("text", builder.Text);
- Assert.AreEqual(411, builder.Number);
+ Assert.Equal(true, builder.Valid);
+ Assert.Equal("text", builder.Text);
+ Assert.Equal(411, builder.Number);
}
- [TestMethod]
+ [Fact]
public void TestMessageArray()
{
JsonFormatWriter writer = JsonFormatWriter.CreateInstance().Formatted();
@@ -386,13 +388,13 @@
foreach (JsonFormatReader r in reader.EnumerateArray())
{
r.Merge(builder);
- Assert.AreEqual(++ordinal, builder.Number);
+ Assert.Equal(++ordinal, builder.Number);
}
- Assert.AreEqual(3, ordinal);
- Assert.AreEqual(3, builder.TextlinesCount);
+ Assert.Equal(3, ordinal);
+ Assert.Equal(3, builder.TextlinesCount);
}
- [TestMethod]
+ [Fact]
public void TestNestedMessageArray()
{
JsonFormatWriter writer = JsonFormatWriter.CreateInstance();
@@ -416,13 +418,13 @@
foreach (JsonFormatReader r2 in r.EnumerateArray())
{
r2.Merge(builder);
- Assert.AreEqual(++ordinal, builder.Number);
+ Assert.Equal(++ordinal, builder.Number);
}
- Assert.AreEqual(3, ordinal);
- Assert.AreEqual(3, builder.TextlinesCount);
+ Assert.Equal(3, ordinal);
+ Assert.Equal(3, builder.TextlinesCount);
}
- [TestMethod]
+ [Fact]
public void TestReadWriteJsonWithoutRoot()
{
TestXmlMessage.Builder builder = TestXmlMessage.CreateBuilder();
@@ -437,53 +439,51 @@
output.Flush();
Json = sw.ToString();
}
- Assert.AreEqual(@"""text"":""abc"",""number"":123", Json);
+ Assert.Equal(@"""text"":""abc"",""number"":123", Json);
ICodedInputStream input = JsonFormatReader.CreateInstance(Json);
TestXmlMessage copy = TestXmlMessage.CreateBuilder().MergeFrom(input).Build();
- Assert.AreEqual(message, copy);
+ Assert.Equal(message, copy);
}
- [TestMethod,ExpectedException(typeof(RecursionLimitExceededException))]
+ [Fact]
public void TestRecursiveLimit()
{
StringBuilder sb = new StringBuilder(8192);
for (int i = 0; i < 80; i++)
+ {
sb.Append("{\"child\":");
- TestXmlRescursive msg = Extensions.MergeFromJson(new TestXmlRescursive.Builder(), sb.ToString()).Build();
+ }
+ Assert.Throws<RecursionLimitExceededException>(() => Extensions.MergeFromJson(new TestXmlRescursive.Builder(), sb.ToString()).Build());
}
- [TestMethod, ExpectedException(typeof(FormatException))]
+ [Fact]
public void FailWithEmptyText()
{
- JsonFormatReader.CreateInstance("")
- .Merge(TestXmlMessage.CreateBuilder());
+ Assert.Throws<FormatException>(() => JsonFormatReader.CreateInstance("").Merge(TestXmlMessage.CreateBuilder()));
}
- [TestMethod, ExpectedException(typeof(FormatException))]
+ [Fact]
public void FailWithUnexpectedValue()
{
- JsonFormatReader.CreateInstance("{{}}")
- .Merge(TestXmlMessage.CreateBuilder());
+ Assert.Throws<FormatException>(() => JsonFormatReader.CreateInstance("{{}}").Merge(TestXmlMessage.CreateBuilder()));
}
- [TestMethod, ExpectedException(typeof(FormatException))]
+ [Fact]
public void FailWithUnQuotedName()
{
- JsonFormatReader.CreateInstance("{name:{}}")
- .Merge(TestXmlMessage.CreateBuilder());
+ Assert.Throws<FormatException>(() => JsonFormatReader.CreateInstance("{name:{}}").Merge(TestXmlMessage.CreateBuilder()));
}
- [TestMethod, ExpectedException(typeof(FormatException))]
+ [Fact]
public void FailWithUnexpectedType()
{
- JsonFormatReader.CreateInstance("{\"valid\":{}}")
- .Merge(TestXmlMessage.CreateBuilder());
+ Assert.Throws<FormatException>(() => JsonFormatReader.CreateInstance("{\"valid\":{}}").Merge(TestXmlMessage.CreateBuilder()));
}
// See issue 64 for background.
- [TestMethod]
+ [Fact]
public void ToJsonRequiringBufferExpansion()
{
string s = new string('.', 4086);
@@ -492,7 +492,7 @@
.SetPackage("package")
.BuildPartial();
- Assert.IsNotNull(Extensions.ToJson(opts));
+ Assert.NotNull(Extensions.ToJson(opts));
}
}
}
diff --git a/csharp/src/ProtocolBuffers.Test/TestWriterFormatXml.cs b/csharp/src/ProtocolBuffers.Test/TestWriterFormatXml.cs
index 695daa8..78e6bb2 100644
--- a/csharp/src/ProtocolBuffers.Test/TestWriterFormatXml.cs
+++ b/csharp/src/ProtocolBuffers.Test/TestWriterFormatXml.cs
@@ -1,18 +1,16 @@
using System;
-using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Xml;
using Google.ProtocolBuffers.Serialization;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
using Google.ProtocolBuffers.TestProtos;
+using Xunit;
namespace Google.ProtocolBuffers
{
- [TestClass]
public class TestWriterFormatXml
{
- [TestMethod]
+ [Fact]
public void Example_FromXml()
{
TestXmlMessage.Builder builder = TestXmlMessage.CreateBuilder();
@@ -22,10 +20,10 @@
Extensions.MergeFromXml(builder, rdr);
TestXmlMessage message = builder.Build();
- Assert.AreEqual(true, message.Valid);
+ Assert.Equal(true, message.Valid);
}
- [TestMethod]
+ [Fact]
public void Example_ToXml()
{
TestXmlMessage message =
@@ -36,10 +34,10 @@
//3.5: string Xml = message.ToXml();
string Xml = Extensions.ToXml(message);
- Assert.AreEqual(@"<root><valid>true</valid></root>", Xml);
+ Assert.Equal(@"<root><valid>true</valid></root>", Xml);
}
- [TestMethod]
+ [Fact]
public void Example_WriteXmlUsingICodedOutputStream()
{
TestXmlMessage message =
@@ -56,11 +54,11 @@
message.WriteTo(stream); //write the message normally
writer.WriteMessageEnd(); //manually write the end message '}'
- Assert.AreEqual(@"<root><valid>true</valid></root>", output.ToString());
+ Assert.Equal(@"<root><valid>true</valid></root>", output.ToString());
}
}
- [TestMethod]
+ [Fact]
public void Example_ReadXmlUsingICodedInputStream()
{
TestXmlMessage.Builder builder = TestXmlMessage.CreateBuilder();
@@ -73,29 +71,29 @@
reader.ReadMessageEnd(); //manually read the end message '}'
}
- [TestMethod]
+ [Fact]
public void TestToXmlParseFromXml()
{
TestAllTypes msg = new TestAllTypes.Builder().SetDefaultBool(true).Build();
string xml = Extensions.ToXml(msg);
- Assert.AreEqual("<root><default_bool>true</default_bool></root>", xml);
+ Assert.Equal("<root><default_bool>true</default_bool></root>", xml);
TestAllTypes copy = Extensions.MergeFromXml(new TestAllTypes.Builder(), XmlReader.Create(new StringReader(xml))).Build();
- Assert.IsTrue(copy.HasDefaultBool && copy.DefaultBool);
- Assert.AreEqual(msg, copy);
+ Assert.True(copy.HasDefaultBool && copy.DefaultBool);
+ Assert.Equal(msg, copy);
}
- [TestMethod]
+ [Fact]
public void TestToXmlParseFromXmlWithRootName()
{
TestAllTypes msg = new TestAllTypes.Builder().SetDefaultBool(true).Build();
string xml = Extensions.ToXml(msg, "message");
- Assert.AreEqual("<message><default_bool>true</default_bool></message>", xml);
+ Assert.Equal("<message><default_bool>true</default_bool></message>", xml);
TestAllTypes copy = Extensions.MergeFromXml(new TestAllTypes.Builder(), "message", XmlReader.Create(new StringReader(xml))).Build();
- Assert.IsTrue(copy.HasDefaultBool && copy.DefaultBool);
- Assert.AreEqual(msg, copy);
+ Assert.True(copy.HasDefaultBool && copy.DefaultBool);
+ Assert.Equal(msg, copy);
}
- [TestMethod]
+ [Fact]
public void TestEmptyMessage()
{
TestXmlChild message = TestXmlChild.CreateBuilder()
@@ -113,9 +111,9 @@
string xml = sw.ToString();
XmlFormatReader rdr = XmlFormatReader.CreateInstance(xml);
TestXmlChild copy = rdr.Merge(TestXmlChild.CreateBuilder()).Build();
- Assert.AreEqual(message, copy);
+ Assert.Equal(message, copy);
}
- [TestMethod]
+ [Fact]
public void TestRepeatedField()
{
TestXmlChild message = TestXmlChild.CreateBuilder()
@@ -130,9 +128,10 @@
string xml = sw.ToString();
XmlFormatReader rdr = XmlFormatReader.CreateInstance(xml);
TestXmlChild copy = rdr.Merge(TestXmlChild.CreateBuilder()).Build();
- Assert.AreEqual(message, copy);
+ Assert.Equal(message, copy);
}
- [TestMethod]
+
+ [Fact]
public void TestNestedEmptyMessage()
{
TestXmlMessage message = TestXmlMessage.CreateBuilder()
@@ -145,9 +144,10 @@
string xml = sw.ToString();
XmlFormatReader rdr = XmlFormatReader.CreateInstance(xml);
TestXmlMessage copy = rdr.Merge(TestXmlMessage.CreateBuilder()).Build();
- Assert.AreEqual(message, copy);
+ Assert.Equal(message, copy);
}
- [TestMethod]
+
+ [Fact]
public void TestNestedMessage()
{
TestXmlMessage message = TestXmlMessage.CreateBuilder()
@@ -160,9 +160,10 @@
string xml = sw.ToString();
XmlFormatReader rdr = XmlFormatReader.CreateInstance(xml);
TestXmlMessage copy = rdr.Merge(TestXmlMessage.CreateBuilder()).Build();
- Assert.AreEqual(message, copy);
+ Assert.Equal(message, copy);
}
- [TestMethod]
+
+ [Fact]
public void TestBooleanTypes()
{
TestXmlMessage message = TestXmlMessage.CreateBuilder()
@@ -175,9 +176,10 @@
string xml = sw.ToString();
XmlFormatReader rdr = XmlFormatReader.CreateInstance(xml);
TestXmlMessage copy = rdr.Merge(TestXmlMessage.CreateBuilder()).Build();
- Assert.AreEqual(message, copy);
+ Assert.Equal(message, copy);
}
- [TestMethod]
+
+ [Fact]
public void TestFullMessage()
{
TestXmlMessage message = TestXmlMessage.CreateBuilder()
@@ -204,9 +206,10 @@
XmlFormatReader rdr = XmlFormatReader.CreateInstance(xml);
TestXmlMessage copy = rdr.Merge(TestXmlMessage.CreateBuilder()).Build();
- Assert.AreEqual(message, copy);
+ Assert.Equal(message, copy);
}
- [TestMethod]
+
+ [Fact]
public void TestFullMessageWithRichTypes()
{
TestXmlMessage message = TestXmlMessage.CreateBuilder()
@@ -236,9 +239,10 @@
XmlFormatReader rdr = XmlFormatReader.CreateInstance(xml);
rdr.Options = XmlReaderOptions.ReadNestedArrays;
TestXmlMessage copy = rdr.Merge(TestXmlMessage.CreateBuilder()).Build();
- Assert.AreEqual(message, copy);
+ Assert.Equal(message, copy);
}
- [TestMethod]
+
+ [Fact]
public void TestFullMessageWithUnknownFields()
{
TestXmlMessage origial = TestXmlMessage.CreateBuilder()
@@ -257,7 +261,7 @@
.Build();
TestXmlNoFields message = TestXmlNoFields.CreateBuilder().MergeFrom(origial.ToByteArray()).Build();
- Assert.AreEqual(0, message.AllFields.Count);
+ Assert.Equal(0, message.AllFields.Count);
StringWriter sw = new StringWriter();
XmlFormatWriter.CreateInstance(sw)
@@ -269,9 +273,9 @@
using (XmlReader x = XmlReader.Create(new StringReader(xml)))
{
x.MoveToContent();
- Assert.AreEqual(XmlNodeType.Element, x.NodeType);
+ Assert.Equal(XmlNodeType.Element, x.NodeType);
//should always be empty
- Assert.IsTrue(x.IsEmptyElement ||
+ Assert.True(x.IsEmptyElement ||
(x.Read() && x.NodeType == XmlNodeType.EndElement)
);
}
@@ -279,9 +283,10 @@
XmlFormatReader rdr = XmlFormatReader.CreateInstance(xml);
rdr.Options = XmlReaderOptions.ReadNestedArrays;
TestXmlMessage copy = rdr.Merge(TestXmlMessage.CreateBuilder()).Build();
- Assert.AreEqual(TestXmlMessage.DefaultInstance, copy);
+ Assert.Equal(TestXmlMessage.DefaultInstance, copy);
}
- [TestMethod]
+
+ [Fact]
public void TestMessageWithXmlText()
{
TestXmlMessage message = TestXmlMessage.CreateBuilder()
@@ -294,9 +299,10 @@
XmlFormatReader rdr = XmlFormatReader.CreateInstance(xml);
TestXmlMessage copy = rdr.Merge(TestXmlMessage.CreateBuilder()).Build();
- Assert.AreEqual(message, copy);
+ Assert.Equal(message, copy);
}
- [TestMethod]
+
+ [Fact]
public void TestXmlWithWhitespace()
{
TestXmlMessage message = TestXmlMessage.CreateBuilder()
@@ -309,9 +315,10 @@
XmlFormatReader rdr = XmlFormatReader.CreateInstance(xml);
TestXmlMessage copy = rdr.Merge(TestXmlMessage.CreateBuilder()).Build();
- Assert.AreEqual(message, copy);
+ Assert.Equal(message, copy);
}
- [TestMethod]
+
+ [Fact]
public void TestXmlWithExtensionText()
{
TestXmlMessage message = TestXmlMessage.CreateBuilder()
@@ -328,9 +335,10 @@
XmlFormatReader rdr = XmlFormatReader.CreateInstance(xml);
TestXmlMessage copy = rdr.Merge(TestXmlMessage.CreateBuilder(), registry).Build();
- Assert.AreEqual(message, copy);
+ Assert.Equal(message, copy);
}
- [TestMethod]
+
+ [Fact]
public void TestXmlWithExtensionMessage()
{
TestXmlMessage message = TestXmlMessage.CreateBuilder()
@@ -347,9 +355,10 @@
XmlFormatReader rdr = XmlFormatReader.CreateInstance(xml);
TestXmlMessage copy = rdr.Merge(TestXmlMessage.CreateBuilder(), registry).Build();
- Assert.AreEqual(message, copy);
+ Assert.Equal(message, copy);
}
- [TestMethod]
+
+ [Fact]
public void TestXmlWithExtensionArray()
{
TestXmlMessage message = TestXmlMessage.CreateBuilder()
@@ -368,9 +377,10 @@
XmlFormatReader rdr = XmlFormatReader.CreateInstance(xml);
TestXmlMessage copy = rdr.Merge(TestXmlMessage.CreateBuilder(), registry).Build();
- Assert.AreEqual(message, copy);
+ Assert.Equal(message, copy);
}
- [TestMethod]
+
+ [Fact]
public void TestXmlWithExtensionEnum()
{
TestXmlMessage message = TestXmlMessage.CreateBuilder()
@@ -387,9 +397,10 @@
XmlFormatReader rdr = XmlFormatReader.CreateInstance(xml);
TestXmlMessage copy = rdr.Merge(TestXmlMessage.CreateBuilder(), registry).Build();
- Assert.AreEqual(message, copy);
+ Assert.Equal(message, copy);
}
- [TestMethod]
+
+ [Fact]
public void TestXmlReadEmptyRoot()
{
TestXmlMessage.Builder builder = TestXmlMessage.CreateBuilder();
@@ -402,7 +413,7 @@
reader.ReadMessageEnd(); //manually read the end message '}'
}
- [TestMethod]
+ [Fact]
public void TestXmlReadEmptyChild()
{
TestXmlMessage.Builder builder = TestXmlMessage.CreateBuilder();
@@ -411,11 +422,11 @@
reader.ReadMessageStart(); //manually read the begin the message '{'
builder.MergeFrom(reader); //write the message normally
- Assert.IsTrue(builder.HasText);
- Assert.AreEqual(String.Empty, builder.Text);
+ Assert.True(builder.HasText);
+ Assert.Equal(String.Empty, builder.Text);
}
- [TestMethod]
+ [Fact]
public void TestXmlReadWriteWithoutRoot()
{
TestXmlMessage.Builder builder = TestXmlMessage.CreateBuilder();
@@ -431,7 +442,7 @@
output.Flush();
xml = sw.ToString();
}
- Assert.AreEqual("<text>abc</text><number>123</number>", xml);
+ Assert.Equal("<text>abc</text><number>123</number>", xml);
TestXmlMessage copy;
using (XmlReader xr = XmlReader.Create(new StringReader(xml), new XmlReaderSettings() { ConformanceLevel = ConformanceLevel.Fragment }))
@@ -440,16 +451,18 @@
copy = TestXmlMessage.CreateBuilder().MergeFrom(input).Build();
}
- Assert.AreEqual(message, copy);
+ Assert.Equal(message, copy);
}
- [TestMethod, ExpectedException(typeof(RecursionLimitExceededException))]
+ [Fact]
public void TestRecursiveLimit()
{
StringBuilder sb = new StringBuilder(8192);
for (int i = 0; i < 80; i++)
+ {
sb.Append("<child>");
- TestXmlRescursive msg = Extensions.MergeFromXml(new TestXmlRescursive.Builder(), "child", XmlReader.Create(new StringReader(sb.ToString()))).Build();
+ }
+ Assert.Throws<RecursionLimitExceededException>(() => Extensions.MergeFromXml(new TestXmlRescursive.Builder(), "child", XmlReader.Create(new StringReader(sb.ToString()))).Build());
}
}
}
diff --git a/csharp/src/ProtocolBuffers.Test/TextFormatTest.cs b/csharp/src/ProtocolBuffers.Test/TextFormatTest.cs
index 37a4192..1e083c6 100644
--- a/csharp/src/ProtocolBuffers.Test/TextFormatTest.cs
+++ b/csharp/src/ProtocolBuffers.Test/TextFormatTest.cs
@@ -36,15 +36,11 @@
using System;
using System.IO;
-using System.Text;
using Google.ProtocolBuffers.TestProtos;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using System.Globalization;
-using System.Threading;
+using Xunit;
namespace Google.ProtocolBuffers
{
- [TestClass]
public class TextFormatTest
{
private static readonly string AllFieldsSetText = TestResources.text_format_unittest_data;
@@ -88,46 +84,46 @@
/// <summary>
/// Print TestAllTypes and compare with golden file.
/// </summary>
- [TestMethod]
+ [Fact]
public void PrintMessage()
{
TestUtil.TestInMultipleCultures(() =>
- {
- string text = TextFormat.PrintToString(TestUtil.GetAllSet());
- Assert.AreEqual(AllFieldsSetText.Replace("\r\n", "\n").Trim(),
- text.Replace("\r\n", "\n").Trim());
- });
+ {
+ string text = TextFormat.PrintToString(TestUtil.GetAllSet());
+ Assert.Equal(AllFieldsSetText.Replace("\r\n", "\n").Trim(),
+ text.Replace("\r\n", "\n").Trim());
+ });
}
/// <summary>
/// Tests that a builder prints the same way as a message.
/// </summary>
- [TestMethod]
+ [Fact]
public void PrintBuilder()
{
TestUtil.TestInMultipleCultures(() =>
{
string messageText = TextFormat.PrintToString(TestUtil.GetAllSet());
string builderText = TextFormat.PrintToString(TestUtil.GetAllSet().ToBuilder());
- Assert.AreEqual(messageText, builderText);
+ Assert.Equal(messageText, builderText);
});
}
/// <summary>
/// Print TestAllExtensions and compare with golden file.
/// </summary>
- [TestMethod]
+ [Fact]
public void PrintExtensions()
{
string text = TextFormat.PrintToString(TestUtil.GetAllExtensionsSet());
- Assert.AreEqual(AllExtensionsSetText.Replace("\r\n", "\n").Trim(), text.Replace("\r\n", "\n").Trim());
+ Assert.Equal(AllExtensionsSetText.Replace("\r\n", "\n").Trim(), text.Replace("\r\n", "\n").Trim());
}
/// <summary>
/// Test printing of unknown fields in a message.
/// </summary>
- [TestMethod]
+ [Fact]
public void PrintUnknownFields()
{
TestEmptyMessage message =
@@ -163,7 +159,7 @@
.Build())
.Build();
- Assert.AreEqual(
+ Assert.Equal(
"5: 1\n" +
"5: 0x00000002\n" +
"5: 0x0000000000000003\n" +
@@ -193,7 +189,7 @@
return ByteString.CopyFrom(bytes);
}
- [TestMethod]
+ [Fact]
public void PrintExotic()
{
IMessage message = TestAllTypes.CreateBuilder()
@@ -224,10 +220,10 @@
.AddRepeatedBytes(Bytes("\0\u0001\u0007\b\f\n\r\t\v\\\'\"\u00fe"))
.Build();
- Assert.AreEqual(ExoticText, message.ToString());
+ Assert.Equal(ExoticText, message.ToString());
}
- [TestMethod]
+ [Fact]
public void PrintMessageSet()
{
TestMessageSet messageSet =
@@ -240,12 +236,12 @@
TestMessageSetExtension2.CreateBuilder().SetStr("foo").Build())
.Build();
- Assert.AreEqual(MessageSetText, messageSet.ToString());
+ Assert.Equal(MessageSetText, messageSet.ToString());
}
// =================================================================
- [TestMethod]
+ [Fact]
public void Parse()
{
TestUtil.TestInMultipleCultures(() =>
@@ -256,7 +252,7 @@
});
}
- [TestMethod]
+ [Fact]
public void ParseReader()
{
TestAllTypes.Builder builder = TestAllTypes.CreateBuilder();
@@ -264,7 +260,7 @@
TestUtil.AssertAllFieldsSet(builder.Build());
}
- [TestMethod]
+ [Fact]
public void ParseExtensions()
{
TestAllExtensions.Builder builder = TestAllExtensions.CreateBuilder();
@@ -274,7 +270,7 @@
TestUtil.AssertAllExtensionsSet(builder.Build());
}
- [TestMethod]
+ [Fact]
public void ParseCompatibility()
{
string original = "repeated_float: inf\n" +
@@ -303,10 +299,10 @@
"repeated_double: NaN\n";
TestAllTypes.Builder builder = TestAllTypes.CreateBuilder();
TextFormat.Merge(original, builder);
- Assert.AreEqual(canonical, builder.Build().ToString());
+ Assert.Equal(canonical, builder.Build().ToString());
}
- [TestMethod]
+ [Fact]
public void ParseExotic()
{
TestAllTypes.Builder builder = TestAllTypes.CreateBuilder();
@@ -314,10 +310,10 @@
// Too lazy to check things individually. Don't try to debug this
// if testPrintExotic() is Assert.Failing.
- Assert.AreEqual(ExoticText, builder.Build().ToString());
+ Assert.Equal(ExoticText, builder.Build().ToString());
}
- [TestMethod]
+ [Fact]
public void ParseMessageSet()
{
ExtensionRegistry extensionRegistry = ExtensionRegistry.CreateInstance();
@@ -328,30 +324,30 @@
TextFormat.Merge(MessageSetText, extensionRegistry, builder);
TestMessageSet messageSet = builder.Build();
- Assert.IsTrue(messageSet.HasExtension(TestMessageSetExtension1.MessageSetExtension));
- Assert.AreEqual(123, messageSet.GetExtension(TestMessageSetExtension1.MessageSetExtension).I);
- Assert.IsTrue(messageSet.HasExtension(TestMessageSetExtension2.MessageSetExtension));
- Assert.AreEqual("foo", messageSet.GetExtension(TestMessageSetExtension2.MessageSetExtension).Str);
+ Assert.True(messageSet.HasExtension(TestMessageSetExtension1.MessageSetExtension));
+ Assert.Equal(123, messageSet.GetExtension(TestMessageSetExtension1.MessageSetExtension).I);
+ Assert.True(messageSet.HasExtension(TestMessageSetExtension2.MessageSetExtension));
+ Assert.Equal("foo", messageSet.GetExtension(TestMessageSetExtension2.MessageSetExtension).Str);
}
- [TestMethod]
+ [Fact]
public void ParseNumericEnum()
{
TestAllTypes.Builder builder = TestAllTypes.CreateBuilder();
TextFormat.Merge("optional_nested_enum: 2", builder);
- Assert.AreEqual(TestAllTypes.Types.NestedEnum.BAR, builder.OptionalNestedEnum);
+ Assert.Equal(TestAllTypes.Types.NestedEnum.BAR, builder.OptionalNestedEnum);
}
- [TestMethod]
+ [Fact]
public void ParseAngleBrackets()
{
TestAllTypes.Builder builder = TestAllTypes.CreateBuilder();
TextFormat.Merge("OptionalGroup: < a: 1 >", builder);
- Assert.IsTrue(builder.HasOptionalGroup);
- Assert.AreEqual(1, builder.OptionalGroup.A);
+ Assert.True(builder.HasOptionalGroup);
+ Assert.Equal(1, builder.OptionalGroup.A);
}
- [TestMethod]
+ [Fact]
public void ParseComment()
{
TestAllTypes.Builder builder = TestAllTypes.CreateBuilder();
@@ -360,26 +356,19 @@
"optional_int32: 1 # another comment\n" +
"optional_int64: 2\n" +
"# EOF comment", builder);
- Assert.AreEqual(1, builder.OptionalInt32);
- Assert.AreEqual(2, builder.OptionalInt64);
+ Assert.Equal(1, builder.OptionalInt32);
+ Assert.Equal(2, builder.OptionalInt64);
}
private static void AssertParseError(string error, string text)
{
TestAllTypes.Builder builder = TestAllTypes.CreateBuilder();
- try
- {
- TextFormat.Merge(text, TestUtil.CreateExtensionRegistry(), builder);
- Assert.Fail("Expected parse exception.");
- }
- catch (FormatException e)
- {
- Assert.AreEqual(error, e.Message);
- }
+ Exception exception = Assert.Throws<FormatException>(() => TextFormat.Merge(text, TestUtil.CreateExtensionRegistry(), builder));
+ Assert.Equal(error, exception.Message);
}
- [TestMethod]
+ [Fact]
public void ParseErrors()
{
AssertParseError(
@@ -454,111 +443,96 @@
return ByteString.CopyFrom(bytes);
}
- private delegate void FormattingAction();
-
- private static void AssertFormatException(FormattingAction action)
- {
- try
- {
- action();
- Assert.Fail("Should have thrown an exception.");
- }
- catch (FormatException)
- {
- // success
- }
- }
-
- [TestMethod]
+ [Fact]
public void Escape()
{
// Escape sequences.
- Assert.AreEqual("\\000\\001\\a\\b\\f\\n\\r\\t\\v\\\\\\'\\\"",
+ Assert.Equal("\\000\\001\\a\\b\\f\\n\\r\\t\\v\\\\\\'\\\"",
TextFormat.EscapeBytes(Bytes("\0\u0001\u0007\b\f\n\r\t\v\\\'\"")));
- Assert.AreEqual("\\000\\001\\a\\b\\f\\n\\r\\t\\v\\\\\\'\\\"",
+ Assert.Equal("\\000\\001\\a\\b\\f\\n\\r\\t\\v\\\\\\'\\\"",
TextFormat.EscapeText("\0\u0001\u0007\b\f\n\r\t\v\\\'\""));
- Assert.AreEqual(Bytes("\0\u0001\u0007\b\f\n\r\t\v\\\'\""),
+ Assert.Equal(Bytes("\0\u0001\u0007\b\f\n\r\t\v\\\'\""),
TextFormat.UnescapeBytes("\\000\\001\\a\\b\\f\\n\\r\\t\\v\\\\\\'\\\""));
- Assert.AreEqual("\0\u0001\u0007\b\f\n\r\t\v\\\'\"",
+ Assert.Equal("\0\u0001\u0007\b\f\n\r\t\v\\\'\"",
TextFormat.UnescapeText("\\000\\001\\a\\b\\f\\n\\r\\t\\v\\\\\\'\\\""));
// Unicode handling.
- Assert.AreEqual("\\341\\210\\264", TextFormat.EscapeText("\u1234"));
- Assert.AreEqual("\\341\\210\\264", TextFormat.EscapeBytes(Bytes(0xe1, 0x88, 0xb4)));
- Assert.AreEqual("\u1234", TextFormat.UnescapeText("\\341\\210\\264"));
- Assert.AreEqual(Bytes(0xe1, 0x88, 0xb4), TextFormat.UnescapeBytes("\\341\\210\\264"));
- Assert.AreEqual("\u1234", TextFormat.UnescapeText("\\xe1\\x88\\xb4"));
- Assert.AreEqual(Bytes(0xe1, 0x88, 0xb4), TextFormat.UnescapeBytes("\\xe1\\x88\\xb4"));
+ Assert.Equal("\\341\\210\\264", TextFormat.EscapeText("\u1234"));
+ Assert.Equal("\\341\\210\\264", TextFormat.EscapeBytes(Bytes(0xe1, 0x88, 0xb4)));
+ Assert.Equal("\u1234", TextFormat.UnescapeText("\\341\\210\\264"));
+ Assert.Equal(Bytes(0xe1, 0x88, 0xb4), TextFormat.UnescapeBytes("\\341\\210\\264"));
+ Assert.Equal("\u1234", TextFormat.UnescapeText("\\xe1\\x88\\xb4"));
+ Assert.Equal(Bytes(0xe1, 0x88, 0xb4), TextFormat.UnescapeBytes("\\xe1\\x88\\xb4"));
// Errors.
- AssertFormatException(() => TextFormat.UnescapeText("\\x"));
- AssertFormatException(() => TextFormat.UnescapeText("\\z"));
- AssertFormatException(() => TextFormat.UnescapeText("\\"));
+ Assert.Throws<FormatException>(() => TextFormat.UnescapeText("\\x"));
+ Assert.Throws<FormatException>(() => TextFormat.UnescapeText("\\z"));
+ Assert.Throws<FormatException>(() => TextFormat.UnescapeText("\\"));
}
- [TestMethod]
+ [Fact]
public void ParseInteger()
{
- Assert.AreEqual(0, TextFormat.ParseInt32("0"));
- Assert.AreEqual(1, TextFormat.ParseInt32("1"));
- Assert.AreEqual(-1, TextFormat.ParseInt32("-1"));
- Assert.AreEqual(12345, TextFormat.ParseInt32("12345"));
- Assert.AreEqual(-12345, TextFormat.ParseInt32("-12345"));
- Assert.AreEqual(2147483647, TextFormat.ParseInt32("2147483647"));
- Assert.AreEqual(-2147483648, TextFormat.ParseInt32("-2147483648"));
+ Assert.Equal(0, TextFormat.ParseInt32("0"));
+ Assert.Equal(1, TextFormat.ParseInt32("1"));
+ Assert.Equal(-1, TextFormat.ParseInt32("-1"));
+ Assert.Equal(12345, TextFormat.ParseInt32("12345"));
+ Assert.Equal(-12345, TextFormat.ParseInt32("-12345"));
+ Assert.Equal(2147483647, TextFormat.ParseInt32("2147483647"));
+ Assert.Equal(-2147483648, TextFormat.ParseInt32("-2147483648"));
- Assert.AreEqual(0u, TextFormat.ParseUInt32("0"));
- Assert.AreEqual(1u, TextFormat.ParseUInt32("1"));
- Assert.AreEqual(12345u, TextFormat.ParseUInt32("12345"));
- Assert.AreEqual(2147483647u, TextFormat.ParseUInt32("2147483647"));
- Assert.AreEqual(2147483648U, TextFormat.ParseUInt32("2147483648"));
- Assert.AreEqual(4294967295U, TextFormat.ParseUInt32("4294967295"));
+ Assert.Equal(0u, TextFormat.ParseUInt32("0"));
+ Assert.Equal(1u, TextFormat.ParseUInt32("1"));
+ Assert.Equal(12345u, TextFormat.ParseUInt32("12345"));
+ Assert.Equal(2147483647u, TextFormat.ParseUInt32("2147483647"));
+ Assert.Equal(2147483648U, TextFormat.ParseUInt32("2147483648"));
+ Assert.Equal(4294967295U, TextFormat.ParseUInt32("4294967295"));
- Assert.AreEqual(0L, TextFormat.ParseInt64("0"));
- Assert.AreEqual(1L, TextFormat.ParseInt64("1"));
- Assert.AreEqual(-1L, TextFormat.ParseInt64("-1"));
- Assert.AreEqual(12345L, TextFormat.ParseInt64("12345"));
- Assert.AreEqual(-12345L, TextFormat.ParseInt64("-12345"));
- Assert.AreEqual(2147483647L, TextFormat.ParseInt64("2147483647"));
- Assert.AreEqual(-2147483648L, TextFormat.ParseInt64("-2147483648"));
- Assert.AreEqual(4294967295L, TextFormat.ParseInt64("4294967295"));
- Assert.AreEqual(4294967296L, TextFormat.ParseInt64("4294967296"));
- Assert.AreEqual(9223372036854775807L, TextFormat.ParseInt64("9223372036854775807"));
- Assert.AreEqual(-9223372036854775808L, TextFormat.ParseInt64("-9223372036854775808"));
+ Assert.Equal(0L, TextFormat.ParseInt64("0"));
+ Assert.Equal(1L, TextFormat.ParseInt64("1"));
+ Assert.Equal(-1L, TextFormat.ParseInt64("-1"));
+ Assert.Equal(12345L, TextFormat.ParseInt64("12345"));
+ Assert.Equal(-12345L, TextFormat.ParseInt64("-12345"));
+ Assert.Equal(2147483647L, TextFormat.ParseInt64("2147483647"));
+ Assert.Equal(-2147483648L, TextFormat.ParseInt64("-2147483648"));
+ Assert.Equal(4294967295L, TextFormat.ParseInt64("4294967295"));
+ Assert.Equal(4294967296L, TextFormat.ParseInt64("4294967296"));
+ Assert.Equal(9223372036854775807L, TextFormat.ParseInt64("9223372036854775807"));
+ Assert.Equal(-9223372036854775808L, TextFormat.ParseInt64("-9223372036854775808"));
- Assert.AreEqual(0uL, TextFormat.ParseUInt64("0"));
- Assert.AreEqual(1uL, TextFormat.ParseUInt64("1"));
- Assert.AreEqual(12345uL, TextFormat.ParseUInt64("12345"));
- Assert.AreEqual(2147483647uL, TextFormat.ParseUInt64("2147483647"));
- Assert.AreEqual(4294967295uL, TextFormat.ParseUInt64("4294967295"));
- Assert.AreEqual(4294967296uL, TextFormat.ParseUInt64("4294967296"));
- Assert.AreEqual(9223372036854775807UL, TextFormat.ParseUInt64("9223372036854775807"));
- Assert.AreEqual(9223372036854775808UL, TextFormat.ParseUInt64("9223372036854775808"));
- Assert.AreEqual(18446744073709551615UL, TextFormat.ParseUInt64("18446744073709551615"));
+ Assert.Equal(0uL, TextFormat.ParseUInt64("0"));
+ Assert.Equal(1uL, TextFormat.ParseUInt64("1"));
+ Assert.Equal(12345uL, TextFormat.ParseUInt64("12345"));
+ Assert.Equal(2147483647uL, TextFormat.ParseUInt64("2147483647"));
+ Assert.Equal(4294967295uL, TextFormat.ParseUInt64("4294967295"));
+ Assert.Equal(4294967296uL, TextFormat.ParseUInt64("4294967296"));
+ Assert.Equal(9223372036854775807UL, TextFormat.ParseUInt64("9223372036854775807"));
+ Assert.Equal(9223372036854775808UL, TextFormat.ParseUInt64("9223372036854775808"));
+ Assert.Equal(18446744073709551615UL, TextFormat.ParseUInt64("18446744073709551615"));
// Hex
- Assert.AreEqual(0x1234abcd, TextFormat.ParseInt32("0x1234abcd"));
- Assert.AreEqual(-0x1234abcd, TextFormat.ParseInt32("-0x1234abcd"));
- Assert.AreEqual(0xffffffffffffffffUL, TextFormat.ParseUInt64("0xffffffffffffffff"));
- Assert.AreEqual(0x7fffffffffffffffL,
+ Assert.Equal(0x1234abcd, TextFormat.ParseInt32("0x1234abcd"));
+ Assert.Equal(-0x1234abcd, TextFormat.ParseInt32("-0x1234abcd"));
+ Assert.Equal(0xffffffffffffffffUL, TextFormat.ParseUInt64("0xffffffffffffffff"));
+ Assert.Equal(0x7fffffffffffffffL,
TextFormat.ParseInt64("0x7fffffffffffffff"));
// Octal
- Assert.AreEqual(342391, TextFormat.ParseInt32("01234567"));
+ Assert.Equal(342391, TextFormat.ParseInt32("01234567"));
// Out-of-range
- AssertFormatException(() => TextFormat.ParseInt32("2147483648"));
- AssertFormatException(() => TextFormat.ParseInt32("-2147483649"));
- AssertFormatException(() => TextFormat.ParseUInt32("4294967296"));
- AssertFormatException(() => TextFormat.ParseUInt32("-1"));
- AssertFormatException(() => TextFormat.ParseInt64("9223372036854775808"));
- AssertFormatException(() => TextFormat.ParseInt64("-9223372036854775809"));
- AssertFormatException(() => TextFormat.ParseUInt64("18446744073709551616"));
- AssertFormatException(() => TextFormat.ParseUInt64("-1"));
- AssertFormatException(() => TextFormat.ParseInt32("abcd"));
+ Assert.Throws<FormatException>(() => TextFormat.ParseInt32("2147483648"));
+ Assert.Throws<FormatException>(() => TextFormat.ParseInt32("-2147483649"));
+ Assert.Throws<FormatException>(() => TextFormat.ParseUInt32("4294967296"));
+ Assert.Throws<FormatException>(() => TextFormat.ParseUInt32("-1"));
+ Assert.Throws<FormatException>(() => TextFormat.ParseInt64("9223372036854775808"));
+ Assert.Throws<FormatException>(() => TextFormat.ParseInt64("-9223372036854775809"));
+ Assert.Throws<FormatException>(() => TextFormat.ParseUInt64("18446744073709551616"));
+ Assert.Throws<FormatException>(() => TextFormat.ParseUInt64("-1"));
+ Assert.Throws<FormatException>(() => TextFormat.ParseInt32("abcd"));
}
- [TestMethod]
+ [Fact]
public void ParseLongString()
{
string longText =
@@ -580,7 +554,7 @@
"123456789012345678901234567890123456789012345678901234567890";
TestAllTypes.Builder builder = TestAllTypes.CreateBuilder();
TextFormat.Merge("optional_string: \"" + longText + "\"", builder);
- Assert.AreEqual(longText, builder.OptionalString);
+ Assert.Equal(longText, builder.OptionalString);
}
}
}
\ No newline at end of file
diff --git a/csharp/src/ProtocolBuffers.Test/UnknownFieldSetTest.cs b/csharp/src/ProtocolBuffers.Test/UnknownFieldSetTest.cs
index b5fc606..f20ba7c 100644
--- a/csharp/src/ProtocolBuffers.Test/UnknownFieldSetTest.cs
+++ b/csharp/src/ProtocolBuffers.Test/UnknownFieldSetTest.cs
@@ -38,27 +38,25 @@
using System.Collections.Generic;
using Google.ProtocolBuffers.Descriptors;
using Google.ProtocolBuffers.TestProtos;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Xunit;
namespace Google.ProtocolBuffers
{
- [TestClass]
public class UnknownFieldSetTest
{
- private MessageDescriptor descriptor;
- private TestAllTypes allFields;
- private ByteString allFieldsData;
+ private readonly MessageDescriptor descriptor;
+ private readonly TestAllTypes allFields;
+ private readonly ByteString allFieldsData;
/// <summary>
/// An empty message that has been parsed from allFieldsData. So, it has
/// unknown fields of every type.
/// </summary>
- private TestEmptyMessage emptyMessage;
+ private readonly TestEmptyMessage emptyMessage;
- private UnknownFieldSet unknownFields;
+ private readonly UnknownFieldSet unknownFields;
- [TestInitialize]
- public void SetUp()
+ public UnknownFieldSetTest()
{
descriptor = TestAllTypes.Descriptor;
allFields = TestUtil.GetAllSet();
@@ -70,7 +68,7 @@
private UnknownField GetField(String name)
{
FieldDescriptor field = descriptor.FindDescriptor<FieldDescriptor>(name);
- Assert.IsNotNull(field);
+ Assert.NotNull(field);
return unknownFields.FieldDictionary[field.FieldNumber];
}
@@ -105,75 +103,75 @@
// =================================================================
- [TestMethod]
+ [Fact]
public void Varint()
{
UnknownField field = GetField("optional_int32");
- Assert.AreEqual(1, field.VarintList.Count);
- Assert.AreEqual(allFields.OptionalInt32, (long) field.VarintList[0]);
+ Assert.Equal(1, field.VarintList.Count);
+ Assert.Equal(allFields.OptionalInt32, (long) field.VarintList[0]);
}
- [TestMethod]
+ [Fact]
public void Fixed32()
{
UnknownField field = GetField("optional_fixed32");
- Assert.AreEqual(1, field.Fixed32List.Count);
- Assert.AreEqual<long>(allFields.OptionalFixed32, (int) field.Fixed32List[0]);
+ Assert.Equal(1, field.Fixed32List.Count);
+ Assert.Equal<long>(allFields.OptionalFixed32, (int) field.Fixed32List[0]);
}
- [TestMethod]
+ [Fact]
public void Fixed64()
{
UnknownField field = GetField("optional_fixed64");
- Assert.AreEqual(1, field.Fixed64List.Count);
- Assert.AreEqual((long)allFields.OptionalFixed64, (long)field.Fixed64List[0]);
+ Assert.Equal(1, field.Fixed64List.Count);
+ Assert.Equal((long)allFields.OptionalFixed64, (long)field.Fixed64List[0]);
}
- [TestMethod]
+ [Fact]
public void LengthDelimited()
{
UnknownField field = GetField("optional_bytes");
- Assert.AreEqual(1, field.LengthDelimitedList.Count);
- Assert.AreEqual(allFields.OptionalBytes, field.LengthDelimitedList[0]);
+ Assert.Equal(1, field.LengthDelimitedList.Count);
+ Assert.Equal(allFields.OptionalBytes, field.LengthDelimitedList[0]);
}
- [TestMethod]
+ [Fact]
public void Group()
{
FieldDescriptor nestedFieldDescriptor =
TestAllTypes.Types.OptionalGroup.Descriptor.FindDescriptor<FieldDescriptor>("a");
- Assert.IsNotNull(nestedFieldDescriptor);
+ Assert.NotNull(nestedFieldDescriptor);
UnknownField field = GetField("optionalgroup");
- Assert.AreEqual(1, field.GroupList.Count);
+ Assert.Equal(1, field.GroupList.Count);
UnknownFieldSet group = field.GroupList[0];
- Assert.AreEqual(1, group.FieldDictionary.Count);
- Assert.IsTrue(group.HasField(nestedFieldDescriptor.FieldNumber));
+ Assert.Equal(1, group.FieldDictionary.Count);
+ Assert.True(group.HasField(nestedFieldDescriptor.FieldNumber));
UnknownField nestedField = group[nestedFieldDescriptor.FieldNumber];
- Assert.AreEqual(1, nestedField.VarintList.Count);
- Assert.AreEqual(allFields.OptionalGroup.A, (long) nestedField.VarintList[0]);
+ Assert.Equal(1, nestedField.VarintList.Count);
+ Assert.Equal(allFields.OptionalGroup.A, (long) nestedField.VarintList[0]);
}
- [TestMethod]
+ [Fact]
public void Serialize()
{
// Check that serializing the UnknownFieldSet produces the original data again.
ByteString data = emptyMessage.ToByteString();
- Assert.AreEqual(allFieldsData, data);
+ Assert.Equal(allFieldsData, data);
}
- [TestMethod]
+ [Fact]
public void CopyFrom()
{
TestEmptyMessage message =
TestEmptyMessage.CreateBuilder().MergeFrom(emptyMessage).Build();
- Assert.AreEqual(emptyMessage.ToString(), message.ToString());
+ Assert.Equal(emptyMessage.ToString(), message.ToString());
}
- [TestMethod]
+ [Fact]
public void MergeFrom()
{
TestEmptyMessage source =
@@ -202,7 +200,7 @@
.MergeFrom(source)
.Build();
- Assert.AreEqual(
+ Assert.Equal(
"1: 1\n" +
"2: 2\n" +
"3: 3\n" +
@@ -210,23 +208,23 @@
destination.ToString());
}
- [TestMethod]
+ [Fact]
public void Clear()
{
UnknownFieldSet fields =
UnknownFieldSet.CreateBuilder().MergeFrom(unknownFields).Clear().Build();
- Assert.AreEqual(0, fields.FieldDictionary.Count);
+ Assert.Equal(0, fields.FieldDictionary.Count);
}
- [TestMethod]
+ [Fact]
public void ClearMessage()
{
TestEmptyMessage message =
TestEmptyMessage.CreateBuilder().MergeFrom(emptyMessage).Clear().Build();
- Assert.AreEqual(0, message.SerializedSize);
+ Assert.Equal(0, message.SerializedSize);
}
- [TestMethod]
+ [Fact]
public void ParseKnownAndUnknown()
{
// Test mixing known and unknown fields when parsing.
@@ -241,14 +239,14 @@
TestAllTypes destination = TestAllTypes.ParseFrom(data);
TestUtil.AssertAllFieldsSet(destination);
- Assert.AreEqual(1, destination.UnknownFields.FieldDictionary.Count);
+ Assert.Equal(1, destination.UnknownFields.FieldDictionary.Count);
UnknownField field = destination.UnknownFields[123456];
- Assert.AreEqual(1, field.VarintList.Count);
- Assert.AreEqual(654321, (long) field.VarintList[0]);
+ Assert.Equal(1, field.VarintList.Count);
+ Assert.Equal(654321, (long) field.VarintList[0]);
}
- [TestMethod]
+ [Fact]
public void WrongTypeTreatedAsUnknown()
{
// Test that fields of the wrong wire type are treated like unknown fields
@@ -260,10 +258,10 @@
// All fields should have been interpreted as unknown, so the debug strings
// should be the same.
- Assert.AreEqual(emptyMessage.ToString(), allTypesMessage.ToString());
+ Assert.Equal(emptyMessage.ToString(), allTypesMessage.ToString());
}
- [TestMethod]
+ [Fact]
public void UnknownExtensions()
{
// Make sure fields are properly parsed to the UnknownFieldSet even when
@@ -272,12 +270,12 @@
TestEmptyMessageWithExtensions message =
TestEmptyMessageWithExtensions.ParseFrom(allFieldsData);
- Assert.AreEqual(unknownFields.FieldDictionary.Count,
+ Assert.Equal(unknownFields.FieldDictionary.Count,
message.UnknownFields.FieldDictionary.Count);
- Assert.AreEqual(allFieldsData, message.ToByteString());
+ Assert.Equal(allFieldsData, message.ToByteString());
}
- [TestMethod]
+ [Fact]
public void WrongExtensionTypeTreatedAsUnknown()
{
// Test that fields of the wrong wire type are treated like unknown fields
@@ -289,19 +287,19 @@
// All fields should have been interpreted as unknown, so the debug strings
// should be the same.
- Assert.AreEqual(emptyMessage.ToString(),
+ Assert.Equal(emptyMessage.ToString(),
allExtensionsMessage.ToString());
}
- [TestMethod]
+ [Fact]
public void ParseUnknownEnumValue()
{
FieldDescriptor singularField =
TestAllTypes.Descriptor.FindDescriptor<FieldDescriptor>("optional_nested_enum");
FieldDescriptor repeatedField =
TestAllTypes.Descriptor.FindDescriptor<FieldDescriptor>("repeated_nested_enum");
- Assert.IsNotNull(singularField);
- Assert.IsNotNull(repeatedField);
+ Assert.NotNull(singularField);
+ Assert.NotNull(repeatedField);
ByteString data =
UnknownFieldSet.CreateBuilder()
@@ -322,7 +320,7 @@
{
TestAllTypes message = TestAllTypes.ParseFrom(data);
- Assert.AreEqual(TestAllTypes.Types.NestedEnum.BAR,
+ Assert.Equal(TestAllTypes.Types.NestedEnum.BAR,
message.OptionalNestedEnum);
TestUtil.AssertEqual(new[] {TestAllTypes.Types.NestedEnum.FOO, TestAllTypes.Types.NestedEnum.BAZ},
message.RepeatedNestedEnumList);
@@ -333,7 +331,7 @@
{
TestAllExtensions message =
TestAllExtensions.ParseFrom(data, TestUtil.CreateExtensionRegistry());
- Assert.AreEqual(TestAllTypes.Types.NestedEnum.BAR,
+ Assert.Equal(TestAllTypes.Types.NestedEnum.BAR,
message.GetExtension(Unittest.OptionalNestedEnumExtension));
TestUtil.AssertEqual(new[] {TestAllTypes.Types.NestedEnum.FOO, TestAllTypes.Types.NestedEnum.BAZ},
message.GetExtension(Unittest.RepeatedNestedEnumExtension));
@@ -342,7 +340,7 @@
}
}
- [TestMethod]
+ [Fact]
public void LargeVarint()
{
ByteString data =
@@ -355,11 +353,11 @@
.ToByteString();
UnknownFieldSet parsed = UnknownFieldSet.ParseFrom(data);
UnknownField field = parsed[1];
- Assert.AreEqual(1, field.VarintList.Count);
- Assert.AreEqual(0x7FFFFFFFFFFFFFFFUL, field.VarintList[0]);
+ Assert.Equal(1, field.VarintList.Count);
+ Assert.Equal(0x7FFFFFFFFFFFFFFFUL, field.VarintList[0]);
}
- [TestMethod]
+ [Fact]
public void EqualsAndHashCode()
{
UnknownField fixed32Field = UnknownField.CreateBuilder().AddFixed32(1).Build();
@@ -407,10 +405,10 @@
private static void CheckNotEqual(UnknownFieldSet s1, UnknownFieldSet s2)
{
String equalsError = string.Format("{0} should not be equal to {1}", s1, s2);
- Assert.IsFalse(s1.Equals(s2), equalsError);
- Assert.IsFalse(s2.Equals(s1), equalsError);
+ Assert.False(s1.Equals(s2), equalsError);
+ Assert.False(s2.Equals(s1), equalsError);
- Assert.IsFalse(s1.GetHashCode() == s2.GetHashCode(),
+ Assert.False(s1.GetHashCode() == s2.GetHashCode(),
string.Format("{0} should have a different hash code from {1}", s1, s2));
}
@@ -421,13 +419,13 @@
private static void CheckEqualsIsConsistent(UnknownFieldSet set)
{
// Object should be equal to itself.
- Assert.AreEqual(set, set);
+ Assert.Equal(set, set);
// Object should be equal to a copy of itself.
UnknownFieldSet copy = UnknownFieldSet.CreateBuilder(set).Build();
- Assert.AreEqual(set, copy);
- Assert.AreEqual(copy, set);
- Assert.AreEqual(set.GetHashCode(), copy.GetHashCode());
+ Assert.Equal(set, copy);
+ Assert.Equal(copy, set);
+ Assert.Equal(set.GetHashCode(), copy.GetHashCode());
}
}
}
\ No newline at end of file
diff --git a/csharp/src/ProtocolBuffers.Test/WireFormatTest.cs b/csharp/src/ProtocolBuffers.Test/WireFormatTest.cs
index 0524196..12a9d23 100644
--- a/csharp/src/ProtocolBuffers.Test/WireFormatTest.cs
+++ b/csharp/src/ProtocolBuffers.Test/WireFormatTest.cs
@@ -38,17 +38,16 @@
using System.Reflection;
using Google.ProtocolBuffers.Descriptors;
using Google.ProtocolBuffers.TestProtos;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Xunit;
namespace Google.ProtocolBuffers
{
- [TestClass]
public class WireFormatTest
{
/// <summary>
/// Keeps the attributes on FieldType and the switch statement in WireFormat in sync.
/// </summary>
- [TestMethod]
+ [Fact]
public void FieldTypeToWireTypeMapping()
{
foreach (FieldInfo field in typeof(FieldType).GetFields(BindingFlags.Static | BindingFlags.Public))
@@ -56,34 +55,34 @@
FieldType fieldType = (FieldType) field.GetValue(null);
FieldMappingAttribute mapping =
(FieldMappingAttribute) field.GetCustomAttributes(typeof(FieldMappingAttribute), false)[0];
- Assert.AreEqual(mapping.WireType, WireFormat.GetWireType(fieldType));
+ Assert.Equal(mapping.WireType, WireFormat.GetWireType(fieldType));
}
}
- [TestMethod]
+ [Fact]
public void Serialization()
{
TestAllTypes message = TestUtil.GetAllSet();
ByteString rawBytes = message.ToByteString();
- Assert.AreEqual(rawBytes.Length, message.SerializedSize);
+ Assert.Equal(rawBytes.Length, message.SerializedSize);
TestAllTypes message2 = TestAllTypes.ParseFrom(rawBytes);
TestUtil.AssertAllFieldsSet(message2);
}
- [TestMethod]
+ [Fact]
public void SerializationPacked()
{
TestPackedTypes message = TestUtil.GetPackedSet();
ByteString rawBytes = message.ToByteString();
- Assert.AreEqual(rawBytes.Length, message.SerializedSize);
+ Assert.Equal(rawBytes.Length, message.SerializedSize);
TestPackedTypes message2 = TestPackedTypes.ParseFrom(rawBytes);
TestUtil.AssertPackedFieldsSet(message2);
}
- [TestMethod]
+ [Fact]
public void SerializeExtensions()
{
// TestAllTypes and TestAllExtensions should have compatible wire formats,
@@ -91,14 +90,14 @@
// it should work.
TestAllExtensions message = TestUtil.GetAllExtensionsSet();
ByteString rawBytes = message.ToByteString();
- Assert.AreEqual(rawBytes.Length, message.SerializedSize);
+ Assert.Equal(rawBytes.Length, message.SerializedSize);
TestAllTypes message2 = TestAllTypes.ParseFrom(rawBytes);
TestUtil.AssertAllFieldsSet(message2);
}
- [TestMethod]
+ [Fact]
public void SerializePackedExtensions()
{
// TestPackedTypes and TestPackedExtensions should have compatible wire
@@ -109,10 +108,10 @@
TestPackedTypes message2 = TestUtil.GetPackedSet();
ByteString rawBytes2 = message2.ToByteString();
- Assert.AreEqual(rawBytes, rawBytes2);
+ Assert.Equal(rawBytes, rawBytes2);
}
- [TestMethod]
+ [Fact]
public void SerializeDelimited()
{
MemoryStream stream = new MemoryStream();
@@ -124,13 +123,13 @@
stream.Position = 0;
TestUtil.AssertAllFieldsSet(TestAllTypes.ParseDelimitedFrom(stream));
- Assert.AreEqual(12, stream.ReadByte());
+ Assert.Equal(12, stream.ReadByte());
TestUtil.AssertPackedFieldsSet(TestPackedTypes.ParseDelimitedFrom(stream));
- Assert.AreEqual(34, stream.ReadByte());
- Assert.AreEqual(-1, stream.ReadByte());
+ Assert.Equal(34, stream.ReadByte());
+ Assert.Equal(-1, stream.ReadByte());
}
- [TestMethod]
+ [Fact]
public void ParseExtensions()
{
// TestAllTypes and TestAllExtensions should have compatible wire formats,
@@ -149,7 +148,7 @@
TestUtil.AssertAllExtensionsSet(message2);
}
- [TestMethod]
+ [Fact]
public void ParsePackedExtensions()
{
// Ensure that packed extensions can be properly parsed.
@@ -162,10 +161,10 @@
TestUtil.AssertPackedExtensionsSet(message2);
}
- [TestMethod]
+ [Fact]
public void ExtensionsSerializedSize()
{
- Assert.AreEqual(TestUtil.GetAllSet().SerializedSize, TestUtil.GetAllExtensionsSet().SerializedSize);
+ Assert.Equal(TestUtil.GetAllSet().SerializedSize, TestUtil.GetAllExtensionsSet().SerializedSize);
}
private static void AssertFieldsInOrder(ByteString data)
@@ -177,13 +176,13 @@
string name;
while (input.ReadTag(out tag, out name))
{
- Assert.IsTrue(tag > previousTag);
+ Assert.True(tag > previousTag);
previousTag = tag;
input.SkipField();
}
}
- [TestMethod]
+ [Fact]
public void InterleavedFieldsAndExtensions()
{
// Tests that fields are written in order even when extension ranges
@@ -214,7 +213,7 @@
private static readonly int TypeId1 = TestMessageSetExtension1.Descriptor.Extensions[0].FieldNumber;
private static readonly int TypeId2 = TestMessageSetExtension2.Descriptor.Extensions[0].FieldNumber;
- [TestMethod]
+ [Fact]
public void SerializeMessageSet()
{
// Set up a TestMessageSet with two known messages and an unknown one.
@@ -240,23 +239,23 @@
// Parse back using RawMessageSet and check the contents.
RawMessageSet raw = RawMessageSet.ParseFrom(data);
- Assert.AreEqual(0, raw.UnknownFields.FieldDictionary.Count);
+ Assert.Equal(0, raw.UnknownFields.FieldDictionary.Count);
- Assert.AreEqual(3, raw.ItemCount);
- Assert.AreEqual(TypeId1, raw.ItemList[0].TypeId);
- Assert.AreEqual(TypeId2, raw.ItemList[1].TypeId);
- Assert.AreEqual(UnknownTypeId, raw.ItemList[2].TypeId);
+ Assert.Equal(3, raw.ItemCount);
+ Assert.Equal(TypeId1, raw.ItemList[0].TypeId);
+ Assert.Equal(TypeId2, raw.ItemList[1].TypeId);
+ Assert.Equal(UnknownTypeId, raw.ItemList[2].TypeId);
TestMessageSetExtension1 message1 = TestMessageSetExtension1.ParseFrom(raw.GetItem(0).Message.ToByteArray());
- Assert.AreEqual(123, message1.I);
+ Assert.Equal(123, message1.I);
TestMessageSetExtension2 message2 = TestMessageSetExtension2.ParseFrom(raw.GetItem(1).Message.ToByteArray());
- Assert.AreEqual("foo", message2.Str);
+ Assert.Equal("foo", message2.Str);
- Assert.AreEqual("bar", raw.GetItem(2).Message.ToStringUtf8());
+ Assert.Equal("bar", raw.GetItem(2).Message.ToStringUtf8());
}
- [TestMethod]
+ [Fact]
public void ParseMessageSet()
{
ExtensionRegistry extensionRegistry = ExtensionRegistry.CreateInstance();
@@ -295,18 +294,18 @@
TestMessageSet messageSet =
TestMessageSet.ParseFrom(data, extensionRegistry);
- Assert.AreEqual(123, messageSet.GetExtension(TestMessageSetExtension1.MessageSetExtension).I);
- Assert.AreEqual("foo", messageSet.GetExtension(TestMessageSetExtension2.MessageSetExtension).Str);
+ Assert.Equal(123, messageSet.GetExtension(TestMessageSetExtension1.MessageSetExtension).I);
+ Assert.Equal("foo", messageSet.GetExtension(TestMessageSetExtension2.MessageSetExtension).Str);
// Check for unknown field with type LENGTH_DELIMITED,
// number UNKNOWN_TYPE_ID, and contents "bar".
UnknownFieldSet unknownFields = messageSet.UnknownFields;
- Assert.AreEqual(1, unknownFields.FieldDictionary.Count);
- Assert.IsTrue(unknownFields.HasField(UnknownTypeId));
+ Assert.Equal(1, unknownFields.FieldDictionary.Count);
+ Assert.True(unknownFields.HasField(UnknownTypeId));
UnknownField field = unknownFields[UnknownTypeId];
- Assert.AreEqual(1, field.LengthDelimitedList.Count);
- Assert.AreEqual("bar", field.LengthDelimitedList[0].ToStringUtf8());
+ Assert.Equal(1, field.LengthDelimitedList.Count);
+ Assert.Equal("bar", field.LengthDelimitedList[0].ToStringUtf8());
}
}
}
\ No newline at end of file
diff --git a/csharp/src/ProtocolBuffers.Test/packages.config b/csharp/src/ProtocolBuffers.Test/packages.config
new file mode 100644
index 0000000..6f1fb7f
--- /dev/null
+++ b/csharp/src/ProtocolBuffers.Test/packages.config
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+ <package id="xunit" version="2.0.0" targetFramework="net45" />
+ <package id="xunit.abstractions" version="2.0.0" targetFramework="net45" />
+ <package id="xunit.assert" version="2.0.0" targetFramework="net45" />
+ <package id="xunit.core" version="2.0.0" targetFramework="net45" />
+ <package id="xunit.extensibility.core" version="2.0.0" targetFramework="net45" />
+ <package id="xunit.runner.visualstudio" version="2.0.0" targetFramework="net45" />
+</packages>
\ No newline at end of file
diff --git a/csharp/src/ProtocolBuffers.sln b/csharp/src/ProtocolBuffers.sln
index 5eb488c..6d609dc 100644
--- a/csharp/src/ProtocolBuffers.sln
+++ b/csharp/src/ProtocolBuffers.sln
@@ -22,6 +22,8 @@
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProtoMunge", "ProtoMunge\ProtoMunge.csproj", "{8F09AF72-3327-4FA7-BC09-070B80221AB9}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProtoBench", "ProtoBench\ProtoBench.csproj", "{C7A4A435-2813-41C8-AA87-BD914BA5223D}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -68,6 +70,10 @@
{8F09AF72-3327-4FA7-BC09-070B80221AB9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8F09AF72-3327-4FA7-BC09-070B80221AB9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8F09AF72-3327-4FA7-BC09-070B80221AB9}.Release|Any CPU.Build.0 = Release|Any CPU
+ {C7A4A435-2813-41C8-AA87-BD914BA5223D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {C7A4A435-2813-41C8-AA87-BD914BA5223D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {C7A4A435-2813-41C8-AA87-BD914BA5223D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {C7A4A435-2813-41C8-AA87-BD914BA5223D}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/csharp/src/ProtocolBuffers/FieldSet.cs b/csharp/src/ProtocolBuffers/FieldSet.cs
index f3c08cf..4177400 100644
--- a/csharp/src/ProtocolBuffers/FieldSet.cs
+++ b/csharp/src/ProtocolBuffers/FieldSet.cs
@@ -88,7 +88,7 @@
public static FieldSet CreateInstance()
{
// Use SortedList to keep fields in the canonical order
- return new FieldSet(new SortedList<IFieldDescriptorLite, object>());
+ return new FieldSet(new SortedDictionary<IFieldDescriptorLite, object>());
}
/// <summary>
@@ -111,7 +111,7 @@
if (hasRepeats)
{
- var tmp = new SortedList<IFieldDescriptorLite, object>();
+ var tmp = new SortedDictionary<IFieldDescriptorLite, object>();
foreach (KeyValuePair<IFieldDescriptorLite, object> entry in fields)
{
IList<object> list = entry.Value as IList<object>;
@@ -151,8 +151,8 @@
{
get
{
- SortedList<FieldDescriptor, object> copy =
- new SortedList<FieldDescriptor, object>();
+ SortedDictionary<FieldDescriptor, object> copy =
+ new SortedDictionary<FieldDescriptor, object>();
foreach (KeyValuePair<IFieldDescriptorLite, object> fd in fields)
{
copy.Add((FieldDescriptor) fd.Key, fd.Value);
diff --git a/csharp/src/ProtocolBuffers/GeneratedMessage.cs b/csharp/src/ProtocolBuffers/GeneratedMessage.cs
index 6f4b665..c17c15c 100644
--- a/csharp/src/ProtocolBuffers/GeneratedMessage.cs
+++ b/csharp/src/ProtocolBuffers/GeneratedMessage.cs
@@ -75,8 +75,8 @@
internal IDictionary<FieldDescriptor, Object> GetMutableFieldMap()
{
- // Use a SortedList so we'll end up serializing fields in order
- var ret = new SortedList<FieldDescriptor, object>();
+ // Use a SortedDictionary so we'll end up serializing fields in order
+ var ret = new SortedDictionary<FieldDescriptor, object>();
MessageDescriptor descriptor = DescriptorForType;
foreach (FieldDescriptor field in descriptor.Fields)
{
diff --git a/csharp/src/ProtocolBuffers/Properties/AssemblyInfo.cs b/csharp/src/ProtocolBuffers/Properties/AssemblyInfo.cs
index 063f666..806bd5d 100644
--- a/csharp/src/ProtocolBuffers/Properties/AssemblyInfo.cs
+++ b/csharp/src/ProtocolBuffers/Properties/AssemblyInfo.cs
@@ -65,6 +65,3 @@
[assembly: AssemblyFileVersion("2.4.1.555")]
#endif
-#if CLIENTPROFILE // ROK - not defined in SL, CF, or PL
-[assembly: AllowPartiallyTrustedCallers]
-#endif
diff --git a/csharp/src/ProtocolBuffers/ProtocolBuffers.csproj b/csharp/src/ProtocolBuffers/ProtocolBuffers.csproj
index 5f6404a..32a343a 100644
--- a/csharp/src/ProtocolBuffers/ProtocolBuffers.csproj
+++ b/csharp/src/ProtocolBuffers/ProtocolBuffers.csproj
@@ -1,8 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
- <EnvironmentFlavor>CLIENTPROFILE</EnvironmentFlavor>
- <EnvironmentTemplate>NET35</EnvironmentTemplate>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
@@ -12,18 +10,21 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Google.ProtocolBuffers</RootNamespace>
<AssemblyName>Google.ProtocolBuffers</AssemblyName>
- <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <TargetFrameworkProfile>Profile92</TargetFrameworkProfile>
+ <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\..\keys\Google.ProtocolBuffers.snk</AssemblyOriginatorKeyFile>
<OldToolsVersion>3.5</OldToolsVersion>
+ <MinimumVisualStudioVersion>10.0</MinimumVisualStudioVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
- <OutputPath>bin\NET35\Debug</OutputPath>
- <IntermediateOutputPath>obj\NET35\Debug\</IntermediateOutputPath>
+ <OutputPath>bin\Debug</OutputPath>
+ <IntermediateOutputPath>obj\Debug\</IntermediateOutputPath>
<DocumentationFile>$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
<NoWarn>1591, 1570, 1571, 1572, 1573, 1574</NoWarn>
<DefineConstants>DEBUG;TRACE;$(EnvironmentFlavor);$(EnvironmentTemplate)</DefineConstants>
@@ -35,8 +36,8 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
- <OutputPath>bin\NET35\Release</OutputPath>
- <IntermediateOutputPath>obj\NET35\Release\</IntermediateOutputPath>
+ <OutputPath>bin\Release</OutputPath>
+ <IntermediateOutputPath>obj\Release\</IntermediateOutputPath>
<DocumentationFile>$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
<NoWarn>1591, 1570, 1571, 1572, 1573, 1574</NoWarn>
<DefineConstants>TRACE;$(EnvironmentFlavor);$(EnvironmentTemplate)</DefineConstants>
@@ -137,7 +138,7 @@
<Compile Include="UnknownFieldSet.cs" />
<Compile Include="WireFormat.cs" />
</ItemGroup>
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
diff --git a/csharp/src/ProtocolBuffers/ProtocolBuffersLite.csproj b/csharp/src/ProtocolBuffers/ProtocolBuffersLite.csproj
index fc6e163..d0912a6 100644
--- a/csharp/src/ProtocolBuffers/ProtocolBuffersLite.csproj
+++ b/csharp/src/ProtocolBuffers/ProtocolBuffersLite.csproj
@@ -1,8 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
- <EnvironmentFlavor>CLIENTPROFILE</EnvironmentFlavor>
- <EnvironmentTemplate>NET35</EnvironmentTemplate>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
@@ -12,18 +10,21 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Google.ProtocolBuffers</RootNamespace>
<AssemblyName>Google.ProtocolBuffersLite</AssemblyName>
- <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <TargetFrameworkProfile>Profile92</TargetFrameworkProfile>
+ <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\..\keys\Google.ProtocolBuffers.snk</AssemblyOriginatorKeyFile>
<OldToolsVersion>3.5</OldToolsVersion>
+ <MinimumVisualStudioVersion>10.0</MinimumVisualStudioVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
- <OutputPath>bin\NET35\Debug</OutputPath>
- <IntermediateOutputPath>obj\NET35\Debug\</IntermediateOutputPath>
+ <OutputPath>bin\Debug</OutputPath>
+ <IntermediateOutputPath>obj\Debug\</IntermediateOutputPath>
<DocumentationFile>$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
<NoWarn>1591, 1570, 1571, 1572, 1573, 1574</NoWarn>
<DefineConstants>DEBUG;TRACE;LITE;$(EnvironmentFlavor);$(EnvironmentTemplate)</DefineConstants>
@@ -35,8 +36,8 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
- <OutputPath>bin\NET35\Release</OutputPath>
- <IntermediateOutputPath>obj\NET35\Release\</IntermediateOutputPath>
+ <OutputPath>bin\Release</OutputPath>
+ <IntermediateOutputPath>obj\Release\</IntermediateOutputPath>
<DocumentationFile>$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
<NoWarn>1591, 1570, 1571, 1572, 1573, 1574</NoWarn>
<DefineConstants>TRACE;LITE;$(EnvironmentFlavor);$(EnvironmentTemplate)</DefineConstants>
@@ -87,7 +88,7 @@
<Compile Include="UninitializedMessageException.cs" />
<Compile Include="WireFormat.cs" />
</ItemGroup>
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
diff --git a/csharp/src/ProtocolBuffers/TextFormat.cs b/csharp/src/ProtocolBuffers/TextFormat.cs
index 951cdc0..6a9180f 100644
--- a/csharp/src/ProtocolBuffers/TextFormat.cs
+++ b/csharp/src/ProtocolBuffers/TextFormat.cs
@@ -732,11 +732,7 @@
{
// Explicitly specify the invariant culture so that this code does not break when
// executing in Turkey.
-#if PORTABLE_LIBRARY
String lowerName = name.ToLowerInvariant();
-#else
- String lowerName = name.ToLower(FrameworkPortability.InvariantCulture);
-#endif
field = type.FindDescriptor<FieldDescriptor>(lowerName);
// If the case-insensitive match worked but the field is NOT a group,
// TODO(jonskeet): What? Java comment ends here!
diff --git a/csharp/src/ProtocolBuffers/UnknownFieldSet.cs b/csharp/src/ProtocolBuffers/UnknownFieldSet.cs
index aee1b7c..98aa04c 100644
--- a/csharp/src/ProtocolBuffers/UnknownFieldSet.cs
+++ b/csharp/src/ProtocolBuffers/UnknownFieldSet.cs
@@ -330,12 +330,12 @@
internal Builder()
{
- fields = new SortedList<int, UnknownField>();
+ fields = new SortedDictionary<int, UnknownField>();
}
internal Builder(IDictionary<int, UnknownField> dictionary)
{
- fields = new SortedList<int, UnknownField>(dictionary);
+ fields = new SortedDictionary<int, UnknownField>(dictionary);
}
/// <summary>
diff --git a/csharp/src/ProtocolBuffersLite.Test/AbstractBuilderLiteTest.cs b/csharp/src/ProtocolBuffersLite.Test/AbstractBuilderLiteTest.cs
index f3a7789..e019920 100644
--- a/csharp/src/ProtocolBuffersLite.Test/AbstractBuilderLiteTest.cs
+++ b/csharp/src/ProtocolBuffersLite.Test/AbstractBuilderLiteTest.cs
@@ -34,19 +34,15 @@
#endregion
-using System;
-using System.Collections.Generic;
using System.IO;
-using Google.ProtocolBuffers;
using Google.ProtocolBuffers.TestProtos;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Xunit;
namespace Google.ProtocolBuffers
{
- [TestClass]
public class AbstractBuilderLiteTest
{
- [TestMethod]
+ [Fact]
public void TestMergeFromCodedInputStream()
{
TestAllTypesLite copy,
@@ -54,7 +50,7 @@
.SetOptionalUint32(uint.MaxValue).Build();
copy = TestAllTypesLite.DefaultInstance;
- Assert.AreNotEqual(msg.ToByteArray(), copy.ToByteArray());
+ Assert.NotEqual(msg.ToByteArray(), copy.ToByteArray());
using (MemoryStream ms = new MemoryStream(msg.ToByteArray()))
{
@@ -62,22 +58,22 @@
copy = copy.ToBuilder().MergeFrom(ci).Build();
}
- TestUtil.AssertBytesEqual(msg.ToByteArray(), copy.ToByteArray());
+ Assert.Equal(msg.ToByteArray(), copy.ToByteArray());
}
- [TestMethod]
+ [Fact]
public void TestIBuilderLiteWeakClear()
{
TestAllTypesLite copy, msg = TestAllTypesLite.DefaultInstance;
copy = msg.ToBuilder().SetOptionalString("Should be removed.").Build();
- Assert.AreNotEqual(msg.ToByteArray(), copy.ToByteArray());
+ Assert.NotEqual(msg.ToByteArray(), copy.ToByteArray());
copy = (TestAllTypesLite) ((IBuilderLite) copy.ToBuilder()).WeakClear().WeakBuild();
- TestUtil.AssertBytesEqual(msg.ToByteArray(), copy.ToByteArray());
+ Assert.Equal(msg.ToByteArray(), copy.ToByteArray());
}
- [TestMethod]
+ [Fact]
public void TestBuilderLiteMergeFromCodedInputStream()
{
TestAllTypesLite copy,
@@ -85,14 +81,14 @@
.SetOptionalString("Should be merged.").Build();
copy = TestAllTypesLite.DefaultInstance;
- Assert.AreNotEqual(msg.ToByteArray(), copy.ToByteArray());
+ Assert.NotEqual(msg.ToByteArray(), copy.ToByteArray());
copy =
copy.ToBuilder().MergeFrom(CodedInputStream.CreateInstance(new MemoryStream(msg.ToByteArray()))).Build();
- TestUtil.AssertBytesEqual(msg.ToByteArray(), copy.ToByteArray());
+ Assert.Equal(msg.ToByteArray(), copy.ToByteArray());
}
- [TestMethod]
+ [Fact]
public void TestBuilderLiteMergeDelimitedFrom()
{
TestAllTypesLite copy,
@@ -100,15 +96,15 @@
.SetOptionalString("Should be merged.").Build();
copy = TestAllTypesLite.DefaultInstance;
- Assert.AreNotEqual(msg.ToByteArray(), copy.ToByteArray());
+ Assert.NotEqual(msg.ToByteArray(), copy.ToByteArray());
Stream s = new MemoryStream();
msg.WriteDelimitedTo(s);
s.Position = 0;
copy = copy.ToBuilder().MergeDelimitedFrom(s).Build();
- TestUtil.AssertBytesEqual(msg.ToByteArray(), copy.ToByteArray());
+ Assert.Equal(msg.ToByteArray(), copy.ToByteArray());
}
- [TestMethod]
+ [Fact]
public void TestBuilderLiteMergeDelimitedFromExtensions()
{
TestAllExtensionsLite copy,
@@ -117,7 +113,7 @@
"Should be merged.").Build();
copy = TestAllExtensionsLite.DefaultInstance;
- Assert.AreNotEqual(msg.ToByteArray(), copy.ToByteArray());
+ Assert.NotEqual(msg.ToByteArray(), copy.ToByteArray());
Stream s = new MemoryStream();
msg.WriteDelimitedTo(s);
@@ -127,11 +123,11 @@
UnittestLite.RegisterAllExtensions(registry);
copy = copy.ToBuilder().MergeDelimitedFrom(s, registry).Build();
- TestUtil.AssertBytesEqual(msg.ToByteArray(), copy.ToByteArray());
- Assert.AreEqual("Should be merged.", copy.GetExtension(UnittestLite.OptionalStringExtensionLite));
+ Assert.Equal(msg.ToByteArray(), copy.ToByteArray());
+ Assert.Equal("Should be merged.", copy.GetExtension(UnittestLite.OptionalStringExtensionLite));
}
- [TestMethod]
+ [Fact]
public void TestBuilderLiteMergeFromStream()
{
TestAllTypesLite copy,
@@ -139,15 +135,15 @@
.SetOptionalString("Should be merged.").Build();
copy = TestAllTypesLite.DefaultInstance;
- Assert.AreNotEqual(msg.ToByteArray(), copy.ToByteArray());
+ Assert.NotEqual(msg.ToByteArray(), copy.ToByteArray());
Stream s = new MemoryStream();
msg.WriteTo(s);
s.Position = 0;
copy = copy.ToBuilder().MergeFrom(s).Build();
- TestUtil.AssertBytesEqual(msg.ToByteArray(), copy.ToByteArray());
+ Assert.Equal(msg.ToByteArray(), copy.ToByteArray());
}
- [TestMethod]
+ [Fact]
public void TestBuilderLiteMergeFromStreamExtensions()
{
TestAllExtensionsLite copy,
@@ -156,7 +152,7 @@
"Should be merged.").Build();
copy = TestAllExtensionsLite.DefaultInstance;
- Assert.AreNotEqual(msg.ToByteArray(), copy.ToByteArray());
+ Assert.NotEqual(msg.ToByteArray(), copy.ToByteArray());
Stream s = new MemoryStream();
msg.WriteTo(s);
@@ -166,11 +162,11 @@
UnittestLite.RegisterAllExtensions(registry);
copy = copy.ToBuilder().MergeFrom(s, registry).Build();
- TestUtil.AssertBytesEqual(msg.ToByteArray(), copy.ToByteArray());
- Assert.AreEqual("Should be merged.", copy.GetExtension(UnittestLite.OptionalStringExtensionLite));
+ Assert.Equal(msg.ToByteArray(), copy.ToByteArray());
+ Assert.Equal("Should be merged.", copy.GetExtension(UnittestLite.OptionalStringExtensionLite));
}
- [TestMethod]
+ [Fact]
public void TestIBuilderLiteWeakMergeFromIMessageLite()
{
TestAllTypesLite copy,
@@ -178,13 +174,13 @@
.SetOptionalString("Should be merged.").Build();
copy = TestAllTypesLite.DefaultInstance;
- Assert.AreNotEqual(msg.ToByteArray(), copy.ToByteArray());
+ Assert.NotEqual(msg.ToByteArray(), copy.ToByteArray());
copy = (TestAllTypesLite) ((IBuilderLite) copy.ToBuilder()).WeakMergeFrom((IMessageLite) msg).WeakBuild();
- TestUtil.AssertBytesEqual(msg.ToByteArray(), copy.ToByteArray());
+ Assert.Equal(msg.ToByteArray(), copy.ToByteArray());
}
- [TestMethod]
+ [Fact]
public void TestIBuilderLiteWeakMergeFromByteString()
{
TestAllTypesLite copy,
@@ -192,13 +188,13 @@
.SetOptionalString("Should be merged.").Build();
copy = TestAllTypesLite.DefaultInstance;
- Assert.AreNotEqual(msg.ToByteArray(), copy.ToByteArray());
+ Assert.NotEqual(msg.ToByteArray(), copy.ToByteArray());
copy = (TestAllTypesLite) ((IBuilderLite) copy.ToBuilder()).WeakMergeFrom(msg.ToByteString()).WeakBuild();
- TestUtil.AssertBytesEqual(msg.ToByteArray(), copy.ToByteArray());
+ Assert.Equal(msg.ToByteArray(), copy.ToByteArray());
}
- [TestMethod]
+ [Fact]
public void TestIBuilderLiteWeakMergeFromByteStringExtensions()
{
TestAllExtensionsLite copy,
@@ -207,12 +203,12 @@
"Should be merged.").Build();
copy = TestAllExtensionsLite.DefaultInstance;
- Assert.AreNotEqual(msg.ToByteArray(), copy.ToByteArray());
+ Assert.NotEqual(msg.ToByteArray(), copy.ToByteArray());
copy =
(TestAllExtensionsLite)
((IBuilderLite) copy.ToBuilder()).WeakMergeFrom(msg.ToByteString(), ExtensionRegistry.Empty).WeakBuild();
- Assert.AreNotEqual(msg.ToByteArray(), copy.ToByteArray());
+ Assert.NotEqual(msg.ToByteArray(), copy.ToByteArray());
ExtensionRegistry registry = ExtensionRegistry.CreateInstance();
UnittestLite.RegisterAllExtensions(registry);
@@ -220,11 +216,11 @@
copy =
(TestAllExtensionsLite)
((IBuilderLite) copy.ToBuilder()).WeakMergeFrom(msg.ToByteString(), registry).WeakBuild();
- TestUtil.AssertBytesEqual(msg.ToByteArray(), copy.ToByteArray());
- Assert.AreEqual("Should be merged.", copy.GetExtension(UnittestLite.OptionalStringExtensionLite));
+ Assert.Equal(msg.ToByteArray(), copy.ToByteArray());
+ Assert.Equal("Should be merged.", copy.GetExtension(UnittestLite.OptionalStringExtensionLite));
}
- [TestMethod]
+ [Fact]
public void TestIBuilderLiteWeakMergeFromCodedInputStream()
{
TestAllTypesLite copy,
@@ -232,7 +228,7 @@
.SetOptionalUint32(uint.MaxValue).Build();
copy = TestAllTypesLite.DefaultInstance;
- Assert.AreNotEqual(msg.ToByteArray(), copy.ToByteArray());
+ Assert.NotEqual(msg.ToByteArray(), copy.ToByteArray());
using (MemoryStream ms = new MemoryStream(msg.ToByteArray()))
{
@@ -240,58 +236,58 @@
copy = (TestAllTypesLite) ((IBuilderLite) copy.ToBuilder()).WeakMergeFrom(ci).WeakBuild();
}
- TestUtil.AssertBytesEqual(msg.ToByteArray(), copy.ToByteArray());
+ Assert.Equal(msg.ToByteArray(), copy.ToByteArray());
}
- [TestMethod]
+ [Fact]
public void TestIBuilderLiteWeakBuildPartial()
{
IBuilderLite builder = TestRequiredLite.CreateBuilder();
- Assert.IsFalse(builder.IsInitialized);
+ Assert.False(builder.IsInitialized);
IMessageLite msg = builder.WeakBuildPartial();
- Assert.IsFalse(msg.IsInitialized);
+ Assert.False(msg.IsInitialized);
- TestUtil.AssertBytesEqual(msg.ToByteArray(), TestRequiredLite.DefaultInstance.ToByteArray());
+ Assert.Equal(msg.ToByteArray(), TestRequiredLite.DefaultInstance.ToByteArray());
}
- [TestMethod, ExpectedException(typeof(UninitializedMessageException))]
+ [Fact]
public void TestIBuilderLiteWeakBuildUninitialized()
{
IBuilderLite builder = TestRequiredLite.CreateBuilder();
- Assert.IsFalse(builder.IsInitialized);
- builder.WeakBuild();
+ Assert.False(builder.IsInitialized);
+ Assert.Throws<UninitializedMessageException>(() => builder.WeakBuild());
}
- [TestMethod]
+ [Fact]
public void TestIBuilderLiteWeakBuild()
{
IBuilderLite builder = TestRequiredLite.CreateBuilder()
.SetD(0)
.SetEn(ExtraEnum.EXLITE_BAZ);
- Assert.IsTrue(builder.IsInitialized);
+ Assert.True(builder.IsInitialized);
builder.WeakBuild();
}
- [TestMethod]
+ [Fact]
public void TestIBuilderLiteWeakClone()
{
TestRequiredLite msg = TestRequiredLite.CreateBuilder()
.SetD(1).SetEn(ExtraEnum.EXLITE_BAR).Build();
- Assert.IsTrue(msg.IsInitialized);
+ Assert.True(msg.IsInitialized);
IMessageLite copy = ((IBuilderLite) msg.ToBuilder()).WeakClone().WeakBuild();
- TestUtil.AssertBytesEqual(msg.ToByteArray(), copy.ToByteArray());
+ Assert.Equal(msg.ToByteArray(), copy.ToByteArray());
}
- [TestMethod]
+ [Fact]
public void TestIBuilderLiteWeakDefaultInstance()
{
- Assert.IsTrue(ReferenceEquals(TestRequiredLite.DefaultInstance,
+ Assert.True(ReferenceEquals(TestRequiredLite.DefaultInstance,
((IBuilderLite) TestRequiredLite.CreateBuilder()).WeakDefaultInstanceForType));
}
- [TestMethod]
+ [Fact]
public void TestGeneratedBuilderLiteAddRange()
{
TestAllTypesLite copy,
@@ -303,11 +299,11 @@
.Build();
copy = msg.DefaultInstanceForType.ToBuilder().MergeFrom(msg).Build();
- TestUtil.AssertBytesEqual(msg.ToByteArray(), copy.ToByteArray());
+ Assert.Equal(msg.ToByteArray(), copy.ToByteArray());
}
// ROK 5/7/2013 Issue #54: should retire all bytes in buffer (bufferSize)
- [TestMethod]
+ [Fact]
public void TestBufferRefillIssue()
{
var ms = new MemoryStream();
@@ -326,15 +322,15 @@
var input = CodedInputStream.CreateInstance(ms);
var builder = BucketOfBytes.CreateBuilder();
input.ReadMessage(builder, ExtensionRegistry.Empty);
- Assert.AreEqual(3005L, input.Position);
- Assert.AreEqual(3000, builder.Value.Length);
+ Assert.Equal(3005L, input.Position);
+ Assert.Equal(3000, builder.Value.Length);
input.ReadMessage(builder, ExtensionRegistry.Empty);
- Assert.AreEqual(5114, input.Position);
- Assert.AreEqual(1000, builder.Value.Length);
+ Assert.Equal(5114, input.Position);
+ Assert.Equal(1000, builder.Value.Length);
input.ReadMessage(builder, ExtensionRegistry.Empty);
- Assert.AreEqual(5217L, input.Position);
- Assert.AreEqual(input.Position, ms.Length);
- Assert.AreEqual(100, builder.Value.Length);
+ Assert.Equal(5217L, input.Position);
+ Assert.Equal(input.Position, ms.Length);
+ Assert.Equal(100, builder.Value.Length);
}
}
}
\ No newline at end of file
diff --git a/csharp/src/ProtocolBuffersLite.Test/AbstractMessageLiteTest.cs b/csharp/src/ProtocolBuffersLite.Test/AbstractMessageLiteTest.cs
index bead60f..f6a4e94 100644
--- a/csharp/src/ProtocolBuffersLite.Test/AbstractMessageLiteTest.cs
+++ b/csharp/src/ProtocolBuffersLite.Test/AbstractMessageLiteTest.cs
@@ -35,18 +35,15 @@
#endregion
using System;
-using System.Collections.Generic;
using System.IO;
-using Google.ProtocolBuffers;
using Google.ProtocolBuffers.TestProtos;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Xunit;
namespace Google.ProtocolBuffers
{
- [TestClass]
public class AbstractMessageLiteTest
{
- [TestMethod]
+ [Fact]
public void TestMessageLiteToByteString()
{
TestRequiredLite msg = TestRequiredLite.CreateBuilder()
@@ -55,14 +52,14 @@
.Build();
ByteString b = msg.ToByteString();
- Assert.AreEqual(4, b.Length);
- Assert.AreEqual(TestRequiredLite.DFieldNumber << 3, b[0]);
- Assert.AreEqual(42, b[1]);
- Assert.AreEqual(TestRequiredLite.EnFieldNumber << 3, b[2]);
- Assert.AreEqual((int) ExtraEnum.EXLITE_BAZ, b[3]);
+ Assert.Equal(4, b.Length);
+ Assert.Equal(TestRequiredLite.DFieldNumber << 3, b[0]);
+ Assert.Equal(42, b[1]);
+ Assert.Equal(TestRequiredLite.EnFieldNumber << 3, b[2]);
+ Assert.Equal((int) ExtraEnum.EXLITE_BAZ, b[3]);
}
- [TestMethod]
+ [Fact]
public void TestMessageLiteToByteArray()
{
TestRequiredLite msg = TestRequiredLite.CreateBuilder()
@@ -72,10 +69,10 @@
ByteString b = msg.ToByteString();
ByteString copy = ByteString.CopyFrom(msg.ToByteArray());
- Assert.AreEqual(b, copy);
+ Assert.Equal(b, copy);
}
- [TestMethod]
+ [Fact]
public void TestMessageLiteWriteTo()
{
TestRequiredLite msg = TestRequiredLite.CreateBuilder()
@@ -85,10 +82,10 @@
MemoryStream ms = new MemoryStream();
msg.WriteTo(ms);
- TestUtil.AssertBytesEqual(msg.ToByteArray(), ms.ToArray());
+ Assert.Equal(msg.ToByteArray(), ms.ToArray());
}
- [TestMethod]
+ [Fact]
public void TestMessageLiteWriteDelimitedTo()
{
TestRequiredLite msg = TestRequiredLite.CreateBuilder()
@@ -100,21 +97,21 @@
msg.WriteDelimitedTo(ms);
byte[] buffer = ms.ToArray();
- Assert.AreEqual(5, buffer.Length);
- Assert.AreEqual(4, buffer[0]);
+ Assert.Equal(5, buffer.Length);
+ Assert.Equal(4, buffer[0]);
byte[] msgBytes = new byte[4];
Array.Copy(buffer, 1, msgBytes, 0, 4);
- TestUtil.AssertBytesEqual(msg.ToByteArray(), msgBytes);
+ Assert.Equal(msg.ToByteArray(), msgBytes);
}
- [TestMethod]
+ [Fact]
public void TestIMessageLiteWeakCreateBuilderForType()
{
IMessageLite msg = TestRequiredLite.DefaultInstance;
- Assert.AreEqual(typeof(TestRequiredLite.Builder), msg.WeakCreateBuilderForType().GetType());
+ Assert.Equal(typeof(TestRequiredLite.Builder), msg.WeakCreateBuilderForType().GetType());
}
- [TestMethod]
+ [Fact]
public void TestMessageLiteWeakToBuilder()
{
IMessageLite msg = TestRequiredLite.CreateBuilder()
@@ -123,14 +120,14 @@
.Build();
IMessageLite copy = msg.WeakToBuilder().WeakBuild();
- TestUtil.AssertBytesEqual(msg.ToByteArray(), copy.ToByteArray());
+ Assert.Equal(msg.ToByteArray(), copy.ToByteArray());
}
- [TestMethod]
+ [Fact]
public void TestMessageLiteWeakDefaultInstanceForType()
{
IMessageLite msg = TestRequiredLite.DefaultInstance;
- Assert.IsTrue(Object.ReferenceEquals(TestRequiredLite.DefaultInstance, msg.WeakDefaultInstanceForType));
+ Assert.True(Object.ReferenceEquals(TestRequiredLite.DefaultInstance, msg.WeakDefaultInstanceForType));
}
}
}
\ No newline at end of file
diff --git a/csharp/src/ProtocolBuffersLite.Test/ExtendableBuilderLiteTest.cs b/csharp/src/ProtocolBuffersLite.Test/ExtendableBuilderLiteTest.cs
index 0430c4a..5377ea6 100644
--- a/csharp/src/ProtocolBuffersLite.Test/ExtendableBuilderLiteTest.cs
+++ b/csharp/src/ProtocolBuffersLite.Test/ExtendableBuilderLiteTest.cs
@@ -35,34 +35,31 @@
#endregion
using System;
-using System.Collections;
using System.Collections.Generic;
-using Google.ProtocolBuffers;
using Google.ProtocolBuffers.TestProtos;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Xunit;
namespace Google.ProtocolBuffers
{
- [TestClass]
public class ExtendableBuilderLiteTest
{
- [TestMethod]
+ [Fact]
public void TestHasExtensionT()
{
TestAllExtensionsLite.Builder builder = TestAllExtensionsLite.CreateBuilder()
.SetExtension(UnittestLite.OptionalInt32ExtensionLite, 123);
- Assert.IsTrue(builder.HasExtension(UnittestLite.OptionalInt32ExtensionLite));
+ Assert.True(builder.HasExtension(UnittestLite.OptionalInt32ExtensionLite));
}
- [TestMethod]
+ [Fact]
public void TestHasExtensionTMissing()
{
TestAllExtensionsLite.Builder builder = TestAllExtensionsLite.CreateBuilder();
- Assert.IsFalse(builder.HasExtension(UnittestLite.OptionalInt32ExtensionLite));
+ Assert.False(builder.HasExtension(UnittestLite.OptionalInt32ExtensionLite));
}
- [TestMethod]
+ [Fact]
public void TestGetExtensionCountT()
{
TestAllExtensionsLite.Builder builder = TestAllExtensionsLite.CreateBuilder()
@@ -70,41 +67,41 @@
.AddExtension(UnittestLite.RepeatedInt32ExtensionLite, 2)
.AddExtension(UnittestLite.RepeatedInt32ExtensionLite, 3);
- Assert.AreEqual(3, builder.GetExtensionCount(UnittestLite.RepeatedInt32ExtensionLite));
+ Assert.Equal(3, builder.GetExtensionCount(UnittestLite.RepeatedInt32ExtensionLite));
}
- [TestMethod]
+ [Fact]
public void TestGetExtensionCountTEmpty()
{
TestAllExtensionsLite.Builder builder = TestAllExtensionsLite.CreateBuilder();
- Assert.AreEqual(0, builder.GetExtensionCount(UnittestLite.RepeatedInt32ExtensionLite));
+ Assert.Equal(0, builder.GetExtensionCount(UnittestLite.RepeatedInt32ExtensionLite));
}
- [TestMethod]
+ [Fact]
public void TestGetExtensionTNull()
{
TestAllExtensionsLite.Builder builder = TestAllExtensionsLite.CreateBuilder();
string value = builder.GetExtension(UnittestLite.OptionalStringExtensionLite);
- Assert.IsNull(value);
+ Assert.Null(value);
}
- [TestMethod]
+ [Fact]
public void TestGetExtensionTValue()
{
TestAllExtensionsLite.Builder builder = TestAllExtensionsLite.CreateBuilder()
.SetExtension(UnittestLite.OptionalInt32ExtensionLite, 3);
- Assert.AreEqual(3, builder.GetExtension(UnittestLite.OptionalInt32ExtensionLite));
+ Assert.Equal(3, builder.GetExtension(UnittestLite.OptionalInt32ExtensionLite));
}
- [TestMethod]
+ [Fact]
public void TestGetExtensionTEmpty()
{
TestAllExtensionsLite.Builder builder = TestAllExtensionsLite.CreateBuilder();
- Assert.AreEqual(0, builder.GetExtension(UnittestLite.RepeatedInt32ExtensionLite).Count);
+ Assert.Equal(0, builder.GetExtension(UnittestLite.RepeatedInt32ExtensionLite).Count);
}
- [TestMethod]
+ [Fact]
public void TestGetExtensionTList()
{
TestAllExtensionsLite.Builder builder = TestAllExtensionsLite.CreateBuilder()
@@ -113,10 +110,10 @@
.AddExtension(UnittestLite.RepeatedInt32ExtensionLite, 3);
IList<int> values = builder.GetExtension(UnittestLite.RepeatedInt32ExtensionLite);
- Assert.AreEqual(3, values.Count);
+ Assert.Equal(3, values.Count);
}
- [TestMethod]
+ [Fact]
public void TestGetExtensionTIndex()
{
TestAllExtensionsLite.Builder builder = TestAllExtensionsLite.CreateBuilder()
@@ -125,17 +122,17 @@
.AddExtension(UnittestLite.RepeatedInt32ExtensionLite, 2);
for (int i = 0; i < 3; i++)
- Assert.AreEqual(i, builder.GetExtension(UnittestLite.RepeatedInt32ExtensionLite, i));
+ Assert.Equal(i, builder.GetExtension(UnittestLite.RepeatedInt32ExtensionLite, i));
}
- [TestMethod, ExpectedException(typeof(ArgumentOutOfRangeException))]
+ [Fact]
public void TestGetExtensionTIndexOutOfRange()
{
TestAllExtensionsLite.Builder builder = TestAllExtensionsLite.CreateBuilder();
- builder.GetExtension(UnittestLite.RepeatedInt32ExtensionLite, 0);
+ Assert.Throws<ArgumentOutOfRangeException>(() => builder.GetExtension(UnittestLite.RepeatedInt32ExtensionLite, 0));
}
- [TestMethod]
+ [Fact]
public void TestSetExtensionTIndex()
{
TestAllExtensionsLite.Builder builder = TestAllExtensionsLite.CreateBuilder()
@@ -144,107 +141,107 @@
.AddExtension(UnittestLite.RepeatedInt32ExtensionLite, 2);
for (int i = 0; i < 3; i++)
- Assert.AreEqual(i, builder.GetExtension(UnittestLite.RepeatedInt32ExtensionLite, i));
+ Assert.Equal(i, builder.GetExtension(UnittestLite.RepeatedInt32ExtensionLite, i));
builder.SetExtension(UnittestLite.RepeatedInt32ExtensionLite, 0, 5);
builder.SetExtension(UnittestLite.RepeatedInt32ExtensionLite, 1, 6);
builder.SetExtension(UnittestLite.RepeatedInt32ExtensionLite, 2, 7);
for (int i = 0; i < 3; i++)
- Assert.AreEqual(5 + i, builder.GetExtension(UnittestLite.RepeatedInt32ExtensionLite, i));
+ Assert.Equal(5 + i, builder.GetExtension(UnittestLite.RepeatedInt32ExtensionLite, i));
}
- [TestMethod, ExpectedException(typeof(ArgumentOutOfRangeException))]
+ [Fact]
public void TestSetExtensionTIndexOutOfRange()
{
TestAllExtensionsLite.Builder builder = TestAllExtensionsLite.CreateBuilder();
- builder.SetExtension(UnittestLite.RepeatedInt32ExtensionLite, 0, -1);
+ Assert.Throws<ArgumentOutOfRangeException>(() => builder.SetExtension(UnittestLite.RepeatedInt32ExtensionLite, 0, -1));
}
- [TestMethod]
+ [Fact]
public void TestClearExtensionTList()
{
TestAllExtensionsLite.Builder builder = TestAllExtensionsLite.CreateBuilder()
.AddExtension(UnittestLite.RepeatedInt32ExtensionLite, 0);
- Assert.AreEqual(1, builder.GetExtensionCount(UnittestLite.RepeatedInt32ExtensionLite));
+ Assert.Equal(1, builder.GetExtensionCount(UnittestLite.RepeatedInt32ExtensionLite));
builder.ClearExtension(UnittestLite.RepeatedInt32ExtensionLite);
- Assert.AreEqual(0, builder.GetExtensionCount(UnittestLite.RepeatedInt32ExtensionLite));
+ Assert.Equal(0, builder.GetExtensionCount(UnittestLite.RepeatedInt32ExtensionLite));
}
- [TestMethod]
+ [Fact]
public void TestClearExtensionTValue()
{
TestAllExtensionsLite.Builder builder = TestAllExtensionsLite.CreateBuilder()
.SetExtension(UnittestLite.OptionalInt32ExtensionLite, 0);
- Assert.IsTrue(builder.HasExtension(UnittestLite.OptionalInt32ExtensionLite));
+ Assert.True(builder.HasExtension(UnittestLite.OptionalInt32ExtensionLite));
builder.ClearExtension(UnittestLite.OptionalInt32ExtensionLite);
- Assert.IsFalse(builder.HasExtension(UnittestLite.OptionalInt32ExtensionLite));
+ Assert.False(builder.HasExtension(UnittestLite.OptionalInt32ExtensionLite));
}
- [TestMethod]
+ [Fact]
public void TestIndexedByDescriptor()
{
TestAllExtensionsLite.Builder builder = TestAllExtensionsLite.CreateBuilder();
- Assert.IsFalse(builder.HasExtension(UnittestLite.OptionalInt32ExtensionLite));
+ Assert.False(builder.HasExtension(UnittestLite.OptionalInt32ExtensionLite));
builder[UnittestLite.OptionalInt32ExtensionLite.Descriptor] = 123;
- Assert.IsTrue(builder.HasExtension(UnittestLite.OptionalInt32ExtensionLite));
- Assert.AreEqual(123, builder.GetExtension(UnittestLite.OptionalInt32ExtensionLite));
+ Assert.True(builder.HasExtension(UnittestLite.OptionalInt32ExtensionLite));
+ Assert.Equal(123, builder.GetExtension(UnittestLite.OptionalInt32ExtensionLite));
}
- [TestMethod]
+ [Fact]
public void TestIndexedByDescriptorAndOrdinal()
{
TestAllExtensionsLite.Builder builder = TestAllExtensionsLite.CreateBuilder()
.AddExtension(UnittestLite.RepeatedInt32ExtensionLite, 0);
- Assert.AreEqual(1, builder.GetExtensionCount(UnittestLite.RepeatedInt32ExtensionLite));
+ Assert.Equal(1, builder.GetExtensionCount(UnittestLite.RepeatedInt32ExtensionLite));
IFieldDescriptorLite f = UnittestLite.RepeatedInt32ExtensionLite.Descriptor;
builder[f, 0] = 123;
- Assert.AreEqual(1, builder.GetExtensionCount(UnittestLite.RepeatedInt32ExtensionLite));
- Assert.AreEqual(123, builder.GetExtension(UnittestLite.RepeatedInt32ExtensionLite, 0));
+ Assert.Equal(1, builder.GetExtensionCount(UnittestLite.RepeatedInt32ExtensionLite));
+ Assert.Equal(123, builder.GetExtension(UnittestLite.RepeatedInt32ExtensionLite, 0));
}
- [TestMethod, ExpectedException(typeof(ArgumentOutOfRangeException))]
+ [Fact]
public void TestIndexedByDescriptorAndOrdinalOutOfRange()
{
TestAllExtensionsLite.Builder builder = TestAllExtensionsLite.CreateBuilder();
- Assert.AreEqual(0, builder.GetExtensionCount(UnittestLite.RepeatedInt32ExtensionLite));
+ Assert.Equal(0, builder.GetExtensionCount(UnittestLite.RepeatedInt32ExtensionLite));
IFieldDescriptorLite f = UnittestLite.RepeatedInt32ExtensionLite.Descriptor;
- builder[f, 0] = 123;
+ Assert.Throws<ArgumentOutOfRangeException>(() => builder[f, 0] = 123);
}
- [TestMethod]
+ [Fact]
public void TestClearFieldByDescriptor()
{
TestAllExtensionsLite.Builder builder = TestAllExtensionsLite.CreateBuilder()
.AddExtension(UnittestLite.RepeatedInt32ExtensionLite, 0);
- Assert.AreEqual(1, builder.GetExtensionCount(UnittestLite.RepeatedInt32ExtensionLite));
+ Assert.Equal(1, builder.GetExtensionCount(UnittestLite.RepeatedInt32ExtensionLite));
IFieldDescriptorLite f = UnittestLite.RepeatedInt32ExtensionLite.Descriptor;
builder.ClearField(f);
- Assert.AreEqual(0, builder.GetExtensionCount(UnittestLite.RepeatedInt32ExtensionLite));
+ Assert.Equal(0, builder.GetExtensionCount(UnittestLite.RepeatedInt32ExtensionLite));
}
- [TestMethod]
+ [Fact]
public void TestAddRepeatedFieldByDescriptor()
{
TestAllExtensionsLite.Builder builder = TestAllExtensionsLite.CreateBuilder()
.AddExtension(UnittestLite.RepeatedInt32ExtensionLite, 0);
- Assert.AreEqual(1, builder.GetExtensionCount(UnittestLite.RepeatedInt32ExtensionLite));
+ Assert.Equal(1, builder.GetExtensionCount(UnittestLite.RepeatedInt32ExtensionLite));
IFieldDescriptorLite f = UnittestLite.RepeatedInt32ExtensionLite.Descriptor;
builder.AddRepeatedField(f, 123);
- Assert.AreEqual(2, builder.GetExtensionCount(UnittestLite.RepeatedInt32ExtensionLite));
- Assert.AreEqual(123, builder.GetExtension(UnittestLite.RepeatedInt32ExtensionLite, 1));
+ Assert.Equal(2, builder.GetExtensionCount(UnittestLite.RepeatedInt32ExtensionLite));
+ Assert.Equal(123, builder.GetExtension(UnittestLite.RepeatedInt32ExtensionLite, 1));
}
- [TestMethod]
+ [Fact]
public void TestMissingExtensionsLite()
{
const int optionalInt32 = 12345678;
@@ -255,21 +252,21 @@
builder.AddExtension(UnittestLite.RepeatedDoubleExtensionLite, 1.3);
TestAllExtensionsLite msg = builder.Build();
- Assert.IsTrue(msg.HasExtension(UnittestLite.OptionalInt32ExtensionLite));
- Assert.AreEqual(3, msg.GetExtensionCount(UnittestLite.RepeatedDoubleExtensionLite));
+ Assert.True(msg.HasExtension(UnittestLite.OptionalInt32ExtensionLite));
+ Assert.Equal(3, msg.GetExtensionCount(UnittestLite.RepeatedDoubleExtensionLite));
byte[] bits = msg.ToByteArray();
TestAllExtensionsLite copy = TestAllExtensionsLite.ParseFrom(bits);
- Assert.IsFalse(copy.HasExtension(UnittestLite.OptionalInt32ExtensionLite));
- Assert.AreEqual(0, copy.GetExtensionCount(UnittestLite.RepeatedDoubleExtensionLite));
- Assert.AreNotEqual(msg, copy);
+ Assert.False(copy.HasExtension(UnittestLite.OptionalInt32ExtensionLite));
+ Assert.Equal(0, copy.GetExtensionCount(UnittestLite.RepeatedDoubleExtensionLite));
+ Assert.NotEqual(msg, copy);
//The lite runtime removes all unknown fields and extensions
byte[] copybits = copy.ToByteArray();
- Assert.AreEqual(0, copybits.Length);
+ Assert.Equal(0, copybits.Length);
}
- [TestMethod]
+ [Fact]
public void TestMissingFieldsLite()
{
TestAllTypesLite msg = TestAllTypesLite.CreateBuilder()
@@ -278,12 +275,14 @@
.Build();
byte[] bits = msg.ToByteArray();
- TestAllExtensionsLite copy = TestAllExtensionsLite.ParseFrom(bits);
- Assert.AreNotEqual(msg, copy);
+ IMessageLite copy = TestAllExtensionsLite.ParseFrom(bits);
+ // Use explicit call to Equals to avoid xUnit checking for type equality.
+ Assert.False(msg.Equals(copy));
+ Assert.False(copy.Equals(msg));
//The lite runtime removes all unknown fields and extensions
byte[] copybits = copy.ToByteArray();
- Assert.AreEqual(0, copybits.Length);
+ Assert.Equal(0, copybits.Length);
}
}
}
\ No newline at end of file
diff --git a/csharp/src/ProtocolBuffersLite.Test/ExtendableMessageLiteTest.cs b/csharp/src/ProtocolBuffersLite.Test/ExtendableMessageLiteTest.cs
index b31fb75..7812744 100644
--- a/csharp/src/ProtocolBuffersLite.Test/ExtendableMessageLiteTest.cs
+++ b/csharp/src/ProtocolBuffersLite.Test/ExtendableMessageLiteTest.cs
@@ -39,11 +39,10 @@
using System.Text;
using Google.ProtocolBuffers;
using Google.ProtocolBuffers.TestProtos;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Xunit;
namespace Google.ProtocolBuffers
{
- [TestClass]
public class ExtendableMessageLiteTest
{
//The lite framework does not make this assertion
@@ -55,7 +54,7 @@
// ForeignMessageLite.DefaultInstance;
//}
- [TestMethod]
+ [Fact]
public void ExtensionWriterTestMessages()
{
TestAllExtensionsLite.Builder b = TestAllExtensionsLite.CreateBuilder().SetExtension(
@@ -67,20 +66,20 @@
UnittestLite.RegisterAllExtensions(registry);
copy = TestAllExtensionsLite.ParseFrom(msg.ToByteArray(), registry);
- TestUtil.AssertBytesEqual(msg.ToByteArray(), copy.ToByteArray());
+ Assert.Equal(msg.ToByteArray(), copy.ToByteArray());
}
- [TestMethod]
+ [Fact]
public void ExtensionWriterIsInitialized()
{
- Assert.IsTrue(ForeignMessageLite.DefaultInstance.IsInitialized);
- Assert.IsTrue(TestPackedExtensionsLite.CreateBuilder().IsInitialized);
- Assert.IsTrue(TestAllExtensionsLite.CreateBuilder().SetExtension(
+ Assert.True(ForeignMessageLite.DefaultInstance.IsInitialized);
+ Assert.True(TestPackedExtensionsLite.CreateBuilder().IsInitialized);
+ Assert.True(TestAllExtensionsLite.CreateBuilder().SetExtension(
UnittestLite.OptionalForeignMessageExtensionLite, ForeignMessageLite.DefaultInstance)
.IsInitialized);
}
- [TestMethod]
+ [Fact]
public void ExtensionWriterTestSetExtensionLists()
{
TestAllExtensionsLite msg, copy;
@@ -96,13 +95,13 @@
UnittestLite.RegisterAllExtensions(registry);
copy = TestAllExtensionsLite.ParseFrom(msg.ToByteArray(), registry);
- TestUtil.AssertBytesEqual(msg.ToByteArray(), copy.ToByteArray());
+ Assert.Equal(msg.ToByteArray(), copy.ToByteArray());
- Assert.AreEqual(ForeignEnumLite.FOREIGN_LITE_FOO,
+ Assert.Equal(ForeignEnumLite.FOREIGN_LITE_FOO,
copy.GetExtension(UnittestLite.RepeatedForeignEnumExtensionLite, 1));
}
- [TestMethod]
+ [Fact]
public void ExtensionWriterTest()
{
TestAllExtensionsLite.Builder builder = TestAllExtensionsLite.CreateBuilder()
@@ -181,82 +180,82 @@
TestAllExtensionsLite.CreateBuilder().MergeFrom(msg.ToByteArray(), registry);
TestAllExtensionsLite copy = copyBuilder.Build();
- TestUtil.AssertBytesEqual(msg.ToByteArray(), copy.ToByteArray());
+ Assert.Equal(msg.ToByteArray(), copy.ToByteArray());
- Assert.AreEqual(true, copy.GetExtension(UnittestLite.DefaultBoolExtensionLite));
- Assert.AreEqual(ByteString.CopyFromUtf8("123"),
+ Assert.Equal(true, copy.GetExtension(UnittestLite.DefaultBoolExtensionLite));
+ Assert.Equal(ByteString.CopyFromUtf8("123"),
copy.GetExtension(UnittestLite.DefaultBytesExtensionLite));
- Assert.AreEqual("123", copy.GetExtension(UnittestLite.DefaultCordExtensionLite));
- Assert.AreEqual(123, copy.GetExtension(UnittestLite.DefaultDoubleExtensionLite));
- Assert.AreEqual(123u, copy.GetExtension(UnittestLite.DefaultFixed32ExtensionLite));
- Assert.AreEqual(123u, copy.GetExtension(UnittestLite.DefaultFixed64ExtensionLite));
- Assert.AreEqual(123, copy.GetExtension(UnittestLite.DefaultFloatExtensionLite));
- Assert.AreEqual(ForeignEnumLite.FOREIGN_LITE_BAZ,
+ Assert.Equal("123", copy.GetExtension(UnittestLite.DefaultCordExtensionLite));
+ Assert.Equal(123, copy.GetExtension(UnittestLite.DefaultDoubleExtensionLite));
+ Assert.Equal(123u, copy.GetExtension(UnittestLite.DefaultFixed32ExtensionLite));
+ Assert.Equal(123u, copy.GetExtension(UnittestLite.DefaultFixed64ExtensionLite));
+ Assert.Equal(123, copy.GetExtension(UnittestLite.DefaultFloatExtensionLite));
+ Assert.Equal(ForeignEnumLite.FOREIGN_LITE_BAZ,
copy.GetExtension(UnittestLite.DefaultForeignEnumExtensionLite));
- Assert.AreEqual(ImportEnumLite.IMPORT_LITE_BAZ,
+ Assert.Equal(ImportEnumLite.IMPORT_LITE_BAZ,
copy.GetExtension(UnittestLite.DefaultImportEnumExtensionLite));
- Assert.AreEqual(123, copy.GetExtension(UnittestLite.DefaultInt32ExtensionLite));
- Assert.AreEqual(123, copy.GetExtension(UnittestLite.DefaultInt64ExtensionLite));
- Assert.AreEqual(TestAllTypesLite.Types.NestedEnum.FOO,
+ Assert.Equal(123, copy.GetExtension(UnittestLite.DefaultInt32ExtensionLite));
+ Assert.Equal(123, copy.GetExtension(UnittestLite.DefaultInt64ExtensionLite));
+ Assert.Equal(TestAllTypesLite.Types.NestedEnum.FOO,
copy.GetExtension(UnittestLite.DefaultNestedEnumExtensionLite));
- Assert.AreEqual(123, copy.GetExtension(UnittestLite.DefaultSfixed32ExtensionLite));
- Assert.AreEqual(123, copy.GetExtension(UnittestLite.DefaultSfixed64ExtensionLite));
- Assert.AreEqual(123, copy.GetExtension(UnittestLite.DefaultSint32ExtensionLite));
- Assert.AreEqual(123, copy.GetExtension(UnittestLite.DefaultSint64ExtensionLite));
- Assert.AreEqual("123", copy.GetExtension(UnittestLite.DefaultStringExtensionLite));
- Assert.AreEqual("123", copy.GetExtension(UnittestLite.DefaultStringPieceExtensionLite));
- Assert.AreEqual(123u, copy.GetExtension(UnittestLite.DefaultUint32ExtensionLite));
- Assert.AreEqual(123u, copy.GetExtension(UnittestLite.DefaultUint64ExtensionLite));
+ Assert.Equal(123, copy.GetExtension(UnittestLite.DefaultSfixed32ExtensionLite));
+ Assert.Equal(123, copy.GetExtension(UnittestLite.DefaultSfixed64ExtensionLite));
+ Assert.Equal(123, copy.GetExtension(UnittestLite.DefaultSint32ExtensionLite));
+ Assert.Equal(123, copy.GetExtension(UnittestLite.DefaultSint64ExtensionLite));
+ Assert.Equal("123", copy.GetExtension(UnittestLite.DefaultStringExtensionLite));
+ Assert.Equal("123", copy.GetExtension(UnittestLite.DefaultStringPieceExtensionLite));
+ Assert.Equal(123u, copy.GetExtension(UnittestLite.DefaultUint32ExtensionLite));
+ Assert.Equal(123u, copy.GetExtension(UnittestLite.DefaultUint64ExtensionLite));
- Assert.AreEqual(true, copy.GetExtension(UnittestLite.OptionalBoolExtensionLite));
- Assert.AreEqual(ByteString.CopyFromUtf8("123"),
+ Assert.Equal(true, copy.GetExtension(UnittestLite.OptionalBoolExtensionLite));
+ Assert.Equal(ByteString.CopyFromUtf8("123"),
copy.GetExtension(UnittestLite.OptionalBytesExtensionLite));
- Assert.AreEqual("123", copy.GetExtension(UnittestLite.OptionalCordExtensionLite));
- Assert.AreEqual(123, copy.GetExtension(UnittestLite.OptionalDoubleExtensionLite));
- Assert.AreEqual(123u, copy.GetExtension(UnittestLite.OptionalFixed32ExtensionLite));
- Assert.AreEqual(123u, copy.GetExtension(UnittestLite.OptionalFixed64ExtensionLite));
- Assert.AreEqual(123, copy.GetExtension(UnittestLite.OptionalFloatExtensionLite));
- Assert.AreEqual(ForeignEnumLite.FOREIGN_LITE_BAZ,
+ Assert.Equal("123", copy.GetExtension(UnittestLite.OptionalCordExtensionLite));
+ Assert.Equal(123, copy.GetExtension(UnittestLite.OptionalDoubleExtensionLite));
+ Assert.Equal(123u, copy.GetExtension(UnittestLite.OptionalFixed32ExtensionLite));
+ Assert.Equal(123u, copy.GetExtension(UnittestLite.OptionalFixed64ExtensionLite));
+ Assert.Equal(123, copy.GetExtension(UnittestLite.OptionalFloatExtensionLite));
+ Assert.Equal(ForeignEnumLite.FOREIGN_LITE_BAZ,
copy.GetExtension(UnittestLite.OptionalForeignEnumExtensionLite));
- Assert.AreEqual(ImportEnumLite.IMPORT_LITE_BAZ,
+ Assert.Equal(ImportEnumLite.IMPORT_LITE_BAZ,
copy.GetExtension(UnittestLite.OptionalImportEnumExtensionLite));
- Assert.AreEqual(123, copy.GetExtension(UnittestLite.OptionalInt32ExtensionLite));
- Assert.AreEqual(123, copy.GetExtension(UnittestLite.OptionalInt64ExtensionLite));
- Assert.AreEqual(TestAllTypesLite.Types.NestedEnum.FOO,
+ Assert.Equal(123, copy.GetExtension(UnittestLite.OptionalInt32ExtensionLite));
+ Assert.Equal(123, copy.GetExtension(UnittestLite.OptionalInt64ExtensionLite));
+ Assert.Equal(TestAllTypesLite.Types.NestedEnum.FOO,
copy.GetExtension(UnittestLite.OptionalNestedEnumExtensionLite));
- Assert.AreEqual(123, copy.GetExtension(UnittestLite.OptionalSfixed32ExtensionLite));
- Assert.AreEqual(123, copy.GetExtension(UnittestLite.OptionalSfixed64ExtensionLite));
- Assert.AreEqual(123, copy.GetExtension(UnittestLite.OptionalSint32ExtensionLite));
- Assert.AreEqual(123, copy.GetExtension(UnittestLite.OptionalSint64ExtensionLite));
- Assert.AreEqual("123", copy.GetExtension(UnittestLite.OptionalStringExtensionLite));
- Assert.AreEqual("123", copy.GetExtension(UnittestLite.OptionalStringPieceExtensionLite));
- Assert.AreEqual(123u, copy.GetExtension(UnittestLite.OptionalUint32ExtensionLite));
- Assert.AreEqual(123u, copy.GetExtension(UnittestLite.OptionalUint64ExtensionLite));
+ Assert.Equal(123, copy.GetExtension(UnittestLite.OptionalSfixed32ExtensionLite));
+ Assert.Equal(123, copy.GetExtension(UnittestLite.OptionalSfixed64ExtensionLite));
+ Assert.Equal(123, copy.GetExtension(UnittestLite.OptionalSint32ExtensionLite));
+ Assert.Equal(123, copy.GetExtension(UnittestLite.OptionalSint64ExtensionLite));
+ Assert.Equal("123", copy.GetExtension(UnittestLite.OptionalStringExtensionLite));
+ Assert.Equal("123", copy.GetExtension(UnittestLite.OptionalStringPieceExtensionLite));
+ Assert.Equal(123u, copy.GetExtension(UnittestLite.OptionalUint32ExtensionLite));
+ Assert.Equal(123u, copy.GetExtension(UnittestLite.OptionalUint64ExtensionLite));
- Assert.AreEqual(true, copy.GetExtension(UnittestLite.RepeatedBoolExtensionLite, 0));
- Assert.AreEqual(ByteString.CopyFromUtf8("123"),
+ Assert.Equal(true, copy.GetExtension(UnittestLite.RepeatedBoolExtensionLite, 0));
+ Assert.Equal(ByteString.CopyFromUtf8("123"),
copy.GetExtension(UnittestLite.RepeatedBytesExtensionLite, 0));
- Assert.AreEqual("123", copy.GetExtension(UnittestLite.RepeatedCordExtensionLite, 0));
- Assert.AreEqual(123, copy.GetExtension(UnittestLite.RepeatedDoubleExtensionLite, 0));
- Assert.AreEqual(123u, copy.GetExtension(UnittestLite.RepeatedFixed32ExtensionLite, 0));
- Assert.AreEqual(123u, copy.GetExtension(UnittestLite.RepeatedFixed64ExtensionLite, 0));
- Assert.AreEqual(123, copy.GetExtension(UnittestLite.RepeatedFloatExtensionLite, 0));
- Assert.AreEqual(ForeignEnumLite.FOREIGN_LITE_BAZ,
+ Assert.Equal("123", copy.GetExtension(UnittestLite.RepeatedCordExtensionLite, 0));
+ Assert.Equal(123, copy.GetExtension(UnittestLite.RepeatedDoubleExtensionLite, 0));
+ Assert.Equal(123u, copy.GetExtension(UnittestLite.RepeatedFixed32ExtensionLite, 0));
+ Assert.Equal(123u, copy.GetExtension(UnittestLite.RepeatedFixed64ExtensionLite, 0));
+ Assert.Equal(123, copy.GetExtension(UnittestLite.RepeatedFloatExtensionLite, 0));
+ Assert.Equal(ForeignEnumLite.FOREIGN_LITE_BAZ,
copy.GetExtension(UnittestLite.RepeatedForeignEnumExtensionLite, 0));
- Assert.AreEqual(ImportEnumLite.IMPORT_LITE_BAZ,
+ Assert.Equal(ImportEnumLite.IMPORT_LITE_BAZ,
copy.GetExtension(UnittestLite.RepeatedImportEnumExtensionLite, 0));
- Assert.AreEqual(123, copy.GetExtension(UnittestLite.RepeatedInt32ExtensionLite, 0));
- Assert.AreEqual(123, copy.GetExtension(UnittestLite.RepeatedInt64ExtensionLite, 0));
- Assert.AreEqual(TestAllTypesLite.Types.NestedEnum.FOO,
+ Assert.Equal(123, copy.GetExtension(UnittestLite.RepeatedInt32ExtensionLite, 0));
+ Assert.Equal(123, copy.GetExtension(UnittestLite.RepeatedInt64ExtensionLite, 0));
+ Assert.Equal(TestAllTypesLite.Types.NestedEnum.FOO,
copy.GetExtension(UnittestLite.RepeatedNestedEnumExtensionLite, 0));
- Assert.AreEqual(123, copy.GetExtension(UnittestLite.RepeatedSfixed32ExtensionLite, 0));
- Assert.AreEqual(123, copy.GetExtension(UnittestLite.RepeatedSfixed64ExtensionLite, 0));
- Assert.AreEqual(123, copy.GetExtension(UnittestLite.RepeatedSint32ExtensionLite, 0));
- Assert.AreEqual(123, copy.GetExtension(UnittestLite.RepeatedSint64ExtensionLite, 0));
- Assert.AreEqual("123", copy.GetExtension(UnittestLite.RepeatedStringExtensionLite, 0));
- Assert.AreEqual("123", copy.GetExtension(UnittestLite.RepeatedStringPieceExtensionLite, 0));
- Assert.AreEqual(123u, copy.GetExtension(UnittestLite.RepeatedUint32ExtensionLite, 0));
- Assert.AreEqual(123u, copy.GetExtension(UnittestLite.RepeatedUint64ExtensionLite, 0));
+ Assert.Equal(123, copy.GetExtension(UnittestLite.RepeatedSfixed32ExtensionLite, 0));
+ Assert.Equal(123, copy.GetExtension(UnittestLite.RepeatedSfixed64ExtensionLite, 0));
+ Assert.Equal(123, copy.GetExtension(UnittestLite.RepeatedSint32ExtensionLite, 0));
+ Assert.Equal(123, copy.GetExtension(UnittestLite.RepeatedSint64ExtensionLite, 0));
+ Assert.Equal("123", copy.GetExtension(UnittestLite.RepeatedStringExtensionLite, 0));
+ Assert.Equal("123", copy.GetExtension(UnittestLite.RepeatedStringPieceExtensionLite, 0));
+ Assert.Equal(123u, copy.GetExtension(UnittestLite.RepeatedUint32ExtensionLite, 0));
+ Assert.Equal(123u, copy.GetExtension(UnittestLite.RepeatedUint64ExtensionLite, 0));
}
private TestPackedExtensionsLite BuildPackedExtensions()
@@ -295,36 +294,36 @@
private void AssertPackedExtensions(TestPackedExtensionsLite copy)
{
- Assert.AreEqual(true, copy.GetExtension(UnittestLite.PackedBoolExtensionLite, 0));
- Assert.AreEqual(123, copy.GetExtension(UnittestLite.PackedDoubleExtensionLite, 0));
- Assert.AreEqual(123u, copy.GetExtension(UnittestLite.PackedFixed32ExtensionLite, 0));
- Assert.AreEqual(123u, copy.GetExtension(UnittestLite.PackedFixed64ExtensionLite, 0));
- Assert.AreEqual(123, copy.GetExtension(UnittestLite.PackedFloatExtensionLite, 0));
- Assert.AreEqual(123, copy.GetExtension(UnittestLite.PackedInt32ExtensionLite, 0));
- Assert.AreEqual(123, copy.GetExtension(UnittestLite.PackedInt64ExtensionLite, 0));
- Assert.AreEqual(123, copy.GetExtension(UnittestLite.PackedSfixed32ExtensionLite, 0));
- Assert.AreEqual(123, copy.GetExtension(UnittestLite.PackedSfixed64ExtensionLite, 0));
- Assert.AreEqual(123, copy.GetExtension(UnittestLite.PackedSint32ExtensionLite, 0));
- Assert.AreEqual(123, copy.GetExtension(UnittestLite.PackedSint64ExtensionLite, 0));
- Assert.AreEqual(123u, copy.GetExtension(UnittestLite.PackedUint32ExtensionLite, 0));
- Assert.AreEqual(123u, copy.GetExtension(UnittestLite.PackedUint64ExtensionLite, 0));
+ Assert.Equal(true, copy.GetExtension(UnittestLite.PackedBoolExtensionLite, 0));
+ Assert.Equal(123, copy.GetExtension(UnittestLite.PackedDoubleExtensionLite, 0));
+ Assert.Equal(123u, copy.GetExtension(UnittestLite.PackedFixed32ExtensionLite, 0));
+ Assert.Equal(123u, copy.GetExtension(UnittestLite.PackedFixed64ExtensionLite, 0));
+ Assert.Equal(123, copy.GetExtension(UnittestLite.PackedFloatExtensionLite, 0));
+ Assert.Equal(123, copy.GetExtension(UnittestLite.PackedInt32ExtensionLite, 0));
+ Assert.Equal(123, copy.GetExtension(UnittestLite.PackedInt64ExtensionLite, 0));
+ Assert.Equal(123, copy.GetExtension(UnittestLite.PackedSfixed32ExtensionLite, 0));
+ Assert.Equal(123, copy.GetExtension(UnittestLite.PackedSfixed64ExtensionLite, 0));
+ Assert.Equal(123, copy.GetExtension(UnittestLite.PackedSint32ExtensionLite, 0));
+ Assert.Equal(123, copy.GetExtension(UnittestLite.PackedSint64ExtensionLite, 0));
+ Assert.Equal(123u, copy.GetExtension(UnittestLite.PackedUint32ExtensionLite, 0));
+ Assert.Equal(123u, copy.GetExtension(UnittestLite.PackedUint64ExtensionLite, 0));
- Assert.AreEqual(true, copy.GetExtension(UnittestLite.PackedBoolExtensionLite, 1));
- Assert.AreEqual(123, copy.GetExtension(UnittestLite.PackedDoubleExtensionLite, 1));
- Assert.AreEqual(123u, copy.GetExtension(UnittestLite.PackedFixed32ExtensionLite, 1));
- Assert.AreEqual(123u, copy.GetExtension(UnittestLite.PackedFixed64ExtensionLite, 1));
- Assert.AreEqual(123, copy.GetExtension(UnittestLite.PackedFloatExtensionLite, 1));
- Assert.AreEqual(123, copy.GetExtension(UnittestLite.PackedInt32ExtensionLite, 1));
- Assert.AreEqual(123, copy.GetExtension(UnittestLite.PackedInt64ExtensionLite, 1));
- Assert.AreEqual(123, copy.GetExtension(UnittestLite.PackedSfixed32ExtensionLite, 1));
- Assert.AreEqual(123, copy.GetExtension(UnittestLite.PackedSfixed64ExtensionLite, 1));
- Assert.AreEqual(123, copy.GetExtension(UnittestLite.PackedSint32ExtensionLite, 1));
- Assert.AreEqual(123, copy.GetExtension(UnittestLite.PackedSint64ExtensionLite, 1));
- Assert.AreEqual(123u, copy.GetExtension(UnittestLite.PackedUint32ExtensionLite, 1));
- Assert.AreEqual(123u, copy.GetExtension(UnittestLite.PackedUint64ExtensionLite, 1));
+ Assert.Equal(true, copy.GetExtension(UnittestLite.PackedBoolExtensionLite, 1));
+ Assert.Equal(123, copy.GetExtension(UnittestLite.PackedDoubleExtensionLite, 1));
+ Assert.Equal(123u, copy.GetExtension(UnittestLite.PackedFixed32ExtensionLite, 1));
+ Assert.Equal(123u, copy.GetExtension(UnittestLite.PackedFixed64ExtensionLite, 1));
+ Assert.Equal(123, copy.GetExtension(UnittestLite.PackedFloatExtensionLite, 1));
+ Assert.Equal(123, copy.GetExtension(UnittestLite.PackedInt32ExtensionLite, 1));
+ Assert.Equal(123, copy.GetExtension(UnittestLite.PackedInt64ExtensionLite, 1));
+ Assert.Equal(123, copy.GetExtension(UnittestLite.PackedSfixed32ExtensionLite, 1));
+ Assert.Equal(123, copy.GetExtension(UnittestLite.PackedSfixed64ExtensionLite, 1));
+ Assert.Equal(123, copy.GetExtension(UnittestLite.PackedSint32ExtensionLite, 1));
+ Assert.Equal(123, copy.GetExtension(UnittestLite.PackedSint64ExtensionLite, 1));
+ Assert.Equal(123u, copy.GetExtension(UnittestLite.PackedUint32ExtensionLite, 1));
+ Assert.Equal(123u, copy.GetExtension(UnittestLite.PackedUint64ExtensionLite, 1));
}
- [TestMethod]
+ [Fact]
public void ExtensionWriterTestPacked()
{
TestPackedExtensionsLite msg = BuildPackedExtensions();
@@ -336,12 +335,12 @@
TestPackedExtensionsLite.CreateBuilder().MergeFrom(msg.ToByteArray(), registry);
TestPackedExtensionsLite copy = copyBuilder.Build();
- TestUtil.AssertBytesEqual(msg.ToByteArray(), copy.ToByteArray());
+ Assert.Equal(msg.ToByteArray(), copy.ToByteArray());
AssertPackedExtensions(copy);
}
- [TestMethod]
+ [Fact]
public void TestUnpackedAndPackedExtensions()
{
TestPackedExtensionsLite original = BuildPackedExtensions();
@@ -355,19 +354,19 @@
TestPackedExtensionsLite packed = TestPackedExtensionsLite.ParseFrom(unpacked.ToByteArray(), registry);
- Assert.AreEqual(original, packed);
- TestUtil.AssertBytesEqual(original.ToByteArray(), packed.ToByteArray());
+ Assert.Equal(original, packed);
+ Assert.Equal(original.ToByteArray(), packed.ToByteArray());
AssertPackedExtensions(packed);
}
- [TestMethod]
+ [Fact]
public void TestUnpackedFromPackedInput()
{
byte[] packedData = BuildPackedExtensions().ToByteArray();
TestUnpackedTypesLite unpacked = TestUnpackedTypesLite.ParseFrom(packedData);
TestPackedTypesLite packed = TestPackedTypesLite.ParseFrom(unpacked.ToByteArray());
- TestUtil.AssertBytesEqual(packedData, packed.ToByteArray());
+ Assert.Equal(packedData, packed.ToByteArray());
unpacked = TestUnpackedTypesLite.ParseFrom(packed.ToByteArray());
diff --git a/csharp/src/ProtocolBuffersLite.Test/InteropLiteTest.cs b/csharp/src/ProtocolBuffersLite.Test/InteropLiteTest.cs
index 0640a44..7feb044 100644
--- a/csharp/src/ProtocolBuffersLite.Test/InteropLiteTest.cs
+++ b/csharp/src/ProtocolBuffersLite.Test/InteropLiteTest.cs
@@ -35,31 +35,28 @@
#endregion
using System;
-using System.Collections.Generic;
-using Google.ProtocolBuffers;
using Google.ProtocolBuffers.TestProtos;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Xunit;
namespace Google.ProtocolBuffers
{
- [TestClass]
public class InteropLiteTest
{
- [TestMethod]
+ [Fact]
public void TestConvertFromFullMinimal()
{
TestInteropPerson person = TestInteropPerson.CreateBuilder()
.SetId(123)
.SetName("abc")
.Build();
- Assert.IsTrue(person.IsInitialized);
+ Assert.True(person.IsInitialized);
TestInteropPersonLite copy = TestInteropPersonLite.ParseFrom(person.ToByteArray());
- TestUtil.AssertBytesEqual(person.ToByteArray(), copy.ToByteArray());
+ Assert.Equal(person.ToByteArray(), copy.ToByteArray());
}
- [TestMethod]
+ [Fact]
public void TestConvertFromFullComplete()
{
TestInteropPerson person = TestInteropPerson.CreateBuilder()
@@ -75,7 +72,7 @@
.SetExtension(UnittestExtrasFull.EmployeeId,
TestInteropEmployeeId.CreateBuilder().SetNumber("123").Build())
.Build();
- Assert.IsTrue(person.IsInitialized);
+ Assert.True(person.IsInitialized);
ExtensionRegistry registry = ExtensionRegistry.CreateInstance();
UnittestExtrasLite.RegisterAllExtensions(registry);
@@ -84,24 +81,24 @@
TestInteropPersonLite copy = TestInteropPersonLite.ParseFrom(fullBytes, registry);
byte[] liteBytes = copy.ToByteArray();
- TestUtil.AssertBytesEqual(fullBytes, liteBytes);
+ Assert.Equal(fullBytes, liteBytes);
}
- [TestMethod]
+ [Fact]
public void TestConvertFromLiteMinimal()
{
TestInteropPersonLite person = TestInteropPersonLite.CreateBuilder()
.SetId(123)
.SetName("abc")
.Build();
- Assert.IsTrue(person.IsInitialized);
+ Assert.True(person.IsInitialized);
TestInteropPerson copy = TestInteropPerson.ParseFrom(person.ToByteArray());
- TestUtil.AssertBytesEqual(person.ToByteArray(), copy.ToByteArray());
+ Assert.Equal(person.ToByteArray(), copy.ToByteArray());
}
- [TestMethod]
+ [Fact]
public void TestConvertFromLiteComplete()
{
TestInteropPersonLite person = TestInteropPersonLite.CreateBuilder()
@@ -117,14 +114,14 @@
.SetExtension(UnittestExtrasLite.EmployeeIdLite,
TestInteropEmployeeIdLite.CreateBuilder().SetNumber("123").Build())
.Build();
- Assert.IsTrue(person.IsInitialized);
+ Assert.True(person.IsInitialized);
ExtensionRegistry registry = ExtensionRegistry.CreateInstance();
UnittestExtrasFull.RegisterAllExtensions(registry);
TestInteropPerson copy = TestInteropPerson.ParseFrom(person.ToByteArray(), registry);
- TestUtil.AssertBytesEqual(person.ToByteArray(), copy.ToByteArray());
+ Assert.Equal(person.ToByteArray(), copy.ToByteArray());
}
public ByteString AllBytes
@@ -138,7 +135,7 @@
}
}
- [TestMethod]
+ [Fact]
public void TestCompareStringValues()
{
TestInteropPersonLite person = TestInteropPersonLite.CreateBuilder()
@@ -156,14 +153,14 @@
.SetExtension(UnittestExtrasLite.EmployeeIdLite,
TestInteropEmployeeIdLite.CreateBuilder().SetNumber("123").Build())
.Build();
- Assert.IsTrue(person.IsInitialized);
+ Assert.True(person.IsInitialized);
ExtensionRegistry registry = ExtensionRegistry.CreateInstance();
UnittestExtrasFull.RegisterAllExtensions(registry);
TestInteropPerson copy = TestInteropPerson.ParseFrom(person.ToByteArray(), registry);
- TestUtil.AssertBytesEqual(person.ToByteArray(), copy.ToByteArray());
+ Assert.Equal(person.ToByteArray(), copy.ToByteArray());
TestInteropPerson.Builder copyBuilder = TestInteropPerson.CreateBuilder();
TextFormat.Merge(
@@ -171,7 +168,7 @@
"[protobuf_unittest_extra.employee_id]"), registry, copyBuilder);
copy = copyBuilder.Build();
- TestUtil.AssertBytesEqual(person.ToByteArray(), copy.ToByteArray());
+ Assert.Equal(person.ToByteArray(), copy.ToByteArray());
string liteText = person.ToString().TrimEnd().Replace("\r", "");
string fullText = copy.ToString().TrimEnd().Replace("\r", "");
@@ -179,10 +176,10 @@
liteText = liteText.Replace("[protobuf_unittest_extra.employee_id_lite]",
"[protobuf_unittest_extra.employee_id]");
//lite version does not indent
- while (fullText.IndexOf("\n ") >= 0)
+ while (fullText.IndexOf("\n ", StringComparison.Ordinal) >= 0)
fullText = fullText.Replace("\n ", "\n");
- Assert.AreEqual(fullText, liteText);
+ Assert.Equal(fullText, liteText);
}
}
}
\ No newline at end of file
diff --git a/csharp/src/ProtocolBuffersLite.Test/LiteTest.cs b/csharp/src/ProtocolBuffersLite.Test/LiteTest.cs
index 9ef5cc8..8ffd3ee 100644
--- a/csharp/src/ProtocolBuffersLite.Test/LiteTest.cs
+++ b/csharp/src/ProtocolBuffersLite.Test/LiteTest.cs
@@ -34,12 +34,8 @@
#endregion
-using System;
-using System.Collections.Generic;
-using System.IO;
-using Google.ProtocolBuffers.Descriptors;
using Google.ProtocolBuffers.TestProtos;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Xunit;
namespace Google.ProtocolBuffers
{
@@ -47,10 +43,9 @@
/// Miscellaneous tests for message operations that apply to both
/// generated and dynamic messages.
/// </summary>
- [TestClass]
public class LiteTest
{
- [TestMethod]
+ [Fact]
public void TestLite()
{
// Since lite messages are a subset of regular messages, we can mostly
@@ -73,13 +68,13 @@
TestAllTypesLite message2 = TestAllTypesLite.ParseFrom(data);
- Assert.AreEqual(123, message2.OptionalInt32);
- Assert.AreEqual(1, message2.RepeatedStringCount);
- Assert.AreEqual("hello", message2.RepeatedStringList[0]);
- Assert.AreEqual(7, message2.OptionalNestedMessage.Bb);
+ Assert.Equal(123, message2.OptionalInt32);
+ Assert.Equal(1, message2.RepeatedStringCount);
+ Assert.Equal("hello", message2.RepeatedStringList[0]);
+ Assert.Equal(7, message2.OptionalNestedMessage.Bb);
}
- [TestMethod]
+ [Fact]
public void TestLiteExtensions()
{
// TODO(kenton): Unlike other features of the lite library, extensions are
@@ -101,17 +96,17 @@
// writing, parsing hasn't been implemented yet.
TestAllExtensionsLite message2 = message.ToBuilder().Build();
- Assert.AreEqual(123, (int) message2.GetExtension(
+ Assert.Equal(123, (int) message2.GetExtension(
UnittestLite.OptionalInt32ExtensionLite));
- Assert.AreEqual(1, message2.GetExtensionCount(
+ Assert.Equal(1, message2.GetExtensionCount(
UnittestLite.RepeatedStringExtensionLite));
- Assert.AreEqual(1, message2.GetExtension(
+ Assert.Equal(1, message2.GetExtension(
UnittestLite.RepeatedStringExtensionLite).Count);
- Assert.AreEqual("hello", message2.GetExtension(
+ Assert.Equal("hello", message2.GetExtension(
UnittestLite.RepeatedStringExtensionLite, 0));
- Assert.AreEqual(TestAllTypesLite.Types.NestedEnum.BAZ, message2.GetExtension(
+ Assert.Equal(TestAllTypesLite.Types.NestedEnum.BAZ, message2.GetExtension(
UnittestLite.OptionalNestedEnumExtensionLite));
- Assert.AreEqual(7, message2.GetExtension(
+ Assert.Equal(7, message2.GetExtension(
UnittestLite.OptionalNestedMessageExtensionLite).Bb);
}
}
diff --git a/csharp/src/ProtocolBuffersLite.Test/MissingFieldAndExtensionTest.cs b/csharp/src/ProtocolBuffersLite.Test/MissingFieldAndExtensionTest.cs
index b70635d..b9680e6 100644
--- a/csharp/src/ProtocolBuffersLite.Test/MissingFieldAndExtensionTest.cs
+++ b/csharp/src/ProtocolBuffersLite.Test/MissingFieldAndExtensionTest.cs
@@ -34,17 +34,14 @@
#endregion
-using System.IO;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using System.Collections.Generic;
using Google.ProtocolBuffers.TestProtos;
+using Xunit;
namespace Google.ProtocolBuffers
{
- [TestClass]
public class MissingFieldAndExtensionTest
{
- [TestMethod]
+ [Fact]
public void TestRecoverMissingExtensions()
{
const int optionalInt32 = 12345678;
@@ -55,42 +52,42 @@
builder.AddExtension(Unittest.RepeatedDoubleExtension, 1.3);
TestAllExtensions msg = builder.Build();
- Assert.IsTrue(msg.HasExtension(Unittest.OptionalInt32Extension));
- Assert.AreEqual(3, msg.GetExtensionCount(Unittest.RepeatedDoubleExtension));
+ Assert.True(msg.HasExtension(Unittest.OptionalInt32Extension));
+ Assert.Equal(3, msg.GetExtensionCount(Unittest.RepeatedDoubleExtension));
byte[] bits = msg.ToByteArray();
TestAllExtensions copy = TestAllExtensions.ParseFrom(bits);
- Assert.IsFalse(copy.HasExtension(Unittest.OptionalInt32Extension));
- Assert.AreEqual(0, copy.GetExtensionCount(Unittest.RepeatedDoubleExtension));
- Assert.AreNotEqual(msg, copy);
+ Assert.False(copy.HasExtension(Unittest.OptionalInt32Extension));
+ Assert.Equal(0, copy.GetExtensionCount(Unittest.RepeatedDoubleExtension));
+ Assert.NotEqual(msg, copy);
//Even though copy does not understand the typees they serialize correctly
byte[] copybits = copy.ToByteArray();
- TestUtil.AssertBytesEqual(bits, copybits);
+ Assert.Equal(bits, copybits);
ExtensionRegistry registry = ExtensionRegistry.CreateInstance();
Unittest.RegisterAllExtensions(registry);
//Now we can take those copy bits and restore the full message with extensions
copy = TestAllExtensions.ParseFrom(copybits, registry);
- Assert.IsTrue(copy.HasExtension(Unittest.OptionalInt32Extension));
- Assert.AreEqual(3, copy.GetExtensionCount(Unittest.RepeatedDoubleExtension));
+ Assert.True(copy.HasExtension(Unittest.OptionalInt32Extension));
+ Assert.Equal(3, copy.GetExtensionCount(Unittest.RepeatedDoubleExtension));
- Assert.AreEqual(msg, copy);
- TestUtil.AssertBytesEqual(bits, copy.ToByteArray());
+ Assert.Equal(msg, copy);
+ Assert.Equal(bits, copy.ToByteArray());
//If we modify the object this should all continue to work as before
copybits = copy.ToBuilder().Build().ToByteArray();
- TestUtil.AssertBytesEqual(bits, copybits);
+ Assert.Equal(bits, copybits);
//If we replace extension the object this should all continue to work as before
copybits = copy.ToBuilder()
.SetExtension(Unittest.OptionalInt32Extension, optionalInt32)
.Build().ToByteArray();
- TestUtil.AssertBytesEqual(bits, copybits);
+ Assert.Equal(bits, copybits);
}
- [TestMethod]
+ [Fact]
public void TestRecoverMissingFields()
{
TestMissingFieldsA msga = TestMissingFieldsA.CreateBuilder()
@@ -101,53 +98,53 @@
//serialize to type B and verify all fields exist
TestMissingFieldsB msgb = TestMissingFieldsB.ParseFrom(msga.ToByteArray());
- Assert.AreEqual(1001, msgb.Id);
- Assert.AreEqual("Name", msgb.Name);
- Assert.IsFalse(msgb.HasWebsite);
- Assert.AreEqual(1, msgb.UnknownFields.FieldDictionary.Count);
- Assert.AreEqual("missing@field.value",
+ Assert.Equal(1001, msgb.Id);
+ Assert.Equal("Name", msgb.Name);
+ Assert.False(msgb.HasWebsite);
+ Assert.Equal(1, msgb.UnknownFields.FieldDictionary.Count);
+ Assert.Equal("missing@field.value",
msgb.UnknownFields[TestMissingFieldsA.EmailFieldNumber].LengthDelimitedList[0].ToStringUtf8());
//serializes exactly the same (at least for this simple example)
- TestUtil.AssertBytesEqual(msga.ToByteArray(), msgb.ToByteArray());
- Assert.AreEqual(msga, TestMissingFieldsA.ParseFrom(msgb.ToByteArray()));
+ Assert.Equal(msga.ToByteArray(), msgb.ToByteArray());
+ Assert.Equal(msga, TestMissingFieldsA.ParseFrom(msgb.ToByteArray()));
//now re-create an exact copy of A from serialized B
TestMissingFieldsA copya = TestMissingFieldsA.ParseFrom(msgb.ToByteArray());
- Assert.AreEqual(msga, copya);
- Assert.AreEqual(1001, copya.Id);
- Assert.AreEqual("Name", copya.Name);
- Assert.AreEqual("missing@field.value", copya.Email);
+ Assert.Equal(msga, copya);
+ Assert.Equal(1001, copya.Id);
+ Assert.Equal("Name", copya.Name);
+ Assert.Equal("missing@field.value", copya.Email);
//Now we modify B... and try again
msgb = msgb.ToBuilder().SetWebsite("http://new.missing.field").Build();
//Does B still have the missing field?
- Assert.AreEqual(1, msgb.UnknownFields.FieldDictionary.Count);
+ Assert.Equal(1, msgb.UnknownFields.FieldDictionary.Count);
//Convert back to A and see if all fields are there?
copya = TestMissingFieldsA.ParseFrom(msgb.ToByteArray());
- Assert.AreNotEqual(msga, copya);
- Assert.AreEqual(1001, copya.Id);
- Assert.AreEqual("Name", copya.Name);
- Assert.AreEqual("missing@field.value", copya.Email);
- Assert.AreEqual(1, copya.UnknownFields.FieldDictionary.Count);
- Assert.AreEqual("http://new.missing.field",
+ Assert.NotEqual(msga, copya);
+ Assert.Equal(1001, copya.Id);
+ Assert.Equal("Name", copya.Name);
+ Assert.Equal("missing@field.value", copya.Email);
+ Assert.Equal(1, copya.UnknownFields.FieldDictionary.Count);
+ Assert.Equal("http://new.missing.field",
copya.UnknownFields[TestMissingFieldsB.WebsiteFieldNumber].LengthDelimitedList[0].
ToStringUtf8());
//Lastly we can even still trip back to type B and see all fields:
TestMissingFieldsB copyb = TestMissingFieldsB.ParseFrom(copya.ToByteArray());
- Assert.AreEqual(copya.ToByteArray().Length, copyb.ToByteArray().Length); //not exact order.
- Assert.AreEqual(1001, copyb.Id);
- Assert.AreEqual("Name", copyb.Name);
- Assert.AreEqual("http://new.missing.field", copyb.Website);
- Assert.AreEqual(1, copyb.UnknownFields.FieldDictionary.Count);
- Assert.AreEqual("missing@field.value",
+ Assert.Equal(copya.ToByteArray().Length, copyb.ToByteArray().Length); //not exact order.
+ Assert.Equal(1001, copyb.Id);
+ Assert.Equal("Name", copyb.Name);
+ Assert.Equal("http://new.missing.field", copyb.Website);
+ Assert.Equal(1, copyb.UnknownFields.FieldDictionary.Count);
+ Assert.Equal("missing@field.value",
copyb.UnknownFields[TestMissingFieldsA.EmailFieldNumber].LengthDelimitedList[0].ToStringUtf8
());
}
- [TestMethod]
+ [Fact]
public void TestRecoverMissingMessage()
{
TestMissingFieldsA.Types.SubA suba =
@@ -161,52 +158,52 @@
//serialize to type B and verify all fields exist
TestMissingFieldsB msgb = TestMissingFieldsB.ParseFrom(msga.ToByteArray());
- Assert.AreEqual(1001, msgb.Id);
- Assert.AreEqual("Name", msgb.Name);
- Assert.AreEqual(1, msgb.UnknownFields.FieldDictionary.Count);
- Assert.AreEqual(suba.ToString(),
+ Assert.Equal(1001, msgb.Id);
+ Assert.Equal("Name", msgb.Name);
+ Assert.Equal(1, msgb.UnknownFields.FieldDictionary.Count);
+ Assert.Equal(suba.ToString(),
TestMissingFieldsA.Types.SubA.ParseFrom(
msgb.UnknownFields[TestMissingFieldsA.TestAFieldNumber].LengthDelimitedList[0]).ToString
());
//serializes exactly the same (at least for this simple example)
- TestUtil.AssertBytesEqual(msga.ToByteArray(), msgb.ToByteArray());
- Assert.AreEqual(msga, TestMissingFieldsA.ParseFrom(msgb.ToByteArray()));
+ Assert.Equal(msga.ToByteArray(), msgb.ToByteArray());
+ Assert.Equal(msga, TestMissingFieldsA.ParseFrom(msgb.ToByteArray()));
//now re-create an exact copy of A from serialized B
TestMissingFieldsA copya = TestMissingFieldsA.ParseFrom(msgb.ToByteArray());
- Assert.AreEqual(msga, copya);
- Assert.AreEqual(1001, copya.Id);
- Assert.AreEqual("Name", copya.Name);
- Assert.AreEqual(suba, copya.TestA);
+ Assert.Equal(msga, copya);
+ Assert.Equal(1001, copya.Id);
+ Assert.Equal("Name", copya.Name);
+ Assert.Equal(suba, copya.TestA);
//Now we modify B... and try again
TestMissingFieldsB.Types.SubB subb =
TestMissingFieldsB.Types.SubB.CreateBuilder().AddValues("test-b").Build();
msgb = msgb.ToBuilder().SetTestB(subb).Build();
//Does B still have the missing field?
- Assert.AreEqual(1, msgb.UnknownFields.FieldDictionary.Count);
+ Assert.Equal(1, msgb.UnknownFields.FieldDictionary.Count);
//Convert back to A and see if all fields are there?
copya = TestMissingFieldsA.ParseFrom(msgb.ToByteArray());
- Assert.AreNotEqual(msga, copya);
- Assert.AreEqual(1001, copya.Id);
- Assert.AreEqual("Name", copya.Name);
- Assert.AreEqual(suba, copya.TestA);
- Assert.AreEqual(1, copya.UnknownFields.FieldDictionary.Count);
- TestUtil.AssertBytesEqual(subb.ToByteArray(),
+ Assert.NotEqual(msga, copya);
+ Assert.Equal(1001, copya.Id);
+ Assert.Equal("Name", copya.Name);
+ Assert.Equal(suba, copya.TestA);
+ Assert.Equal(1, copya.UnknownFields.FieldDictionary.Count);
+ Assert.Equal(subb.ToByteArray(),
copya.UnknownFields[TestMissingFieldsB.TestBFieldNumber].LengthDelimitedList[0].ToByteArray());
//Lastly we can even still trip back to type B and see all fields:
TestMissingFieldsB copyb = TestMissingFieldsB.ParseFrom(copya.ToByteArray());
- Assert.AreEqual(copya.ToByteArray().Length, copyb.ToByteArray().Length); //not exact order.
- Assert.AreEqual(1001, copyb.Id);
- Assert.AreEqual("Name", copyb.Name);
- Assert.AreEqual(subb, copyb.TestB);
- Assert.AreEqual(1, copyb.UnknownFields.FieldDictionary.Count);
+ Assert.Equal(copya.ToByteArray().Length, copyb.ToByteArray().Length); //not exact order.
+ Assert.Equal(1001, copyb.Id);
+ Assert.Equal("Name", copyb.Name);
+ Assert.Equal(subb, copyb.TestB);
+ Assert.Equal(1, copyb.UnknownFields.FieldDictionary.Count);
}
- [TestMethod]
+ [Fact]
public void TestRestoreFromOtherType()
{
TestInteropPerson person = TestInteropPerson.CreateBuilder()
@@ -222,19 +219,19 @@
.SetExtension(UnittestExtrasFull.EmployeeId,
TestInteropEmployeeId.CreateBuilder().SetNumber("123").Build())
.Build();
- Assert.IsTrue(person.IsInitialized);
+ Assert.True(person.IsInitialized);
TestEmptyMessage temp = TestEmptyMessage.ParseFrom(person.ToByteArray());
- Assert.AreEqual(7, temp.UnknownFields.FieldDictionary.Count);
+ Assert.Equal(7, temp.UnknownFields.FieldDictionary.Count);
temp = temp.ToBuilder().Build();
- Assert.AreEqual(7, temp.UnknownFields.FieldDictionary.Count);
+ Assert.Equal(7, temp.UnknownFields.FieldDictionary.Count);
ExtensionRegistry registry = ExtensionRegistry.CreateInstance();
UnittestExtrasFull.RegisterAllExtensions(registry);
TestInteropPerson copy = TestInteropPerson.ParseFrom(temp.ToByteArray(), registry);
- Assert.AreEqual(person, copy);
- TestUtil.AssertBytesEqual(person.ToByteArray(), copy.ToByteArray());
+ Assert.Equal(person, copy);
+ Assert.Equal(person.ToByteArray(), copy.ToByteArray());
}
}
}
\ No newline at end of file
diff --git a/csharp/src/ProtocolBuffersLite.Test/ProtocolBuffersLite.Test.CF20.csproj b/csharp/src/ProtocolBuffersLite.Test/ProtocolBuffersLite.Test.CF20.csproj
deleted file mode 100644
index abb9f61..0000000
--- a/csharp/src/ProtocolBuffersLite.Test/ProtocolBuffersLite.Test.CF20.csproj
+++ /dev/null
@@ -1,133 +0,0 @@
-<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <EnvironmentFlavor>COMPACT_FRAMEWORK</EnvironmentFlavor>
- <EnvironmentTemplate>CF20</EnvironmentTemplate>
- <EnvironmentProjectType>TEST</EnvironmentProjectType>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{EE01ED24-3750-4567-9A23-1DB676A15610}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>Google.ProtocolBuffers</RootNamespace>
- <AssemblyName>Google.ProtocolBuffersLite.Test</AssemblyName>
- <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- <SignAssembly>true</SignAssembly>
- <AssemblyOriginatorKeyFile>..\..\keys\Google.ProtocolBuffers.snk</AssemblyOriginatorKeyFile>
- <OldToolsVersion>3.5</OldToolsVersion>
- <ProjectTypeGuids>{4D628B5B-2FBC-4AA6-8C16-197242AEB884};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
- <PlatformFamilyName>Smartphone</PlatformFamilyName>
- <PlatformID>f27da329-3269-4191-98e0-c87d3d7f1db9</PlatformID>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\CF20\Debug</OutputPath>
- <IntermediateOutputPath>obj\CF20\Debug\</IntermediateOutputPath>
- <DefineConstants>DEBUG;TRACE;$(EnvironmentFlavor);$(EnvironmentTemplate);NOSERIALIZABLE;NOFILEVERSION;NOEXTENSIONS</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoStdLib>true</NoStdLib>
- <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
- <NoConfig>true</NoConfig>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\CF20\Release</OutputPath>
- <IntermediateOutputPath>obj\CF20\Release\</IntermediateOutputPath>
- <DefineConstants>TRACE;$(EnvironmentFlavor);$(EnvironmentTemplate);NOSERIALIZABLE;NOFILEVERSION;NOEXTENSIONS</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoStdLib>true</NoStdLib>
- <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
- <NoConfig>true</NoConfig>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="mscorlib" />
- <Reference Include="System" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup Condition=" '$(EnvironmentFlavor)' == 'CLIENTPROFILE' ">
- <Reference Include="nunit.framework">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\NUnit\lib\nunit.framework.dll</HintPath>
- </Reference>
- </ItemGroup>
- <ItemGroup Condition=" '$(EnvironmentFlavor)' != 'CLIENTPROFILE' ">
- <Reference Include="Microsoft.Silverlight.Testing, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\Microsoft.Silverlight.Testing\April2010\Microsoft.Silverlight.Testing.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\Microsoft.Silverlight.Testing\April2010\Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.dll</HintPath>
- </Reference>
- </ItemGroup>
- <ItemGroup>
- <Compile Include="..\..\lib\NUnit-config\Microsoft.VisualStudio.TestTools.cs">
- <Link>Microsoft.VisualStudio.TestTools.cs</Link>
- </Compile>
- <Compile Include="..\ProtocolBuffers.Test\Properties\AssemblyInfo.cs">
- <Link>Properties\AssemblyInfo.cs</Link>
- </Compile>
- <Compile Include="..\ProtocolBuffers.Test\SerializableAttribute.cs">
- <Link>SerializableAttribute.cs</Link>
- </Compile>
- <Compile Include="..\ProtocolBuffers.Test\TestRpcForMimeTypes.cs">
- <Link>TestRpcForMimeTypes.cs</Link>
- </Compile>
- <Compile Include="..\ProtocolBuffers.Test\TestRpcGenerator.cs">
- <Link>TestRpcGenerator.cs</Link>
- </Compile>
- <Compile Include="AbstractBuilderLiteTest.cs" />
- <Compile Include="AbstractMessageLiteTest.cs" />
- <Compile Include="ExtendableBuilderLiteTest.cs" />
- <Compile Include="ExtendableMessageLiteTest.cs" />
- <Compile Include="LiteTest.cs" />
- <Compile Include="SerializableLiteTest.cs" />
- <Compile Include="TestLiteByApi.cs" />
- <Compile Include="TestProtos\UnitTestExtrasLiteProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestImportLiteProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestLiteProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestRpcInteropLite.cs" />
- <Compile Include="TestUtil.cs" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\ProtocolBuffers.Serialization\ProtocolBuffersLite.Serialization.CF20.csproj">
- <Project>{E067A59D-9D0A-4A1F-92B1-38E4457241D1}</Project>
- <Name>ProtocolBuffersLite.Serialization</Name>
- </ProjectReference>
- <ProjectReference Include="..\ProtocolBuffers\ProtocolBuffersLite.CF20.csproj">
- <Project>{6969BDCE-D925-43F3-94AC-A531E6DF2591}</Project>
- <Name>ProtocolBuffersLite</Name>
- <Private>True</Private>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets" />
- <ProjectExtensions>
- <VisualStudio>
- <FlavorProperties GUID="{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}">
- <HostingProcess disable="1" />
- </FlavorProperties>
- </VisualStudio>
- </ProjectExtensions>
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
- <PropertyGroup Condition=" '$(EnvironmentFlavor)' == 'CLIENTPROFILE' ">
- <StartAction>Program</StartAction>
- <StartProgram>$(ProjectDir)..\..\lib\NUnit\tools\nunit-console.exe</StartProgram>
- <StartArguments>/nologo /noshadow /labels /wait $(AssemblyName).dll</StartArguments>
- <StartWorkingDirectory>$(ProjectDir)$(OutputPath)</StartWorkingDirectory>
- </PropertyGroup>
-</Project>
\ No newline at end of file
diff --git a/csharp/src/ProtocolBuffersLite.Test/ProtocolBuffersLite.Test.CF35.csproj b/csharp/src/ProtocolBuffersLite.Test/ProtocolBuffersLite.Test.CF35.csproj
deleted file mode 100644
index 74edad1..0000000
--- a/csharp/src/ProtocolBuffersLite.Test/ProtocolBuffersLite.Test.CF35.csproj
+++ /dev/null
@@ -1,134 +0,0 @@
-<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <EnvironmentFlavor>COMPACT_FRAMEWORK</EnvironmentFlavor>
- <EnvironmentTemplate>CF35</EnvironmentTemplate>
- <EnvironmentProjectType>TEST</EnvironmentProjectType>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{EE01ED24-3750-4567-9A23-1DB676A15610}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>Google.ProtocolBuffers</RootNamespace>
- <AssemblyName>Google.ProtocolBuffersLite.Test</AssemblyName>
- <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- <SignAssembly>true</SignAssembly>
- <AssemblyOriginatorKeyFile>..\..\keys\Google.ProtocolBuffers.snk</AssemblyOriginatorKeyFile>
- <OldToolsVersion>3.5</OldToolsVersion>
- <ProjectTypeGuids>{4D628B5B-2FBC-4AA6-8C16-197242AEB884};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
- <PlatformFamilyName>Smartphone</PlatformFamilyName>
- <PlatformID>f27da329-3269-4191-98e0-c87d3d7f1db9</PlatformID>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\CF35\Debug</OutputPath>
- <IntermediateOutputPath>obj\CF35\Debug\</IntermediateOutputPath>
- <DefineConstants>DEBUG;TRACE;$(EnvironmentFlavor);$(EnvironmentTemplate);NOSERIALIZABLE;NOFILEVERSION</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoStdLib>true</NoStdLib>
- <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
- <NoConfig>true</NoConfig>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\CF35\Release</OutputPath>
- <IntermediateOutputPath>obj\CF35\Release\</IntermediateOutputPath>
- <DefineConstants>TRACE;$(EnvironmentFlavor);$(EnvironmentTemplate);NOSERIALIZABLE;NOFILEVERSION</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoStdLib>true</NoStdLib>
- <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
- <NoConfig>true</NoConfig>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="mscorlib" />
- <Reference Include="System" />
- <Reference Include="System.Xml" />
- <Reference Include="System.Core" />
- </ItemGroup>
- <ItemGroup Condition=" '$(EnvironmentFlavor)' == 'CLIENTPROFILE' ">
- <Reference Include="nunit.framework">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\NUnit\lib\nunit.framework.dll</HintPath>
- </Reference>
- </ItemGroup>
- <ItemGroup Condition=" '$(EnvironmentFlavor)' != 'CLIENTPROFILE' ">
- <Reference Include="Microsoft.Silverlight.Testing, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\Microsoft.Silverlight.Testing\April2010\Microsoft.Silverlight.Testing.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\Microsoft.Silverlight.Testing\April2010\Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.dll</HintPath>
- </Reference>
- </ItemGroup>
- <ItemGroup>
- <Compile Include="..\..\lib\NUnit-config\Microsoft.VisualStudio.TestTools.cs">
- <Link>Microsoft.VisualStudio.TestTools.cs</Link>
- </Compile>
- <Compile Include="..\ProtocolBuffers.Test\Properties\AssemblyInfo.cs">
- <Link>Properties\AssemblyInfo.cs</Link>
- </Compile>
- <Compile Include="..\ProtocolBuffers.Test\SerializableAttribute.cs">
- <Link>SerializableAttribute.cs</Link>
- </Compile>
- <Compile Include="..\ProtocolBuffers.Test\TestRpcForMimeTypes.cs">
- <Link>TestRpcForMimeTypes.cs</Link>
- </Compile>
- <Compile Include="..\ProtocolBuffers.Test\TestRpcGenerator.cs">
- <Link>TestRpcGenerator.cs</Link>
- </Compile>
- <Compile Include="AbstractBuilderLiteTest.cs" />
- <Compile Include="AbstractMessageLiteTest.cs" />
- <Compile Include="ExtendableBuilderLiteTest.cs" />
- <Compile Include="ExtendableMessageLiteTest.cs" />
- <Compile Include="LiteTest.cs" />
- <Compile Include="SerializableLiteTest.cs" />
- <Compile Include="TestLiteByApi.cs" />
- <Compile Include="TestProtos\UnitTestExtrasLiteProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestImportLiteProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestLiteProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestRpcInteropLite.cs" />
- <Compile Include="TestUtil.cs" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\ProtocolBuffers.Serialization\ProtocolBuffersLite.Serialization.CF35.csproj">
- <Project>{E067A59D-9D0A-4A1F-92B1-38E4457241D1}</Project>
- <Name>ProtocolBuffersLite.Serialization</Name>
- </ProjectReference>
- <ProjectReference Include="..\ProtocolBuffers\ProtocolBuffersLite.CF35.csproj">
- <Project>{6969BDCE-D925-43F3-94AC-A531E6DF2591}</Project>
- <Name>ProtocolBuffersLite</Name>
- <Private>True</Private>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets" />
- <ProjectExtensions>
- <VisualStudio>
- <FlavorProperties GUID="{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}">
- <HostingProcess disable="1" />
- </FlavorProperties>
- </VisualStudio>
- </ProjectExtensions>
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
- <PropertyGroup Condition=" '$(EnvironmentFlavor)' == 'CLIENTPROFILE' ">
- <StartAction>Program</StartAction>
- <StartProgram>$(ProjectDir)..\..\lib\NUnit\tools\nunit-console.exe</StartProgram>
- <StartArguments>/nologo /noshadow /labels /wait $(AssemblyName).dll</StartArguments>
- <StartWorkingDirectory>$(ProjectDir)$(OutputPath)</StartWorkingDirectory>
- </PropertyGroup>
-</Project>
\ No newline at end of file
diff --git a/csharp/src/ProtocolBuffersLite.Test/ProtocolBuffersLite.Test.NET20.csproj b/csharp/src/ProtocolBuffersLite.Test/ProtocolBuffersLite.Test.NET20.csproj
deleted file mode 100644
index 59f9375..0000000
--- a/csharp/src/ProtocolBuffersLite.Test/ProtocolBuffersLite.Test.NET20.csproj
+++ /dev/null
@@ -1,121 +0,0 @@
-<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <EnvironmentFlavor>CLIENTPROFILE</EnvironmentFlavor>
- <EnvironmentTemplate>NET20</EnvironmentTemplate>
- <EnvironmentProjectType>TEST</EnvironmentProjectType>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{EE01ED24-3750-4567-9A23-1DB676A15610}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>Google.ProtocolBuffers</RootNamespace>
- <AssemblyName>Google.ProtocolBuffersLite.Test</AssemblyName>
- <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- <SignAssembly>true</SignAssembly>
- <AssemblyOriginatorKeyFile>..\..\keys\Google.ProtocolBuffers.snk</AssemblyOriginatorKeyFile>
- <OldToolsVersion>3.5</OldToolsVersion>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\NET20\Debug</OutputPath>
- <IntermediateOutputPath>obj\NET20\Debug\</IntermediateOutputPath>
- <DefineConstants>DEBUG;TRACE;$(EnvironmentFlavor);$(EnvironmentTemplate);NOEXTENSIONS</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoStdLib>true</NoStdLib>
- <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\NET20\Release</OutputPath>
- <IntermediateOutputPath>obj\NET20\Release\</IntermediateOutputPath>
- <DefineConstants>TRACE;$(EnvironmentFlavor);$(EnvironmentTemplate);NOEXTENSIONS</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoStdLib>true</NoStdLib>
- <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="mscorlib" />
- <Reference Include="System" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup Condition=" '$(EnvironmentFlavor)' == 'CLIENTPROFILE' ">
- <Reference Include="nunit.framework">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\NUnit\lib\nunit.framework.dll</HintPath>
- </Reference>
- </ItemGroup>
- <ItemGroup Condition=" '$(EnvironmentFlavor)' != 'CLIENTPROFILE' ">
- <Reference Include="Microsoft.Silverlight.Testing, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\Microsoft.Silverlight.Testing\April2010\Microsoft.Silverlight.Testing.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\Microsoft.Silverlight.Testing\April2010\Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.dll</HintPath>
- </Reference>
- </ItemGroup>
- <ItemGroup>
- <Compile Include="..\..\lib\NUnit-config\Microsoft.VisualStudio.TestTools.cs">
- <Link>Microsoft.VisualStudio.TestTools.cs</Link>
- </Compile>
- <Compile Include="..\ProtocolBuffers.Test\Properties\AssemblyInfo.cs">
- <Link>Properties\AssemblyInfo.cs</Link>
- </Compile>
- <Compile Include="..\ProtocolBuffers.Test\SerializableAttribute.cs">
- <Link>SerializableAttribute.cs</Link>
- </Compile>
- <Compile Include="..\ProtocolBuffers.Test\TestRpcForMimeTypes.cs">
- <Link>TestRpcForMimeTypes.cs</Link>
- </Compile>
- <Compile Include="..\ProtocolBuffers.Test\TestRpcGenerator.cs">
- <Link>TestRpcGenerator.cs</Link>
- </Compile>
- <Compile Include="AbstractBuilderLiteTest.cs" />
- <Compile Include="AbstractMessageLiteTest.cs" />
- <Compile Include="ExtendableBuilderLiteTest.cs" />
- <Compile Include="ExtendableMessageLiteTest.cs" />
- <Compile Include="LiteTest.cs" />
- <Compile Include="SerializableLiteTest.cs" />
- <Compile Include="TestLiteByApi.cs" />
- <Compile Include="TestProtos\UnitTestExtrasLiteProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestImportLiteProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestLiteProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestRpcInteropLite.cs" />
- <Compile Include="TestUtil.cs" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\ProtocolBuffers.Serialization\ProtocolBuffersLite.Serialization.NET20.csproj">
- <Project>{E067A59D-9D0A-4A1F-92B1-38E4457241D1}</Project>
- <Name>ProtocolBuffersLite.Serialization</Name>
- </ProjectReference>
- <ProjectReference Include="..\ProtocolBuffers\ProtocolBuffersLite.NET20.csproj">
- <Project>{6969BDCE-D925-43F3-94AC-A531E6DF2591}</Project>
- <Name>ProtocolBuffersLite</Name>
- <Private>True</Private>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
- <PropertyGroup Condition=" '$(EnvironmentFlavor)' == 'CLIENTPROFILE' ">
- <StartAction>Program</StartAction>
- <StartProgram>$(ProjectDir)..\..\lib\NUnit\tools\nunit-console.exe</StartProgram>
- <StartArguments>/nologo /noshadow /labels /wait $(AssemblyName).dll</StartArguments>
- <StartWorkingDirectory>$(ProjectDir)$(OutputPath)</StartWorkingDirectory>
- </PropertyGroup>
-</Project>
\ No newline at end of file
diff --git a/csharp/src/ProtocolBuffersLite.Test/ProtocolBuffersLite.Test.NET35.csproj b/csharp/src/ProtocolBuffersLite.Test/ProtocolBuffersLite.Test.NET35.csproj
deleted file mode 100644
index e4ebfe1..0000000
--- a/csharp/src/ProtocolBuffersLite.Test/ProtocolBuffersLite.Test.NET35.csproj
+++ /dev/null
@@ -1,122 +0,0 @@
-<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <EnvironmentFlavor>CLIENTPROFILE</EnvironmentFlavor>
- <EnvironmentTemplate>NET35</EnvironmentTemplate>
- <EnvironmentProjectType>TEST</EnvironmentProjectType>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{EE01ED24-3750-4567-9A23-1DB676A15610}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>Google.ProtocolBuffers</RootNamespace>
- <AssemblyName>Google.ProtocolBuffersLite.Test</AssemblyName>
- <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- <SignAssembly>true</SignAssembly>
- <AssemblyOriginatorKeyFile>..\..\keys\Google.ProtocolBuffers.snk</AssemblyOriginatorKeyFile>
- <OldToolsVersion>3.5</OldToolsVersion>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\NET35\Debug</OutputPath>
- <IntermediateOutputPath>obj\NET35\Debug\</IntermediateOutputPath>
- <DefineConstants>DEBUG;TRACE;$(EnvironmentFlavor);$(EnvironmentTemplate)</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoStdLib>true</NoStdLib>
- <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\NET35\Release</OutputPath>
- <IntermediateOutputPath>obj\NET35\Release\</IntermediateOutputPath>
- <DefineConstants>TRACE;$(EnvironmentFlavor);$(EnvironmentTemplate)</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoStdLib>true</NoStdLib>
- <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="mscorlib" />
- <Reference Include="System" />
- <Reference Include="System.Xml" />
- <Reference Include="System.Core" />
- </ItemGroup>
- <ItemGroup Condition=" '$(EnvironmentFlavor)' == 'CLIENTPROFILE' ">
- <Reference Include="nunit.framework">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\NUnit\lib\nunit.framework.dll</HintPath>
- </Reference>
- </ItemGroup>
- <ItemGroup Condition=" '$(EnvironmentFlavor)' != 'CLIENTPROFILE' ">
- <Reference Include="Microsoft.Silverlight.Testing, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\Microsoft.Silverlight.Testing\April2010\Microsoft.Silverlight.Testing.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\Microsoft.Silverlight.Testing\April2010\Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.dll</HintPath>
- </Reference>
- </ItemGroup>
- <ItemGroup>
- <Compile Include="..\..\lib\NUnit-config\Microsoft.VisualStudio.TestTools.cs">
- <Link>Microsoft.VisualStudio.TestTools.cs</Link>
- </Compile>
- <Compile Include="..\ProtocolBuffers.Test\Properties\AssemblyInfo.cs">
- <Link>Properties\AssemblyInfo.cs</Link>
- </Compile>
- <Compile Include="..\ProtocolBuffers.Test\SerializableAttribute.cs">
- <Link>SerializableAttribute.cs</Link>
- </Compile>
- <Compile Include="..\ProtocolBuffers.Test\TestRpcForMimeTypes.cs">
- <Link>TestRpcForMimeTypes.cs</Link>
- </Compile>
- <Compile Include="..\ProtocolBuffers.Test\TestRpcGenerator.cs">
- <Link>TestRpcGenerator.cs</Link>
- </Compile>
- <Compile Include="AbstractBuilderLiteTest.cs" />
- <Compile Include="AbstractMessageLiteTest.cs" />
- <Compile Include="ExtendableBuilderLiteTest.cs" />
- <Compile Include="ExtendableMessageLiteTest.cs" />
- <Compile Include="LiteTest.cs" />
- <Compile Include="SerializableLiteTest.cs" />
- <Compile Include="TestLiteByApi.cs" />
- <Compile Include="TestProtos\UnitTestExtrasLiteProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestImportLiteProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestLiteProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestRpcInteropLite.cs" />
- <Compile Include="TestUtil.cs" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\ProtocolBuffers.Serialization\ProtocolBuffersLite.Serialization.NET35.csproj">
- <Project>{E067A59D-9D0A-4A1F-92B1-38E4457241D1}</Project>
- <Name>ProtocolBuffersLite.Serialization</Name>
- </ProjectReference>
- <ProjectReference Include="..\ProtocolBuffers\ProtocolBuffersLite.NET35.csproj">
- <Project>{6969BDCE-D925-43F3-94AC-A531E6DF2591}</Project>
- <Name>ProtocolBuffersLite</Name>
- <Private>True</Private>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
- <PropertyGroup Condition=" '$(EnvironmentFlavor)' == 'CLIENTPROFILE' ">
- <StartAction>Program</StartAction>
- <StartProgram>$(ProjectDir)..\..\lib\NUnit\tools\nunit-console.exe</StartProgram>
- <StartArguments>/nologo /noshadow /labels /wait $(AssemblyName).dll</StartArguments>
- <StartWorkingDirectory>$(ProjectDir)$(OutputPath)</StartWorkingDirectory>
- </PropertyGroup>
-</Project>
\ No newline at end of file
diff --git a/csharp/src/ProtocolBuffersLite.Test/ProtocolBuffersLite.Test.NET40.csproj b/csharp/src/ProtocolBuffersLite.Test/ProtocolBuffersLite.Test.NET40.csproj
deleted file mode 100644
index d02ac77..0000000
--- a/csharp/src/ProtocolBuffersLite.Test/ProtocolBuffersLite.Test.NET40.csproj
+++ /dev/null
@@ -1,122 +0,0 @@
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <EnvironmentFlavor>CLIENTPROFILE</EnvironmentFlavor>
- <EnvironmentTemplate>NET40</EnvironmentTemplate>
- <EnvironmentProjectType>TEST</EnvironmentProjectType>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{EE01ED24-3750-4567-9A23-1DB676A15610}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>Google.ProtocolBuffers</RootNamespace>
- <AssemblyName>Google.ProtocolBuffersLite.Test</AssemblyName>
- <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- <SignAssembly>true</SignAssembly>
- <AssemblyOriginatorKeyFile>..\..\keys\Google.ProtocolBuffers.snk</AssemblyOriginatorKeyFile>
- <OldToolsVersion>3.5</OldToolsVersion>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\NET40\Debug</OutputPath>
- <IntermediateOutputPath>obj\NET40\Debug\</IntermediateOutputPath>
- <DefineConstants>DEBUG;TRACE;$(EnvironmentFlavor);$(EnvironmentTemplate)</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoStdLib>true</NoStdLib>
- <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\NET40\Release</OutputPath>
- <IntermediateOutputPath>obj\NET40\Release\</IntermediateOutputPath>
- <DefineConstants>TRACE;$(EnvironmentFlavor);$(EnvironmentTemplate)</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoStdLib>true</NoStdLib>
- <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="mscorlib" />
- <Reference Include="System" />
- <Reference Include="System.Xml" />
- <Reference Include="System.Core" />
- </ItemGroup>
- <ItemGroup Condition=" '$(EnvironmentFlavor)' == 'CLIENTPROFILE' ">
- <Reference Include="nunit.framework">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\NUnit\lib\nunit.framework.dll</HintPath>
- </Reference>
- </ItemGroup>
- <ItemGroup Condition=" '$(EnvironmentFlavor)' != 'CLIENTPROFILE' ">
- <Reference Include="Microsoft.Silverlight.Testing, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\Microsoft.Silverlight.Testing\April2010\Microsoft.Silverlight.Testing.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\Microsoft.Silverlight.Testing\April2010\Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.dll</HintPath>
- </Reference>
- </ItemGroup>
- <ItemGroup>
- <Compile Include="..\..\lib\NUnit-config\Microsoft.VisualStudio.TestTools.cs">
- <Link>Microsoft.VisualStudio.TestTools.cs</Link>
- </Compile>
- <Compile Include="..\ProtocolBuffers.Test\Properties\AssemblyInfo.cs">
- <Link>Properties\AssemblyInfo.cs</Link>
- </Compile>
- <Compile Include="..\ProtocolBuffers.Test\SerializableAttribute.cs">
- <Link>SerializableAttribute.cs</Link>
- </Compile>
- <Compile Include="..\ProtocolBuffers.Test\TestRpcForMimeTypes.cs">
- <Link>TestRpcForMimeTypes.cs</Link>
- </Compile>
- <Compile Include="..\ProtocolBuffers.Test\TestRpcGenerator.cs">
- <Link>TestRpcGenerator.cs</Link>
- </Compile>
- <Compile Include="AbstractBuilderLiteTest.cs" />
- <Compile Include="AbstractMessageLiteTest.cs" />
- <Compile Include="ExtendableBuilderLiteTest.cs" />
- <Compile Include="ExtendableMessageLiteTest.cs" />
- <Compile Include="LiteTest.cs" />
- <Compile Include="SerializableLiteTest.cs" />
- <Compile Include="TestLiteByApi.cs" />
- <Compile Include="TestProtos\UnitTestExtrasLiteProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestImportLiteProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestLiteProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestRpcInteropLite.cs" />
- <Compile Include="TestUtil.cs" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\ProtocolBuffers.Serialization\ProtocolBuffersLite.Serialization.NET40.csproj">
- <Project>{E067A59D-9D0A-4A1F-92B1-38E4457241D1}</Project>
- <Name>ProtocolBuffersLite.Serialization</Name>
- </ProjectReference>
- <ProjectReference Include="..\ProtocolBuffers\ProtocolBuffersLite.NET40.csproj">
- <Project>{6969BDCE-D925-43F3-94AC-A531E6DF2591}</Project>
- <Name>ProtocolBuffersLite</Name>
- <Private>True</Private>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
- <PropertyGroup Condition=" '$(EnvironmentFlavor)' == 'CLIENTPROFILE' ">
- <StartAction>Program</StartAction>
- <StartProgram>$(ProjectDir)..\..\lib\NUnit\tools\nunit-console.exe</StartProgram>
- <StartArguments>/nologo /noshadow /labels /wait $(AssemblyName).dll</StartArguments>
- <StartWorkingDirectory>$(ProjectDir)$(OutputPath)</StartWorkingDirectory>
- </PropertyGroup>
-</Project>
\ No newline at end of file
diff --git a/csharp/src/ProtocolBuffersLite.Test/ProtocolBuffersLite.Test.PL40.csproj b/csharp/src/ProtocolBuffersLite.Test/ProtocolBuffersLite.Test.PL40.csproj
deleted file mode 100644
index b645a01..0000000
--- a/csharp/src/ProtocolBuffersLite.Test/ProtocolBuffersLite.Test.PL40.csproj
+++ /dev/null
@@ -1,156 +0,0 @@
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" xmlns:cs="urn:schemas-csharp-project:template">
- <PropertyGroup>
- <EnvironmentFlavor>PORTABLE_LIBRARY</EnvironmentFlavor>
- <EnvironmentTemplate>PL40</EnvironmentTemplate>
- <EnvironmentProjectType>TEST</EnvironmentProjectType>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{EE01ED24-3750-4567-9A23-1DB676A15610}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>Google.ProtocolBuffers</RootNamespace>
- <AssemblyName>Google.ProtocolBuffersLite.Test</AssemblyName>
- <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- <SignAssembly>true</SignAssembly>
- <AssemblyOriginatorKeyFile>..\..\keys\Google.ProtocolBuffers.snk</AssemblyOriginatorKeyFile>
- <OldToolsVersion>3.5</OldToolsVersion>
- <MinimumVisualStudioVersion>10.0</MinimumVisualStudioVersion>
- <ProjectTypeGuids>{A1591282-1198-4647-A2B1-27E5FF5F6F3B};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
- <TargetFrameworkProfile />
- <ValidateXaml>false</ValidateXaml>
- <ThrowErrorsInValidation>false</ThrowErrorsInValidation>
- <SilverlightApplication>true</SilverlightApplication>
- <XapOutputs>true</XapOutputs>
- <GenerateSilverlightManifest>true</GenerateSilverlightManifest>
- <XapFilename>Google.ProtocolBuffersLite.Test.xap</XapFilename>
- <SilverlightManifestTemplate>Properties\AppManifest.xml</SilverlightManifestTemplate>
- <SilverlightAppEntry>Google.ProtocolBuffers.App</SilverlightAppEntry>
- <TestPageFileName>TestPage.html</TestPageFileName>
- <CreateTestPage>true</CreateTestPage>
- <SilverlightVersion>v4.0</SilverlightVersion>
- <OutOfBrowserSettingsFile>Properties\OutOfBrowserSettings.xml</OutOfBrowserSettingsFile>
- <EnableOutOfBrowser>true</EnableOutOfBrowser>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\PL40\Debug</OutputPath>
- <IntermediateOutputPath>obj\PL40\Debug\</IntermediateOutputPath>
- <DefineConstants>DEBUG;TRACE;$(EnvironmentFlavor);$(EnvironmentTemplate);NOSERIALIZABLE;NOSORTEDLIST</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoStdLib>true</NoStdLib>
- <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\PL40\Release</OutputPath>
- <IntermediateOutputPath>obj\PL40\Release\</IntermediateOutputPath>
- <DefineConstants>TRACE;$(EnvironmentFlavor);$(EnvironmentTemplate);NOSERIALIZABLE;NOSORTEDLIST</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoStdLib>true</NoStdLib>
- <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="mscorlib" />
- <Reference Include="System" />
- <Reference Include="System.Xml" />
- <Reference Include="System.Core" />
- <Reference Include="System.Windows" />
- <Reference Include="System.Windows.Browser" />
- </ItemGroup>
- <ItemGroup Condition=" '$(EnvironmentFlavor)' == 'CLIENTPROFILE' ">
- <Reference Include="nunit.framework">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\NUnit\lib\nunit.framework.dll</HintPath>
- </Reference>
- </ItemGroup>
- <ItemGroup Condition=" '$(EnvironmentFlavor)' != 'CLIENTPROFILE' ">
- <Reference Include="Microsoft.Silverlight.Testing, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\Microsoft.Silverlight.Testing\April2010\Microsoft.Silverlight.Testing.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\Microsoft.Silverlight.Testing\April2010\Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.dll</HintPath>
- </Reference>
- </ItemGroup>
- <ItemGroup>
- <Compile Include="..\..\lib\NUnit-config\Microsoft.VisualStudio.TestTools.cs">
- <Link>Microsoft.VisualStudio.TestTools.cs</Link>
- </Compile>
- <Compile Include="..\ProtocolBuffers.Test\Properties\AssemblyInfo.cs">
- <Link>Properties\AssemblyInfo.cs</Link>
- </Compile>
- <Compile Include="..\ProtocolBuffers.Test\SerializableAttribute.cs">
- <Link>SerializableAttribute.cs</Link>
- </Compile>
- <Compile Include="..\ProtocolBuffers.Test\TestRpcForMimeTypes.cs">
- <Link>TestRpcForMimeTypes.cs</Link>
- </Compile>
- <Compile Include="..\ProtocolBuffers.Test\TestRpcGenerator.cs">
- <Link>TestRpcGenerator.cs</Link>
- </Compile>
- <Compile Include="AbstractBuilderLiteTest.cs" />
- <Compile Include="AbstractMessageLiteTest.cs" />
- <Compile Include="ExtendableBuilderLiteTest.cs" />
- <Compile Include="ExtendableMessageLiteTest.cs" />
- <Compile Include="LiteTest.cs" />
- <Compile Include="SerializableLiteTest.cs" />
- <Compile Include="TestLiteByApi.cs" />
- <Compile Include="TestProtos\UnitTestExtrasLiteProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestImportLiteProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestLiteProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestRpcInteropLite.cs" />
- <Compile Include="TestUtil.cs" />
- <Compile Include="App.xaml.cs">
- <DependentUpon>App.xaml</DependentUpon>
- </Compile>
- <None Include="Properties\AppManifest.xml" />
- <None Include="Properties\OutOfBrowserSettings.xml" />
- <ApplicationDefinition Include="App.xaml">
- <Generator>MSBuild:Compile</Generator>
- <SubType>Designer</SubType>
- </ApplicationDefinition>
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\ProtocolBuffers.Serialization\ProtocolBuffersLite.Serialization.PL40.csproj">
- <Project>{E067A59D-9D0A-4A1F-92B1-38E4457241D1}</Project>
- <Name>ProtocolBuffersLite.Serialization</Name>
- </ProjectReference>
- <ProjectReference Include="..\ProtocolBuffers\ProtocolBuffersLite.PL40.csproj">
- <Project>{6969BDCE-D925-43F3-94AC-A531E6DF2591}</Project>
- <Name>ProtocolBuffersLite</Name>
- <Private>True</Private>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets" />
- <ProjectExtensions>
- <VisualStudio>
- <FlavorProperties GUID="{A1591282-1198-4647-A2B1-27E5FF5F6F3B}">
- <SilverlightProjectProperties />
- </FlavorProperties>
- </VisualStudio>
- </ProjectExtensions>
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
- <PropertyGroup Condition=" '$(EnvironmentFlavor)' == 'CLIENTPROFILE' ">
- <StartAction>Program</StartAction>
- <StartProgram>$(ProjectDir)..\..\lib\NUnit\tools\nunit-console.exe</StartProgram>
- <StartArguments>/nologo /noshadow /labels /wait $(AssemblyName).dll</StartArguments>
- <StartWorkingDirectory>$(ProjectDir)$(OutputPath)</StartWorkingDirectory>
- </PropertyGroup>
-</Project>
\ No newline at end of file
diff --git a/csharp/src/ProtocolBuffersLite.Test/ProtocolBuffersLite.Test.SL20.csproj b/csharp/src/ProtocolBuffersLite.Test/ProtocolBuffersLite.Test.SL20.csproj
deleted file mode 100644
index b4ad946..0000000
--- a/csharp/src/ProtocolBuffersLite.Test/ProtocolBuffersLite.Test.SL20.csproj
+++ /dev/null
@@ -1,157 +0,0 @@
-<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" xmlns:cs="urn:schemas-csharp-project:template">
- <PropertyGroup>
- <EnvironmentFlavor>SILVERLIGHT</EnvironmentFlavor>
- <EnvironmentTemplate>SL20</EnvironmentTemplate>
- <EnvironmentProjectType>TEST</EnvironmentProjectType>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{EE01ED24-3750-4567-9A23-1DB676A15610}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>Google.ProtocolBuffers</RootNamespace>
- <AssemblyName>Google.ProtocolBuffersLite.Test</AssemblyName>
- <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- <SignAssembly>true</SignAssembly>
- <AssemblyOriginatorKeyFile>..\..\keys\Google.ProtocolBuffers.snk</AssemblyOriginatorKeyFile>
- <OldToolsVersion>3.5</OldToolsVersion>
- <ProjectTypeGuids>{A1591282-1198-4647-A2B1-27E5FF5F6F3B};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
- <SilverlightApplication>true</SilverlightApplication>
- <ValidateXaml>false</ValidateXaml>
- <ThrowErrorsInValidation>false</ThrowErrorsInValidation>
- <XapOutputs>true</XapOutputs>
- <GenerateSilverlightManifest>true</GenerateSilverlightManifest>
- <XapFilename>Google.ProtocolBuffersLite.Test.xap</XapFilename>
- <SilverlightManifestTemplate>Properties\AppManifest.xml</SilverlightManifestTemplate>
- <SilverlightAppEntry>Google.ProtocolBuffers.App</SilverlightAppEntry>
- <TestPageFileName>TestPage.html</TestPageFileName>
- <CreateTestPage>true</CreateTestPage>
- <SilverlightVersion>v2.0</SilverlightVersion>
- <OutOfBrowserSettingsFile>Properties\OutOfBrowserSettings.xml</OutOfBrowserSettingsFile>
- <EnableOutOfBrowser>true</EnableOutOfBrowser>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\SL20\Debug</OutputPath>
- <IntermediateOutputPath>obj\SL20\Debug\</IntermediateOutputPath>
- <DefineConstants>DEBUG;TRACE;$(EnvironmentFlavor);$(EnvironmentTemplate);NOSERIALIZABLE;NOSORTEDLIST;NOEXTENSIONS</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoStdLib>true</NoStdLib>
- <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
- <NoConfig>true</NoConfig>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\SL20\Release</OutputPath>
- <IntermediateOutputPath>obj\SL20\Release\</IntermediateOutputPath>
- <DefineConstants>TRACE;$(EnvironmentFlavor);$(EnvironmentTemplate);NOSERIALIZABLE;NOSORTEDLIST;NOEXTENSIONS</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoStdLib>true</NoStdLib>
- <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
- <NoConfig>true</NoConfig>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="mscorlib" />
- <Reference Include="System" />
- <Reference Include="System.Xml" />
- <Reference Include="System.Windows" />
- <Reference Include="System.Windows.Browser" />
- </ItemGroup>
- <ItemGroup Condition=" '$(EnvironmentFlavor)' == 'CLIENTPROFILE' ">
- <Reference Include="nunit.framework">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\NUnit\lib\nunit.framework.dll</HintPath>
- </Reference>
- </ItemGroup>
- <ItemGroup Condition=" '$(EnvironmentFlavor)' != 'CLIENTPROFILE' ">
- <Reference Include="Microsoft.Silverlight.Testing, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\Microsoft.Silverlight.Testing\April2010\Microsoft.Silverlight.Testing.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\Microsoft.Silverlight.Testing\April2010\Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.dll</HintPath>
- </Reference>
- </ItemGroup>
- <ItemGroup>
- <Compile Include="..\..\lib\NUnit-config\Microsoft.VisualStudio.TestTools.cs">
- <Link>Microsoft.VisualStudio.TestTools.cs</Link>
- </Compile>
- <Compile Include="..\ProtocolBuffers.Test\Properties\AssemblyInfo.cs">
- <Link>Properties\AssemblyInfo.cs</Link>
- </Compile>
- <Compile Include="..\ProtocolBuffers.Test\SerializableAttribute.cs">
- <Link>SerializableAttribute.cs</Link>
- </Compile>
- <Compile Include="..\ProtocolBuffers.Test\TestRpcForMimeTypes.cs">
- <Link>TestRpcForMimeTypes.cs</Link>
- </Compile>
- <Compile Include="..\ProtocolBuffers.Test\TestRpcGenerator.cs">
- <Link>TestRpcGenerator.cs</Link>
- </Compile>
- <Compile Include="AbstractBuilderLiteTest.cs" />
- <Compile Include="AbstractMessageLiteTest.cs" />
- <Compile Include="ExtendableBuilderLiteTest.cs" />
- <Compile Include="ExtendableMessageLiteTest.cs" />
- <Compile Include="LiteTest.cs" />
- <Compile Include="SerializableLiteTest.cs" />
- <Compile Include="TestLiteByApi.cs" />
- <Compile Include="TestProtos\UnitTestExtrasLiteProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestImportLiteProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestLiteProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestRpcInteropLite.cs" />
- <Compile Include="TestUtil.cs" />
- <Compile Include="App.xaml.cs">
- <DependentUpon>App.xaml</DependentUpon>
- </Compile>
- <None Include="Properties\AppManifest.xml" />
- <None Include="Properties\OutOfBrowserSettings.xml" />
- <ApplicationDefinition Include="App.xaml">
- <Generator>MSBuild:Compile</Generator>
- <SubType>Designer</SubType>
- </ApplicationDefinition>
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\ProtocolBuffers.Serialization\ProtocolBuffersLite.Serialization.SL20.csproj">
- <Project>{E067A59D-9D0A-4A1F-92B1-38E4457241D1}</Project>
- <Name>ProtocolBuffersLite.Serialization</Name>
- </ProjectReference>
- <ProjectReference Include="..\ProtocolBuffers\ProtocolBuffersLite.SL20.csproj">
- <Project>{6969BDCE-D925-43F3-94AC-A531E6DF2591}</Project>
- <Name>ProtocolBuffersLite</Name>
- <Private>True</Private>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\v2.0\Microsoft.Silverlight.CSharp.targets" />
- <ProjectExtensions>
- <VisualStudio>
- <FlavorProperties GUID="{A1591282-1198-4647-A2B1-27E5FF5F6F3B}">
- <SilverlightProjectProperties>
- <StartAction>OfflineApplication</StartAction>
- </SilverlightProjectProperties>
- </FlavorProperties>
- </VisualStudio>
- </ProjectExtensions>
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
- <PropertyGroup Condition=" '$(EnvironmentFlavor)' == 'CLIENTPROFILE' ">
- <StartAction>Program</StartAction>
- <StartProgram>$(ProjectDir)..\..\lib\NUnit\tools\nunit-console.exe</StartProgram>
- <StartArguments>/nologo /noshadow /labels /wait $(AssemblyName).dll</StartArguments>
- <StartWorkingDirectory>$(ProjectDir)$(OutputPath)</StartWorkingDirectory>
- </PropertyGroup>
-</Project>
\ No newline at end of file
diff --git a/csharp/src/ProtocolBuffersLite.Test/ProtocolBuffersLite.Test.SL30.csproj b/csharp/src/ProtocolBuffersLite.Test/ProtocolBuffersLite.Test.SL30.csproj
deleted file mode 100644
index b5870ed..0000000
--- a/csharp/src/ProtocolBuffersLite.Test/ProtocolBuffersLite.Test.SL30.csproj
+++ /dev/null
@@ -1,158 +0,0 @@
-<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" xmlns:cs="urn:schemas-csharp-project:template">
- <PropertyGroup>
- <EnvironmentFlavor>SILVERLIGHT</EnvironmentFlavor>
- <EnvironmentTemplate>SL30</EnvironmentTemplate>
- <EnvironmentProjectType>TEST</EnvironmentProjectType>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{EE01ED24-3750-4567-9A23-1DB676A15610}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>Google.ProtocolBuffers</RootNamespace>
- <AssemblyName>Google.ProtocolBuffersLite.Test</AssemblyName>
- <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- <SignAssembly>true</SignAssembly>
- <AssemblyOriginatorKeyFile>..\..\keys\Google.ProtocolBuffers.snk</AssemblyOriginatorKeyFile>
- <OldToolsVersion>3.5</OldToolsVersion>
- <ProjectTypeGuids>{A1591282-1198-4647-A2B1-27E5FF5F6F3B};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
- <SilverlightApplication>true</SilverlightApplication>
- <ValidateXaml>false</ValidateXaml>
- <ThrowErrorsInValidation>false</ThrowErrorsInValidation>
- <XapOutputs>true</XapOutputs>
- <GenerateSilverlightManifest>true</GenerateSilverlightManifest>
- <XapFilename>Google.ProtocolBuffersLite.Test.xap</XapFilename>
- <SilverlightManifestTemplate>Properties\AppManifest.xml</SilverlightManifestTemplate>
- <SilverlightAppEntry>Google.ProtocolBuffers.App</SilverlightAppEntry>
- <TestPageFileName>TestPage.html</TestPageFileName>
- <CreateTestPage>true</CreateTestPage>
- <SilverlightVersion>v3.5</SilverlightVersion>
- <OutOfBrowserSettingsFile>Properties\OutOfBrowserSettings.xml</OutOfBrowserSettingsFile>
- <EnableOutOfBrowser>true</EnableOutOfBrowser>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\SL30\Debug</OutputPath>
- <IntermediateOutputPath>obj\SL30\Debug\</IntermediateOutputPath>
- <DefineConstants>DEBUG;TRACE;$(EnvironmentFlavor);$(EnvironmentTemplate);NOSERIALIZABLE;NOSORTEDLIST</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoStdLib>true</NoStdLib>
- <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
- <NoConfig>true</NoConfig>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\SL30\Release</OutputPath>
- <IntermediateOutputPath>obj\SL30\Release\</IntermediateOutputPath>
- <DefineConstants>TRACE;$(EnvironmentFlavor);$(EnvironmentTemplate);NOSERIALIZABLE;NOSORTEDLIST</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoStdLib>true</NoStdLib>
- <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
- <NoConfig>true</NoConfig>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="mscorlib" />
- <Reference Include="System" />
- <Reference Include="System.Xml" />
- <Reference Include="System.Core" />
- <Reference Include="System.Windows" />
- <Reference Include="System.Windows.Browser" />
- </ItemGroup>
- <ItemGroup Condition=" '$(EnvironmentFlavor)' == 'CLIENTPROFILE' ">
- <Reference Include="nunit.framework">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\NUnit\lib\nunit.framework.dll</HintPath>
- </Reference>
- </ItemGroup>
- <ItemGroup Condition=" '$(EnvironmentFlavor)' != 'CLIENTPROFILE' ">
- <Reference Include="Microsoft.Silverlight.Testing, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\Microsoft.Silverlight.Testing\April2010\Microsoft.Silverlight.Testing.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\Microsoft.Silverlight.Testing\April2010\Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.dll</HintPath>
- </Reference>
- </ItemGroup>
- <ItemGroup>
- <Compile Include="..\..\lib\NUnit-config\Microsoft.VisualStudio.TestTools.cs">
- <Link>Microsoft.VisualStudio.TestTools.cs</Link>
- </Compile>
- <Compile Include="..\ProtocolBuffers.Test\Properties\AssemblyInfo.cs">
- <Link>Properties\AssemblyInfo.cs</Link>
- </Compile>
- <Compile Include="..\ProtocolBuffers.Test\SerializableAttribute.cs">
- <Link>SerializableAttribute.cs</Link>
- </Compile>
- <Compile Include="..\ProtocolBuffers.Test\TestRpcForMimeTypes.cs">
- <Link>TestRpcForMimeTypes.cs</Link>
- </Compile>
- <Compile Include="..\ProtocolBuffers.Test\TestRpcGenerator.cs">
- <Link>TestRpcGenerator.cs</Link>
- </Compile>
- <Compile Include="AbstractBuilderLiteTest.cs" />
- <Compile Include="AbstractMessageLiteTest.cs" />
- <Compile Include="ExtendableBuilderLiteTest.cs" />
- <Compile Include="ExtendableMessageLiteTest.cs" />
- <Compile Include="LiteTest.cs" />
- <Compile Include="SerializableLiteTest.cs" />
- <Compile Include="TestLiteByApi.cs" />
- <Compile Include="TestProtos\UnitTestExtrasLiteProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestImportLiteProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestLiteProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestRpcInteropLite.cs" />
- <Compile Include="TestUtil.cs" />
- <Compile Include="App.xaml.cs">
- <DependentUpon>App.xaml</DependentUpon>
- </Compile>
- <None Include="Properties\AppManifest.xml" />
- <None Include="Properties\OutOfBrowserSettings.xml" />
- <ApplicationDefinition Include="App.xaml">
- <Generator>MSBuild:Compile</Generator>
- <SubType>Designer</SubType>
- </ApplicationDefinition>
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\ProtocolBuffers.Serialization\ProtocolBuffersLite.Serialization.SL30.csproj">
- <Project>{E067A59D-9D0A-4A1F-92B1-38E4457241D1}</Project>
- <Name>ProtocolBuffersLite.Serialization</Name>
- </ProjectReference>
- <ProjectReference Include="..\ProtocolBuffers\ProtocolBuffersLite.SL30.csproj">
- <Project>{6969BDCE-D925-43F3-94AC-A531E6DF2591}</Project>
- <Name>ProtocolBuffersLite</Name>
- <Private>True</Private>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\v3.0\Microsoft.Silverlight.CSharp.targets" />
- <ProjectExtensions>
- <VisualStudio>
- <FlavorProperties GUID="{A1591282-1198-4647-A2B1-27E5FF5F6F3B}">
- <SilverlightProjectProperties>
- <StartAction>OfflineApplication</StartAction>
- </SilverlightProjectProperties>
- </FlavorProperties>
- </VisualStudio>
- </ProjectExtensions>
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
- <PropertyGroup Condition=" '$(EnvironmentFlavor)' == 'CLIENTPROFILE' ">
- <StartAction>Program</StartAction>
- <StartProgram>$(ProjectDir)..\..\lib\NUnit\tools\nunit-console.exe</StartProgram>
- <StartArguments>/nologo /noshadow /labels /wait $(AssemblyName).dll</StartArguments>
- <StartWorkingDirectory>$(ProjectDir)$(OutputPath)</StartWorkingDirectory>
- </PropertyGroup>
-</Project>
\ No newline at end of file
diff --git a/csharp/src/ProtocolBuffersLite.Test/ProtocolBuffersLite.Test.SL40.csproj b/csharp/src/ProtocolBuffersLite.Test/ProtocolBuffersLite.Test.SL40.csproj
deleted file mode 100644
index ef1543e..0000000
--- a/csharp/src/ProtocolBuffersLite.Test/ProtocolBuffersLite.Test.SL40.csproj
+++ /dev/null
@@ -1,158 +0,0 @@
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" xmlns:cs="urn:schemas-csharp-project:template">
- <PropertyGroup>
- <EnvironmentFlavor>SILVERLIGHT</EnvironmentFlavor>
- <EnvironmentTemplate>SL40</EnvironmentTemplate>
- <EnvironmentProjectType>TEST</EnvironmentProjectType>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{EE01ED24-3750-4567-9A23-1DB676A15610}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>Google.ProtocolBuffers</RootNamespace>
- <AssemblyName>Google.ProtocolBuffersLite.Test</AssemblyName>
- <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- <SignAssembly>true</SignAssembly>
- <AssemblyOriginatorKeyFile>..\..\keys\Google.ProtocolBuffers.snk</AssemblyOriginatorKeyFile>
- <OldToolsVersion>3.5</OldToolsVersion>
- <ProjectTypeGuids>{A1591282-1198-4647-A2B1-27E5FF5F6F3B};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
- <SilverlightApplication>true</SilverlightApplication>
- <ValidateXaml>false</ValidateXaml>
- <ThrowErrorsInValidation>false</ThrowErrorsInValidation>
- <SilverlightVersion>v4.0</SilverlightVersion>
- <XapOutputs>true</XapOutputs>
- <GenerateSilverlightManifest>true</GenerateSilverlightManifest>
- <XapFilename>Google.ProtocolBuffersLite.Test.xap</XapFilename>
- <SilverlightManifestTemplate>Properties\AppManifest.xml</SilverlightManifestTemplate>
- <SilverlightAppEntry>Google.ProtocolBuffers.App</SilverlightAppEntry>
- <TestPageFileName>TestPage.html</TestPageFileName>
- <CreateTestPage>true</CreateTestPage>
- <OutOfBrowserSettingsFile>Properties\OutOfBrowserSettings.xml</OutOfBrowserSettingsFile>
- <EnableOutOfBrowser>true</EnableOutOfBrowser>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\SL40\Debug</OutputPath>
- <IntermediateOutputPath>obj\SL40\Debug\</IntermediateOutputPath>
- <DefineConstants>DEBUG;TRACE;$(EnvironmentFlavor);$(EnvironmentTemplate);NOSERIALIZABLE;NOSORTEDLIST</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoStdLib>true</NoStdLib>
- <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
- <NoConfig>true</NoConfig>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\SL40\Release</OutputPath>
- <IntermediateOutputPath>obj\SL40\Release\</IntermediateOutputPath>
- <DefineConstants>TRACE;$(EnvironmentFlavor);$(EnvironmentTemplate);NOSERIALIZABLE;NOSORTEDLIST</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoStdLib>true</NoStdLib>
- <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
- <NoConfig>true</NoConfig>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="mscorlib" />
- <Reference Include="System" />
- <Reference Include="System.Xml" />
- <Reference Include="System.Core" />
- <Reference Include="System.Windows" />
- <Reference Include="System.Windows.Browser" />
- </ItemGroup>
- <ItemGroup Condition=" '$(EnvironmentFlavor)' == 'CLIENTPROFILE' ">
- <Reference Include="nunit.framework">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\NUnit\lib\nunit.framework.dll</HintPath>
- </Reference>
- </ItemGroup>
- <ItemGroup Condition=" '$(EnvironmentFlavor)' != 'CLIENTPROFILE' ">
- <Reference Include="Microsoft.Silverlight.Testing, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\Microsoft.Silverlight.Testing\April2010\Microsoft.Silverlight.Testing.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\Microsoft.Silverlight.Testing\April2010\Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.dll</HintPath>
- </Reference>
- </ItemGroup>
- <ItemGroup>
- <Compile Include="..\..\lib\NUnit-config\Microsoft.VisualStudio.TestTools.cs">
- <Link>Microsoft.VisualStudio.TestTools.cs</Link>
- </Compile>
- <Compile Include="..\ProtocolBuffers.Test\Properties\AssemblyInfo.cs">
- <Link>Properties\AssemblyInfo.cs</Link>
- </Compile>
- <Compile Include="..\ProtocolBuffers.Test\SerializableAttribute.cs">
- <Link>SerializableAttribute.cs</Link>
- </Compile>
- <Compile Include="..\ProtocolBuffers.Test\TestRpcForMimeTypes.cs">
- <Link>TestRpcForMimeTypes.cs</Link>
- </Compile>
- <Compile Include="..\ProtocolBuffers.Test\TestRpcGenerator.cs">
- <Link>TestRpcGenerator.cs</Link>
- </Compile>
- <Compile Include="AbstractBuilderLiteTest.cs" />
- <Compile Include="AbstractMessageLiteTest.cs" />
- <Compile Include="ExtendableBuilderLiteTest.cs" />
- <Compile Include="ExtendableMessageLiteTest.cs" />
- <Compile Include="LiteTest.cs" />
- <Compile Include="SerializableLiteTest.cs" />
- <Compile Include="TestLiteByApi.cs" />
- <Compile Include="TestProtos\UnitTestExtrasLiteProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestImportLiteProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestLiteProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestRpcInteropLite.cs" />
- <Compile Include="TestUtil.cs" />
- <Compile Include="App.xaml.cs">
- <DependentUpon>App.xaml</DependentUpon>
- </Compile>
- <None Include="Properties\AppManifest.xml" />
- <None Include="Properties\OutOfBrowserSettings.xml" />
- <ApplicationDefinition Include="App.xaml">
- <Generator>MSBuild:Compile</Generator>
- <SubType>Designer</SubType>
- </ApplicationDefinition>
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\ProtocolBuffers.Serialization\ProtocolBuffersLite.Serialization.SL40.csproj">
- <Project>{E067A59D-9D0A-4A1F-92B1-38E4457241D1}</Project>
- <Name>ProtocolBuffersLite.Serialization</Name>
- </ProjectReference>
- <ProjectReference Include="..\ProtocolBuffers\ProtocolBuffersLite.SL40.csproj">
- <Project>{6969BDCE-D925-43F3-94AC-A531E6DF2591}</Project>
- <Name>ProtocolBuffersLite</Name>
- <Private>True</Private>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets" />
- <ProjectExtensions>
- <VisualStudio>
- <FlavorProperties GUID="{A1591282-1198-4647-A2B1-27E5FF5F6F3B}">
- <SilverlightProjectProperties>
- <StartAction>OfflineApplication</StartAction>
- </SilverlightProjectProperties>
- </FlavorProperties>
- </VisualStudio>
- </ProjectExtensions>
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
- <PropertyGroup Condition=" '$(EnvironmentFlavor)' == 'CLIENTPROFILE' ">
- <StartAction>Program</StartAction>
- <StartProgram>$(ProjectDir)..\..\lib\NUnit\tools\nunit-console.exe</StartProgram>
- <StartArguments>/nologo /noshadow /labels /wait $(AssemblyName).dll</StartArguments>
- <StartWorkingDirectory>$(ProjectDir)$(OutputPath)</StartWorkingDirectory>
- </PropertyGroup>
-</Project>
\ No newline at end of file
diff --git a/csharp/src/ProtocolBuffersLite.Test/ProtocolBuffersLite.Test.csproj b/csharp/src/ProtocolBuffersLite.Test/ProtocolBuffersLite.Test.csproj
index 7701543..8acc1fb 100644
--- a/csharp/src/ProtocolBuffersLite.Test/ProtocolBuffersLite.Test.csproj
+++ b/csharp/src/ProtocolBuffersLite.Test/ProtocolBuffersLite.Test.csproj
@@ -1,9 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="..\packages\xunit.runner.visualstudio.2.0.0\build\net20\xunit.runner.visualstudio.props" Condition="Exists('..\packages\xunit.runner.visualstudio.2.0.0\build\net20\xunit.runner.visualstudio.props')" />
+ <Import Project="..\packages\xunit.core.2.0.0\build\portable-net45+win+wpa81+wp80+monotouch+monoandroid+Xamarin.iOS\xunit.core.props" Condition="Exists('..\packages\xunit.core.2.0.0\build\portable-net45+win+wpa81+wp80+monotouch+monoandroid+Xamarin.iOS\xunit.core.props')" />
<PropertyGroup>
- <EnvironmentFlavor>CLIENTPROFILE</EnvironmentFlavor>
- <EnvironmentTemplate>NET35</EnvironmentTemplate>
- <EnvironmentProjectType>TEST</EnvironmentProjectType>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
@@ -13,62 +12,56 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Google.ProtocolBuffers</RootNamespace>
<AssemblyName>Google.ProtocolBuffersLite.Test</AssemblyName>
- <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\..\keys\Google.ProtocolBuffers.snk</AssemblyOriginatorKeyFile>
<OldToolsVersion>3.5</OldToolsVersion>
+ <TargetFrameworkProfile>
+ </TargetFrameworkProfile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
- <OutputPath>bin\NET35\Debug</OutputPath>
- <IntermediateOutputPath>obj\NET35\Debug\</IntermediateOutputPath>
+ <OutputPath>bin\Debug</OutputPath>
+ <IntermediateOutputPath>obj\Debug\</IntermediateOutputPath>
<DefineConstants>DEBUG;TRACE;$(EnvironmentFlavor);$(EnvironmentTemplate)</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<NoStdLib>true</NoStdLib>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
+ <Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
- <OutputPath>bin\NET35\Release</OutputPath>
- <IntermediateOutputPath>obj\NET35\Release\</IntermediateOutputPath>
+ <OutputPath>bin\Release</OutputPath>
+ <IntermediateOutputPath>obj\Release\</IntermediateOutputPath>
<DefineConstants>TRACE;$(EnvironmentFlavor);$(EnvironmentTemplate)</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<NoStdLib>true</NoStdLib>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
+ <Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="mscorlib" />
<Reference Include="System" />
<Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup Condition=" '$(EnvironmentFlavor)' == 'CLIENTPROFILE' ">
- <Reference Include="nunit.framework">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\NUnit\lib\nunit.framework.dll</HintPath>
+ <Reference Include="xunit.abstractions">
+ <HintPath>..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll</HintPath>
</Reference>
- </ItemGroup>
- <ItemGroup Condition=" '$(EnvironmentFlavor)' != 'CLIENTPROFILE' ">
- <Reference Include="Microsoft.Silverlight.Testing, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\Microsoft.Silverlight.Testing\April2010\Microsoft.Silverlight.Testing.dll</HintPath>
+ <Reference Include="xunit.assert">
+ <HintPath>..\packages\xunit.assert.2.0.0\lib\portable-net45+win+wpa81+wp80+monotouch+monoandroid+Xamarin.iOS\xunit.assert.dll</HintPath>
</Reference>
- <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\Microsoft.Silverlight.Testing\April2010\Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.dll</HintPath>
+ <Reference Include="xunit.core">
+ <HintPath>..\packages\xunit.extensibility.core.2.0.0\lib\portable-net45+win+wpa81+wp80+monotouch+monoandroid+Xamarin.iOS\xunit.core.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
- <Compile Include="..\..\lib\NUnit-config\Microsoft.VisualStudio.TestTools.cs">
- <Link>Microsoft.VisualStudio.TestTools.cs</Link>
- </Compile>
<Compile Include="..\ProtocolBuffers.Test\Properties\AssemblyInfo.cs">
<Link>Properties\AssemblyInfo.cs</Link>
</Compile>
@@ -82,7 +75,6 @@
<Compile Include="TestProtos\UnittestImportLite.cs" />
<Compile Include="TestProtos\UnittestImportPublicLite.cs" />
<Compile Include="TestProtos\UnittestLite.cs" />
- <Compile Include="TestUtil.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\ProtocolBuffers.Serialization\ProtocolBuffersLite.Serialization.csproj">
@@ -95,7 +87,9 @@
<Private>True</Private>
</ProjectReference>
</ItemGroup>
- <ItemGroup />
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
@@ -104,10 +98,11 @@
<Target Name="AfterBuild">
</Target>
-->
- <PropertyGroup Condition=" '$(EnvironmentFlavor)' == 'CLIENTPROFILE' ">
- <StartAction>Program</StartAction>
- <StartProgram>$(ProjectDir)..\..\lib\NUnit\tools\nunit-console.exe</StartProgram>
- <StartArguments>/nologo /noshadow /labels /wait $(AssemblyName).dll</StartArguments>
- <StartWorkingDirectory>$(ProjectDir)$(OutputPath)</StartWorkingDirectory>
- </PropertyGroup>
+ <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
+ <PropertyGroup>
+ <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
+ </PropertyGroup>
+ <Error Condition="!Exists('..\packages\xunit.core.2.0.0\build\portable-net45+win+wpa81+wp80+monotouch+monoandroid+Xamarin.iOS\xunit.core.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\xunit.core.2.0.0\build\portable-net45+win+wpa81+wp80+monotouch+monoandroid+Xamarin.iOS\xunit.core.props'))" />
+ <Error Condition="!Exists('..\packages\xunit.runner.visualstudio.2.0.0\build\net20\xunit.runner.visualstudio.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\xunit.runner.visualstudio.2.0.0\build\net20\xunit.runner.visualstudio.props'))" />
+ </Target>
</Project>
\ No newline at end of file
diff --git a/csharp/src/ProtocolBuffersLite.Test/ProtocolBuffersLiteMixed.Test.CF20.csproj b/csharp/src/ProtocolBuffersLite.Test/ProtocolBuffersLiteMixed.Test.CF20.csproj
deleted file mode 100644
index 0ed3b36..0000000
--- a/csharp/src/ProtocolBuffersLite.Test/ProtocolBuffersLiteMixed.Test.CF20.csproj
+++ /dev/null
@@ -1,126 +0,0 @@
-<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <EnvironmentFlavor>COMPACT_FRAMEWORK</EnvironmentFlavor>
- <EnvironmentTemplate>CF20</EnvironmentTemplate>
- <EnvironmentProjectType>TEST</EnvironmentProjectType>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{EEFFED24-3750-4567-9A23-1DB676A15610}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>Google.ProtocolBuffers</RootNamespace>
- <AssemblyName>Google.ProtocolBuffersMixedLite.Test</AssemblyName>
- <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- <SignAssembly>true</SignAssembly>
- <AssemblyOriginatorKeyFile>..\..\keys\Google.ProtocolBuffers.snk</AssemblyOriginatorKeyFile>
- <OldToolsVersion>3.5</OldToolsVersion>
- <ProjectTypeGuids>{4D628B5B-2FBC-4AA6-8C16-197242AEB884};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
- <PlatformFamilyName>Smartphone</PlatformFamilyName>
- <PlatformID>f27da329-3269-4191-98e0-c87d3d7f1db9</PlatformID>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\CF20\Debug</OutputPath>
- <IntermediateOutputPath>obj\CF20\Debug\</IntermediateOutputPath>
- <DefineConstants>DEBUG;TRACE;$(EnvironmentFlavor);$(EnvironmentTemplate);NOSERIALIZABLE;NOFILEVERSION;NOEXTENSIONS</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoStdLib>true</NoStdLib>
- <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
- <NoConfig>true</NoConfig>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\CF20\Release</OutputPath>
- <IntermediateOutputPath>obj\CF20\Release\</IntermediateOutputPath>
- <DefineConstants>TRACE;$(EnvironmentFlavor);$(EnvironmentTemplate);NOSERIALIZABLE;NOFILEVERSION;NOEXTENSIONS</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoStdLib>true</NoStdLib>
- <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
- <NoConfig>true</NoConfig>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="mscorlib" />
- <Reference Include="System" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup Condition=" '$(EnvironmentFlavor)' == 'CLIENTPROFILE' ">
- <Reference Include="nunit.framework">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\NUnit\lib\nunit.framework.dll</HintPath>
- </Reference>
- </ItemGroup>
- <ItemGroup Condition=" '$(EnvironmentFlavor)' != 'CLIENTPROFILE' ">
- <Reference Include="Microsoft.Silverlight.Testing, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\Microsoft.Silverlight.Testing\April2010\Microsoft.Silverlight.Testing.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\Microsoft.Silverlight.Testing\April2010\Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.dll</HintPath>
- </Reference>
- </ItemGroup>
- <ItemGroup>
- <Compile Include="..\..\lib\NUnit-config\Microsoft.VisualStudio.TestTools.cs">
- <Link>Microsoft.VisualStudio.TestTools.cs</Link>
- </Compile>
- <Compile Include="..\ProtocolBuffers.Test\Properties\AssemblyInfo.cs">
- <Link>Properties\AssemblyInfo.cs</Link>
- </Compile>
- <Compile Include="..\ProtocolBuffers.Test\SerializableAttribute.cs">
- <Link>SerializableAttribute.cs</Link>
- </Compile>
- <Compile Include="AbstractBuilderLiteTest.cs" />
- <Compile Include="AbstractMessageLiteTest.cs" />
- <Compile Include="ExtendableBuilderLiteTest.cs" />
- <Compile Include="ExtendableMessageLiteTest.cs" />
- <Compile Include="InteropLiteTest.cs" />
- <Compile Include="LiteTest.cs" />
- <Compile Include="MissingFieldAndExtensionTest.cs" />
- <Compile Include="TestLiteByApi.cs" />
- <Compile Include="TestProtos\UnitTestExtrasFullProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestExtrasLiteProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestImportLiteProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestImportProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestLiteImportNonLiteProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestLiteProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestProtoFile.cs" />
- <Compile Include="TestUtil.cs" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\ProtocolBuffers\ProtocolBuffers.CF20.csproj">
- <Project>{6908BDCE-D925-43F3-94AC-A531E6DF2591}</Project>
- <Name>ProtocolBuffers</Name>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets" />
- <ProjectExtensions>
- <VisualStudio>
- <FlavorProperties GUID="{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}">
- <HostingProcess disable="1" />
- </FlavorProperties>
- </VisualStudio>
- </ProjectExtensions>
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
- <PropertyGroup Condition=" '$(EnvironmentFlavor)' == 'CLIENTPROFILE' ">
- <StartAction>Program</StartAction>
- <StartProgram>$(ProjectDir)..\..\lib\NUnit\tools\nunit-console.exe</StartProgram>
- <StartArguments>/nologo /noshadow /labels /wait $(AssemblyName).dll</StartArguments>
- <StartWorkingDirectory>$(ProjectDir)$(OutputPath)</StartWorkingDirectory>
- </PropertyGroup>
-</Project>
\ No newline at end of file
diff --git a/csharp/src/ProtocolBuffersLite.Test/ProtocolBuffersLiteMixed.Test.CF35.csproj b/csharp/src/ProtocolBuffersLite.Test/ProtocolBuffersLiteMixed.Test.CF35.csproj
deleted file mode 100644
index 50d4e64..0000000
--- a/csharp/src/ProtocolBuffersLite.Test/ProtocolBuffersLiteMixed.Test.CF35.csproj
+++ /dev/null
@@ -1,127 +0,0 @@
-<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <EnvironmentFlavor>COMPACT_FRAMEWORK</EnvironmentFlavor>
- <EnvironmentTemplate>CF35</EnvironmentTemplate>
- <EnvironmentProjectType>TEST</EnvironmentProjectType>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{EEFFED24-3750-4567-9A23-1DB676A15610}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>Google.ProtocolBuffers</RootNamespace>
- <AssemblyName>Google.ProtocolBuffersMixedLite.Test</AssemblyName>
- <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- <SignAssembly>true</SignAssembly>
- <AssemblyOriginatorKeyFile>..\..\keys\Google.ProtocolBuffers.snk</AssemblyOriginatorKeyFile>
- <OldToolsVersion>3.5</OldToolsVersion>
- <ProjectTypeGuids>{4D628B5B-2FBC-4AA6-8C16-197242AEB884};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
- <PlatformFamilyName>Smartphone</PlatformFamilyName>
- <PlatformID>f27da329-3269-4191-98e0-c87d3d7f1db9</PlatformID>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\CF35\Debug</OutputPath>
- <IntermediateOutputPath>obj\CF35\Debug\</IntermediateOutputPath>
- <DefineConstants>DEBUG;TRACE;$(EnvironmentFlavor);$(EnvironmentTemplate);NOSERIALIZABLE;NOFILEVERSION</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoStdLib>true</NoStdLib>
- <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
- <NoConfig>true</NoConfig>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\CF35\Release</OutputPath>
- <IntermediateOutputPath>obj\CF35\Release\</IntermediateOutputPath>
- <DefineConstants>TRACE;$(EnvironmentFlavor);$(EnvironmentTemplate);NOSERIALIZABLE;NOFILEVERSION</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoStdLib>true</NoStdLib>
- <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
- <NoConfig>true</NoConfig>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="mscorlib" />
- <Reference Include="System" />
- <Reference Include="System.Xml" />
- <Reference Include="System.Core" />
- </ItemGroup>
- <ItemGroup Condition=" '$(EnvironmentFlavor)' == 'CLIENTPROFILE' ">
- <Reference Include="nunit.framework">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\NUnit\lib\nunit.framework.dll</HintPath>
- </Reference>
- </ItemGroup>
- <ItemGroup Condition=" '$(EnvironmentFlavor)' != 'CLIENTPROFILE' ">
- <Reference Include="Microsoft.Silverlight.Testing, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\Microsoft.Silverlight.Testing\April2010\Microsoft.Silverlight.Testing.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\Microsoft.Silverlight.Testing\April2010\Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.dll</HintPath>
- </Reference>
- </ItemGroup>
- <ItemGroup>
- <Compile Include="..\..\lib\NUnit-config\Microsoft.VisualStudio.TestTools.cs">
- <Link>Microsoft.VisualStudio.TestTools.cs</Link>
- </Compile>
- <Compile Include="..\ProtocolBuffers.Test\Properties\AssemblyInfo.cs">
- <Link>Properties\AssemblyInfo.cs</Link>
- </Compile>
- <Compile Include="..\ProtocolBuffers.Test\SerializableAttribute.cs">
- <Link>SerializableAttribute.cs</Link>
- </Compile>
- <Compile Include="AbstractBuilderLiteTest.cs" />
- <Compile Include="AbstractMessageLiteTest.cs" />
- <Compile Include="ExtendableBuilderLiteTest.cs" />
- <Compile Include="ExtendableMessageLiteTest.cs" />
- <Compile Include="InteropLiteTest.cs" />
- <Compile Include="LiteTest.cs" />
- <Compile Include="MissingFieldAndExtensionTest.cs" />
- <Compile Include="TestLiteByApi.cs" />
- <Compile Include="TestProtos\UnitTestExtrasFullProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestExtrasLiteProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestImportLiteProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestImportProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestLiteImportNonLiteProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestLiteProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestProtoFile.cs" />
- <Compile Include="TestUtil.cs" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\ProtocolBuffers\ProtocolBuffers.CF35.csproj">
- <Project>{6908BDCE-D925-43F3-94AC-A531E6DF2591}</Project>
- <Name>ProtocolBuffers</Name>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets" />
- <ProjectExtensions>
- <VisualStudio>
- <FlavorProperties GUID="{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}">
- <HostingProcess disable="1" />
- </FlavorProperties>
- </VisualStudio>
- </ProjectExtensions>
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
- <PropertyGroup Condition=" '$(EnvironmentFlavor)' == 'CLIENTPROFILE' ">
- <StartAction>Program</StartAction>
- <StartProgram>$(ProjectDir)..\..\lib\NUnit\tools\nunit-console.exe</StartProgram>
- <StartArguments>/nologo /noshadow /labels /wait $(AssemblyName).dll</StartArguments>
- <StartWorkingDirectory>$(ProjectDir)$(OutputPath)</StartWorkingDirectory>
- </PropertyGroup>
-</Project>
\ No newline at end of file
diff --git a/csharp/src/ProtocolBuffersLite.Test/ProtocolBuffersLiteMixed.Test.NET20.csproj b/csharp/src/ProtocolBuffersLite.Test/ProtocolBuffersLiteMixed.Test.NET20.csproj
deleted file mode 100644
index 80593a4..0000000
--- a/csharp/src/ProtocolBuffersLite.Test/ProtocolBuffersLiteMixed.Test.NET20.csproj
+++ /dev/null
@@ -1,114 +0,0 @@
-<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <EnvironmentFlavor>CLIENTPROFILE</EnvironmentFlavor>
- <EnvironmentTemplate>NET20</EnvironmentTemplate>
- <EnvironmentProjectType>TEST</EnvironmentProjectType>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{EEFFED24-3750-4567-9A23-1DB676A15610}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>Google.ProtocolBuffers</RootNamespace>
- <AssemblyName>Google.ProtocolBuffersMixedLite.Test</AssemblyName>
- <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- <SignAssembly>true</SignAssembly>
- <AssemblyOriginatorKeyFile>..\..\keys\Google.ProtocolBuffers.snk</AssemblyOriginatorKeyFile>
- <OldToolsVersion>3.5</OldToolsVersion>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\NET20\Debug</OutputPath>
- <IntermediateOutputPath>obj\NET20\Debug\</IntermediateOutputPath>
- <DefineConstants>DEBUG;TRACE;$(EnvironmentFlavor);$(EnvironmentTemplate);NOEXTENSIONS</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoStdLib>true</NoStdLib>
- <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\NET20\Release</OutputPath>
- <IntermediateOutputPath>obj\NET20\Release\</IntermediateOutputPath>
- <DefineConstants>TRACE;$(EnvironmentFlavor);$(EnvironmentTemplate);NOEXTENSIONS</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoStdLib>true</NoStdLib>
- <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="mscorlib" />
- <Reference Include="System" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup Condition=" '$(EnvironmentFlavor)' == 'CLIENTPROFILE' ">
- <Reference Include="nunit.framework">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\NUnit\lib\nunit.framework.dll</HintPath>
- </Reference>
- </ItemGroup>
- <ItemGroup Condition=" '$(EnvironmentFlavor)' != 'CLIENTPROFILE' ">
- <Reference Include="Microsoft.Silverlight.Testing, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\Microsoft.Silverlight.Testing\April2010\Microsoft.Silverlight.Testing.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\Microsoft.Silverlight.Testing\April2010\Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.dll</HintPath>
- </Reference>
- </ItemGroup>
- <ItemGroup>
- <Compile Include="..\..\lib\NUnit-config\Microsoft.VisualStudio.TestTools.cs">
- <Link>Microsoft.VisualStudio.TestTools.cs</Link>
- </Compile>
- <Compile Include="..\ProtocolBuffers.Test\Properties\AssemblyInfo.cs">
- <Link>Properties\AssemblyInfo.cs</Link>
- </Compile>
- <Compile Include="..\ProtocolBuffers.Test\SerializableAttribute.cs">
- <Link>SerializableAttribute.cs</Link>
- </Compile>
- <Compile Include="AbstractBuilderLiteTest.cs" />
- <Compile Include="AbstractMessageLiteTest.cs" />
- <Compile Include="ExtendableBuilderLiteTest.cs" />
- <Compile Include="ExtendableMessageLiteTest.cs" />
- <Compile Include="InteropLiteTest.cs" />
- <Compile Include="LiteTest.cs" />
- <Compile Include="MissingFieldAndExtensionTest.cs" />
- <Compile Include="TestLiteByApi.cs" />
- <Compile Include="TestProtos\UnitTestExtrasFullProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestExtrasLiteProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestImportLiteProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestImportProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestLiteImportNonLiteProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestLiteProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestProtoFile.cs" />
- <Compile Include="TestUtil.cs" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\ProtocolBuffers\ProtocolBuffers.NET20.csproj">
- <Project>{6908BDCE-D925-43F3-94AC-A531E6DF2591}</Project>
- <Name>ProtocolBuffers</Name>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
- <PropertyGroup Condition=" '$(EnvironmentFlavor)' == 'CLIENTPROFILE' ">
- <StartAction>Program</StartAction>
- <StartProgram>$(ProjectDir)..\..\lib\NUnit\tools\nunit-console.exe</StartProgram>
- <StartArguments>/nologo /noshadow /labels /wait $(AssemblyName).dll</StartArguments>
- <StartWorkingDirectory>$(ProjectDir)$(OutputPath)</StartWorkingDirectory>
- </PropertyGroup>
-</Project>
\ No newline at end of file
diff --git a/csharp/src/ProtocolBuffersLite.Test/ProtocolBuffersLiteMixed.Test.NET35.csproj b/csharp/src/ProtocolBuffersLite.Test/ProtocolBuffersLiteMixed.Test.NET35.csproj
deleted file mode 100644
index e8b6d09..0000000
--- a/csharp/src/ProtocolBuffersLite.Test/ProtocolBuffersLiteMixed.Test.NET35.csproj
+++ /dev/null
@@ -1,115 +0,0 @@
-<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <EnvironmentFlavor>CLIENTPROFILE</EnvironmentFlavor>
- <EnvironmentTemplate>NET35</EnvironmentTemplate>
- <EnvironmentProjectType>TEST</EnvironmentProjectType>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{EEFFED24-3750-4567-9A23-1DB676A15610}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>Google.ProtocolBuffers</RootNamespace>
- <AssemblyName>Google.ProtocolBuffersMixedLite.Test</AssemblyName>
- <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- <SignAssembly>true</SignAssembly>
- <AssemblyOriginatorKeyFile>..\..\keys\Google.ProtocolBuffers.snk</AssemblyOriginatorKeyFile>
- <OldToolsVersion>3.5</OldToolsVersion>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\NET35\Debug</OutputPath>
- <IntermediateOutputPath>obj\NET35\Debug\</IntermediateOutputPath>
- <DefineConstants>DEBUG;TRACE;$(EnvironmentFlavor);$(EnvironmentTemplate)</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoStdLib>true</NoStdLib>
- <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\NET35\Release</OutputPath>
- <IntermediateOutputPath>obj\NET35\Release\</IntermediateOutputPath>
- <DefineConstants>TRACE;$(EnvironmentFlavor);$(EnvironmentTemplate)</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoStdLib>true</NoStdLib>
- <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="mscorlib" />
- <Reference Include="System" />
- <Reference Include="System.Xml" />
- <Reference Include="System.Core" />
- </ItemGroup>
- <ItemGroup Condition=" '$(EnvironmentFlavor)' == 'CLIENTPROFILE' ">
- <Reference Include="nunit.framework">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\NUnit\lib\nunit.framework.dll</HintPath>
- </Reference>
- </ItemGroup>
- <ItemGroup Condition=" '$(EnvironmentFlavor)' != 'CLIENTPROFILE' ">
- <Reference Include="Microsoft.Silverlight.Testing, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\Microsoft.Silverlight.Testing\April2010\Microsoft.Silverlight.Testing.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\Microsoft.Silverlight.Testing\April2010\Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.dll</HintPath>
- </Reference>
- </ItemGroup>
- <ItemGroup>
- <Compile Include="..\..\lib\NUnit-config\Microsoft.VisualStudio.TestTools.cs">
- <Link>Microsoft.VisualStudio.TestTools.cs</Link>
- </Compile>
- <Compile Include="..\ProtocolBuffers.Test\Properties\AssemblyInfo.cs">
- <Link>Properties\AssemblyInfo.cs</Link>
- </Compile>
- <Compile Include="..\ProtocolBuffers.Test\SerializableAttribute.cs">
- <Link>SerializableAttribute.cs</Link>
- </Compile>
- <Compile Include="AbstractBuilderLiteTest.cs" />
- <Compile Include="AbstractMessageLiteTest.cs" />
- <Compile Include="ExtendableBuilderLiteTest.cs" />
- <Compile Include="ExtendableMessageLiteTest.cs" />
- <Compile Include="InteropLiteTest.cs" />
- <Compile Include="LiteTest.cs" />
- <Compile Include="MissingFieldAndExtensionTest.cs" />
- <Compile Include="TestLiteByApi.cs" />
- <Compile Include="TestProtos\UnitTestExtrasFullProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestExtrasLiteProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestImportLiteProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestImportProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestLiteImportNonLiteProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestLiteProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestProtoFile.cs" />
- <Compile Include="TestUtil.cs" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\ProtocolBuffers\ProtocolBuffers.NET35.csproj">
- <Project>{6908BDCE-D925-43F3-94AC-A531E6DF2591}</Project>
- <Name>ProtocolBuffers</Name>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
- <PropertyGroup Condition=" '$(EnvironmentFlavor)' == 'CLIENTPROFILE' ">
- <StartAction>Program</StartAction>
- <StartProgram>$(ProjectDir)..\..\lib\NUnit\tools\nunit-console.exe</StartProgram>
- <StartArguments>/nologo /noshadow /labels /wait $(AssemblyName).dll</StartArguments>
- <StartWorkingDirectory>$(ProjectDir)$(OutputPath)</StartWorkingDirectory>
- </PropertyGroup>
-</Project>
\ No newline at end of file
diff --git a/csharp/src/ProtocolBuffersLite.Test/ProtocolBuffersLiteMixed.Test.NET40.csproj b/csharp/src/ProtocolBuffersLite.Test/ProtocolBuffersLiteMixed.Test.NET40.csproj
deleted file mode 100644
index 16ffefd..0000000
--- a/csharp/src/ProtocolBuffersLite.Test/ProtocolBuffersLiteMixed.Test.NET40.csproj
+++ /dev/null
@@ -1,115 +0,0 @@
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <EnvironmentFlavor>CLIENTPROFILE</EnvironmentFlavor>
- <EnvironmentTemplate>NET40</EnvironmentTemplate>
- <EnvironmentProjectType>TEST</EnvironmentProjectType>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{EEFFED24-3750-4567-9A23-1DB676A15610}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>Google.ProtocolBuffers</RootNamespace>
- <AssemblyName>Google.ProtocolBuffersMixedLite.Test</AssemblyName>
- <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- <SignAssembly>true</SignAssembly>
- <AssemblyOriginatorKeyFile>..\..\keys\Google.ProtocolBuffers.snk</AssemblyOriginatorKeyFile>
- <OldToolsVersion>3.5</OldToolsVersion>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\NET40\Debug</OutputPath>
- <IntermediateOutputPath>obj\NET40\Debug\</IntermediateOutputPath>
- <DefineConstants>DEBUG;TRACE;$(EnvironmentFlavor);$(EnvironmentTemplate)</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoStdLib>true</NoStdLib>
- <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\NET40\Release</OutputPath>
- <IntermediateOutputPath>obj\NET40\Release\</IntermediateOutputPath>
- <DefineConstants>TRACE;$(EnvironmentFlavor);$(EnvironmentTemplate)</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoStdLib>true</NoStdLib>
- <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="mscorlib" />
- <Reference Include="System" />
- <Reference Include="System.Xml" />
- <Reference Include="System.Core" />
- </ItemGroup>
- <ItemGroup Condition=" '$(EnvironmentFlavor)' == 'CLIENTPROFILE' ">
- <Reference Include="nunit.framework">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\NUnit\lib\nunit.framework.dll</HintPath>
- </Reference>
- </ItemGroup>
- <ItemGroup Condition=" '$(EnvironmentFlavor)' != 'CLIENTPROFILE' ">
- <Reference Include="Microsoft.Silverlight.Testing, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\Microsoft.Silverlight.Testing\April2010\Microsoft.Silverlight.Testing.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\Microsoft.Silverlight.Testing\April2010\Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.dll</HintPath>
- </Reference>
- </ItemGroup>
- <ItemGroup>
- <Compile Include="..\..\lib\NUnit-config\Microsoft.VisualStudio.TestTools.cs">
- <Link>Microsoft.VisualStudio.TestTools.cs</Link>
- </Compile>
- <Compile Include="..\ProtocolBuffers.Test\Properties\AssemblyInfo.cs">
- <Link>Properties\AssemblyInfo.cs</Link>
- </Compile>
- <Compile Include="..\ProtocolBuffers.Test\SerializableAttribute.cs">
- <Link>SerializableAttribute.cs</Link>
- </Compile>
- <Compile Include="AbstractBuilderLiteTest.cs" />
- <Compile Include="AbstractMessageLiteTest.cs" />
- <Compile Include="ExtendableBuilderLiteTest.cs" />
- <Compile Include="ExtendableMessageLiteTest.cs" />
- <Compile Include="InteropLiteTest.cs" />
- <Compile Include="LiteTest.cs" />
- <Compile Include="MissingFieldAndExtensionTest.cs" />
- <Compile Include="TestLiteByApi.cs" />
- <Compile Include="TestProtos\UnitTestExtrasFullProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestExtrasLiteProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestImportLiteProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestImportProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestLiteImportNonLiteProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestLiteProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestProtoFile.cs" />
- <Compile Include="TestUtil.cs" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\ProtocolBuffers\ProtocolBuffers.NET40.csproj">
- <Project>{6908BDCE-D925-43F3-94AC-A531E6DF2591}</Project>
- <Name>ProtocolBuffers</Name>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
- <PropertyGroup Condition=" '$(EnvironmentFlavor)' == 'CLIENTPROFILE' ">
- <StartAction>Program</StartAction>
- <StartProgram>$(ProjectDir)..\..\lib\NUnit\tools\nunit-console.exe</StartProgram>
- <StartArguments>/nologo /noshadow /labels /wait $(AssemblyName).dll</StartArguments>
- <StartWorkingDirectory>$(ProjectDir)$(OutputPath)</StartWorkingDirectory>
- </PropertyGroup>
-</Project>
\ No newline at end of file
diff --git a/csharp/src/ProtocolBuffersLite.Test/ProtocolBuffersLiteMixed.Test.PL40.csproj b/csharp/src/ProtocolBuffersLite.Test/ProtocolBuffersLiteMixed.Test.PL40.csproj
deleted file mode 100644
index 3d1a77b..0000000
--- a/csharp/src/ProtocolBuffersLite.Test/ProtocolBuffersLiteMixed.Test.PL40.csproj
+++ /dev/null
@@ -1,149 +0,0 @@
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" xmlns:cs="urn:schemas-csharp-project:template">
- <PropertyGroup>
- <EnvironmentFlavor>PORTABLE_LIBRARY</EnvironmentFlavor>
- <EnvironmentTemplate>PL40</EnvironmentTemplate>
- <EnvironmentProjectType>TEST</EnvironmentProjectType>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{EEFFED24-3750-4567-9A23-1DB676A15610}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>Google.ProtocolBuffers</RootNamespace>
- <AssemblyName>Google.ProtocolBuffersMixedLite.Test</AssemblyName>
- <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- <SignAssembly>true</SignAssembly>
- <AssemblyOriginatorKeyFile>..\..\keys\Google.ProtocolBuffers.snk</AssemblyOriginatorKeyFile>
- <OldToolsVersion>3.5</OldToolsVersion>
- <MinimumVisualStudioVersion>10.0</MinimumVisualStudioVersion>
- <ProjectTypeGuids>{A1591282-1198-4647-A2B1-27E5FF5F6F3B};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
- <TargetFrameworkProfile />
- <ValidateXaml>false</ValidateXaml>
- <ThrowErrorsInValidation>false</ThrowErrorsInValidation>
- <SilverlightApplication>true</SilverlightApplication>
- <XapOutputs>true</XapOutputs>
- <GenerateSilverlightManifest>true</GenerateSilverlightManifest>
- <XapFilename>Google.ProtocolBuffersMixedLite.Test.xap</XapFilename>
- <SilverlightManifestTemplate>Properties\AppManifest.xml</SilverlightManifestTemplate>
- <SilverlightAppEntry>Google.ProtocolBuffers.App</SilverlightAppEntry>
- <TestPageFileName>TestPage.html</TestPageFileName>
- <CreateTestPage>true</CreateTestPage>
- <SilverlightVersion>v4.0</SilverlightVersion>
- <OutOfBrowserSettingsFile>Properties\OutOfBrowserSettings.xml</OutOfBrowserSettingsFile>
- <EnableOutOfBrowser>true</EnableOutOfBrowser>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\PL40\Debug</OutputPath>
- <IntermediateOutputPath>obj\PL40\Debug\</IntermediateOutputPath>
- <DefineConstants>DEBUG;TRACE;$(EnvironmentFlavor);$(EnvironmentTemplate);NOSERIALIZABLE;NOSORTEDLIST</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoStdLib>true</NoStdLib>
- <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\PL40\Release</OutputPath>
- <IntermediateOutputPath>obj\PL40\Release\</IntermediateOutputPath>
- <DefineConstants>TRACE;$(EnvironmentFlavor);$(EnvironmentTemplate);NOSERIALIZABLE;NOSORTEDLIST</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoStdLib>true</NoStdLib>
- <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="mscorlib" />
- <Reference Include="System" />
- <Reference Include="System.Xml" />
- <Reference Include="System.Core" />
- <Reference Include="System.Windows" />
- <Reference Include="System.Windows.Browser" />
- </ItemGroup>
- <ItemGroup Condition=" '$(EnvironmentFlavor)' == 'CLIENTPROFILE' ">
- <Reference Include="nunit.framework">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\NUnit\lib\nunit.framework.dll</HintPath>
- </Reference>
- </ItemGroup>
- <ItemGroup Condition=" '$(EnvironmentFlavor)' != 'CLIENTPROFILE' ">
- <Reference Include="Microsoft.Silverlight.Testing, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\Microsoft.Silverlight.Testing\April2010\Microsoft.Silverlight.Testing.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\Microsoft.Silverlight.Testing\April2010\Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.dll</HintPath>
- </Reference>
- </ItemGroup>
- <ItemGroup>
- <Compile Include="..\..\lib\NUnit-config\Microsoft.VisualStudio.TestTools.cs">
- <Link>Microsoft.VisualStudio.TestTools.cs</Link>
- </Compile>
- <Compile Include="..\ProtocolBuffers.Test\Properties\AssemblyInfo.cs">
- <Link>Properties\AssemblyInfo.cs</Link>
- </Compile>
- <Compile Include="..\ProtocolBuffers.Test\SerializableAttribute.cs">
- <Link>SerializableAttribute.cs</Link>
- </Compile>
- <Compile Include="AbstractBuilderLiteTest.cs" />
- <Compile Include="AbstractMessageLiteTest.cs" />
- <Compile Include="ExtendableBuilderLiteTest.cs" />
- <Compile Include="ExtendableMessageLiteTest.cs" />
- <Compile Include="InteropLiteTest.cs" />
- <Compile Include="LiteTest.cs" />
- <Compile Include="MissingFieldAndExtensionTest.cs" />
- <Compile Include="TestLiteByApi.cs" />
- <Compile Include="TestProtos\UnitTestExtrasFullProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestExtrasLiteProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestImportLiteProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestImportProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestLiteImportNonLiteProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestLiteProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestProtoFile.cs" />
- <Compile Include="TestUtil.cs" />
- <Compile Include="App.xaml.cs">
- <DependentUpon>App.xaml</DependentUpon>
- </Compile>
- <None Include="Properties\AppManifest.xml" />
- <None Include="Properties\OutOfBrowserSettings.xml" />
- <ApplicationDefinition Include="App.xaml">
- <Generator>MSBuild:Compile</Generator>
- <SubType>Designer</SubType>
- </ApplicationDefinition>
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\ProtocolBuffers\ProtocolBuffers.PL40.csproj">
- <Project>{6908BDCE-D925-43F3-94AC-A531E6DF2591}</Project>
- <Name>ProtocolBuffers</Name>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets" />
- <ProjectExtensions>
- <VisualStudio>
- <FlavorProperties GUID="{A1591282-1198-4647-A2B1-27E5FF5F6F3B}">
- <SilverlightProjectProperties />
- </FlavorProperties>
- </VisualStudio>
- </ProjectExtensions>
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
- <PropertyGroup Condition=" '$(EnvironmentFlavor)' == 'CLIENTPROFILE' ">
- <StartAction>Program</StartAction>
- <StartProgram>$(ProjectDir)..\..\lib\NUnit\tools\nunit-console.exe</StartProgram>
- <StartArguments>/nologo /noshadow /labels /wait $(AssemblyName).dll</StartArguments>
- <StartWorkingDirectory>$(ProjectDir)$(OutputPath)</StartWorkingDirectory>
- </PropertyGroup>
-</Project>
\ No newline at end of file
diff --git a/csharp/src/ProtocolBuffersLite.Test/ProtocolBuffersLiteMixed.Test.SL20.csproj b/csharp/src/ProtocolBuffersLite.Test/ProtocolBuffersLiteMixed.Test.SL20.csproj
deleted file mode 100644
index 22b2c27..0000000
--- a/csharp/src/ProtocolBuffersLite.Test/ProtocolBuffersLiteMixed.Test.SL20.csproj
+++ /dev/null
@@ -1,150 +0,0 @@
-<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" xmlns:cs="urn:schemas-csharp-project:template">
- <PropertyGroup>
- <EnvironmentFlavor>SILVERLIGHT</EnvironmentFlavor>
- <EnvironmentTemplate>SL20</EnvironmentTemplate>
- <EnvironmentProjectType>TEST</EnvironmentProjectType>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{EEFFED24-3750-4567-9A23-1DB676A15610}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>Google.ProtocolBuffers</RootNamespace>
- <AssemblyName>Google.ProtocolBuffersMixedLite.Test</AssemblyName>
- <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- <SignAssembly>true</SignAssembly>
- <AssemblyOriginatorKeyFile>..\..\keys\Google.ProtocolBuffers.snk</AssemblyOriginatorKeyFile>
- <OldToolsVersion>3.5</OldToolsVersion>
- <ProjectTypeGuids>{A1591282-1198-4647-A2B1-27E5FF5F6F3B};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
- <SilverlightApplication>true</SilverlightApplication>
- <ValidateXaml>false</ValidateXaml>
- <ThrowErrorsInValidation>false</ThrowErrorsInValidation>
- <XapOutputs>true</XapOutputs>
- <GenerateSilverlightManifest>true</GenerateSilverlightManifest>
- <XapFilename>Google.ProtocolBuffersMixedLite.Test.xap</XapFilename>
- <SilverlightManifestTemplate>Properties\AppManifest.xml</SilverlightManifestTemplate>
- <SilverlightAppEntry>Google.ProtocolBuffers.App</SilverlightAppEntry>
- <TestPageFileName>TestPage.html</TestPageFileName>
- <CreateTestPage>true</CreateTestPage>
- <SilverlightVersion>v2.0</SilverlightVersion>
- <OutOfBrowserSettingsFile>Properties\OutOfBrowserSettings.xml</OutOfBrowserSettingsFile>
- <EnableOutOfBrowser>true</EnableOutOfBrowser>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\SL20\Debug</OutputPath>
- <IntermediateOutputPath>obj\SL20\Debug\</IntermediateOutputPath>
- <DefineConstants>DEBUG;TRACE;$(EnvironmentFlavor);$(EnvironmentTemplate);NOSERIALIZABLE;NOSORTEDLIST;NOEXTENSIONS</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoStdLib>true</NoStdLib>
- <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
- <NoConfig>true</NoConfig>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\SL20\Release</OutputPath>
- <IntermediateOutputPath>obj\SL20\Release\</IntermediateOutputPath>
- <DefineConstants>TRACE;$(EnvironmentFlavor);$(EnvironmentTemplate);NOSERIALIZABLE;NOSORTEDLIST;NOEXTENSIONS</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoStdLib>true</NoStdLib>
- <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
- <NoConfig>true</NoConfig>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="mscorlib" />
- <Reference Include="System" />
- <Reference Include="System.Xml" />
- <Reference Include="System.Windows" />
- <Reference Include="System.Windows.Browser" />
- </ItemGroup>
- <ItemGroup Condition=" '$(EnvironmentFlavor)' == 'CLIENTPROFILE' ">
- <Reference Include="nunit.framework">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\NUnit\lib\nunit.framework.dll</HintPath>
- </Reference>
- </ItemGroup>
- <ItemGroup Condition=" '$(EnvironmentFlavor)' != 'CLIENTPROFILE' ">
- <Reference Include="Microsoft.Silverlight.Testing, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\Microsoft.Silverlight.Testing\April2010\Microsoft.Silverlight.Testing.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\Microsoft.Silverlight.Testing\April2010\Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.dll</HintPath>
- </Reference>
- </ItemGroup>
- <ItemGroup>
- <Compile Include="..\..\lib\NUnit-config\Microsoft.VisualStudio.TestTools.cs">
- <Link>Microsoft.VisualStudio.TestTools.cs</Link>
- </Compile>
- <Compile Include="..\ProtocolBuffers.Test\Properties\AssemblyInfo.cs">
- <Link>Properties\AssemblyInfo.cs</Link>
- </Compile>
- <Compile Include="..\ProtocolBuffers.Test\SerializableAttribute.cs">
- <Link>SerializableAttribute.cs</Link>
- </Compile>
- <Compile Include="AbstractBuilderLiteTest.cs" />
- <Compile Include="AbstractMessageLiteTest.cs" />
- <Compile Include="ExtendableBuilderLiteTest.cs" />
- <Compile Include="ExtendableMessageLiteTest.cs" />
- <Compile Include="InteropLiteTest.cs" />
- <Compile Include="LiteTest.cs" />
- <Compile Include="MissingFieldAndExtensionTest.cs" />
- <Compile Include="TestLiteByApi.cs" />
- <Compile Include="TestProtos\UnitTestExtrasFullProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestExtrasLiteProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestImportLiteProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestImportProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestLiteImportNonLiteProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestLiteProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestProtoFile.cs" />
- <Compile Include="TestUtil.cs" />
- <Compile Include="App.xaml.cs">
- <DependentUpon>App.xaml</DependentUpon>
- </Compile>
- <None Include="Properties\AppManifest.xml" />
- <None Include="Properties\OutOfBrowserSettings.xml" />
- <ApplicationDefinition Include="App.xaml">
- <Generator>MSBuild:Compile</Generator>
- <SubType>Designer</SubType>
- </ApplicationDefinition>
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\ProtocolBuffers\ProtocolBuffers.SL20.csproj">
- <Project>{6908BDCE-D925-43F3-94AC-A531E6DF2591}</Project>
- <Name>ProtocolBuffers</Name>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\v2.0\Microsoft.Silverlight.CSharp.targets" />
- <ProjectExtensions>
- <VisualStudio>
- <FlavorProperties GUID="{A1591282-1198-4647-A2B1-27E5FF5F6F3B}">
- <SilverlightProjectProperties>
- <StartAction>OfflineApplication</StartAction>
- </SilverlightProjectProperties>
- </FlavorProperties>
- </VisualStudio>
- </ProjectExtensions>
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
- <PropertyGroup Condition=" '$(EnvironmentFlavor)' == 'CLIENTPROFILE' ">
- <StartAction>Program</StartAction>
- <StartProgram>$(ProjectDir)..\..\lib\NUnit\tools\nunit-console.exe</StartProgram>
- <StartArguments>/nologo /noshadow /labels /wait $(AssemblyName).dll</StartArguments>
- <StartWorkingDirectory>$(ProjectDir)$(OutputPath)</StartWorkingDirectory>
- </PropertyGroup>
-</Project>
\ No newline at end of file
diff --git a/csharp/src/ProtocolBuffersLite.Test/ProtocolBuffersLiteMixed.Test.SL30.csproj b/csharp/src/ProtocolBuffersLite.Test/ProtocolBuffersLiteMixed.Test.SL30.csproj
deleted file mode 100644
index 3627b76..0000000
--- a/csharp/src/ProtocolBuffersLite.Test/ProtocolBuffersLiteMixed.Test.SL30.csproj
+++ /dev/null
@@ -1,151 +0,0 @@
-<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" xmlns:cs="urn:schemas-csharp-project:template">
- <PropertyGroup>
- <EnvironmentFlavor>SILVERLIGHT</EnvironmentFlavor>
- <EnvironmentTemplate>SL30</EnvironmentTemplate>
- <EnvironmentProjectType>TEST</EnvironmentProjectType>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{EEFFED24-3750-4567-9A23-1DB676A15610}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>Google.ProtocolBuffers</RootNamespace>
- <AssemblyName>Google.ProtocolBuffersMixedLite.Test</AssemblyName>
- <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- <SignAssembly>true</SignAssembly>
- <AssemblyOriginatorKeyFile>..\..\keys\Google.ProtocolBuffers.snk</AssemblyOriginatorKeyFile>
- <OldToolsVersion>3.5</OldToolsVersion>
- <ProjectTypeGuids>{A1591282-1198-4647-A2B1-27E5FF5F6F3B};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
- <SilverlightApplication>true</SilverlightApplication>
- <ValidateXaml>false</ValidateXaml>
- <ThrowErrorsInValidation>false</ThrowErrorsInValidation>
- <XapOutputs>true</XapOutputs>
- <GenerateSilverlightManifest>true</GenerateSilverlightManifest>
- <XapFilename>Google.ProtocolBuffersMixedLite.Test.xap</XapFilename>
- <SilverlightManifestTemplate>Properties\AppManifest.xml</SilverlightManifestTemplate>
- <SilverlightAppEntry>Google.ProtocolBuffers.App</SilverlightAppEntry>
- <TestPageFileName>TestPage.html</TestPageFileName>
- <CreateTestPage>true</CreateTestPage>
- <SilverlightVersion>v3.5</SilverlightVersion>
- <OutOfBrowserSettingsFile>Properties\OutOfBrowserSettings.xml</OutOfBrowserSettingsFile>
- <EnableOutOfBrowser>true</EnableOutOfBrowser>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\SL30\Debug</OutputPath>
- <IntermediateOutputPath>obj\SL30\Debug\</IntermediateOutputPath>
- <DefineConstants>DEBUG;TRACE;$(EnvironmentFlavor);$(EnvironmentTemplate);NOSERIALIZABLE;NOSORTEDLIST</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoStdLib>true</NoStdLib>
- <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
- <NoConfig>true</NoConfig>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\SL30\Release</OutputPath>
- <IntermediateOutputPath>obj\SL30\Release\</IntermediateOutputPath>
- <DefineConstants>TRACE;$(EnvironmentFlavor);$(EnvironmentTemplate);NOSERIALIZABLE;NOSORTEDLIST</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoStdLib>true</NoStdLib>
- <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
- <NoConfig>true</NoConfig>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="mscorlib" />
- <Reference Include="System" />
- <Reference Include="System.Xml" />
- <Reference Include="System.Core" />
- <Reference Include="System.Windows" />
- <Reference Include="System.Windows.Browser" />
- </ItemGroup>
- <ItemGroup Condition=" '$(EnvironmentFlavor)' == 'CLIENTPROFILE' ">
- <Reference Include="nunit.framework">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\NUnit\lib\nunit.framework.dll</HintPath>
- </Reference>
- </ItemGroup>
- <ItemGroup Condition=" '$(EnvironmentFlavor)' != 'CLIENTPROFILE' ">
- <Reference Include="Microsoft.Silverlight.Testing, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\Microsoft.Silverlight.Testing\April2010\Microsoft.Silverlight.Testing.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\Microsoft.Silverlight.Testing\April2010\Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.dll</HintPath>
- </Reference>
- </ItemGroup>
- <ItemGroup>
- <Compile Include="..\..\lib\NUnit-config\Microsoft.VisualStudio.TestTools.cs">
- <Link>Microsoft.VisualStudio.TestTools.cs</Link>
- </Compile>
- <Compile Include="..\ProtocolBuffers.Test\Properties\AssemblyInfo.cs">
- <Link>Properties\AssemblyInfo.cs</Link>
- </Compile>
- <Compile Include="..\ProtocolBuffers.Test\SerializableAttribute.cs">
- <Link>SerializableAttribute.cs</Link>
- </Compile>
- <Compile Include="AbstractBuilderLiteTest.cs" />
- <Compile Include="AbstractMessageLiteTest.cs" />
- <Compile Include="ExtendableBuilderLiteTest.cs" />
- <Compile Include="ExtendableMessageLiteTest.cs" />
- <Compile Include="InteropLiteTest.cs" />
- <Compile Include="LiteTest.cs" />
- <Compile Include="MissingFieldAndExtensionTest.cs" />
- <Compile Include="TestLiteByApi.cs" />
- <Compile Include="TestProtos\UnitTestExtrasFullProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestExtrasLiteProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestImportLiteProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestImportProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestLiteImportNonLiteProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestLiteProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestProtoFile.cs" />
- <Compile Include="TestUtil.cs" />
- <Compile Include="App.xaml.cs">
- <DependentUpon>App.xaml</DependentUpon>
- </Compile>
- <None Include="Properties\AppManifest.xml" />
- <None Include="Properties\OutOfBrowserSettings.xml" />
- <ApplicationDefinition Include="App.xaml">
- <Generator>MSBuild:Compile</Generator>
- <SubType>Designer</SubType>
- </ApplicationDefinition>
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\ProtocolBuffers\ProtocolBuffers.SL30.csproj">
- <Project>{6908BDCE-D925-43F3-94AC-A531E6DF2591}</Project>
- <Name>ProtocolBuffers</Name>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\v3.0\Microsoft.Silverlight.CSharp.targets" />
- <ProjectExtensions>
- <VisualStudio>
- <FlavorProperties GUID="{A1591282-1198-4647-A2B1-27E5FF5F6F3B}">
- <SilverlightProjectProperties>
- <StartAction>OfflineApplication</StartAction>
- </SilverlightProjectProperties>
- </FlavorProperties>
- </VisualStudio>
- </ProjectExtensions>
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
- <PropertyGroup Condition=" '$(EnvironmentFlavor)' == 'CLIENTPROFILE' ">
- <StartAction>Program</StartAction>
- <StartProgram>$(ProjectDir)..\..\lib\NUnit\tools\nunit-console.exe</StartProgram>
- <StartArguments>/nologo /noshadow /labels /wait $(AssemblyName).dll</StartArguments>
- <StartWorkingDirectory>$(ProjectDir)$(OutputPath)</StartWorkingDirectory>
- </PropertyGroup>
-</Project>
\ No newline at end of file
diff --git a/csharp/src/ProtocolBuffersLite.Test/ProtocolBuffersLiteMixed.Test.SL40.csproj b/csharp/src/ProtocolBuffersLite.Test/ProtocolBuffersLiteMixed.Test.SL40.csproj
deleted file mode 100644
index a98c4d3..0000000
--- a/csharp/src/ProtocolBuffersLite.Test/ProtocolBuffersLiteMixed.Test.SL40.csproj
+++ /dev/null
@@ -1,151 +0,0 @@
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" xmlns:cs="urn:schemas-csharp-project:template">
- <PropertyGroup>
- <EnvironmentFlavor>SILVERLIGHT</EnvironmentFlavor>
- <EnvironmentTemplate>SL40</EnvironmentTemplate>
- <EnvironmentProjectType>TEST</EnvironmentProjectType>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{EEFFED24-3750-4567-9A23-1DB676A15610}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>Google.ProtocolBuffers</RootNamespace>
- <AssemblyName>Google.ProtocolBuffersMixedLite.Test</AssemblyName>
- <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- <SignAssembly>true</SignAssembly>
- <AssemblyOriginatorKeyFile>..\..\keys\Google.ProtocolBuffers.snk</AssemblyOriginatorKeyFile>
- <OldToolsVersion>3.5</OldToolsVersion>
- <ProjectTypeGuids>{A1591282-1198-4647-A2B1-27E5FF5F6F3B};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
- <SilverlightApplication>true</SilverlightApplication>
- <ValidateXaml>false</ValidateXaml>
- <ThrowErrorsInValidation>false</ThrowErrorsInValidation>
- <SilverlightVersion>v4.0</SilverlightVersion>
- <XapOutputs>true</XapOutputs>
- <GenerateSilverlightManifest>true</GenerateSilverlightManifest>
- <XapFilename>Google.ProtocolBuffersMixedLite.Test.xap</XapFilename>
- <SilverlightManifestTemplate>Properties\AppManifest.xml</SilverlightManifestTemplate>
- <SilverlightAppEntry>Google.ProtocolBuffers.App</SilverlightAppEntry>
- <TestPageFileName>TestPage.html</TestPageFileName>
- <CreateTestPage>true</CreateTestPage>
- <OutOfBrowserSettingsFile>Properties\OutOfBrowserSettings.xml</OutOfBrowserSettingsFile>
- <EnableOutOfBrowser>true</EnableOutOfBrowser>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\SL40\Debug</OutputPath>
- <IntermediateOutputPath>obj\SL40\Debug\</IntermediateOutputPath>
- <DefineConstants>DEBUG;TRACE;$(EnvironmentFlavor);$(EnvironmentTemplate);NOSERIALIZABLE;NOSORTEDLIST</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoStdLib>true</NoStdLib>
- <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
- <NoConfig>true</NoConfig>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\SL40\Release</OutputPath>
- <IntermediateOutputPath>obj\SL40\Release\</IntermediateOutputPath>
- <DefineConstants>TRACE;$(EnvironmentFlavor);$(EnvironmentTemplate);NOSERIALIZABLE;NOSORTEDLIST</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoStdLib>true</NoStdLib>
- <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
- <NoConfig>true</NoConfig>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="mscorlib" />
- <Reference Include="System" />
- <Reference Include="System.Xml" />
- <Reference Include="System.Core" />
- <Reference Include="System.Windows" />
- <Reference Include="System.Windows.Browser" />
- </ItemGroup>
- <ItemGroup Condition=" '$(EnvironmentFlavor)' == 'CLIENTPROFILE' ">
- <Reference Include="nunit.framework">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\NUnit\lib\nunit.framework.dll</HintPath>
- </Reference>
- </ItemGroup>
- <ItemGroup Condition=" '$(EnvironmentFlavor)' != 'CLIENTPROFILE' ">
- <Reference Include="Microsoft.Silverlight.Testing, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\Microsoft.Silverlight.Testing\April2010\Microsoft.Silverlight.Testing.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\Microsoft.Silverlight.Testing\April2010\Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.dll</HintPath>
- </Reference>
- </ItemGroup>
- <ItemGroup>
- <Compile Include="..\..\lib\NUnit-config\Microsoft.VisualStudio.TestTools.cs">
- <Link>Microsoft.VisualStudio.TestTools.cs</Link>
- </Compile>
- <Compile Include="..\ProtocolBuffers.Test\Properties\AssemblyInfo.cs">
- <Link>Properties\AssemblyInfo.cs</Link>
- </Compile>
- <Compile Include="..\ProtocolBuffers.Test\SerializableAttribute.cs">
- <Link>SerializableAttribute.cs</Link>
- </Compile>
- <Compile Include="AbstractBuilderLiteTest.cs" />
- <Compile Include="AbstractMessageLiteTest.cs" />
- <Compile Include="ExtendableBuilderLiteTest.cs" />
- <Compile Include="ExtendableMessageLiteTest.cs" />
- <Compile Include="InteropLiteTest.cs" />
- <Compile Include="LiteTest.cs" />
- <Compile Include="MissingFieldAndExtensionTest.cs" />
- <Compile Include="TestLiteByApi.cs" />
- <Compile Include="TestProtos\UnitTestExtrasFullProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestExtrasLiteProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestImportLiteProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestImportProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestLiteImportNonLiteProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestLiteProtoFile.cs" />
- <Compile Include="TestProtos\UnitTestProtoFile.cs" />
- <Compile Include="TestUtil.cs" />
- <Compile Include="App.xaml.cs">
- <DependentUpon>App.xaml</DependentUpon>
- </Compile>
- <None Include="Properties\AppManifest.xml" />
- <None Include="Properties\OutOfBrowserSettings.xml" />
- <ApplicationDefinition Include="App.xaml">
- <Generator>MSBuild:Compile</Generator>
- <SubType>Designer</SubType>
- </ApplicationDefinition>
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\ProtocolBuffers\ProtocolBuffers.SL40.csproj">
- <Project>{6908BDCE-D925-43F3-94AC-A531E6DF2591}</Project>
- <Name>ProtocolBuffers</Name>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets" />
- <ProjectExtensions>
- <VisualStudio>
- <FlavorProperties GUID="{A1591282-1198-4647-A2B1-27E5FF5F6F3B}">
- <SilverlightProjectProperties>
- <StartAction>OfflineApplication</StartAction>
- </SilverlightProjectProperties>
- </FlavorProperties>
- </VisualStudio>
- </ProjectExtensions>
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
- <PropertyGroup Condition=" '$(EnvironmentFlavor)' == 'CLIENTPROFILE' ">
- <StartAction>Program</StartAction>
- <StartProgram>$(ProjectDir)..\..\lib\NUnit\tools\nunit-console.exe</StartProgram>
- <StartArguments>/nologo /noshadow /labels /wait $(AssemblyName).dll</StartArguments>
- <StartWorkingDirectory>$(ProjectDir)$(OutputPath)</StartWorkingDirectory>
- </PropertyGroup>
-</Project>
\ No newline at end of file
diff --git a/csharp/src/ProtocolBuffersLite.Test/ProtocolBuffersLiteMixed.Test.csproj b/csharp/src/ProtocolBuffersLite.Test/ProtocolBuffersLiteMixed.Test.csproj
index 44b9a29..5f1a7ba 100644
--- a/csharp/src/ProtocolBuffersLite.Test/ProtocolBuffersLiteMixed.Test.csproj
+++ b/csharp/src/ProtocolBuffersLite.Test/ProtocolBuffersLiteMixed.Test.csproj
@@ -1,9 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="..\packages\xunit.runner.visualstudio.2.0.0\build\net20\xunit.runner.visualstudio.props" Condition="Exists('..\packages\xunit.runner.visualstudio.2.0.0\build\net20\xunit.runner.visualstudio.props')" />
+ <Import Project="..\packages\xunit.core.2.0.0\build\portable-net45+win+wpa81+wp80+monotouch+monoandroid+Xamarin.iOS\xunit.core.props" Condition="Exists('..\packages\xunit.core.2.0.0\build\portable-net45+win+wpa81+wp80+monotouch+monoandroid+Xamarin.iOS\xunit.core.props')" />
<PropertyGroup>
- <EnvironmentFlavor>CLIENTPROFILE</EnvironmentFlavor>
- <EnvironmentTemplate>NET35</EnvironmentTemplate>
- <EnvironmentProjectType>TEST</EnvironmentProjectType>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
@@ -13,62 +12,56 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Google.ProtocolBuffers</RootNamespace>
<AssemblyName>Google.ProtocolBuffersMixedLite.Test</AssemblyName>
- <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\..\keys\Google.ProtocolBuffers.snk</AssemblyOriginatorKeyFile>
<OldToolsVersion>3.5</OldToolsVersion>
+ <TargetFrameworkProfile>
+ </TargetFrameworkProfile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
- <OutputPath>bin\NET35\Debug</OutputPath>
- <IntermediateOutputPath>obj\NET35\Debug\</IntermediateOutputPath>
+ <OutputPath>bin\Debug</OutputPath>
+ <IntermediateOutputPath>obj\Debug\</IntermediateOutputPath>
<DefineConstants>DEBUG;TRACE;$(EnvironmentFlavor);$(EnvironmentTemplate)</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<NoStdLib>true</NoStdLib>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
+ <Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
- <OutputPath>bin\NET35\Release</OutputPath>
- <IntermediateOutputPath>obj\NET35\Release\</IntermediateOutputPath>
+ <OutputPath>bin\Release</OutputPath>
+ <IntermediateOutputPath>obj\Release\</IntermediateOutputPath>
<DefineConstants>TRACE;$(EnvironmentFlavor);$(EnvironmentTemplate)</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<NoStdLib>true</NoStdLib>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
+ <Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="mscorlib" />
<Reference Include="System" />
<Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup Condition=" '$(EnvironmentFlavor)' == 'CLIENTPROFILE' ">
- <Reference Include="nunit.framework">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\NUnit\lib\nunit.framework.dll</HintPath>
+ <Reference Include="xunit.abstractions">
+ <HintPath>..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll</HintPath>
</Reference>
- </ItemGroup>
- <ItemGroup Condition=" '$(EnvironmentFlavor)' != 'CLIENTPROFILE' ">
- <Reference Include="Microsoft.Silverlight.Testing, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\Microsoft.Silverlight.Testing\April2010\Microsoft.Silverlight.Testing.dll</HintPath>
+ <Reference Include="xunit.assert">
+ <HintPath>..\packages\xunit.assert.2.0.0\lib\portable-net45+win+wpa81+wp80+monotouch+monoandroid+Xamarin.iOS\xunit.assert.dll</HintPath>
</Reference>
- <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\Microsoft.Silverlight.Testing\April2010\Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.dll</HintPath>
+ <Reference Include="xunit.core">
+ <HintPath>..\packages\xunit.extensibility.core.2.0.0\lib\portable-net45+win+wpa81+wp80+monotouch+monoandroid+Xamarin.iOS\xunit.core.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
- <Compile Include="..\..\lib\NUnit-config\Microsoft.VisualStudio.TestTools.cs">
- <Link>Microsoft.VisualStudio.TestTools.cs</Link>
- </Compile>
<Compile Include="..\ProtocolBuffers.Test\Properties\AssemblyInfo.cs">
<Link>Properties\AssemblyInfo.cs</Link>
</Compile>
@@ -89,7 +82,6 @@
<Compile Include="TestProtos\UnittestImportPublicLite.cs" />
<Compile Include="TestProtos\UnittestLite.cs" />
<Compile Include="TestProtos\UnittestLiteImportsNonlite.cs" />
- <Compile Include="TestUtil.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\ProtocolBuffers\ProtocolBuffers.csproj">
@@ -97,7 +89,9 @@
<Name>ProtocolBuffers</Name>
</ProjectReference>
</ItemGroup>
- <ItemGroup />
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
@@ -106,10 +100,11 @@
<Target Name="AfterBuild">
</Target>
-->
- <PropertyGroup Condition=" '$(EnvironmentFlavor)' == 'CLIENTPROFILE' ">
- <StartAction>Program</StartAction>
- <StartProgram>$(ProjectDir)..\..\lib\NUnit\tools\nunit-console.exe</StartProgram>
- <StartArguments>/nologo /noshadow /labels /wait $(AssemblyName).dll</StartArguments>
- <StartWorkingDirectory>$(ProjectDir)$(OutputPath)</StartWorkingDirectory>
- </PropertyGroup>
+ <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
+ <PropertyGroup>
+ <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
+ </PropertyGroup>
+ <Error Condition="!Exists('..\packages\xunit.core.2.0.0\build\portable-net45+win+wpa81+wp80+monotouch+monoandroid+Xamarin.iOS\xunit.core.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\xunit.core.2.0.0\build\portable-net45+win+wpa81+wp80+monotouch+monoandroid+Xamarin.iOS\xunit.core.props'))" />
+ <Error Condition="!Exists('..\packages\xunit.runner.visualstudio.2.0.0\build\net20\xunit.runner.visualstudio.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\xunit.runner.visualstudio.2.0.0\build\net20\xunit.runner.visualstudio.props'))" />
+ </Target>
</Project>
\ No newline at end of file
diff --git a/csharp/src/ProtocolBuffersLite.Test/TestLiteByApi.cs b/csharp/src/ProtocolBuffersLite.Test/TestLiteByApi.cs
index e44a72a..e4f9acf 100644
--- a/csharp/src/ProtocolBuffersLite.Test/TestLiteByApi.cs
+++ b/csharp/src/ProtocolBuffersLite.Test/TestLiteByApi.cs
@@ -35,67 +35,66 @@
#endregion
using Google.ProtocolBuffers.TestProtos;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Xunit;
namespace Google.ProtocolBuffers
{
- [TestClass]
public class TestLiteByApi
{
- [TestMethod]
+ [Fact]
public void TestAllTypesEquality()
{
TestAllTypesLite msg = TestAllTypesLite.DefaultInstance;
TestAllTypesLite copy = msg.ToBuilder().Build();
- Assert.AreEqual(msg.GetHashCode(), copy.GetHashCode());
- Assert.IsTrue(msg.Equals(copy));
+ Assert.Equal(msg.GetHashCode(), copy.GetHashCode());
+ Assert.True(msg.Equals(copy));
msg = msg.ToBuilder().SetOptionalString("Hi").Build();
- Assert.AreNotEqual(msg.GetHashCode(), copy.GetHashCode());
- Assert.IsFalse(msg.Equals(copy));
+ Assert.NotEqual(msg.GetHashCode(), copy.GetHashCode());
+ Assert.False(msg.Equals(copy));
copy = copy.ToBuilder().SetOptionalString("Hi").Build();
- Assert.AreEqual(msg.GetHashCode(), copy.GetHashCode());
- Assert.IsTrue(msg.Equals(copy));
+ Assert.Equal(msg.GetHashCode(), copy.GetHashCode());
+ Assert.True(msg.Equals(copy));
}
- [TestMethod]
+ [Fact]
public void TestEqualityOnExtensions()
{
TestAllExtensionsLite msg = TestAllExtensionsLite.DefaultInstance;
TestAllExtensionsLite copy = msg.ToBuilder().Build();
- Assert.AreEqual(msg.GetHashCode(), copy.GetHashCode());
- Assert.IsTrue(msg.Equals(copy));
+ Assert.Equal(msg.GetHashCode(), copy.GetHashCode());
+ Assert.True(msg.Equals(copy));
msg = msg.ToBuilder().SetExtension(UnittestLite.OptionalStringExtensionLite, "Hi").Build();
- Assert.AreNotEqual(msg.GetHashCode(), copy.GetHashCode());
- Assert.IsFalse(msg.Equals(copy));
+ Assert.NotEqual(msg.GetHashCode(), copy.GetHashCode());
+ Assert.False(msg.Equals(copy));
copy = copy.ToBuilder().SetExtension(UnittestLite.OptionalStringExtensionLite, "Hi").Build();
- Assert.AreEqual(msg.GetHashCode(), copy.GetHashCode());
- Assert.IsTrue(msg.Equals(copy));
+ Assert.Equal(msg.GetHashCode(), copy.GetHashCode());
+ Assert.True(msg.Equals(copy));
}
- [TestMethod]
+ [Fact]
public void TestAllTypesToString()
{
TestAllTypesLite msg = TestAllTypesLite.DefaultInstance;
TestAllTypesLite copy = msg.ToBuilder().Build();
- Assert.AreEqual(msg.ToString(), copy.ToString());
- Assert.AreEqual(0, msg.ToString().Length);
+ Assert.Equal(msg.ToString(), copy.ToString());
+ Assert.Equal(0, msg.ToString().Length);
msg = msg.ToBuilder().SetOptionalInt32(-1).Build();
- Assert.AreEqual("optional_int32: -1", msg.ToString().TrimEnd());
+ Assert.Equal("optional_int32: -1", msg.ToString().TrimEnd());
msg = msg.ToBuilder().SetOptionalString("abc123").Build();
- Assert.AreEqual("optional_int32: -1\noptional_string: \"abc123\"",
+ Assert.Equal("optional_int32: -1\noptional_string: \"abc123\"",
msg.ToString().Replace("\r", "").TrimEnd());
}
- [TestMethod]
+ [Fact]
public void TestAllTypesDefaultedRoundTrip()
{
TestAllTypesLite msg = TestAllTypesLite.DefaultInstance;
- Assert.IsTrue(msg.IsInitialized);
+ Assert.True(msg.IsInitialized);
TestAllTypesLite copy = TestAllTypesLite.CreateBuilder().MergeFrom(msg.ToByteArray()).Build();
- TestUtil.AssertBytesEqual(msg.ToByteArray(), copy.ToByteArray());
+ Assert.Equal(msg.ToByteArray(), copy.ToByteArray());
}
- [TestMethod]
+ [Fact]
public void TestAllTypesModifiedRoundTrip()
{
TestAllTypesLite msg = TestAllTypesLite.DefaultInstance;
@@ -115,7 +114,7 @@
.AddRepeatedGroup(TestAllTypesLite.Types.RepeatedGroup.CreateBuilder().SetA('A').Build())
;
TestAllTypesLite copy = TestAllTypesLite.CreateBuilder().MergeFrom(msg.ToByteArray()).Build();
- TestUtil.AssertBytesEqual(msg.ToByteArray(), copy.ToByteArray());
+ Assert.Equal(msg.ToByteArray(), copy.ToByteArray());
}
}
}
\ No newline at end of file
diff --git a/csharp/src/ProtocolBuffersLite.Test/TestUtil.cs b/csharp/src/ProtocolBuffersLite.Test/TestUtil.cs
deleted file mode 100644
index 44c09b9..0000000
--- a/csharp/src/ProtocolBuffersLite.Test/TestUtil.cs
+++ /dev/null
@@ -1,31 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-
-namespace Google.ProtocolBuffers
-{
- class TestUtil
- {
- internal static void AssertBytesEqual(byte[] a, byte[] b)
- {
- if (a == null || b == null)
- {
- Assert.AreEqual<object>(a, b);
- }
- else
- {
- Assert.AreEqual(a.Length, b.Length, "The byte[] is not of the expected length.");
-
- for (int i = 0; i < a.Length; i++)
- {
- if (a[i] != b[i])
- {
- Assert.AreEqual(a[i], b[i], "Byte[] differs at index " + i);
- }
- }
- }
- }
-
- }
-}
diff --git a/csharp/src/ProtocolBuffersLite.Test/packages.config b/csharp/src/ProtocolBuffersLite.Test/packages.config
new file mode 100644
index 0000000..6f1fb7f
--- /dev/null
+++ b/csharp/src/ProtocolBuffersLite.Test/packages.config
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+ <package id="xunit" version="2.0.0" targetFramework="net45" />
+ <package id="xunit.abstractions" version="2.0.0" targetFramework="net45" />
+ <package id="xunit.assert" version="2.0.0" targetFramework="net45" />
+ <package id="xunit.core" version="2.0.0" targetFramework="net45" />
+ <package id="xunit.extensibility.core" version="2.0.0" targetFramework="net45" />
+ <package id="xunit.runner.visualstudio" version="2.0.0" targetFramework="net45" />
+</packages>
\ No newline at end of file
diff --git a/csharp/src/packages/repositories.config b/csharp/src/packages/repositories.config
new file mode 100644
index 0000000..0117aa7
--- /dev/null
+++ b/csharp/src/packages/repositories.config
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<repositories>
+ <repository path="..\ProtocolBuffers.Test\packages.config" />
+ <repository path="..\ProtocolBuffersLite.Test\packages.config" />
+</repositories>
\ No newline at end of file