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);
      }
    }
示例#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);
		}
示例#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);
 }
示例#4
0
 public void RemoveHttpModule(HttpModule module)
 {
   _httpServerV4.Remove(module);
   _httpServerV6.Remove(module);
 }
示例#5
0
 public void AddHttpModule(HttpModule module)
 {
   _httpServerV4.Add(module);
   _httpServerV6.Add(module);
 }
示例#6
0
 public void RemoveHttpModule(HttpModule module)
 {
   _httpServers.Values.ToList().ForEach(x => x.Remove(module));
 }
示例#7
0
 public void AddHttpModule(HttpModule module)
 {
   _httpServers.Values.ToList().ForEach(x => x.Add(module));
 }