Partager via


ServiceProvider Constructor (IServiceProvider)

Class constructor for wrapping an unmanaged IServiceProvider interface that is accessible through the managed IServiceProvider interface.

This API is not CLS-compliant. 

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

Syntax

'Declaration
<CLSCompliantAttribute(False)> _
Public Sub New ( _
    serviceProvider As IServiceProvider _
)
[CLSCompliantAttribute(false)]
public ServiceProvider(
    IServiceProvider serviceProvider
)
[CLSCompliantAttribute(false)]
public:
ServiceProvider(
    IServiceProvider^ serviceProvider
)
[<CLSCompliantAttribute(false)>]
new : 
        serviceProvider:IServiceProvider -> ServiceProvider
public function ServiceProvider(
    serviceProvider : IServiceProvider
)

Parameters

Exceptions

Exception Condition
ArgumentNullException

The serviceProvider parameter is null.

Remarks

This constructor should be used when a managed object wants to access services exposed by an unmanaged IServiceProvider interface, yet would like to avoid the headache of calling the unmanaged COM interface directly.

.NET Framework Security

See Also

Reference

ServiceProvider Class

ServiceProvider Overload

Microsoft.VisualStudio.Data Namespace