Ejemplo n.º 1
0
        private IExecutionContext CreateContext(string cookie)
        {
            IExecutionContext context = new Gin.Context.ExecutionContext(_ginRoot);

            Logging.Logging loggingObject = new Logging.Logging();

            Directory.CreateDirectory(_cookiePath);

            string          mainLoggerPath = Path.Combine(_ginRoot, Gin.ExecutionLogger.EXECUTION_LOG_FILENAME);
            ExecutionLogger mainFileLogger = new ExecutionLoggerTextFile(mainLoggerPath);

            loggingObject.AddLogger(mainFileLogger);

            string          textLoggerPath = Path.Combine(_cookiePath, Gin.ExecutionLogger.EXECUTION_LOG_FILENAME);
            ExecutionLogger textFileLogger = new ExecutionLoggerTextFile(textLoggerPath);

            loggingObject.AddLogger(textFileLogger);
            _state.LogPath = textLoggerPath;

            _progressProxy = new ExecutionProgressProxy(OnProgress);
            loggingObject.SetProgress(_progressProxy);

            context.Log = loggingObject;

            return(context);
        }
Ejemplo n.º 2
0
        private IExecutionContext CreateExecutionContext()
        {
            string            rootPath = ConfigurationManager.AppSettings["ROOT_PATH"];
            string            logPath  = ConfigurationManager.AppSettings["LOG_PATH"];
            IExecutionContext context  = new ExecutionContext(rootPath);

            context.ControlContainer = panelMain;
            Logging.Logging log = new Logging.Logging();
            log.AutoFlushLoggers = true;
            log.AddLogger(new ExecutionLoggerTextFile(logPath));
            log.AddLogger(new ExecutionLoggerMessageBox(this));
            log.SetProgress(new ExecutionProgressWindowsForms(MainProgressBar, MainProgressLabel));
            context.Log = log;
            return(context);
        }
Ejemplo n.º 3
0
 private IExecutionContext CreateExecutionContext()
 {
     string rootPath = ConfigurationManager.AppSettings["ROOT_PATH"];
     string logPath = ConfigurationManager.AppSettings["LOG_PATH"];
     IExecutionContext context = new ExecutionContext(rootPath);
     Logging.Logging log = new Logging.Logging();
     log.AutoFlushLoggers = true;
     log.AddLogger(new ExecutionLoggerTextFile(logPath));
     context.Log = log;
     return context;
 }
Ejemplo n.º 4
0
        private IExecutionContext CreateExecutionContext()
        {
            string            rootPath = ConfigurationManager.AppSettings["ROOT_PATH"];
            string            logPath  = ConfigurationManager.AppSettings["LOG_PATH"];
            IExecutionContext context  = new ExecutionContext(rootPath);

            Logging.Logging log = new Logging.Logging();
            log.AutoFlushLoggers = true;
            log.AddLogger(new ExecutionLoggerTextFile(logPath));
            context.Log = log;
            return(context);
        }
Ejemplo n.º 5
0
        public void TestInit()
        {
            _context              = new ExecutionContextMock();
            _testCommand          = new EmptyCommand();
            _testCommand.UserInfo = new UserInfoEmbedded
            {
                MessageGuid = "guid",
                MessageText = "text"
            };

            Logging.Logging log = new Logging.Logging();
            _logger = new ExecutionLoggerMock();
            log.AddLogger(_logger);
            _context.Log = log;
        }
Ejemplo n.º 6
0
        private void LoadPackageAsync(string packageFilePath)
        {
            string            rootPath = ConfigurationManager.AppSettings["ROOT_PATH"];
            string            logPath  = ConfigurationManager.AppSettings["LOG_PATH"];
            IExecutionContext context  = new Gin.Context.ExecutionContext(rootPath);

            Logging.Logging log = new Logging.Logging();
            log.AutoFlushLoggers = true;
            log.AddLogger(new ExecutionLoggerTextFile(logPath));
            context.Log = log;
            Package pkg = new Package(context);

            SetCurrentStatus("Загрузка пакета");
            SetFilePathStatus(packageFilePath);
            pkg.Load(packageFilePath);
            BuildPackageTree(pkg);
        }
Ejemplo n.º 7
0
        private IExecutionContext CreateContext(string cookie)
        {
            IExecutionContext context = new Gin.Context.ExecutionContext(_ginRoot);
            Logging.Logging loggingObject = new Logging.Logging();

            Directory.CreateDirectory(_cookiePath);

            string mainLoggerPath = Path.Combine(_ginRoot, Gin.ExecutionLogger.EXECUTION_LOG_FILENAME);
            ExecutionLogger mainFileLogger = new ExecutionLoggerTextFile(mainLoggerPath);
            loggingObject.AddLogger(mainFileLogger);

            string textLoggerPath = Path.Combine(_cookiePath, Gin.ExecutionLogger.EXECUTION_LOG_FILENAME);
            ExecutionLogger textFileLogger = new ExecutionLoggerTextFile(textLoggerPath);
            loggingObject.AddLogger(textFileLogger);
            _state.LogPath = textLoggerPath;

            _progressProxy = new ExecutionProgressProxy(OnProgress);
            loggingObject.SetProgress(_progressProxy);

            context.Log = loggingObject;

            return context;
        }
Ejemplo n.º 8
0
 private void LoadPackageAsync(string packageFilePath)
 {
     string rootPath = ConfigurationManager.AppSettings["ROOT_PATH"];
     string logPath = ConfigurationManager.AppSettings["LOG_PATH"];
     IExecutionContext context = new Gin.Context.ExecutionContext(rootPath);
     Logging.Logging log = new Logging.Logging();
     log.AutoFlushLoggers = true;
     log.AddLogger(new ExecutionLoggerTextFile(logPath));
     context.Log = log;
     Package pkg = new Package(context);
     SetCurrentStatus("Загрузка пакета");
     SetFilePathStatus(packageFilePath);
     pkg.Load(packageFilePath);
     BuildPackageTree(pkg);
 }
Ejemplo n.º 9
0
 private IExecutionContext CreateExecutionContext()
 {
     string rootPath = ConfigurationManager.AppSettings["ROOT_PATH"];
     string logPath = ConfigurationManager.AppSettings["LOG_PATH"];
     IExecutionContext context = new ExecutionContext(rootPath);
     context.ControlContainer = panelMain;
     Logging.Logging log = new Logging.Logging();
     log.AutoFlushLoggers = true;
     log.AddLogger(new ExecutionLoggerTextFile(logPath));
     log.AddLogger(new ExecutionLoggerMessageBox(this));
     log.SetProgress(new ExecutionProgressWindowsForms(MainProgressBar, MainProgressLabel));
     context.Log = log;
     return context;
 }
Ejemplo n.º 10
0
        public void TestInit()
        {
            _context = new ExecutionContextMock();
            _testCommand = new EmptyCommand();
            _testCommand.UserInfo = new UserInfoEmbedded
            {
                MessageGuid = "guid",
                MessageText = "text"
            };

            Logging.Logging log = new Logging.Logging();
            _logger = new ExecutionLoggerMock();
            log.AddLogger(_logger);
            _context.Log = log;
        }