C# 클래스 BuildLight.Core.CodeContracts.ParameterCheck

Precondition checking for methods.
파일 보기 프로젝트 열기: SouthsideSoftware/BuildLight

공개 메소드들

메소드 설명
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