public void Initialize(Control owner, HttpContext context, IQueryableDataSource dataSource) {
            _owner = owner;
            _context = context;
            _dataSource = dataSource;

            Expressions.SetContext(owner, context, dataSource);
        }
Exemplo n.º 2
0
        public override void SetContext(Control owner, HttpContext context, IQueryableDataSource dataSource)
        {
            base.SetContext(owner, context, dataSource);

            FilterExpressionProvider = FindControl(Owner);
            FilterExpressionProvider.Initialize(dataSource);
        }
 private static Type GetType(IQueryableDataSource dataSource) {
     IDynamicDataSource dynamicDataSource = dataSource as IDynamicDataSource;
     if (dynamicDataSource != null) {
         return dynamicDataSource.ContextType;
     }
     return null;
 }
        public override void SetContext(Control owner, HttpContext context, IQueryableDataSource dataSource)
        {
            base.SetContext(owner, context, dataSource);

            Owner.Page.InitComplete += new EventHandler(Page_InitComplete);
            Owner.Page.LoadComplete += new EventHandler(Page_LoadComplete);
        }
        public void Initialize(Control owner, HttpContext context, IQueryableDataSource dataSource)
        {
            _owner      = owner;
            _context    = context;
            _dataSource = dataSource;

            Expressions.SetContext(owner, context, dataSource);
        }
        // Allows for nested expression blocks to be initilaized after the fact
        internal void SetContext(Control owner, HttpContext context, IQueryableDataSource dataSource) {
            Owner = owner;
            Context = context;
            _dataSource = dataSource;

            foreach (DataSourceExpression expression in this) {
                expression.SetContext(owner, context, _dataSource);
            }
        }
Exemplo n.º 7
0
        private static Type GetType(IQueryableDataSource dataSource)
        {
            IDynamicDataSource dynamicDataSource = dataSource as IDynamicDataSource;

            if (dynamicDataSource != null)
            {
                return(dynamicDataSource.ContextType);
            }
            return(null);
        }
        void IFilterExpressionProvider.Initialize(IQueryableDataSource dataSource)
        {
            if (dataSource == null)
            {
                throw new ArgumentNullException("dataSource");
            }

            _dataSource = dataSource;

            Page.InitComplete += new EventHandler(Page_InitComplete);
        }
        // Allows for nested expression blocks to be initilaized after the fact
        internal void SetContext(Control owner, HttpContext context, IQueryableDataSource dataSource)
        {
            Owner       = owner;
            Context     = context;
            _dataSource = dataSource;

            foreach (DataSourceExpression expression in this)
            {
                expression.SetContext(owner, context, _dataSource);
            }
        }
        void IFilterExpressionProvider.Initialize(IQueryableDataSource dataSource) {
            if (dataSource == null) {
                throw new ArgumentNullException("dataSource");
            }

            if (ItemTemplate == null) {
                return;
            }

            _dataSource = dataSource;
            Page.InitComplete += new EventHandler(Page_InitComplete);
        }
        private void EnsureInit(IQueryableDataSource dataSource)
        {
            if (_filterUserControl == null)
            {
                MetaTable table = DynamicDataExtensions.GetMetaTable(dataSource, Context);
                Column             = table.GetColumn(DataField);
                _filterUserControl = _filterLoader(Column, FilterUIHint);
                _filterUserControl.Initialize(Column, dataSource, Context);

                _filterUserControl.FilterChanged += new EventHandler(Child_FilterChanged);

                Controls.Add(_filterUserControl);
            }
        }
        public virtual void SetContext(Control owner, HttpContext context, IQueryableDataSource dataSource) {
            if (owner == null) {
                throw new ArgumentNullException("owner");
            }

            if (context == null) {
                throw new ArgumentNullException("context");
            }

            if (dataSource == null) {
                throw new ArgumentNullException("dataSource");
            }

            Owner = owner;
            Context = context;
            DataSource = dataSource;
        }
