Table of Contents

Namespace LinqToDB.CodeModel

Classes

AstExtensions
AttributeBuilder

CodeAttribute custom attribute object builder.

AttributeOwner

Base class for elements with custom attributes.

BlockBuilder

CodeBlock object builder.

ClassBuilder

CodeClass object builder.

ClassGroup

Group of classes.

CodeAsOperator

Type convert expression using as operator.

CodeAssignmentBase

Assignment expression or statement.

CodeAssignmentExpression

Assignment expression.

CodeAssignmentStatement

Assignment statement.

CodeAttribute

Custom attribute declaration.

CodeAttribute.CodeNamedParameter
CodeAwaitExpression

Await expression.

CodeAwaitStatement

Await statement.

CodeBinary
CodeBlock

Code block statement.

CodeBuilder

AST builder class with helpers to create various AST nodes.

CodeCallBase

Method call statement.

CodeCallExpression

Method call expression.

CodeCallStatement

Method call statement.

CodeClass
CodeComment
CodeConstant

Constant expression. E.g. literal (including null literal) or enumeration value.

CodeConstructor

Class constructor.

CodeDefault

Default value expression.

CodeElementList<TElement>

Base class for collection of code nodes of specific type.

CodeEmptyLine

Empty line element. Used for explicit formatting.

CodeExternalPropertyOrField

Defines reference to property or field of existing type.

CodeField

Class field definition.

CodeFile

File-level code unit.

CodeGenerationVisitor

Base code generation visitor that contains public API for code generation.

CodeIdentifier

Reference to identifier value. Used instead of string to allow identifier mutation in existing AST (e.g. because initial value is not valid in target language or conflicts with existing identifiers).

CodeImport

Import (using) statement.

CodeIndex

Indexed access expression.

CodeLambda

Lambda method.

CodeMember

Member access expression.

CodeMethod

Class method definition.

CodeModelVisitor

Base AST visitor class without node visit methods implementation.

CodeNameOf

nameof(...) expression.

CodeNamespace

Namespace declaration.

CodeNew

New object instantiation expression.

CodeNewArray

Expression, describing new one-dimensional array declaration.

CodeParameter

Method parameter.

CodePragma

Compiler pragma directive.

CodeProperty

Class property declaration.

CodeReference

Defines reference to parameter or variable inside of current method/property or simple (without owner type/instance) reference to field/property.

CodeRegion

Code region.

CodeReturn

Return statement.

CodeSuppressNull

null-forgiving operator.

CodeTernary
CodeThis

this reference.

CodeThrowBase

Throw expression.

CodeThrowExpression

Throw expression.

CodeThrowStatement

Throw statement.

CodeTypeCast

Type cast expression.

CodeTypeInitializer

Type initializer (static constructor).

CodeTypeReference

Type, used in expression context.

CodeTypeToken

Type reference, used in type-only context.

CodeTypedName

Typed named entity (parameter, variable, field or property).

CodeUnary
CodeVariable

Variable declaration.

CodeXmlComment

XML-doc commentary.

CodeXmlComment.ParameterComment
ConstructorBuilder

CodeConstructor builder.

ConstructorGroup

Group of constructors.

ConvertCodeModelVisitor

Base AST rewrite visitor class with noop node visit methods implementation with root-to-leaf visit order. Each node could be replaced with any other node type and this is visitor implementor's responsibility to ensure new node type is compatible with node owner. Otherwise parent node visit method will generate type cast exception trying to consume incompatible child node. Important note: node visitors should visit only child nodes.

FieldBuilder

CodeField object builder.

FieldGroup

Group of fields.

LambdaMethodBuilder

CodeLambda object builder.

LanguageProviders

Provides access to built-in language providers.

MemberGroup<TMember>

Base class for node groups.

MethodBase

Base class for method-like nodes.

MethodBaseBuilder<TBuilder, TMethod>

Base class for method-like object builders.

MethodBuilder

CodeMethod object builder.

MethodGroup

Group of methods.

NameFixOptions
NamespaceBuilder

CodeNamespace object builder.

NoopCodeModelVisitor

Base class for AST visitors with default implementation for all nodes.

PragmaGroup

Group of compiler pragmas.

PropertyBuilder

CodeProperty object builder.

PropertyGroup

Group of properties.

ProviderSpecificStructsEqualityFixer

This visitor overrides equality operation for some well-known types which doesn't implement "bool operator==" and "bool operator!=".

RegionBuilder

CodeRegion object builder.

RegionGroup

Group of regions.

TypeBase

Base class for types.

TypeBuilder<TBuilder, TType>

Base class for type builders.

TypeInitializerBuilder

CodeTypeInitializer method builder.

WellKnownTypes

This class contains pre-parsed IType definitions and member references for well-known system and Linq To DB types, used during code generation.

WellKnownTypes.LinqToDB
WellKnownTypes.LinqToDB.Common
WellKnownTypes.LinqToDB.Configuration
WellKnownTypes.LinqToDB.Data
WellKnownTypes.LinqToDB.Expressions
WellKnownTypes.LinqToDB.Mapping
WellKnownTypes.LinqToDB.Tools
WellKnownTypes.LinqToDB.Tools.Comparers
WellKnownTypes.Microsoft
WellKnownTypes.Microsoft.SqlServer
WellKnownTypes.Microsoft.SqlServer.Types
WellKnownTypes.System
WellKnownTypes.System.Collections
WellKnownTypes.System.Collections.Generic
WellKnownTypes.System.Data
WellKnownTypes.System.Data.Common
WellKnownTypes.System.Data.SqlTypes
WellKnownTypes.System.Linq
WellKnownTypes.System.Linq.Expressions
WellKnownTypes.System.Reflection
WellKnownTypes.System.Threading
WellKnownTypes.System.Threading.Tasks
XmlDocBuilder

CodeXmlComment object builder.

Interfaces

ICodeElement

Base interface, implemented by all AST nodes.

ICodeExpression

Marker interface for expression nodes.

ICodeStatement

Marker interface for statement nodes.

IGroupElement

Marker interface for members of node groups.

ILValue

Marker interface for l-value nodes (nodes, that could be used as assignment targets).

ILanguageProvider

Provides access to language-specific functionality.

IMemberGroup

Non-generic interface for member groups.

ITopLevelElement

Marker insterface to elements, that could be used as top-level file element (doesn't require nesting into some other element to be valid).

IType

Type descriptor interface.

ITypeParser

Provides helpers to create IType type descriptor from Type or string with type name. Also provides helpers to parse namespace names.

ITypedName

Represents code element, that have type and name (e.g. class field).

Enums

BinaryOperation

Binary operation type. List of operations limited to those we currently use for code generation and could be extended in future.

CodeElementType

Element types for code AST elements.

CodeParameterDirection

Parameter direction.

Modifiers

Explicit type and type member attributes and modifiers. We don't check if set flag match defaults for applied member or type and always generate modifier if it set by this enum. Also we don't check wether modifier is valid on member/type.

NameFixType

Specify available options for name fix logic.

PragmaType

Compiler pragma directive type. List of pragmas limited to one we currently support.

SimpleTrivia

Simple trivia element.

TypeKind

Type kind.

UnaryOperation

Unary operation type. List of operations limited to those we currently use for code generation and could be extended in future.