Exemple #1
0
 internal static void ThrowArgumentNullException(ExceptionResource resource) => throw new ArgumentNullException(ThrowHelper.GetResourceString(resource));
Exemple #2
0
 internal static void ThrowArgumentNullException(
     ExceptionArgument argument,
     ExceptionResource resource)
 {
     throw new ArgumentNullException(ThrowHelper.GetArgumentName(argument), ThrowHelper.GetResourceString(resource));
 }
Exemple #3
0
 private static ArgumentException GetArgumentException(
     ExceptionResource resource,
     ExceptionArgument argument)
 {
     return(new ArgumentException(ThrowHelper.GetResourceString(resource), ThrowHelper.GetArgumentName(argument)));
 }
Exemple #4
0
 private static ArgumentOutOfRangeException GetArgumentOutOfRangeException(
     ExceptionArgument argument,
     int paramNumber,
     ExceptionResource resource)
 {
     return(new ArgumentOutOfRangeException(ThrowHelper.GetArgumentName(argument) + "[" + paramNumber.ToString() + "]", ThrowHelper.GetResourceString(resource)));
 }
Exemple #5
0
 private static ArgumentException GetArgumentException(
     ExceptionResource resource)
 {
     return(new ArgumentException(ThrowHelper.GetResourceString(resource)));
 }
Exemple #6
0
 private static InvalidOperationException GetInvalidOperationException(
     ExceptionResource resource)
 {
     return(new InvalidOperationException(ThrowHelper.GetResourceString(resource)));
 }
Exemple #7
0
 internal static void ThrowObjectDisposedException(string objectName, ExceptionResource resource) => throw new ObjectDisposedException(objectName, ThrowHelper.GetResourceString(resource));
Exemple #8
0
 internal static void ThrowObjectDisposedException(ExceptionResource resource) => throw new ObjectDisposedException((string)null, ThrowHelper.GetResourceString(resource));
Exemple #9
0
 internal static void ThrowUnauthorizedAccessException(ExceptionResource resource) => throw new UnauthorizedAccessException(ThrowHelper.GetResourceString(resource));
Exemple #10
0
 internal static void ThrowNotSupportedException(ExceptionResource resource) => throw new NotSupportedException(ThrowHelper.GetResourceString(resource));
Exemple #11
0
 internal static void ThrowRankException(ExceptionResource resource) => throw new RankException(ThrowHelper.GetResourceString(resource));
Exemple #12
0
 internal static void ThrowSerializationException(ExceptionResource resource) => throw new SerializationException(ThrowHelper.GetResourceString(resource));
Exemple #13
0
 internal static void ThrowInvalidOperationException(ExceptionResource resource, Exception e) => throw new InvalidOperationException(ThrowHelper.GetResourceString(resource), e);