Table of Contents

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

arg IntPtr

argument to validate

argName string

Name of the argument checked

Exceptions

ArgumentNullException

if arg is Zero

AssertArgNotNull(object, string)

Validate given argument isn't Null.

public static void AssertArgNotNull(object arg, string argName)

Parameters

arg object

argument to validate

argName string

Name of the argument checked

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

arg string

argument to validate

argName string

Name of the argument checked

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

arg object

argument to validate

argName string

Name of the argument checked

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

arg string

argument to validate

argName string

Name of the argument checked

Exceptions

ArgumentNullException

if arg is Null or empty

FileNotFoundException

if file-path not exist

AssertIsTrue<TException>(bool, string)

Validate given is true, otherwise throw exception.

public static void AssertIsTrue<TException>(bool condition, string message) where TException : Exception, new()

Parameters

condition bool

Condition to assert.

message string

Exception message in-case of assert failure.

Type Parameters

TException

Exception type to throw.