CodeQL library for C#
codeql/csharp-all 1.0.1 (changelog, source)
Search

Module LogicalOperation

Provides all logical operation classes.

All logical operations have the common base class LogicalOperation.

Import path

import semmle.code.csharp.exprs.LogicalOperation

Imports

Expr

Provides all expression classes.

Classes

BinaryLogicalOperation

A binary logical operation. Either a logical ‘and’ (LogicalAndExpr), a logical ‘or’ (LogicalAndExpr), or a null-coalescing operation (NullCoalescingExpr).

ConditionalExpr

A conditional expression, for example s != null ? s.Length : -1 on line 2 in

LogicalAndExpr

A logical ‘and’, for example x != null && x.Length > 0.

LogicalNotExpr

A logical ‘not’, for example !String.IsNullOrEmpty(s).

LogicalOperation

A logical operation. Either a unary logical operation (UnaryLogicalOperation), a binary logical operation (BinaryLogicalOperation), or a ternary logical operation (TernaryLogicalOperation).

LogicalOrExpr

A logical ‘or’, for example x == null || x.Length == 0.

NullCoalescingExpr

A null-coalescing operation, for example s ?? "" on line 2 in

TernaryLogicalOperation

A ternary logical operation, that is, a ternary conditional expression (ConditionalExpr).

UnaryLogicalOperation

A unary logical operation, that is, a logical ‘not’ (LogicalNotExpr).