CSLA.NET 5.4.2
CSLA .NET is a software development framework that helps you build a reusable, maintainable object-oriented business layer for your app.
Csla.Validation.CommonRules.RegExRuleArgs Class Reference

Custom RuleArgs object required by the RegExMatch rule method. More...

Inheritance diagram for Csla.Validation.CommonRules.RegExRuleArgs:
Csla.Validation.DecoratedRuleArgs Csla.Validation.RuleArgs

Public Types

enum  NullResultOptions { ReturnFalse , ReturnTrue , ConvertToEmptyString }
 List of options for the NullResult property. More...
 

Public Member Functions

 RegExRuleArgs (string propertyName, RegExPatterns pattern)
 Creates a new object. More...
 
 RegExRuleArgs (Core.IPropertyInfo propertyInfo, RegExPatterns pattern)
 Creates a new object. More...
 
 RegExRuleArgs (string propertyName, string friendlyName, RegExPatterns pattern)
 Creates a new object. More...
 
 RegExRuleArgs (string propertyName, string pattern)
 Creates a new object. More...
 
 RegExRuleArgs (Core.IPropertyInfo propertyInfo, string pattern)
 Creates a new object. More...
 
 RegExRuleArgs (string propertyName, string friendlyName, string pattern)
 Creates a new object. More...
 
 RegExRuleArgs (string propertyName, System.Text.RegularExpressions.Regex regEx)
 Creates a new object. More...
 
 RegExRuleArgs (Core.IPropertyInfo propertyInfo, System.Text.RegularExpressions.Regex regEx)
 Creates a new object. More...
 
 RegExRuleArgs (string propertyName, string friendlyName, System.Text.RegularExpressions.Regex regEx)
 Creates a new object. More...
 
 RegExRuleArgs (string propertyName, RegExPatterns pattern, NullResultOptions nullResult)
 Creates a new object. More...
 
 RegExRuleArgs (Core.IPropertyInfo propertyInfo, RegExPatterns pattern, NullResultOptions nullResult)
 Creates a new object. More...
 
 RegExRuleArgs (string propertyName, string friendlyName, RegExPatterns pattern, NullResultOptions nullResult)
 Creates a new object. More...
 
 RegExRuleArgs (string propertyName, string pattern, NullResultOptions nullResult)
 Creates a new object. More...
 
 RegExRuleArgs (Core.IPropertyInfo propertyInfo, string pattern, NullResultOptions nullResult)
 Creates a new object. More...
 
 RegExRuleArgs (string propertyName, string friendlyName, string pattern, NullResultOptions nullResult)
 Creates a new object. More...
 
 RegExRuleArgs (string propertyName, System.Text.RegularExpressions.Regex regEx, NullResultOptions nullResult)
 Creates a new object. More...
 
 RegExRuleArgs (Core.IPropertyInfo propertyInfo, System.Text.RegularExpressions.Regex regEx, NullResultOptions nullResult)
 Creates a new object. More...
 
 RegExRuleArgs (string propertyName, string friendlyName, System.Text.RegularExpressions.Regex regEx, NullResultOptions nullResult)
 Creates a new object. More...
 
- Public Member Functions inherited from Csla.Validation.DecoratedRuleArgs
 DecoratedRuleArgs (string propertyName)
 Creates an instance of RuleArgs. More...
 
 DecoratedRuleArgs (Core.IPropertyInfo propertyInfo)
 Creates an instance of RuleArgs. More...
 
 DecoratedRuleArgs (string propertyName, string friendlyName)
 Creates an instance of RuleArgs. More...
 
 DecoratedRuleArgs (string propertyName, RuleSeverity severity)
 Creates an instance of RuleArgs. More...
 
 DecoratedRuleArgs (Core.IPropertyInfo propertyInfo, RuleSeverity severity)
 Creates an instance of RuleArgs. More...
 
 DecoratedRuleArgs (string propertyName, string friendlyName, RuleSeverity severity)
 Creates an instance of RuleArgs. More...
 
 DecoratedRuleArgs (string propertyName, RuleSeverity severity, bool stopProcessing)
 Creates an instance of RuleArgs. More...
 
 DecoratedRuleArgs (Core.IPropertyInfo propertyInfo, RuleSeverity severity, bool stopProcessing)
 Creates an instance of RuleArgs. More...
 
 DecoratedRuleArgs (string propertyName, string friendlyName, RuleSeverity severity, bool stopProcessing)
 Creates an instance of RuleArgs. More...
 
 DecoratedRuleArgs (string propertyName, Dictionary< string, object > args)
 Creates an instance of RuleArgs. More...
 
 DecoratedRuleArgs (Core.IPropertyInfo propertyInfo, Dictionary< string, object > args)
 Creates an instance of RuleArgs. More...
 
 DecoratedRuleArgs (string propertyName, string friendlyName, Dictionary< string, object > args)
 Creates an instance of RuleArgs. More...
 
 DecoratedRuleArgs (string propertyName, RuleSeverity severity, Dictionary< string, object > args)
 Creates an instance of RuleArgs. More...
 
 DecoratedRuleArgs (Core.IPropertyInfo propertyInfo, RuleSeverity severity, Dictionary< string, object > args)
 Creates an instance of RuleArgs. More...
 
 DecoratedRuleArgs (string propertyName, string friendlyName, RuleSeverity severity, Dictionary< string, object > args)
 Creates an instance of RuleArgs. More...
 
 DecoratedRuleArgs (string propertyName, RuleSeverity severity, bool stopProcessing, Dictionary< string, object > args)
 Creates an instance of RuleArgs. More...
 
 DecoratedRuleArgs (Core.IPropertyInfo propertyInfo, RuleSeverity severity, bool stopProcessing, Dictionary< string, object > args)
 Creates an instance of RuleArgs. More...
 
 DecoratedRuleArgs (string propertyName, string friendlyName, RuleSeverity severity, bool stopProcessing, Dictionary< string, object > args)
 Creates an instance of RuleArgs. More...
 
