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