On 18 May 2005, at 18:21, Tysnes Are Thobias wrote:
I guess it's not possible to tell the Source Generator to do this !?
(anyone !?)

As I said; I don't use SourceGen, as a rule, partly because I don't like the code it creates, and partly because I don't like 'value objects' that don't have behavior; I tend to dislike the separation of behavior that source generators generally infer.


Would be happy if you could kick me to some tutorials/examples on
how to make custom marshal methods.. Do I have to make one for each
object ? or each Web Service !? I'm a green xml newbie :o)
It's just a matter of creating a Marshaller or Unmarshaller, handing it a descriptor, and setting the namespace information on it.

Just off the top of my head - in order for an automatically-generated namespace to be correct, you'd have to ask the descriptor of each child to be marshalled what its namespace values were, gather that information in a first pass, and then, on the second-pass serialization effort, write the namespace information, generate the namespace names if they weren't provided by the original source mapping, and then run the serialization on the objects.

A complicated process, all to get around creating a Marshaller object and asking your object to be marshalled via its descriptor. :)

If I have to develope marshal methods for each object I will prefer to
add this feature to the Code Generator instead. (Automatic code
generation is the way to go :o)

I'll let some of the others tackle this; the black magic of sourcegen are well outside of my sphere of knowledge. Maybe there's something that can be done to SourceGen that would make this a little better, I don't know.

Reply via email to