LanguageService.GetNameOfLocation 方法
返回包含给定位置中的元素的名称。
命名空间: Microsoft.VisualStudio.Package
程序集: Microsoft.VisualStudio.Package.LanguageService.9.0(在 Microsoft.VisualStudio.Package.LanguageService.9.0.dll 中)
Microsoft.VisualStudio.Package.LanguageService.10.0(在 Microsoft.VisualStudio.Package.LanguageService.10.0.dll 中)
Microsoft.VisualStudio.Package.LanguageService.11.0(在 Microsoft.VisualStudio.Package.LanguageService.11.0.dll 中)
Microsoft.VisualStudio.Package.LanguageService(在 Microsoft.VisualStudio.Package.LanguageService.dll 中)
语法
声明
Public Overridable Function GetNameOfLocation ( _
buffer As IVsTextBuffer, _
line As Integer, _
col As Integer, _
<OutAttribute> ByRef name As String, _
<OutAttribute> ByRef lineOffset As Integer _
) As Integer
public virtual int GetNameOfLocation(
IVsTextBuffer buffer,
int line,
int col,
out string name,
out int lineOffset
)
参数
- buffer
类型:Microsoft.VisualStudio.TextManager.Interop.IVsTextBuffer
[in] 保留源文件的 IVsTextBuffer 。
- line
类型:System.Int32
[in] 缓冲区中的所需行。
- col
类型:System.Int32
[in] 在行所需的偏移量缓冲区。
- name
类型:System.String%
[out] 包含的元素的名称。
- lineOffset
类型:System.Int32%
[out] 偏移量开始中的元素对特定行。
返回值
类型:System.Int32
如果成功,则返回; S_OK否则,返回 S_FALSE ,如果此位置不在命名实体或返回错误代码。
实现
IVsLanguageDebugInfo.GetNameOfLocation(IVsTextBuffer, Int32, Int32, String%, Int32%)
备注
一个包含的元素通常是方法、类或命名空间。
该基方法返回该名称的 null 值和 0 行偏移量。
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。