Example #1
0
 internal static void ThrowUnauthorizedAccessException(ExceptionResource resource)
 {
     throw new UnauthorizedAccessException(Environment.GetResourceString(ThrowHelper.GetResourceName(resource)));
 }
Example #2
0
 internal static void ThrowObjectDisposedException(string objectName, ExceptionResource resource)
 {
     throw new ObjectDisposedException(objectName, Environment.GetResourceString(ThrowHelper.GetResourceName(resource)));
 }
Example #3
0
 internal static void ThrowNotSupportedException(ExceptionResource resource)
 {
     throw new NotSupportedException(Environment.GetResourceString(ThrowHelper.GetResourceName(resource)));
 }
Example #4
0
 internal static void ThrowSecurityException(ExceptionResource resource)
 {
     throw new SecurityException(Environment.GetResourceString(ThrowHelper.GetResourceName(resource)));
 }
Example #5
0
 internal static void ThrowInvalidOperationException(ExceptionResource resource)
 {
     throw new InvalidOperationException(Environment.GetResourceString(ThrowHelper.GetResourceName(resource)));
 }
Example #6
0
 internal static void ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
 {
     if (CompatibilitySwitches.IsAppEarlierThanWindowsPhone8)
     {
         throw new ArgumentOutOfRangeException(ThrowHelper.GetArgumentName(argument), string.Empty);
     }
     throw new ArgumentOutOfRangeException(ThrowHelper.GetArgumentName(argument), Environment.GetResourceString(ThrowHelper.GetResourceName(resource)));
 }
Example #7
0
 internal static void ThrowArgumentException(ExceptionResource resource, ExceptionArgument argument)
 {
     throw new ArgumentException(Environment.GetResourceString(ThrowHelper.GetResourceName(resource)), ThrowHelper.GetArgumentName(argument));
 }