Exemplo n.º 13
0
        public virtual void SetContext(Control owner, HttpContext context, IQueryableDataSource dataSource)
        {
            if (owner == null)
            {
                throw new ArgumentNullException("owner");
            }

            if (context == null)
            {
                throw new ArgumentNullException("context");
            }

            if (dataSource == null)
            {
                throw new ArgumentNullException("dataSource");
            }

            Owner      = owner;
            Context    = context;
            DataSource = dataSource;
        }
 internal void Initialize(MetaColumn column, IQueryableDataSource iQueryableDataSource, HttpContextBase context)
 {
     QueryableDataSource = iQueryableDataSource;
     Column   = column;
     _context = context ?? new HttpContextWrapper(Context);
 }
 internal void Initialize(MetaColumn column, IQueryableDataSource iQueryableDataSource, HttpContextBase context) {
     QueryableDataSource = iQueryableDataSource;
     Column = column;
     _context = context ?? new HttpContextWrapper(Context);
 }
Exemplo n.º 16
0
 public Executor(IQueryableDataSource queryableDataSource, ObjectBinder binder)
 {
     _binder             = binder;
     QueryableDataSource = queryableDataSource;
 }
 internal void Initialize(IQueryableDataSource dataSource)
 {
     Debug.Assert(dataSource != null);
     EnsureInit(dataSource);
 }
Exemplo n.º 18
0
 internal void Initialize(IQueryableDataSource dataSource) {
     Debug.Assert(dataSource != null);
     EnsureInit(dataSource);
 }
        /// <summary>
        /// See base class.
        /// </summary>
        public override void SetContext(Control owner, HttpContext context, IQueryableDataSource dataSource) {
            base.SetContext(owner, context, dataSource);

            owner.Page.InitComplete += new EventHandler(Page_InitComplete);
        }
        public override void SetContext(Control owner, HttpContext context, IQueryableDataSource dataSource) {
            base.SetContext(owner, context, dataSource);            

            FilterExpressionProvider = FindControl(Owner);            
            FilterExpressionProvider.Initialize(dataSource);
        }
Exemplo n.º 21
0
        private void EnsureInit(IQueryableDataSource dataSource) {
            if (_filterUserControl == null) {
                MetaTable table = DynamicDataExtensions.GetMetaTable(dataSource, Context);
                Column = table.GetColumn(DataField);
                _filterUserControl = _filterLoader(Column, FilterUIHint);
                _filterUserControl.Initialize(Column, dataSource, Context);

                _filterUserControl.FilterChanged += new EventHandler(Child_FilterChanged);

                Controls.Add(_filterUserControl);
            }
        }
        void IFilterExpressionProvider.Initialize(IQueryableDataSource queryableDataSource)
        {
            Contract.Assert(queryableDataSource is IDynamicDataSource);
            Contract.Assert(queryableDataSource != null);

            if (ItemTemplate == null)
                return;
            dataSource = queryableDataSource;

            Page.InitComplete += InitComplete;
            Page.LoadComplete += LoadCompeted;
        }
Exemplo n.º 23
0
 internal QueryExtender(IQueryableDataSource dataSource) {
     _dataSource = dataSource;
 }
Exemplo n.º 24
0
 protected AbstractQueryContext(IQueryableDataSource queryableDataSource)
 {
     QueryableDataSource = queryableDataSource;
 }
Exemplo n.º 25
0
 internal static IQueryable <T> GenerateContext <T>(IQueryableDataSource nullQueryableDataSource)
 {
     return(new Queryable <T>(new Executor(nullQueryableDataSource, null), CustomQueryParser.CreateDefault()));
 }
 public XDocumentQueryContext(IQueryableDataSource queryableDataSource) : base(queryableDataSource)
 {
 }
 public QueryContextWrapper(IQueryableDataSource queryableDataSource) : base(queryableDataSource)
 {
 }
 internal QueryExtender(IQueryableDataSource dataSource)
 {
     _dataSource = dataSource;
 }