Ejemplo n.º 1
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = FirstProperty.GetHashCode();
         hashCode = (hashCode * 397) ^ (SecondProperty != null ? SecondProperty.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ ThirdProperty.GetHashCode();
         hashCode = (hashCode * 397) ^ (FourthProperty != null ? FourthProperty.GetHashCode() : 0);
         return(hashCode);
     }
 }
 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);
 }
Ejemplo n.º 4
0
 set => SetValue(SecondProperty, value);
Ejemplo n.º 5
0
 set { SetValue(SecondProperty, value); OnPropertyChanged(nameof(FormattedSecond)); }