Example #1
0
        private void StartChannelFileWatcher()
        {
            var writer = new Channels.ChannelWriter();

            if (!writer.IsWatcherEnabled(_myChannel))
            {
                writer.StartWatcher(_myChannel);
                _myChannel.FileWatcher.Changed += OnChannelFileWatcherChanged;
            }
        }
Example #2
0
 void CurrentDomain_ProcessExit(object sender, EventArgs e)
 {
     lock (_locker)
     {
         if (_myChannel != null)
         {
             var writer = new Channels.ChannelWriter();
             if (writer.IsWatcherEnabled(_myChannel))
             {
                 writer.StopWatcher(_myChannel);
             }
         }
         if (_timer != null)
         {
             _timer.Stop();
         }
         log.WriteInfo("process exit");
     }
 }