WCF extenders serialization

May 20, 2008 at 7:32 AM
Why the extender properties doesn't have serialization possibility (such as IsWrapped and others). When the solution is closed all of the model's informations (which have been stored as extender's properties) will be lost. Is there any easy solution to resolve this or the best one is adaptability of the DSL's SDK templates such as DomainClassCodeGenerator.tt or DomainProperty.tt.


Rastko Isajev
May 20, 2008 at 10:05 AM
Not sure if I got your point.
Actually the extender properties such as the one you mention already serialize as XML or binary in case it could not serialize to XML. This should be the case to any other custom extender and all its proprties as well.

May 20, 2008 at 11:38 AM
I mean in front on .servicecontract repository document that has been derived with usage of Serializer.cs (WritePropertiesAsAttributes method) and all of the content that is serialized (when you Save model) in this file are properties from Domain model elements (such as Service or Operation model element) . Now there are not saved properties that are part of WCFExtender classes. When you build up new model and Impl. Tech. and check some message's Wrapping property to true , save all , close solution and open it again then this Wrapp property will be again (as default) false.

Did you get what i have meant ?

Thank you
May 20, 2008 at 8:25 PM
Did you check inside the .servicecontract xml file that those properties were actually serialized to the appropiate value?
Our tests couldn't repro your scenario that is, we always get the expected value after reopening the model file.
May 21, 2008 at 6:37 AM
I solved this problem yesterday with adding [XmlAttribute] above the propeties. Only with this attribute the model's properties were saved (serialized) and after reopening the VS i find again primordially property values.