예제 #1
0
        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);
            }
        }
예제 #2
0
        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);
        }
예제 #3
0
        protected virtual void CalculateLongConditionalHashCode()
        {
            ulong result = 0;

            if (!WhereSection.IsNullOrEmpty())
            {
                foreach (var whereItem in WhereSection)
                {
                    result ^= whereItem.GetLongHashCode();
                }
            }

            _longConditionalHashCode = result;
        }