namespace DanieleMarotta.RiversongCodeShowcase { public static class ServiceLocatorExtensions { public static void RegisterService(this IServiceLocator serviceLocator, T service) { serviceLocator.RegisterService(typeof(T), service); } public static T GetService(this IServiceLocator serviceLocator) { return (T)serviceLocator.GetService(typeof(T)); } } }