コード例 #1
0
ファイル: ContinentRepository.cs プロジェクト: sschw/GW2.NET
        /// <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
ファイル: ContinentRepository.cs プロジェクト: sschw/GW2.NET
        /// <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));
        }
コード例 #3
0
        /// <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
ファイル: ContinentRepository.cs プロジェクト: sschw/GW2.NET
        /// <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
ファイル: ContinentRepository.cs プロジェクト: sschw/GW2.NET
        /// <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));
        }
コード例 #6
0
        /// <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));
        }