Example #1
0
        private ILifestyleManager CreateProxyLifestyleManager(IComponentInfo info, ILifestyleManager lifestyleMgr)
        {
            if (info.ExtendedProperties.ContainsKey("proxy"))
            {
                lifestyleMgr = new ProxyLifestyleManager(lifestyleMgr);
            }

            return(lifestyleMgr);
        }
Example #2
0
        private ILifestyleManager CreateLifestyleManager(IComponentInfo info, IActivator activator)
        {
            var lifestyleMgr = LifestyleManagerRegistry.Create(info.Lifestyle);

            if (info.ExtendedProperties.ContainsKey("proxy"))
            {
                lifestyleMgr = new ProxyLifestyleManager(lifestyleMgr);
            }

            lifestyleMgr.Init(activator, this, info, Listner.OnPreDestroy, Listner.OnFetch);
            return(lifestyleMgr);
        }