mirror of
https://github.com/nsnail/NetAdmin.git
synced 2025-04-23 14:42:51 +08:00
chore: 🔨 事件发布器接口通道数量
[skip ci]
This commit is contained in:
parent
4afda0fbde
commit
6fed7ec752
@ -23,7 +23,7 @@
|
|||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="SonarAnalyzer.CSharp" Version="10.6.0.109712">
|
<PackageReference Include="SonarAnalyzer.CSharp" Version="10.7.0.110445">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
|
@ -28,6 +28,9 @@ public sealed class DefaultEventPublisher : IEventPublisher
|
|||||||
}, App.EffectiveTypes.Where(x => typeof(IEventSubscriber).IsAssignableFrom(x) && x.IsClass && !x.IsAbstract).SelectMany(x => x.GetMethods(BindingFlags.Instance | BindingFlags.Public).Where(y => y.IsDefined(typeof(EventSubscribeAttribute)))).ToList());
|
}, App.EffectiveTypes.Where(x => typeof(IEventSubscriber).IsAssignableFrom(x) && x.IsClass && !x.IsAbstract).SelectMany(x => x.GetMethods(BindingFlags.Instance | BindingFlags.Public).Where(y => y.IsDefined(typeof(EventSubscribeAttribute)))).ToList());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public int ChannelCount => _eventChannel.Reader.Count;
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public async Task PublishAsync<T>(IEventData<T> eventData)
|
public async Task PublishAsync<T>(IEventData<T> eventData)
|
||||||
{
|
{
|
||||||
|
@ -5,6 +5,11 @@ namespace NetAdmin.Infrastructure.EventBus;
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IEventPublisher
|
public interface IEventPublisher
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 通道数量
|
||||||
|
/// </summary>
|
||||||
|
int ChannelCount { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 发布一条消息
|
/// 发布一条消息
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user