Exemple #1
0
        public TheaCompiler()
        {
            var currentPath = Directory.GetCurrentDirectory();

            _outputPath = Path.Combine(currentPath, "output");
            _inputPath = Path.Combine(currentPath, "data");
            _parser = new TheaParser {RootPath = _inputPath};
        }
Exemple #2
0
        private void Listen()
        {
            _parser = new TheaParser {RootPath = _rootDirectory};

            _listener = new HttpListener();
            _listener.Prefixes.Add("http://*:" + Port + "/");
            _listener.Start();
            while (true)
            {
                try
                {
                    HttpListenerContext context = _listener.GetContext();
                    Process(context);
                }
                catch (Exception ex)
                {

                }
            }
        }