Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ ImplementsRedirectedInterface()

bool System.Reflection.Metadata.MetadataReader.ImplementsRedirectedInterface ( MemberReferenceHandle memberRef,
out bool isIDisposable )
inlineprivate

Definition at line 1688 of file MetadataReader.cs.

1689 {
1690 isIDisposable = false;
1691 EntityHandle @class = MemberRefTable.GetClass(memberRef);
1692 TypeReferenceHandle typeRef;
1693 if (@class.Kind == HandleKind.TypeReference)
1694 {
1695 typeRef = (TypeReferenceHandle)@class;
1696 }
1697 else
1698 {
1699 if (@class.Kind != HandleKind.TypeSpecification)
1700 {
1701 return false;
1702 }
1703 BlobHandle signature = TypeSpecTable.GetSignature((TypeSpecificationHandle)@class);
1704 BlobReader blobReader = new BlobReader(BlobHeap.GetMemoryBlock(signature));
1705 if (blobReader.Length < 2 || blobReader.ReadByte() != 21 || blobReader.ReadByte() != 18)
1706 {
1707 return false;
1708 }
1709 EntityHandle entityHandle = blobReader.ReadTypeHandle();
1710 if (entityHandle.Kind != HandleKind.TypeReference)
1711 {
1712 return false;
1713 }
1714 typeRef = (TypeReferenceHandle)entityHandle;
1715 }
1717 }
int GetProjectionIndexForTypeReference(TypeReferenceHandle typeRef, out bool isIDisposable)
MemoryBlock GetMemoryBlock(BlobHandle handle)
Definition BlobHeap.cs:75
EntityHandle GetClass(MemberReferenceHandle handle)
BlobHandle GetSignature(TypeSpecificationHandle handle)

References System.Reflection.Metadata.Ecma335.MemberRefTableReader.GetClass(), System.Reflection.Metadata.Ecma335.BlobHeap.GetMemoryBlock(), System.Reflection.Metadata.MetadataReader.GetProjectionIndexForTypeReference(), System.Reflection.Metadata.Ecma335.TypeSpecTableReader.GetSignature(), System.Reflection.Metadata.MetadataReader.MemberRefTable, and System.Reflection.Metadata.MetadataReader.TypeSpecTable.

Referenced by System.Reflection.Metadata.MetadataReader.CalculateMemberRefTreatmentAndRowId(), and System.Reflection.Metadata.MetadataReader.CalculateMethodDefTreatmentAndRowId().