Пример #1
0
        protected override IGrinderWorker OnCreateWorkerRunnable()
        {
            Logger.Trace("OnCreateWorkerRunnable: Enter");
            var result = ScriptEngine.CreateWorkerRunnable();

            ProcessContext.InitializeAwareness(result);
            result.Initialize();
            Logger.Trace(m => m("OnCreateWorkerRunnable: Exit, Result = {0}", result));
            return(result);
        }
Пример #2
0
 protected override void OnInitialize()
 {
     Logger.Trace("OnInitialize: Enter");
     InitializeDebugger();
     InitializeBinPath();
     InitializeProcessContext();
     AppDomain.CurrentDomain.AssemblyResolve += OnAssemblyResolve;
     ScriptEngine = TypeHelper.CreateTargetTypeFromProperty <IGrinderScriptEngine>(Constants.ScriptEngineTypeKey, typeof(DefaultScriptEngine));
     ProcessContext.InitializeAwareness(ScriptEngine);
     ScriptEngine.Initialize();
     ProcessContext.DatapoolFactory.CreateMissingDatapoolsFromProperties();
     Logger.Trace("OnInitialize: Exit");
 }
Пример #3
0
        private void InitializeAndLogWorkers()
        {
            Logger.Trace("InitializeWorkers: Enter");
            int index = 0;

            foreach (var worker in workers)
            {
                index++;
                var logIndex  = index;
                var logWorker = worker;
                Logger.Info(m => m("Worker[{0}] = '{1}'", logIndex, logWorker.GetType().FullName));
                ProcessContext.InitializeAwareness(worker);
                worker.Initialize();
            }

            Logger.Trace("InitializeWorkers: Exit");
        }