public IUser GetUser(string username, string password) { var user = new XmlUser(); user.UserName = username; user.Password = password; return(user); }
public void AddUser(string username, string password) { var xmlUser = new XmlUser(); xmlUser.Password = this.Hash(password); xmlUser.UserName = username; if (!mXmlUsers.Contains(xmlUser)) { mXmlUsers.Add(xmlUser); } using (FileStream output = File.Create(mFilename)) { mSerializer.Serialize(output, mXmlUsers); } }