Ejemplo n.º 1
0
 protected virtual void Dispose(bool disposing)
 {
     if (disposing && (this.connection != null))
     {
         this.connection.ConnectionStateChanged -= new EventHandler <ConnectionStateChangedEventArgs>(this.Connection_ConnectionStateChanged);
         IDisposable connection = this.connection as IDisposable;
         if (connection != null)
         {
             connection.Dispose();
         }
         this.connection            = null;
         this._sessionEstablishedAt = DateTime.MaxValue;
         this._symbolServer         = null;
     }
 }
Ejemplo n.º 2
0
        private static HttpClient GetHttpClient(ISymbolServer symbolServer)
        {
            var client = new HttpClient(new HttpClientHandler {
                AllowAutoRedirect = false
            })
            {
                BaseAddress = new Uri(symbolServer.Url)
            };

            if (!string.IsNullOrEmpty(symbolServer.AuthorizationHeader))
            {
                client.DefaultRequestHeaders.Add("Authorization", symbolServer.AuthorizationHeader);
            }

            return(client);
        }
Ejemplo n.º 3
0
 private ValueTask <bool> DownloadPortablePdbFromSymbolServer(ISymbolServer symbolServer, string key, string downloadPath)
 {
     return(DownloadFileFromUrl(symbolServer, key, downloadPath));
 }
Ejemplo n.º 4
0
 private static ValueTask <bool> DownloadFileFromUrl(ISymbolServer symbolServer, string key, string pdbPath)
 {
     return(Download(GetHttpClient(symbolServer), symbolServer.Url + "/" + key, pdbPath));
 }