Пример #1
0
 internal override ITypeReference/*?*/ GetAsTypeReference(PEFileToObjectModel peFileToObjectModel, IMetadataReaderModuleReference module) {
   foreach (var aref in peFileToObjectModel.GetAssemblyReferences()) {
     var assemRef = aref as AssemblyReference;
     if (assemRef == null) continue;
     if (assemRef.AssemblyIdentity.Equals(this.AssemblyIdentity))
       return this.TypeName.GetAsTypeReference(peFileToObjectModel, assemRef);
   }
   if (module.ContainingAssembly.AssemblyIdentity.Equals(this.AssemblyIdentity))
     return this.TypeName.GetAsTypeReference(peFileToObjectModel, module);
   AssemblyFlags flags = this.Retargetable ? AssemblyFlags.Retargetable : (AssemblyFlags)0;
   return this.TypeName.GetAsTypeReference(peFileToObjectModel, new AssemblyReference(peFileToObjectModel, 0, this.AssemblyIdentity, flags));
 }
Пример #2
0
     /*?*/
     internal override IModuleTypeReference GetAsTypeReference(
   PEFileToObjectModel peFileToObjectModel,
   IModuleModuleReference module
 )
     {
         foreach (AssemblyReference aref in peFileToObjectModel.GetAssemblyReferences()) {
         if (aref.AssemblyIdentity.Equals(this.AssemblyIdentity))
           return this.TypeName.GetAsTypeReference(peFileToObjectModel, aref);
           }
           if (module.ContainingAssembly.AssemblyIdentity.Equals(this.AssemblyIdentity))
         return this.TypeName.GetAsTypeReference(peFileToObjectModel, module);
           AssemblyFlags flags = this.Retargetable ? AssemblyFlags.Retargetable : (AssemblyFlags)0;
           return this.TypeName.GetAsTypeReference(peFileToObjectModel, new AssemblyReference(peFileToObjectModel, 0, this.AssemblyIdentity, flags));
     }