/[xmltv_parser]/trunk/libxmltv/Core/ThrowHelper.cs
ViewVC logotype

Diff of /trunk/libxmltv/Core/ThrowHelper.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 92 by william, Sun Mar 10 08:21:30 2013 UTC revision 93 by william, Sun Mar 10 08:44:53 2013 UTC
# Line 219  namespace libxmltv.Core Line 219  namespace libxmltv.Core
219    
220          internal static void ThrowArgumentException(ExceptionResource resource)          internal static void ThrowArgumentException(ExceptionResource resource)
221          {          {
222              throw new ArgumentException(Environment.GetResourceString(GetResourceName(resource)));              throw new ArgumentException(ResourceStringHelper.GetResourceString(GetResourceName(resource)));
223          }          }
224    
225          internal static void ThrowArgumentException(ExceptionResource resource, ExceptionArgument argument)          internal static void ThrowArgumentException(ExceptionResource resource, ExceptionArgument argument)
226          {          {
227              throw new ArgumentException(Environment.GetResourceString(GetResourceName(resource)), GetArgumentName(argument));              throw new ArgumentException(ResourceStringHelper.GetResourceString(GetResourceName(resource)), GetArgumentName(argument));
228          }          }
229    
230          internal static void ThrowArgumentNullException(ExceptionArgument argument)          internal static void ThrowArgumentNullException(ExceptionArgument argument)
# Line 245  namespace libxmltv.Core Line 245  namespace libxmltv.Core
245    
246          internal static void ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)          internal static void ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
247          {          {
248              throw new ArgumentOutOfRangeException(GetArgumentName(argument), Environment.GetResourceString(GetResourceName(resource)));              throw new ArgumentOutOfRangeException(GetArgumentName(argument), ResourceStringHelper.GetResourceString(GetResourceName(resource)));
249          }          }
250    
251          internal static void ThrowInvalidOperationException(ExceptionResource resource)          internal static void ThrowInvalidOperationException(ExceptionResource resource)
252          {          {
253              throw new InvalidOperationException(Environment.GetResourceString(GetResourceName(resource)));              throw new InvalidOperationException(ResourceStringHelper.GetResourceString(GetResourceName(resource)));
254          }          }
255    
256          internal static void ThrowKeyNotFoundException()          internal static void ThrowKeyNotFoundException()
# Line 260  namespace libxmltv.Core Line 260  namespace libxmltv.Core
260    
261          internal static void ThrowNotSupportedException(ExceptionResource resource)          internal static void ThrowNotSupportedException(ExceptionResource resource)
262          {          {
263              throw new NotSupportedException(Environment.GetResourceString(GetResourceName(resource)));              throw new NotSupportedException(ResourceStringHelper.GetResourceString(GetResourceName(resource)));
264          }          }
265    
266          internal static void ThrowObjectDisposedException(string objectName, ExceptionResource resource)          internal static void ThrowObjectDisposedException(string objectName, ExceptionResource resource)
267          {          {
268              throw new ObjectDisposedException(objectName, Environment.GetResourceString(GetResourceName(resource)));              throw new ObjectDisposedException(objectName, ResourceStringHelper.GetResourceString(GetResourceName(resource)));
269          }          }
270    
271          internal static void ThrowSecurityException(ExceptionResource resource)          internal static void ThrowSecurityException(ExceptionResource resource)
272          {          {
273              throw new SecurityException(Environment.GetResourceString(GetResourceName(resource)));              throw new SecurityException(ResourceStringHelper.GetResourceString(GetResourceName(resource)));
274          }          }
275    
276          internal static void ThrowSerializationException(ExceptionResource resource)          internal static void ThrowSerializationException(ExceptionResource resource)
277          {          {
278              throw new SerializationException(Environment.GetResourceString(GetResourceName(resource)));              throw new SerializationException(ResourceStringHelper.GetResourceString(GetResourceName(resource)));
279          }          }
280    
281          internal static void ThrowUnauthorizedAccessException(ExceptionResource resource)          internal static void ThrowUnauthorizedAccessException(ExceptionResource resource)
282          {          {
283              throw new UnauthorizedAccessException(Environment.GetResourceString(GetResourceName(resource)));              throw new UnauthorizedAccessException(ResourceStringHelper.GetResourceString(GetResourceName(resource)));
284          }          }
285    
286          internal static void ThrowWrongKeyTypeArgumentException(object key, Type targetType)          internal static void ThrowWrongKeyTypeArgumentException(object key, Type targetType)
287          {          {
288              throw new ArgumentException(Environment.GetResourceString("Arg_WrongType", new object[] { key, targetType }), "key");              throw new ArgumentException(ResourceStringHelper.GetResourceString("Arg_WrongType", new object[] { key, targetType }), "key");
289          }          }
290    
291          internal static void ThrowWrongValueTypeArgumentException(object value, Type targetType)          internal static void ThrowWrongValueTypeArgumentException(object value, Type targetType)
292          {          {
293              throw new ArgumentException(Environment.GetResourceString("Arg_WrongType", new object[] { value, targetType }), "value");              throw new ArgumentException(ResourceStringHelper.GetResourceString("Arg_WrongType", new object[] { value, targetType }), "value");
294          }          }
295      }      }
296  }  }

Legend:
Removed from v.92  
changed lines
  Added in v.93

  ViewVC Help
Powered by ViewVC 1.1.22