在运行时应用FaultContract [英] Apply FaultContract at Runtime

查看:76
本文介绍了在运行时应用FaultContract的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



是否可以在运行时将FaultContract服装应用于服务中的方法?

我们有很多服务,它们都可以导致标准捕获ServiceFault或TimeoutFault.

我希望能够在服务启动时在运行时应用这些Fault Contract属性,而不是遍历每个服务并将它们应用于每种方法.

Hi

Is it possible to apply FaultContract attibutes to methods in a service at runtime?

We have lots of services and they can all result in a standard catch all ServiceFault or a TimeoutFault.

I would like to be able to apply these Fault Contract attributes at runtime when the services start rather than go through every service and apply them to every method. Is this possible?

推荐答案

因为这并不是真正针对WCF的(它只是在运行时向方法添加属性),也许下面的链接会有所帮助? br/> http://stackoverflow.com/questions/268426/how-do-i-add-attributes-to-a-method-at-runtime
Because this is not really specific to WCF (it's just adding an attribute to a method at runtime), maybe the following link will help?
http://stackoverflow.com/questions/268426/how-do-i-add-attributes-to-a-method-at-runtime


这篇关于在运行时应用FaultContract的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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