Abort() private method

private Abort ( ) : void
return void
示例#1
0
 internal void Abort()
 {
     if (_connection != null)
     {
         _connection.Abort();
     }
 }
示例#2
0
        internal void GetConnection(string host, int port)
        {
            try
            {
                lock (this)
                {
                    _connection = new SmtpConnection(this, _client, _credentials, _authenticationModules);
                    if (_shouldAbort)
                    {
                        _connection.Abort();
                    }
                    _shouldAbort = false;
                }

                if (NetEventSource.IsEnabled)
                {
                    NetEventSource.Associate(this, _connection);
                }

                if (EnableSsl)
                {
                    _connection.EnableSsl          = true;
                    _connection.ClientCertificates = ClientCertificates;
                }

                _connection.GetConnection(host, port);
            }
            finally { }
        }
示例#3
0
 internal void Abort()
 {
     lock (this)
     {
         if (_connection != null)
         {
             _connection.Abort();
         }
         else
         {
             _shouldAbort = true;
         }
     }
 }