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.
Declaration
public static void AssertArgNotNull(IntPtr arg, string argName)
Parameters
System. argument to validate |
System. Name of the argument checked |
Exceptions
System. if |
AssertArgNotNull(Object, String)
Validate given argument isn't Null.
Declaration
public static void AssertArgNotNull(object arg, string argName)
Parameters
System. argument to validate |
System. Name of the argument checked |
Exceptions
System. if |
AssertArgNotNullOrEmpty(String, String)
Validate given argument isn't Null or empty.
Declaration
public static void AssertArgNotNullOrEmpty(string arg, string argName)
Parameters
System. argument to validate |
System. Name of the argument checked |
Exceptions
System. if |
AssertArgOfType<T>(Object, String)
Validate given argument isn't Null.
Declaration
public static T AssertArgOfType<T>(object arg, string argName)
Parameters
System. argument to validate |
System. Name of the argument checked |
Returns
T
arg cast as T/> |
Type Parameters
T
Type expected of arg/> |
Exceptions
System. 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. argument to validate |
System. Name of the argument checked |
Exceptions
System. if |
System. 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. Condition to assert. |
System. Exception message in-case of assert failure. |
Type Parameters
TException
Exception type to throw. |