Click or drag to resize

SyntaxTokenList Class



Represents a read-only list of SyntaxToken.
Represents a read-only list of SyntaxTokens.
Inheritance Hierarchy
SystemValueType
  Microsoft.CodeAnalysisSyntaxTokenList

Namespace:  Microsoft.CodeAnalysis
Assembly:  Microsoft.CodeAnalysis (in Microsoft.CodeAnalysis.dll) Version: 2.3.0-dev-56735-00. Commit Hash: <developer build>
Syntax
public sealed class SyntaxTokenList : ValueType, 
	IEquatable, IReadOnlyList, IEnumerable, IEnumerable, IReadOnlyCollection

The SyntaxTokenList type exposes the following members.

Properties
  NameDescription
Public propertyCount
Returns the number of tokens in the list.
Public propertyFullSpan
The absolute span of the list elements in characters, including the leading and trailing trivia of the first and last elements.
Public propertyItem
Gets the token at the specified index.
Public propertySpan
The absolute span of the list elements in characters, not including the leading and trailing trivia of the first and last elements.
Top
Methods
  NameDescription
Public methodAdd
Creates a new SyntaxTokenList with the specified token added to the end.
Public methodAddRange
Public methodAny
Tests whether the list is non-empty.
Public methodStatic memberCreate
Create a new Token List
Public methodEquals(Object)
Compares this SyntaxTokenList with the obj for equality.
Public methodEquals(SyntaxTokenList)
Public methodFirst
Returns the first token in the list.
Public methodGetEnumerator
Returns an enumerator for the tokens in the SyntaxTokenList
Public methodGetHashCode
Serves as a hash function for the SyntaxTokenList
Public methodIndexOf
Public methodInsert
Creates a new SyntaxTokenList with the specified token insert at the index.
Public methodInsertRange
Public methodLast
Returns the last token in the list.
Public methodRemove
Creates a new SyntaxTokenList with the specified token removed.
Public methodRemoveAt
Creates a new SyntaxTokenList with the token at the specified index removed.
Public methodReplace
Creates a new SyntaxTokenList with the specified token replaced with a new token.
Public methodReplaceRange
Public methodReverse
Returns a list which contains all elements of SyntaxTokenList in reversed order.
Public methodToFullString
Returns the full string representation of the tokens in this list including the first token's leading trivia and the last token's trailing trivia.
Public methodToString
Returns the string representation of the tokens in this list, not including the first token's leading trivia and the last token's trailing trivia.
Top
Operators
  NameDescription
Public operatorStatic memberEquality
Compares left and right for equality.
Public operatorStatic memberInequality
Compares left and right for inequality.
Top
Extension Methods
  NameDescription
Public Extension MethodAdd
Add one or more tokens to the end of the list.
(Defined by VisualBasicExtensions.)
Public Extension MethodAny(SyntaxKind)Overloaded.
Tests whether a list contains token of a particular kind.
(Defined by VisualBasicExtensions.)
Public Extension MethodAny(SyntaxKind)Overloaded.
Tests whether a list contains a token of a particular kind.
(Defined by CSharpExtensions.)
Public Extension MethodIndexOf(SyntaxKind)Overloaded.
Returns the index of the first token of a specified kind in the token list.
(Defined by VisualBasicExtensions.)
Public Extension MethodIndexOf(SyntaxKind)Overloaded.
Returns the index of the first token of a specified kind in the token list.
(Defined by CSharpExtensions.)
Public Extension MethodInsert(Int32, SyntaxToken)Overloaded.
Insert one or more tokens in the list at the specified index.
(Defined by VisualBasicExtensions.)
Public Extension MethodInsert(Int32, SyntaxToken)Overloaded.
Insert one or more tokens in the list at the specified index.
(Defined by CSharpExtensions.)
Top
See Also