IServiceProvider Интерфейс
Определение
Определяет механизм для извлечения объекта службы, т. е. объекта, обеспечивающего настраиваемую поддержку для других объектов.Defines a mechanism for retrieving a service object; that is, an object that provides custom support to other objects.
public interface class IServiceProvider
public interface IServiceProvider
[System.Runtime.InteropServices.ComVisible(false)]
public interface IServiceProvider
type IServiceProvider = interface
[<System.Runtime.InteropServices.ComVisible(false)>]
type IServiceProvider = interface
Public Interface IServiceProvider
- Производный
- Атрибуты
Комментарии
Этот интерфейс реализуется с помощью класса или типа значения, который предоставляет службу другим объектам.This interface is implemented by a class or value type that provides a service to other objects.
GetServiceМетод этого интерфейса получает объект, предоставляющий службу.The GetService method of this interface obtains the object that provides the service.
IServiceProviderИнтерфейс реализуется с помощью нескольких типов, включая System.Web.HttpContext , System.ComponentModel.LicenseContext , System.ComponentModel.MarshalByValueComponent и System.ComponentModel.Design.ServiceContainer .The IServiceProvider interface is implemented by a number of types, including System.Web.HttpContext, System.ComponentModel.LicenseContext, System.ComponentModel.MarshalByValueComponent, and System.ComponentModel.Design.ServiceContainer.
Методы
GetService(Type) |
Возвращает объект службы указанного типа.Gets the service object of the specified type. |