Rob Chartier ~ Contemplation...

.NET, C#, Work, etc.

News






www.flickr.com
This is a Flickr badge showing public photos from Rob & Kat Chartier. Make your own badge here.


Even Quicker Links

The answer about Xml Serialization...

If you read: http://www.gotdotnet.com/team/douglasp/ you will see he asks "A question about XML Serialization".  I took the second to see what he was getting at. 

Take a look for yourself:

http://www.aspalliance.com/nothingmn/XmlSerializationAnswer.rar

Posted: Mar 27 2003, 01:57 AM by Rob Chartier | with 3 comment(s)
Filed under:

Comments

Christian Weyer said:

Hi Rob,

nice. But I posted a 'solution' some time ago ... take this:
http://dotnetweblogs.com/Cweyer/posts/2615.aspx

:-)

Cheers,
Christian
# March 27, 2003 5:21 AM

Daniel Bright said:

Could you guys please explain what these files are & why this happens for us neophytes?
# March 27, 2003 5:54 AM

Rob Chartier said:

Christian,

I checked everywhere to see if anyone had already posted some code or any attempt at it, and unfortunatly i didnt see your posting. Oh well.


Daniel,

If you take a look at the source, you will see that during the XmlSerialization process when that debugger switch is set to 1, it will emit the souce code, compiler command and results, and the emitted assemblies for the serialization process.

Specifically if you take a look at the System.Xml.Serialization.Compiler class, the Compile() member with Anakrino (http://www.saurik.com/net/exemplar/) you will see this section:

if (CompModSwitches.KeepTempFiles.Enabled) {
local2.GenerateInMemory = false;
local2.IncludeDebugInformation = true;
local2.TempFiles = new TempFileCollection();
local2.TempFiles.KeepFiles = true;
}
else
local2.GenerateInMemory = true;
etc....


--Assuming this is the correct section that we should be looking at, it does seem pretty obvious as to what its doing. If not, examine the Compile() method in more detail.


# March 27, 2003 7:23 AM
Leave a Comment

(required) 

(required) 

(optional)

(required)