StringFilterBase Class
Provides an abstract base class for a string IDataFilter implementation.
public abstract class StringFilterBase : DataFilterBase, IDataFilter
- Inheritance:
- object DataFilterBase object
- Implements:
- IDataFilter
Constructors
StringFilterBase()
Initializes an instance of the class.
protected StringFilterBase()
Properties
Operation
The string operation performed by this filter.
public StringFilterOperation Operation { get; set; }
Property Value
- StringFilterOperation:
The default value is Contains.
RegexOptions
The options used for regex matches performed by this filter.
public RegexOptions RegexOptions { get; set; }
Property Value
- RegexOptions:
The default value is
RegexOptions.None.
StringComparison
The string comparison performed by this filter.
public StringComparison StringComparison { get; set; }
Property Value
- StringComparison:
The default value is
StringComparison.CurrentCultureIgnoreCase.
Value
The operand value used by this filter.
Methods
FilterByString(string?, string?)
Examines the specified source string to see if it meets filter conditions.
protected virtual bool FilterByString(string? source, string? test)
| Parameter | Type | Description |
|---|---|---|
| source | string | The source string to examine. |
| test | string | The test string. |
Returns
- bool:
trueif the conditions for the filter are met by the source string; otherwise,false.
GetCaptures(string?, string?)
Returns the collection of filter match captures.
public virtual IEnumerable<StringFilterCapture>? GetCaptures(string? source, string? test)
| Parameter | Type | Description |
|---|---|---|
| source | string | The source text to examine. |
| test | string | The text to match using the filter's Operation. |
Returns
Remarks
This feature only returns results for positive match operations (i.e., Contains) and not negative match operations (i.e., NotContains).
Fields
OperationProperty
Defines the Operation property.
public static readonly DependencyProperty OperationProperty
RegexOptionsProperty
Defines the RegexOptions property.
public static readonly DependencyProperty RegexOptionsProperty
StringComparisonProperty
Defines the StringComparison property.
public static readonly DependencyProperty StringComparisonProperty
ValueProperty
Defines the Value property.
public static readonly DependencyProperty ValueProperty
Inherited Members
- DataFilterBase.IncludedFilterResultProperty
- DataFilterBase.IsEnabledProperty
- DataFilterBase.Filter(object, object)
- DataFilterBase.RaiseFilterChangedEvent()
- DataFilterBase.FallbackFilterResult
- DataFilterBase.IncludedFilterResult
- DataFilterBase.IsEnabled
- DataFilterBase.FilterChanged