C# Class Helios.Util.Guard

Guard class for protecting against stupid input
ファイルを表示 Open project: helios-io/helios

Public Methods

Method Description
Against ( this str, char illegalChar, string message = null ) : void
Against ( this str, string illegalSubstr, string message = null ) : void
NotGreaterThan ( this value, int maximumValue ) : void
NotLessThan ( this value, int minimumValue ) : void
NotNegative ( this value ) : void
True ( bool boolean, string errorMessage = "Expression should be true, but was false" ) : void

Method Details

Against() public static method

public static Against ( this str, char illegalChar, string message = null ) : void
str this
illegalChar char
message string
return void

Against() public static method

public static Against ( this str, string illegalSubstr, string message = null ) : void
str this
illegalSubstr string
message string
return void

NotGreaterThan() public static method

public static NotGreaterThan ( this value, int maximumValue ) : void
value this
maximumValue int
return void

NotLessThan() public static method

public static NotLessThan ( this value, int minimumValue ) : void
value this
minimumValue int
return void

NotNegative() public static method

public static NotNegative ( this value ) : void
value this
return void

True() public static method

public static True ( bool boolean, string errorMessage = "Expression should be true, but was false" ) : void
boolean bool
errorMessage string
return void