public static async Task ProcessFile(ModuleContext moduleContext, string path) { var metadataReader = MetadataReader.Create(path); if (metadataReader != null) { var import = (MetadataReader.IMetaDataImport2)metadataReader._assemblyImport; } else { return; } var module = ModuleDefMD.Load(path, moduleContext); foreach (var memberRef in module.GetMemberRefs()) { var member = new MemberReference(memberRef, path); var searchTerms = new List <string> { "ResourceReader::.ctor", "BinaryFormatter::Deserialize", "NetDataContractSerializer::Deserialize", "ApplicationTrust::FromXml", "ChannelServices::RegisterChannel" }; if (member.Method != null && searchTerms.Any(p => member.Method.Contains(p))) { PrintMemberRef(member); } } processedCount++; }