private static void RegisterStandard() { var singleton = new Singleton(); Injector.SetResolver<ISingleton>(() => singleton); Injector.SetResolver<ITransient, Transient>(); Injector.SetResolver<ICombined, Combined>(); }
private void RegisterStandard() { ISingleton singleton = new Singleton(); this.container[typeof(ISingleton)] = () => singleton; this.container[typeof(ITransient)] = () => new Transient(); this.container[typeof(ICombined)] = () => new Combined(singleton, new Transient()); }
public ISingleton ProvideSingleton(Singleton singleton) { return singleton; }