LineBreakDictionaryOptions Class

Specifies the limits a LineBreakDictionary applies to the word list it is loaded from.

public sealed class LineBreakDictionaryOptions

Remarks

The limits protect the caller from word lists that come from an untrusted source: a list that exceeds one is rejected before memory is allocated for it.

Constructors

NameDescription
LineBreakDictionaryOptions()

LineBreakDictionaryOptions()

LineBreakDictionaryOptions.cs
public LineBreakDictionaryOptions()

No documentation is available.

Properties

NameDescription
DefaultGets the default options.
MaxInputLengthGets the greatest length of the word list, in UTF-16 code units or in UTF-8 bytes. The default is 8 MiB.
MaxWordCountGets the greatest number of words a dictionary accepts. The default is 500,000.
MaxWordLengthGets the greatest length of a word, in UTF-16 code units. The default is 128.

Gets the default options.

public static LineBreakDictionaryOptions Default { get; }

Gets the greatest length of the word list, in UTF-16 code units or in UTF-8 bytes. The default is 8 MiB.

public long MaxInputLength { get; init; }

Property value

long

Exceptions

ArgumentOutOfRangeException
The value is less than 1.

Gets the greatest number of words a dictionary accepts. The default is 500,000.

public int MaxWordCount { get; init; }

Property value

int

Exceptions

ArgumentOutOfRangeException
The value is less than 1.

Remarks

Every line that has a word counts, including a word that is in the list more than once.

Gets the greatest length of a word, in UTF-16 code units. The default is 128.

public int MaxWordLength { get; init; }

Property value

int

Exceptions

ArgumentOutOfRangeException
The value is less than 1 or greater than 255.