本文整理汇总了C#中Microsoft.VisualStudio.Shell.ErrorTask.AddHierarchyItem方法的典型用法代码示例。如果您正苦于以下问题:C# ErrorTask.AddHierarchyItem方法的具体用法?C# ErrorTask.AddHierarchyItem怎么用?C# ErrorTask.AddHierarchyItem使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Microsoft.VisualStudio.Shell.ErrorTask
的用法示例。
在下文中一共展示了ErrorTask.AddHierarchyItem方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateTask
private ErrorTask CreateTask(CompilerError error, string message = null)
{
ErrorTask task = new ErrorTask()
{
Line = error.Line - 1,
Column = error.Column - 1,
ErrorCategory = Settings.LintResultLocation,
Category = TaskCategory.Html,
Document = error.FileName,
Priority = TaskPriority.Low,
Text = message ?? error.Message,
};
task.AddHierarchyItem();
task.Navigate += task_Navigate;
return task;
}
示例2: CreateTask
private ErrorTask CreateTask(string data, Result error)
{
ErrorTask task = new ErrorTask()
{
Line = error.line,
Column = error.character,
ErrorCategory = GetOutputLocation(),
Category = TaskCategory.Html,
Document = data,
Priority = TaskPriority.Low,
Text = GetErrorMessage(error),
};
task.AddHierarchyItem();
task.Navigate += task_Navigate;
return task;
}
示例3: CreateTask
private void CreateTask(CompilerError error)
{
ErrorTask task = new ErrorTask()
{
Line = error.Line,
Column = error.Column,
ErrorCategory = TaskErrorCategory.Error,
Category = TaskCategory.Html,
Document = error.FileName,
Priority = TaskPriority.Low,
Text = error.Message,
};
task.AddHierarchyItem();
task.Navigate += task_Navigate;
_provider.Tasks.Add(task);
}
示例4: CreateTask
private ErrorTask CreateTask(CompilerError error)
{
ErrorTask task = new ErrorTask()
{
Line = error.Line,
Column = error.Column,
ErrorCategory = GetOutputLocation(),
Category = TaskCategory.Html,
Document = error.FileName,
Priority = TaskPriority.Low,
Text = error.Message,
};
task.AddHierarchyItem();
task.Navigate += task_Navigate;
return task;
}