public void Activated(PluginRuntime pluginRuntime)
    {
      var meta = pluginRuntime.Metadata;
      Logger.Info(string.Format("{0} v{1} [{2}] by {3}", meta.Name, meta.PluginVersion, meta.Description, meta.Author));

      DvDevice device = ServiceRegistration.Get<IBackendServer>().UPnPBackendServer.FindDevicesByDeviceTypeAndVersion(UPnPTypesAndIds.BACKEND_SERVER_DEVICE_TYPE, UPnPTypesAndIds.BACKEND_SERVER_DEVICE_TYPE_VERSION, true).FirstOrDefault();
      if (device != null)
      {
        var slimTvService = new SlimTvService();
        slimTvService.Init();
        ServiceRegistration.Set<ITvProvider>(slimTvService);
        Logger.Debug("SlimTvService: Registered SlimTvService.");
        device.AddService(new SlimTvServiceImpl());
        Logger.Debug("SlimTvService: Adding SlimTvService to MP2 backend root device");
      }
      else
      {
        Logger.Error("SlimTvService: MP2 backend root device not found!");
      }
    }
        public void Activated(PluginRuntime pluginRuntime)
        {
            var meta = pluginRuntime.Metadata;

            Logger.Info(string.Format("{0} v{1} [{2}] by {3}", meta.Name, meta.PluginVersion, meta.Description, meta.Author));

            DvDevice device = ServiceRegistration.Get <IBackendServer>().UPnPBackendServer.FindDevicesByDeviceTypeAndVersion(UPnPTypesAndIds.BACKEND_SERVER_DEVICE_TYPE, UPnPTypesAndIds.BACKEND_SERVER_DEVICE_TYPE_VERSION, true).FirstOrDefault();

            if (device != null)
            {
                var slimTvService = new SlimTvService();
                slimTvService.Init();
                ServiceRegistration.Set <ITvProvider>(slimTvService);
                Logger.Debug("SlimTvService: Registered SlimTvService.");
                device.AddService(new SlimTvServiceImpl());
                Logger.Debug("SlimTvService: Adding SlimTvService to MP2 backend root device");
            }
            else
            {
                Logger.Error("SlimTvService: MP2 backend root device not found!");
            }
        }