public static SimpleServer Create(string url, Action <HttpListenerContext> handler) { var server = new SimpleServer(new HttpListener { Prefixes = { url } }, handler); server.Start(); return(server); }
public static SimpleServer Create( string url, Action<HttpListenerContext> handler, AuthenticationSchemes authenticationSchemes = AuthenticationSchemes.Anonymous) { var listener = new HttpListener { Prefixes = { url }, AuthenticationSchemes = authenticationSchemes }; var server = new SimpleServer(listener, handler); server.Start(); return server; }
public static SimpleServer Create(string url, Action <HttpListenerContext> handler, AuthenticationSchemes authenticationSchemes = AuthenticationSchemes.Anonymous) { var listener = new HttpListener { Prefixes = { url }, AuthenticationSchemes = authenticationSchemes }; var server = new SimpleServer(listener, handler); server.Start(); return(server); }
public static SimpleServer Create(string url, Action<HttpListenerContext> handler) { var server = new SimpleServer(new HttpListener { Prefixes = { url } }, handler); server.Start(); return server; }