IVsTextMarkerContextProvider.UpdateContextForMarker Method

Called by the language service to indicate that the context for a text marker should be added to the context bag.

Namespace:  Microsoft.VisualStudio.TextManager.Interop
Assembly:  Microsoft.VisualStudio.TextManager.Interop (in Microsoft.VisualStudio.TextManager.Interop.dll)

Syntax

'宣言
Function UpdateContextForMarker ( _
    dwReserved As UInteger, _
    pUC As Object _
) As Integer
'使用
Dim instance As IVsTextMarkerContextProvider
Dim dwReserved As UInteger
Dim pUC As Object
Dim returnValue As Integer

returnValue = instance.UpdateContextForMarker(dwReserved, _
    pUC)
int UpdateContextForMarker(
    uint dwReserved,
    Object pUC
)
int UpdateContextForMarker(
    unsigned int dwReserved, 
    Object^ pUC
)
function UpdateContextForMarker(
    dwReserved : uint, 
    pUC : Object
) : int

Parameters

  • dwReserved
    Type: System.UInt32

    Unused parameter. Must be set to a null reference (Nothing in Visual Basic).

  • pUC
    Type: System.Object

    Pointer to the context bag on the Visual Studio core editor.

Return Value

Type: System.Int32

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

From textmgr.idl:

HRESULT IVsTextMarkerContextProvider::UpdateContextForMarker(
   DWORD dwReserved,
   IVsUserContext *pUC
);

The core text editor calls IVsTextMarkerContextProvider.UpdateContextForMarker at the same time that it updates other context. The TextMarker object should implement this method and add a keyword and/or attributes to the given context bag that is specific to the text marker (probably a squiggly).

If a marker has the MV_CONTEXT_CONTRIBUTION_FOR_BODY style set, its client will be QueryInterfaced for this interface.

Permissions

See Also

Reference

IVsTextMarkerContextProvider Interface

IVsTextMarkerContextProvider Members

Microsoft.VisualStudio.TextManager.Interop Namespace