public static void Main(string[] args) { SalamanderConfig cfg = new SalamanderConfig(); cfg.ReadConfig(XmlReader.Create("salamander.config")); Utility.multiMarkdownPath = cfg.MultiMarkdownPath; FileManager fmgr = new FileManager(); _posts = fmgr.LoadPostsFromDisk(cfg.PostsDir); foreach (Post p in _posts) { Console.WriteLine(p.Title); } }
public bool ReadConfig(XmlReader reader) { SalamanderConfig cfg = (SalamanderConfig)xmlSer.Deserialize(reader); this.AuthorName = cfg.AuthorName; this.AuthorURL = cfg.AuthorURL; this.BaseURL = cfg.BaseURL; this.CopyrightNotice = cfg.CopyrightNotice; this.FeedType = cfg.FeedType; this.LastRunTime = cfg.LastRunTime; this.MultiMarkdownPath = cfg.MultiMarkdownPath; this.PostsInFeed = cfg.PostsInFeed; this.PostsPerPage = cfg.PostsPerPage; this.Subtitle = cfg.Subtitle; this.Title = cfg.Title; this.DraftsDir = cfg.DraftsDir; this.PostsDir = cfg.PostsDir; this.PagesDir = cfg.PagesDir; this.TemplatesDir = cfg.TemplatesDir; this.OutputDir = cfg.OutputDir; reader.Close(); return(true); }