Exemplo n.º 1
0
        public ListKnowledgeBase(IClause newClause, IKnowledgeBase next)
        {
            if (newClause == null) throw new ArgumentNullException("newClause");
            if (next == null) throw new ArgumentNullException("next");

            _clause = newClause;
            _next = CreateKnowledgeList(next);
        }
Exemplo n.º 2
0
        public ListKnowledgeBase(IClause newClause, IKnowledgeBase next)
        {
            if (newClause == null)
            {
                throw new ArgumentNullException("newClause");
            }
            if (next == null)
            {
                throw new ArgumentNullException("next");
            }

            _clause = newClause;
            _next   = CreateKnowledgeList(next);
        }
Exemplo n.º 3
0
        private ListKnowledgeBase CreateKnowledgeList(IKnowledgeBase notList)
        {
            var result = notList as ListKnowledgeBase;

            if (result != null)
            {
                return(result);
            }

            result = null;
            foreach (var clause in notList.GetClauses().Result)
            {
                result = new ListKnowledgeBase(clause, result);
            }

            return(result);
        }
Exemplo n.º 4
0
 private ListKnowledgeBase(IClause ourClause, ListKnowledgeBase next)
 {
     _clause = ourClause;
     _next   = next;
 }
Exemplo n.º 5
0
        private ListKnowledgeBase CreateKnowledgeList(IKnowledgeBase notList)
        {
            var result = notList as ListKnowledgeBase;
            if (result != null)
            {
                return result;
            }

            result = null;
            foreach (var clause in notList.GetClauses().Result)
            {
                result = new ListKnowledgeBase(clause, result);
            }

            return result;
        }
Exemplo n.º 6
0
 private ListKnowledgeBase(IClause ourClause, ListKnowledgeBase next)
 {
     _clause = ourClause;
     _next = next;
 }