public SmartDataServiceQuery(IDataServiceContext context, string entitySetName)
 {
     if (context == null)
     {
         throw new ArgumentNullException("context");
     }
     if (String.IsNullOrEmpty(entitySetName))
     {
         throw new ArgumentException(CommonResources.Argument_Cannot_Be_Null_Or_Empty, "entitySetName");
     }
     _context   = context;
     _query     = context.CreateQuery <T>(entitySetName);
     Expression = Expression.Constant(this);
 }
Exemple #2
0
 public SmartDataServiceQuery(IDataServiceContext context, IDataServiceQuery query)
 {
     if (context == null)
     {
         throw new ArgumentNullException("context");
     }
     if (query == null)
     {
         throw new ArgumentNullException("query");
     }
     this._context   = context;
     this._query     = query;
     this.Expression = System.Linq.Expressions.Expression.Constant(this);
 }
Exemple #3
0
 public DataServiceQueryWrapper(IDataServiceContext context, DataServiceQuery query, Type concreteType)
 {
     if (context == null)
     {
         throw new ArgumentNullException("context");
     }
     if (query == null)
     {
         throw new ArgumentNullException("query");
     }
     this._context      = context;
     this._query        = query;
     this._concreteType = concreteType;
 }
        private DataServicePackageRepository(IDataServiceContext context, IHttpClient httpClient)
        {
            if (context == null) {
                throw new ArgumentNullException("context");
            }

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

            _context = context;
            _httpClient = httpClient;

            _context.SendingRequest += OnSendingRequest;
            _context.ReadingEntity += OnReadingEntity;
            _context.IgnoreMissingProperties = true;
        }
        private DataServicePackageRepository(IDataServiceContext context, IHttpClient httpClient)
        {
            if (context == null)
            {
                throw new ArgumentNullException("context");
            }

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

            _context    = context;
            _httpClient = httpClient;

            _context.SendingRequest         += OnSendingRequest;
            _context.ReadingEntity          += OnReadingEntity;
            _context.IgnoreMissingProperties = true;
        }
Exemple #6
0
 public DataServiceQueryWrapper(IDataServiceContext context, DataServiceQuery query)
     : this(context, query, typeof(T))
 {
 }
 private SmartDataServiceQuery(IDataServiceContext context, IDataServiceQuery query, Expression expression)
 {
     _context   = context;
     _query     = query;
     Expression = expression;
 }
Exemple #8
0
 private SmartDataServiceQuery(IDataServiceContext context, IDataServiceQuery query, System.Linq.Expressions.Expression expression)
 {
     this._context   = context;
     this._query     = query;
     this.Expression = expression;
 }