IVsLanguageLineIndent.GetIndentPosition 方法

确定了 “空间”在行的开头添加。

命名空间:  Microsoft.VisualStudio.TextManager.Interop
程序集:  Microsoft.VisualStudio.TextManager.Interop.8.0(在 Microsoft.VisualStudio.TextManager.Interop.8.0.dll 中)

语法

声明
Function GetIndentPosition ( _
    pBaseLayer As IVsTextLayer, _
    BaseBufferLineIndex As Integer, _
    <OutAttribute> ByRef pIndentPosition As Integer _
) As Integer
int GetIndentPosition(
    IVsTextLayer pBaseLayer,
    int BaseBufferLineIndex,
    out int pIndentPosition
)
int GetIndentPosition(
    [InAttribute] IVsTextLayer^ pBaseLayer, 
    [InAttribute] int BaseBufferLineIndex, 
    [OutAttribute] int% pIndentPosition
)
abstract GetIndentPosition : 
        pBaseLayer:IVsTextLayer * 
        BaseBufferLineIndex:int * 
        pIndentPosition:int byref -> int
function GetIndentPosition(
    pBaseLayer : IVsTextLayer, 
    BaseBufferLineIndex : int, 
    pIndentPosition : int
) : int

参数

  • BaseBufferLineIndex
    类型:Int32

    [in] 需要缩进的行索引。

  • pIndentPosition
    类型:Int32%

    [out] 返回空格数添加到行首。

返回值

类型:Int32
如果方法成功,则返回 S_OK。如果失败,它会返回一个错误代码。

备注

COM 签名

从 textmgr2.idl:

HRESULT IVsLanguageLineIndent::GetIndentPosition(
   [in] IVsTextLayer *pBaseLayer,
   [in]long BaseBufferLineIndex,
   [out] long *pIndentPosition
);

返回的缩进位置必须位于视图坐标,也就是说,列数从视图的左边缘的。

.NET Framework 安全性

请参阅

参考

IVsLanguageLineIndent 接口

Microsoft.VisualStudio.TextManager.Interop 命名空间