在WCF是有可能委托传递给远程对象? [英] In WCF is it possible to pass a delegate to the remote object?

查看:85
本文介绍了在WCF是有可能委托传递给远程对象?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有可能委托从客户端传递到WCF远程对象,并具有远程对象执行委托?

Is it possible to pass a delegate to a WCF remote object from the client and have the remote object execute the delegate?

我想不是因为delgate是一个函数指针的客户端进程。

I would guess not since a delgate is a function pointer for the client process.

我的目标是有,我可以从一个客户端的订阅事件的接口的接口结构。我将通过一个delgate从客户机到该接口和我希望接口能够执行事件。

My goal is to have an interface structure that I can "subscribe" to events from a client to the interface. I would pass a delgate from the client to the interface and I want the interface to be able to execute the event.

的想法是有能力的接口要加载任一组件或remotly和具有code工作相同。

The idea is to have the ability for the interface to be loaded either the assembly or remotly and have the code work the same.

如果我无法通过我怎么能实现一个事件结构的委托?

If I can't pass the delegate how can I implement an event structure?

推荐答案

不是在C#本身的一个代表,但在WCF您有双面打印绑定启用呼叫从服务端向客户端返回

not a "delegate" in C# per se, but in WCF you have duplex bindings to enable call back from the service side to the client side

http://msdn.microsoft.com/en-us/library/system.servicemodel.wsdualhttpbinding.aspx

这篇关于在WCF是有可能委托传递给远程对象?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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