aboutsummaryrefslogtreecommitdiff
path: root/csharp/src/ProtocolBuffers/ThrowHelper.cs
diff options
context:
space:
mode:
Diffstat (limited to 'csharp/src/ProtocolBuffers/ThrowHelper.cs')
-rw-r--r--csharp/src/ProtocolBuffers/ThrowHelper.cs19
1 files changed, 5 insertions, 14 deletions
diff --git a/csharp/src/ProtocolBuffers/ThrowHelper.cs b/csharp/src/ProtocolBuffers/ThrowHelper.cs
index 69e5f569..c12a48a3 100644
--- a/csharp/src/ProtocolBuffers/ThrowHelper.cs
+++ b/csharp/src/ProtocolBuffers/ThrowHelper.cs
@@ -37,17 +37,17 @@
using System;
using System.Collections.Generic;
-namespace Google.ProtocolBuffers
+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.ProtocolBuffers
/// <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.ProtocolBuffers
/// <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.ProtocolBuffers
}
}
}
-
- 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