private MonadConnectionInfo DiscoverOrganizationConnectionInfo()
 {
     if (!WinformsHelper.IsRemoteEnabled())
     {
         return(null);
     }
     if (this.Type == OrganizationType.RemoteOnPremise || this.Type == OrganizationType.Cloud)
     {
         this.ReportConnectToSpecifiedServerProgress(0);
         return(this.DiscoverConnectionInfo());
     }
     if (this.Uri != null)
     {
         try
         {
             this.ReportConnectToSpecifiedServerProgress(0);
             return(this.DiscoverConnectionInfo());
         }
         catch (PSRemotingDataStructureException)
         {
         }
         catch (PSRemotingTransportException)
         {
         }
     }
     this.ReportDiscoverServerProgress(15);
     this.Uri = PSConnectionInfoSingleton.GetRemotePowerShellUri(PSConnectionInfoSingleton.DiscoverExchangeServer());
     this.ReportConnectToServerProgress(40);
     return(this.DiscoverConnectionInfo());
 }
 private Fqdn GetAutoDiscoveredServer()
 {
     if (string.IsNullOrEmpty(this.autoDiscoveredServer))
     {
         this.autoDiscoveredServer = PSConnectionInfoSingleton.DiscoverExchangeServer();
     }
     return(this.autoDiscoveredServer);
 }