In This Article

ITokenSet Interface

Provides the base requirements for a class that stores token data for a range of text.

public interface ITokenSet : ITextRangeProvider

Properties

Count

The count of tokens that are stored in the token set.

int Count { get; }

Property Value

int

See Also

FirstToken

The first IToken in the set.

IToken? FirstToken { get; }

Property Value

IToken

See Also

FirstTokenExtendsBack

Indicates whether the FirstToken extends back to another token set.

bool FirstTokenExtendsBack { get; }

Property Value

bool:

true if the FirstToken extends back to another token set; otherwise, false.

See Also

LastToken

The last IToken in the set.

IToken? LastToken { get; }

Property Value

IToken

See Also

LastTokenExtendsForward

Indicates whether the LastToken extends forward to another token set.

bool LastTokenExtendsForward { get; }

Property Value

bool:

true if the LastToken extends forward to another token set; otherwise, false.

See Also

ParseContext

An optional object that may be used to help provide context information when resuming incremental parsing near the end of this token set.

object? ParseContext { get; }

Property Value

object

See Also

this[int]

An IToken in the token set.

IToken this[int index] { get; }
Parameter Type Description
index int

The index of the IToken to return.

Property Value

IToken

See Also

Methods

IndexOf(int, int)

Returns the index of the IToken in the set that contains the specified offset; otherwise, -1.

int IndexOf(int offset, int hintIndex)
Parameter Type Description
offset int

The offset for which to search.

hintIndex int

The hint index at which to begin searching; otherwise, -1.

Returns

int

See Also

Inherited Members

Extension Methods

See Also