Class DateRecognizerSinkFilter
Attempts to parse the ToString() as a Date using either the System.DateTime.TryParse(System.String,System.IFormatProvider,System.Globalization.DateTimeStyles,System.DateTime@) or System.DateTime.TryParseExact(System.String,System.String[],System.IFormatProvider,System.Globalization.DateTimeStyles,System.DateTime@) methods. If a format is passed, System.DateTime.TryParseExact(System.String,System.String[],System.IFormatProvider,System.Globalization.DateTimeStyles,System.DateTime@) will be used, and the format must strictly match one of the specified formats as specified in the MSDN documentation. If the value is a Date, it will add it to the sink.
Inherited Members
Namespace: Lucene.Net.Analysis.Sinks
Assembly: Lucene.Net.Analysis.Common.dll
Syntax
public class DateRecognizerSinkFilter : TeeSinkTokenFilter.SinkFilter
  Constructors
| Improve this Doc View SourceDateRecognizerSinkFilter()
Creates a new instance of DateRecognizerSinkFilter using the current culture and System.Globalization.DateTimeStyles.None. Loosely matches standard DateTime formats using System.DateTime.TryParse(System.String,System.IFormatProvider,System.Globalization.DateTimeStyles,System.DateTime@).
Declaration
public DateRecognizerSinkFilter()
  DateRecognizerSinkFilter(IFormatProvider)
Creates a new instance of DateRecognizerSinkFilter using the supplied culture and System.Globalization.DateTimeStyles.None. Loosely matches standard DateTime formats using System.DateTime.TryParse(System.String,System.IFormatProvider,System.Globalization.DateTimeStyles,System.DateTime@).
Declaration
public DateRecognizerSinkFilter(IFormatProvider culture)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.IFormatProvider | culture | An object that supplies culture-specific format information  | 
      
DateRecognizerSinkFilter(IFormatProvider, DateTimeStyles)
Creates a new instance of DateRecognizerSinkFilter using the supplied culture and System.Globalization.DateTimeStyles. Loosely matches standard DateTime formats using System.DateTime.TryParse(System.String,System.IFormatProvider,System.Globalization.DateTimeStyles,System.DateTime@).
Declaration
public DateRecognizerSinkFilter(IFormatProvider culture, DateTimeStyles style)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.IFormatProvider | culture | An object that supplies culture-specific format information  | 
      
| System.Globalization.DateTimeStyles | style | A bitwise combination of enumeration values that indicates the permitted format of s. A typical value to specify is System.Globalization.DateTimeStyles.None  | 
      
DateRecognizerSinkFilter(String)
Creates a new instance of DateRecognizerSinkFilter using the current culture and System.Globalization.DateTimeStyles.None. Strictly matches the supplied DateTime formats using System.DateTime.TryParseExact(System.String,System.String,System.IFormatProvider,System.Globalization.DateTimeStyles,System.DateTime@).
Declaration
public DateRecognizerSinkFilter(string format)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | format | The allowable format of the ToString(). If supplied, it must match the format of the date exactly to get a match.  | 
      
DateRecognizerSinkFilter(String, IFormatProvider)
Creates a new instance of DateRecognizerSinkFilter using the supplied format, culture and System.Globalization.DateTimeStyles.None. Strictly matches the supplied DateTime formats using System.DateTime.TryParseExact(System.String,System.String,System.IFormatProvider,System.Globalization.DateTimeStyles,System.DateTime@).
Declaration
public DateRecognizerSinkFilter(string format, IFormatProvider culture)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | format | The allowable format of the ToString(). If supplied, it must match the format of the date exactly to get a match.  | 
      
| System.IFormatProvider | culture | An object that supplies culture-specific format information  | 
      
DateRecognizerSinkFilter(String, IFormatProvider, DateTimeStyles)
Creates a new instance of DateRecognizerSinkFilter using the supplied format, culture and System.Globalization.DateTimeStyles. Strictly matches the supplied DateTime formats using System.DateTime.TryParseExact(System.String,System.String,System.IFormatProvider,System.Globalization.DateTimeStyles,System.DateTime@).
Declaration
public DateRecognizerSinkFilter(string format, IFormatProvider culture, DateTimeStyles style)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | format | The allowable format of the ToString(). If supplied, it must match the format of the date exactly to get a match.  | 
      
| System.IFormatProvider | culture | An object that supplies culture-specific format information  | 
      
| System.Globalization.DateTimeStyles | style | A bitwise combination of enumeration values that indicates the permitted format of s. A typical value to specify is System.Globalization.DateTimeStyles.None  | 
      
DateRecognizerSinkFilter(String[])
Creates a new instance of DateRecognizerSinkFilter using the current culture and System.Globalization.DateTimeStyles.None. Strictly matches the supplied DateTime formats using System.DateTime.TryParseExact(System.String,System.String[],System.IFormatProvider,System.Globalization.DateTimeStyles,System.DateTime@).
Declaration
public DateRecognizerSinkFilter(string[] formats)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.String[] | formats | An array of allowable formats of the ToString(). If supplied, one of them must match the format of the date exactly to get a match.  | 
      
DateRecognizerSinkFilter(String[], IFormatProvider)
Creates a new instance of DateRecognizerSinkFilter using the supplied formats, culture and System.Globalization.DateTimeStyles.None. Strictly matches the supplied DateTime formats using System.DateTime.TryParseExact(System.String,System.String[],System.IFormatProvider,System.Globalization.DateTimeStyles,System.DateTime@).
Declaration
public DateRecognizerSinkFilter(string[] formats, IFormatProvider culture)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.String[] | formats | An array of allowable formats of the ToString(). If supplied, one of them must match the format of the date exactly to get a match.  | 
      
| System.IFormatProvider | culture | An object that supplies culture-specific format information  | 
      
DateRecognizerSinkFilter(String[], IFormatProvider, DateTimeStyles)
Creates a new instance of DateRecognizerSinkFilter using the supplied formats, culture and System.Globalization.DateTimeStyles. Strictly matches the supplied DateTime formats using System.DateTime.TryParseExact(System.String,System.String[],System.IFormatProvider,System.Globalization.DateTimeStyles,System.DateTime@).
Declaration
public DateRecognizerSinkFilter(string[] formats, IFormatProvider culture, DateTimeStyles style)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.String[] | formats | An array of allowable formats of the ToString(). If supplied, one of them must match the format of the date exactly to get a match.  | 
      
| System.IFormatProvider | culture | An object that supplies culture-specific format information  | 
      
| System.Globalization.DateTimeStyles | style | A bitwise combination of enumeration values that indicates the permitted format of s. A typical value to specify is System.Globalization.DateTimeStyles.None  | 
      
Fields
| Improve this Doc View Sourcem_culture
Declaration
protected IFormatProvider m_culture
  Field Value
| Type | Description | 
|---|---|
| System.IFormatProvider | 
m_formats
Declaration
protected string[] m_formats
  Field Value
| Type | Description | 
|---|---|
| System.String[] | 
m_style
Declaration
protected DateTimeStyles m_style
  Field Value
| Type | Description | 
|---|---|
| System.Globalization.DateTimeStyles | 
m_termAtt
Declaration
protected ICharTermAttribute m_termAtt
  Field Value
| Type | Description | 
|---|---|
| ICharTermAttribute | 
Methods
| Improve this Doc View SourceAccept(AttributeSource)
Declaration
public override bool Accept(AttributeSource source)
  Parameters
| Type | Name | Description | 
|---|---|---|
| AttributeSource | source | 
Returns
| Type | Description | 
|---|---|
| System.Boolean |