コード例 #1
0
        public TableBatchOperationAdapter(
            Func<TableBatchOperation, Task<IList<TableResult>>> executeBatch,
            ITableEntityConverter tableEntityConverter)
        {
            Require.NotNull(executeBatch, "executeBatch");
            Require.NotNull(tableEntityConverter, "tableEntityConverter");

            m_executeBatch = executeBatch;
            m_tableEntityConverter = tableEntityConverter;
            m_batch = new TableBatchOperation();
        }
コード例 #2
0
 public CloudTableFilterRangeQuery(
     string filter,
     int?take,
     string[] properties,
     FetchAsync fetchAsync,
     FetchSync fetchSync,
     ITableEntityConverter tableEntityConverter)
     : base(take, properties, fetchAsync, fetchSync, tableEntityConverter)
 {
     m_filter = filter;
 }
コード例 #3
0
 public CloudTableFilterSegmentedRangeQuery(
     string filter,
     int?take,
     string[] properties,
     FetchAsync fetchAsync,
     FetchSync fetchSync,
     TableRequestOptions requestOptions,
     ITableEntityConverter tableEntityConverter)
     : base(take, properties, fetchAsync, fetchSync, requestOptions, tableEntityConverter)
 {
     m_filter = filter;
 }
コード例 #4
0
        /// <summary>
        ///     Constructor.
        /// </summary>
        /// <param name="cloudTable">Cloud table.</param>
        /// <param name="entityConverter">Entity converter.</param>
        /// <param name="partitioner">Batch partitioner.</param>
        internal TableRequestSequentialExecutor(ICloudTable cloudTable, ITableEntityConverter <T> entityConverter, ITableBatchPartitioner partitioner)
            : base(cloudTable, entityConverter)
        {
            if (partitioner == null)
            {
                throw new ArgumentNullException("partitioner");
            }

            _cloudTable      = cloudTable;
            _entityConverter = entityConverter;
            _partitioner     = partitioner;
        }
コード例 #5
0
        public CloudTableFilterSegmentedRangeQuery(
            string filter,
            int? take,
            string[] properties,
            Func<TableQuery<DynamicTableEntity>, TableContinuationToken, Task<TableQuerySegment<DynamicTableEntity>>>
                fetchEntities,
            ITableEntityConverter tableEntityConverter)
            : base(take, properties, fetchEntities, tableEntityConverter)
        {
            Require.NotEmpty(filter, "filter");

            m_filter = filter;
        }
コード例 #6
0
        public TableBatchOperationAdapter(
            Func <TableBatchOperation, Task <IList <TableResult> > > executeBatchAsync,
            Func <TableBatchOperation, IList <TableResult> > executeBatchSync,
            ITableEntityConverter tableEntityConverter)
        {
            Require.NotNull(executeBatchAsync, "executeBatchAsync");
            Require.NotNull(executeBatchSync, "executeBatchSync");
            Require.NotNull(tableEntityConverter, "tableEntityConverter");

            m_executeBatchAsync    = executeBatchAsync;
            m_executeBatchSync     = executeBatchSync;
            m_tableEntityConverter = tableEntityConverter;
            m_batch = new TableBatchOperation();
        }
コード例 #7
0
        /// <summary>
        ///     Constructor.
        /// </summary>
        /// <param name="cloudTable">Cloud table.</param>
        /// <param name="entityConverter">Entity converter.</param>
        internal TableRequestExecutorBase(ICloudTable cloudTable, ITableEntityConverter <T> entityConverter)
        {
            if (cloudTable == null)
            {
                throw new ArgumentNullException(nameof(cloudTable));
            }

            if (entityConverter == null)
            {
                throw new ArgumentNullException(nameof(entityConverter));
            }

            _cloudTable      = cloudTable;
            _entityConverter = entityConverter;
        }
コード例 #8
0
        public CloudTablePointQuery(
            string partitionKey,
            string rowKey,
            string[] properties,
            FetchAsync fetchAsync,
            FetchSync fetchSync,
            ITableEntityConverter tableEntityConverter)
            : base(1, properties, fetchAsync, fetchSync, tableEntityConverter)
        {
            Require.NotEmpty(partitionKey, "partitionKey");
            Require.NotNull(rowKey, "rowKey");

            m_partitionKey = partitionKey;
            m_rowKey       = rowKey;
        }
