예제 #1
0
        public MeidoComm(MeidoConfig conf, LogFactory factory, Logger meidoLog)
        {
            ConfDir = conf.ConfigurationDirectory;
            DataDir = conf.DataDirectory;

            logFac = factory;
            Log    = meidoLog;

            watcher   = new WatchConfig(ConfDir, Log);
            userAuths = new UserAuthManager("Auth.xml", watcher, logFac.CreateLogger("Auth"));
        }
예제 #2
0
        public UserAuthManager(string filename, WatchConfig watcher, Logger log)
        {
            this.log = log;
            // Setting up configuration.
            var xmlConf = new XmlConfig2 <AuthDictionary>(
                AuthDictionary.DefaultConfig(),
                (xml) => new AuthDictionary(xml),
                log,
                Configure
                );

            watcher.LoadAndWatch(filename, xmlConf.LoadConfig);
        }