Example #1
0
		public virtual void Initialize(Configuration cfg)
		{
			var classMappings = cfg.ClassMappings.ToList();
			var mstore = new MappingAuditableMetaDataStore(cfg);
			foreach (var classMapping in classMappings)
			{
				if(mstore.RegisterAuditableEntityIfNeeded(classMapping))
				{
					var entityName = classMapping.EntityName;
					var auditor = auditorsFactory.CreateAuditor(entityName, store.GetAuditableMetaData(entityName));
					auditor.Initialize(cfg);
					auditors[entityName] = auditor;
				}
			}
			Store = mstore;
		}
Example #2
0
        public virtual void Initialize(Configuration cfg)
        {
            var classMappings = cfg.ClassMappings.ToList();
            var mstore        = new MappingAuditableMetaDataStore(cfg);

            foreach (var classMapping in classMappings)
            {
                if (mstore.RegisterAuditableEntityIfNeeded(classMapping))
                {
                    var entityName = classMapping.EntityName;
                    var auditor    = auditorsFactory.CreateAuditor(entityName, store.GetAuditableMetaData(entityName));
                    auditor.Initialize(cfg);
                    auditors[entityName] = auditor;
                }
            }
            Store = mstore;
        }