本文整理汇总了C#中Microsoft.Build.Framework.ProjectStartedEventArgs.ToPropertyValues方法的典型用法代码示例。如果您正苦于以下问题:C# ProjectStartedEventArgs.ToPropertyValues方法的具体用法?C# ProjectStartedEventArgs.ToPropertyValues怎么用?C# ProjectStartedEventArgs.ToPropertyValues使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Microsoft.Build.Framework.ProjectStartedEventArgs
的用法示例。
在下文中一共展示了ProjectStartedEventArgs.ToPropertyValues方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ProjectStarted
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());
}
}
示例2: ProjectStarted
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" }));
}
}