Exemplo n.º 1
0
        public static IEnumerable<CodeInstruction> Transpiler(
            IEnumerable<CodeInstruction> instructions, MethodBase original) {
            try {
                var codes = TranspilerUtils.ToCodeList(instructions);

                CheckNodeConnectGroupNone.Patch(codes, original);
                CheckNodeConnectGroup.Patch(codes, original);
                CheckNetConnectGroupNone.Patch(codes, original);
                CheckNetConnectGroup.Patch(codes, original);

                Log.Info($"{ReflectionHelpers.ThisMethod} patched {original} successfully!");
                return codes;
            } catch (Exception e) {
                Log.Error(e.ToString());
                throw e;
            }
        }
Exemplo n.º 2
0
        public static IEnumerable <CodeInstruction> Transpiler(
            IEnumerable <CodeInstruction> instructions, MethodBase original)
        {
            try {
                var codes = TranspilerUtils.ToCodeList(instructions);

                // (info3.m_nodeConnectGroups & info2.m_connectGroup) != NetInfo.ConnectGroup.None || (info2.m_nodeConnectGroups & info3.m_connectGroup) != NetInfo.ConnectGroup.None)
                // (info2.m_nodeConnectGroups == NetInfo.ConnectGroup.None || (info2.m_nodeConnectGroups & info3.m_connectGroup) != NetInfo.ConnectGroup.None)
                // (info3.m_nodeConnectGroups == NetInfo.ConnectGroup.None || (info3.m_nodeConnectGroups & info2.m_connectGroup) != NetInfo.ConnectGroup.None)
                CheckNetConnectGroupNone.Patch(codes, original); // 2
                CheckNetConnectGroup.Patch(codes, original);     // 4

                Log.Info($"{ReflectionHelpers.ThisMethod} patched {original} successfully!");
                return(codes);
            } catch (Exception e) {
                Log.Error(e.ToString());
                throw e;
            } // end class
        }     // end name space