示例#1
0
        /// <inheritdoc />
        IDictionaryRange <int, Continent> IRepository <int, Continent> .FindAll()
        {
            var request = new ContinentBulkRequest {
                Culture = ((ILocalizable)this).Culture
            };
            var response = this.serviceClient.Send <ICollection <ContinentDTO> >(request);

            return(this.bulkResponseConverter.Convert(response, null));
        }
示例#2
0
        /// <inheritdoc />
        async Task <IDictionaryRange <int, Continent> > IRepository <int, Continent> .FindAllAsync(CancellationToken cancellationToken)
        {
            var request = new ContinentBulkRequest
            {
                Culture = ((ILocalizable)this).Culture
            };
            var response = await this.serviceClient.SendAsync <ICollection <ContinentDTO> >(request, cancellationToken).ConfigureAwait(false);

            return(this.bulkResponseConverter.Convert(response, null));
        }
        /// <inheritdoc />
        Task <IDictionaryRange <int, Continent> > IRepository <int, Continent> .FindAllAsync(CancellationToken cancellationToken)
        {
            var request = new ContinentBulkRequest
            {
                Culture = ((ILocalizable)this).Culture
            };
            var responseTask = this.serviceClient.SendAsync <ICollection <ContinentDataContract> >(request, cancellationToken);

            return(responseTask.ContinueWith <IDictionaryRange <int, Continent> >(this.ConvertAsyncResponse, cancellationToken));
        }
示例#4
0
        /// <inheritdoc />
        async Task <IDictionaryRange <int, Continent> > IRepository <int, Continent> .FindAllAsync(ICollection <int> identifiers, CancellationToken cancellationToken)
        {
            var request = new ContinentBulkRequest
            {
                Identifiers = identifiers.Select(i => i.ToString(NumberFormatInfo.InvariantInfo)).ToList(),
                Culture     = ((ILocalizable)this).Culture
            };
            var response = await this.serviceClient.SendAsync <ICollection <ContinentDTO> >(request, cancellationToken).ConfigureAwait(false);

            return(this.bulkResponseConverter.Convert(response, null));
        }
示例#5
0
        /// <inheritdoc />
        IDictionaryRange <int, Continent> IRepository <int, Continent> .FindAll(ICollection <int> identifiers)
        {
            var request = new ContinentBulkRequest
            {
                Identifiers = identifiers.Select(i => i.ToString(NumberFormatInfo.InvariantInfo)).ToList(),
                Culture     = ((ILocalizable)this).Culture
            };
            var response = this.serviceClient.Send <ICollection <ContinentDTO> >(request);

            return(this.bulkResponseConverter.Convert(response, null));
        }
        /// <inheritdoc />
        Task <IDictionaryRange <int, Continent> > IRepository <int, Continent> .FindAllAsync(ICollection <int> identifiers, CancellationToken cancellationToken)
        {
            var request = new ContinentBulkRequest
            {
                Identifiers = identifiers.Select(i => i.ToString(NumberFormatInfo.InvariantInfo)).ToList(),
                Culture     = ((ILocalizable)this).Culture
            };
            var responseTask = this.serviceClient.SendAsync <ICollection <ContinentDataContract> >(request, cancellationToken);

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