/*============================================================================*/
		/* Public Functions                                                           */
		/*============================================================================*/

		public void Extend (IContext context)
		{
			_injector = context.injector;

			_singletonFactory = new SingletonFactory (_injector);

			context.BeforeInitializing (BeforeInitializing);
			context.BeforeDestroying(BeforeDestroying);
		}
Exemplo n.º 2
0
        /*============================================================================*/
        /* Constructor                                                                */
        /*============================================================================*/

        public void SetFactory(SingletonFactory factory)
        {
            if (_factory != null)
            {
                _factory.AddedSingleton   -= OnAddedSingleton;
                _factory.RemovedSingleton -= OnRemovedSingleton;
            }

            _factory = factory;
        }
		/*============================================================================*/
		/* Constructor                                                                */
		/*============================================================================*/

		public void SetFactory(SingletonFactory factory)
		{
			if (_factory != null) 
			{
				_factory.AddedSingleton -= OnAddedSingleton;
				_factory.RemovedSingleton -= OnRemovedSingleton;
			}

			_factory = factory;
		}