public CacheWriter(
     string workingDirectory,
     CacheWatchOptions options,
     CacheConversion cacheConversion)
 {
     _cacheConversion  = cacheConversion;
     _workingDirectory = workingDirectory;
     _options          = options;
     _cacheReader      = new CacheReader(_options.CachePaths, _options.ExcludedCachePaths);
     _chartData        = new ChartData();
 }
Esempio n. 2
0
        public void Start(CacheWatchOptions options)
        {
            if (_timer != null)
            {
                throw new InvalidOperationException("Cache watch is already started.");
            }

            CopyVisualizationFiles();

            StartWebServer(options.Url);

            _cacheWriter = new CacheWriter(_workingDirectory, options, _cacheConversion);

            _timer = new Timer {
                AutoReset = false, Enabled = true, Interval = options.UpdateInterval
            };

            _timer.Elapsed += OnTimedEvent;
        }