GetService(TServiceType) Method (Type)
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 TServiceType) ( _
serviceType As Type _
) As TServiceType
'Usage
Dim instance As ProjectPackage
Dim serviceType As Type
Dim returnValue As TServiceType
returnValue = instance.GetService(serviceType)
public TServiceType GetService<TServiceType>(
Type serviceType
)
public:
generic<typename TServiceType>
TServiceType GetService(
Type^ serviceType
)
member GetService :
serviceType:Type -> 'TServiceType
JScript does not support generic types and methods.
Type Parameters
- TServiceType
Return type of service.
Parameters
- serviceType
Type: System..::..Type
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