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