Packages can be loaded/unloaded. IUnloadableService interface added whose method Unload, if service implements it, will be called when the module is unloaded.

This commit is contained in:
Master Kwoth
2017-10-05 00:51:12 +02:00
parent 599245b1ca
commit 33ac43e1b5
74 changed files with 866 additions and 520 deletions

View File

@ -1,4 +1,6 @@
namespace NadekoBot.Services
using System.Threading.Tasks;
namespace NadekoBot.Services
{
/// <summary>
/// All services must implement this interface in order to be auto-discovered by the DI system
@ -7,4 +9,12 @@
{
}
/// <summary>
/// All services which require cleanup after they are unloaded must implement this interface
/// </summary>
public interface IUnloadableService
{
Task Unload();
}
}