public UserList() { XDocument doc = UserHandler.GetXMLFile(); _users = new ObservableCollection <User>(); var docUsers = doc.Element("users"); foreach (var xElement in docUsers.Elements()) { _users.Add(User.CreateUser(xElement.Attribute("username").Value)); } }
public static UserList Refresh() { return(new UserList(UserHandler.GetXMLFile())); }