ActionContext.AddService Method (Type, ServiceCreatorCallback)
Adds the specified service to the service container. This class cannot be inherited.
Namespace: Microsoft.SqlServer.Management
Assembly: Microsoft.SqlServer.Management.SDK.SqlStudio (in Microsoft.SqlServer.Management.SDK.SqlStudio.dll)
Syntax
'Declaration
Public Sub AddService ( _
serviceType As Type, _
callback As ServiceCreatorCallback _
)
'Usage
Dim instance As ActionContext
Dim serviceType As Type
Dim callback As ServiceCreatorCallback
instance.AddService(serviceType, callback)
public void AddService(
Type serviceType,
ServiceCreatorCallback callback
)
public:
virtual void AddService(
Type^ serviceType,
ServiceCreatorCallback^ callback
) sealed
abstract AddService :
serviceType:Type *
callback:ServiceCreatorCallback -> unit
override AddService :
serviceType:Type *
callback:ServiceCreatorCallback -> unit
public final function AddService(
serviceType : Type,
callback : ServiceCreatorCallback
)
Parameters
- serviceType
Type: System.Type
The type of service to add.
- callback
Type: System.ComponentModel.Design.ServiceCreatorCallback
A callback object that is used to create the service. This allows a service to be declared as available, but delays the creation of the object until the service is requested.