public DefaultOpenReasoning(
            ILogFilesSettings logFilesSettings
            )
        {
            if (logFilesSettings == null)
            {
                throw new ArgumentNullException("logFilesSettings");
            }

            _logFilesSettings = logFilesSettings;
        }
Exemple #2
0
        public DefaultFileCycling(
            ILogFilesSettings logFilesSettings,
            IOpenReasoning openReasoning
            )
        {
            if (logFilesSettings == null)
            {
                throw new ArgumentNullException("logFilesSettings");
            }
            if (openReasoning == null)
            {
                throw new ArgumentNullException("openReasoning");
            }

            _logFilesSettings = logFilesSettings;
            _openReasoning = openReasoning;

            DeleteOldFiles();

            //using last existing log file
            _current = _logFilesSettings.FileProvider.GetLastFile();

            Debug.WriteLine("choosed: " + (_current != null ? _current.FileName : "no file"));
        }