ServiceProviderHelper.AddService Method (Type, ServiceCreatorCallback, Boolean)
Adds the specified service to the service container.
Namespace: Microsoft.VisualStudio.Data.Schema.Project.Common
Assembly: Microsoft.VisualStudio.Data.Schema.Project (in Microsoft.VisualStudio.Data.Schema.Project.dll)
Syntax
'Declaration
Public Sub AddService ( _
serviceType As Type, _
callback As ServiceCreatorCallback, _
promote As Boolean _
)
'Usage
Dim instance As ServiceProviderHelper
Dim serviceType As Type
Dim callback As ServiceCreatorCallback
Dim promote As Boolean
instance.AddService(serviceType, callback, _
promote)
public void AddService(
Type serviceType,
ServiceCreatorCallback callback,
bool promote
)
public:
virtual void AddService(
Type^ serviceType,
ServiceCreatorCallback^ callback,
bool promote
) sealed
public final function AddService(
serviceType : Type,
callback : ServiceCreatorCallback,
promote : boolean
)
abstract AddService :
serviceType:Type *
callback:ServiceCreatorCallback *
promote:bool -> unit
override AddService :
serviceType:Type *
callback:ServiceCreatorCallback *
promote:bool -> unit
Parameters
- serviceType
Type: System.Type
The type of service to add
- callback
Type: System.ComponentModel.Design.ServiceCreatorCallback
A callback object used to create the service
- promote
Type: System.Boolean
Specifies whether to promote this request to parent service containers
Implements
IServiceContainer.AddService(Type, ServiceCreatorCallback, Boolean)
.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.