Class SubstitutionRule
Represents the substitution rule.
Implements
Inherited Members
Namespace: Platform.RegularExpressions.Transformer
Assembly: Platform.RegularExpressions.Transformer.dll
Syntax
public class SubstitutionRule : ISubstitutionRule
Constructors
| Improve this Doc View SourceSubstitutionRule(Regex, String)
Initializes a new SubstitutionRule instance.
Declaration
public SubstitutionRule(Regex matchPattern, string substitutionPattern)
Parameters
Type | Name | Description |
---|---|---|
Regex | matchPattern | A match pattern.
|
String | substitutionPattern | A substitution pattern.
|
SubstitutionRule(Regex, String, Int32)
Initializes a new SubstitutionRule instance.
Declaration
public SubstitutionRule(Regex matchPattern, string substitutionPattern, int maximumRepeatCount)
Parameters
Type | Name | Description |
---|---|---|
Regex | matchPattern | A match pattern.
|
String | substitutionPattern | A substitution pattern.
|
Int32 | maximumRepeatCount | A maximum repeat count.
|
SubstitutionRule(Regex, String, Int32, Boolean)
Initializes a new SubstitutionRule instance.
Declaration
public SubstitutionRule(Regex matchPattern, string substitutionPattern, int maximumRepeatCount, bool useDefaultOptions)
Parameters
Type | Name | Description |
---|---|---|
Regex | matchPattern | A match pattern.
|
String | substitutionPattern | A substitution pattern.
|
Int32 | maximumRepeatCount | A maximum repeat count.
|
Boolean | useDefaultOptions | A use default options.
|
SubstitutionRule(Regex, String, Int32, Nullable<RegexOptions>, Nullable<TimeSpan>)
Initializes a new SubstitutionRule instance.
Declaration
public SubstitutionRule(Regex matchPattern, string substitutionPattern, int maximumRepeatCount, RegexOptions? matchPatternOptions, TimeSpan? matchTimeout)
Parameters
Type | Name | Description |
---|---|---|
Regex | matchPattern | A match pattern.
|
String | substitutionPattern | A substitution pattern.
|
Int32 | maximumRepeatCount | A maximum repeat count.
|
Nullable<RegexOptions> | matchPatternOptions | A match pattern options.
|
Nullable<TimeSpan> | matchTimeout | A match timeout.
|
Fields
| Improve this Doc View SourceDefaultMatchPatternRegexOptions
The multiline.
Declaration
public static readonly RegexOptions DefaultMatchPatternRegexOptions
Field Value
Type | Description |
---|---|
RegexOptions |
DefaultMatchTimeout
The from minutes.
Declaration
public static readonly TimeSpan DefaultMatchTimeout
Field Value
Type | Description |
---|---|
TimeSpan |
Properties
| Improve this Doc View SourceMatchPattern
Gets or sets the match pattern value.
Declaration
public Regex MatchPattern { get; set; }
Property Value
Type | Description |
---|---|
Regex |
MaximumRepeatCount
Gets or sets the maximum repeat count value.
Declaration
public int MaximumRepeatCount { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
PathPattern
Gets or sets the path pattern value.
Declaration
public Regex PathPattern { get; set; }
Property Value
Type | Description |
---|---|
Regex |
SubstitutionPattern
Gets or sets the substitution pattern value.
Declaration
public string SubstitutionPattern { get; set; }
Property Value
Type | Description |
---|---|
String |
Methods
| Improve this Doc View SourceOverrideMatchPatternOptions(RegexOptions, TimeSpan)
Overrides the match pattern options using the specified options.
Declaration
public void OverrideMatchPatternOptions(RegexOptions options, TimeSpan matchTimeout)
Parameters
Type | Name | Description |
---|---|---|
RegexOptions | options | The options.
|
TimeSpan | matchTimeout | The match timeout.
|
OverridePathPatternOptions(RegexOptions, TimeSpan)
Overrides the path pattern options using the specified options.
Declaration
public void OverridePathPatternOptions(RegexOptions options, TimeSpan matchTimeout)
Parameters
Type | Name | Description |
---|---|---|
RegexOptions | options | The options.
|
TimeSpan | matchTimeout | The match timeout.
|
ToString()
Returns the string.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String | The string
|
Overrides
Operators
| Improve this Doc View SourceImplicit((String, String, Int32) to SubstitutionRule)
Declaration
public static implicit operator SubstitutionRule((string, string, int) tuple)
Parameters
Type | Name | Description |
---|---|---|
ValueTuple<String, String, Int32> | tuple |
Returns
Type | Description |
---|---|
SubstitutionRule |
Implicit((String, String) to SubstitutionRule)
Declaration
public static implicit operator SubstitutionRule((string, string) tuple)
Parameters
Type | Name | Description |
---|---|---|
ValueTuple<String, String> | tuple |
Returns
Type | Description |
---|---|
SubstitutionRule |
Implicit((Regex, String, Int32) to SubstitutionRule)
Declaration
public static implicit operator SubstitutionRule((Regex, string, int) tuple)
Parameters
Type | Name | Description |
---|---|---|
ValueTuple<Regex, String, Int32> | tuple |
Returns
Type | Description |
---|---|
SubstitutionRule |
Implicit((Regex, String) to SubstitutionRule)
Declaration
public static implicit operator SubstitutionRule((Regex, string) tuple)
Parameters
Type | Name | Description |
---|---|---|
ValueTuple<Regex, String> | tuple |
Returns
Type | Description |
---|---|
SubstitutionRule |