public override void VisitModuleReference(ModuleReference module) { string name = module.Name; name = name.ToLower(); if (!BaseAssemblyResolver.OnMono()) { if (!name.EndsWith(".dll")) { name += ".dll"; } } if (!ModuleReferencesContains(target.MainModule.ModuleReferences, name)) { module.Name = name; target.MainModule.ModuleReferences.Add(module); } }
ModuleReference GetModuleReference(ModuleReferenceCollection members, ModuleReference module) { string name = module.Name; name = name.ToLower(); if (!BaseAssemblyResolver.OnMono()) { if (!name.EndsWith(".dll")) { name += ".dll"; } } foreach (ModuleReference mr in members) { if (mr.Name == name) { return(mr); } } return(null); }