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
'Declaración
<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
- serviceProvider
Type: Microsoft.VisualStudio.OLE.Interop.IServiceProvider
An unmanaged IServiceProvider interface object to wrap.
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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.