What structure uses `IServiceProvider`?

Is it IServiceProviderbasically just a universal interface for any IOC container or is it used for a specific structure? I am launching my lightweight IOC container with light weight and I want to know if it should be implemented. Are there any other interfaces I have to implement? I am not interested in either MEF or Unity. I used both options and they really do not work for my current project.

+5
source share
4 answers

IServiceProvider- this is an imported (or possibly closed) COM interface intended for use in private objects in the context of the object that you request for the Service. Here the term "Service" is used rather poorly, initially it meant any COM object that could be returned based on which GUID is specified.

IServiceProvider @MSDN (.NET link)
IServiceProviderImpl @MSDN class (C ++ ATL link)

.NET , , , , IServiceProvider. , , IoC/Dependency Injection, , .

IServiceProvider - IE. , Host . COM , , , .

WebBrowser ( 2) @MSDN

+4

, , . Framework. . WCF Data Services .

http://blogs.msdn.com/b/alexj/archive/2010/01/07/creating-a-data-service-provider-part-2-iserviceprovider-datasources.aspx

, - IoC. Unity Autofac , . , , :

public interface IContainer
{
    T Resolve<T>();
}

, IServiceProvider, .

, , "Injection of Dependency". Seemann . , .

https://www.amazon.com/Dependency-Injection-NET-Mark-Seemann/

+2

ASP.NET 5 IServiceProvider "", ASP.NET .
( Microsoft.Framework.Runtime.Common.DependencyInjection.ServiceProvider - IServiceProvider - .)

, IoC ASP.NET 5, . IoC , .

+1

All Articles