mirror of
https://github.com/greenshot/greenshot
synced 2025-08-14 10:47:02 -07:00
Introduced a very simple "singleton" service-locator, which allowed for a removal of specific implementations which were very limited. With this it's easier to access dependencies.
This commit is contained in:
parent
3ebdf3d2fe
commit
80d8f51fc5
53 changed files with 744 additions and 1230 deletions
14
GreenshotPlugin/Interfaces/IServiceLocator.cs
Normal file
14
GreenshotPlugin/Interfaces/IServiceLocator.cs
Normal file
|
@ -0,0 +1,14 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace GreenshotPlugin.Interfaces
|
||||
{
|
||||
public interface IServiceLocator
|
||||
{
|
||||
IEnumerable<TService> GetAllInstances<TService>();
|
||||
TService GetInstance<TService>();
|
||||
|
||||
void AddService<TService>(params TService[] services);
|
||||
|
||||
void AddService<TService>(IEnumerable<TService> services);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue