Class ArgChecker
Static class that contains argument-checking methods
Inheritance
Inherited Members
Namespace: TheArtOfDev.HtmlRenderer.Core.Utils
Assembly: Telerik.WinControls.RadMap.dll
Syntax
public static class ArgChecker
Methods
AssertArgNotNull(IntPtr, String)
Validate given argument isn't System.IntPtr.Zero.
Declaration
public static void AssertArgNotNull(IntPtr arg, string argName)
Parameters
System.IntPtr
arg
argument to validate |
System.String
argName
Name of the argument checked |
Exceptions
System.ArgumentNullException
if |
AssertArgNotNull(Object, String)
Validate given argument isn't Null.
Declaration
public static void AssertArgNotNull(object arg, string argName)
Parameters
System.Object
arg
argument to validate |
System.String
argName
Name of the argument checked |
Exceptions
System.ArgumentNullException
if |
AssertArgNotNullOrEmpty(String, String)
Validate given argument isn't Null or empty.
Declaration
public static void AssertArgNotNullOrEmpty(string arg, string argName)
Parameters
System.String
arg
argument to validate |
System.String
argName
Name of the argument checked |
Exceptions
System.ArgumentNullException
if |
AssertArgOfType<T>(Object, String)
Validate given argument isn't Null.
Declaration
public static T AssertArgOfType<T>(object arg, string argName)
Parameters
System.Object
arg
argument to validate |
System.String
argName
Name of the argument checked |
Returns
T
arg cast as T/> |
Type Parameters
T
Type expected of arg/> |
Exceptions
System.ArgumentNullException
if |
AssertFileExist(String, String)
Validate given argument isn't Null or empty AND argument value is the path of existing file.
Declaration
public static void AssertFileExist(string arg, string argName)
Parameters
System.String
arg
argument to validate |
System.String
argName
Name of the argument checked |
Exceptions
System.ArgumentNullException
if |
System.IO.FileNotFoundException
if arg file-path not exist |
AssertIsTrue<TException>(Boolean, String)
Validate given condition is true, otherwise throw exception.
Declaration
public static void AssertIsTrue<TException>(bool condition, string message)
where TException : Exception, new()
Parameters
System.Boolean
condition
Condition to assert. |
System.String
message
Exception message in-case of assert failure. |
Type Parameters
TException
Exception type to throw. |