public override IRFSystemContext Start()
        {
            var useMSMQ = RFSettings.GetAppSetting("UseMSMQ", true);
            var manager = new RFDispatchQueueSink(_context, _workQueue);

            _workQueueMonitor = useMSMQ ? (RFDispatchQueueMonitorBase) new RFDispatchQueueMonitorMSMQ(_context, manager, manager, _workQueue) : (RFDispatchQueueMonitorBase) new RFDispatchQueueMonitorInProc(_context, manager, manager, _workQueue);
            _workQueueMonitor.StartThread();

            _processingContext = _context.GetProcessingContext(null, manager, manager, _workQueueMonitor);
            _context.Engine.Initialize(_processingContext);
            return(_processingContext); // this is the root environment (time triggers) which doesn't have a tracker
        }
        public override IRFSystemContext Start()
        {
            var manager = new RFDispatchQueueSink(_context, _workQueue);

            _queueMonitor = new RFDispatchQueueMonitorInProc(_context, manager, manager, _workQueue); // always use in-proc for console requests

            _localContext = _context.GetProcessingContext("console_" + Process.GetCurrentProcess().Id, manager, manager, _queueMonitor);
            _context.Engine.Initialize(_localContext);

            _queueMonitor.StartThread();

            return(_localContext);
        }
示例#3
0
 public RFProcessingContext GetProcessingContext(string processingKey, IRFInstructionSink instructionManager, IRFEventSink eventManager, RFDispatchQueueMonitorBase workQueueMonitor)
 {
     return(RFProcessingContext.Create(this, processingKey, instructionManager, eventManager, workQueueMonitor));
 }
 public static RFProcessingContext Create(RFComponentContext component, string processingKey, IRFInstructionSink instructionManager, IRFEventSink eventManager, RFDispatchQueueMonitorBase workQueue)
 {
     return(new RFProcessingContext
     {
         _instructions = instructionManager,
         _events = eventManager,
         _catalog = component.Catalog,
         _memoryStore = component.MemoryStore,
         UserConfig = component.UserConfig,
         Environment = component.SystemConfig.Environment,
         _workQueue = workQueue,
         UserLog = component.UserLog,
         UserRole = component.UserRole,
         ProcessingKey = processingKey,
         _dispatchStore = component.DispatchStore
     });
 }