次の方法で共有


Source.CreateErrorTaskItem Method

Creates an instance of a DocumentTask object representing a parsing error.

Overload List

  Name Description
Public method CreateErrorTaskItem(TextSpan, MARKERTYPE, String) Creates a new error task item for the Error List, for the supplied text, marker type, and file name.
Public method CreateErrorTaskItem(TextSpan, String, String, TaskPriority, TaskCategory, MARKERTYPE, TaskErrorCategory) Creates a new error task item for the Error List, for the supplied text, file name, message, priority, category, marker type, and error type.

Top

Remarks

These methods are typically called to create a new DocumentTask object to show an error in the Task window. Each method bundles a text marker, source file span, and source file name in a DocumentTask object then returns that object.

The DocumentTask object is used when a user double-clicks on the item in the error Task window; the source file is opened (if not already open) and the cursor is positioned at the specified span.

See Also

Reference

Source Class

Source Members

Microsoft.VisualStudio.Package Namespace