开发者

DataMember's name

开发者 https://www.devze.com 2023-02-26 03:58 出处:网络
Is it possible somehow to add DataContract/DataMember attributes for existing binary classes (available only as compiled dll)? The main goal is to set DataMember name, to avoid ugly property names for

Is it possible somehow to add DataContract/DataMember attributes for existing binary classes (available only as compiled dll)? The main goal is to set DataMember name, to avoid ugly property names for generated proxies. I think, I am looking for something like metadata classes in WCF RIA services, but maybe there is some better a开发者_如何学运维pproach. Thanks!

P.S. IL modification is not an option.


In the end all the attributes are no more than a bit of metadata used to generate the WSDL and scheme. If you look at workflow services you will not find an interface with a ServiceContract and methonds with OperationContract but the same kind of WSDL is still generated by the WCF infrastructure. The same should be possible with a regular WCF service.

I have never done so but this blog post about programatically creating a WCF contract should point you in the right direction.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号