C# Класс BuildLight.Core.CodeContracts.ParameterCheck

Precondition checking for methods.
Показать файл Открыть проект

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

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

Throws a Precondition exception if the provided object is null

StringRequiredAndNotWhitespace ( string parameter, string parameterName ) : void

Throw a Precondition exception if the provided string is null, empty or contains only whitespace.

Приватные методы

Метод Описание
GetParameterRequiredErrorMessage ( string parameterName ) : string
ParameterNameRequired ( string parameterName ) : void
Require ( bool assertion, string message ) : void

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

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

Throws a Precondition exception if the provided object is null
/// The object is null /// - or - /// The parameter name is null, empty or all whitespace ///
public static ParameterRequired ( object parameter, string parameterName ) : void
parameter object The object to test.
parameterName string The name of the parameter.
Результат void

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

Throw a Precondition exception if the provided string is null, empty or contains only whitespace.
/// The parameter is null, empty or contains only whitespace. /// - or - /// The parameter name is null, empty or all whitespace ///
public static StringRequiredAndNotWhitespace ( string parameter, string parameterName ) : void
parameter string Teh string parameter to check.
parameterName string The name of the string parameter (used in error messages).
Результат void