ServiceProviderHelper.AddService Method (Type, Object)
Adds the specified service type 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, _
serviceInstance As Object _
)
'Usage
Dim instance As ServiceProviderHelper
Dim serviceType As Type
Dim serviceInstance As Object
instance.AddService(serviceType, serviceInstance)
public void AddService(
Type serviceType,
Object serviceInstance
)
public:
virtual void AddService(
Type^ serviceType,
Object^ serviceInstance
) sealed
public final function AddService(
serviceType : Type,
serviceInstance : Object
)
abstract AddService :
serviceType:Type *
serviceInstance:Object -> unit
override AddService :
serviceType:Type *
serviceInstance:Object -> unit
Parameters
- serviceType
Type: System.Type
The type of service to add
- serviceInstance
Type: System.Object
An instance of the service type to add
Implements
IServiceContainer.AddService(Type, Object)
.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.