Exemplo n.º 1
0
        public virtual IEnumerable <CloudTable> ListTables(string prefix = null, TableRequestOptions requestOptions = null, OperationContext operationContext = null)
        {
            requestOptions   = TableRequestOptions.ApplyDefaultsAndClearEncryption(requestOptions, this);
            operationContext = operationContext ?? new OperationContext();
            CloudTable serviceTable = this.GetTableReference(TableConstants.TableServiceTablesName);

            return(CloudTableClient.GenerateListTablesQuery(prefix, null).ExecuteInternal(this, serviceTable, requestOptions, operationContext).Select(
                       tbl => new CloudTable(tbl[TableConstants.TableName].StringValue, this)));
        }
Exemplo n.º 2
0
        public virtual ICancellableAsyncResult BeginListTablesSegmented(string prefix, int?maxResults, TableContinuationToken currentToken, TableRequestOptions requestOptions, OperationContext operationContext, AsyncCallback callback, object state)
        {
            requestOptions   = TableRequestOptions.ApplyDefaultsAndClearEncryption(requestOptions, this);
            operationContext = operationContext ?? new OperationContext();
            CloudTable serviceTable = this.GetTableReference(TableConstants.TableServiceTablesName);

            return(CloudTableClient.GenerateListTablesQuery(prefix, maxResults).BeginExecuteQuerySegmentedInternal(
                       currentToken,
                       this,
                       serviceTable,
                       requestOptions,
                       operationContext,
                       callback,
                       state));
        }
Exemplo n.º 3
0
        public virtual TableResultSegment ListTablesSegmented(string prefix, int?maxResults, TableContinuationToken currentToken, TableRequestOptions requestOptions = null, OperationContext operationContext = null)
        {
            requestOptions   = TableRequestOptions.ApplyDefaultsAndClearEncryption(requestOptions, this);
            operationContext = operationContext ?? new OperationContext();
            CloudTable serviceTable = this.GetTableReference(TableConstants.TableServiceTablesName);
            TableQuerySegment <DynamicTableEntity> res =
                CloudTableClient.GenerateListTablesQuery(prefix, maxResults).ExecuteQuerySegmentedInternal(currentToken, this, serviceTable, requestOptions, operationContext);

            List <CloudTable> tables = res.Results.Select(tbl => new CloudTable(
                                                              tbl.Properties[TableConstants.TableName].StringValue,
                                                              this)).ToList();

            TableResultSegment retSeg = new TableResultSegment(tables)
            {
                ContinuationToken = res.ContinuationToken as TableContinuationToken
            };

            return(retSeg);
        }