Skip to main content

CSharpFacts Class

Namespace: Roslynator.CSharp

Assembly: Roslynator.CSharp.dll

public static class CSharpFacts

Methods

MethodSummary
CanBeEmbeddedStatement(SyntaxKind)Returns true if a syntax of the specified kind can be an embedded statement.
CanHaveEmbeddedStatement(SyntaxKind)Returns true if a syntax of the specified kind can have an embedded statement.
CanHaveExpressionBody(SyntaxKind)Returns true if a syntax of the specified kind can have expression body.
CanHaveMembers(SyntaxKind)Returns true if a syntax of the specified kind can have members.
CanHaveModifiers(SyntaxKind)Returns true if a syntax of the specified kind can have modifiers.
CanHaveStatements(SyntaxKind)Returns true if a syntax of the specified kind can have statements. It can be either BlockSyntax or SwitchSectionSyntax.
IsAnonymousFunctionExpression(SyntaxKind)Returns true if a syntax of the specified kind is an anonymous method or lambda expression.
IsBooleanExpression(SyntaxKind)Returns true if a syntax of the specified kind is a boolean expression.
IsBooleanLiteralExpression(SyntaxKind)Returns true if a syntax of the specified kind is true or false literal expression.
IsCommentTrivia(SyntaxKind)Returns true if a syntax of the specified kind is comment trivia.
IsCompoundAssignmentExpression(SyntaxKind)Returns true if a syntax of the specified kind is a compound assignment expression.
IsConstraint(SyntaxKind)Returns true if a syntax of the specified kind is a constraint.
IsFunction(SyntaxKind)Returns true if a syntax of the specified kind if local function or anonymous function.
IsIfElseDirective(SyntaxKind)Returns true if a syntax of the specified kind is #if, #else, #elif or #endif directive.
IsIncrementOrDecrementExpression(SyntaxKind)Returns true if a syntax of the specified kind is pre/post increment/decrement expression.
IsIterationStatement(SyntaxKind)Returns true if a syntax of the specified kind is a for, foreach, while or do statement.
IsJumpStatement(SyntaxKind)Returns true if a syntax of the specified kind is a jump statement.
IsLambdaExpression(SyntaxKind)Returns true if a syntax of the specified kind is a lambda expression.
IsLiteralExpression(SyntaxKind)Returns true if a syntax of the specified kind is a literal expression.
IsNumericType(SpecialType)Returns true if the specified type is a numeric type.
IsPredefinedType(SpecialType)Returns true if a syntax of the specified kind is a predefined type.
IsSimpleType(SpecialType)Returns true if a syntax of the specified kind is a simple type.
IsSwitchLabel(SyntaxKind)Returns true if a syntax of the specified kind is a switch label.
SupportsPrefixOrPostfixUnaryOperator(SpecialType)Returns true if an expression of the specified type can be used in a prefix or postfix unary operator.