DocumentTask Class
Represents an item for a language service in the Error List Options window.
This API is not CLS-compliant.
Namespace: Microsoft.VisualStudio.Package
Assemblies: Microsoft.VisualStudio.Package.LanguageService.10.0 (in Microsoft.VisualStudio.Package.LanguageService.10.0.dll)
Microsoft.VisualStudio.Package.LanguageService (in Microsoft.VisualStudio.Package.LanguageService.dll)
Microsoft.VisualStudio.Package.LanguageService.9.0 (in Microsoft.VisualStudio.Package.LanguageService.9.0.dll)
Syntax
'Declaration
<CLSCompliantAttribute(False)> _
<ComVisibleAttribute(True)> _
Public Class DocumentTask _
Inherits ErrorTask _
Implements IVsTextMarkerClient, IDisposable
'Usage
Dim instance As DocumentTask
[CLSCompliantAttribute(false)]
[ComVisibleAttribute(true)]
public class DocumentTask : ErrorTask,
IVsTextMarkerClient, IDisposable
[CLSCompliantAttribute(false)]
[ComVisibleAttribute(true)]
public ref class DocumentTask : public ErrorTask,
IVsTextMarkerClient, IDisposable
[<CLSCompliantAttribute(false)>]
[<ComVisibleAttribute(true)>]
type DocumentTask =
class
inherit ErrorTask
interface IVsTextMarkerClient
interface IDisposable
end
public class DocumentTask extends ErrorTask implements IVsTextMarkerClient, IDisposable
Remarks
This class is a specialized version of the ErrorTask class and represents an item that reports a problem in the parsing of 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 in a buffer and provides custom navigation to the source of the error.
Notes to Implementers
This class contains all the functionality that is required to manage an item in the Error List Options window. You can derive from this class to change marker command behaviors. Beyond this, you do not have to derive from this class.
Notes to Callers
An instance of this class is created in the CreateErrorTaskItem(IVsTextLineMarker, TextSpan, String) method in the Source class. The Source class uses the DocumentTask class to show all warnings and errors that are produced by the language service parser. Typically, the Source class handles all instances of the DocumentTask class internally.
Inheritance Hierarchy
System.Object
Microsoft.VisualStudio.Shell.Task
Microsoft.VisualStudio.Shell.ErrorTask
Microsoft.VisualStudio.Package.DocumentTask
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.