Collapse All Expand All Code: All Code: Multiple Code: C# Code: Visual Basic

C#
Visual Basic

Azuki 1.7 Documentation
KeywordHighlighter..::..AddKeywordSet Method (array<String>[]()[][], CharClass, Boolean)
KeywordHighlighter Class See Also Send Feedback

Adds a set of keywords to be highlighted.

Namespace: Sgry.Azuki.Highlighter
Assembly: Azuki (in Azuki.dll) Version: 1.7.13.40248

# Syntax

C#
    public void AddKeywordSet(
    	string[] keywords,
    	CharClass klass,
    	bool ignoreCase
    )

Visual Basic
    Public Sub AddKeywordSet (
    	keywords As String(),
    	klass As CharClass,
    	ignoreCase As Boolean
    )

#### Parameters

keywords
  Type: array<System..::..String>[]()[][]
  Sorted array of keywords.

klass
  Type: Sgry.Azuki..::..CharClass
  Char-class to be applied to the keyword set.

ignoreCase
  Type: System..::..Boolean
  Whether case of the keywords should be ignored or not.

# Remarks

This method registers a set of keywords to be highlighted.

The keywords stored in keywords parameter will be highlighted as a character class specified by klass parameter. Please ensure that keywords in keywords parameter must be alphabetically sorted. If they are not sorted, ArgumentException will be thrown.

If ignoreCase is true, KeywordHighlighter ignores case of all given keywords on matching. Note that if ignoreCase is true, all characters of keywords must be in lower case otherwise keywords may not be highlighted properly.

If other character must be considered as a part of keyword, use WordCharSet property.

# Exceptions

Exception | Condition
--- | ---
System..::..ArgumentException | Parameter 'keywords' are not sorted alphabetically.
System..::..ArgumentNullException | Parameter 'keywords' is null.

# See Also

KeywordHighlighter Class
KeywordHighlighter..::..KeywordHighlighter Members
AddKeywordSet Overload
Sgry.Azuki.Highlighter Namespace