C# Class Rubber.DSL.HighlightBuilder

Inheritance: IJsonSerializable
Afficher le fichier Open project: stephenpope/Rubber Class Usage Examples

Méthodes publiques

Méthode Description
Encoder ( string encoder ) : HighlightBuilder

Set encoder for the highlighting are styled and default.

Field ( string name ) : HighlightBuilder

Adds a field to be highlighted with default fragment size of 100 characters, and default number of fragments of 5 using the default encoder

Field ( string name, int fragmentSize ) : HighlightBuilder

Adds a field to be highlighted with a provided fragment size (in characters), and default number of fragments of 5.

Field ( string name, int fragmentSize, int numberOfFragments ) : HighlightBuilder

Adds a field to be highlighted with a provided fragment size (in characters), and a provided (maximum) number of fragments.

Field ( string name, int fragmentSize, int numberOfFragments, int fragmentOffset ) : HighlightBuilder

Adds a field to be highlighted with a provided fragment size (in characters), and a provided (maximum) number of fragments.

Order ( string order ) : HighlightBuilder

The order of fragments per field. By default, ordered by the order in the highlighted text. Can be score, which then it will be ordered by score of the fragments.

PostTags ( ) : HighlightBuilder

Explicitly set the post tags that will be used for highlighting.

PreTags ( ) : HighlightBuilder

Explicitly set the pre tags that will be used for highlighting.

TagsSchema ( string schemaName ) : HighlightBuilder

Set a tag scheme that encapsulates a built in pre and post tags. The allows schemes are styled and default.

ToJsonObject ( ) : object

Method Details

Encoder() public méthode

Set encoder for the highlighting are styled and default.
public Encoder ( string encoder ) : HighlightBuilder
encoder string Encoder name
Résultat HighlightBuilder

Field() public méthode

Adds a field to be highlighted with default fragment size of 100 characters, and default number of fragments of 5 using the default encoder
public Field ( string name ) : HighlightBuilder
name string The field to highlight
Résultat HighlightBuilder

Field() public méthode

Adds a field to be highlighted with a provided fragment size (in characters), and default number of fragments of 5.
public Field ( string name, int fragmentSize ) : HighlightBuilder
name string The field to highlight
fragmentSize int The size of a fragment in characters
Résultat HighlightBuilder

Field() public méthode

Adds a field to be highlighted with a provided fragment size (in characters), and a provided (maximum) number of fragments.
public Field ( string name, int fragmentSize, int numberOfFragments ) : HighlightBuilder
name string The field to highlight
fragmentSize int The size of a fragment in characters
numberOfFragments int The (maximum) number of fragments
Résultat HighlightBuilder

Field() public méthode

Adds a field to be highlighted with a provided fragment size (in characters), and a provided (maximum) number of fragments.
public Field ( string name, int fragmentSize, int numberOfFragments, int fragmentOffset ) : HighlightBuilder
name string The field to highlight
fragmentSize int The size of a fragment in characters
numberOfFragments int The (maximum) number of fragments
fragmentOffset int The offset from the start of the fragment to the start of the highlight
Résultat HighlightBuilder

Order() public méthode

The order of fragments per field. By default, ordered by the order in the highlighted text. Can be score, which then it will be ordered by score of the fragments.
public Order ( string order ) : HighlightBuilder
order string
Résultat HighlightBuilder

PostTags() public méthode

Explicitly set the post tags that will be used for highlighting.
public PostTags ( ) : HighlightBuilder
Résultat HighlightBuilder

PreTags() public méthode

Explicitly set the pre tags that will be used for highlighting.
public PreTags ( ) : HighlightBuilder
Résultat HighlightBuilder

TagsSchema() public méthode

Set a tag scheme that encapsulates a built in pre and post tags. The allows schemes are styled and default.
public TagsSchema ( string schemaName ) : HighlightBuilder
schemaName string The tag scheme name
Résultat HighlightBuilder

ToJsonObject() public méthode

public ToJsonObject ( ) : object
Résultat object