Exemplo n.º 1
0
 public Task <Record> CreateItemAsync(
     CosmosObject payload,
     CancellationToken cancellationToken) => TryCatch <Record> .UnsafeGetResultAsync(
     this.MonadicCreateItemAsync(
         payload,
         cancellationToken),
     cancellationToken);
Exemplo n.º 2
0
 public Task <List <FeedRangeEpk> > GetChildRangeAsync(
     FeedRangeInternal feedRange,
     CancellationToken cancellationToken) => TryCatch <List <FeedRangeInternal> > .UnsafeGetResultAsync(
     this.MonadicGetChildRangeAsync(
         feedRange,
         cancellationToken),
     cancellationToken);
 public Task <List <PartitionKeyRange> > GetChildRangeAsync(
     PartitionKeyRange partitionKeyRange,
     CancellationToken cancellationToken) => TryCatch <List <PartitionKeyRange> > .UnsafeGetResultAsync(
     this.MonadicGetChildRangeAsync(
         partitionKeyRange,
         cancellationToken),
     cancellationToken);
Exemplo n.º 4
0
 public Task <List <FeedRangeEpk> > GetFeedRangesAsync(
     ITrace trace,
     CancellationToken cancellationToken) => TryCatch <List <FeedRangeEpk> > .UnsafeGetResultAsync(
     this.MonadicGetFeedRangesAsync(
         trace,
         cancellationToken),
     cancellationToken);
Exemplo n.º 5
0
 public Task <Record> ReadItemAsync(
     CosmosElement partitionKey,
     string identifier,
     CancellationToken cancellationToken) => TryCatch <Record> .UnsafeGetResultAsync(
     this.MonadicReadItemAsync(
         partitionKey,
         identifier,
         cancellationToken),
     cancellationToken);
Exemplo n.º 6
0
 public Task <DocumentContainerPage> ReadFeedAsync(
     FeedRangeInternal feedRange,
     ResourceId resourceIdentifier,
     int pageSize,
     CancellationToken cancellationToken) => TryCatch <DocumentContainerPage> .UnsafeGetResultAsync(
     this.MonadicReadFeedAsync(
         feedRange,
         resourceIdentifier,
         pageSize,
         cancellationToken),
     cancellationToken);
Exemplo n.º 7
0
 public Task <ChangeFeedPage> ChangeFeedAsync(
     ChangeFeedState state,
     FeedRangeInternal feedRange,
     int pageSize,
     CancellationToken cancellationToken) => TryCatch <ChangeFeedPage> .UnsafeGetResultAsync(
     this.MonadicChangeFeedAsync(
         state,
         feedRange,
         pageSize,
         cancellationToken),
     cancellationToken);
 public Task <ChangeFeedPage> ChangeFeedAsync(
     FeedRangeState <ChangeFeedState> feedRangeState,
     ChangeFeedPaginationOptions changeFeedPaginationOptions,
     ITrace trace,
     CancellationToken cancellationToken) => TryCatch <ChangeFeedPage> .UnsafeGetResultAsync(
     this.MonadicChangeFeedAsync(
         feedRangeState,
         changeFeedPaginationOptions,
         trace,
         cancellationToken),
     cancellationToken);
 public Task <ReadFeedPage> ReadFeedAsync(
     FeedRangeState <ReadFeedState> feedRangeState,
     ReadFeedPaginationOptions readFeedPaginationOptions,
     ITrace trace,
     CancellationToken cancellationToken) => TryCatch <ReadFeedPage> .UnsafeGetResultAsync(
     this.MonadicReadFeedAsync(
         feedRangeState,
         readFeedPaginationOptions,
         trace,
         cancellationToken),
     cancellationToken);
 public Task <DocumentContainerPage> ReadFeedAsync(
     int partitionKeyRangeId,
     long resourceIdentifier,
     int pageSize,
     CancellationToken cancellationToken) => TryCatch <DocumentContainerPage> .UnsafeGetResultAsync(
     this.MonadicReadFeedAsync(
         partitionKeyRangeId,
         resourceIdentifier,
         pageSize,
         cancellationToken),
     cancellationToken);
 public Task <ReadFeedPage> ReadFeedAsync(
     ReadFeedState readFeedState,
     FeedRangeInternal feedRange,
     QueryRequestOptions queryRequestOptions,
     int pageSize,
     CancellationToken cancellationToken) => TryCatch <ReadFeedPage> .UnsafeGetResultAsync(
     this.MonadicReadFeedAsync(
         readFeedState,
         feedRange,
         queryRequestOptions,
         pageSize,
         cancellationToken),
     cancellationToken);
 public Task <QueryPage> QueryAsync(
     SqlQuerySpec sqlQuerySpec,
     FeedRangeState <QueryState> feedRangeState,
     QueryPaginationOptions queryPaginationOptions,
     ITrace trace,
     CancellationToken cancellationToken) => TryCatch <QueryPage> .UnsafeGetResultAsync(
     this.MonadicQueryAsync(
         sqlQuerySpec,
         feedRangeState,
         queryPaginationOptions,
         trace,
         cancellationToken),
     cancellationToken);
Exemplo n.º 13
0
 public Task <QueryPage> QueryAsync(
     SqlQuerySpec sqlQuerySpec,
     string continuationToken,
     FeedRangeInternal feedRange,
     int pageSize,
     CancellationToken cancellationToken) => TryCatch <QueryPage> .UnsafeGetResultAsync(
     this.MonadicQueryAsync(
         sqlQuerySpec,
         continuationToken,
         feedRange,
         pageSize,
         cancellationToken),
     cancellationToken);
 public Task <QueryPage> QueryAsync(
     SqlQuerySpec sqlQuerySpec,
     string continuationToken,
     int partitionKeyRangeId,
     int pageSize,
     CancellationToken cancellationToken) => TryCatch <QueryPage> .UnsafeGetResultAsync(
     this.MonadicQueryAsync(
         sqlQuerySpec,
         continuationToken,
         partitionKeyRangeId,
         pageSize,
         cancellationToken),
     cancellationToken);
Exemplo n.º 15
0
 public Task <ChangeFeedPage> ChangeFeedAsync(
     ChangeFeedState state,
     FeedRangeInternal feedRange,
     int pageSize,
     ChangeFeedMode changeFeedMode,
     JsonSerializationFormat?jsonSerializationFormat,
     ITrace trace,
     CancellationToken cancellationToken) => TryCatch <ChangeFeedPage> .UnsafeGetResultAsync(
     this.MonadicChangeFeedAsync(
         state,
         feedRange,
         pageSize,
         changeFeedMode,
         jsonSerializationFormat,
         trace,
         cancellationToken),
     cancellationToken);
 public Task <List <PartitionKeyRange> > GetFeedRangesAsync(
     CancellationToken cancellationToken) => TryCatch <List <PartitionKeyRange> > .UnsafeGetResultAsync(
     this.MonadicGetFeedRangesAsync(
         cancellationToken),
     cancellationToken);
Exemplo n.º 17
0
 public Task <string> GetResourceIdentifierAsync(
     ITrace trace,
     CancellationToken cancellationToken) => TryCatch <string> .UnsafeGetResultAsync(
     this.MonadicGetResourceIdentifierAsync(trace, cancellationToken),
     cancellationToken);