add NotificationService, cleanup
This commit is contained in:
16
MareSynchronos/Mediator/MediatorSubscriberBase.cs
Normal file
16
MareSynchronos/Mediator/MediatorSubscriberBase.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
namespace MareSynchronos.Mediator;
|
||||
|
||||
public abstract class MediatorSubscriberBase : IDisposable
|
||||
{
|
||||
protected MediatorSubscriberBase(MareMediator mediator)
|
||||
{
|
||||
Mediator = mediator;
|
||||
}
|
||||
|
||||
protected readonly MareMediator Mediator;
|
||||
|
||||
public virtual void Dispose()
|
||||
{
|
||||
Mediator.UnsubscribeAll(this);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user