Пример #1
0
        private async System.Threading.Tasks.Task <Job?> Jobs_GetJobAsync(Meziantou.GitLab.GetJobRequest request, Meziantou.GitLab.RequestOptions?requestOptions = default(Meziantou.GitLab.RequestOptions), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
        {
            string url = Meziantou.GitLab.GitLabClient.Jobs_GetJobAsync_BuildUrl(request);

            using (System.Net.Http.HttpRequestMessage requestMessage = new System.Net.Http.HttpRequestMessage())
            {
                requestMessage.Method     = System.Net.Http.HttpMethod.Get;
                requestMessage.RequestUri = new System.Uri(url, System.UriKind.RelativeOrAbsolute);
                HttpResponse?response = null;
                try
                {
                    response = await this.SendAsync(requestMessage, requestOptions, cancellationToken).ConfigureAwait(false);

                    if ((response.StatusCode == System.Net.HttpStatusCode.NotFound))
                    {
                        return(default);
Пример #2
0
 System.Threading.Tasks.Task <Job?> Meziantou.GitLab.IGitLabJobsClient.GetJobAsync(Meziantou.GitLab.GetJobRequest request, Meziantou.GitLab.RequestOptions?requestOptions, System.Threading.CancellationToken cancellationToken)
 {
     return(this.Jobs_GetJobAsync(request, requestOptions, cancellationToken));
 }