Beispiel #1
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;
        }