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.
精彩评论