Exemplo n.º 1
0
 internal static void ThrowArgumentException(ExceptionResource resource, ExceptionArgument argument)
 {
     throw new ArgumentException(MyEnvironment.GetResourceString(GetResourceName(resource)), GetArgumentName(argument));
 }
Exemplo n.º 2
0
 internal static void ThrowWrongKeyTypeArgumentException(object key, Type targetType)
 {
     throw new ArgumentException(MyEnvironment.GetResourceString("Arg_WrongType", key, targetType), "key");
 }
Exemplo n.º 3
0
 internal static void ThrowWrongValueTypeArgumentException(object value, Type targetType)
 {
     throw new ArgumentException(MyEnvironment.GetResourceString("Arg_WrongType", value, targetType), "value");
 }
Exemplo n.º 4
0
 internal static void ThrowObjectDisposedException(string objectName, ExceptionResource resource)
 {
     throw new ObjectDisposedException(objectName, MyEnvironment.GetResourceString(GetResourceName(resource)));
 }
Exemplo n.º 5
0
 internal static void ThrowUnauthorizedAccessException(ExceptionResource resource)
 {
     throw new UnauthorizedAccessException(MyEnvironment.GetResourceString(GetResourceName(resource)));
 }
Exemplo n.º 6
0
 internal static void ThrowNotSupportedException(ExceptionResource resource)
 {
     throw new NotSupportedException(MyEnvironment.GetResourceString(GetResourceName(resource)));
 }
Exemplo n.º 7
0
 internal static void ThrowSecurityException(ExceptionResource resource)
 {
     throw new SecurityException(MyEnvironment.GetResourceString(GetResourceName(resource)));
 }
Exemplo n.º 8
0
 internal static void ThrowInvalidOperationException(ExceptionResource resource)
 {
     throw new InvalidOperationException(MyEnvironment.GetResourceString(GetResourceName(resource)));
 }