Ejemplo n.º 1
0
        /// <inheritdoc />
        async Task <IDictionaryRange <int, Recipe> > IRepository <int, Recipe> .FindAllAsync(CancellationToken cancellationToken)
        {
            IRecipeRepository self = this;
            var request            = new RecipeBulkRequest
            {
                Culture = self.Culture
            };
            var response = await this.serviceClient.SendAsync <ICollection <RecipeDTO> >(request, cancellationToken).ConfigureAwait(false);

            return(this.bulkResponseConverter.Convert(response, null));
        }
Ejemplo n.º 2
0
        /// <inheritdoc />
        IDictionaryRange <int, Recipe> IRepository <int, Recipe> .FindAll()
        {
            IRecipeRepository self = this;
            var request            = new RecipeBulkRequest
            {
                Culture = self.Culture
            };
            var response = this.serviceClient.Send <ICollection <RecipeDTO> >(request);

            return(this.bulkResponseConverter.Convert(response, null));
        }
Ejemplo n.º 3
0
        /// <inheritdoc />
        Task <IDictionaryRange <int, Recipe> > IRepository <int, Recipe> .FindAllAsync(CancellationToken cancellationToken)
        {
            IRecipeRepository self = this;
            var request            = new RecipeBulkRequest
            {
                Culture = self.Culture
            };
            var responseTask = this.serviceClient.SendAsync <ICollection <RecipeDataContract> >(request, cancellationToken);

            return(responseTask.ContinueWith <IDictionaryRange <int, Recipe> >(this.ConvertAsyncResponse, cancellationToken));
        }
Ejemplo n.º 4
0
        /// <inheritdoc />
        async Task <IDictionaryRange <int, Recipe> > IRepository <int, Recipe> .FindAllAsync(ICollection <int> identifiers, CancellationToken cancellationToken)
        {
            IRecipeRepository self = this;
            var request            = new RecipeBulkRequest
            {
                Identifiers = identifiers.Select(i => i.ToString(NumberFormatInfo.InvariantInfo)).ToList(),
                Culture     = self.Culture
            };
            var response = await this.serviceClient.SendAsync <ICollection <RecipeDTO> >(request, cancellationToken).ConfigureAwait(false);

            return(this.bulkResponseConverter.Convert(response, null));
        }
Ejemplo n.º 5
0
        /// <inheritdoc />
        IDictionaryRange <int, Recipe> IRepository <int, Recipe> .FindAll(ICollection <int> identifiers)
        {
            IRecipeRepository self = this;
            var request            = new RecipeBulkRequest
            {
                Identifiers = identifiers.Select(i => i.ToString(NumberFormatInfo.InvariantInfo)).ToList(),
                Culture     = self.Culture
            };
            var response = this.serviceClient.Send <ICollection <RecipeDTO> >(request);

            return(this.bulkResponseConverter.Convert(response, null));
        }
Ejemplo n.º 6
0
        /// <inheritdoc />
        Task <IDictionaryRange <int, Recipe> > IRepository <int, Recipe> .FindAllAsync(ICollection <int> identifiers, CancellationToken cancellationToken)
        {
            IRecipeRepository self = this;
            var request            = new RecipeBulkRequest
            {
                Identifiers = identifiers.Select(i => i.ToString(NumberFormatInfo.InvariantInfo)).ToList(),
                Culture     = self.Culture
            };
            var responseTask = this.serviceClient.SendAsync <ICollection <RecipeDataContract> >(request, cancellationToken);

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