Example #1
0
        protected CallSiteBinder GetLightBinder()
        {
            ILightExceptionBinder binder = _binder as ILightExceptionBinder;

            if (binder != null)
            {
                return(binder.GetLightExceptionBinder());
            }
            return(_binder);
        }
Example #2
0
        Expression ILightExceptionAwareExpression.ReduceForLightExceptions()
        {
            ILightExceptionBinder binder = Binder as ILightExceptionBinder;

            if (binder != null)
            {
                var lightBinder = binder.GetLightExceptionBinder() as DynamicMetaObjectBinder;
                if (lightBinder != binder)
                {
                    return(DynamicExpression.Dynamic(
                               lightBinder,
                               Type,
                               Args));
                }
            }
            return(this);
        }