override string ToString ()
 Return a string representation of the object using the rule:// URI format. More...
 
- Public Member Functions inherited from Csla.Validation.RuleArgs
 RuleArgs (string propertyName)
 Creates an instance of RuleArgs. More...
 
 RuleArgs (Core.IPropertyInfo propertyInfo)
 Creates an instance of RuleArgs. More...
 
 RuleArgs (string propertyName, string friendlyName)
 Creates an instance of RuleArgs. More...
 
 RuleArgs (string propertyName, RuleSeverity severity)
 Creates an instance of RuleArgs. More...
 
 RuleArgs (Core.IPropertyInfo propertyInfo, RuleSeverity severity)
 Creates an instance of RuleArgs. More...
 
 RuleArgs (string propertyName, string friendlyName, RuleSeverity severity)
 Creates an instance of RuleArgs. More...
 
 RuleArgs (string propertyName, RuleSeverity severity, bool stopProcessing)
 Creates an instance of RuleArgs. More...
 
 RuleArgs (Core.IPropertyInfo propertyInfo, RuleSeverity severity, bool stopProcessing)
 Creates an instance of RuleArgs. More...
 
 RuleArgs (string propertyName, string friendlyName, RuleSeverity severity, bool stopProcessing)
 Creates an instance of RuleArgs. More...
 
override string ToString ()
 Returns a string representation of the object. More...
 

Static Public Member Functions

static string GetPattern (RegExPatterns pattern)
 Returns the specified built-in regex pattern. More...
 
- Static Public Member Functions inherited from Csla.Validation.RuleArgs
static string GetPropertyName (RuleArgs e)
 Gets the property name from the RuleArgs object, using the friendly name if one is defined. More...
 

Properties

Regex RegEx [get]
 The RegEx object used to validate the property. More...
 
NullResultOptions NullResult [get]
 Gets a value indicating whether a null value means the rule will return true or false. More...
 
- Properties inherited from Csla.Validation.DecoratedRuleArgs
object this[string key] [getset]
 Gets or sets an argument value for use by the rule method. More...
 
- Properties inherited from Csla.Validation.RuleArgs
string PropertyName [get]
 The name of the property to be validated. More...
 
string PropertyFriendlyName [getset]
 Gets or sets a friendly name for the property, which will be used in place of the property name when creating the broken rule description string. More...
 
string Description [getset]
 Set by the rule handler method to describe the broken rule. More...
 
RuleSeverity Severity [getset]
 Gets or sets the severity of the broken rule. More...
 
bool StopProcessing [getset]
 Gets or sets a value indicating whether this broken rule should stop the processing of subsequent rules for this property. More...
 

Detailed Description

Custom RuleArgs object required by the RegExMatch rule method.

Definition at line 965 of file Csla.Validation.Shared/CommonRules.cs.

Member Enumeration Documentation

◆ NullResultOptions

List of options for the NullResult property.

Enumerator
ReturnFalse 

Indicates that a null value should always result in the rule returning false.

ReturnTrue 

Indicates that a null value should always result in the rule returning true.

ConvertToEmptyString 

Indicates that a null value should be converted to an empty string before the regular expression is evaluated.

Definition at line 973 of file Csla.Validation.Shared/CommonRules.cs.

Constructor & Destructor Documentation

◆ RegExRuleArgs() [1/18]

