private void RestartAnalysis() { if (_currentAnalysis != null) { _logAnalyserEngine.RemoveAnalysis(_currentAnalysis); _currentAnalysis = null; } var configuration = new DataSourceAnalysisConfiguration { PluginId = _template.AnalyserPluginId, Configuration = _configuration }; _currentAnalysis = _logAnalyserEngine.CreateAnalysis(_logFile, configuration, this); // Now that we've assigned the current analysis, we can actually start it // (otherwise there would be the race condition of being notified through the // listener interface before we've assigned the new handle, effectively losing // the values provided by the callback). _currentAnalysis.Start(); }