Spring.Data.NHibernate.SessionFactoryUtils.InitDeferredClose C# (CSharp) 메소드

InitDeferredClose() 공개 정적인 메소드

Initialize deferred close for the current thread and the given SessionFactory. Sessions will not be actually closed on close calls then, but rather at a processDeferredClose call at a finishing point (like request completion).
public static InitDeferredClose ( ISessionFactory sessionFactory ) : void
sessionFactory ISessionFactory The session factory.
리턴 void
        public static void InitDeferredClose(ISessionFactory sessionFactory) 
        {
            AssertUtils.ArgumentNotNull(sessionFactory, "No SessionFactory specified");

            log.Debug("Initializing deferred close of Hibernate Sessions");

            IDictionary holderDictionary = LogicalThreadContext.GetData(DeferredCloseHolderDataSlotName) as IDictionary;
          
            if (holderDictionary == null) 
            {
                holderDictionary = new Hashtable();
                LogicalThreadContext.SetData(DeferredCloseHolderDataSlotName, holderDictionary);
            }
            holderDictionary.Add(sessionFactory, new ListSet());
        }