예제 #1
0
 internal void Shutdown(AsyncStatus status)
 {
     MonadRemoteRunspaceFactory.ClearAppDomainRemoteRunspaceConnections();
     CommandLoggingDialog.CloseCommandLoggingDialg();
     if (this.settings != null)
     {
         this.settings.PropertyChanged -= this.Settings_PropertyChanged;
     }
     ((IDisposable)this).Dispose();
 }
 private MonadConnectionInfo TryAuthenticationMechanisms(PSCredential cred, AuthenticationMechanism[] authMechanisms)
 {
     this.exceptionList.Clear();
     foreach (AuthenticationMechanism authenticationMechanism in authMechanisms)
     {
         try
         {
             bool skipCertificateCheck = this.CanSkipCertificateCheck();
             this.supportedVersionList = MonadRemoteRunspaceFactory.TestConnection(this.uri, "http://schemas.microsoft.com/powershell/Microsoft.Exchange", cred, authenticationMechanism, this.MaxRedirectionCount, skipCertificateCheck);
             return(new MonadConnectionInfo(this.uri, cred, "http://schemas.microsoft.com/powershell/Microsoft.Exchange", null, authenticationMechanism, ExchangeRunspaceConfigurationSettings.SerializationLevel.Full, ExchangeRunspaceConfigurationSettings.ExchangeApplication.EMC, (this.orgType == OrganizationType.Cloud) ? this.slotVersion : string.Empty, this.MaxRedirectionCount, skipCertificateCheck));
         }
         catch (PSRemotingTransportException value)
         {
             this.exceptionList.Add(authenticationMechanism, value);
         }
         catch (PSRemotingDataStructureException value2)
         {
             this.exceptionList.Add(authenticationMechanism, value2);
         }
     }
     this.supportedVersionList = null;
     return(null);
 }