Skip to main content

C#

Scopes

Supported facets

These facets are supported

Anonymous function

  • Anonymous function: An anonymous function, eg a lambda function, an arrow function, etc

Argument or parameter

  • Actual: An argument/parameter in a function call
  • Actual (iteration): Iteration scope of arguments in a function call, should be inside the parens of the argument list
  • Formal: A parameter in a function declaration
  • Formal (iteration): Iteration scope of the formal parameters of a function declaration; should be the whole parameter list. The domain should be the entire function.

Class

  • Class: A class in an object-oriented language
  • Iteration block: Iteration scope for classes. Statement blocks(body of functions/if classes/for loops/etc).
  • Iteration document: Iteration scope for classes. The entire document.

Class name

  • Class name: The name of a class
  • Iteration block: Iteration scope for class names. Statement blocks(body of functions/if classes/for loops/etc).
  • Iteration document: Iteration scope for class names. The entire document.

Collection key

  • Map pair: Key (LHS) of a key-value pair of a map
  • Map pair (iteration): Iteration scope of key-value pairs in a map; should be between the braces

Condition

  • Do while: A condition in a do while loop
  • For: A condition in a for loop
  • If: A condition in an if statement
  • Switch case: A condition in a switch statement
  • Switch case (iteration): The iteration scope for conditions in a switch statement: should contain all the cases, and exclude any curly brackets delimiting the full switch statement body
  • Ternary: A condition in a ternary expression
  • While: A condition in a while loop

Disqualify delimiter

  • Disqualify delimiter: Used to disqualify a token from being treated as a surrounding pair delimiter. This will usually be operators containing `>` or `<`, eg `<`, `<=`, `->`, etc

Function call

  • Function call: A function call
  • Constructor: A constructor call

Function callee

  • Function callee: The function being called in a function call
  • Constructor: The class being constructed in a class instantiation, including the `new` keyword

Function name

  • Function name: The name of a function
  • Constructor: The name of a constructor in a class
  • Method: The name of a method in a class
  • Method iteration class: Iteration scope for method names: class bodies

If statement

  • If statement: An if statement

List

  • List: A list/array

Map

  • Map: A map/dictionary

Name

  • Argument formal: The name of a parameter in a function declaration
  • Argument formal (iteration): Iteration scope of the names of the formal parameters of a function declaration; should be the whole parameter list
  • Assignment: Name (LHS) of an assignment
  • Variable: Name (LHS) of a variable declaration

Named function

  • Named function: A named function declaration
  • Constructor: A constructor declaration in a class
  • Method: A named method declaration in a class
  • Method iteration class: Iteration scope for named functions: class bodies

Type

  • Argument formal: Type of formal parameter in a function declaration
  • Argument formal (iteration): Iteration scope of the types of the formal parameters of a function declaration; should be the whole parameter list
  • Variable: Type of variable in a variable declaration

Value

  • Argument formal: The value of a (keyword) argument in a function declaration
  • Argument formal (iteration): Iteration scope of the values of the formal parameters of a function declaration; should be the whole parameter list
  • Assignment: Value (RHS) of an assignment
  • Map pair: Value (RHS) of a key-value pair in a map
  • Map pair (iteration): Iteration scope of key-value pairs in a map; should be between the braces
  • Variable: Value (RHS) of a variable declaration

Unspecified facets

These facets are unspecified