Ejemplo n.º 1
0
    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));

      IResourceServer server = ServiceRegistration.Get<IResourceServer>();
      if (server != null)
      {
        ServiceRegistration.Set<IFanArtService>(new FanArtService());
        _fanartModule = new FanartAccessModule();
        server.AddHttpModule(_fanartModule);
      }
    }
Ejemplo n.º 2
0
		/// <summary>
		/// Add a <see cref="HttpModule"/> to the server.
		/// </summary>
		/// <param name="module">mode to add</param>
		public void Add(HttpModule module)
		{
			_modules.Add(module);
		}
Ejemplo n.º 3
0
 /// <summary>
 /// Removes a <see cref="HttpModule"/> from the server.
 /// </summary>
 /// <param name="module">Module to remove.</param>
 // Added by Albert, Team-MediaPortal: It must be possible to remove modules at runtime.
 public void Remove(HttpModule module)
 {
   _modules.Remove(module);
 }
Ejemplo n.º 4
0
 public void RemoveHttpModule(HttpModule module)
 {
   _httpServerV4.Remove(module);
   _httpServerV6.Remove(module);
 }
Ejemplo n.º 5
0
 public void AddHttpModule(HttpModule module)
 {
   _httpServerV4.Add(module);
   _httpServerV6.Add(module);
 }
Ejemplo n.º 6
0
 public void RemoveHttpModule(HttpModule module)
 {
   _httpServers.Values.ToList().ForEach(x => x.Remove(module));
 }
Ejemplo n.º 7
0
 public void AddHttpModule(HttpModule module)
 {
   _httpServers.Values.ToList().ForEach(x => x.Add(module));
 }