Data contract diagram features

Mar 11, 2008 at 10:51 AM
Hi all

Is it possible to:
- automatically set the order property of each one of a data contract entity according to their position in the properties list
- move a data contract entity property to another position in the list


Thanks in advance
Mar 11, 2008 at 2:48 PM
and another newbie question

Is it possible in the service contract, while creating the request message, to specify the order in which primitive attributes will be available in the operation's signatue?

Mar 11, 2008 at 2:58 PM

You can get both of those behaviors, but it will require that you make some modifications to the Service Factory source code. I've done it and it works great, but now after each of the Service Factory source releases I need to go and reapply my changes. I'd be happy to share the details on how i did it if you'd like.

Mar 11, 2008 at 6:17 PM

Are you referring to the Order property on each DataMember of your DataContract? If so, you can use the "Order All Data Members" recipe provided in WSSF:ME 2008 version right clicking on the DC model. That will set the Order property of all DataMembers in every DataContract element.
Regarding your question on changinh the position in the list there's no way unless you recreate the list in the required order.
As Andy wrote above, you can update the text template used to generate the SC code where you can freely specify not only the order of your operation parameters but many other things of your generated code.
Mar 12, 2008 at 8:01 AM
Thanks to both of you

I'm glad to know the feature has been implemented in V2008, I can't wait for the final release...

Concerning the primitive attributes rendering in the operation's signature, do I also have to modify the source code?

Thanks in advance

Mar 12, 2008 at 9:25 AM

Regarding the RTM for VS2008 you can go now and download it :-)
Any changes to the operation signature can be done directly in the text template file (.tt) located in "\Service Contract DSL\Dsl\TextTemplates\WCF\CS\"
Mar 13, 2008 at 8:35 AM
Great, I hadn't noticed it was available yet
Thanks Charly
Mar 13, 2008 at 9:21 PM
If you get so inclined, I created an article on code gallery that describes the changes you can make to the Service Factory soucre to have the Order property reflect the DataMember's position as well as how to add support to change a DataMember's postion using Alt-ArrowUp and Alt-ArrowDown.

Mar 14, 2008 at 9:57 AM
Thanks Andy
I think I'll start migrating to V2008 and take a look at your code if needed
Feb 9, 2011 at 3:36 PM

Hi, im sorry, i know this post is too old, but i want to use your code to modify the wssf, but it isn't in the code gallery.

Could you please upload again your code????