/*============================================================================*/ /* Public Functions */ /*============================================================================*/ public void Extend (IContext context) { _injector = context.injector; _singletonFactory = new SingletonFactory (_injector); context.BeforeInitializing (BeforeInitializing); context.BeforeDestroying(BeforeDestroying); }
/*============================================================================*/ /* Constructor */ /*============================================================================*/ public void SetFactory(SingletonFactory factory) { if (_factory != null) { _factory.AddedSingleton -= OnAddedSingleton; _factory.RemovedSingleton -= OnRemovedSingleton; } _factory = factory; }