在基本缩进级别和缩进设置提供信息。
命名空间: Microsoft.VisualStudio.TextManager.Interop
程序集: Microsoft.VisualStudio.TextManager.Interop.8.0(在 Microsoft.VisualStudio.TextManager.Interop.8.0.dll 中)
语法
声明
Function GetLineIndent ( _
lLineNumber As Integer, _
<OutAttribute> ByRef pbstrIndentString As String, _
<OutAttribute> ByRef plParentIndentLevel As Integer, _
<OutAttribute> ByRef plIndentSize As Integer, _
<OutAttribute> ByRef pfTabs As Integer, _
<OutAttribute> ByRef plTabSize As Integer _
) As Integer
int GetLineIndent(
int lLineNumber,
out string pbstrIndentString,
out int plParentIndentLevel,
out int plIndentSize,
out int pfTabs,
out int plTabSize
)
int GetLineIndent(
[InAttribute] int lLineNumber,
[OutAttribute] String^% pbstrIndentString,
[OutAttribute] int% plParentIndentLevel,
[OutAttribute] int% plIndentSize,
[OutAttribute] int% pfTabs,
[OutAttribute] int% plTabSize
)
abstract GetLineIndent :
lLineNumber:int *
pbstrIndentString:string byref *
plParentIndentLevel:int byref *
plIndentSize:int byref *
pfTabs:int byref *
plTabSize:int byref -> int
function GetLineIndent(
lLineNumber : int,
pbstrIndentString : String,
plParentIndentLevel : int,
plIndentSize : int,
pfTabs : int,
plTabSize : int
) : int
参数
lLineNumber
类型:Int32[in] 相关文本行的行号。 这是在辅助缓冲区 (即它的行号通常是相对于第一行代码)。
pbstrIndentString
类型:String%[out] 返回准确的缩进字符串。 该字符串将在重新设置格式并表示缩进的基本级别的每行的开头插入。 有关更多信息,请参见备注。
plParentIndentLevel
类型:Int32%[out] 返回空间中的缩进级别。 此值,如果 pbstrIndentString 参数返回一个非空字符串,则应忽略。
plIndentSize
类型:Int32%[out] 缩进的大小。
pfTabs
类型:Int32%[out] 返回非零 (TRUE),如果选项是为行缩进使用;否则,返回零 (0)FALSE),使用空格。
plTabSize
类型:Int32%[out] 选项缩进的如果有大小,。 如果 pfTabs 参数返回零 (FALSE),此值为未指定的。
返回值
类型:Int32
如果成功,则返回; S_OK否则,返回错误代码。
备注
COM 签名
从 singlefileeditor.idl:
HRESULT GetLineIndent(
[in] long lLineNumber,
[out] BSTR* pbstrIndentString,
[out] long* plParentIndentLevel,
[out] long* plIndentSize,
[out] BOOL* pfTabs,
[out] long* plTabSize
);
此方法由执行任何重新设置了一个包含调用的语言必须了解的位置缩进级别。 基本缩进级别是包含的缩进级别 (父) 块:
<html>
<script language="vb" runat="server">
Sub TestSub()
Dim x as String
End Sub
</script>
</html>
在此示例中,基本缩进是 <script> 标记的缩进,两个空格示。
如果编辑器决定从源派生缩进, pbstrIndentString 参数提供的确切缩进字符串 (在上述示例中,则会包含两个空格) 的字符串 plParentIndentLevel 参数然后没有意义,并且应忽略。 如果编辑器无法从源派生缩进,编辑器返回在 pbstrIndentString 参数的空字符串。 在这种情况下,这种包含的语言。 plParentIndentLevel 参数应使用值。
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关详细信息,请参阅通过部分受信任的代码使用库。