Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
Adds the specified service to the collection of service objects or to the parent service container.
Namespace: Microsoft.VisualStudio.Data.Framework
Assembly: Microsoft.VisualStudio.Data.Framework (in Microsoft.VisualStudio.Data.Framework.dll)
Syntax
'Declaration
Public Overridable Sub AddService ( _
serviceType As Type, _
serviceInstance As Object, _
promote As Boolean _
)
public virtual void AddService(
Type serviceType,
Object serviceInstance,
bool promote
)
public:
virtual void AddService(
Type^ serviceType,
Object^ serviceInstance,
bool promote
)
abstract AddService :
serviceType:Type *
serviceInstance:Object *
promote:bool -> unit
override AddService :
serviceType:Type *
serviceInstance:Object *
promote:bool -> unit
public function AddService(
serviceType : Type,
serviceInstance : Object,
promote : boolean
)
Parameters
serviceType
Type: System.TypeThe type of the service to add.
serviceInstance
Type: System.ObjectThe service object to add.
promote
Type: System.BooleanA Boolean value indicating whether to add the service to the parent container.
Implements
IServiceContainer.AddService(Type, Object, 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.