System.IServiceProvider

Defines a mechanism for retrieving a service object; that is, an object that provides custom support to other objects.

See Also: IServiceProvider

Syntax

public interface IServiceProvider

Remarks

This interface is implemented by a class or value type that provides a service to other objects.

The IServiceProvider.GetService(Type) method of this interface obtains the object that provides the service.

The IServiceProvider interface is implemented by a number of types, including HttpContext, LicenseContext, MarshalByValueComponent, and ServiceContainer.

Requirements

Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0

The members of System.IServiceProvider are listed below.

Public Methods

GetService(Type) : Object

Gets the service object of the specified type.