LanguageService.BeginInvoke 方法
调用在另一个线程的方法。
命名空间: 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 中)
语法
声明
<HostProtectionAttribute(SecurityAction.LinkDemand, Synchronization := True, _
ExternalThreading := True)> _
Public Function BeginInvoke ( _
method As Delegate, _
args As Object() _
) As IAsyncResult
[HostProtectionAttribute(SecurityAction.LinkDemand, Synchronization = true,
ExternalThreading = true)]
public IAsyncResult BeginInvoke(
Delegate method,
Object[] args
)
参数
- method
类型:System.Delegate
[in] 调用的方法。
- args
类型:array<System.Object[]
[in] 对调用的方法的参数。
返回值
类型:System.IAsyncResult
如果成功,则返回 IAsyncResult 对象;否则,因此,如果调用操作失败,则返回 null 值。
实现
ISynchronizeInvoke.BeginInvoke(Delegate, array<Object[])
备注
此方法用于启动后台分析操作。
备注
应用到此类型或成员的 HostProtectionAttribute 特性具有以下 Resources 属性值:Synchronization | ExternalThreading。HostProtectionAttribute 不影响桌面应用程序(通常通过双击图标、键入命令或在浏览器中输入 URL 来启动这些应用程序)。有关更多信息,请参见 HostProtectionAttribute 类或 SQL Server 编程和宿主保护特性。
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。