Пример #1
0
        /// <inheritdoc />
        ICollection <int> IRecipeRepository.DiscoverByOutput(int identifier)
        {
            var request = new RecipeSearchRequest
            {
                Output = identifier
            };
            var response = this.serviceClient.Send <ICollection <int> >(request);

            return(this.identifiersResponseConverter.Convert(response, null));
        }
Пример #2
0
        /// <inheritdoc />
        async Task <ICollection <int> > IRecipeRepository.DiscoverByOutputAsync(int identifier, CancellationToken cancellationToken)
        {
            var request = new RecipeSearchRequest
            {
                Output = identifier
            };
            var response = await this.serviceClient.SendAsync <ICollection <int> >(request, cancellationToken).ConfigureAwait(false);

            return(this.identifiersResponseConverter.Convert(response, null));
        }
Пример #3
0
        /// <inheritdoc />
        Task <ICollection <int> > IRecipeRepository.DiscoverByOutputAsync(int identifier, CancellationToken cancellationToken)
        {
            var request = new RecipeSearchRequest
            {
                Output = identifier
            };
            var responseTask = this.serviceClient.SendAsync <ICollection <int> >(request, cancellationToken);

            return(responseTask.ContinueWith <ICollection <int> >(this.ConvertAsyncResponse, cancellationToken));
        }