C# Класс Microsoft.CodeAnalysis.SyntaxNodeOrTokenList

A list of SyntaxNodeOrToken structures.
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
CopyTo void
CreateList SyntaxNodeOrTokenList
CreateNode Microsoft.CodeAnalysis.SyntaxNode
IEnumerable IEnumerator
IEnumerable IEnumerator
SyntaxNodeOrTokenList System

Открытые методы

Метод Описание
Add ( Microsoft.CodeAnalysis.SyntaxNodeOrToken nodeOrToken ) : SyntaxNodeOrTokenList

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

AddRange ( IEnumerable nodesOrTokens ) : SyntaxNodeOrTokenList

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

Any ( ) : bool

Indicates whether there is any element in the list.

Equals ( other ) : bool

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

Equals ( object obj ) : bool

Determines whether the specified object is equal to this instance.

First ( ) : Microsoft.CodeAnalysis.SyntaxNodeOrToken

Gets the first SyntaxNodeOrToken structure from this list.

FirstOrDefault ( ) : Microsoft.CodeAnalysis.SyntaxNodeOrToken

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

GetEnumerator ( ) : Microsoft.CodeAnalysis.Enumerator

Gets the enumerator.

GetHashCode ( ) : int

Returns a hash code for this instance.

IndexOf ( Microsoft.CodeAnalysis.SyntaxNodeOrToken nodeOrToken ) : int

Returns the index from the list for the given SyntaxNodeOrToken.

Insert ( int index, Microsoft.CodeAnalysis.SyntaxNodeOrToken nodeOrToken ) : SyntaxNodeOrTokenList

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

InsertRange ( int index, IEnumerable nodesAndTokens ) : SyntaxNodeOrTokenList

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

Last ( ) : Microsoft.CodeAnalysis.SyntaxNodeOrToken

Gets the last SyntaxNodeOrToken structure from this list.

LastOrDefault ( ) : Microsoft.CodeAnalysis.SyntaxNodeOrToken

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

Remove ( Microsoft.CodeAnalysis.SyntaxNodeOrToken nodeOrTokenInList ) : SyntaxNodeOrTokenList

Creates a new SyntaxNodeOrTokenList with the specified element removed.

RemoveAt ( int index ) : SyntaxNodeOrTokenList

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

Replace ( Microsoft.CodeAnalysis.SyntaxNodeOrToken nodeOrTokenInList, Microsoft.CodeAnalysis.SyntaxNodeOrToken newNodeOrToken ) : SyntaxNodeOrTokenList

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

ReplaceRange ( Microsoft.CodeAnalysis.SyntaxNodeOrToken nodeOrTokenInList, IEnumerable newNodesAndTokens ) : SyntaxNodeOrTokenList

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

SyntaxNodeOrTokenList ( ) : System

Create a SyntaxNodeOrTokenList from one or more SyntaxNodeOrToken.

SyntaxNodeOrTokenList ( IEnumerable nodesAndTokens ) : System

Create a SyntaxNodeOrTokenList from a sequence of SyntaxNodeOrToken.

ToFullString ( ) : string

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 ( ) : string

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.

operator ( ) : bool

Implements the operator ==.

this ( int index ) : Microsoft.CodeAnalysis.SyntaxNodeOrToken

Gets the SyntaxNodeOrToken at the specified index.

Приватные методы

Метод Описание
CopyTo ( int offset, Array array, int arrayOffset, int count ) : void

Copies a given count of elements into the given array at specified offsets.

CreateList ( GreenNode creator, List items ) : SyntaxNodeOrTokenList
CreateNode ( IEnumerable nodesAndTokens ) : Microsoft.CodeAnalysis.SyntaxNode
IEnumerable ( ) : IEnumerator

Returns an enumerator that iterates through a collection.

IEnumerable ( ) : IEnumerator

Returns an enumerator that iterates through the collection.

SyntaxNodeOrTokenList ( Microsoft.CodeAnalysis.SyntaxNode node, int index ) : System

Initializes a new instance of the SyntaxNodeOrTokenList structure.

Описание методов

Add() публичный Метод

Creates a new SyntaxNodeOrTokenList with the specified node or token added to the end.
public Add ( Microsoft.CodeAnalysis.SyntaxNodeOrToken nodeOrToken ) : SyntaxNodeOrTokenList
nodeOrToken Microsoft.CodeAnalysis.SyntaxNodeOrToken The node or token to add.
Результат SyntaxNodeOrTokenList

AddRange() публичный Метод

Creates a new SyntaxNodeOrTokenList with the specified nodes or tokens added to the end.
public AddRange ( IEnumerable nodesOrTokens ) : SyntaxNodeOrTokenList
nodesOrTokens IEnumerable The nodes or tokens to add.
Результат SyntaxNodeOrTokenList

Any() публичный Метод

Indicates whether there is any element in the list.
public Any ( ) : bool
Результат bool

Equals() публичный Метод

Indicates whether the current object is equal to another object of the same type.
public Equals ( other ) : bool
other An object to compare with this object.
Результат bool

Equals() публичный Метод

Determines whether the specified object is equal to this instance.
public Equals ( object obj ) : bool
obj object The to compare with this instance.
Результат bool

First() публичный Метод

Gets the first SyntaxNodeOrToken structure from this list.
public First ( ) : Microsoft.CodeAnalysis.SyntaxNodeOrToken
Результат Microsoft.CodeAnalysis.SyntaxNodeOrToken

