Ejemplo n.º 1
0
        internal static bool InvokeIsEventCallSite(object target, string name, Type tContext, ref CallSite callSite)
        {
            if (callSite == null)
            {
                LazyBinder tBinder     = () => Binder.IsEvent(CSharpBinderFlags.None, name, tContext);
                var        tBinderType = typeof(IsEventBinderDummy);
                callSite = CreateCallSite <Func <CallSite, object, bool> >(tBinderType, Unknown, tBinder, name, tContext, isEvent: true);
            }
            var tCallSite = (CallSite <Func <CallSite, object, bool> >)callSite;

            return(tCallSite.Target(tCallSite, target));
        }