C# Class Rubber.DSL.HighlightBuilder

Inheritance: IJsonSerializable
Mostrar archivo Open project: stephenpope/Rubber Class Usage Examples

Public Methods

Method 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 method

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

Field() public method

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
return HighlightBuilder

Field() public method

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
return HighlightBuilder

Field() public method

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
return HighlightBuilder

Field() public method

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
return HighlightBuilder

Order() public method

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
return HighlightBuilder

PostTags() public method

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

PreTags() public method

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

TagsSchema() public method

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
return HighlightBuilder

ToJsonObject() public method

public ToJsonObject ( ) : object
return object