PatchDelegate() public static method

Patches the delegate.
public static PatchDelegate ( BaseMethodCompiler methodCompiler ) : bool
methodCompiler BaseMethodCompiler The method compiler.
return bool
示例#1
0
        private void PatchDelegate()
        {
            if (Method.HasImplementation)
            {
                return;
            }

            if (!Method.DeclaringType.IsDelegate)
            {
                return;
            }

            if (!DelegatePatcher.PatchDelegate(this))
            {
                return;
            }

            IsCILDecodeRequired = false;
            IsExecutePipeline   = true;

            if (Trace.IsTraceable(5))
            {
                var traceLog = new TraceLog(TraceType.MethodDebug, Method, "XX-Delegate Patched", MethodData.Version);
                traceLog?.Log("This delegate method was patched");
                Trace.PostTraceLog(traceLog);
            }
        }
示例#2
0
        private void PatchDelegate()
        {
            if (Method.HasImplementation)
            {
                return;
            }

            if (!Method.DeclaringType.IsDelegate)
            {
                return;
            }

            if (!DelegatePatcher.PatchDelegate(this))
            {
                return;
            }

            IsCILDecodeRequired = false;
            IsExecutePipeline   = true;
        }