public override int GetHashCode() { unchecked { var hashCode = (Title != null ? Title.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Description != null ? Description.GetHashCode() : 0); hashCode = (hashCode * 397) ^ OnlineSince.GetHashCode(); return(hashCode); } }
public override string ToString() { var U = CodeSelBot.CodeSEL.GetUser(UserID); var Out = U.Mention + ((U.Nickname == null) ? "" : " AKA `" + U.Name + "`") + "\n\n`Discriminator:` #" + U.Discriminator + "\n`Long ID :` " + UserID + "\n`Join Date :` " + U.JoinedAt.ToShortDateString() + "\n`Currently :` " + ((U.Status.ToString() == "idle") ? "AFK, " : "") + ((U.Status.ToString() == "dnd") ? "Busy, " : "") + ((U.Status.ToString() != "offline") ? "Online since " + OnlineSince.AddHours(-2).ToShortTimeString() + " GMT" : "Offline" + ((LastOnline.ToString() != "01-Jan-01 12:00:00 AM") ? ", Last Seen on " + LastOnline.AddHours(-2).ToString() : "")) + ((U.Status.ToString() == "online" && U.CurrentGame.HasValue && !U.IsBot) ? "\n`Playing :` " + U.CurrentGame.Value.Name : "") + "\n`Msgs Sent :` " + MessagesSent + "\n`Chars Sent :` " + CharactersSent + ((ExileTime > 0) ? "\n`Exile Time :` " + ExileTime : "") + ((BanCount > 0) ? "\n`Ban Votes :` " + BanCount : "") + ((TimesMoved > 0) ? "\n`Times Moved :` " + TimesMoved : "") + ((!U.IsBot && false) ? "\n`Hangs Started:` " + HangStarted + "\n`Hangs Solved :` " + HangSolved + "\n`Songs Played :` " + SongsPlayed : "") + "\n`AFKmove :` " + AFKMove.ToString() + "\n`Automove :` " + AutoMove.ToString() + "\n`Allow Track :` " + Track.ToString(); if (Games.Count > 0 && !U.IsBot) { Out += "\n`Games :` "; foreach (var g in Games) { Out += g + ", "; } Out = Out.Substring(0, Out.Length - 2); } Out += "\n`Roles :` "; foreach (var r in U.Roles.Where(x => x != CodeSelBot.CodeSEL.EveryoneRole).OrderBy(o => o.Position)) { Out += r.Mention + " "; } return(Out); }
public bool Equals(SiteData other) { return(string.Equals(Title, other.Title) && string.Equals(Description, other.Description) && OnlineSince.Equals(other.OnlineSince)); }