Beispiel #1
0
        public static void Main(string[] args)
        {
            var handler = new CompositeHandler(
                new List <IHttpHandler>
            {
                new DfmPreviewHandler(),
                new DfmTokenTreeHandler(),
                new ExitHandler()
            });

            var service = new DfmHttpServer(handler);

            service.Start();
            service.WaitForExit();
        }
Beispiel #2
0
        public static void Main(string[] args)
        {
            var handler = new CompositeHandler(
                new List <IHttpHandler>
            {
                new TestServerAvailableHandler(),
                new DfmPreviewHandler(),
                new DfmTokenTreeHandler(),
                new DeleteTempPreviewFileHandler(),
                new ExitHandler()
            });

            var service = new DfmHttpServer(handler, "localhost", args.Length > 0 ? args[0] : null);

            service.Start();
            service.WaitForExit();
        }
Beispiel #3
0
        private static void HandleRequest(Options options)
        {
            var handler = new CompositeHandler(
                new List <IHttpHandler>
            {
                new TestServerAvailableHandler(),
                new DfmPreviewHandler(options.WorkspacePath, options.IsDfmLatest),
                new DfmTokenTreeHandler(options.WorkspacePath),
                new DeleteTempPreviewFileHandler(),
                new ExitHandler()
            });

            var service = new DfmHttpServer(handler, "localhost", options.Port);

            service.Start();
            service.WaitForExit();
        }