Class CloneContextAwareReferenceImporter
- Namespace
- AsmResolver.DotNet.Cloning
- Assembly
- AsmResolver.DotNet.dll
Provides an extension to the normal ReferenceImporter class, that takes cloned members into account.
public class CloneContextAwareReferenceImporter : ReferenceImporter, ITypeSignatureVisitor<TypeSignature>
- Inheritance
-
CloneContextAwareReferenceImporter
- Implements
- Inherited Members
Constructors
CloneContextAwareReferenceImporter(MemberCloneContext)
Creates a new instance of the CloneContextAwareReferenceImporter class.
public CloneContextAwareReferenceImporter(MemberCloneContext context)
Parameters
context
MemberCloneContextThe metadata cloning workspace.
Properties
Context
The working space for this member cloning procedure.
protected MemberCloneContext Context { get; }
Property Value
Methods
ImportField(IFieldDescriptor)
Imports a reference to a field into the module.
public override IFieldDescriptor ImportField(IFieldDescriptor field)
Parameters
field
IFieldDescriptorThe field to import.
Returns
- IFieldDescriptor
The imported field.
Exceptions
- ArgumentException
Occurs when a field is not added to a type.
ImportMethod(IMethodDefOrRef)
Imports a reference to a method into the module.
public override IMethodDefOrRef ImportMethod(IMethodDefOrRef method)
Parameters
method
IMethodDefOrRefThe method to import.
Returns
- IMethodDefOrRef
The imported method.
Exceptions
- ArgumentException
Occurs when a method is not added to a type.
ImportType(TypeDefinition)
Imports a reference to a type definition into the module.
protected override ITypeDefOrRef ImportType(TypeDefinition type)
Parameters
type
TypeDefinitionThe type to import.
Returns
- ITypeDefOrRef
The imported type.
ImportType(TypeReference)
Imports a reference to a type into the module.
protected override ITypeDefOrRef ImportType(TypeReference type)
Parameters
type
TypeReferenceThe type to import.
Returns
- ITypeDefOrRef
The imported type.