public bool Equals(Alert other) { if (!(Source.Equals(other.Source) && Category.Equals(other.Category) && Level.Equals(other.Level) && Code.Equals(other.Code))) { return(false); } if (ContextData == null) { return(other.ContextData == null); } return(ContextData.Equals(other.ContextData)); }