| ApplicationServiceContextGetServiceT Method |
Helper extension method for getting strongly typed service
Namespace:
SanteDB.Core
Assembly:
SanteDB.Core.Api (in SanteDB.Core.Api.dll) Version: 3.0.481-alpha
Syntax public static T GetService<T>(
this IServiceProvider me
)
<ExtensionAttribute>
Public Shared Function GetService(Of T) (
me As IServiceProvider
) As T
public:
[ExtensionAttribute]
generic<typename T>
static T GetService(
IServiceProvider^ me
)
[<ExtensionAttribute>]
static member GetService :
me : IServiceProvider -> 'T
Parameters
- me
- Type: SystemIServiceProvider
The reference to the service provider
Type Parameters
- T
- The type of service to be retrieved
Return Value
Type:
TThe fetched / registered service implementation
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
IServiceProvider. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also