Ejemplo n.º 1
0
        public void TestLoadConfig()
        {
            Server srv = new Server();
            Configurator conf = new Configurator("test_config.json", srv);
            conf.Load();

            Assert.AreEqual(this.srv["/node_1/node_2"].FullName, srv["/node_1/node_2"].FullName);
        }
Ejemplo n.º 2
0
        public void SetUp()
        {
            this.srv = new Server();

            this.srv["/"] = new Node("node_1");
            this.srv["/node_1"] = new Node("node_2");
            Configurator conf = new Configurator("test_config.json", this.srv);
            conf.Save();
        }
Ejemplo n.º 3
0
        public Galilei(string configPath)
        {
            srv = new Server();
            config = new Configurator(configPath, srv);

            builder = new TreeBuilder(srv);
            builder.ConfigChange += new TreeBuilder.ConfigChangeHandler(OnConfig);

            queueToSave = new Queue<Node>();

            listener = new HttpListener();
            workFlow = new Thread(new ThreadStart(WorkFlow));
        }
Ejemplo n.º 4
0
 public Configurator(string configPath, Server srv)
 {
     this.configPath = configPath;
     this.srv = srv;
 }