Duration (Pacific Standard Time):
To (Pacific Standard Time):
Impact:
  • None
User Action:
  • None
Visual Studio SDK

DocumentTask Class

Represents an item for a language service in the Error List Options window.

This class is not CLS-compliant.  

Namespace: Microsoft.VisualStudio.Package
Assembly: Microsoft.VisualStudio.Package.LanguageService (in microsoft.visualstudio.package.languageservice.dll)

<CLSCompliantAttribute(False)> _
<ComVisibleAttribute(True)> _
Public Class DocumentTask
	Inherits ErrorTask
	Implements IVsTextMarkerClient, IDisposable
Dim instance As DocumentTask

J#
/** @attribute CLSCompliantAttribute(false) */ 
/** @attribute ComVisibleAttribute(true) */ 
public class DocumentTask extends ErrorTask implements IVsTextMarkerClient, IDisposable

This class is a specialized version of the ErrorTask class and represents an item that reports a problem in parsing the current source file. In addition, it supports the functionality of jumping to the line that caused the error. This class overrides the ErrorTask and Task base classes and creates an IVsTextLineMarker object that manages a span within a buffer and provides custom navigation to the source of the error.

Notes to Implementers This class contains all the functionality needed to manage an item in the Error List Options window. You can derive from this class to change marker command behaviors. Beyond this, there is no need to derive from this class.

Notes to Callers An instance of this class is created in the CreateErrorTaskItem method in the Source class. The Source class uses the DocumentTask class to show all warnings and errors produced by the language service parser. Typically, the Source class handles all instances of the DocumentTask class internally.

System.Object
   Microsoft.VisualStudio.Shell.Task
     Microsoft.VisualStudio.Shell.ErrorTask
      Microsoft.VisualStudio.Package.DocumentTask
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.