Start() публичный статический Метод

Starts this instance.
public static Start ( ) : SimpleSmtpServer
Результат SimpleSmtpServer
Пример #1
0
 /// <summary>
 /// Starts server listening to the specified port with a simulated delay when processing a new SMTP message.
 /// </summary>
 /// <param name="port">The port.</param>
 /// <param name="processingDelayInMilliseconds">The number of milliseconds to wait before processing a new SMTP message</param>
 /// <returns></returns>
 public static SimpleSmtpServer Start(int port, int processingDelayInMilliseconds)
 {
     return(SimpleSmtpServer.Start(Configuration.Configure()
                                   .WithPort(port)
                                   .WithProcessingDelay(processingDelayInMilliseconds)
                                   ));
 }
Пример #2
0
        /// <summary>
        /// Builds this instance.
        /// </summary>
        /// <returns></returns>
        public SimpleSmtpServer Build()
        {
            Configuration config = this;

            if (this.Port == 0)
            {
                config = this.WithRandomPort();
            }
            return(SimpleSmtpServer.Start(config));
        }
Пример #3
0
 /// <summary>
 /// Starts the specified port.
 /// </summary>
 /// <param name="port">The port.</param>
 /// <param name="useMessageStore">if set to <c>true</c> [use message store].</param>
 /// <returns></returns>
 public static SimpleSmtpServer Start(int port, bool useMessageStore)
 {
     return(SimpleSmtpServer.Start(Configuration.Configure().WithPort(port).EnableMessageStore(useMessageStore)));
 }
Пример #4
0
 /// <summary>
 /// Starts server listening to the specified port.
 /// </summary>
 /// <param name="port">The port.</param>
 /// <returns></returns>
 public static SimpleSmtpServer Start(int port)
 {
     return(SimpleSmtpServer.Start(port, true));
 }
Пример #5
0
 /// <summary>
 /// Starts the specified use message store.
 /// </summary>
 /// <param name="useMessageStore">if set to <c>true</c> [use message store].</param>
 /// <returns></returns>
 public static SimpleSmtpServer Start(bool useMessageStore)
 {
     return(SimpleSmtpServer.Start(Configuration.Configure().WithRandomPort().EnableMessageStore(useMessageStore)));
 }
Пример #6
0
 /// <summary>
 /// Starts this instance.
 /// </summary>
 /// <returns></returns>
 public static SimpleSmtpServer Start()
 {
     return(SimpleSmtpServer.Start(Configuration.Configure().WithRandomPort()));
 }
Пример #7
0
 /// <summary>
 /// Starts server listening to the specified port.
 /// </summary>
 /// <param name="port">The port.</param>
 /// <returns></returns>
 public static SimpleSmtpServer Start(int port)
 {
     return(SimpleSmtpServer.Start(Configuration.Configure().WithPort(port)));
 }
Пример #8
0
 /// <summary>
 /// Starts the specified port.
 /// </summary>
 /// <param name="port">The port.</param>
 /// <param name="useMessageStore">if set to <c>true</c> [use message store].</param>
 /// <param name="processingDelayInMilliseconds">The number of milliseconds to wait before processing a new SMTP message</param>
 /// <returns></returns>
 public static SimpleSmtpServer Start(int port, bool useMessageStore, int processingDelayInMilliseconds)
 {
     return(SimpleSmtpServer.Start(Configuration.Configure().WithPort(port).EnableMessageStore(useMessageStore).WithProcessingDelay(processingDelayInMilliseconds)));
 }
Пример #9
0
 /// <summary>
 /// Starts the specified port.
 /// </summary>
 /// <param name="port">The port.</param>
 /// <param name="useMessageStore">if set to <c>true</c> [use message store].</param>
 /// <returns></returns>
 public static SimpleSmtpServer Start(int port, bool useMessageStore)
 {
     return(SimpleSmtpServer.Start(port, useMessageStore, 0));
 }