对于.NET一个简单的事件总线 [英] A simple event bus for .NET

查看:586
本文介绍了对于.NET一个简单的事件总线的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想打一个很简单的事件总线,这将允许任何客户端订阅特定类型的事件,当任何发行商推动使用 EventBus.PushEvent()在总线上的事件方法只订阅了该特定事件类型会得到事件的客户端。

I want to make a very simple event bus which will allow any client to subscribe to a particular type of event and when any publisher pushes an event on the bus using EventBus.PushEvent() method only the clients that subscribed to that particular event type will get the event.

我使用C#和.NET 2.0。

I am using C# and .NET 2.0.

推荐答案

我发现的通用消息总线 的。这是一个简单的类。

I found Generic Message Bus . It is one simple class.

这篇关于对于.NET一个简单的事件总线的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