public static Splat.IMutableDependencyResolver RegisterLogger(this Splat.IMutableDependencyResolver services, Type type) { var genericReactiveLogger = typeof(ReactiveLogger <>).MakeGenericType(type); var genericLogger = typeof(ILogger <>).MakeGenericType(type); services.Register(() => Activator.CreateInstance(genericReactiveLogger), genericLogger); return(services); }
public static Splat.IMutableDependencyResolver RegisterLogger <TType>(this Splat.IMutableDependencyResolver services) { services.Register(() => new ReactiveLogger <TType>(), typeof(ILogger <TType>)); return(services); }