private PluginService InternalGetRecorderTunerById(Guid recorderTunerId) { lock (_pluginServices) { if (!_pluginServices.ContainsKey(recorderTunerId)) { try { using (ControlServiceAgent tvControlAgent = new ControlServiceAgent()) { _pluginServices.Clear(); PluginService[] pluginServices = tvControlAgent.GetAllPluginServices(false); foreach (PluginService pluginService in pluginServices) { _pluginServices.Add(pluginService.PluginServiceId, pluginService); } } } catch { } } if (_pluginServices.ContainsKey(recorderTunerId)) { return(_pluginServices[recorderTunerId]); } return(null); } }
private PluginService InternalGetRecorderTunerById(Guid recorderTunerId) { lock (_pluginServices) { if (!_pluginServices.ContainsKey(recorderTunerId)) { try { using (ControlServiceAgent tvControlAgent = new ControlServiceAgent()) { _pluginServices.Clear(); PluginService[] pluginServices = tvControlAgent.GetAllPluginServices(false); foreach (PluginService pluginService in pluginServices) { _pluginServices.Add(pluginService.PluginServiceId, pluginService); } } } catch { } } if (_pluginServices.ContainsKey(recorderTunerId)) { return _pluginServices[recorderTunerId]; } return null; } }