Beispiel #1
0
        public static string GetUrlFromConfig(Enlistment enlistment)
        {
            GitProcess git = enlistment.CreateGitProcess();

            // TODO 1057500: Remove support for encoded-repo-url cache config setting
            return
                (GetValueFromConfig(git, ScalarConstants.GitConfig.CacheServer, localOnly: true)
                 ?? enlistment.RepoUrl);
        }
Beispiel #2
0
        public static string GetUrlFromConfig(Enlistment enlistment)
        {
            GitProcess git = enlistment.CreateGitProcess();

            // TODO 1057500: Remove support for encoded-repo-url cache config setting
            return
                (GetValueFromConfig(git, CacheServerConfigName, localOnly: true)
                 ?? GetValueFromConfig(git, GetDeprecatedCacheConfigSettingName(enlistment), localOnly: false)
                 ?? enlistment.RepoUrl);
        }
        protected HttpRequestor(ITracer tracer, RetryConfig retryConfig, Enlistment enlistment)
        {
            this.RetryConfig = retryConfig;

            this.authentication = enlistment.Authentication;

            this.Tracer = tracer;

            HttpClientHandler httpClientHandler = new HttpClientHandler()
            {
                UseDefaultCredentials = true
            };

            this.authentication.ConfigureHttpClientHandlerSslIfNeeded(this.Tracer, httpClientHandler, enlistment.CreateGitProcess());

            this.client = new HttpClient(httpClientHandler)
            {
                Timeout = retryConfig.Timeout
            };

            this.userAgentHeader = new ProductInfoHeaderValue(ProcessHelper.GetEntryClassName(), ProcessHelper.GetCurrentProcessVersion());
        }