virtual public bool SameTemplate(TemplateInfo other) { if (!ReferenceEquals(Template, this)) { if (!Equals(other, Template)) { return(false); } } else { if (!Unifiable.SAME_MEANING(other.Response, Response)) { return(false); } if (!Unifiable.SAME_MEANING(other.Guard, Guard)) { return(false); } } return(true); }
public bool Equals(CategoryInfo other, bool compareGraphs, bool comparePaths) { if (ReferenceEquals(this, other)) { return(true); } bool vv; var otherNode = other.GraphmasterNode; var GraphmasterNode = this.GraphmasterNode; if (!comparePaths) { if (otherNode == null || GraphmasterNode == null) { comparePaths = true; compareGraphs = false; } } if (compareGraphs) { vv = ReferenceEquals(otherNode, GraphmasterNode); if (!vv) { return(false); } } else { vv = (otherNode ?? GraphmasterNode) == (GraphmasterNode ?? otherNode); if (!vv) { return(false); } } if (comparePaths) { vv = Unifiable.SAME_MEANING(other.Pattern, Pattern); if (!vv) { return(false); } vv = Unifiable.SAME_MEANING(other.That, That) && Unifiable.SAME_MEANING(other.Topic, Topic); if (!vv) { return(false); } } if (!SameTemplate(other.Template)) { return(false); } if (!SamePreconds(other.Preconds)) { return(false); } if (CategoryXml.OuterXml != other.CategoryXml.OuterXml) { return(false); } if (Filename != other.Filename) { return(true); } return(true); }