C# Класс ImageTools.Helpers.Guard

A static class with a lot of helper methods, which guards a method agains invalid parameters.
Показать файл Открыть проект

Открытые методы

Метод Описание
NotNull ( object target, string parameterName ) : void

Verifies, that the method parameter with specified object value and message is not null and throws an exception if the object is null.

NotNullOrEmpty ( string target, string parameterName ) : void

Verifies, that the string method parameter with specified object value and message is not null, not empty and does not contain only blanls and throws an exception if the object is null.

Описание методов

NotNull() публичный статический Метод

Verifies, that the method parameter with specified object value and message is not null and throws an exception if the object is null.
is /// null (Nothing in Visual Basic).
public static NotNull ( object target, string parameterName ) : void
target object The target object, which cannot be null.
parameterName string Name of the parameter.
Результат void

NotNullOrEmpty() публичный статический Метод

Verifies, that the string method parameter with specified object value and message is not null, not empty and does not contain only blanls and throws an exception if the object is null.
is /// null (Nothing in Visual Basic). is /// empty or contains only blanks.
public static NotNullOrEmpty ( string target, string parameterName ) : void
target string The target string, which should be checked against being null or empty.
parameterName string Name of the parameter.
Результат void