24 lines
572 B
C#
24 lines
572 B
C#
#nullable enable
|
|
|
|
using System;
|
|
using System.Threading;
|
|
using Cysharp.Threading.Tasks;
|
|
|
|
namespace ShrinkEventBus
|
|
{
|
|
public interface IShrinkEventBus : IDisposable
|
|
{
|
|
ShrinkBusKey Key { get; }
|
|
ShrinkBusOptions Options { get; }
|
|
|
|
ShrinkPostResult Post<TEvent>(in TEvent eventData)
|
|
where TEvent : IShrinkEvent;
|
|
|
|
UniTask<ShrinkPostResult> PostAsync<TEvent>(TEvent eventData,
|
|
CancellationToken cancellationToken = default)
|
|
where TEvent : IShrinkEvent;
|
|
|
|
IDisposable Attach(object target);
|
|
}
|
|
}
|