Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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;
        }
Exemplo n.º 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);
 }