示例#1
0
        public ReferencedTypeObject(FileStream fs, PEReader pe, MetadataReader mr, TypeReference typeRef, ResolveAssemblyDelegate resolveAssembly) :
            base(fs, pe, mr, resolveAssembly)
        {
            _typeRef = typeRef;

            Name             = AssemblyHelpers.GetTypeName(_metaReader, _typeRef);
            DeclaredAssembly = null;

            // We are not able to resolve ModuleReferences yet.
            if (resolveAssembly != null && _typeRef.ResolutionScope.Kind != HandleKind.ModuleReference)
            {
                var assemblyRef = ToAssemblyName(AssemblyHelpers.GetAssemblyReferenceForReferencedType(_metaReader, _typeRef));
                DeclaredAssembly = resolveAssembly(assemblyRef);
            }
        }