Scripting Reference
List of all members | Public Member Functions
Sisus.Init.IServiceProvider Interface Reference


Represents a class responsible for providing service objects on request to any to any clients that need them.

A benefit of using IServiceProvider instead of a concrete class directly, is that it makes possible to create mock implementations of the interface for unit tests.

Additionally, it makes it easier to swap your service provider with another implementation at a later time.

A third benefit is that it makes your code less coupled with other classes, making it easier to do things such as port the code over to another project.

Inheritance diagram for Sisus.Init.IServiceProvider:

Public Member Functions

TDefiningClassOrInterface Get< TDefiningClassOrInterface > ()
 Returns shared instance of TDefiningClassOrInterface service. More...