In This Article

ITokenSet Interface

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

public interface ITokenSet : IEnumerable<IToken>, IEnumerable, ITextRangeProvider

Properties

Count

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

int Count { get; }

Property Value

Int32:

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

FirstToken

Gets the first IToken in the set.

IToken FirstToken { get; }

Property Value

IToken:

The first IToken in the set.

FirstTokenExtendsBack

Gets whether the FirstToken extends back to another token set.

bool FirstTokenExtendsBack { get; }

Property Value

Boolean:

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

LastToken

Gets the last IToken in the set.

IToken LastToken { get; }

Property Value

IToken:

The last IToken in the set.

LastTokenExtendsForward

Gets whether the LastToken extends forward to another token set.

bool LastTokenExtendsForward { get; }

Property Value

Boolean:

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

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.

Tokens[Int32]

Gets an IToken in the token set.

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

The index of the IToken to return.

Property Value

IToken:

An IToken in the token set.

Methods

IndexOf(Int32, Int32)

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 Int32

The offset for which to search.

hintIndex Int32

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

Returns

Int32:

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

Inherited Members

See Also