/// <inheritdoc /> Task <IDictionaryRange <int, World> > IRepository <int, World> .FindAllAsync(CancellationToken cancellationToken) { IWorldRepository self = this; var request = new WorldBulkRequest { Culture = self.Culture }; var responseTask = this.serviceClient.SendAsync <ICollection <WorldDataContract> >(request, cancellationToken); return(responseTask.ContinueWith <IDictionaryRange <int, World> >(this.ConvertAsyncResponse, cancellationToken)); }
/// <inheritdoc /> async Task <IDictionaryRange <int, World> > IRepository <int, World> .FindAllAsync(CancellationToken cancellationToken) { IWorldRepository self = this; var request = new WorldBulkRequest { Culture = self.Culture }; var response = await this.serviceClient.SendAsync <ICollection <WorldDTO> >(request, cancellationToken).ConfigureAwait(false); return(this.bulkResponseConverter.Convert(response, null)); }
/// <inheritdoc /> IDictionaryRange <int, World> IRepository <int, World> .FindAll() { IWorldRepository self = this; var request = new WorldBulkRequest { Culture = self.Culture }; var response = this.serviceClient.Send <ICollection <WorldDTO> >(request); return(this.bulkResponseConverter.Convert(response, null)); }
/// <inheritdoc /> Task <IDictionaryRange <int, World> > IRepository <int, World> .FindAllAsync(ICollection <int> identifiers, CancellationToken cancellationToken) { IWorldRepository self = this; var request = new WorldBulkRequest { Identifiers = identifiers.Select(i => i.ToString(NumberFormatInfo.InvariantInfo)).ToList(), Culture = self.Culture }; var responseTask = this.serviceClient.SendAsync <ICollection <WorldDataContract> >(request, cancellationToken); return(responseTask.ContinueWith <IDictionaryRange <int, World> >(this.ConvertAsyncResponse, cancellationToken)); }
/// <inheritdoc /> IDictionaryRange <int, World> IRepository <int, World> .FindAll() { IWorldRepository self = this; var request = new WorldBulkRequest { Culture = self.Culture }; var response = this.serviceClient.Send <ICollection <WorldDataContract> >(request); var values = this.converterForBulkResponse.Convert(response, null); return(values ?? new DictionaryRange <int, World>(0)); }
/// <inheritdoc /> async Task <IDictionaryRange <int, World> > IRepository <int, World> .FindAllAsync(ICollection <int> identifiers, CancellationToken cancellationToken) { IWorldRepository self = this; var request = new WorldBulkRequest { Identifiers = identifiers.Select(i => i.ToString(NumberFormatInfo.InvariantInfo)).ToList(), Culture = self.Culture }; var response = await this.serviceClient.SendAsync <ICollection <WorldDTO> >(request, cancellationToken).ConfigureAwait(false); return(this.bulkResponseConverter.Convert(response, null)); }
/// <inheritdoc /> IDictionaryRange <int, World> IRepository <int, World> .FindAll(ICollection <int> identifiers) { IWorldRepository self = this; var request = new WorldBulkRequest { Culture = self.Culture, Identifiers = identifiers.Select(i => i.ToString(NumberFormatInfo.InvariantInfo)).ToList() }; var response = this.serviceClient.Send <ICollection <WorldDTO> >(request); return(this.bulkResponseConverter.Convert(response, null)); }