mirror of
https://github.com/Caraxi/mare.client.git
synced 2025-12-12 17:07:22 +01:00
configuration rework
This commit is contained in:
parent
f389bed4e1
commit
7c97d1994c
50 changed files with 722 additions and 275 deletions
6
MareSynchronos/Mediator/IMediatorSubscriber.cs
Normal file
6
MareSynchronos/Mediator/IMediatorSubscriber.cs
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
namespace MareSynchronos.Mediator;
|
||||
|
||||
public interface IMediatorSubscriber : IDisposable
|
||||
{
|
||||
MareMediator Mediator { get; }
|
||||
}
|
||||
|
|
@ -1,5 +1,4 @@
|
|||
using Dalamud.Interface.Windowing;
|
||||
using MareSynchronos.Utils;
|
||||
using MareSynchronos.Utils;
|
||||
|
||||
namespace MareSynchronos.Mediator;
|
||||
|
||||
|
|
@ -17,23 +16,3 @@ public abstract class MediatorSubscriberBase : IMediatorSubscriber
|
|||
Mediator.UnsubscribeAll(this);
|
||||
}
|
||||
}
|
||||
|
||||
public abstract class WindowMediatorSubscriberBase : Window, IMediatorSubscriber
|
||||
{
|
||||
public MareMediator Mediator { get; }
|
||||
protected WindowMediatorSubscriberBase(MareMediator mediator, string name) : base(name)
|
||||
{
|
||||
Mediator = mediator;
|
||||
}
|
||||
|
||||
public virtual void Dispose()
|
||||
{
|
||||
Logger.Verbose($"Disposing {GetType()}");
|
||||
Mediator.UnsubscribeAll(this);
|
||||
}
|
||||
}
|
||||
|
||||
public interface IMediatorSubscriber : IDisposable
|
||||
{
|
||||
MareMediator Mediator { get; }
|
||||
}
|
||||
|
|
|
|||
19
MareSynchronos/Mediator/WindowMediatorSubscriberBase.cs
Normal file
19
MareSynchronos/Mediator/WindowMediatorSubscriberBase.cs
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
using Dalamud.Interface.Windowing;
|
||||
using MareSynchronos.Utils;
|
||||
|
||||
namespace MareSynchronos.Mediator;
|
||||
|
||||
public abstract class WindowMediatorSubscriberBase : Window, IMediatorSubscriber
|
||||
{
|
||||
public MareMediator Mediator { get; }
|
||||
protected WindowMediatorSubscriberBase(MareMediator mediator, string name) : base(name)
|
||||
{
|
||||
Mediator = mediator;
|
||||
}
|
||||
|
||||
public virtual void Dispose()
|
||||
{
|
||||
Logger.Verbose($"Disposing {GetType()}");
|
||||
Mediator.UnsubscribeAll(this);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue