次の方法で共有


IVsTextMarkerContextProvider.UpdateContextForMarker(UInt32, Object) Method

Definition

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

public:
 int UpdateContextForMarker(System::UInt32 dwReserved, System::Object ^ pUC);
public:
 int UpdateContextForMarker(unsigned int dwReserved, Platform::Object ^ pUC);
int UpdateContextForMarker(unsigned int dwReserved, winrt::Windows::Foundation::IInspectable const & pUC);
public int UpdateContextForMarker (uint dwReserved, object pUC);
abstract member UpdateContextForMarker : uint32 * obj -> int
Public Function UpdateContextForMarker (dwReserved As UInteger, pUC As Object) As Integer

Parameters

dwReserved
UInt32

Unused parameter. Must be set to null.

pUC
Object

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

Returns

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.

Applies to