Skip to main content

MemberDeclarationListSelection.TryCreate Method

Containing Type: MemberDeclarationListSelection

Assembly: Roslynator.CSharp.dll

Overloads

MethodSummary
TryCreate(NamespaceDeclarationSyntax, TextSpan, MemberDeclarationListSelection)Creates a new MemberDeclarationListSelection based on the specified namespace declaration and span.
TryCreate(TypeDeclarationSyntax, TextSpan, MemberDeclarationListSelection)Creates a new MemberDeclarationListSelection based on the specified type declaration and span.

TryCreate(NamespaceDeclarationSyntax, TextSpan, MemberDeclarationListSelection)

Creates a new MemberDeclarationListSelection based on the specified namespace declaration and span.

public static bool TryCreate(Microsoft.CodeAnalysis.CSharp.Syntax.NamespaceDeclarationSyntax namespaceDeclaration, Microsoft.CodeAnalysis.Text.TextSpan span, out Roslynator.CSharp.MemberDeclarationListSelection? selectedMembers)

Parameters

namespaceDeclaration NamespaceDeclarationSyntax

span TextSpan

selectedMembers MemberDeclarationListSelection

Returns

Boolean

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

TryCreate(TypeDeclarationSyntax, TextSpan, MemberDeclarationListSelection)

Creates a new MemberDeclarationListSelection based on the specified type declaration and span.

public static bool TryCreate(Microsoft.CodeAnalysis.CSharp.Syntax.TypeDeclarationSyntax typeDeclaration, Microsoft.CodeAnalysis.Text.TextSpan span, out Roslynator.CSharp.MemberDeclarationListSelection? selectedMembers)

Parameters

typeDeclaration TypeDeclarationSyntax

span TextSpan

selectedMembers MemberDeclarationListSelection

Returns

Boolean

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