Exemplo n.º 1
0
 public NanoHttpServer Build(int port)
 {
     var server = new NanoHttpServer(port);
     server.SetRootHandler(new ThreadViewHandler(_db));
     server.AddHandler("thread", new ThreadViewHandler(_db));
     server.AddHandler("expand", new ThreadViewHandler(_db, true));
     server.AddHandler("reply", new ReplyViewHandler(_db));
     server.AddHandler("write", new WriteHandler(_db));
     server.AddHandler("hide", new HideHandler(_db));
     server.AddHandler("hideall", new HideAllHandler(_db));
     server.AddHandler("save", new SaveHandler(_db));
     server.AddHandler("fresh", new FreshPostsHandlder(_db));
     server.AddHandler("asmpng", new AsmPngHandler(_db));
     server.AddHandler("rawpost", new RawPostHandler(_db));
     server.AddHandler("postcount", new PostCountHandler(_db));
     server.AddHandler("lastposts", new LastPostsHandler(_db));
     server.AddHandler("getpost", new GetPostHandler(_db));
     server.AddHandler("children", new ChildrenHandler(_db, false));
     server.AddHandler("allchildren", new ChildrenHandler(_db, true));
     server.AddHandler("aggregate", new AggregateHandler());
     server.AddHandler("shutdown", new ShutdownHandler(server, _db));
     server.AddHandler("status", new NotificationHandler());
     server.AddHandler("image", new ImageBase64ConvertHandler());
     server.AddHandler("convert", new ConvertResultHandler());
     server.AddHandler("setstyle", new SetStyleHandler());
     server.AddHandler("compress", new CompressImageHandler());
     server.AddHandler("add", new AddPlaceHandler());
     server.AddHandler("del", new DelPlaceHandler());
     return server;
 }
Exemplo n.º 2
0
        public NanoHttpServer Build(int port)
        {
            var server = new NanoHttpServer(port);

            server.SetRootHandler(new ThreadViewHandler(_db));
            server.AddHandler("thread", new ThreadViewHandler(_db));
            server.AddHandler("expand", new ThreadViewHandler(_db, true));
            server.AddHandler("reply", new ReplyViewHandler(_db));
            server.AddHandler("write", new WriteHandler(_db));
            server.AddHandler("hide", new HideHandler(_db));
            server.AddHandler("hideall", new HideAllHandler(_db));
            server.AddHandler("save", new SaveHandler(_db));
            server.AddHandler("fresh", new FreshPostsHandlder(_db));
            server.AddHandler("asmpng", new AsmPngHandler(_db));
            server.AddHandler("rawpost", new RawPostHandler(_db));
            server.AddHandler("postcount", new PostCountHandler(_db));
            server.AddHandler("lastposts", new LastPostsHandler(_db));
            server.AddHandler("getpost", new GetPostHandler(_db));
            server.AddHandler("children", new ChildrenHandler(_db, false));
            server.AddHandler("allchildren", new ChildrenHandler(_db, true));
            server.AddHandler("aggregate", new AggregateHandler());
            server.AddHandler("shutdown", new ShutdownHandler(server, _db));
            server.AddHandler("status", new NotificationHandler());
            server.AddHandler("image", new ImageBase64ConvertHandler());
            server.AddHandler("convert", new ConvertResultHandler());
            server.AddHandler("setstyle", new SetStyleHandler());
            server.AddHandler("compress", new CompressImageHandler());
            server.AddHandler("add", new AddPlaceHandler());
            server.AddHandler("del", new DelPlaceHandler());
            return(server);
        }
Exemplo n.º 3
0
 public ShutdownHandler(NanoHttpServer server, NanoDB db)
 {
     _server = server;
     _db = db;
 }
Exemplo n.º 4
0
 public ShutdownHandler(NanoHttpServer server, NanoDB db)
 {
     _server = server;
     _db     = db;
 }