RaiseSessionFactoryCreated() static private method

static private RaiseSessionFactoryCreated ( ISessionFactory sf, NHibernate cfg, string name ) : void
sf ISessionFactory
cfg NHibernate
name string
return void
        ///<summary>
        /// This method allows direct registration of Configuration
        ///</summary>
        public virtual void RegisterConfiguration(Configuration cfg, string name)
        {
            var sf       = cfg.BuildSessionFactory();
            var sfholder = new SfHolder(cfg, sf);

            foreach (var classMetadata in sf.GetAllClassMetadata())
            {
                var entitytype = classMetadata.Value.GetMappedClass(EntityMode.Poco);

                if (Type2SessFactory.ContainsKey(entitytype))
                {
                    throw new ActiveRecordException("Type has already been registered -> " + entitytype.FullName);
                }

                Type2SessFactory.Add(entitytype, sfholder);
            }
            AR.RaiseSessionFactoryCreated(sf, cfg, name);
        }