Skip to main content

SyntaxListSelection<TNode>.TryCreate(SyntaxList<TNode>, TextSpan, SyntaxListSelection<TNode>) Method

Containing Type: SyntaxListSelection<TNode>

Assembly: Roslynator.Core.dll

Creates a new SyntaxListSelection<TNode> based on the specified list and span.

public static bool TryCreate(Microsoft.CodeAnalysis.SyntaxList<TNode> list, Microsoft.CodeAnalysis.Text.TextSpan span, out Roslynator.SyntaxListSelection<TNode>? selection)

Parameters

list SyntaxList<TNode>

span TextSpan

selection SyntaxListSelection<TNode>

Returns

Boolean

True if the specified span contains at least one node; otherwise, false.