Month: April 2022

Project – ServiceLocator – Dependency Injection

The best way to avoid something is to know about it, so let’s see how to implement the Service Locator pattern using IServiceProvider to find a dependency.The service we want to use is an implementation of IMyService. Let’s start with the interface: namespace ServiceLocator;public interface IMyService : IDisposable{    void Execute();} The interface inherits from the […]



         


          Terms of Use | Accessibility Privacy