Пример #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="WebServer" /> class.
 /// </summary>
 /// <param name="urlPrefixes">The URL prefix.</param>
 /// <param name="routingStrategy">The routing strategy.</param>
 /// <param name="mode">The mode.</param>
 /// <param name="certificate">The certificate.</param>
 /// <exception cref="ArgumentException">Argument urlPrefix must be specified.</exception>
 /// <remarks>
 /// <c>urlPrefixes</c> must be specified as something similar to: http://localhost:9696/
 /// Please notice the ending slash. -- It is important.
 /// </remarks>
 public WebServer(string[] urlPrefixes, RoutingStrategy routingStrategy, HttpListenerMode mode, X509Certificate certificate)
     : this(urlPrefixes, routingStrategy, HttpListenerFactory.Create(mode, certificate))
 {
     // placeholder
 }
Пример #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="WebServer" /> class.
 ///
 /// Default setting is EmbedIO HttpListenerMode.
 /// </summary>
 /// <remarks>
 /// <c>urlPrefixes</c> must be specified as something similar to: http://localhost:9696/
 /// Please notice the ending slash. -- It is important.
 /// </remarks>
 /// <param name="urlPrefixes">The URL prefix.</param>
 /// <param name="routingStrategy">The routing strategy.</param>
 /// <param name="mode">The mode.</param>
 /// <exception cref="ArgumentException">Argument urlPrefix must be specified.</exception>
 public WebServer(string[] urlPrefixes, RoutingStrategy routingStrategy, HttpListenerMode mode = HttpListenerMode.EmbedIO)
     : this(urlPrefixes, routingStrategy, HttpListenerFactory.Create(mode))
 {
     // placeholder
 }
Пример #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="WebServer"/> class.
 ///
 /// Default settings are Regex RoutingStrategy and EmbedIO HttpListenerMode.
 /// </summary>
 /// <remarks>
 /// <c>urlPrefixes</c> must be specified as something similar to: http://localhost:9696/
 /// Please notice the ending slash. -- It is important.
 /// </remarks>
 /// <param name="urlPrefixes">The URL prefix.</param>
 /// <param name="routingStrategy">The routing strategy.</param>
 /// <exception cref="ArgumentException">Argument urlPrefix must be specified.</exception>
 public WebServer(string[] urlPrefixes, RoutingStrategy routingStrategy = RoutingStrategy.Regex)
     : this(urlPrefixes, routingStrategy, HttpListenerFactory.Create())
 {
     // placeholder
 }
Пример #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="WebServer"/> class.
 /// </summary>
 /// <param name="options">The WebServer options.</param>
 public WebServer(WebServerOptions options)
     : this(options.UrlPrefixes, options.RoutingStrategy, HttpListenerFactory.Create(options.Mode, options.Certificate))
 {
     // temp placeholder
 }