From cdeda4b87625084f5687115bb1fd7772b7c34ad6 Mon Sep 17 00:00:00 2001 From: Jon Skeet Date: Fri, 19 Jun 2015 17:30:13 +0100 Subject: Minor cleanup. - Make some members internal - Remove a lot of FrameworkPortability that isn't required - Start adding documentation comments - Remove some more group-based members - Not passing in "the last tag read" into Read*Array, g --- csharp/src/ProtocolBuffers/ThrowHelper.cs | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) (limited to 'csharp/src/ProtocolBuffers/ThrowHelper.cs') diff --git a/csharp/src/ProtocolBuffers/ThrowHelper.cs b/csharp/src/ProtocolBuffers/ThrowHelper.cs index 097b5032..c12a48a3 100644 --- a/csharp/src/ProtocolBuffers/ThrowHelper.cs +++ b/csharp/src/ProtocolBuffers/ThrowHelper.cs @@ -42,12 +42,12 @@ namespace Google.Protobuf /// /// Helper methods for throwing exceptions /// - public static class ThrowHelper + internal static class ThrowHelper { /// /// Throws an ArgumentNullException if the given value is null. /// - public static void ThrowIfNull(object value, string name) + internal static void ThrowIfNull(object value, string name) { if (value == null) { @@ -58,7 +58,7 @@ namespace Google.Protobuf /// /// Throws an ArgumentNullException if the given value is null. /// - public static void ThrowIfNull(object value) + internal static void ThrowIfNull(object value) { if (value == null) { @@ -69,7 +69,7 @@ namespace Google.Protobuf /// /// Throws an ArgumentNullException if the given value or any element within it is null. /// - public static void ThrowIfAnyNull(IEnumerable sequence) + internal static void ThrowIfAnyNull(IEnumerable sequence) { foreach (T t in sequence) { @@ -79,14 +79,5 @@ namespace Google.Protobuf } } } - - public static Exception CreateMissingMethod(Type type, string methodName) - { -#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 -- cgit v1.2.3