public AssociationsDao(IEntityWithIdDao <TEntity> entityWithIdDao, IEntityWithIdDao <TAssociatedEntity> associatedEntityWithIdDao) { _entityWithIdDao = entityWithIdDao; _associatedEntityWithIdDao = associatedEntityWithIdDao; (_firstType, _secondType) = Utilites.SortTypesByName(typeof(TEntity), typeof(TAssociatedEntity)); _isInverted = _firstType.FullName != typeof(TEntity).FullName; _storagePathAppSettingsKey = $@"{_firstType.Name}{_secondType.Name}AssociationsPath"; _defaultStoragePath = $@"Storage\{_firstType.Name}{_secondType.Name}AssociationsList.xml"; _storageFileInfo = new FileInfo(ConfigurationManager.AppSettings[_storagePathAppSettingsKey] ?? _defaultStoragePath); _xmlStorageRootName = $"{_firstType.Name}{_secondType.Name}AssociationsList"; CheckStorageExistence(); Subscribe(); }
public AuthManager(IEntityWithIdDao <AuthUserData> authUserDataDao, IEntityWithIdDao <User> userDao, IRolesManager rolesManager) { _authUserDataDao = authUserDataDao ?? throw new ArgumentNullException(nameof(authUserDataDao)); _userDao = userDao ?? throw new ArgumentNullException(nameof(userDao)); _rolesManager = rolesManager ?? throw new ArgumentNullException(nameof(rolesManager)); }
public RolesManager(IAssociationsDao <User, Role> userRoleAssociationsDao, IEntityWithIdDao <Role> rolesDao) { _userRoleAssociationsDao = userRoleAssociationsDao ?? throw new ArgumentNullException(nameof(userRoleAssociationsDao)); _rolesDao = rolesDao ?? throw new ArgumentNullException(nameof(rolesDao)); }
public AwardsManager(IEntityWithIdDao <Award> awardsDao, IAssociationsDao <Award, User> associationsDao) { _awardsDao = awardsDao ?? throw new ArgumentNullException(nameof(awardsDao)); _associationsDao = associationsDao ?? throw new ArgumentNullException(nameof(associationsDao)); }
public UsersManager(IEntityWithIdDao <User> usersDao, IAssociationsDao <User, Award> associationsDao) { _usersDao = usersDao ?? throw new ArgumentNullException(nameof(usersDao)); _associationsDao = associationsDao ?? throw new ArgumentNullException(nameof(associationsDao)); }