Share via


ServiceProvider Constructor (IServiceProvider)

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

This API is not CLS-compliant. 

Namespace:  Microsoft.VisualStudio.Data.Framework
Assembly:  Microsoft.VisualStudio.Data.Framework (in Microsoft.VisualStudio.Data.Framework.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 nulla 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.

.NET Framework Security

See Also

Reference

ServiceProvider Class

ServiceProvider Overload

Microsoft.VisualStudio.Data.Framework Namespace