获取 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>
参数
textView
类型:Microsoft.VisualStudio.Text.Editor.ITextView行中显示的文本视图。
line
类型:Microsoft.VisualStudio.Text.ITextSnapshotLine要为其计算缩进的行。
返回值
类型:Nullable<Int32>
合适缩进
备注
此服务使用 ISmartIndentProvider 对象确定如何执行缩进。
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关详细信息,请参阅通过部分受信任的代码使用库。