private LocalPrintServer() { string rootPath = Environment.CurrentDirectory; HttpServer = ExampleServer.GetSingleServer("0.0.0.0", this.Port); HttpServer.SetRoot(rootPath); HttpServer.OnPostRequestReceived = this.OnPrintRequestReceived; HttpServer.Logger = new FileLogger(); ServerThread = new Thread(new ThreadStart(HttpServerThread)); this.OnPrintServerLogged = delegate(string maeesage) { Console.WriteLine(maeesage); }; }
public PrintServer() { string rootPath = Environment.CurrentDirectory; this.HttpServer = new HTTPServer("0.0.0.0", this.GetServerPort()); this.HttpServer.SetRoot(rootPath); this.HttpServer.OnPostRequestReceived = this.OnPrintRequestReceived; this.HttpServer.Logger = new FileLogger(); this.printEngin = PrintObjectFactory.GetEngin(AppSettingHelper.GetOne("engin", "PDF")); this.printEngin.Initialize(); this.logContainer = new LogContainer(); this.printStatistics = new PrintStatistics(); this.ServerThread = new Thread(new ThreadStart(HttpServerThread)); this.OnPrintServerLogged = delegate(string maeesage) { Console.WriteLine(maeesage); }; this.updateWorker = new UpdateWorker(UpdateCheckerProvider.GetChcker()); }