public UserUpdateResponse(LMConnect.Key.UserPendingUpdate update, string from) { this.Update = update; this.From = from; this.Message = string.Format("User has been notified via mail {0}", Update.User.Email); }
internal static XElement FromUser(LMConnect.Key.User user) { return new XElement("user", new XElement("username", user.Username), new XElement("email", user.Email), new XElement("databases", user.Databases.Select(FromDatabase)), new XElement("miners", user.Miners.Select(FromMiner)) ); }
public LMConnect.Key.UserPendingUpdate GetPendingUpdate(LMConnect.Key.User user) { return new LMConnect.Key.UserPendingUpdate { Link = this.Link, NewEmail = this.NewEmail, NewPassword = this.NewPassword, NewUsername = this.NewUsername, User = user, RequestedTime = DateTime.Now }; }
public LMConnect.Key.Database GetDatabase(LMConnect.Key.User owner) { if (this.db_id == null) { return null; } return new LMConnect.Key.Database { Name = this.db_id, Password = this.db_password, Owner = owner }; }
public UserResponse(LMConnect.Key.User user) { User = user; }
private static object FromMiner(LMConnect.Key.Miner miner) { return new XElement("miner", new XAttribute("id", miner.MinerId)); }
private static object FromDatabase(LMConnect.Key.Database db) { return new XElement("database", new XAttribute("id", db.Name)); }