Class ArgChecker
- Namespace
- TheArtOfDev.HtmlRenderer.Core.Utils
- Assembly
- StockSharp.Xaml.dll
Static class that contains argument-checking methods
public static class ArgChecker
- Inheritance
-
ArgChecker
- Inherited Members
Methods
AssertArgNotNull(IntPtr, string)
Validate given argument isn't Zero.
public static void AssertArgNotNull(IntPtr arg, string argName)
Parameters
Exceptions
- ArgumentNullException
if
arg
is Zero
AssertArgNotNull(object, string)
Validate given argument isn't Null.
public static void AssertArgNotNull(object arg, string argName)
Parameters
Exceptions
- ArgumentNullException
if
arg
is Null
AssertArgNotNullOrEmpty(string, string)
Validate given argument isn't Null or empty.
public static void AssertArgNotNullOrEmpty(string arg, string argName)
Parameters
Exceptions
- ArgumentNullException
if
arg
is Null or empty
AssertArgOfType<T>(object, string)
Validate given argument isn't Null.
public static T AssertArgOfType<T>(object arg, string argName)
Parameters
Returns
- T
cast as
Type Parameters
T
Type expected of
Exceptions
- ArgumentNullException
if
arg
is Null
AssertFileExist(string, string)
Validate given argument isn't Null or empty AND argument value is the path of existing file.
public static void AssertFileExist(string arg, string argName)
Parameters
Exceptions
- ArgumentNullException
if
arg
is Null or empty- FileNotFoundException
if
file-path not exist
AssertIsTrue<TException>(bool, string)
Validate given
public static void AssertIsTrue<TException>(bool condition, string message) where TException : Exception, new()
Parameters
Type Parameters
TException
Exception type to throw.