コード例 #1
0
 /// <summary>
 /// Add an instance of the SMTP command factory.
 /// </summary>
 /// <param name="smtpCommandFactory">The SMTP command factory.</param>
 public void Add(ISmtpCommandFactory smtpCommandFactory)
 {
     _smtpCommandFactory = smtpCommandFactory;
 }
コード例 #2
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="context">The session context.</param>
 internal SmtpSession(SmtpSessionContext context)
 {
     _context        = context;
     _stateMachine   = new SmtpStateMachine(_context);
     _commandFactory = context.ServiceProvider.GetServiceOrDefault <ISmtpCommandFactory>(new SmtpCommandFactory());
 }