diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ProtoBench/ProtoBench.csproj | 185 | ||||
-rw-r--r-- | src/ProtoGen/Generator.cs | 2 | ||||
-rw-r--r-- | src/ProtoGen/ProgramPreprocess.cs | 4 | ||||
-rw-r--r-- | src/ProtoGen/Properties/AssemblyInfo.cs | 7 | ||||
-rw-r--r-- | src/ProtoGen/SourceGenerators.cs | 3 | ||||
-rw-r--r-- | src/ProtocolBuffers.Test/Collections/PopsicleListTest.cs | 3 | ||||
-rw-r--r-- | src/ProtocolBuffers/Descriptors/EnumDescriptor.cs | 2 | ||||
-rw-r--r-- | src/ProtocolBuffers/Descriptors/FileDescriptor.cs | 2 | ||||
-rw-r--r-- | src/ProtocolBuffers/NameHelpers.cs | 6 | ||||
-rw-r--r-- | src/ProtocolBuffers/Properties/AssemblyInfo.cs | 175 | ||||
-rw-r--r-- | src/ProtocolBuffers/WireFormat.cs | 16 |
11 files changed, 201 insertions, 204 deletions
diff --git a/src/ProtoBench/ProtoBench.csproj b/src/ProtoBench/ProtoBench.csproj index 927a2557..15777167 100644 --- a/src/ProtoBench/ProtoBench.csproj +++ b/src/ProtoBench/ProtoBench.csproj @@ -1,100 +1,99 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <PropertyGroup> - <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> - <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> - <ProductVersion>9.0.30729</ProductVersion> - <SchemaVersion>2.0</SchemaVersion> - <ProjectGuid>{C7A4A435-2813-41C8-AA87-BD914BA5223D}</ProjectGuid> - <OutputType>Exe</OutputType> - <AppDesignerFolder>Properties</AppDesignerFolder> - <RootNamespace>Google.ProtocolBuffers.ProtoBench</RootNamespace> - <AssemblyName>ProtoBench</AssemblyName> - <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> - <FileAlignment>512</FileAlignment> - <FileUpgradeFlags> - </FileUpgradeFlags> - <UpgradeBackupLocation> - </UpgradeBackupLocation> - <OldToolsVersion>3.5</OldToolsVersion> - <PublishUrl>publish\</PublishUrl> - <Install>true</Install> - <InstallFrom>Disk</InstallFrom> - <UpdateEnabled>false</UpdateEnabled> - <UpdateMode>Foreground</UpdateMode> - <UpdateInterval>7</UpdateInterval> - <UpdateIntervalUnits>Days</UpdateIntervalUnits> - <UpdatePeriodically>false</UpdatePeriodically> - <UpdateRequired>false</UpdateRequired> - <MapFileExtensions>true</MapFileExtensions> - <ApplicationRevision>0</ApplicationRevision> - <ApplicationVersion>1.0.0.%2a</ApplicationVersion> - <IsWebBootstrapper>false</IsWebBootstrapper> - <UseApplicationTrust>false</UseApplicationTrust> - <BootstrapperEnabled>true</BootstrapperEnabled> - <TargetFrameworkProfile /> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> - <DebugSymbols>true</DebugSymbols> - <DebugType>full</DebugType> - <Optimize>false</Optimize> - <OutputPath>bin\Debug\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> - <DebugType>pdbonly</DebugType> - <Optimize>true</Optimize> - <OutputPath>bin\Release\</OutputPath> - <DefineConstants>TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet> - </PropertyGroup> - <ItemGroup> - <Reference Include="mscorlib" /> - <Reference Include="System" /> - <Reference Include="System.Data" /> - <Reference Include="System.Xml" /> - </ItemGroup> - <ItemGroup> - <Compile Include="Program.cs" /> - <Compile Include="Properties\AssemblyInfo.cs" /> - </ItemGroup> - <ItemGroup> - <ProjectReference Include="..\ProtocolBuffers\ProtocolBuffers.csproj"> - <Project>{6908BDCE-D925-43F3-94AC-A531E6DF2591}</Project> - <Name>ProtocolBuffers</Name> - </ProjectReference> - </ItemGroup> - <ItemGroup> - <None Include="app.config" /> - </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> - <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> +<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>9.0.30729</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{C7A4A435-2813-41C8-AA87-BD914BA5223D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>Google.ProtocolBuffers.ProtoBench</RootNamespace>
+ <AssemblyName>ProtoBench</AssemblyName>
+ <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ <UpgradeBackupLocation>
+ </UpgradeBackupLocation>
+ <OldToolsVersion>3.5</OldToolsVersion>
+ <PublishUrl>publish\</PublishUrl>
+ <Install>true</Install>
+ <InstallFrom>Disk</InstallFrom>
+ <UpdateEnabled>false</UpdateEnabled>
+ <UpdateMode>Foreground</UpdateMode>
+ <UpdateInterval>7</UpdateInterval>
+ <UpdateIntervalUnits>Days</UpdateIntervalUnits>
+ <UpdatePeriodically>false</UpdatePeriodically>
+ <UpdateRequired>false</UpdateRequired>
+ <MapFileExtensions>true</MapFileExtensions>
+ <ApplicationRevision>0</ApplicationRevision>
+ <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
+ <IsWebBootstrapper>false</IsWebBootstrapper>
+ <UseApplicationTrust>false</UseApplicationTrust>
+ <BootstrapperEnabled>true</BootstrapperEnabled>
+ <TargetFrameworkProfile />
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Program.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\ProtocolBuffers\ProtocolBuffers.csproj">
+ <Project>{6908BDCE-D925-43F3-94AC-A531E6DF2591}</Project>
+ <Name>ProtocolBuffers</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="app.config" />
+ </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>
+ <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> - --> + -->
</Project>
\ No newline at end of file diff --git a/src/ProtoGen/Generator.cs b/src/ProtoGen/Generator.cs index 8b5c2cfb..13797487 100644 --- a/src/ProtoGen/Generator.cs +++ b/src/ProtoGen/Generator.cs @@ -124,7 +124,7 @@ namespace Google.ProtocolBuffers.ProtoGen { /// Note: this method is internal rather than private to allow testing. /// </summary> /// <exception cref="DependencyResolutionException">Not all dependencies could be resolved.</exception> - internal static IList<FileDescriptor> ConvertDescriptors(CSharpFileOptions options, params FileDescriptorSet[] descriptorProtos) { + public static IList<FileDescriptor> ConvertDescriptors(CSharpFileOptions options, params FileDescriptorSet[] descriptorProtos) { // Simple strategy: Keep going through the list of protos to convert, only doing ones where // we've already converted all the dependencies, until we get to a stalemate List<FileDescriptorProto> fileList = new List<FileDescriptorProto>(); diff --git a/src/ProtoGen/ProgramPreprocess.cs b/src/ProtoGen/ProgramPreprocess.cs index e35eb830..3cc0826d 100644 --- a/src/ProtoGen/ProgramPreprocess.cs +++ b/src/ProtoGen/ProgramPreprocess.cs @@ -11,7 +11,7 @@ namespace Google.ProtocolBuffers.ProtoGen { /// --descriptor_set_out= is specified the proto buffer file is kept, otherwise it will be removed /// after code generation. /// </summary> - internal class ProgramPreprocess { + public class ProgramPreprocess { private static int Main(string[] args) { try { return Environment.ExitCode = Run(args); @@ -22,7 +22,7 @@ namespace Google.ProtocolBuffers.ProtoGen { } } - internal static int Run(params string[] args) { + public static int Run(params string[] args) { bool deleteFile = false; string tempFile = null; int result; diff --git a/src/ProtoGen/Properties/AssemblyInfo.cs b/src/ProtoGen/Properties/AssemblyInfo.cs index a3612f98..7f77b259 100644 --- a/src/ProtoGen/Properties/AssemblyInfo.cs +++ b/src/ProtoGen/Properties/AssemblyInfo.cs @@ -34,9 +34,4 @@ using System.Runtime.InteropServices; // [assembly: AssemblyVersion("2.3.0.277")] [assembly: AssemblyVersion("2.3.0.277")] [assembly: AssemblyFileVersion("2.3.0.277")] -[assembly: InternalsVisibleTo("Google.ProtocolBuffers.ProtoGen.Test,PublicKey=" + -"0024000004800000940000000602000000240000525341310004000001000100cf43741ffc3e65" + -"c85707245e144e90f1bb82f20d1b1555846008d4d5d5c9270a980350dcb1ddd40fcdde13c2780c" + -"75c9057123daa5613cb6551e2b8bd2254e8f84b3893369869e5119b752442aef7156c4defc489b" + -"96c44ff801fe8d94199e048f8ff414813c9c811a029bcd697040700dc66982539e9b368cb5e725" + -"feed60f2")] + diff --git a/src/ProtoGen/SourceGenerators.cs b/src/ProtoGen/SourceGenerators.cs index 0a809959..33f5573e 100644 --- a/src/ProtoGen/SourceGenerators.cs +++ b/src/ProtoGen/SourceGenerators.cs @@ -37,6 +37,9 @@ using System.Collections.Generic; using Google.ProtocolBuffers.Descriptors; namespace Google.ProtocolBuffers.ProtoGen { + + public delegate TResult Func<T, TResult>(T arg); + internal static class SourceGenerators { private static readonly Dictionary<Type, Func<IDescriptor, ISourceGenerator>> GeneratorFactories = new Dictionary<Type, Func<IDescriptor, ISourceGenerator>> { diff --git a/src/ProtocolBuffers.Test/Collections/PopsicleListTest.cs b/src/ProtocolBuffers.Test/Collections/PopsicleListTest.cs index 9d9fe42c..6b42209b 100644 --- a/src/ProtocolBuffers.Test/Collections/PopsicleListTest.cs +++ b/src/ProtocolBuffers.Test/Collections/PopsicleListTest.cs @@ -35,6 +35,9 @@ using System; using NUnit.Framework; +delegate void Action(); + + namespace Google.ProtocolBuffers.Collections { [TestFixture] public class PopsicleListTest { diff --git a/src/ProtocolBuffers/Descriptors/EnumDescriptor.cs b/src/ProtocolBuffers/Descriptors/EnumDescriptor.cs index d6ef4e17..acf113de 100644 --- a/src/ProtocolBuffers/Descriptors/EnumDescriptor.cs +++ b/src/ProtocolBuffers/Descriptors/EnumDescriptor.cs @@ -95,7 +95,7 @@ namespace Google.ProtocolBuffers.Descriptors { /// </summary> /// <param name="name">The unqualified name of the value (e.g. "FOO").</param> /// <returns>The value's descriptor, or null if not found.</returns> - internal EnumValueDescriptor FindValueByName(string name) { + public EnumValueDescriptor FindValueByName(string name) { return File.DescriptorPool.FindSymbol<EnumValueDescriptor>(FullName + "." + name); } diff --git a/src/ProtocolBuffers/Descriptors/FileDescriptor.cs b/src/ProtocolBuffers/Descriptors/FileDescriptor.cs index f1eba496..1648c34f 100644 --- a/src/ProtocolBuffers/Descriptors/FileDescriptor.cs +++ b/src/ProtocolBuffers/Descriptors/FileDescriptor.cs @@ -81,7 +81,7 @@ namespace Google.ProtocolBuffers.Descriptors { /// Allows a file descriptor to be configured with a set of external options, e.g. from the /// command-line arguments to protogen. /// </summary> - internal void ConfigureWithDefaultOptions(CSharpFileOptions options) { + public void ConfigureWithDefaultOptions(CSharpFileOptions options) { csharpFileOptions = BuildOrFakeWithDefaultOptions(options); } diff --git a/src/ProtocolBuffers/NameHelpers.cs b/src/ProtocolBuffers/NameHelpers.cs index 9cf25699..ddaf1a3f 100644 --- a/src/ProtocolBuffers/NameHelpers.cs +++ b/src/ProtocolBuffers/NameHelpers.cs @@ -39,13 +39,13 @@ namespace Google.ProtocolBuffers { /// <summary> /// Helpers for converting names to pascal case etc. /// </summary> - internal class NameHelpers { + public class NameHelpers { - internal static string UnderscoresToPascalCase(string input) { + public static string UnderscoresToPascalCase(string input) { return UnderscoresToPascalOrCamelCase(input, true); } - internal static string UnderscoresToCamelCase(string input) { + public static string UnderscoresToCamelCase(string input) { return UnderscoresToPascalOrCamelCase(input, false); } diff --git a/src/ProtocolBuffers/Properties/AssemblyInfo.cs b/src/ProtocolBuffers/Properties/AssemblyInfo.cs index 64c121a3..0ec29fb1 100644 --- a/src/ProtocolBuffers/Properties/AssemblyInfo.cs +++ b/src/ProtocolBuffers/Properties/AssemblyInfo.cs @@ -1,89 +1,86 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// http://github.com/jskeet/dotnet-protobufs/ -// Original C++/Java/Python code: -// http://code.google.com/p/protobuf/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -using System; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Runtime.CompilerServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("ProtocolBuffers")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("ProtocolBuffers")] -[assembly: AssemblyCopyright("Copyright © 2008")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("279b643d-70e8-47ae-9eb1-500d1c48bab6")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("2.3.0.277")] -[assembly: AssemblyVersion("2.3.0.277")] -#if !COMPACT_FRAMEWORK_35 -[assembly: AssemblyFileVersion("2.3.0.277")] -#endif - -[assembly:InternalsVisibleTo("Google.ProtocolBuffers.Test,PublicKey="+ -"00240000048000009400000006020000002400005253413100040000010001008179f2dd31a648"+ -"2a2359dbe33e53701167a888e7c369a9ae3210b64f93861d8a7d286447e58bc167e3d99483beda"+ -"72f738140072bb69990bc4f98a21365de2c105e848974a3d210e938b0a56103c0662901efd6b78"+ -"0ee6dbe977923d46a8fda18fb25c65dd73b149a5cd9f3100668b56649932dadd8cf5be52eb1dce"+ -"ad5cedbf")] -[assembly: InternalsVisibleTo("Google.ProtocolBuffersLite.Test,PublicKey=" + -"00240000048000009400000006020000002400005253413100040000010001008179f2dd31a648" + -"2a2359dbe33e53701167a888e7c369a9ae3210b64f93861d8a7d286447e58bc167e3d99483beda" + -"72f738140072bb69990bc4f98a21365de2c105e848974a3d210e938b0a56103c0662901efd6b78" + -"0ee6dbe977923d46a8fda18fb25c65dd73b149a5cd9f3100668b56649932dadd8cf5be52eb1dce" + -"ad5cedbf")] -[assembly: InternalsVisibleTo("ProtoGen,PublicKey=" + -"00240000048000009400000006020000002400005253413100040000010001006d739020e13bdc" + -"038e86fa8aa5e1b13aae65d3ae79d622816c6067ab5b6955be50cc887130117582349208c13a55" + -"5e09a6084558f989ccde66094f07822808d3a9b922b0e85b912070032e90bb35360be7efb7982b" + -"702d7a5c6ed1e21d8ca587b4f4c9d2b81210d3641cc75f506cdfc628ac5453ff0a6886986c981d" + -"12245bc7")] -[assembly: CLSCompliant(true)]
\ No newline at end of file +// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// http://github.com/jskeet/dotnet-protobufs/
+// Original C++/Java/Python code:
+// http://code.google.com/p/protobuf/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+using System;
+using System.Reflection;
+using System.Runtime.InteropServices;
+using System.Runtime.CompilerServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("ProtocolBuffers")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("ProtocolBuffers")]
+[assembly: AssemblyCopyright("Copyright © 2008")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("279b643d-70e8-47ae-9eb1-500d1c48bab6")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("2.3.0.277")]
+[assembly: AssemblyVersion("2.3.0.277")]
+#if !COMPACT_FRAMEWORK_35
+[assembly: AssemblyFileVersion("2.3.0.277")]
+#endif
+
+[assembly: InternalsVisibleTo("Google.ProtocolBuffers.Test,PublicKey=" + Google.ProtocolBuffers.Properties.KnownKeys.PublishedKey)]
+[assembly: InternalsVisibleTo("Google.ProtocolBuffersLite.Test,PublicKey=" + Google.ProtocolBuffers.Properties.KnownKeys.PublishedKey)]
+
+[assembly: CLSCompliant(true)]
+
+namespace Google.ProtocolBuffers.Properties
+{
+ class KnownKeys
+ {
+ public const string PublishedKey = @"00240000048000009400000006020000002400005253413100040000110000003b4611704c5379" +
+ "39c3e0fbe9447dd6fa5462507f9dd4fd9fbf0712457e415b037da6d2c4eb5d2c7d29c86380af68" +
+ "7cf400401bb183f2a70bd3b631c1fcb7db8aa66c766694a9fb53fa765df6303104da8c978f3b6d" +
+ "53909cd30685b8bc9922c726cd82b5995e9e2cfca6df7a2d189d851492e49f4b76f269ce6dfd08" +
+ "c34a7d98";
+ }
+}
diff --git a/src/ProtocolBuffers/WireFormat.cs b/src/ProtocolBuffers/WireFormat.cs index 508f1b48..b98d364c 100644 --- a/src/ProtocolBuffers/WireFormat.cs +++ b/src/ProtocolBuffers/WireFormat.cs @@ -51,14 +51,14 @@ namespace Google.ProtocolBuffers { public static class WireFormat { #region Fixed sizes. - // TODO(jonskeet): Move these somewhere else. They're messy. Consider making FieldType a smarter kind of enum - internal const int Fixed32Size = 4; - internal const int Fixed64Size = 8; - internal const int SFixed32Size = 4; - internal const int SFixed64Size = 8; - internal const int FloatSize = 4; - internal const int DoubleSize = 8; - internal const int BoolSize = 1; + // TODO(jonskeet): Move these somewhere else. They're messy. Consider making FieldType a smarter kind of enum
+ public const int Fixed32Size = 4;
+ public const int Fixed64Size = 8;
+ public const int SFixed32Size = 4;
+ public const int SFixed64Size = 8;
+ public const int FloatSize = 4;
+ public const int DoubleSize = 8;
+ public const int BoolSize = 1; #endregion [CLSCompliant(false)] |