确定特定类型是否为外接用途有效。此方法,则位置。若要指定源文档展开会出现,应重写。
命名空间: Microsoft.VisualStudio.Package
程序集: Microsoft.VisualStudio.Package.LanguageService.10.0(在 Microsoft.VisualStudio.Package.LanguageService.10.0.dll 中)
Microsoft.VisualStudio.Package.LanguageService(在 Microsoft.VisualStudio.Package.LanguageService.dll 中)
Microsoft.VisualStudio.Package.LanguageService.9.0(在 Microsoft.VisualStudio.Package.LanguageService.9.0.dll 中)
Microsoft.VisualStudio.Package.LanguageService.11.0(在 Microsoft.VisualStudio.Package.LanguageService.11.0.dll 中)
语法
声明
Public Overridable Function IsValidType ( _
buffer As IVsTextLines, _
ts As TextSpan(), _
rgTypes As String(), _
iCountTypes As Integer, _
<OutAttribute> ByRef fIsValid As Integer _
) As Integer
public virtual int IsValidType(
IVsTextLines buffer,
TextSpan[] ts,
string[] rgTypes,
int iCountTypes,
out int fIsValid
)
参数
- ts
类型:array<Microsoft.VisualStudio.TextManager.Interop.TextSpan[]
TextSpan 对象的数组。
- rgTypes
类型:array<System.String[]
数组扩展类型。
- iCountTypes
类型:System.Int32
扩展的数字输入 rgTypes 数组。
- fIsValid
类型:System.Int32%
[out] 返回 true,如果类型是有效的,否则 false。
返回值
类型:System.Int32
当重写在派生类, S_OK ,如果方法成功,否则错误代码。
实现
IVsExpansionClient.IsValidType(IVsTextLines, array<TextSpan[], array<String[], Int32, Int32%)
备注
默认情况下此方法检查只缓冲区将与 SourceIVsTextLines ;它将引发 ArgumentException ,如果没有。实现必须重写此方法,如果他们希望指定在文档的特定扩展是在可以执行。
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。