void ProjectStarted(object sender, ProjectStartedEventArgs e) { AppendLine(string.Format("##Project Started:{0}", e.ProjectFile)); AppendLine(string.Format(@"_{0}_<br/>", e.Message.EscapeMarkdownCharacters())); AppendLine(string.Format("_{0}|targets=({1})|{2}_", e.Timestamp, e.TargetNames, e.ProjectFile)); if (IsVerbosityAtLeast(LoggerVerbosity.Detailed)) { AppendLine(e.ToPropertyValues().ToMarkdownTable().ToMarkdown()); } }
void ProjectStarted(object sender, ProjectStartedEventArgs e) { this._projectsStarted.Push(e); var sb = new StringBuilder(); sb.AppendFormat(@"<a name=""{0}""> </a>", this.GetLinkNameFor(e)); sb.AppendFormat("#####Project Started:{0}\r\n", e.ProjectFile); //AppendLine(); //AppendLine(string.Format("#####Project Started:{0}\r\n", e.ProjectFile).ToMarkdownRawMarkdown()); AppendLine(string.Format("_{0}_\r\n", e.Message.EscapeMarkdownCharacters()).ToMarkdownRawMarkdown()); AppendLine(string.Format("```{0} | targets=({1}) | {2}```\r\n", e.Timestamp, e.TargetNames, e.ProjectFile).ToMarkdownRawMarkdown()); if (IsVerbosityAtLeast(LoggerVerbosity.Detailed)) { AppendLine("######Global properties".ToMarkdownRawMarkdown()); AppendLine(e.GlobalProperties.ToMarkdownTable()); AppendLine("#######Initial properties".ToMarkdownRawMarkdown()); List<Tuple<string, string>> propsToDisplay = new List<Tuple<string, string>>(); foreach (DictionaryEntry p in e.Properties) { propsToDisplay.Add(new Tuple<string, string>(p.Key.ToString(), p.Value.ToString())); } AppendLine(propsToDisplay.ToMarkdownTable().WithHeaders(new string[] { "Name", "Value" })); } if (IsVerbosityAtLeast(LoggerVerbosity.Diagnostic)) { AppendLine(e.ToPropertyValues().ToMarkdownTable()); var itemsObj = from DictionaryEntry r in e.Items select new { Name = r.Key, Value = r.Value }; AppendLine(string.Format("###### Initial items").ToMarkdownRawMarkdown()); AppendLine(itemsObj.ToMarkdownTable().WithHeaders(new string[] { "Item name", "Path" })); } }