FirstOrDefault() публичный Метод

Gets the first SyntaxNodeOrToken structure from this list if present, else default(SyntaxNodeOrToken).
public FirstOrDefault ( ) : Microsoft.CodeAnalysis.SyntaxNodeOrToken
Результат Microsoft.CodeAnalysis.SyntaxNodeOrToken

GetEnumerator() публичный Метод

Gets the enumerator.
public GetEnumerator ( ) : Microsoft.CodeAnalysis.Enumerator
Результат Microsoft.CodeAnalysis.Enumerator

GetHashCode() публичный Метод

Returns a hash code for this instance.
public GetHashCode ( ) : int
Результат int

IndexOf() публичный Метод

Returns the index from the list for the given SyntaxNodeOrToken.
public IndexOf ( Microsoft.CodeAnalysis.SyntaxNodeOrToken nodeOrToken ) : int
nodeOrToken Microsoft.CodeAnalysis.SyntaxNodeOrToken The node or token to search for in the list.
Результат int

Insert() публичный Метод

Creates a new SyntaxNodeOrTokenList with the specified node or token inserted at the index.
public Insert ( int index, Microsoft.CodeAnalysis.SyntaxNodeOrToken nodeOrToken ) : SyntaxNodeOrTokenList
index int The index to insert at.
nodeOrToken Microsoft.CodeAnalysis.SyntaxNodeOrToken The node or token to insert.
Результат SyntaxNodeOrTokenList

InsertRange() публичный Метод

Creates a new SyntaxNodeOrTokenList with the specified nodes or tokens inserted at the index.
public InsertRange ( int index, IEnumerable nodesAndTokens ) : SyntaxNodeOrTokenList
index int The index to insert at.
nodesAndTokens IEnumerable The nodes or tokens to insert.
Результат SyntaxNodeOrTokenList

Last() публичный Метод

Gets the last SyntaxNodeOrToken structure from this list.
public Last ( ) : Microsoft.CodeAnalysis.SyntaxNodeOrToken
Результат Microsoft.CodeAnalysis.SyntaxNodeOrToken

LastOrDefault() публичный Метод

Gets the last SyntaxNodeOrToken structure from this list if present, else default(SyntaxNodeOrToken).
public LastOrDefault ( ) : Microsoft.CodeAnalysis.SyntaxNodeOrToken
Результат Microsoft.CodeAnalysis.SyntaxNodeOrToken

Remove() публичный Метод

Creates a new SyntaxNodeOrTokenList with the specified element removed.
public Remove ( Microsoft.CodeAnalysis.SyntaxNodeOrToken nodeOrTokenInList ) : SyntaxNodeOrTokenList
nodeOrTokenInList Microsoft.CodeAnalysis.SyntaxNodeOrToken The element to remove.
Результат SyntaxNodeOrTokenList

RemoveAt() публичный Метод

Creates a new SyntaxNodeOrTokenList with the element at the specified index removed.
public RemoveAt ( int index ) : SyntaxNodeOrTokenList
index int The index of the element to remove.
Результат SyntaxNodeOrTokenList

Replace() публичный Метод

Creates a new SyntaxNodeOrTokenList with the specified element replaced with a new node or token.
public Replace ( Microsoft.CodeAnalysis.SyntaxNodeOrToken nodeOrTokenInList, Microsoft.CodeAnalysis.SyntaxNodeOrToken newNodeOrToken ) : SyntaxNodeOrTokenList
nodeOrTokenInList Microsoft.CodeAnalysis.SyntaxNodeOrToken The element to replace.
newNodeOrToken Microsoft.CodeAnalysis.SyntaxNodeOrToken The new node or token.
Результат SyntaxNodeOrTokenList

ReplaceRange() публичный Метод

Creates a new SyntaxNodeOrTokenList with the specified element replaced with a new nodes and tokens.
public ReplaceRange ( Microsoft.CodeAnalysis.SyntaxNodeOrToken nodeOrTokenInList, IEnumerable newNodesAndTokens ) : SyntaxNodeOrTokenList
nodeOrTokenInList Microsoft.CodeAnalysis.SyntaxNodeOrToken The element to replace.
newNodesAndTokens IEnumerable The new nodes and tokens.
Результат SyntaxNodeOrTokenList

SyntaxNodeOrTokenList() публичный Метод

Create a SyntaxNodeOrTokenList from one or more SyntaxNodeOrToken.
public SyntaxNodeOrTokenList ( ) : System
Результат System

SyntaxNodeOrTokenList() публичный Метод

Create a SyntaxNodeOrTokenList from a sequence of SyntaxNodeOrToken.
public SyntaxNodeOrTokenList ( IEnumerable nodesAndTokens ) : System
nodesAndTokens IEnumerable The sequence of nodes and tokens
Результат System

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.
public ToFullString ( ) : string
Результат string

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.
public ToString ( ) : string
Результат string

operator() публичный статический Метод

Implements the operator ==.
public static operator ( ) : bool
Результат bool

this() публичный Метод

Gets the SyntaxNodeOrToken at the specified index.
is out of range.
public this ( int index ) : Microsoft.CodeAnalysis.SyntaxNodeOrToken
index int
Результат Microsoft.CodeAnalysis.SyntaxNodeOrToken