コード例 #1
0
 public static IWorkingMemory NewWorkingMemory(ThreadingModelTypes threadingModelType, int lockTimeOut)
 {
     if (threadingModelType == ThreadingModelTypes.Single) return new WorkingMemory();
     else if (threadingModelType == ThreadingModelTypes.Multi) return new ThreadSafeWorkingMemory(false, lockTimeOut);
     else if (threadingModelType == ThreadingModelTypes.MultiHotSwap) return new ThreadSafeWorkingMemory(true, lockTimeOut);
     else throw new BREException("Unsupported threading model type: " + threadingModelType);
 }
コード例 #2
0
        /// <summary>
        /// Instantiates a new Inference Engine with the specified threading model, using a business objects binder for asserting facts and evaluating functions.
        /// </summary>
        /// <param name="businessObjectsBinder">The business object binder that the engine must use.</param>
        /// <param name="threadingModelType">The threading model type that the engine must support.</param>
        public IEImpl(IBinder businessObjectsBinder, ThreadingModelTypes threadingModelType)
        {
            initialized = false;

            // instantiate a new working memory
            wm = WorkingMemoryFactory.NewWorkingMemory(threadingModelType);

            // set the binder
            Binder = businessObjectsBinder;
        }
コード例 #3
0
        public static IWorkingMemory NewWorkingMemory(ThreadingModelTypes threadingModelType, int lockTimeOut)
        {
            switch (threadingModelType)
            {
            case ThreadingModelTypes.Single:
                return(new WorkingMemory());

            case ThreadingModelTypes.Multi:
                return(new ThreadSafeWorkingMemory(false, lockTimeOut));

            case ThreadingModelTypes.MultiHotSwap:
                return(new ThreadSafeWorkingMemory(true, lockTimeOut));

            default:
                throw new BREException("Unsupported threading model type: " + threadingModelType);
            }
        }
コード例 #4
0
 public static IWorkingMemory NewWorkingMemory(ThreadingModelTypes threadingModelType)
 {
     if (threadingModelType == ThreadingModelTypes.Single)
     {
         return(new WorkingMemory());
     }
     else if (threadingModelType == ThreadingModelTypes.Multi)
     {
         return(new ThreadSafeWorkingMemory(false));
     }
     else if (threadingModelType == ThreadingModelTypes.MultiHotSwap)
     {
         return(new ThreadSafeWorkingMemory(true));
     }
     else
     {
         throw new BREException("Unsupported threading model type: " + threadingModelType);
     }
 }
コード例 #5
0
ファイル: IEImpl.cs プロジェクト: plamikcho/xbrlpoc
        /// <summary>
        /// Instantiates a new Inference Engine with the specified threading model, using a business objects binder for asserting facts and evaluating functions.
        /// </summary>
        /// <param name="businessObjectsBinder">The business object binder that the engine must use.</param>
        /// <param name="threadingModelType">The threading model type that the engine must support.</param>
        public IEImpl(IBinder businessObjectsBinder, ThreadingModelTypes threadingModelType)
        {
            initialized = false;

            // instantiate a new working memory
            wm = WorkingMemoryFactory.NewWorkingMemory(threadingModelType, lockTimeOut);

            // set the binder
            Binder = businessObjectsBinder;
        }
コード例 #6
0
ファイル: IEImpl.cs プロジェクト: plamikcho/xbrlpoc
 /// <summary>
 /// Instantiates a new Inference Engine with the specified threading model.
 /// </summary>
 /// <param name="threadingModelType">The threading model type that the engine must support.</param>
 public IEImpl(ThreadingModelTypes threadingModelType)
     : this(null, threadingModelType)
 {
 }
コード例 #7
0
 /// <summary>
 /// Instantiates a new Inference Engine with the specified threading model.
 /// </summary>
 /// <param name="threadingModelType">The threading model type that the engine must support.</param>
 public IEImpl(ThreadingModelTypes threadingModelType) : this(null, threadingModelType)
 {
 }