C# Class Beagrep.Daemon.Filter

Afficher le fichier Open project: baohaojun/beagrep Class Usage Examples

Méthodes publiques

Méthode Description
AddLink ( string link ) : void
AddProperty ( System.Property prop ) : void
AppendChars ( char buffer, int index, int count ) : bool

Does not check for structural breaks

AppendLine ( string line ) : bool

Add a line followed by a newline.

AppendStructuralBreak ( ) : bool

Creates a new paragraph. Mainly useful for storing cached contents.

AppendText ( string str ) : bool

Append text to the textpool. If IsHot is true, then also add to the hottext pool. Handles null str.

AppendText ( string str, string strHot ) : bool
AppendWhiteSpace ( ) : bool

Adds whitespace to the textpool.

AppendWord ( string word ) : bool

Add a word followed by a whitespace. word may not be whitespace or newline.

AttachSnippetWriter ( TextWriter writer ) : void
CleanGeneratedIndexables ( ) : void
Cleanup ( ) : void
Filter ( ) : System
FreezeDown ( ) : void
FreezeUp ( ) : void
GenerateNextIndexable ( Indexable &indexable ) : bool

Good filters should replace this by an IEnumerable that does not require generating all the indexables beforehand

GetHotTextReader ( ) : TextReader
GetTextReader ( ) : TextReader
HotDown ( ) : void
HotUp ( ) : void
Open ( FileSystemInfo info ) : bool
Open ( Stream stream ) : bool
Open ( Stream stream, bool store_tempfile ) : bool

This will throw an exception; callers should catch it and appropriately display the error message showing the filename etc.

Open ( TextReader reader ) : bool
Open ( string path ) : bool

Méthodes protégées

Méthode Description
AddIndexable ( Indexable indexable ) : void
AddIndexables ( ICollection indexables ) : void
AddSupportedFlavor ( Beagrep.Daemon.FilterFlavor flavor ) : void
DoClose ( ) : void
DoOpen ( DirectoryInfo info ) : void
DoOpen ( FileInfo info ) : void
DoOpen ( FileSystemInfo info ) : void
DoPull ( ) : void
DoPullProperties ( ) : void
DoPullSetup ( ) : void
Error ( ) : void
Finished ( ) : void
RegisterSupportedTypes ( ) : void
SetFileType ( string file_type ) : void

Filter may set the filetype to document, source, music etc. Use lower case for file_type

SetVersion ( int v ) : void

Private Methods

Méthode Description
AppendWords ( string words, bool is_line ) : bool
Close ( ) : void
Pull ( ) : bool
PullFromArray ( ArrayList array, StringBuilder sb, bool is_hot ) : bool
PullHotText ( StringBuilder sb, int chars_to_pull ) : bool
PullText ( StringBuilder sb, int chars_to_pull ) : bool
PullTextCarefully ( ArrayList array, StringBuilder sb, int chars_to_pull, bool is_hot ) : bool
ReallyAddText ( char buffer, int index, int count ) : void
ReallyAddText ( string str ) : void
UpdateCharsAdded ( int append_chars_added ) : bool

Method Details

AddIndexable() protected méthode

protected AddIndexable ( Indexable indexable ) : void
indexable Indexable
Résultat void

AddIndexables() protected méthode

protected AddIndexables ( ICollection indexables ) : void
indexables ICollection
Résultat void

AddLink() public méthode

public AddLink ( string link ) : void
link string
Résultat void

AddProperty() public méthode

public AddProperty ( System.Property prop ) : void
prop System.Property
Résultat void

AddSupportedFlavor() protected méthode

protected AddSupportedFlavor ( Beagrep.Daemon.FilterFlavor flavor ) : void
flavor Beagrep.Daemon.FilterFlavor
Résultat void

AppendChars() public méthode

Does not check for structural breaks
public AppendChars ( char buffer, int index, int count ) : bool
buffer char /// A ///
index int /// A ///
count int /// A ///
Résultat bool

