Пример #1
0
        public override void RenderIL_Load(ILCanvas canvas)
        {
            if (method.IsEffectivelyInstanceMethod() && caller != null)
            {
                caller.GetILImplicitCast(method.GetILMethodInvokationType())
                .RenderIL_Load(canvas);

                arguments.GetILImplicitCasts(method.GetEffectiveParameterTypes())
                .RenderIL_Load(canvas);

                if (method.IsTechnicallyInstanceMethod() && method.DeclaringType.IsReferenceType())
                {
                    canvas.Emit_Callvirt(method);
                }
                else
                {
                    canvas.Emit_Call(method);
                }
            }
            else
            {
                arguments.GetILImplicitCasts(method.GetTechnicalParameterTypes())
                .RenderIL_Load(canvas);

                canvas.Emit_Call(method);
            }
        }