Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ Complete()

void System.Net.Mail.SmtpClient.Complete ( Exception exception,
IAsyncResult result )
inlineprivate

Definition at line 779 of file SmtpClient.cs.

780 {
782 try
783 {
784 if (_cancelled)
785 {
786 exception = null;
787 Abort();
788 }
789 else if (exception != null && (!(exception is SmtpFailedRecipientException) || ((SmtpFailedRecipientException)exception).fatal))
790 {
791 if (System.Net.NetEventSource.Log.IsEnabled())
792 {
793 System.Net.NetEventSource.Error(this, exception, "Complete");
794 }
795 Abort();
796 if (!(exception is SmtpException))
797 {
798 exception = new SmtpException(System.SR.SmtpSendMailFailure, exception);
799 }
800 }
801 else if (_writer != null)
802 {
803 try
804 {
805 _writer.Close();
806 }
807 catch (SmtpException ex)
808 {
809 exception = ex;
810 }
811 }
812 }
813 finally
814 {
815 contextAwareResult.InvokeCallback(exception);
816 }
817 if (System.Net.NetEventSource.Log.IsEnabled())
818 {
819 System.Net.NetEventSource.Info(this, "Complete", "Complete");
820 }
821 }
override void Close()
Definition MailWriter.cs:31
static readonly System.Net.NetEventSource Log
static void Info(object thisOrContextObject, FormattableString formattableString=null, [CallerMemberName] string memberName=null)
static void Error(object thisOrContextObject, FormattableString formattableString, [CallerMemberName] string memberName=null)
static string SmtpSendMailFailure
Definition SR.cs:114
Definition SR.cs:7

References System.Net.Mail.SmtpClient._cancelled, System.Net.Mail.SmtpClient._writer, System.Net.Mail.SmtpClient.Abort(), System.IAsyncResult.AsyncState, System.Net.Mail.MailWriter.Close(), System.Net.NetEventSource.Error(), System.exception, System.Net.NetEventSource.Info(), System.Net.LazyAsyncResult.InvokeCallback(), System.Net.NetEventSource.Log, and System.SR.SmtpSendMailFailure.

Referenced by System.Net.Mail.SmtpClient.ConnectCallback(), System.Net.Mail.SmtpClient.SendMailCallback(), and System.Net.Mail.SmtpClient.SendMessageCallback().