AppendLine() public méthode

Add a line followed by a newline.
public AppendLine ( string line ) : bool
line string /// A ///
Résultat bool

AppendStructuralBreak() public méthode

Creates a new paragraph. Mainly useful for storing cached contents.
public AppendStructuralBreak ( ) : bool
Résultat bool

AppendText() public méthode

Append text to the textpool. If IsHot is true, then also add to the hottext pool. Handles null str.
public AppendText ( string str ) : bool
str string
Résultat bool

AppendText() public méthode

public AppendText ( string str, string strHot ) : bool
str string
strHot string
Résultat bool

AppendWhiteSpace() public méthode

Adds whitespace to the textpool.
public AppendWhiteSpace ( ) : bool
Résultat bool

AppendWord() public méthode

Add a word followed by a whitespace. word may not be whitespace or newline.
public AppendWord ( string word ) : bool
word string /// A ///
Résultat bool

AttachSnippetWriter() public méthode

public AttachSnippetWriter ( TextWriter writer ) : void
writer System.IO.TextWriter
Résultat void

CleanGeneratedIndexables() public méthode

public CleanGeneratedIndexables ( ) : void
Résultat void

Cleanup() public méthode

public Cleanup ( ) : void
Résultat void

DoClose() protected méthode

protected DoClose ( ) : void
Résultat void

DoOpen() protected méthode

protected DoOpen ( DirectoryInfo info ) : void
info System.IO.DirectoryInfo
Résultat void

DoOpen() protected méthode

protected DoOpen ( FileInfo info ) : void
info System.IO.FileInfo
Résultat void

DoOpen() protected méthode

protected DoOpen ( FileSystemInfo info ) : void
info System.IO.FileSystemInfo
Résultat void

DoPull() protected méthode

protected DoPull ( ) : void
Résultat void

DoPullProperties() protected méthode

protected DoPullProperties ( ) : void
Résultat void

DoPullSetup() protected méthode

protected DoPullSetup ( ) : void
Résultat void

Error() protected méthode

protected Error ( ) : void
Résultat void

Filter() public méthode

public Filter ( ) : System
Résultat System

Finished() protected méthode

protected Finished ( ) : void
Résultat void

FreezeDown() public méthode

public FreezeDown ( ) : void
Résultat void

FreezeUp() public méthode

public FreezeUp ( ) : void
Résultat void

GenerateNextIndexable() public méthode

Good filters should replace this by an IEnumerable that does not require generating all the indexables beforehand
public GenerateNextIndexable ( Indexable &indexable ) : bool
indexable Indexable /// A ///
Résultat bool

GetHotTextReader() public méthode

public GetHotTextReader ( ) : TextReader
Résultat TextReader

GetTextReader() public méthode

public GetTextReader ( ) : TextReader
Résultat TextReader

HotDown() public méthode

public HotDown ( ) : void
Résultat void

HotUp() public méthode

public HotUp ( ) : void
Résultat void

Open() public méthode

public Open ( FileSystemInfo info ) : bool
info System.IO.FileSystemInfo
Résultat bool

Open() public méthode

public Open ( Stream stream ) : bool
stream Stream
Résultat bool

Open() public méthode

This will throw an exception; callers should catch it and appropriately display the error message showing the filename etc.
public Open ( Stream stream, bool store_tempfile ) : bool
stream Stream /// A ///
store_tempfile bool /// A ///
Résultat bool

Open() public méthode

public Open ( TextReader reader ) : bool
reader TextReader
Résultat bool

Open() public méthode

public Open ( string path ) : bool
path string
Résultat bool

RegisterSupportedTypes() protected méthode

protected RegisterSupportedTypes ( ) : void
Résultat void

SetFileType() protected méthode

Filter may set the filetype to document, source, music etc. Use lower case for file_type
protected SetFileType ( string file_type ) : void
file_type string /// A ///
Résultat void

SetVersion() protected méthode

protected SetVersion ( int v ) : void
v int
Résultat void