示例#1
0
文件: Program.cs 项目: xxy1991/cozy
 static void Main(string[] args)
 {
     FeedManageController c = new FeedManageController();
     c.AddCategory("c1");
     c.AddCategory("c2");
     c.AddFeed("f1", "hehe");
     c.SaveToFile("c:\\cozy_test.json");
 }
示例#2
0
        static void Main(string[] args)
        {
            FeedManageController c = new FeedManageController();

            c.AddCategory("c1");
            c.AddCategory("c2");
            c.AddFeed("f1", "hehe");
            c.SaveToFile("c:\\cozy_test.json");
        }
示例#3
0
        public List <FeedNode> GetFeeds()
        {
            if (_controller == null)
            {
                _controller = new FeedManageController();
                Load();
            }
            var root = _controller.Feeds;

            return(root?.subNodes ?? new List <FeedNode>());
        }
示例#4
0
 public void Load()
 {
     if (_controller == null)
     {
         _controller = new FeedManageController();
     }
     if (!_controller.ReadFromFile(_cfgFile))
     {
         _SetDefaultFeeds();
         Save();
     }
 }