public void Stop() { lock (mutex) { _server.Updated -= UpdateSnapshot; _filters.ItemsUpdated -= UpdateItems; _newsDataPath = null; _gameDataPath = null; _filters = null; _server = null; } }
public void Start(GlobalEvents.ServerEvents server, FiltersEvent filters, string gameDataPath, string newsDataPath) { lock (mutex) { _server = server; _filters = filters; _gameDataPath = gameDataPath; _newsDataPath = newsDataPath; _server.Updated += UpdateSnapshot; _filters.ItemsUpdated += UpdateItems; } UpdateSnapshot(); UpdateItems(null, null); }