GetGlobalService(TServiceObject, TServiceType) Method
Get service from global service provider.
Namespace: Microsoft.VisualStudio.Data.Tools.Package.Project.Internal
Assembly: Microsoft.VisualStudio.Data.Tools.Package (in Microsoft.VisualStudio.Data.Tools.Package.dll)
Syntax
'Declaration
Public Shared Function GetGlobalService(Of TServiceObject, TServiceType) As TServiceType
'Usage
Dim returnValue As TServiceType
returnValue = ProjectPackage.GetGlobalService()
public static TServiceType GetGlobalService<TServiceObject, TServiceType>()
public:
generic<typename TServiceObject, typename TServiceType>
static TServiceType GetGlobalService()
static member GetGlobalService : unit -> 'TServiceType
JScript does not support generic types and methods.
Type Parameters
- TServiceObject
Service type.
- TServiceType
Return type of service.
Return Value
Type: TServiceType
Exceptions
| Exception | Condition |
|---|---|
| InvalidOperationException | Thrown if service not found. |
See Also
Reference
Microsoft.VisualStudio.Data.Tools.Package.Project.Internal Namespace