-
Notifications
You must be signed in to change notification settings - Fork 35
M_CodeJam_Services_ServiceProviderHelper_GetService__1
Andrew Koryavchenko edited this page Jun 17, 2018
·
5 revisions
Gets the service object of the specified type.
Namespace: CodeJam.Services
Assembly: CodeJam.Blocks (in CodeJam.Blocks.dll) Version: 2.0.0.0
C#
public static T GetService<T>(
this IServiceProvider provider
)
VB
<ExtensionAttribute>
Public Shared Function GetService(Of T) (
provider As IServiceProvider
) As T
F#
[<ExtensionAttribute>]
static member GetService :
provider : IServiceProvider -> 'T
- provider
- Type: System.IServiceProvider
Instance of IServiceProvider.
- T
- An object that specifies the type of service object to get.
Type: T
A service object of type serviceType.
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).