You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 27, 2020. It is now read-only.
Mark Smith edited this page Sep 2, 2016
·
4 revisions
IDependencyService
The IDependencyService interface is a simple representation of a Service Locator.
Methods
Get<T> : returns a T object.
/// <summary>/// Interface to wrap a ServiceLocator/// </summary>publicinterfaceIDependencyService{/// <summary>/// Register a specific type as an abstraction/// </summary>/// <typeparam name="T">The class to register</typeparam>voidRegister<T>()whereT:class,new();/// <summary>/// Register a specific abstraction associated to a type./// </summary>/// <typeparam name="T">The abstraction</typeparam>/// <typeparam name="TImpl">The implementation</typeparam>voidRegister<T,TImpl>()whereT:classwhereTImpl:class,T,new();/// <summary>/// Retrieve a specific implementation from the locator./// </summary>/// <typeparam name="T">Type to look for</typeparam>TGet<T>()whereT:class;}