MethodBase GetOriginalMethod() { var attr = containerAttributes; if (attr.originalType == null) { return(null); } if (attr.methodName == null) { return(AccessTools.Constructor(attr.originalType, attr.parameter)); } return(AccessTools.Method(attr.originalType, attr.methodName, attr.parameter)); }
private MethodBase GetOriginalMethod() { var harmonyMethod = containerAttributes; if (harmonyMethod.originalType == null) { return(null); } if (harmonyMethod.methodName == null) { return(AccessTools.Constructor(harmonyMethod.originalType, harmonyMethod.parameter)); } return(AccessTools.Method(harmonyMethod.originalType, harmonyMethod.methodName, harmonyMethod.parameter)); }