SqlCeProviderFactory.IServiceProvider.GetService 方法
获取服务类型。
命名空间: System.Data.SqlServerCe
程序集: System.Data.SqlServerCe(在 System.Data.SqlServerCe.dll 中)
语法
声明
<SecurityCriticalAttribute> _
<SecurityTreatAsSafeAttribute> _
Private Function GetService ( _
serviceType As Type _
) As Object Implements IServiceProvider.GetService
用法
Dim instance As SqlCeProviderFactory
Dim serviceType As Type
Dim returnValue As Object
returnValue = CType(instance, IServiceProvider).GetService(serviceType)
[SecurityCriticalAttribute]
[SecurityTreatAsSafeAttribute]
Object IServiceProvider.GetService(
Type serviceType
)
[SecurityCriticalAttribute]
[SecurityTreatAsSafeAttribute]
private:
virtual Object^ GetService(
Type^ serviceType
) sealed = IServiceProvider::GetService
[<SecurityCriticalAttribute>]
[<SecurityTreatAsSafeAttribute>]
private abstract GetService :
serviceType:Type -> Object
[<SecurityCriticalAttribute>]
[<SecurityTreatAsSafeAttribute>]
private override GetService :
serviceType:Type -> Object
JScript 支持使用显式接口实现,但不支持声明新显式接口实现。
参数
- serviceType
类型:System.Type
服务类型。
返回值
类型:System.Object
返回 Object。
实现
IServiceProvider.GetService(Type)