コード例 #9
0
        public CloudTablePointQuery(
            string partitionKey,
            string rowKey,
            string[] properties,
            Func<TableQuery<DynamicTableEntity>, TableContinuationToken, Task<TableQuerySegment<DynamicTableEntity>>>
                fetchEntities,
            ITableEntityConverter tableEntityConverter)
            : base(1, properties, fetchEntities, tableEntityConverter)
        {
            Require.NotEmpty(partitionKey, "partitionKey");
            Require.NotEmpty(rowKey, "rowKey");

            m_partitionKey = partitionKey;
            m_rowKey = rowKey;
        }
コード例 #10
0
        /// <summary>
        ///     Constructor.
        /// </summary>
        /// <param name="cloudTable">Cloud table.</param>
        /// <param name="entityConverter">Entity converter.</param>
        public TableRequestExecutorFactory(ICloudTable cloudTable, ITableEntityConverter <T> entityConverter)
        {
            if (cloudTable == null)
            {
                throw new ArgumentNullException(nameof(cloudTable));
            }

            if (entityConverter == null)
            {
                throw new ArgumentNullException(nameof(entityConverter));
            }

            CloudTable       = cloudTable;
            _entityConverter = entityConverter;
            _partitioner     = new TableBatchPartitioner();
        }
コード例 #11
0
        /// <summary>
        ///     Constructor.
        /// </summary>
        /// <param name="cloudTable">Cloud table.</param>
        /// <param name="entityConverter"></param>
        internal TableQueryProvider(ICloudTable cloudTable, ITableEntityConverter <TEntity> entityConverter)
        {
            if (cloudTable == null)
            {
                throw new ArgumentNullException(nameof(cloudTable));
            }

            if (entityConverter == null)
            {
                throw new ArgumentNullException(nameof(entityConverter));
            }

            _cloudTable      = cloudTable;
            _entityConverter = entityConverter;
            _queryTranslator = new QueryTranslator(entityConverter.NameChanges);
        }
コード例 #12
0
        protected CloudTableSegmentedQuery(
            int? take,
            string[] properties,
            Func<TableQuery<DynamicTableEntity>, TableContinuationToken, Task<TableQuerySegment<DynamicTableEntity>>> fetchEntities,
            ITableEntityConverter tableEntityConverter)
        {
            Require.True(!take.HasValue || take > 0, "take", "Value should contains positive value");
            Require.NotNull(properties, "properties");
            Require.NotNull(fetchEntities, "fetchEntities");
            Require.NotNull(tableEntityConverter, "tableEntityConverter");

            m_take = take;
            m_properties = properties;
            m_fetchEntities = fetchEntities;
            m_tableEntityConverter = tableEntityConverter;
            m_continuationToken = null;
        }
コード例 #13
0
        protected CloudTableSegmentedQuery(
            int?take,
            string[] properties,
            FetchAsync fetchEntitiesAsync,
            FetchSync fetchEntities,

            ITableEntityConverter tableEntityConverter)
        {
            Require.True(!take.HasValue || take > 0, "take", "Value should contains positive value");
            Require.NotNull(properties, "properties");
            Require.NotNull(fetchEntitiesAsync, "fetchEntitiesAsync");
            Require.NotNull(fetchEntities, "fetchEntities");
            Require.NotNull(tableEntityConverter, "tableEntityConverter");

            m_take                 = take;
            m_properties           = properties;
            m_fetchEntitiesAsync   = fetchEntitiesAsync;
            m_fetchEntities        = fetchEntities;
            m_tableEntityConverter = tableEntityConverter;
            m_continuationToken    = null;
        }
コード例 #14
0
 public LogsTable(ICloudTableFactory tableFactory, ITableStorageKeyGenerator keyGenerator, ITableEntityConverter tableEntityConverter)
 {
     m_tableFactory = tableFactory ?? throw new ArgumentNullException(nameof(tableFactory));
     m_keyGenerator = keyGenerator ?? throw new ArgumentNullException(nameof(keyGenerator));
     m_tableEntityConverter = tableEntityConverter ?? throw new ArgumentNullException(nameof(tableEntityConverter));
 }
コード例 #15
0
        internal CloudTableAdapter(Func <CloudTable> tableFactory) : base(tableFactory)
        {
            Require.NotNull(tableFactory, "tableFactory");

            m_tableEntityConverter = new TableEntityConverter();
        }