Example #1
0
        internal static IEventContext NewEventContext(IList <FactBase.PositiveMatchResult> facts, Implication implication)
        {
            IList <IList <Fact> > wrappedFacts = new List <IList <Fact> >();

            wrappedFacts.Add(FactBase.ExtractFacts(facts));
            return(new ImmutableEventContext(wrappedFacts, implication));
        }
Example #2
0
        public override void PrepareInitialization()
        {
            lockStrategy.AcquireUniqueLock(lockTimeOut);

            WorkingType    = WorkingMemoryTypes.Global;
            globalFactBase = new FactBase();
        }
Example #3
0
        ///<summary>Clones the fact base.</summary>
        public object Clone()
        {
            FactBase fb = new FactBase();

            for (IEnumerator <Fact> e = GetEnumerator(); e.MoveNext();)
            {
                fb.Assert(e.Current);
            }
            return(fb);
        }
Example #4
0
 internal static IEventContext NewEventContext(IList <IList <FactBase.PositiveMatchResult> > facts, Implication implication)
 {
     return(new ImmutableEventContext(FactBase.ExtractFacts(facts), implication));
 }
Example #5
0
 public override void PrepareInitialization()
 {
     WorkingType     = WorkingMemoryTypes.Global;
     globalFactBase  = new FactBase();
     WorkingFactBase = globalFactBase;
 }