Ejemplo n.º 1
0
        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));
        }
Ejemplo n.º 2
0
        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));
        }