DataSource.NET  7.1.14.29710-170e587
Caplin.DataSource.Namespace.RegexNamespace Class Reference

More...

Inheritance diagram for Caplin.DataSource.Namespace.RegexNamespace:
Caplin.DataSource.Namespace.INamespace

Public Member Functions

void AddExcludeRegex (String regex)
 Adds an exclude regex pattern to the namespace. More...
 
void AddIncludeRegex (String regex)
 Adds an include regex pattern to the namespace. More...
 
bool Match (string subjectName)
 Tests a subject string to see if it falls within this INamespace. More...
 
 RegexNamespace ()
 Initializes an empty new instance of the RegexNamespace class. This instance will match no subjects unless one or more regex patterns are first added to the instance via the Caplin.DataSource.Namespace.RegexNamespace.AddIncludeRegex method. More...
 
 RegexNamespace (String includeRegex)
 Initializes a new instance of the RegexNamespace class with an include regex pattern. More...
 
override string ToString ()
 Returns a System.String that represents this instance. More...
 

Detailed Description

The regex namespace matches a subject based on one or more regex patterns.

Regex is an abbreviation for regular expression. Regular expression libraries provide rich string matching capabilities based upon string patterns ("regular expressions"). Different regular expression libraries vary in their syntax and functionality. This class uses the library provided by the .NET System.Text.RegularExpressions.Regex class. More information on the regular expressions syntax used by the .NET Regex implementation can be found at .NET Framework Regular Expressions

RegexNamespace can contain include regex patterns and exclude patterns. A subject matches the namespace if it matches at least one of the include regex patterns and does not match any of the exclude patterns.

Constructor & Destructor Documentation

Caplin.DataSource.Namespace.RegexNamespace.RegexNamespace ( )
inline

Initializes an empty new instance of the RegexNamespace class. This instance will match no subjects unless one or more regex patterns are first added to the instance via the Caplin.DataSource.Namespace.RegexNamespace.AddIncludeRegex method.

Caplin.DataSource.Namespace.RegexNamespace.RegexNamespace ( String  includeRegex)
inline

Initializes a new instance of the RegexNamespace class with an include regex pattern.

Parameters
includeRegexA regex defining an include pattern.

Member Function Documentation

void Caplin.DataSource.Namespace.RegexNamespace.AddExcludeRegex ( String  regex)
inline

Adds an exclude regex pattern to the namespace.

Parameters
regexA regex defining an exclude pattern.
void Caplin.DataSource.Namespace.RegexNamespace.AddIncludeRegex ( String  regex)
inline

Adds an include regex pattern to the namespace.

Parameters
regexA regex defining an include pattern.
bool Caplin.DataSource.Namespace.RegexNamespace.Match ( string  subjectName)
inline

Tests a subject string to see if it falls within this INamespace.

Parameters
subjectNameThe subject to be tested for matching
Returns
True if subject falls within this INamespace, false otherwise

Implements Caplin.DataSource.Namespace.INamespace.

override string Caplin.DataSource.Namespace.RegexNamespace.ToString ( )
inline

Returns a System.String that represents this instance.

Returns
A System.String that represents this instance.

Generated on Tue May 12 2020 12:38:26 for DataSource.NET