GetService(TServiceObject, TServiceType) Method
Get service object.
Namespace: Microsoft.VisualStudio.Data.Tools.Package.Project.Internal
Assembly: Microsoft.VisualStudio.Data.Tools.Package (in Microsoft.VisualStudio.Data.Tools.Package.dll)
Syntax
'Declaration
Public Function GetService(Of TServiceObject, TServiceType) As TServiceType
'Usage
Dim instance As ProjectPackage
Dim returnValue As TServiceType
returnValue = instance.GetService()
public TServiceType GetService<TServiceObject, TServiceType>()
public:
generic<typename TServiceObject, typename TServiceType>
TServiceType GetService()
member GetService : 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