Beispiel #1
0
        public void PropagateAssert(IExecutionContext context, Tuple tuple, Fact fact)
        {
            IBetaMemory memory     = context.WorkingMemory.GetNodeMemory(this);
            var         childTuple = new Tuple(tuple, fact);

            foreach (var sink in _sinks)
            {
                sink.PropagateAssert(context, childTuple);
            }
            memory.Add(childTuple);
        }
Beispiel #2
0
        public void Activate(IExecutionContext context)
        {
            var tuple = new Tuple();

            IBetaMemory memory = context.WorkingMemory.GetNodeMemory(this);

            foreach (ITupleSink sink in _sinks)
            {
                sink.PropagateAssert(context, tuple);
            }
            memory.Add(tuple);
        }
Beispiel #3
0
 private void PropagateAssertInternal(IExecutionContext context, IBetaMemory memory, List <Tuple> tuples)
 {
     if (tuples.Count > 0)
     {
         foreach (var sink in _sinks)
         {
             sink.PropagateAssert(context, tuples);
         }
         foreach (var childTuple in tuples)
         {
             memory.Add(childTuple);
         }
     }
 }
Beispiel #4
0
        public void Activate(IExecutionContext context)
        {
            var tuple     = new Tuple(context.IdGenerator.NextTupleId());
            var tupleList = new List <Tuple>();

            tupleList.Add(tuple);

            IBetaMemory memory = context.WorkingMemory.GetNodeMemory(this);

            foreach (ITupleSink sink in _sinks)
            {
                sink.PropagateAssert(context, tupleList);
            }
            memory.Add(tuple);
        }
Beispiel #5
0
        private void PropagateAssertInternal(IExecutionContext context, IBetaMemory memory, List <Tuple> tuples)
        {
            if (tuples.Count > 0)
            {
                for (int i = 0; i < _sinks.Count; i++)
                {
                    _sinks[i].PropagateAssert(context, tuples);
                }

                using (var counter = PerfCounter.Assert(context, this))
                {
                    memory.Add(tuples);
                    counter.SetCount(memory.TupleCount);
                }
            }
        }