diff options
author | csharptest <roger@csharptest.net> | 2011-05-20 12:07:49 -0500 |
---|---|---|
committer | rogerk <devnull@localhost> | 2011-05-20 12:07:49 -0500 |
commit | 51eb1b405c852d1efc1dd3ca2d7e29fc0a8b67be (patch) | |
tree | 564ca90c278eb2a8370a717fbac0c3b8bbc6dbfd /src/ProtocolBuffers | |
parent | 5a80c378421d3a3cd4f19efcbafd9eaae089c3e9 (diff) | |
download | protobuf-51eb1b405c852d1efc1dd3ca2d7e29fc0a8b67be.tar.gz protobuf-51eb1b405c852d1efc1dd3ca2d7e29fc0a8b67be.tar.bz2 protobuf-51eb1b405c852d1efc1dd3ca2d7e29fc0a8b67be.zip |
Removed some uses of InternalsVisibleTo, made some stuff public
Diffstat (limited to 'src/ProtocolBuffers')
-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 |
5 files changed, 99 insertions, 102 deletions
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)] |