IVsTextMarkerContextProvider.UpdateContextForMarker(UInt32, Object) 方法

定义

由语言服务调用,以指示应将文本标记的上下文添加到上下文包。

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

参数

dwReserved
UInt32

未使用的参数。 必须设置为 null。

pUC
Object

指向 Visual Studio 核心编辑器上上下文包的指针。

返回

Int32

如果该方法成功,则它会返回 S_OK。 如果该方法失败,则会返回错误代码。

注解

COM 签名

从 textmgr:

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

核心文本编辑器在 IVsTextMarkerContextProvider.UpdateContextForMarker 更新其他上下文时调用。 TextMarker 对象应实现此方法,并将关键字和/或特性添加到特定于文本标记的给定上下文包中 (可能是弯曲) 。

如果标记具有 MV_CONTEXT_CONTRIBUTION_FOR_BODY 样式集,则其客户端将 QueryInterfaced 针对此接口。

适用于