TryGetService(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 TryGetService(Of TServiceObject, TServiceType) As TServiceType
'Usage
Dim instance As ProjectPackage
Dim returnValue As TServiceType

returnValue = instance.TryGetService()
public TServiceType TryGetService<TServiceObject, TServiceType>()
public:
generic<typename TServiceObject, typename TServiceType>
TServiceType TryGetService()
member TryGetService : unit -> 'TServiceType 
JScript does not support generic types and methods.

Type Parameters

  • TServiceObject
    Type of service.
  • TServiceType
    Return type of service.

Return Value

Type: TServiceType

See Also

Reference

ProjectPackage Class

TryGetService Overload

Microsoft.VisualStudio.Data.Tools.Package.Project.Internal Namespace