Beispiel #1
0
        internal ScriptCallContext(ScriptCallContext parent, IFileProcedure procedure, ContextLogOption callLoggingOption, bool isDynamicCall)
        {
            m_task          = parent.m_task;
            m_parentContext = parent;

            m_taskManager          = parent.m_taskManager;
            m_callLoggingOption    = callLoggingOption;
            m_loggerOnEntry        = parent.Logger;
            m_loggerInside         = m_loggerOnEntry;
            m_statusUpdaterOnEntry = parent.StatusUpdater;
            m_loggingEnabled       = parent.LoggingEnabled;
            m_errorListener        = parent.m_errorListener;

            m_procedure     = procedure;
            m_isDynamicCall = isDynamicCall;
            this.SetupFromProcedure();

            m_currentReports = parent.m_currentReports; // Simply inherit the list.

            //m_createdlogger = logger.LogEntering(procedure.ElementName, procedure.Purpose);
            //if (separateStateLevel)
            //{
            //    m_currentStatusUpdater = parent.StatusUpdate.CreateSubTaskStatusReporter(procedure.Purpose);
            //    m_currentStatusUpdater.Disposed += M_currentStatusUpdater_Disposed;
            //    m_createdStatusUpdaters = new Stack<ITaskStatusUpdate>(4);
            //    m_createdStatusUpdaters.Push(m_currentStatusUpdater);
            //}
            //else
            //{
            //    m_currentStatusUpdater = parent.StatusUpdate;
            //}
        }
Beispiel #2
0
        public ScriptExecutionTask(
            ILogger logger,
            ILogSinkManager logSinkManager,
            ILoadedFilesManager filesManager,
            TaskManager taskManager,
            IFileElement targetElement,
            object[] arguments)
        {
            m_logger         = logger;
            m_logSinkManager = logSinkManager;
            m_filesManager   = filesManager;
            m_taskManager    = taskManager;
            m_targetElement  = targetElement;
            m_arguments      = arguments;

            m_taskContext  = new ScriptTaskContext();
            m_statusUpdate = new ExecutionScopeStatusUpdaterMock();
        }
Beispiel #3
0
 internal ScriptCallContext(
     ScriptTaskContext task,
     ILogger logger,
     ContextLogOption callLoggingOption,
     IExecutionScopeStatusUpdate statusUpdater,
     IFileProcedure procedure,
     TaskManager taskManager)
 {
     m_task                 = task;
     m_parentContext        = null;
     m_callLoggingOption    = callLoggingOption;
     m_loggerInside         = m_loggerOnEntry = logger;
     m_statusUpdaterOnEntry = statusUpdater;
     m_loggingEnabled       = true; // Initial
     m_procedure            = procedure;
     m_taskManager          = taskManager;
     m_isDynamicCall        = false;
     this.SetupFromProcedure();
 }