Files
gregCore/src/PublicApi/GregEventBusPublic.cs
T
Marvin 9e6f25c54a
Sponsor Tier Sync / sync (push) Failing after 34s
gregCore CI / build (push) Has been cancelled
chore: sync gregCore workspace updates
2026-04-20 03:02:39 +02:00

21 lines
669 B
C#

/// <file-summary>
/// Schicht: PublicApi
/// Zweck: Öffentlicher Wrapper für den EventBus.
/// Maintainer: Verhindert unautorisierte Zugriffe (z.B. ClearAll).
/// </file-summary>
namespace gregCore.PublicApi;
public sealed class GregEventBusPublic
{
private readonly IGregEventBus _internalBus;
public GregEventBusPublic(IGregEventBus internalBus)
{
_internalBus = internalBus;
}
public void Subscribe(string hookName, Action<EventPayload> handler) => _internalBus.Subscribe(hookName, handler);
public void Unsubscribe(string hookName, Action<EventPayload> handler) => _internalBus.Unsubscribe(hookName, handler);
}