Namespace: Microsoft.VisualStudio.Shell
Assembly: Microsoft.VisualStudio.Shell (in Microsoft.VisualStudio.Shell.dll)
Syntax
'宣言
Private Sub AddService ( _
serviceType As Type, _
serviceInstance As Object, _
promote As Boolean _
) Implements IServiceContainer.AddService
'使用
Dim instance As Package
Dim serviceType As Type
Dim serviceInstance As Object
Dim promote As Boolean
CType(instance, IServiceContainer).AddService(serviceType, _
serviceInstance, promote)
void IServiceContainer.AddService(
Type serviceType,
Object serviceInstance,
bool promote
)
private:
virtual void AddService(
Type^ serviceType,
Object^ serviceInstance,
bool promote
) sealed = IServiceContainer::AddService
JScript does not support explicit interface implementations.
Parameters
- serviceType
Type: System.Type
- serviceInstance
Type: System.Object
- promote
Type: System.Boolean
Implements
IServiceContainer.AddService(Type, Object, Boolean)
Permissions
- 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.