ServiceProvider Constructor (IServiceProvider)

Wraps an unmanaged IServiceProvider interface that is accessible through the managed IServiceProvider interface.

Namespace:  Microsoft.VisualStudio.Data.Framework
Assembly:  Microsoft.VisualStudio.Data.Framework (in Microsoft.VisualStudio.Data.Framework.dll)

Syntax

'宣言
<CLSCompliantAttribute(False)> _
Public Sub New ( _
    serviceProvider As IServiceProvider _
)
'使用
Dim serviceProvider As IServiceProvider

Dim instance As New ServiceProvider(serviceProvider)
[CLSCompliantAttribute(false)]
public ServiceProvider(
    IServiceProvider serviceProvider
)
[CLSCompliantAttribute(false)]
public:
ServiceProvider(
    IServiceProvider^ serviceProvider
)
public function ServiceProvider(
    serviceProvider : IServiceProvider
)

Parameters

Exceptions

Exception Condition
ArgumentNullException

The serviceProvider parameter is a null reference (Nothing in Visual Basic).

Remarks

You should use this constructor when a managed object has to access services exposed by an unmanaged IServiceProvider interface but you want to avoid the difficulty of calling the unmanaged COM interface directly.

Permissions

See Also

Reference

ServiceProvider Class

ServiceProvider Members

ServiceProvider Overload

Microsoft.VisualStudio.Data.Framework Namespace