Esempio n. 1
0
 public SSLInfo GetSSLInfo(IPEndPoint endpoint)
 {
     using (new HttpInitializeScope())
     {
         return(SSLInfo.Get(endpoint));
     }
 }
Esempio n. 2
0
 public void HasMeaningfulErrorMessageIfHttpApiNotInitialized()
 {
     try
     {
         SSLInfo.Get(0);
     }
     catch (InvalidOperationException ex)
     {
         Assert.Equal("You should first initialize HTTP Server API with HttpInitializeScope", ex.Message);
     }
 }
Esempio n. 3
0
 public IEnumerable <SSLInfo> GetSSLInfos()
 {
     using (new HttpInitializeScope())
     {
         SSLInfo sslInfo;
         int     i = 0;
         do
         {
             sslInfo = SSLInfo.Get(i);
             if (sslInfo != null)
             {
                 yield return(sslInfo);
             }
             i++;
         } while(sslInfo != null);
     }
 }