System.Net.Mail.SmtpConnection.ConnectAndHandshakeAsyncResult.TlsStreamAuthenticateCallback C# (CSharp) Method

TlsStreamAuthenticateCallback() private static method

private static TlsStreamAuthenticateCallback ( IAsyncResult result ) : void
result IAsyncResult
return void
            private static void TlsStreamAuthenticateCallback(IAsyncResult result)
            {
                if (!result.CompletedSynchronously)
                {
                    ConnectAndHandshakeAsyncResult thisPtr = (ConnectAndHandshakeAsyncResult)result.AsyncState;
                    try
                    {
                        (thisPtr._connection._networkStream as TlsStream).EndAuthenticateAsClient(result);
                        thisPtr._connection._responseReader = new SmtpReplyReaderFactory(thisPtr._connection._networkStream);
                        thisPtr.SendEHello();
                    }
                    catch (Exception e)
                    {
                        thisPtr.InvokeCallback(e);
                    }
                }
            }