Exemplo n.º 1
0
        public IType GetTypeFromDefinition(SRM.MetadataReader reader, SRM.TypeDefinitionHandle handle, byte rawTypeKind)
        {
            ITypeDefinition td = module?.GetDefinition(handle);

            if (td != null)
            {
                return(td);
            }
            bool?isReferenceType = IsReferenceType(reader, handle, rawTypeKind);

            return(new UnknownType(handle.GetFullTypeName(reader), isReferenceType));
        }
Exemplo n.º 2
0
 static bool IsSameType(SRM.MetadataReader referenceMetadata, SRM.EntityHandle typeRef,
                        SRM.MetadataReader definitionMetadata, SRM.TypeDefinitionHandle typeDef)
 {
     // FullName contains only namespace, name and type parameter count, therefore this should suffice.
     return(typeRef.GetFullTypeName(referenceMetadata) == typeDef.GetFullTypeName(definitionMetadata));
 }