Exemplo n.º 1
0
 public SSLInfo GetSSLInfo(IPEndPoint endpoint)
 {
     using (new HttpInitializeScope())
     {
         return(SSLInfo.Get(endpoint));
     }
 }
Exemplo 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);
     }
 }
Exemplo 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);
     }
 }