Esempio n. 1
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="securityProcessor"></param>
 /// <param name="upgradeIdProvider"></param>
 public EntityXmlImporter(ISecurityProcessor securityProcessor, IUpgradeIdProvider upgradeIdProvider)
 {
     if (securityProcessor == null)
     {
         throw new ArgumentNullException(nameof(securityProcessor));
     }
     if (upgradeIdProvider == null)
     {
         throw new ArgumentNullException(nameof(upgradeIdProvider));
     }
     SecurityProcessor = securityProcessor;
     UpgradeIdProvider = upgradeIdProvider;
 }
Esempio n. 2
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="userRoleRepository"></param>
        public SecurityProcessor(IEntityRepository entityRepository, IEntityAccessControlService entityAccessControlService, IUserRoleRepository userRoleRepository, IUpgradeIdProvider upgradeIdProvider)
        {
            if (entityRepository == null)
            {
                throw new ArgumentNullException(nameof(entityRepository));
            }
            if (entityAccessControlService == null)
            {
                throw new ArgumentNullException(nameof(entityAccessControlService));
            }
            if (userRoleRepository == null)
            {
                throw new ArgumentNullException(nameof(userRoleRepository));
            }
            if (upgradeIdProvider == null)
            {
                throw new ArgumentNullException(nameof(upgradeIdProvider));
            }

            EntityRepository           = entityRepository;
            EntityAccessControlService = entityAccessControlService;
            UserRoleRepository         = userRoleRepository;
            UpgradeIdProvider          = upgradeIdProvider;
        }