public UserServices(string filePath) { UserDataServices = new UserDataServiceses() { LocalFilePath = filePath }; if(File.Exists(filePath)) { var data = UserDataServices.LoadLocalProfile(); var tempUser = UserDataServices.GetUserByLogin(data.Email); if (ValidPassword(data.Password, tempUser.Password)) _userData = tempUser; } }
public UserService(IUserDataServices users) { Require.ObjectNotNull(users, "User data services need to be defined"); _users = users; }