Пример #1
0
        public virtual bool Judge(
            Lot <T> lot,
            Action <T> learn)
        {
            var reflection  = new Reflection <T>(lot, this.absolution);
            var hashCodes   = new XLinkedList <int>();
            var isKnowledge = true;

            foreach (var item in reflection.Reflect(learn))
            {
                var hashCode = item.GetHashCode();
                if (hashCodes.Contains(hashCode))
                {
                    isKnowledge = false;
                    break;
                }

                hashCodes.AddTail(item.GetHashCode());
            }

            return(isKnowledge);
        }