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

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

int Count { get; }

Property Value

int:

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

See Also

FirstToken

Gets the first IToken in the set.

IToken FirstToken { get; }

Property Value

IToken:

The first IToken in the set.

See Also

FirstTokenExtendsBack

Gets 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

Gets the last IToken in the set.

IToken LastToken { get; }

Property Value

IToken:

The last IToken in the set.

See Also

LastTokenExtendsForward

Gets 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

Gets 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:

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

See Also

this[int]

Gets 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:

An IToken in the token set.

See Also

Methods

IndexOf(int, int)

Returns the index of the IToken in the set that contains the specified offset, if any.

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:

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

See Also

Inherited Members

See Also