コード例 #1
0
        /// <summary>
        /// Initializes a new instance of the MobileServiceTables class.
        /// </summary>
        /// <param name="tableName">
        /// The name of the table.
        /// </param>
        /// <param name="client">
        /// The <see cref="MobileServiceClient"/> associated with this table.
        /// </param>
        public MobileServiceTable(string tableName, MobileServiceClient client)
            : base(tableName, client)
        {
            this.queryProvider    = new MobileServiceTableQueryProvider();
            this.SystemProperties = client.Serializer.GetSystemProperties(typeof(T));
            Type idType = client.Serializer.GetIdPropertyType <T>(throwIfNotFound: false);

            this.hasIntegerId = idType == null || MobileServiceSerializer.IsIntegerId(idType);
        }
コード例 #2
0
        /// <summary>
        /// Initializes a new instance of the MobileServiceTableQuery class.
        /// </summary>
        /// <param name="table">
        /// The table being queried.
        /// </param>
        /// <param name="queryProvider">
        /// The <see cref="MobileServiceTableQueryProvider"/> associated with this
        /// <see cref="T:MobileServiceTableQuery`1{T}"/>
        /// </param>
        /// <param name="query">
        /// The encapsulated <see cref="IQueryable"/>.
        /// </param>
        /// <param name="includeTotalCount">
        /// A value that if set will determine whether the query will request
        /// the total count for all the records that would have been returned
        /// ignoring any take paging/limit clause specified by client or
        /// server.
        /// </param>
        /// <param name="parameters">
        /// The optional user-defined query string parameters to include with the query.
        /// </param>
        internal MobileServiceTableQuery(IMobileServiceTable <T> table,
                                         MobileServiceTableQueryProvider queryProvider,
                                         IQueryable <T> query,
                                         IDictionary <string, string> parameters,
                                         bool includeTotalCount)
        {
            if (table == null)
            {
                throw new ArgumentNullException("table");
            }
            if (table == null)
            {
                throw new ArgumentNullException("table");
            }

            this.Table             = table;
            this.RequestTotalCount = includeTotalCount;
            this.Parameters        = parameters;
            this.Query             = query;
            this.QueryProvider     = queryProvider;
        }
コード例 #3
0
 /// <summary>
 /// Initializes a new instance of the MobileServiceTables class.
 /// </summary>
 /// <param name="tableName">
 /// The name of the table.
 /// </param>
 /// <param name="client">
 /// The <see cref="MobileServiceClient"/> associated with this table.
 /// </param>
 public MobileServiceTable(string tableName, MobileServiceClient client)
     : base(tableName, client)
 {
     this.queryProvider = new MobileServiceTableQueryProvider();
 }