'Declaration
<ExtensionAttribute()> <CanBeNullAttribute()> Public Shared Function GetServiceByName( _ ByVal serviceProvider As IServiceProvider, _ ByVal serviceTypeName As String _ ) As Object
'Usage
Dim serviceProvider As IServiceProvider Dim serviceTypeName As String Dim value As Object value = IServiceProviderExtension.GetServiceByName(serviceProvider, serviceTypeName)
[Extension()] [CanBeNull()] public static object GetServiceByName( IServiceProvider serviceProvider, string serviceTypeName )
[Extension()] [CanBeNull()] public: static Object^ GetServiceByName( IServiceProvider^ serviceProvider, String^ serviceTypeName )
Parameters
- serviceProvider
- The service provider.
- serviceTypeName
- The name of the type of service object to get.
Return Value
A service object of type given by serviceTypeName.
-or-
-or-
null
if there is no service object of given type.