コード例 #1
0
		/*============================================================================*/
		/* Public Functions                                                           */
		/*============================================================================*/

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

			_singletonFactory = new SingletonFactory (_injector);

			context.BeforeInitializing (BeforeInitializing);
			context.BeforeDestroying(BeforeDestroying);
		}
コード例 #2
0
        /*============================================================================*/
        /* Constructor                                                                */
        /*============================================================================*/

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

            _factory = factory;
        }
コード例 #3
0
		/*============================================================================*/
		/* Constructor                                                                */
		/*============================================================================*/

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

			_factory = factory;
		}