From efc90f40009924c2e2863cfadbf4f937dd045e9d Mon Sep 17 00:00:00 2001 From: csharptest Date: Sun, 14 Oct 2012 19:50:52 -0500 Subject: [PATCH] Changes to support the Portable Library profile --- src/AddressBook/Properties/AssemblyInfo.cs | 10 ---------- src/ProtoBench/Properties/AssemblyInfo.cs | 10 ---------- src/ProtoDump/Properties/AssemblyInfo.cs | 10 ---------- src/ProtoGen.Test/Properties/AssemblyInfo.cs | 10 ---------- src/ProtoGen/Properties/AssemblyInfo.cs | 10 ---------- src/ProtoMunge/Properties/AssemblyInfo.cs | 10 ---------- .../Properties/AssemblyInfo.cs | 9 --------- .../Properties/AssemblyInfo.cs | 14 -------------- src/ProtocolBuffers/FrameworkPortability.cs | 6 +++--- src/ProtocolBuffers/Properties/AssemblyInfo.cs | 9 --------- src/ProtocolBuffers/ThrowHelper.cs | 6 +++++- 11 files changed, 8 insertions(+), 96 deletions(-) diff --git a/src/AddressBook/Properties/AssemblyInfo.cs b/src/AddressBook/Properties/AssemblyInfo.cs index 614103af4e..2b7bfeab35 100644 --- a/src/AddressBook/Properties/AssemblyInfo.cs +++ b/src/AddressBook/Properties/AssemblyInfo.cs @@ -14,16 +14,6 @@ using System.Runtime.InteropServices; [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("57123e6e-28d1-4b9e-80a5-5e720df8035a")] - // Version information for an assembly consists of the following four values: // // Major Version diff --git a/src/ProtoBench/Properties/AssemblyInfo.cs b/src/ProtoBench/Properties/AssemblyInfo.cs index 1723bf3d76..6ec393e498 100644 --- a/src/ProtoBench/Properties/AssemblyInfo.cs +++ b/src/ProtoBench/Properties/AssemblyInfo.cs @@ -15,18 +15,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyCopyright("Copyright © 2009")] [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)] [assembly: CLSCompliant(true)] -// The following GUID is for the ID of the typelib if this project is exposed to COM - -[assembly: Guid("0f515d09-9a6c-49ec-8500-14a5303ebadf")] - // Version information for an assembly consists of the following four values: // // Major Version diff --git a/src/ProtoDump/Properties/AssemblyInfo.cs b/src/ProtoDump/Properties/AssemblyInfo.cs index e27f9774a2..c82d88287e 100644 --- a/src/ProtoDump/Properties/AssemblyInfo.cs +++ b/src/ProtoDump/Properties/AssemblyInfo.cs @@ -15,16 +15,6 @@ using System.Runtime.InteropServices; [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("fed7572b-d747-4704-a6da-6c3c61088346")] - // Version information for an assembly consists of the following four values: // // Major Version diff --git a/src/ProtoGen.Test/Properties/AssemblyInfo.cs b/src/ProtoGen.Test/Properties/AssemblyInfo.cs index 703dfd0abe..335ab538d6 100644 --- a/src/ProtoGen.Test/Properties/AssemblyInfo.cs +++ b/src/ProtoGen.Test/Properties/AssemblyInfo.cs @@ -15,16 +15,6 @@ using System.Runtime.InteropServices; [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("40720ee3-2d15-4271-8c42-8f9cfd01b52f")] - // Version information for an assembly consists of the following four values: // // Major Version diff --git a/src/ProtoGen/Properties/AssemblyInfo.cs b/src/ProtoGen/Properties/AssemblyInfo.cs index 2a20b0f655..aec277cc44 100644 --- a/src/ProtoGen/Properties/AssemblyInfo.cs +++ b/src/ProtoGen/Properties/AssemblyInfo.cs @@ -14,16 +14,6 @@ using System.Runtime.InteropServices; [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("7101763b-7a38-41be-87f5-7ede4c554509")] - // Version information for an assembly consists of the following four values: // // Major Version diff --git a/src/ProtoMunge/Properties/AssemblyInfo.cs b/src/ProtoMunge/Properties/AssemblyInfo.cs index 4345165297..3d3c6eb541 100644 --- a/src/ProtoMunge/Properties/AssemblyInfo.cs +++ b/src/ProtoMunge/Properties/AssemblyInfo.cs @@ -15,16 +15,6 @@ using System.Runtime.InteropServices; [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("4d26ed0e-a6ca-4df9-bb87-59429d49b676")] - // Version information for an assembly consists of the following four values: // // Major Version diff --git a/src/ProtocolBuffers.Serialization/Properties/AssemblyInfo.cs b/src/ProtocolBuffers.Serialization/Properties/AssemblyInfo.cs index fec3b29ed4..1fbc9e479a 100644 --- a/src/ProtocolBuffers.Serialization/Properties/AssemblyInfo.cs +++ b/src/ProtocolBuffers.Serialization/Properties/AssemblyInfo.cs @@ -46,15 +46,6 @@ using System.Runtime.CompilerServices; [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: // diff --git a/src/ProtocolBuffers.Test/Properties/AssemblyInfo.cs b/src/ProtocolBuffers.Test/Properties/AssemblyInfo.cs index f636f542e4..d24bb5219d 100644 --- a/src/ProtocolBuffers.Test/Properties/AssemblyInfo.cs +++ b/src/ProtocolBuffers.Test/Properties/AssemblyInfo.cs @@ -16,16 +16,6 @@ using System.Runtime.InteropServices; [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("54e627c3-daaa-4850-82cf-f25b7f097e78")] - // Version information for an assembly consists of the following four values: // // Major Version @@ -39,10 +29,6 @@ using System.Runtime.InteropServices; [assembly: AssemblyVersion("2.4.1.473")] -#if !NOFILEVERSION -[assembly: AssemblyFileVersion("2.4.1.473")] -#endif - // We don't really need CLSCompliance, but if the assembly builds with no warnings, // that means the generator is okay. diff --git a/src/ProtocolBuffers/FrameworkPortability.cs b/src/ProtocolBuffers/FrameworkPortability.cs index fee8fbace0..8ce819871a 100644 --- a/src/ProtocolBuffers/FrameworkPortability.cs +++ b/src/ProtocolBuffers/FrameworkPortability.cs @@ -52,10 +52,10 @@ namespace Google.ProtocolBuffers internal static readonly string NewLine = System.Environment.NewLine; #endif -#if SILVERLIGHT - internal const RegexOptions CompiledRegexWhereAvailable = RegexOptions.None; -#else +#if CLIENTPROFILE internal const RegexOptions CompiledRegexWhereAvailable = RegexOptions.Compiled; +#else + internal const RegexOptions CompiledRegexWhereAvailable = RegexOptions.None; #endif internal static CultureInfo InvariantCulture diff --git a/src/ProtocolBuffers/Properties/AssemblyInfo.cs b/src/ProtocolBuffers/Properties/AssemblyInfo.cs index fec3b29ed4..1fbc9e479a 100644 --- a/src/ProtocolBuffers/Properties/AssemblyInfo.cs +++ b/src/ProtocolBuffers/Properties/AssemblyInfo.cs @@ -46,15 +46,6 @@ using System.Runtime.CompilerServices; [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: // diff --git a/src/ProtocolBuffers/ThrowHelper.cs b/src/ProtocolBuffers/ThrowHelper.cs index 34b3f65377..69e5f569a7 100644 --- a/src/ProtocolBuffers/ThrowHelper.cs +++ b/src/ProtocolBuffers/ThrowHelper.cs @@ -82,7 +82,11 @@ namespace Google.ProtocolBuffers public static Exception CreateMissingMethod(Type type, string methodName) { - return new MissingMethodException(String.Format("The method '{0}' was not found on type {1}", methodName, type)); +#if CLIENTPROFILE + return new System.MissingMethodException(type.FullName, methodName); +#else + return new System.ArgumentException(String.Format("The method '{0}' was not found on type {1}.", methodName, type)); +#endif } } } \ No newline at end of file