/// <inheritdoc /> Item IRepository <int, Item> .Find(int identifier) { IItemRepository self = this; var request = new ItemDetailsRequest { Identifier = identifier.ToString(NumberFormatInfo.InvariantInfo), Culture = self.Culture }; var response = this.serviceClient.Send <ItemDTO>(request); return(this.responseConverter.Convert(response, null)); }
/// <inheritdoc /> async Task <Item> IRepository <int, Item> .FindAsync(int identifier, CancellationToken cancellationToken) { IItemRepository self = this; var request = new ItemDetailsRequest { Identifier = identifier.ToString(NumberFormatInfo.InvariantInfo), Culture = self.Culture }; var response = await this.serviceClient.SendAsync <ItemDTO>(request, cancellationToken).ConfigureAwait(false); return(this.responseConverter.Convert(response, null)); }
/// <inheritdoc /> Task <Item> IRepository <int, Item> .FindAsync(int identifier, CancellationToken cancellationToken) { IItemRepository self = this; var request = new ItemDetailsRequest { Identifier = identifier.ToString(NumberFormatInfo.InvariantInfo), Culture = self.Culture }; var responseTask = this.serviceClient.SendAsync <ItemDataContract>(request, cancellationToken); return(responseTask.ContinueWith <Item>(this.ConvertAsyncResponse, cancellationToken)); }