Interface ITypeDefOrRef
- Namespace
- AsmResolver.DotNet
- Assembly
- AsmResolver.DotNet.dll
Represents a type definition or reference that can be referenced by a TypeDefOrRef coded index.
public interface ITypeDefOrRef : ITypeDescriptor, IMemberDescriptor, IFullNameProvider, IImportable, IMemberRefParent, INameProvider, IModuleProvider, IHasCustomAttribute, IMetadataMember
- Inherited Members
- Extension Methods
Properties
DeclaringType
When this type is nested, gets the enclosing type.
ITypeDefOrRef? DeclaringType { get; }
Property Value
Name
Gets the name of the type.
Utf8String? Name { get; }
Property Value
Namespace
Gets the namespace the type resides in.
Utf8String? Namespace { get; }
Property Value
Methods
ImportWith(ReferenceImporter)
Imports the type using the provided reference importer object.
ITypeDefOrRef ImportWith(ReferenceImporter importer)
Parameters
importer
ReferenceImporterThe reference importer to use for importing the type.
Returns
- ITypeDefOrRef
The imported type.
ToTypeSignature(bool)
Transforms the type descriptor to an instance of a TypeSignature, which can be used in blob signatures.
TypeSignature ToTypeSignature(bool isValueType)
Parameters
isValueType
booltrue
if the type is a value type,false
otherwise.
Returns
- TypeSignature
The constructed type signature instance.
Remarks
This function can be used to avoid type resolution on type references.