WCF DataContract GetCustomDataToExport

Posted by JeffN825 on Stack Overflow See other posts from Stack Overflow or by JeffN825
Published on 2011-01-14T12:29:06Z Indexed on 2011/01/14 14:53 UTC
Read the original article Hit count: 224

I'm trying to get the default behavior for a client referencing my WCF WSDL to set IsReference to true on the imported DataContracts. It looks like I should be able to use an IDataContractSurrogate with GetCustomDataToExport to accomplish this...which specifcally means adding the following to the generated ComplexType in the xsd associated with the WSDL:

  <xs:attribute ref="ser:Id" /> 
  <xs:attribute ref="ser:Ref" /> 

There is, of course no usable documentation I can find from MS about how to use this method. The MSDN page says it should return an object...but does not indicate at all what type of object this should be....how useless...

Before I go reflector'ing for this, does anyone out there know how to use this method?

Thanks.

© Stack Overflow or respective owner

Related posts about .NET

Related posts about wcf