Share via


SyntaxNodeOrTokenList Struct

Definition

A list of SyntaxNodeOrToken structures.

public value class SyntaxNodeOrTokenList : IEquatable<Microsoft::CodeAnalysis::SyntaxNodeOrTokenList>, System::Collections::Generic::IEnumerable<Microsoft::CodeAnalysis::SyntaxNodeOrToken>, System::Collections::Generic::IReadOnlyCollection<Microsoft::CodeAnalysis::SyntaxNodeOrToken>
public readonly struct SyntaxNodeOrTokenList : IEquatable<Microsoft.CodeAnalysis.SyntaxNodeOrTokenList>, System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.SyntaxNodeOrToken>, System.Collections.Generic.IReadOnlyCollection<Microsoft.CodeAnalysis.SyntaxNodeOrToken>
type SyntaxNodeOrTokenList = struct
    interface IReadOnlyCollection<SyntaxNodeOrToken>
    interface seq<SyntaxNodeOrToken>
    interface IEnumerable
Public Structure SyntaxNodeOrTokenList
Implements IEnumerable(Of SyntaxNodeOrToken), IEquatable(Of SyntaxNodeOrTokenList), IReadOnlyCollection(Of SyntaxNodeOrToken)
Inheritance
SyntaxNodeOrTokenList
Implements

Constructors

SyntaxNodeOrTokenList(IEnumerable<SyntaxNodeOrToken>)

Create a SyntaxNodeOrTokenList from a sequence of SyntaxNodeOrToken.

SyntaxNodeOrTokenList(SyntaxNodeOrToken[])

Create a SyntaxNodeOrTokenList from one or more SyntaxNodeOrToken.

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.

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

Equality(SyntaxNodeOrTokenList, SyntaxNodeOrTokenList)

Implements the operator ==.

Inequality(SyntaxNodeOrTokenList, SyntaxNodeOrTokenList)

Implements the operator !=.

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