private IEnumerable <Page> FindPublishedPages([AllowNull, AllowEmpty] string relativeDirectory) { var directory = Path.Combine(PublishedDirectory.FullName, relativeDirectory); return(from file in System.IO.Directory.EnumerateFiles(directory, "*.md") let page = PageSerialization.TryDeserializeFromFile(file, PublishedDirectory, YamlMarkdown) where page != null select page); }
private Page GetPublishedPage(string relativeUri) { var file = Path.Combine(PublishedDirectory.FullName, relativeUri + ".md").ToDosSlashes(); return(PageSerialization.DeserializeFromFile(file, PublishedDirectory, YamlMarkdown)); }