System.Net.Mail.Message.EmptySendCallback C# (CSharp) Method

EmptySendCallback() private method

private EmptySendCallback ( IAsyncResult result ) : void
result IAsyncResult
return void
        internal void EmptySendCallback(IAsyncResult result)
        {
            Exception e = null;

            if (result.CompletedSynchronously)
            {
                return;
            }

            EmptySendContext context = (EmptySendContext)result.AsyncState;
            try
            {
                context._writer.EndGetContentStream(result).Close();
            }
            catch (Exception ex)
            {
                e = ex;
            }
            context._result.InvokeCallback(e);
        }