QuickOPC User's Guide and Reference
GetRequiredService0(IServiceProvider,Type) Method



OpcLabs.BaseLib Assembly > OpcLabs.BaseLib.Extensions Namespace > IServiceProviderExtension Class > GetRequiredService0 Method : GetRequiredService0(IServiceProvider,Type) Method
The service provider.
An object that specifies the type of service object to get.
Gets the required service object of the specified type.
Syntax
'Declaration
 
<ExtensionAttribute()>
<NotNullAttribute()>
Public Overloads Shared Function GetRequiredService0( _
   ByVal serviceProvider As IServiceProvider, _
   ByVal serviceType As Type _
) As Object
'Usage
 
Dim serviceProvider As IServiceProvider
Dim serviceType As Type
Dim value As Object
 
value = IServiceProviderExtension.GetRequiredService0(serviceProvider, serviceType)
[Extension()]
[NotNull()]
public static object GetRequiredService0( 
   IServiceProvider serviceProvider,
   Type serviceType
)
[Extension()]
[NotNull()]
public:
static Object^ GetRequiredService0( 
   IServiceProvider^ serviceProvider,
   Type^ serviceType
) 

Parameters

serviceProvider
The service provider.
serviceType
An object that specifies the type of service object to get.

Return Value

A service object of type serviceType.
Requirements

Target Platforms: .NET Framework: Windows 7 with SP1, Windows Server 2012; .NET Core: Linux, Microsoft Windows

See Also

Reference

IServiceProviderExtension Class
IServiceProviderExtension Members
Overload List