ServiceProviderExtensions.GetService<T> Method (IServiceProvider)
Retrieve a service of type T from the IServiceProvider.
Namespace: Microsoft.Owin.Hosting.Services
Assembly: Microsoft.Owin.Hosting (in Microsoft.Owin.Hosting.dll)
Syntax
public static T GetService<T>(
this IServiceProvider services
)
public:
generic<typename T>
[ExtensionAttribute]
static T GetService(
IServiceProvider^ services
)
static member GetService<'T> :
services:IServiceProvider -> 'T
<ExtensionAttribute>
Public Shared Function GetService(Of T) (
services As IServiceProvider
) As T
Parameters
- services
Type: System.IServiceProvider
Return Value
Type: T
Returns {0}.
Type Parameters
- T
See Also
ServiceProviderExtensions Class
Microsoft.Owin.Hosting.Services Namespace
Return to top