C# Class Microsoft.CodeAnalysis.SyntaxNodeOrTokenList

A list of SyntaxNodeOrToken structures.
Mostra file Open project: stark-lang/stark-roslyn Class Usage Examples

Private Properties

Property Type Description
CopyTo void
CreateList SyntaxNodeOrTokenList
CreateNode Microsoft.CodeAnalysis.SyntaxNode
IEnumerable IEnumerator
IEnumerable IEnumerator
SyntaxNodeOrTokenList System

Public Methods

Method Description
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.

Private Methods

Method Description
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.

Method Details

Add() public method

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.
return SyntaxNodeOrTokenList

AddRange() public method

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.
return SyntaxNodeOrTokenList

Any() public method

Indicates whether there is any element in the list.
public Any ( ) : bool
return bool

Equals() public method

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.
return bool

Equals() public method

Determines whether the specified object is equal to this instance.
public Equals ( object obj ) : bool
obj object The to compare with this instance.
return bool

First() public method

Gets the first SyntaxNodeOrToken structure from this list.
public First ( ) : Microsoft.CodeAnalysis.SyntaxNodeOrToken
return Microsoft.CodeAnalysis.SyntaxNodeOrToken

FirstOrDefault() public method

Gets the first SyntaxNodeOrToken structure from this list if present, else default(SyntaxNodeOrToken).
public FirstOrDefault ( ) : Microsoft.CodeAnalysis.SyntaxNodeOrToken
return Microsoft.CodeAnalysis.SyntaxNodeOrToken

GetEnumerator() public method

Gets the enumerator.
public GetEnumerator ( ) : Microsoft.CodeAnalysis.Enumerator
return Microsoft.CodeAnalysis.Enumerator

GetHashCode() public method

Returns a hash code for this instance.
public GetHashCode ( ) : int
return int

IndexOf() public method

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.
return int

Insert() public method

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.
return SyntaxNodeOrTokenList

InsertRange() public method

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.
return SyntaxNodeOrTokenList

Last() public method

Gets the last SyntaxNodeOrToken structure from this list.
public Last ( ) : Microsoft.CodeAnalysis.SyntaxNodeOrToken
return Microsoft.CodeAnalysis.SyntaxNodeOrToken

LastOrDefault() public method

Gets the last SyntaxNodeOrToken structure from this list if present, else default(SyntaxNodeOrToken).
public LastOrDefault ( ) : Microsoft.CodeAnalysis.SyntaxNodeOrToken
return Microsoft.CodeAnalysis.SyntaxNodeOrToken

Remove() public method

Creates a new SyntaxNodeOrTokenList with the specified element removed.
public Remove ( Microsoft.CodeAnalysis.SyntaxNodeOrToken nodeOrTokenInList ) : SyntaxNodeOrTokenList
nodeOrTokenInList Microsoft.CodeAnalysis.SyntaxNodeOrToken The element to remove.
return SyntaxNodeOrTokenList

RemoveAt() public method

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.
return SyntaxNodeOrTokenList

Replace() public method

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.
return SyntaxNodeOrTokenList

ReplaceRange() public method

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.
return SyntaxNodeOrTokenList

SyntaxNodeOrTokenList() public method

Create a SyntaxNodeOrTokenList from one or more SyntaxNodeOrToken.
public SyntaxNodeOrTokenList ( ) : System
return System

SyntaxNodeOrTokenList() public method

Create a SyntaxNodeOrTokenList from a sequence of SyntaxNodeOrToken.
public SyntaxNodeOrTokenList ( IEnumerable nodesAndTokens ) : System
nodesAndTokens IEnumerable The sequence of nodes and tokens
return System

ToFullString() public method

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
return string

ToString() public method

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
return string

operator() public static method

Implements the operator ==.
public static operator ( ) : bool
return bool

this() public method

Gets the SyntaxNodeOrToken at the specified index.
is out of range.
public this ( int index ) : Microsoft.CodeAnalysis.SyntaxNodeOrToken
index int
return Microsoft.CodeAnalysis.SyntaxNodeOrToken