Namespace System.Linq.CompilerServices
Classes
AlphaRenamer
Eliminates name conflicts for variables in expression trees. Because variables get represented by ParameterExpression nodes which have referential identity, syntactic name conflicts can occur.
AnonymousTypeTupletizer
Provides expression tree rewrite functionality to substitute anonymous types with tuple types. This rewrite is useful to reduce dependencies on compiler-generated types, e.g. for serialization.
BetaReducer
Applies beta reduction on invocation expressions (applications) applied to lambda expressions (abstractions). Various expression tree rewrites can use this step to inline expressions in a template represented by a lambda expression.
BetaReductionNodeTypes
Flags to control which expression node types for invocation arguments are allowed during a beta reduction. Because beta reduction moves expressions to usage sites of parameters, timing of side-effects can change.
BetaReductionRestrictions
Flags to control restrictions for usage of argument expressions in the body of a lambda during beta reduction. Because beta reduction moves expressions to usage sites of parameters, the arity of side-effects can change.
Binding
Binding of a parameter expression to a value.
BottomUpExpressionRewriter<TTarget>
Defines a bottom-up rewriter for LINQ expression trees to TTarget trees.
BottomUpOptimizer<TTree, TTreeNodeType, TWildcardFactory>
Defines a bottom-up optimizer for TTree trees.
BottomUpRewriter<TSource, TSourceNodeType, TTarget, TWildcardFactory>
Defines a bottom-up rewriter for TSource trees to TTarget trees.
ClassicCpsRewriter
Expression tree rewriter that turns an expression into a Continuation Passing Style (CPS) expression using an Action<T> based callback method.
ClassicCpsRewriterWithErrorPropagation
Expression tree rewriter that turns an expression into a Continuation Passing Style (CPS) expression using an Action<T> based callback method and an Action<Exception> callback for error propagation.
CollectionExtensions
Provides extension methods for collections.
CompilerGeneratedNameEliminator
Eliminates compiler-generated names from expression trees (e.g. C# transparent identifier range variables).
ConstantHoister
Hoists constants out of an expression tree into an environment.
CooperativeExpressionVisitor
Cooperative expression visitor that dispatches expression tree node visits to other visitors based on metadata attributes applied to reflection objects.
CpsRewriterBase<TContinuationState>
Base class for expression tree rewriters to turn expressions into a Continuation Passing Style (CPS).
CSharpExpression
Information about the representation of an expression tree in C#.
CustomAttributeDeclaration
Container for property custom attribute information.
DelegateInvocationInliner
Provides an expression tree optimization by inlining invocations to delegates as method calls.
EmptyReadOnlyCollection<T>
Factory for empty ReadOnlyCollection objects.
EtaConverter
Applies eta conversion on lambda expressions (abstractions) over invocations (applications) of a function.
ExpressionEqualityComparator
Base class for expression equality comparer implementations. Default behavior matches trees in a structural fashion.
ExpressionEqualityComparer
Customizable equality comparer for expression trees. Default behavior matches trees in a structural fashion.
ExpressionHelpers
Provides various utilities for expression trees.
ExpressionMemberAllowListScanner
Expression visitor used to check uses of type members against a list of allowed members.
ExpressionMemberAllowListScannerBase
Base class for expression visitors used to check uses of type members against a list of allowed members.
ExpressionRewriterFallbackCollection<TTarget>
Represents a collection of fallback rules.
ExpressionRewriterLeafCollection<TTarget>
Represents a collection of leaf rules.
ExpressionRewriterRuleCollection<TTarget>
Represents a collection of rewrite rules.
ExpressionTreeWildcard
(Infrastructure) Represents a wildcard for expression tree matching.
ExpressionTreeWildcardFactory
(Infrastructure) Factory for wildcards used during expression tree matching.
ExpressionTupletizer
Provides a set of methods to pack and unpack expressions into/from tuples.
ExpressionTypeAllowListScanner
Expression visitor used to check uses of types against a list of allowed types.
ExpressionTypeAllowListScannerBase
Base class for expression visitors used to check uses of type members against a list of allowed types.
ExpressionVisitor<TExpression>
Base class for expression visitors that rewrite an expression tree into a target type.
ExpressionVisitor<TExpression, TLambdaExpression, TParameterExpression, TNewExpression, TElementInit, TMemberBinding, TMemberAssignment, TMemberListBinding, TMemberMemberBinding, TCatchBlock, TSwitchCase, TLabelTarget>
Expression visitor to rewrite an expression tree into a target type.
ExpressionVisitorNarrow<TExpression, TLambdaExpression, TParameterExpression, TNewExpression, TElementInit, TMemberBinding, TMemberAssignment, TMemberListBinding, TMemberMemberBinding, TCatchBlock, TSwitchCase, TLabelTarget>
Expression visitor with restrictions to "pure" expression nodes (i.e. as supported in .NET 3.5).
ExpressionVisitorNarrow<TExpression, TLambdaExpression, TParameterExpression, TNewExpression, TElementInit, TMemberBinding, TMemberAssignment, TMemberListBinding, TMemberMemberBinding>
Expression visitor with restrictions to "pure" expression nodes (i.e. as supported in .NET 3.5).
ExpressionVisitorWithReflection
Expression visitor with visit methods for reflection objects.
ExpressionWithEnvironment
Represents an expression bound by an environment.
Fallback<TSource, TTarget>
Represents a fallback rule.
FallbackCollection<TSource, TTarget>
Represents a collection of fallback rules.
FreeVariableScanner
Finds free variables, represented as ParameterExpression nodes, in an expression tree.
Indexed<T>
Represents an object that has an associated index value. The interpretation of the index is contextual and extrinsic to the object.
Leaf<TSource, TTarget>
Represents a leaf rule.
LeafCollection<TSource, TTarget>
Represents a collection of leaf rules.
MemberList
List of members that are allowed.
PartialExpressionVisitor<TExpression>
Base class for partial expression visitors that only support specific expression tree nodes.
ReferenceEqualityComparer<T>
An equality comparer based exclusively on object reference, even if the object has implemented IEquatable or overrides the default Equals method.
ReflectionHelpers
Provides various utilities for reflection.
Rule<TSource, TTarget>
Represents a rewrite rule.
RuleBase<TSource, TTarget>
Base class for rules.
RuleCollection<TSource, TTarget>
Represents a collection of rewrite rules.
RuntimeCompiler
Runtime compiler to generate types at runtime.
ScopedExpressionVisitor<TState>
Expression visitor with scope tracking for ParameterExpression nodes.
ScopedExpressionVisitor<TState, TExpression, TLambdaExpression, TParameterExpression, TNewExpression, TElementInit, TMemberBinding, TMemberAssignment, TMemberListBinding, TMemberMemberBinding, TCatchBlock, TSwitchCase, TLabelTarget>
Expression visitor with scope tracking for ParameterExpression nodes.
ScopedExpressionVisitorBase
Base class for expression visitors with scope tracking facilities.
ScopedExpressionVisitorBase<TExpression, TLambdaExpression, TParameterExpression, TNewExpression, TElementInit, TMemberBinding, TMemberAssignment, TMemberListBinding, TMemberMemberBinding, TCatchBlock, TSwitchCase, TLabelTarget>
Base class for expression visitors with scope tracking facilities.
ScopedSymbolTable<TSymbol, TValue>
Represents a scoped symbol table with standard lexical scoping rules, allowing for lookup of the closest declaring scope of a symbol.
StructuralFieldDeclaration
Container for structural type property information.
StructuralSubstitutingTypeComparator
Comparator for structural types, obtaining a dictionary of type substitutions between the left and right side of type comparisons.
StructuralTypeEqualityComparator
Equality comparer for structural types.
StructuralTypeEqualityComparer
Equality comparer for structural types.
StructuralTypeSubstitutionExpressionVisitor
Visitor to rewrite the expression nodes whose type is a structural type.
SuccessErrorContinuationPair
(Infrastructure) Representation of a pair of success and error continuations.
SymbolTable<TSymbol, TValue>
Represents a symbol table that associates symbols to values.
SyntaxTrie
Syntax trie implementation used to look up identifiers.
Tree<T>
Represents a tree with data of the specified type stored in the tree nodes.
TreeEqualityComparer
Equality comparer for non-generic trees.
TreeEqualityComparer<T>
Equality comparer for generic trees.
TreeVisitor
Base class for visitors over non-generic trees.
TreeVisitor<T>
Base class for visitors over generic trees.
TypeBasedExpressionRewriter
An expression rewriter that rewrites using a set of user defined lambdas that are applied when the runtime type of the expression matches the user supplied value.
TypeEqualityComparer
Equality comparer for CLR types, based on their structure.
TypeList
List of declaring types that are allowed.
Types
Provides commonly used types.
TypeSubstitutionExpressionVisitor
Visitor to retarget types that occur in an expression tree. Subclasses can customize reflection member resolution.
TypeSubstitutor
Substitutes occurrences of the specified types in a given type by recursing over its structure. Matches for substitution are based on referential equality for types. In particular, subtyping relationships are not taken into consideration.
TypeVisitor
Base class for visitor for CLR types, based on their structure.
TypeVisitor<TResult>
Base class for visitor for CLR types, based on their structure.
UnboundParameterException
Exception raised when an expression contains unbound parameters which prevent the expression to be processed.
UseAsyncMethodAttribute
Attribute used to indicate methods that should be rewritten to asynchronous variants, for use by any of the CPS rewriter classes. Each CPS rewriter class can define its own mapping between the method the attribute is applied to and its asynchronous variant.
VisitorAttribute
Attribute to annotate constructors, methods, properties, and fields with a visitor type that will be used to process expression trees referring to those reflection members.
Interfaces
IConstantHoister
Interface for facilities that hoist constants out of an expression tree into an environment.
IExpressionWithEnvironment
Interface for the representation of an expression bound by an environment.
IRecursiveExpressionVisitor
Interface for expression visitors.
ITree
Represents a tree in a non-generic manner.
ITree<T>
Represents a tree in a generic manner.
ITreeVisitor
Interface for a visitor over non-generic trees.
ITreeVisitor<T>
Interface for a visitor over generic trees.
IType
Represents a type.
ITyped
Represents an object that has a type.
IWildcardFactory<TSource>
Represents a factory for wildcard objects used to match any subtree of a given type.