public static MethodReference GetMethodAndImport(this ModuleDefinition module, string methodName) { var method = GetMethod(module, methodName); if (method == null) { return method; } return module.Import(method); }