Class ImplementationMap
- Namespace
- AsmResolver.DotNet
- Assembly
- AsmResolver.DotNet.dll
Represents a mapping that maps a method or field defined in a .NET module to an unmanaged function or global field defined in an external module through Platform Invoke (P/Invoke).
public class ImplementationMap : MetadataMember, IMetadataMember, IFullNameProvider, INameProvider
- Inheritance
-
ImplementationMap
- Implements
- Derived
- Inherited Members
Constructors
ImplementationMap(ModuleReference?, Utf8String?, ImplementationMapAttributes)
Creates a new instance of the ImplementationMap class.
public ImplementationMap(ModuleReference? scope, Utf8String? name, ImplementationMapAttributes attributes)
Parameters
scope
ModuleReferenceThe scope that declares the imported member.
name
Utf8StringThe name of the imported member.
attributes
ImplementationMapAttributesThe attributes associated to the implementation mapping.
ImplementationMap(MetadataToken)
Initializes the ImplementationMap with a metadata token.
protected ImplementationMap(MetadataToken token)
Parameters
token
MetadataTokenThe token of the member.
Properties
Attributes
Gets the attributes associated to the implementation mapping.
public ImplementationMapAttributes Attributes { get; set; }
Property Value
FullName
Gets the full name of the object.
public string FullName { get; }
Property Value
MemberForwarded
Gets the member that this P/Invoke implementation mapping is assigned to.
public IMemberForwarded? MemberForwarded { get; }
Property Value
Name
Gets or sets the name of the map.
public Utf8String? Name { get; set; }
Property Value
Remarks
This property corresponds to the Name column in the implementation map table.
Scope
Gets or sets the module that contains the external member.
public ModuleReference? Scope { get; set; }
Property Value
Methods
GetMemberForwarded()
Obtains the owner of the P/Invoke implementation mapping.
protected virtual IMemberForwarded? GetMemberForwarded()
Returns
- IMemberForwarded
The owner.
Remarks
This method is called upon initialization of the MemberForwarded property.
GetName()
Obtains the name of the imported member.
protected virtual Utf8String? GetName()
Returns
- Utf8String
The name.
Remarks
This method is called upon initialization of the Name property.
GetScope()
Obtains the scope that declares the imported member.
protected virtual ModuleReference? GetScope()
Returns
- ModuleReference
The scope.
Remarks
This method is called upon initialization of the Scope property.