PatchDelegate() public static method

Patches the delegate.
public static PatchDelegate ( BaseMethodCompiler methodCompiler ) : bool
methodCompiler BaseMethodCompiler The method compiler.
return bool
Exemplo n.º 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);
            }
        }
Exemplo n.º 2
0
        private void PatchDelegate()
        {
            if (Method.HasImplementation)
            {
                return;
            }

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

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

            IsCILDecodeRequired = false;
            IsExecutePipeline   = true;
        }