//------------------------------------------------------------------------------ // // Copyright (c) Microsoft Corporation. All rights reserved. // //------------------------------------------------------------------------------ /* */ namespace System.ComponentModel.Design { using System; /// /// This interface provides a container for services. A service container /// is, by definition, a service provider. In addition to providing services /// it also provides a mechanism for adding and removing services. /// [System.Runtime.InteropServices.ComVisible(true)] public interface IServiceContainer : IServiceProvider { /// /// Adds the given service to the service container. /// void AddService(Type serviceType, object serviceInstance); /// /// Adds the given service to the service container. /// void AddService(Type serviceType, object serviceInstance, bool promote); /// /// Adds the given service to the service container. /// void AddService(Type serviceType, ServiceCreatorCallback callback); /// /// Adds the given service to the service container. /// void AddService(Type serviceType, ServiceCreatorCallback callback, bool promote); /// /// Removes the given service type from the service container. /// void RemoveService(Type serviceType); /// /// Removes the given service type from the service container. /// void RemoveService(Type serviceType, bool promote); } }