ISmartIndentationService.GetDesiredIndentation 方法

获取 ITextSnapshotLine 的合适缩进显示在 ITextView

命名空间:  Microsoft.VisualStudio.Text.Editor
程序集:  Microsoft.VisualStudio.Text.UI(在 Microsoft.VisualStudio.Text.UI.dll 中)

语法

声明
Function GetDesiredIndentation ( _
    textView As ITextView, _
    line As ITextSnapshotLine _
) As Nullable(Of Integer)
Nullable<int> GetDesiredIndentation(
    ITextView textView,
    ITextSnapshotLine line
)
Nullable<int> GetDesiredIndentation(
    ITextView^ textView, 
    ITextSnapshotLine^ line
)
abstract GetDesiredIndentation : 
        textView:ITextView * 
        line:ITextSnapshotLine -> Nullable<int> 
function GetDesiredIndentation(
    textView : ITextView, 
    line : ITextSnapshotLine
) : Nullable<int>

参数

返回值

类型:Nullable<Int32>
合适缩进

备注

此服务使用 ISmartIndentProvider 对象确定如何执行缩进。

.NET Framework 安全性

请参阅

参考

ISmartIndentationService 接口

Microsoft.VisualStudio.Text.Editor 命名空间