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"); }
public List <FeedNode> GetFeeds() { if (_controller == null) { _controller = new FeedManageController(); Load(); } var root = _controller.Feeds; return(root?.subNodes ?? new List <FeedNode>()); }
public void Load() { if (_controller == null) { _controller = new FeedManageController(); } if (!_controller.ReadFromFile(_cfgFile)) { _SetDefaultFeeds(); Save(); } }