Пример #1
0
        /// <inheritdoc />
        Task <IDictionaryRange <int, World> > IRepository <int, World> .FindAllAsync(CancellationToken cancellationToken)
        {
            IWorldRepository self = this;
            var request           = new WorldBulkRequest
            {
                Culture = self.Culture
            };
            var responseTask = this.serviceClient.SendAsync <ICollection <WorldDataContract> >(request, cancellationToken);

            return(responseTask.ContinueWith <IDictionaryRange <int, World> >(this.ConvertAsyncResponse, cancellationToken));
        }
Пример #2
0
        /// <inheritdoc />
        async Task <IDictionaryRange <int, World> > IRepository <int, World> .FindAllAsync(CancellationToken cancellationToken)
        {
            IWorldRepository self = this;
            var request           = new WorldBulkRequest
            {
                Culture = self.Culture
            };
            var response = await this.serviceClient.SendAsync <ICollection <WorldDTO> >(request, cancellationToken).ConfigureAwait(false);

            return(this.bulkResponseConverter.Convert(response, null));
        }
Пример #3
0
        /// <inheritdoc />
        IDictionaryRange <int, World> IRepository <int, World> .FindAll()
        {
            IWorldRepository self = this;
            var request           = new WorldBulkRequest
            {
                Culture = self.Culture
            };
            var response = this.serviceClient.Send <ICollection <WorldDTO> >(request);

            return(this.bulkResponseConverter.Convert(response, null));
        }
Пример #4
0
        /// <inheritdoc />
        Task <IDictionaryRange <int, World> > IRepository <int, World> .FindAllAsync(ICollection <int> identifiers, CancellationToken cancellationToken)
        {
            IWorldRepository self = this;
            var request           = new WorldBulkRequest
            {
                Identifiers = identifiers.Select(i => i.ToString(NumberFormatInfo.InvariantInfo)).ToList(),
                Culture     = self.Culture
            };
            var responseTask = this.serviceClient.SendAsync <ICollection <WorldDataContract> >(request, cancellationToken);

            return(responseTask.ContinueWith <IDictionaryRange <int, World> >(this.ConvertAsyncResponse, cancellationToken));
        }
Пример #5
0
        /// <inheritdoc />
        IDictionaryRange <int, World> IRepository <int, World> .FindAll()
        {
            IWorldRepository self = this;
            var request           = new WorldBulkRequest
            {
                Culture = self.Culture
            };
            var response = this.serviceClient.Send <ICollection <WorldDataContract> >(request);
            var values   = this.converterForBulkResponse.Convert(response, null);

            return(values ?? new DictionaryRange <int, World>(0));
        }
Пример #6
0
        /// <inheritdoc />
        async Task <IDictionaryRange <int, World> > IRepository <int, World> .FindAllAsync(ICollection <int> identifiers, CancellationToken cancellationToken)
        {
            IWorldRepository self = this;
            var request           = new WorldBulkRequest
            {
                Identifiers = identifiers.Select(i => i.ToString(NumberFormatInfo.InvariantInfo)).ToList(),
                Culture     = self.Culture
            };
            var response = await this.serviceClient.SendAsync <ICollection <WorldDTO> >(request, cancellationToken).ConfigureAwait(false);

            return(this.bulkResponseConverter.Convert(response, null));
        }
Пример #7
0
        /// <inheritdoc />
        IDictionaryRange <int, World> IRepository <int, World> .FindAll(ICollection <int> identifiers)
        {
            IWorldRepository self = this;
            var request           = new WorldBulkRequest
            {
                Culture     = self.Culture,
                Identifiers = identifiers.Select(i => i.ToString(NumberFormatInfo.InvariantInfo)).ToList()
            };
            var response = this.serviceClient.Send <ICollection <WorldDTO> >(request);

            return(this.bulkResponseConverter.Convert(response, null));
        }