Class TypeSlimSubstitutor
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.
Inherited Members
Namespace: System.Linq.CompilerServices.Bonsai
Assembly: Nuqleon.Linq.Expressions.Bonsai.dll
Syntax
public class TypeSlimSubstitutor : TypeSlimVisitor
Constructors
TypeSlimSubstitutor(IDictionary<TypeSlim, TypeSlim>)
Creates a new type substitutor with the specified map for replacements.
Declaration
public TypeSlimSubstitutor(IDictionary<TypeSlim, TypeSlim> map)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IDictionary<TypeSlim, TypeSlim> | map | Map used for replacements. Each key represents a types to be substituted by its corresponding value. |
Methods
Visit(TypeSlim)
Visits a CLR type.
Declaration
public override TypeSlim Visit(TypeSlim type)
Parameters
Type | Name | Description |
---|---|---|
TypeSlim | type | Type to visit. |
Returns
Type | Description |
---|---|
TypeSlim | Resulting type after the visit. |