本文整理匯總了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;
}