Skip to main content

SeparatedSyntaxListSelection<TNode>.TryCreate(SeparatedSyntaxList<TNode>, TextSpan, SeparatedSyntaxListSelection<TNode>) Method

Containing Type: SeparatedSyntaxListSelection<TNode>

Assembly: Roslynator.Core.dll

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

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

Parameters

list SeparatedSyntaxList<TNode>

span TextSpan

selection SeparatedSyntaxListSelection<TNode>

Returns

Boolean

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