Csla.Validation.CommonRules.RegExRuleArgs.RegExRuleArgs ( string  propertyName,
RegExPatterns  pattern 
)

Creates a new object.

Parameters
propertyNameName of the property to validate.
patternBuilt-in regex pattern to use.

Definition at line 1025 of file Csla.Validation.Shared/CommonRules.cs.

◆ RegExRuleArgs() [2/18]

Csla.Validation.CommonRules.RegExRuleArgs.RegExRuleArgs ( Core.IPropertyInfo  propertyInfo,
RegExPatterns  pattern 
)

Creates a new object.

Parameters
propertyInfoProperty to validate.
patternBuilt-in regex pattern to use.

Definition at line 1037 of file Csla.Validation.Shared/CommonRules.cs.

◆ RegExRuleArgs() [3/18]

Csla.Validation.CommonRules.RegExRuleArgs.RegExRuleArgs ( string  propertyName,
string  friendlyName,
RegExPatterns  pattern 
)

Creates a new object.

Parameters
propertyNameName of the property to validate.
friendlyNameA friendly name for the property, which will be used in place of the property name when creating the broken rule description string.
patternBuilt-in regex pattern to use.

Definition at line 1052 of file Csla.Validation.Shared/CommonRules.cs.

◆ RegExRuleArgs() [4/18]

Csla.Validation.CommonRules.RegExRuleArgs.RegExRuleArgs ( string  propertyName,
string  pattern 
)

Creates a new object.

Parameters
propertyNameName of the property to validate.
patternCustom regex pattern to use.

Definition at line 1065 of file Csla.Validation.Shared/CommonRules.cs.

◆ RegExRuleArgs() [5/18]

Csla.Validation.CommonRules.RegExRuleArgs.RegExRuleArgs ( Core.IPropertyInfo  propertyInfo,
string  pattern 
)

Creates a new object.

Parameters
propertyInfoProperty to validate.
patternCustom regex pattern to use.

Definition at line 1077 of file Csla.Validation.Shared/CommonRules.cs.

◆ RegExRuleArgs() [6/18]

Csla.Validation.CommonRules.RegExRuleArgs.RegExRuleArgs ( string  propertyName,
string  friendlyName,
string  pattern 
)

Creates a new object.

Parameters
propertyNameName of the property to validate.
friendlyNameA friendly name for the property, which will be used in place of the property name when creating the broken rule description string.
patternCustom regex pattern to use.

Definition at line 1092 of file Csla.Validation.Shared/CommonRules.cs.

◆ RegExRuleArgs() [7/18]

Csla.Validation.CommonRules.RegExRuleArgs.RegExRuleArgs ( string  propertyName,
System.Text.RegularExpressions.Regex  regEx 
)

Creates a new object.

Parameters
propertyNameName of the property to validate.
regExRegEx object to use.

Definition at line 1105 of file Csla.Validation.Shared/CommonRules.cs.

◆ RegExRuleArgs() [8/18]

Csla.Validation.CommonRules.RegExRuleArgs.RegExRuleArgs ( Core.IPropertyInfo  propertyInfo,
System.Text.RegularExpressions.Regex  regEx 
)

Creates a new object.

Parameters
propertyInfoProperty to validate.
regExRegEx object to use.

Definition at line 1117 of file Csla.Validation.Shared/CommonRules.cs.

◆ RegExRuleArgs() [9/18]

Csla.Validation.CommonRules.RegExRuleArgs.RegExRuleArgs ( string  propertyName,
string  friendlyName,
System.Text.RegularExpressions.Regex  regEx 
)

Creates a new object.

Parameters
propertyNameName of the property to validate.
friendlyNameA friendly name for the property, which will be used in place of the property name when creating the broken rule description string.
regExRegEx object to use.

Definition at line 1132 of file Csla.Validation.Shared/CommonRules.cs.

◆ RegExRuleArgs() [10/18]

Csla.Validation.CommonRules.RegExRuleArgs.RegExRuleArgs ( string  propertyName,
RegExPatterns  pattern,
NullResultOptions  nullResult 
)

Creates a new object.

Parameters
propertyNameName of the property to validate.
patternBuilt-in regex pattern to use.
nullResultValue indicating how a null value should be handled by the rule method.

Definition at line 1149 of file Csla.Validation.Shared/CommonRules.cs.

◆ RegExRuleArgs() [11/18]

Csla.Validation.CommonRules.RegExRuleArgs.RegExRuleArgs ( Core.IPropertyInfo  propertyInfo,
RegExPatterns  pattern,
NullResultOptions  nullResult 
)

Creates a new object.

Parameters
propertyInfoProperty to validate.
patternBuilt-in regex pattern to use.
nullResultValue indicating how a null value should be handled by the rule method.

