public virtual void DiscoverAllAnnotations(IList <RuleInstance> result) { if (!Annotations.IsNullOrEmpty()) { foreach (var annotation in Annotations) { result.Add(annotation); annotation.DiscoverAllAnnotations(result); } } if (!WhereSection.IsNullOrEmpty()) { foreach (var item in WhereSection) { item.DiscoverAllAnnotations(result); } } if (Holder != null) { Holder.DiscoverAllAnnotations(result); } }
protected virtual ulong CalculateLongHashCode() { ulong result = 0; if (!WhereSection.IsNullOrEmpty()) { foreach (var item in WhereSection) { result ^= LongHashCodeWeights.BaseModalityWeight ^ item.GetLongHashCode(); } } if (Holder != null) { result ^= LongHashCodeWeights.BaseModalityWeight ^ Holder.GetLongHashCode(); } if (!Annotations.IsNullOrEmpty()) { foreach (var item in Annotations) { result ^= LongHashCodeWeights.BaseModalityWeight ^ item.GetLongHashCode(); } } return(result); }
protected virtual void CalculateLongConditionalHashCode() { ulong result = 0; if (!WhereSection.IsNullOrEmpty()) { foreach (var whereItem in WhereSection) { result ^= whereItem.GetLongHashCode(); } } _longConditionalHashCode = result; }