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