Skip to main content

SyntaxAccessibility Class

Namespace: Roslynator.CSharp

Assembly: Roslynator.CSharp.dll

A set of static methods that are related to C# accessibility.

public static class SyntaxAccessibility

Methods

MethodSummary
GetAccessibility(SyntaxNode)Returns an accessibility of the specified declaration.
GetDefaultAccessibility(SyntaxNode)Returns a default accessibility of the specified declaration.
GetDefaultExplicitAccessibility(SyntaxNode)Returns a default explicit accessibility of the specified declaration.
GetExplicitAccessibility(SyntaxNode)Returns an explicit accessibility of the specified declaration.
GetExplicitAccessibility(SyntaxTokenList)Returns an explicit accessibility of the specified modifiers.
IsPubliclyVisible(MemberDeclarationSyntax)Return true if the specified declaration is publicly visible.
IsValidAccessibility(SyntaxNode, Accessibility, Boolean)Returns true if the node can have specified accessibility.
WithExplicitAccessibility<TNode>(TNode, Accessibility, IComparer<SyntaxKind>)Creates a new node with the specified explicit accessibility updated.
WithoutExplicitAccessibility<TNode>(TNode)Creates a new node with the explicit accessibility removed.