I would like to create an [CustomDataMember]
attribute that override the formatter behavior of DataContractSerializer
through an IOperationBehavior
. I have followed the instructions given by Aaron Skonnard but when I call the DCS serializer, the custom behavior does not get neither instantiated nor called.
Obviously, I am missing something, probably at the level of the constructor call of DataContractSerializer
. Does anyone knows what could be done to get the behavior properly injected in the DCS?