SyntaxNodeOrTokenList Struct

Definition

A list of SyntaxNodeOrToken structures.

C#
public readonly struct SyntaxNodeOrTokenList : IEquatable<Microsoft.CodeAnalysis.SyntaxNodeOrTokenList>, System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.SyntaxNodeOrToken>, System.Collections.Generic.IReadOnlyCollection<Microsoft.CodeAnalysis.SyntaxNodeOrToken>
Inheritance
SyntaxNodeOrTokenList
Implements

Constructors

Properties

Count

Gets the count of nodes in this list

FullSpan

The absolute span of the list elements in characters, including the leading and trailing trivia of the first and last elements.

Item[Int32]

Gets the SyntaxNodeOrToken at the specified index.

Span

The absolute span of the list elements in characters, not including the leading and trailing trivia of the first and last elements.

Methods

Add(SyntaxNodeOrToken)

Creates a new SyntaxNodeOrTokenList with the specified node or token added to the end.

AddRange(IEnumerable<SyntaxNodeOrToken>)

Creates a new SyntaxNodeOrTokenList with the specified nodes or tokens added to the end.

Any()

Indicates whether there is any element in the list.

Create(ReadOnlySpan<SyntaxNodeOrToken>)
Equals(Object)

Determines whether the specified Object is equal to this instance.

Equals(SyntaxNodeOrTokenList)

Indicates whether the current object is equal to another object of the same type.

First()

Gets the first SyntaxNodeOrToken structure from this list.

FirstOrDefault()

Gets the first SyntaxNodeOrToken structure from this list if present, else default(SyntaxNodeOrToken).

GetEnumerator()

Gets the enumerator.

GetHashCode()

Returns a hash code for this instance.

IndexOf(SyntaxNodeOrToken)

Returns the index from the list for the given SyntaxNodeOrToken.

Insert(Int32, SyntaxNodeOrToken)

Creates a new SyntaxNodeOrTokenList with the specified node or token inserted at the index.

InsertRange(Int32, IEnumerable<SyntaxNodeOrToken>)

Creates a new SyntaxNodeOrTokenList with the specified nodes or tokens inserted at the index.

Last()

Gets the last SyntaxNodeOrToken structure from this list.

LastOrDefault()

Gets the last SyntaxNodeOrToken structure from this list if present, else default(SyntaxNodeOrToken).

Remove(SyntaxNodeOrToken)

Creates a new SyntaxNodeOrTokenList with the specified element removed.

RemoveAt(Int32)

Creates a new SyntaxNodeOrTokenList with the element at the specified index removed.

Replace(SyntaxNodeOrToken, SyntaxNodeOrToken)

Creates a new SyntaxNodeOrTokenList with the specified element replaced with a new node or token.

ReplaceRange(SyntaxNodeOrToken, IEnumerable<SyntaxNodeOrToken>)

Creates a new SyntaxNodeOrTokenList with the specified element replaced with a new nodes and tokens.

ToFullString()

Returns the full string representation of the nodes and tokens in this list including the first node or token's leading trivia and the last node or token's trailing trivia.

ToString()

Returns the string representation of the nodes and tokens in this list, not including the first node or token's leading trivia and the last node or token's trailing trivia.

Operators

Explicit Interface Implementations

IEnumerable.GetEnumerator()

Returns an enumerator that iterates through a collection.

IEnumerable<SyntaxNodeOrToken>.GetEnumerator()

Returns an enumerator that iterates through the collection.

Applies to

Product Versions
Roslyn 4.2.0, 4.3.0, 4.4.0, 4.5.0, 4.6.0, 4.7.0, 4.8.0, 4.9.2, 3.0.0, 3.1.0, 3.2.0, 3.2.1, 3.3.1, 3.4.0, 3.5.0, 3.6.0, 3.7.0, 3.8.0, 3.9.0, 3.10.0, 3.11.0, 4.0.1, 4.1.0, 4.12.2, 4.13.0