ProjectPackage.TryGetService<TServiceObject, TServiceType> 方法

该类及其成员保留供内部使用,不应在代码中使用。

命名空间:  Microsoft.VisualStudio.Data.Schema.Package.Project.Internal
程序集:  Microsoft.VisualStudio.Data.Schema.Package(在 Microsoft.VisualStudio.Data.Schema.Package.dll 中)

语法

声明
Public Function TryGetService(Of TServiceObject, TServiceType) As TServiceType
public TServiceType TryGetService<TServiceObject, TServiceType>()
public:
generic<typename TServiceObject, typename TServiceType>
TServiceType TryGetService()
member TryGetService : unit -> 'TServiceType 
JScript 不支持泛型类型或方法。

类型参数

  • TServiceObject
  • TServiceType

返回值

类型:TServiceType
服务对象,如果未找到服务则为 null。

.NET Framework 安全性

请参见

参考

ProjectPackage 类

TryGetService 重载

Microsoft.VisualStudio.Data.Schema.Package.Project.Internal 命名空间