1 write to _connection
System.Net.Mail (1)
System\Net\Mail\SmtpConnection.cs (1)
404
_connection
= connection;
61 references to _connection
System.Net.Mail (61)
System\Net\Mail\SmtpConnection.cs (61)
423
if (
_connection
._isConnected)
433
IAsyncResult result =
_connection
.BeginInitializeConnection(_host, _port, InitializeConnectionCallback, this);
438
_connection
.EndInitializeConnection(result);
457
thisPtr.
_connection
.EndInitializeConnection(result);
471
_connection
._responseReader = new SmtpReplyReaderFactory(
_connection
._stream!);
473
SmtpReplyReader reader =
_connection
.Reader!.GetNextReplyReader();
539
IAsyncResult result = EHelloCommand.BeginSend(
_connection
,
_connection
._client!._clientDomain, s_sendEHelloCallback, this);
542
_connection
._extensions = EHelloCommand.EndSend(result);
543
_connection
.ParseExtensions(
_connection
._extensions);
547
if (
_connection
._stream is SslStream)
553
if (
_connection
.EnableSsl)
555
if (!
_connection
._serverSupportsStartTls)
558
if (!(
_connection
._stream is SslStream))
584
thisPtr.
_connection
._extensions = EHelloCommand.EndSend(result);
585
thisPtr.
_connection
.ParseExtensions(thisPtr.
_connection
._extensions);
590
if (thisPtr.
_connection
._stream is SslStream)
612
if (thisPtr.
_connection
.EnableSsl)
614
if (!thisPtr.
_connection
._serverSupportsStartTls)
617
if (!(thisPtr.
_connection
._stream is SslStream))
639
IAsyncResult result = HelloCommand.BeginSend(
_connection
,
_connection
._client!._clientDomain, s_sendHelloCallback, this);
643
_connection
._supportedAuth = SupportedAuth.Login;
670
IAsyncResult result = StartTlsCommand.BeginSend(
_connection
, SendStartTlsCallback, this);
700
_connection
._stream = new SslStream(
_connection
._stream!, false, ServicePointManager.ServerCertificateValidationCallback);
702
IAsyncResult result = ((SslStream)
_connection
._stream).BeginAuthenticateAsClient(
704
_connection
._clientCertificates,
713
((SslStream)
_connection
._stream).EndAuthenticateAsClient(result);
714
_connection
._responseReader = new SmtpReplyReaderFactory(
_connection
._stream);
728
(thisPtr.
_connection
._stream as SslStream)!.EndAuthenticateAsClient(result);
729
thisPtr.
_connection
._responseReader = new SmtpReplyReaderFactory(thisPtr.
_connection
._stream);
743
if (
_connection
._credentials != null)
745
while (++_currentModule <
_connection
._authenticationModules.Length)
748
ISmtpAuthenticationModule module =
_connection
._authenticationModules[_currentModule];
749
if (!
_connection
.AuthSupported(module))
754
NetworkCredential? credential =
_connection
._credentials.GetCredential(_host, _port, module.AuthenticationType);
757
Authorization? auth =
_connection
.SetContextAndTryAuthenticate(module, credential, _outerResult);
761
IAsyncResult result = AuthCommand.BeginSend(
_connection
,
_connection
._authenticationModules[_currentModule].AuthenticationType, auth.Message, s_authenticateCallback, this);
779
module.CloseContext(
_connection
);
780
_connection
._isConnected = true;
787
_connection
._isConnected = true;
810
thisPtr.
_connection
._authenticationModules[thisPtr._currentModule].CloseContext(thisPtr.
_connection
);
811
thisPtr.
_connection
._isConnected = true;
831
Authorization? auth =
_connection
._authenticationModules[_currentModule].Authenticate(_authResponse, null,
_connection
,
_connection
._client!.TargetName, null);
837
IAsyncResult result = AuthCommand.BeginSend(
_connection
, auth.Message, s_authenticateContinueCallback, this);
846
_connection
._authenticationModules[_currentModule].CloseContext(
_connection
);
847
_connection
._isConnected = true;
869
thisPtr.
_connection
._authenticationModules[thisPtr._currentModule].CloseContext(thisPtr.
_connection
);
870
thisPtr.
_connection
._isConnected = true;