コード例 #1
0
        /// <inheritdoc />
        Task <ICollection <int> > IDiscoverable <int> .DiscoverAsync(CancellationToken cancellationToken)
        {
            var request      = new SkinDiscoveryRequest();
            var responseTask = this.serviceClient.SendAsync <SkinCollectionDataContract>(request, cancellationToken);

            return(responseTask.ContinueWith <ICollection <int> >(this.ConvertAsyncResponse, cancellationToken));
        }
コード例 #2
0
        /// <inheritdoc />
        ICollection <int> IDiscoverable <int> .Discover()
        {
            var request  = new SkinDiscoveryRequest();
            var response = this.serviceClient.Send <SkinCollectionDataContract>(request);

            if (response.Content == null)
            {
                return(new List <int>(0));
            }

            return(this.converterForSkinCollection.Convert(response.Content, null));
        }
コード例 #3
0
ファイル: SkinRepository.cs プロジェクト: sschw/GW2.NET
        /// <inheritdoc />
        async Task <ICollection <int> > IDiscoverable <int> .DiscoverAsync(CancellationToken cancellationToken)
        {
            var request  = new SkinDiscoveryRequest();
            var response = await this.serviceClient.SendAsync <SkinCollectionDTO>(request, cancellationToken).ConfigureAwait(false);

            if (response.Content == null)
            {
                return(new List <int>(0));
            }

            return(this.skinCollectionConverter.Convert(response.Content, response));
        }