Show / Hide Table of Contents

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.

Inheritance
System.Object
TypeVisitor
TypeSubstitutor
Inherited Members
TypeVisitor.Visit(Type[])
TypeVisitor.VisitArray(Type)
TypeVisitor.VisitArrayVector(Type)
TypeVisitor.VisitArrayMultidimensional(Type)
TypeVisitor.VisitGeneric(Type)
TypeVisitor.VisitGenericParameter(Type)
TypeVisitor.VisitGenericClosed(Type)
TypeVisitor.VisitGenericTypeDefinition(Type)
TypeVisitor.VisitByRef(Type)
TypeVisitor.VisitPointer(Type)
TypeVisitor.VisitSimple(Type)
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.

Overrides
TypeVisitor.Visit(Type)
In This Article
Back to top Generated by DocFX