예제 #1
0
        /// <inheritdoc />
        public async Task<Build> GetBuildAsync(CancellationToken cancellationToken)
        {
            var request = new BuildRequest();
            var response = await this.serviceClient.SendAsync<BuildDTO>(request, cancellationToken).ConfigureAwait(false);
            if (response.Content == null)
            {
                return null;
            }

            return this.buildConverter.Convert(response.Content, response);
        }
예제 #2
0
        /// <inheritdoc />
        public Build GetBuild()
        {
            var request = new BuildRequest();
            var response = this.serviceClient.Send<BuildDTO>(request);
            if (response.Content == null)
            {
                return null;
            }

            return this.buildConverter.Convert(response.Content, response);
        }
예제 #3
0
        /// <inheritdoc />
        public Build GetBuild()
        {
            var request = new BuildRequest();
            var response = this.serviceClient.Send<BuildDataContract>(request);
            var dataContract = response.Content;

            if (dataContract == null)
            {
                return null;
            }

            return this.converterForBuild.Convert(dataContract, response);
        }
예제 #4
0
        /// <inheritdoc />
        public Build GetBuild()
        {
            var request = new BuildRequest();
            var response = this.serviceClient.Send<BuildDataContract>(request);
            var dataContract = response.Content;

            if (dataContract == null)
            {
                return null;
            }

            var value = this.converterForBuild.Convert(dataContract, null);
            if (value == null)
            {
                return null;
            }

            value.Timestamp = response.Date;
            return value;
        }
예제 #5
0
 /// <inheritdoc />
 public Task<Build> GetBuildAsync(CancellationToken cancellationToken)
 {
     var request = new BuildRequest();
     var responseTask = this.serviceClient.SendAsync<BuildDataContract>(request, cancellationToken);
     return responseTask.ContinueWith<Build>(this.ConvertAsyncResponse, cancellationToken);
 }