In This Article

LexicalStateCollection Class

Represents a collection of lexical states.

public class LexicalStateCollection : KeyedObservableCollection<LexicalStateBase>, IKeyedObservableCollection<LexicalStateBase>, IObservableCollection<LexicalStateBase>, ILexicalStateCollection
Inheritance:
object Collection<LexicalStateBase> SimpleObservableCollection<LexicalStateBase> KeyedObservableCollection<LexicalStateBase> object
Implements:
IKeyedObservableCollection<LexicalStateBase> IObservableCollection<LexicalStateBase> ILexicalStateCollection

Constructors

LexicalStateCollection(ILexer)

Initializes a new instance of the LexicalStateCollection class.

public LexicalStateCollection(ILexer parentLexer)
Parameter Type Description
parentLexer ILexer

The parent ILexer that should be assigned to children, if any.

Methods

GetAllLexicalStateTransitions()

Returns a collection containing all ILexicalStateTransition objects within the lexical states.

public IEnumerable<ILexicalStateTransition> GetAllLexicalStateTransitions()

Returns

IEnumerable<ILexicalStateTransition>:

A collection containing all ILexicalStateTransition objects within the lexical states.

Remarks

This method allows consumers to see which language transitions can be made within the lexer.

OnItemAdded(int, LexicalStateBase)

Called after an item as been added into the collection.

protected override void OnItemAdded(int index, LexicalStateBase value)
Parameter Type Description
index int

The index at which the item is added.

value LexicalStateBase

The item that is added.

OnItemRemoving(int, LexicalStateBase)

Called before an item has been removed from the collection.

protected override void OnItemRemoving(int index, LexicalStateBase value)
Parameter Type Description
index int

The index at which the item is removed.

value LexicalStateBase

The item that is removed.

Inherited Members