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

Module Access

Provides all access expression classes.

All access expressions have the common base class Access.

Import path

import semmle.code.csharp.exprs.Access

Imports

Expr

Provides all expression classes.

Variable

Provides classes for variables, such as fields, parameters, local variables, and constants.

Classes

Access

An access expression. Either a this access (ThisAccess), a base access (BaseAccess), a member access (MemberAccess), an assignable access (AssignableAccess), or a callable access (CallableAccess).

ArrayAccess

An access to an array, for example the access to args on line 3 in

ArrayRead

An access to an array that reads the underlying value, for example the access to a on line 2 in

ArrayWrite

An access to an array that updates the underlying value, for example the access to a on line 2 in

AssignableAccess

An assignable access, that is, an access that is valid on the left-hand side of some assignment. Either an access to a variable (VariableAccess), an access to a property (PropertyAccess), an access to an element (ElementAccess), an access to an event (EventAccess), or a dynamic member access (DynamicMemberAccess).

BaseAccess

A base access, for example base on line 2 in

CallableAccess

An access to a callable. Either a method access (MethodAccess) or a local function access (LocalFunctionAccess).

ElementAccess

An access to an element. Either an access to an indexer (IndexerAccess), an access to an array (ArrayAccess), or a dynamic element access (DynamicElementAccess).

ElementRead

An access to an element that reads the underlying value. Either an access to an indexer (IndexerRead), an access to an array (ArrayRead), or an access to a dynamic element (DynamicElementRead).

ElementWrite

An access to an element that updates the underlying value. Either an access to an indexer (IndexerWrite), an access to an array (ArrayWrite), or an access to a dynamic element (DynamicElementWrite).

EventAccess

An access to an event, for example the accesses to Click on lines 7 and 8 in

EventAccessExpr

An internal helper class to share logic between EventAccess and EventCall.

EventRead

An access to an event that reads the underlying value, for example the accesses to Click on lines 7 and 8 in

EventWrite

An access to an event that updates the underlying value, for example the access to Click on line 7 in

FieldAccess

An access to a field, for example the access to F on line 5 in

FieldRead

An access to a field that reads the underlying value, for example the access to F on line 5 in

FieldWrite

An access to a field that updates the underlying value, for example the access to F on line 5 in

IndexerAccess

An access to an indexer, for example the access to c on line 5 in

IndexerAccessExpr

An internal helper class to share logic between IndexerAccess and IndexerCall.

IndexerRead

An access to an indexer that reads the underlying value, for example the access to c on line 5 in

IndexerWrite

An access to an indexer that updates the underlying value, for example the access to c on line 5 in

LocalFunctionAccess

An access to a local function, for example the access to Filter on line 4 in

LocalScopeVariableAccess

An access to a local scope variable. Either an access to a parameter (ParameterAccess) or an access to a local variable (LocalVariableAccess).

LocalScopeVariableRead

An access to a local scope variable that reads the underlying value. Either an access to a parameter (ParameterRead) or an access to a local variable (LocalVariableRead).

LocalScopeVariableWrite

An access to a local scope variable that updates the underlying value. Either an access to a parameter (ParameterWrite) or an access to a local variable (LocalVariableWrite).

LocalVariableAccess

An access to a local variable, for example the access to x on line 3 in

LocalVariableRead

An access to a local variable that reads the underlying value, for example the access to x on line 3 in

LocalVariableWrite

An access to a local variable that updates the underlying value, for example the access to x on line 3 in

MemberAccess

A member access. Either an access to a field (FieldAccess), an access to a property (PropertyAccess), an access to an indexer (IndexerAccess), an access to an event (EventAccess), an access to a method (MethodAccess), an access to a type (TypeAccess), or a dynamic member access (DynamicMemberAccess).

MemberConstantAccess

An access to a member (field), for example the access to F on line 5 in

MethodAccess

An access to a method, for example the access to Filter on line 5 in

NamespaceAccess

An access to a namespace, for example System in nameof(System).

ParameterAccess

An access to a parameter, for example the access to p on line 2 in

ParameterRead

An access to a parameter that reads the underlying value, for example the access to p on line 2 in

ParameterWrite

An access to a parameter that updates the underlying value, for example the access to p on line 2 in

PropertyAccess

An access to a property, for example the access to P on line 5 in

PropertyAccessExpr

An internal helper class to share logic between PropertyAccess and PropertyCall.

PropertyRead

An access to a property that reads the underlying value, for example the access to P on line 5 in

PropertyWrite

An access to a property that updates the underlying value, for example the access to P on line 5 in

ThisAccess

A this access, for example this on line 5 in

TrivialPropertyAccess

An access to a trivial property - a property with a default getter and setter. For example, the access to P on line 5 in

TypeAccess

An access to a type, for example the access to C on line 3 in

VariableAccess

An access to a variable. Either an access to a local scope variable (LocalScopeVariableAccess) or an access to a field (FieldAccess).

VariableRead

An access to a variable that reads the underlying value. Either an access to a local scope variable (LocalScopeVariableRead) or an access to a field (FieldRead).

VariableWrite

An access to a variable that updates the underlying value. Either an access to a local scope variable (LocalScopeVariableWrite) or an access to a field (FieldWrite).

VirtualEventAccess

An access to a virtual event - an event that is virtual or defined in an interface. For example, the accesses to Click on lines 7 and 8 in

VirtualIndexerAccess

An access to a virtual indexer - an indexer that is virtual or defined in an interface. For example, the access to c on line 5 in

VirtualMethodAccess

An access to a virtual method - a method that is virtual or defined in an interface. For example, the access to Filter on line 5 in

VirtualPropertyAccess

An access to a virtual property - a property that is virtual or defined in an interface. For example, the access to P on line 5 in