internal static void ThrowArgumentNullException(ExceptionResource resource) => throw new ArgumentNullException(ThrowHelper.GetResourceString(resource));
internal static void ThrowArgumentNullException( ExceptionArgument argument, ExceptionResource resource) { throw new ArgumentNullException(ThrowHelper.GetArgumentName(argument), ThrowHelper.GetResourceString(resource)); }
private static ArgumentException GetArgumentException( ExceptionResource resource, ExceptionArgument argument) { return(new ArgumentException(ThrowHelper.GetResourceString(resource), ThrowHelper.GetArgumentName(argument))); }
private static ArgumentOutOfRangeException GetArgumentOutOfRangeException( ExceptionArgument argument, int paramNumber, ExceptionResource resource) { return(new ArgumentOutOfRangeException(ThrowHelper.GetArgumentName(argument) + "[" + paramNumber.ToString() + "]", ThrowHelper.GetResourceString(resource))); }
private static ArgumentException GetArgumentException( ExceptionResource resource) { return(new ArgumentException(ThrowHelper.GetResourceString(resource))); }
private static InvalidOperationException GetInvalidOperationException( ExceptionResource resource) { return(new InvalidOperationException(ThrowHelper.GetResourceString(resource))); }
internal static void ThrowObjectDisposedException(string objectName, ExceptionResource resource) => throw new ObjectDisposedException(objectName, ThrowHelper.GetResourceString(resource));
internal static void ThrowObjectDisposedException(ExceptionResource resource) => throw new ObjectDisposedException((string)null, ThrowHelper.GetResourceString(resource));
internal static void ThrowUnauthorizedAccessException(ExceptionResource resource) => throw new UnauthorizedAccessException(ThrowHelper.GetResourceString(resource));
internal static void ThrowNotSupportedException(ExceptionResource resource) => throw new NotSupportedException(ThrowHelper.GetResourceString(resource));
internal static void ThrowRankException(ExceptionResource resource) => throw new RankException(ThrowHelper.GetResourceString(resource));
internal static void ThrowSerializationException(ExceptionResource resource) => throw new SerializationException(ThrowHelper.GetResourceString(resource));
internal static void ThrowInvalidOperationException(ExceptionResource resource, Exception e) => throw new InvalidOperationException(ThrowHelper.GetResourceString(resource), e);