public static string GenerateSolutionReadMe(SnippetDirectory[] snippetDirectories, GeneralSettings settings) { using (var sw = new StringWriter()) { sw.WriteLine("## Snippetica"); sw.WriteLine(); sw.WriteLine($"* {settings.GetProjectSubtitle(snippetDirectories)}"); sw.WriteLine($"* [Release Notes]({settings.GitHubMasterPath}/{$"{settings.ChangeLogFileName}"})."); sw.WriteLine("* [Browse and Search All Snippets](http://pihrt.net/Snippetica/Snippets)."); sw.WriteLine(); sw.WriteLine("### Distribution"); sw.WriteLine(); sw.WriteLine("* **Snippetica** is distributed as [Visual Studio Extension](http://visualstudiogallery.msdn.microsoft.com/a5576f35-9f87-4c9c-8f1f-059421a23aed)."); sw.WriteLine(); sw.WriteLine("### Snippets"); sw.WriteLine(); sw.WriteLine("Folder|Count| |"); sw.WriteLine("--- | --- | ---:"); foreach (SnippetDirectory snippetDirectory in snippetDirectories) { Snippet[] snippets = snippetDirectory.EnumerateSnippets().ToArray(); sw.WriteLine($"[{snippetDirectory.DirectoryName}]({settings.GitHubExtensionProjectPath}/{snippetDirectory.DirectoryName}/{settings.ReadMeFileName})|{snippets.Length}|[full list](http://pihrt.net/Snippetica/Snippets?Language={snippetDirectory.Language})"); } return(sw.ToString()); } }
public static string GenerateSolutionReadMe(SnippetDirectory[] snippetDirectories, GeneralSettings settings) { using (var sw = new StringWriter()) { sw.WriteLine("## Snippetica"); sw.WriteLine(); sw.WriteLine($"* {settings.GetProjectSubtitle(snippetDirectories)}"); sw.WriteLine($"* [Release Notes]({settings.GitHubMasterPath}/{"ChangeLog.md"})."); sw.WriteLine(); sw.WriteLine("### Distribution"); sw.WriteLine(); sw.WriteLine("* **Snippetica** is distributed as [Visual Studio Extension](http://visualstudiogallery.msdn.microsoft.com/a5576f35-9f87-4c9c-8f1f-059421a23aed)."); sw.WriteLine(); sw.WriteLine("### Folders"); sw.WriteLine(); foreach (SnippetDirectory snippetDirectory in snippetDirectories) { Snippet[] snippets = snippetDirectory.EnumerateSnippets().ToArray(); sw.WriteLine($"* [{snippetDirectory.DirectoryName}]({settings.GitHubExtensionProjectPath}/{snippetDirectory.DirectoryName}/{settings.ReadMeFileName}) ({snippets.Length} snippets)"); } return(sw.ToString()); } }