mirror of
https://github.com/Caraxi/mare.client.git
synced 2025-12-13 12:44:14 +01:00
fully switch to mediator from events
This commit is contained in:
parent
5e7beb8518
commit
41465c2d49
24 changed files with 166 additions and 239 deletions
18
MareSynchronos/Utils/MediatorSubscriberBase.cs
Normal file
18
MareSynchronos/Utils/MediatorSubscriberBase.cs
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
using MareSynchronos.Mediator;
|
||||
|
||||
namespace MareSynchronos.Utils;
|
||||
|
||||
public abstract class MediatorSubscriberBase : IDisposable
|
||||
{
|
||||
protected MediatorSubscriberBase(MareMediator mediator)
|
||||
{
|
||||
Mediator = mediator;
|
||||
}
|
||||
|
||||
protected MareMediator Mediator;
|
||||
|
||||
public virtual void Dispose()
|
||||
{
|
||||
Mediator.UnsubscribeAll(this);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue