예제 #1
0
        public ZetboxContextQuery(ZetboxContextImpl ctx, InterfaceType type, ZetboxContextProvider provider, Expression expression, IPerfCounter perfCounter)
        {
            if (ctx == null)
            {
                throw new ArgumentNullException("ctx");
            }
            // if (type == null) throw new ArgumentNullException("type");
            if (provider == null)
            {
                throw new ArgumentNullException("provider");
            }
            if (expression == null)
            {
                throw new ArgumentNullException("expression");
            }
            if (perfCounter == null)
            {
                throw new ArgumentNullException("perfCounter");
            }

            _type        = type;
            _context     = ctx;
            _expression  = expression;
            _provider    = provider;
            _perfCounter = perfCounter;
        }
예제 #2
0
        public ZetboxContextQuery(ZetboxContextImpl ctx, InterfaceType type, IProxy proxy, IPerfCounter perfCounter)
        {
            if (ctx == null)
            {
                throw new ArgumentNullException("ctx");
            }
            // if (type == null) throw new ArgumentNullException("type");

            _perfCounter = perfCounter;
            _type        = type;
            _context     = ctx;
            _expression  = System.Linq.Expressions.Expression.Constant(this);
            _provider    = new ZetboxContextProvider(_context, _type, proxy, _perfCounter);
        }