Exemplo n.º 1
0
 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);
     }
 }
Exemplo n.º 2
0
 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;
     }
 }