C# Class SubLib.Core.Search.SearchOperator

Performs search operations.
Afficher le fichier Open project: GNOME/gnome-subtitles Class Usage Examples

Méthodes publiques

Méthode Description
Find ( SubtitleSearchOptions options ) : SubtitleSearchResults

Searches for text using the specified search options.

FindNearTime ( float time ) : int

Finds the subtitle more near of specified time position.

FindWithTime ( float time ) : int

Finds the subtitle that contains the specified time position.

ReplaceAll ( Regex regex, string replacement ) : ArrayList

Replaces all occurences of some text with the specified replacement.

The newline (\n) char is used as the line break.

ReplaceAll ( Regex regex, string replacement, string lineBreak ) : ArrayList

Replaces all occurences of some text with the specified replacement.

SearchOperator ( Subtitles subtitles ) : SubLib.Core.Domain

Private Methods

Méthode Description
FindBackward ( SubtitleSearchOptions options ) : SubtitleSearchResults

Searches backward for text using the specified search options.

FindForward ( SubtitleSearchOptions options ) : SubtitleSearchResults

Searches forward for text using the specified search options.

FindInSubtitle ( int subtitleNumber, string lineBreak, Regex regex, bool backwards ) : SubtitleSearchResults
FindInSubtitleFromIndex ( int subtitleNumber, string lineBreak, Regex regex, int startIndex, SubtitleTextType textType, bool backwards ) : SubtitleSearchResults
FindInSubtitleTillIndex ( int subtitleNumber, string lineBreak, Regex regex, int endIndex, SubtitleTextType textType, bool backwards ) : SubtitleSearchResults
FindInTextContent ( int subtitleNumber, string lineBreak, Regex regex, SubtitleTextType textType ) : SubtitleSearchResults
FindInTextContentFromIndex ( int subtitleNumber, string lineBreak, Regex regex, int startIndex, SubtitleTextType textType ) : SubtitleSearchResults
FindInTextContentTillIndex ( int subtitleNumber, string lineBreak, Regex regex, int endIndex, SubtitleTextType textType, bool backwards ) : SubtitleSearchResults
MatchValues ( Match match, int subtitleNumber, SubtitleTextType textType, int charsBeforeMatchInput ) : SubtitleSearchResults
ReplaceText ( string text, Regex regex, string replacement, MatchEvaluationCounter counter ) : string

Method Details

Find() public méthode

Searches for text using the specified search options.
public Find ( SubtitleSearchOptions options ) : SubtitleSearchResults
options SubtitleSearchOptions The search options.
Résultat SubtitleSearchResults

FindNearTime() public méthode

Finds the subtitle more near of specified time position.
public FindNearTime ( float time ) : int
time float The time position, in seconds.
Résultat int

FindWithTime() public méthode

Finds the subtitle that contains the specified time position.
public FindWithTime ( float time ) : int
time float The time position, in seconds.
Résultat int

ReplaceAll() public méthode

Replaces all occurences of some text with the specified replacement.
The newline (\n) char is used as the line break.
public ReplaceAll ( Regex regex, string replacement ) : ArrayList
regex System.Text.RegularExpressions.Regex A regular expression used to find the text to be replaced.
replacement string The text that will be used as a replacement.
Résultat System.Collections.ArrayList

ReplaceAll() public méthode

Replaces all occurences of some text with the specified replacement.
public ReplaceAll ( Regex regex, string replacement, string lineBreak ) : ArrayList
regex System.Text.RegularExpressions.Regex A regular expression used to find the text to be replaced.
replacement string The text that will be used as a replacement.
lineBreak string The line break to use between multiple lines of text in each subtitle.
Résultat System.Collections.ArrayList

SearchOperator() public méthode

public SearchOperator ( Subtitles subtitles ) : SubLib.Core.Domain
subtitles SubLib.Core.Domain.Subtitles
Résultat SubLib.Core.Domain