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

SendStartTlsCallback() private static method

private static SendStartTlsCallback ( IAsyncResult result ) : void
result IAsyncResult
return void
            private static void SendStartTlsCallback(IAsyncResult result)
            {
                if (!result.CompletedSynchronously)
                {
                    ConnectAndHandshakeAsyncResult thisPtr = (ConnectAndHandshakeAsyncResult)result.AsyncState;
                    try
                    {
                        StartTlsCommand.EndSend(result);
                        thisPtr.TlsStreamAuthenticate();
                    }
                    catch (Exception e)
                    {
                        thisPtr.InvokeCallback(e);
                    }
                }
            }