public static bool Register(IProvider provider) { bool retval = false; if (provider != null) { object o = null; if (provider.GetItem(typeof(IUserDao), out o)) { _userDao = o as IUserDao; retval = true; } if (provider.GetItem(typeof(IQueueDao), out o)) { _queueDao = o as IQueueDao; retval = true; } if (!retval) { Trace.WriteLine("AdminRegistry.Register(" + provider + "): no daos found"); } } else { Trace.WriteLine("QuestionaireRegistry.Register(" + provider + "): provider was null"); } return retval; }
public SearchService(IUserDao userDao, ICuyahogaContextProvider cuyahogaContextProvider, ITextExtractor textExtractor, IContentItemService<IContentItem> contentItemService) { this._userDao = userDao; this._cuyahogaContextProvider = cuyahogaContextProvider; this._textExtractor = textExtractor; this._contentItemService = contentItemService; }
public UserRoleMgr(IUserRoleDao entityDao, ICriteriaMgr criteriaMgr, IRoleDao roleDao, IUserDao userDao) : base(entityDao) { this.criteriaMgr = criteriaMgr; this.roleDao = roleDao; this.userDao = userDao; }
public bool Validate(out string errorMessage, IUserDao userDao, string expectVerifyCode) { if (OrnamentContext.Configuration.ApplicationSetting.EnableVerifyCode) { if (string.IsNullOrEmpty(expectVerifyCode)) { errorMessage = Resources.error_expireVerifyCode; return false; } if (expectVerifyCode.ToLower() != VerifyCode.ToLower()) { errorMessage = Resources.error_notMatchVerifyCode; return false; } } User user = userDao.GetByLoginId(User); if (user == null) { errorMessage = MemberShip.Properties.Resources.error_LoginError; return false; } ValidateUserResult result = user.Security.ValidateUser(Password, out errorMessage); CultureInfo languae = OrnamentContext.MemberShip.CurrentLanguage(); if (languae != null && user.Language != null && user.Language.ToLower() != languae.Name.ToLower()) { OrnamentContext.MemberShip.SwitchLanguage(languae); } return result == ValidateUserResult.Success; }
/// <summary> /// Constructor. /// </summary> /// <param name="commonDao"></param> /// <param name="siteStructureDao"></param> /// <param name="userDao"></param> public CoreRepositoryAdapter(ICommonDao commonDao, ISiteStructureDao siteStructureDao, IUserDao userDao, INodeService nodeService, ISessionManager sessionManager) { this._commonDao = commonDao; this._siteStructureDao = siteStructureDao; this._userDao = userDao; this._nodeService = nodeService; this._sessionManager = sessionManager; }
public UserMgr(IUserDao entityDao, IUserPermissionMgr userPermissionMgr, IUserRoleMgr userRoleMgr, IRolePermissionMgr rolePermissionMgr, IHqlMgr hqlMgr) : base(entityDao) { this.userPermissionMgr = userPermissionMgr; this.userRoleMgr = userRoleMgr; this.rolePermissionMgr = rolePermissionMgr; this.hqlMgr = hqlMgr; }
public UserService(IDatabase db) { if (db is MYSQLDatabase) { udao = new UserDao(db); } else { throw new NotSupportedException("Database not supported"); } }
public UserService(IUserDao userDao, IApplicationState applicationState, IApplicationStateSetter applicationStateSetter, IDepartmentService departmentService) { _userDao = userDao; _applicationState = applicationState; _applicationStateSetter = applicationStateSetter; _departmentService = departmentService; }
/// <summary> /// Initializes a new instance of the <see cref="ViewerImpl"/> class. /// </summary> public ViewerImpl() { userDao = DalFactory.CreateUserDao(database); artistDao = DalFactory.CreateArtistDao(database); venueDao = DalFactory.CreateVenueDao(database); performanceDao = DalFactory.CreatePerformanceDao(database); categoryDao = DalFactory.CreateCategoryDao(database); }
void InsertDummyData(IUserDao dao) { CreateTestData(); foreach (var item in items) { dao.Insert(item); } }
public static void MyClassInitialize(TestContext testContext) { container = TestManager.ConfigureUnityContainer("unity"); UserService = container.Resolve<IUserService>(); CommentService = container.Resolve<ICommentService>(); commentDao = container.Resolve<ICommentDao>(); tagDao = container.Resolve<ITagDao>(); userDao = container.Resolve<IUserDao>(); }
public ManagerImpl() { database = DalFactory.CreateDatabase(); userDao = DalFactory.CreateUserDao(database); artistDao = DalFactory.CreateArtistDao(database); categoryDao = DalFactory.CreateCategoryDao(database); locationDao = DalFactory.CreateLocationDao(database); venueDao = DalFactory.CreateVenueDao(database); performanceDao = DalFactory.CreatePerformanceDao(database); }
public Commander(IDatabase database) { this.database = database; this.artistDao = DALFactory.CreateArtistDao(database); this.categoryDao = DALFactory.CreateCategoryDao(database); this.countryDao = DALFactory.CreateCountryDao(database); this.performanceDao = DALFactory.CreatePerformanceDao(database); this.userDao = DALFactory.CreateUserDao(database); this.venueDao = DALFactory.CreateVenueDao(database); }
public new void TestFixtureSetUp() { try { UserDao = DaoFactory.GetUserDao(); } catch (TypeInitializationException exception) { throw exception.InnerException; } }
public IAuthentication FromDao(IUserDao dao) { switch (dao.Authentication.Kind) { case UserAuthenticationKindDao.Local: return new BCryptAuthentication(dao.Authentication.PasswordHash); case UserAuthenticationKindDao.Google: return new GoogleIdentityAuthentication(dao.Authentication.GoogleIdentity); default: throw new ArgumentOutOfRangeException(); } }
public UserController() { try { UserDao = new UserDao(); } catch (TypeInitializationException exception) { Logger.Error(exception.InnerException); throw exception.InnerException; } }
public PlaylistController() { try { PlaylistDao = new PlaylistDao(); UserDao = new UserDao(); ShareCodeDao = new ShareCodeDao(); } catch (TypeInitializationException exception) { Logger.Error(exception.InnerException); throw exception.InnerException; } }
public bool ChangePassword(User user, IUserDao dao) { if (NewPassword != ConfirmPassword) { return false; } string message; if (user.Security.ValidateUser(CurrentPassword, out message) != ValidateUserResult.Success) { return false; } bool result = user.Security.ChangePassword(NewPassword, CurrentPassword); dao.SaveOrUpdate(user); return result; }
public UserLogic(IUserDao userDao) { _userDao = new UserDaoDB(); }
public UserBl() { this._dao = new UserDao(); }
public UserBC(IUserDao daoUser) { _daoUser = daoUser; }
public FollowsDao(IUserDao _user) { this.user = _user; }
public UserService(IUserDao dao, IMapper mapper) { this.dao = dao; this.mapper = mapper; }
public UserService(IUserDao userContext, IFollowService followContext) { this.userContext = userContext; this.followContext = followContext; }
public UserLogic(IUserDao userDao) { this._userDao = userDao; }
public UserInfoHandler(IUserDao userDao) { _userDao = userDao; }
public Persistence(IUserDao dao, ISlaveExecutor slaveExecutor) { _dao = dao ?? throw new ArgumentNullException(nameof(dao)); _slaveExecutor = slaveExecutor ?? throw new ArgumentNullException(nameof(slaveExecutor)); _slaveCommands = new List <ISlaveCommand>(); }
public UserController(IUserDao userDao) { this.userDao = userDao; }
/// <summary> /// Constructor. /// </summary> /// <param name="userDao"></param> public DefaultAuthenticationService(IUserDao userDao) { _userDao = userDao; }
public UserSession() { userDao = Dao.Factory.UserDao; LoginCommand = new RelayCommand <object>(ExecuteLogin); }
public UpgradeController(IUpgradeDao upgradeDao, IUserDao userDao) { this.upgradeDao = upgradeDao; this.userDao = userDao; }
public UserBL(IUserDao userDao) { _userDao = userDao; _encryption = new Encryption(); }
public UserLogic() { UserDao = new UserDaoDB(); UtoADao = new UtoADaoDB(); }
public RelationshipService(IRelationshipDao relationshipDao, IUserDao userDao) { this.relationshipDao = relationshipDao; this.userDao = userDao; }
public void TestCreateUser() { IUserDao userDao = (IUserDao)_daoManager[typeof(IUserDao)]; User newUser = new User(); newUser.Id = "joe_cool"; newUser.UserName = "******"; newUser.Password = "******"; newUser.EmailAddress = "*****@*****.**"; newUser.LastLogon = DateTime.Now; try { _daoManager.OpenConnection(); userDao.Create(newUser); } catch (Exception e) { // Ignore Console.WriteLine("TestCreateUser, error cause : " + e.Message); } finally { _daoManager.CloseConnection(); } DateTime stamp = DateTime.Now; User joeCool = null; try { // open another session to retrieve the just inserted user _daoManager.OpenConnection(); //The User object you get back is live! joeCool = userDao.Load("joe_cool"); Assert.IsNotNull(joeCool); Assert.AreEqual("Joseph Cool", joeCool.UserName); //Change its properties and it will get persisted to the database on Close. // set Joe Cool's Last Login property joeCool.LastLogon = stamp; } catch (Exception e) { // Ignore Console.WriteLine("TestCreateUser, error cause : " + e.Message); } finally { // flush the changes from the Session to the Database _daoManager.CloseConnection(); } _daoManager.OpenConnection(); //The User object you get back is live! joeCool = userDao.Load("joe_cool"); _daoManager.CloseConnection(); Assert.IsNotNull(joeCool); Assert.AreEqual("Joseph Cool", joeCool.UserName); Assert.AreEqual(stamp.ToString(), joeCool.LastLogon.ToString()); }
public UserLogic(IUserDao userDao) { _userDao = userDao; }
public UsersController(IUserDao dao, IConfiguration confirugation) { this._Dao = dao; this._Configuration = confirugation; }
public void MyTestInitialize() { uDao = DALFactory.CreateUserDao(database); }
public void Startup() { udao = new UserDao(db); udao.DeleteAllUsers(); }
// private UserModel userModel; public UserBus(IUserDao iUserDao) { _iUserDao = iUserDao; }
public UserEventHandler(IFileTempDao contextFactoryFileTmp, ICommandBus bus, IPersonDao personDao, IUserDao userDao, IContractDao contractDao) { this._FileTemp = contextFactoryFileTmp; this.bus = bus; this._personDao = personDao; this._userDao = userDao; this._contractDao = contractDao; }
public GetCountersCommand(ICounterDao counterDao, IUserDao userDao, TelegramBotClient client) { _userDao = userDao; _client = client; _counterDao = counterDao; }
/// <summary> /// Constructor. /// </summary> /// <param name="commonDao"></param> /// <param name="siteStructureDao"></param> /// <param name="userDao"></param> public CoreRepositoryAdapter(ICommonDao commonDao, ISiteStructureDao siteStructureDao, IUserDao userDao, INodeService nodeService, ISessionManager sessionManager) { this._commonDao = commonDao; this._siteStructureDao = siteStructureDao; this._userDao = userDao; this._nodeService = nodeService; this._sessionManager = sessionManager; }
public UserManager() { UserDao = DaoFactory.GetUserDao(); }
public UserService(IUserDao userDao) { _userDao = userDao ?? throw new ArgumentException(nameof(userDao)); }
public UserService() { userDao = StructureMapWapper.GetInstance <IUserDao>(); loginLogDao = StructureMapWapper.GetInstance <ILoginLogDao>(); }
public UserBC() { _daoUser = new UserDao(); }
public AuthController(IUserDao userDao, IUser user) { _userDao = userDao; _user = user; }
public ProjectService(IProjectsDao projects, INewsDao news, IUserDao user) { _projects = projects; _news = news; _user = user; }
public UserTaskService(IUserDao userDao) { _userDao = userDao; }
/// <summary> /// Constructor. /// </summary> /// <param name="userDao"></param> /// <param name="commonDao"></param> public DefaultUserService(IUserDao userDao, ICommonDao commonDao) { this._userDao = userDao; this._commonDao = commonDao; }
public UpdateResultController(IUserDao userDao, IStageResultDao stageResultDao) { this.stageResultDao = stageResultDao; this.userDao = userDao; }
/// <summary> /// Constructor. /// </summary> /// <param name="userDao"></param> public DefaultUserService(IUserDao userDao, ICommonDao commonDao) { _userDao = userDao; _commonDao = commonDao; }
public UserLogic(IUserDao userDao) => _userDao = userDao;
public UserManager(ILog logger, IUserDao userDao) : base(logger) { UserDao = userDao; }
public TweetService(ITweetsDao tweetContext, IUserDao userContext) { this.tweetContext = tweetContext; this.userContext = userContext; }
/// <summary> /// Initializes a new instance of the <see cref="UserTaskService"/> class. /// </summary> /// <param name="userDao">UserDao interface.</param> public UserTaskService(IUserDao userDao) { this.userDao = userDao; }
public UserLogic(IUserDao userDao, ICacheLogic cacheLogic) { this.userDao = userDao; this.cacheLogic = cacheLogic; }
public UserController(IMemberShipFactory memberShipFactory) { _memberShipFactory = memberShipFactory; _userDao = _memberShipFactory.CreateUserDao(); }
public UserManagerCli(IUserDao userDao) { _userDao = userDao; }