Definition at line 1165 of file Csla.Validation.Shared/CommonRules.cs.

◆ RegExRuleArgs() [12/18]

Csla.Validation.CommonRules.RegExRuleArgs.RegExRuleArgs ( string  propertyName,
string  friendlyName,
RegExPatterns  pattern,
NullResultOptions  nullResult 
)

Creates a new object.

Parameters
propertyNameName of the property to validate.
friendlyNameA friendly name for the property, which will be used in place of the property name when creating the broken rule description string.
patternBuilt-in regex pattern to use.
nullResultValue indicating how a null value should be handled by the rule method.

Definition at line 1184 of file Csla.Validation.Shared/CommonRules.cs.

◆ RegExRuleArgs() [13/18]

Csla.Validation.CommonRules.RegExRuleArgs.RegExRuleArgs ( string  propertyName,
string  pattern,
NullResultOptions  nullResult 
)

Creates a new object.

Parameters
propertyNameName of the property to validate.
patternCustom regex pattern to use.
nullResultValue indicating how a null value should be handled by the rule method.

Definition at line 1201 of file Csla.Validation.Shared/CommonRules.cs.

◆ RegExRuleArgs() [14/18]

Csla.Validation.CommonRules.RegExRuleArgs.RegExRuleArgs ( Core.IPropertyInfo  propertyInfo,
string  pattern,
NullResultOptions  nullResult 
)

Creates a new object.

Parameters
propertyInfoProperty to validate.
patternCustom regex pattern to use.
nullResultValue indicating how a null value should be handled by the rule method.

Definition at line 1217 of file Csla.Validation.Shared/CommonRules.cs.

◆ RegExRuleArgs() [15/18]

Csla.Validation.CommonRules.RegExRuleArgs.RegExRuleArgs ( string  propertyName,
string  friendlyName,
string  pattern,
NullResultOptions  nullResult 
)

Creates a new object.

Parameters
propertyNameName of the property to validate.
friendlyNameA friendly name for the property, which will be used in place of the property name when creating the broken rule description string.
patternCustom regex pattern to use.
nullResultValue indicating how a null value should be handled by the rule method.

Definition at line 1236 of file Csla.Validation.Shared/CommonRules.cs.

◆ RegExRuleArgs() [16/18]

Csla.Validation.CommonRules.RegExRuleArgs.RegExRuleArgs ( string  propertyName,
System.Text.RegularExpressions.Regex  regEx,
NullResultOptions  nullResult 
)

Creates a new object.

Parameters
propertyNameName of the property to validate.
regExRegEx object to use.
nullResultValue indicating how a null value should be handled by the rule method.

Definition at line 1253 of file Csla.Validation.Shared/CommonRules.cs.

◆ RegExRuleArgs() [17/18]

Csla.Validation.CommonRules.RegExRuleArgs.RegExRuleArgs ( Core.IPropertyInfo  propertyInfo,
System.Text.RegularExpressions.Regex  regEx,
NullResultOptions  nullResult 
)

Creates a new object.

Parameters
propertyInfoProperty to validate.
regExRegEx object to use.
nullResultValue indicating how a null value should be handled by the rule method.

Definition at line 1269 of file Csla.Validation.Shared/CommonRules.cs.

◆ RegExRuleArgs() [18/18]

Csla.Validation.CommonRules.RegExRuleArgs.RegExRuleArgs ( string  propertyName,
string  friendlyName,
System.Text.RegularExpressions.Regex  regEx,
NullResultOptions  nullResult 
)

Creates a new object.

Parameters
propertyNameName of the property to validate.
friendlyNameA friendly name for the property, which will be used in place of the property name when creating the broken rule description string.
regExRegEx object to use.
nullResultValue indicating how a null value should be handled by the rule method.

Definition at line 1288 of file Csla.Validation.Shared/CommonRules.cs.

Member Function Documentation

◆ GetPattern()

static string Csla.Validation.CommonRules.RegExRuleArgs.GetPattern ( RegExPatterns  pattern)
static

Returns the specified built-in regex pattern.

Parameters
patternPattern to return.

Definition at line 1300 of file Csla.Validation.Shared/CommonRules.cs.

Property Documentation

◆ NullResult

NullResultOptions Csla.Validation.CommonRules.RegExRuleArgs.NullResult
get

Gets a value indicating whether a null value means the rule will return true or false.

Definition at line 1012 of file Csla.Validation.Shared/CommonRules.cs.

◆ RegEx

Regex Csla.Validation.CommonRules.RegExRuleArgs.RegEx
get

The RegEx object used to validate the property.

Definition at line 1003 of file Csla.Validation.Shared/CommonRules.cs.