Mono Class Library: System NamespaceSystem.IServiceProvider |
See Also: IServiceProvider Members
|
This interface provides a mechanism to fetch instances to objects of a given Type from classes that implement this interface. For example the System.Web.HttpContext class implements this and allows fething a few fields that are not exposed by its properties.A typical implementation will look like this:
[Edit]
C# Example object IServiceProvider.GetService (Type service) { if (service == typeof (Something)) return something; if (service == typeof (DateTime)) return my_date_time; }
Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0