コード例 #1
0
 public LogWatcher(string configFilePath, ref BinarySemaphore sem)
 {
     _watcher        = new FileSystemWatcher();
     _sem            = sem;
     _watcherCount   = 0;
     _configFilePath = configFilePath;
 }
コード例 #2
0
        protected void init()
        {
            this.LogLines     = new List <String>();
            this.CopyLogLines = new List <String>();

            _logFilePath = Config.hsLogDirPath + _logFileName;
            _offset      = 0;
            _sem         = new BinarySemaphore(0, 1);
            _matchIndex  = 0;

            File.WriteAllText(_logFilePath, String.Empty);
            _logWatcher = new LogWatcher(_logFileName.Substring(1), ref _sem);
            _logWatcher.start();

            this._regexList = new List <Regex>();
        }