public override bool Equals(object obj) { if (obj is Rule rule) { return((FirstComponent?.Equals(rule?.FirstComponent ?? "") ?? false) && (FirstProperty?.Equals(rule?.FirstProperty ?? "") ?? false) && (Relation?.Relation.Equals(rule?.Relation.Relation ?? "") ?? false) && (SecondComponent?.Equals(rule?.SecondComponent ?? "") ?? false) && (SecondProperty?.Equals(rule?.SecondProperty ?? "") ?? false)); } return(false); }
public override bool Equals(object obj) { if (obj is Rule rule) { return (FirstComponent.Equals(rule.FirstComponent) && FirstProperty.Equals(rule.FirstProperty) && Relation.Equals(rule.Relation) && SecondComponent.Equals(rule.SecondComponent) && SecondProperty.Equals(rule.SecondProperty) && RuleType.Equals(rule.RuleType)); } return(false); }