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