“通过线路”触发事件 在.net中

发布于 2024-07-17 03:55:57 字数 266 浏览 2 评论 0原文

我需要一种方法来“通过线路”触发远程进程上的事件并传递参数(xml 序列化,等等)。 我希望能够做这样的事情。

foreach(childClient c in clientList)
{
    MyEvent += c.EventHandler;
}

MyEvent("param");

哪些技术对此有好处? 世界CF?

这是内部软件项目的小型部署,因此设计开销最小是一个优点,不必“快速”并且不会处理大量流量。

I need a way to trigger events on remote processes "over the wire" and pass parameters (xml serialization, whatever). I want to be able to do things like this.

foreach(childClient c in clientList)
{
    MyEvent += c.EventHandler;
}

MyEvent("param");

what technologies are good for this? WCF?

This is a small deployment in house software project so minimal overhead in design is a plus, doesn't have to be "fast" and won't handle large amounts of traffic.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

给我一枪 2024-07-24 03:55:57

有多种方法可以实现此目的,但 WCF 是最适合 .NET 代码的方法。 如果您在内部,那么希望防火墙等不会太令人担忧,并且您可以使用全双工的 NET.TCP 绑定。 您想阅读回调合约。

有很多示例,例如这个

There are a number of ways of doing this, but WCF is the best match for .NET code. If you are in-house then hopefully firewalls, etc aren't too much of a concern, and you can use the NET.TCP bindings which are full duplex. You want to read up on callback contracts.

There are a number of examples out there, such as this one.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文