public bool Equals(IJsonOrganization x, IJsonOrganization y) { if (x == null && y != null) { return(false); } if (x != null && y == null) { return(false); } if (x == null) { return(true); } return(x.Id == y.Id && x.Name == y.Name && x.DisplayName == y.DisplayName && x.Desc == y.Desc && x.Url == y.Url && x.Website == y.Website && x.LogoHash == y.LogoHash && (x.PowerUps?.SequenceEqual(y.PowerUps) ?? true) && x.PaidAccount == y.PaidAccount && (x.PremiumFeatures?.SequenceEqual(y.PremiumFeatures) ?? true) && Instance.Equals(x.Prefs, y.Prefs)); }
public int GetHashCode(IJsonOrganization obj) { unchecked { var hashCode = obj.Id?.GetHashCode() ?? 0; hashCode = (hashCode * 397) ^ (obj.Name?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (obj.DisplayName?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (obj.Desc?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (obj.Url?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (obj.Website?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (obj.LogoHash?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ GetCollectionHashCode(obj.PowerUps); hashCode = (hashCode * 397) ^ obj.PaidAccount.GetHashCode(); hashCode = (hashCode * 397) ^ GetCollectionHashCode(obj.PremiumFeatures); hashCode = (hashCode * 397) ^ Instance.GetHashCode(obj.Prefs); return(hashCode); } }
internal Organization(IJsonOrganization json, TrelloAuthorization auth) : this(json.Id, auth) { _context.Merge(json); }