Пример #1
0
        public List <Command> ReadCustomCommands()
        {
            var configFile = _fileSystemService.CombinePath(_fileSystemService.GetConfigurationPath(), _configurationFile);
            var content    = _fileSystemService.ReadFileAsString(configFile);
            var commands   = _jsonSerializerService.Deserialize <Command[]>(content);

            return(commands.ToList());
        }
Пример #2
0
        public string GetLogFileName()
        {
            var logfile = _fileSystemService.CombinePath(_logDirectory, $"{DateTime.UtcNow.ToString("yyyy-MM-dd")}.txt");

            if (_lastLogFile != logfile)
            {
                CheckLogFolder();
            }

            _lastLogFile = logfile;
            return(logfile);
        }