Example #1
0
        /// <summary>
        /// This constructor is called by Provider.CreateQuery().
        /// </summary>
        /// <param name="expression"></param>
        public QueryableTerraServerData(TerraServerQueryProvider provider, Expression expression)
        {
            if (!typeof(IQueryable <TData>).IsAssignableFrom(expression.Type))
            {
                throw new ArgumentOutOfRangeException("expression");
            }

            Provider   = provider ?? throw new ArgumentNullException(nameof(provider));
            Expression = expression ?? throw new ArgumentNullException(nameof(expression));
        }
Example #2
0
 /// <summary>
 /// This constructor is called by the client to create the data source.
 /// </summary>
 public QueryableTerraServerData()
 {
     Provider   = new TerraServerQueryProvider();
     Expression = Expression.Constant(this);
 }