Beispiel #1
0
        //
        //

        public void Initialize(IAppHost appHost)
        {
            //_appConfig = ConfigLoader.LoadAppConfig().Result ?? new AppConfig();

            PruningMgr.Instance.LoadInstances(ConfigLoader.LoadSnapshotInstances().Result ?? new List <SnapshotInstance>());

            Tuple <IList <SnapshotRule>, string> ret = ConfigLoader.LoadLatestRules().Result;

            RuleMgr.Instance.LoadRules(ret.Item1 ?? new List <SnapshotRule>());
            LoadedRulesFileName = ret.Item2;
        }
Beispiel #2
0
        public void SaveRules(IEnumerable <SnapshotRule> rules)
        {
            string fileName = String.Format("rule_{0}.json", DateTime.Now.Ticks);

            ConfigLoader.SaveToFile(rules, fileName);
        }