C# Class EventSourced.Net.CommandValidator

Inheritance: IDisposable
Show file Open project: danludwig/eventsourced.net Class Usage Examples

Private Properties

Property Type Description
AddError void

Public Methods

Method Description
AddErrors ( CommandRejection[]>.IDictionary errors ) : void
AreEqual ( string value, string key, string otherValue ) : void
CommandValidator ( bool throwIfErrorsOnDispose = true ) : System
Dispose ( ) : void
EmailOrPhone ( string emailOrPhone, string key ) : void
HasError ( string key, CommandRejectionReason reason ) : bool
IsAvailable ( string value, string key, Func isAvailable ) : void
Length ( string value, string key, int minLength, int maxLength ) : void
LoggedOff ( IIdentity value, string key ) : void
NotEmpty ( System.Guid value, string key ) : void
NotEmpty ( string value, string key ) : void
NotNull ( object value, string key ) : void
NotPhoneNumber ( string possiblePhoneNumber, string key ) : void
OnlyCharacters ( string value, string key, string allowedCharacters, bool ignoreCase = true ) : void

Private Methods

Method Description
AddError ( string key, object value, CommandRejectionReason reason, object data = null ) : void

Method Details

AddErrors() public method

public AddErrors ( CommandRejection[]>.IDictionary errors ) : void
errors CommandRejection[]>.IDictionary
return void

AreEqual() public method

public AreEqual ( string value, string key, string otherValue ) : void
value string
key string
otherValue string
return void

CommandValidator() public method

public CommandValidator ( bool throwIfErrorsOnDispose = true ) : System
throwIfErrorsOnDispose bool
return System

Dispose() public method

public Dispose ( ) : void
return void

EmailOrPhone() public method

public EmailOrPhone ( string emailOrPhone, string key ) : void
emailOrPhone string
key string
return void

HasError() public method

public HasError ( string key, CommandRejectionReason reason ) : bool
key string
reason CommandRejectionReason
return bool

IsAvailable() public method

public IsAvailable ( string value, string key, Func isAvailable ) : void
value string
key string
isAvailable Func
return void

Length() public method

public Length ( string value, string key, int minLength, int maxLength ) : void
value string
key string
minLength int
maxLength int
return void

LoggedOff() public method

public LoggedOff ( IIdentity value, string key ) : void
value IIdentity
key string
return void

NotEmpty() public method

public NotEmpty ( System.Guid value, string key ) : void
value System.Guid
key string
return void

NotEmpty() public method

public NotEmpty ( string value, string key ) : void
value string
key string
return void

NotNull() public method

public NotNull ( object value, string key ) : void
value object
key string
return void

NotPhoneNumber() public method

public NotPhoneNumber ( string possiblePhoneNumber, string key ) : void
possiblePhoneNumber string
key string
return void

OnlyCharacters() public method

public OnlyCharacters ( string value, string key, string allowedCharacters, bool ignoreCase = true ) : void
value string
key string
allowedCharacters string
ignoreCase bool
return void