diff options
author | Jon Skeet <skeet@pobox.com> | 2015-06-19 17:30:13 +0100 |
---|---|---|
committer | Jon Skeet <skeet@pobox.com> | 2015-06-19 17:30:13 +0100 |
commit | cdeda4b87625084f5687115bb1fd7772b7c34ad6 (patch) | |
tree | 373f4c38dbfb318626037ff204c30466574ab876 /csharp/src/ProtocolBuffers/ThrowHelper.cs | |
parent | d7dda2fed8c37a83e2d4cd7ecc4201b628588c4c (diff) | |
download | protobuf-cdeda4b87625084f5687115bb1fd7772b7c34ad6.tar.gz protobuf-cdeda4b87625084f5687115bb1fd7772b7c34ad6.tar.bz2 protobuf-cdeda4b87625084f5687115bb1fd7772b7c34ad6.zip |
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
Diffstat (limited to 'csharp/src/ProtocolBuffers/ThrowHelper.cs')
-rw-r--r-- | csharp/src/ProtocolBuffers/ThrowHelper.cs | 17 |
1 files changed, 4 insertions, 13 deletions
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 /// <summary>
/// Helper methods for throwing exceptions
/// </summary>
- public static class ThrowHelper
+ internal static class ThrowHelper
{
/// <summary>
/// Throws an ArgumentNullException if the given value is null.
/// </summary>
- 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 /// <summary>
/// Throws an ArgumentNullException if the given value is null.
/// </summary>
- public static void ThrowIfNull(object value)
+ internal static void ThrowIfNull(object value)
{
if (value == null)
{
@@ -69,7 +69,7 @@ namespace Google.Protobuf /// <summary>
/// Throws an ArgumentNullException if the given value or any element within it is null.
/// </summary>
- public static void ThrowIfAnyNull<T>(IEnumerable<T> sequence)
+ internal static void ThrowIfAnyNull<T>(IEnumerable<T> 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 |