创建特定类型的标记在指定范围的。
命名空间: Microsoft.VisualStudio.TextManager.Interop
程序集: Microsoft.VisualStudio.TextManager.Interop(在 Microsoft.VisualStudio.TextManager.Interop.dll 中)
语法
声明
Function CreateLineMarker ( _
iMarkerType As Integer, _
iStartLine As Integer, _
iStartIndex As Integer, _
iEndLine As Integer, _
iEndIndex As Integer, _
pClient As IVsTextMarkerClient, _
<OutAttribute> ppMarker As IVsTextLineMarker() _
) As Integer
int CreateLineMarker(
int iMarkerType,
int iStartLine,
int iStartIndex,
int iEndLine,
int iEndIndex,
IVsTextMarkerClient pClient,
IVsTextLineMarker[] ppMarker
)
int CreateLineMarker(
[InAttribute] int iMarkerType,
[InAttribute] int iStartLine,
[InAttribute] int iStartIndex,
[InAttribute] int iEndLine,
[InAttribute] int iEndIndex,
[InAttribute] IVsTextMarkerClient^ pClient,
[OutAttribute] array<IVsTextLineMarker^>^ ppMarker
)
abstract CreateLineMarker :
iMarkerType:int *
iStartLine:int *
iStartIndex:int *
iEndLine:int *
iEndIndex:int *
pClient:IVsTextMarkerClient *
ppMarker:IVsTextLineMarker[] byref -> int
function CreateLineMarker(
iMarkerType : int,
iStartLine : int,
iStartIndex : int,
iEndLine : int,
iEndIndex : int,
pClient : IVsTextMarkerClient,
ppMarker : IVsTextLineMarker[]
) : int
参数
iMarkerType
类型:Int32[in] 创建的标记的类型。
iStartLine
类型:Int32[in] 启动行。
iStartIndex
类型:Int32[in] 行中的起始字符的索引。 必须小于或等于行的长度。
iEndLine
类型:Int32[in] 结束行。
iEndIndex
类型:Int32[in] 在行内结束字符索引。 必须小于或等于行的长度。
pClient
类型:Microsoft.VisualStudio.TextManager.Interop.IVsTextMarkerClient[in] 为 IVsTextMarkerClient 接口的指针。 实现此接口建议文本缓冲区要接收标记操作的通知。
ppMarker
类型:array<Microsoft.VisualStudio.TextManager.Interop.IVsTextLineMarker[][out] 为 IVsTextLineMarker 接口 (即文本标记) 的指针。 如果此参数是 nullnull 引用(在 Visual Basic 中为 Nothing),则标记由文本缓冲区拥有。 一个缓冲区拥有标记的示例是一个临时书签。
返回值
类型:Int32
如果方法成功,则返回 S_OK。如果失败,它会返回一个错误代码。
备注
COM 签名
从 textmgr.idl:
HRESULT IVsTextLines::CreateLineMarker(
[in] long iMarkerType,
[in] long iStartLine,
[in] CharIndex iStartIndex,
[in] long iEndLine,
[in] CharIndex iEndIndex,
[in] IVsTextMarkerClient * pClient,
[out] IVsTextLineMarker ** ppMarker
);
此方法创建在指定的区域的标记。 如果要侦听标记事件缓冲,请将指针上对 pClient 参数的 IVsTextMarkerClient 接口。
备注
使用 IVsTextLines.CreateLineMarker 创建的标记是 (可沿的标记。使用 CreateStreamMarker 创建面向流的标记。
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关详细信息,请参阅通过部分受信任的代码使用库。