SyntaxListSelection<TNode> Class
Namespace: Roslynator
Assembly: Roslynator.Core.dll
Represents selected nodes in a SyntaxList<TNode>.
public class SyntaxListSelection<TNode> : Roslynator.ISelection<TNode> where TNode : Microsoft.CodeAnalysis.SyntaxNode
Type Parameters
TNode
Inheritance
Object → SyntaxListSelection<TNode>
Derived
Implements
- IEnumerable<TNode>
- IReadOnlyCollection<TNode>
- IReadOnlyList<TNode>
- ISelection<TNode>
Constructors
Constructor | Summary |
---|---|
SyntaxListSelection(SyntaxList<TNode>, TextSpan, Int32, Int32) | Initializes a new instance of the SyntaxListSelection<TNode>. |
Indexers
Indexer | Summary |
---|---|
Item[Int32] | Gets the selected node at the specified index. |
Properties
Property | Summary |
---|---|
Count | Gets a number of selected nodes. |
FirstIndex | Gets an index of the first selected node. (Implements ISelection<TNode>.FirstIndex) |
LastIndex | Gets an index of the last selected node. (Implements ISelection<TNode>.LastIndex) |
OriginalSpan | Gets the original span that was used to determine selected nodes. |
UnderlyingList | Gets an underlying list that contains selected nodes. |
Methods
Method | Summary |
---|---|
Create(SyntaxList<TNode>, TextSpan) | Creates a new SyntaxListSelection<TNode> based on the specified list and span. |
Equals(Object) | (Inherited from Object) |
First() | Gets the first selected node. (Implements ISelection<TNode>.First) |
GetEnumerator() | Returns an enumerator that iterates through selected nodes. |
GetHashCode() | (Inherited from Object) |
GetType() | (Inherited from Object) |
Last() | Gets the last selected node. (Implements ISelection<TNode>.Last) |
MemberwiseClone() | (Inherited from Object) |
ToString() | (Inherited from Object) |
TryCreate(SyntaxList<TNode>, TextSpan, SyntaxListSelection<TNode>) | Creates a new SyntaxListSelection<TNode> based on the specified list and span. |
Explicit Interface Implementations
Member | Summary |
---|---|
IEnumerable.GetEnumerator() | |
IEnumerable<TNode>.GetEnumerator() |
Structs
Struct | Summary |
---|---|
Enumerator |