/// <inheritdoc /> async Task <IDictionaryRange <int, Item> > IRepository <int, Item> .FindAllAsync(CancellationToken cancellationToken) { IItemRepository self = this; var request = new ItemBulkRequest { Culture = self.Culture }; var response = await this.serviceClient.SendAsync <ICollection <ItemDTO> >(request, cancellationToken).ConfigureAwait(false); return(this.bulkResponseConverter.Convert(response, null)); }
/// <inheritdoc /> IDictionaryRange <int, Item> IRepository <int, Item> .FindAll() { IItemRepository self = this; var request = new ItemBulkRequest { Culture = self.Culture }; var response = this.serviceClient.Send <ICollection <ItemDTO> >(request); return(this.bulkResponseConverter.Convert(response, null)); }
/// <inheritdoc /> Task <IDictionaryRange <int, Item> > IRepository <int, Item> .FindAllAsync(CancellationToken cancellationToken) { IItemRepository self = this; var request = new ItemBulkRequest { Culture = self.Culture }; var responseTask = this.serviceClient.SendAsync <ICollection <ItemDataContract> >(request, cancellationToken); return(responseTask.ContinueWith <IDictionaryRange <int, Item> >(this.ConvertAsyncResponse, cancellationToken)); }
/// <inheritdoc /> async Task <IDictionaryRange <int, Item> > IRepository <int, Item> .FindAllAsync(ICollection <int> identifiers, CancellationToken cancellationToken) { IItemRepository self = this; var request = new ItemBulkRequest { Identifiers = identifiers.Select(i => i.ToString(NumberFormatInfo.InvariantInfo)).ToList(), Culture = self.Culture }; var response = await this.serviceClient.SendAsync <ICollection <ItemDTO> >(request, cancellationToken).ConfigureAwait(false); return(this.bulkResponseConverter.Convert(response, null)); }
/// <inheritdoc /> IDictionaryRange <int, Item> IRepository <int, Item> .FindAll(ICollection <int> identifiers) { IItemRepository self = this; var request = new ItemBulkRequest { Identifiers = identifiers.Select(i => i.ToString(NumberFormatInfo.InvariantInfo)).ToList(), Culture = self.Culture }; var response = this.serviceClient.Send <ICollection <ItemDTO> >(request); return(this.bulkResponseConverter.Convert(response, null)); }
/// <inheritdoc /> Task <IDictionaryRange <int, Item> > IRepository <int, Item> .FindAllAsync(ICollection <int> identifiers, CancellationToken cancellationToken) { IItemRepository self = this; var request = new ItemBulkRequest { Identifiers = identifiers.Select(i => i.ToString(NumberFormatInfo.InvariantInfo)).ToList(), Culture = self.Culture }; var responseTask = this.serviceClient.SendAsync <ICollection <ItemDataContract> >(request, cancellationToken); return(responseTask.ContinueWith <IDictionaryRange <int, Item> >(this.ConvertAsyncResponse, cancellationToken)); }