ArgChecker

TheArtOfDev.HtmlRenderer.Core.Utils

Static class that contains argument-checking methods

Métodos

AssertArgNotNull(object, string)

Validate given argument isn't Null.

arg
argument to validate
argName
Name of the argument checked
AssertArgNotNull(nint, string)

Validate given argument isn't Zero.

arg
argument to validate
argName
Name of the argument checked
AssertArgNotNullOrEmpty(string, string)

Validate given argument isn't Null or empty.

arg
argument to validate
argName
Name of the argument checked
AssertArgOfType``1(object, string)

Validate given argument isn't Null.

arg
argument to validate
argName
Name of the argument checked

Retorna: cast as

AssertFileExist(string, string)

Validate given argument isn't Null or empty AND argument value is the path of existing file.

arg
argument to validate
argName
Name of the argument checked
AssertIsTrue``1(bool, string)

Validate given is true, otherwise throw exception.

condition
Condition to assert.
message
Exception message in-case of assert failure.