public void RemoveAnalyser(IDataSourceAnalyser analyser) { lock (_syncRoot) { _dataSourceAnalysers.Remove(analyser); analyser.Dispose(); } }
public void Dispose() { try { _analyser?.Dispose(); } catch (Exception e) { Log.ErrorFormat("Caught unexpected exception while trying to dispose of analyser '{0}': {1}", _plugin.Id, e); } }
/// <summary> /// </summary> /// <param name="analyser"></param> public void Remove(IDataSourceAnalyser analyser) { lock (_syncRoot) { AnalyserTemplate template; if (analyser != null && _analysers.TryGetValue(analyser, out template)) { _template.Remove(template); _analysers.Remove(analyser); analyser.Dispose(); } } }