Skip to main content

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

Constructors

ConstructorSummary
SyntaxListSelection(SyntaxList<TNode>, TextSpan, Int32, Int32)Initializes a new instance of the SyntaxListSelection<TNode>.

Indexers

IndexerSummary
Item[Int32]Gets the selected node at the specified index.

Properties

PropertySummary
CountGets a number of selected nodes.
FirstIndexGets an index of the first selected node. (Implements ISelection<TNode>.FirstIndex)
LastIndexGets an index of the last selected node. (Implements ISelection<TNode>.LastIndex)
OriginalSpanGets the original span that was used to determine selected nodes.
UnderlyingListGets an underlying list that contains selected nodes.

Methods

MethodSummary
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

MemberSummary
IEnumerable.GetEnumerator()
IEnumerable<TNode>.GetEnumerator()

Structs

StructSummary
Enumerator