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)


Public Sub AddService ( _
    serviceType As Type, _
    callback As ServiceCreatorCallback, _
    promote As Boolean _
Dim instance As ServiceProviderHelper
Dim serviceType As Type
Dim callback As ServiceCreatorCallback
Dim promote As Boolean

instance.AddService(serviceType, callback, _
public void AddService(
    Type serviceType,
    ServiceCreatorCallback callback,
    bool promote
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 


  • serviceType
    Type: System.Type
    The type of service to add
  • promote
    Type: System.Boolean
    Specifies whether to promote this request to parent service containers


IServiceContainer.AddService(Type, ServiceCreatorCallback, Boolean)

.NET Framework Security

See Also


ServiceProviderHelper Class

ServiceProviderHelper Members

AddService Overload

Microsoft.VisualStudio.Data.Schema.Project.Common Namespace