<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://msmvps.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Rakesh Rajan's blog : .NET 2.0</title><link>http://msmvps.com/blogs/rakeshrajan/archive/tags/.NET+2.0/default.aspx</link><description>Tags: .NET 2.0</description><dc:language>en</dc:language><generator>CommunityServer 2008.5 SP2 (Build: 40407.4157)</generator><item><title>Class to Xml tool (test version)</title><link>http://msmvps.com/blogs/rakeshrajan/archive/2006/02/18/84120.aspx</link><pubDate>Sat, 18 Feb 2006 15:15:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:84120</guid><dc:creator>rakeshrajan</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/rakeshrajan/rsscomments.aspx?PostID=84120</wfw:commentRss><comments>http://msmvps.com/blogs/rakeshrajan/archive/2006/02/18/84120.aspx#comments</comments><description>&lt;H1&gt;Summary &lt;/H1&gt;
&lt;P&gt;CTX (Class to Xml) tool is a very simple tool which provides you a code editing environment in C# and VB.NET, compiles the source codes and lets you see the Xml output of all serializable types once successfully compiled. &lt;/P&gt;&lt;BR&gt;&lt;a href="http://msmvps.com/photos/rakesh_rajans_blog/images/84118/original.aspx" target=_blank&gt;&lt;IMG src="/photos/rakesh_rajans_blog/images/84118/500x358.aspx" border=0&gt; &lt;/A&gt;
&lt;H1&gt;Intro&lt;/H1&gt;
&lt;P&gt;Do you use Xml Serialization in .NET – if yes, you might be interested in this tool! &lt;/P&gt;
&lt;P&gt;Have you ever thought "Hmm…now that I have written a serializable class, I wonder how will it look when it is Xml Serialized"? &lt;/P&gt;
&lt;P&gt;If yes, you are in good company :). Sometime back I was involved in a project in which I had to develop a lot of business entity classes which would be Xml Serialized. Since these classes had to adhere to a specific schema, I had a tough time synchronizing the Xml Attributes and the final xml schema it generated when xml serialized. &lt;/P&gt;
&lt;P&gt;The sequence of how I would go about doing this was like this: 
&lt;OL&gt;
&lt;LI&gt;I would develop a draft version of xml schema. 
&lt;LI&gt;I would create a simple console project in which I would start writing the class to be serialized. 
&lt;LI&gt;This project will have a small code snippet which will create an instance of the serializable class and xml serialize it and then finally print out the xml output. 
&lt;LI&gt;I will keep comparing this output with my xml schema until they are in sync.&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;As I got involved in more and more projects (many of them my own :) ) which came to have similar requirements, I decided to create a little tool which would automate the above tasks. &lt;/P&gt;
&lt;P&gt;Introducing the Class to Xml (CTX) tool - a very simple tool which provides you a code editing environment in C# and VB.NET, compiles the source codes and lets you see the Xml output of all serializable types once successfully compiled. &lt;/P&gt;
&lt;H1&gt;How to use the tool&lt;/H1&gt;
&lt;P&gt;
&lt;OL&gt;
&lt;LI&gt;Open up the source code files of the serializable classes you want to get the xml for (including all the files that are referenced) and select the language. 
&lt;LI&gt;Press F5. The whole list of files will be compiled. 
&lt;LI&gt;If compilation is successful, the Output pane would list all serializable types available in the assembly. If compilation failed, the Errors pane would list the errors. 
&lt;LI&gt;After successful compilation, select the required serializable type in the combo box; the Xml representation is displayed in the Serialized Xml text box. &lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;&lt;/P&gt;
&lt;H1&gt;Download&lt;/H1&gt;
&lt;P&gt;The current test version&amp;nbsp;source code (probably terrible) in Visual Studio 2005 is available here &lt;B&gt;(The site is down due to site maintenance, please wait while I resolve this ASAP)&lt;/B&gt;.&lt;BR&gt;Do check it out and let me know your comments. &lt;/P&gt;
&lt;P&gt;I plan to finalize the code soon…er, I have no idea how “soon” though&amp;nbsp;:) &lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=84120" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/rakeshrajan/archive/tags/.NET/default.aspx">.NET</category><category domain="http://msmvps.com/blogs/rakeshrajan/archive/tags/.NET+2.0/default.aspx">.NET 2.0</category></item><item><title>Session Start event in .NET 2.0 seems to be updated</title><link>http://msmvps.com/blogs/rakeshrajan/archive/2005/08/07/61937.aspx</link><pubDate>Mon, 08 Aug 2005 04:17:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:61937</guid><dc:creator>rakeshrajan</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/rakeshrajan/rsscomments.aspx?PostID=61937</wfw:commentRss><comments>http://msmvps.com/blogs/rakeshrajan/archive/2005/08/07/61937.aspx#comments</comments><description>&lt;p&gt;
In .NET 1.x, the session start event would be invoked if an unhandled exception propagates out of the application scope (in additional to the normal invocation). This meant that the code in the session start event handler may be called multiple times during the same session, which isn’t good.
&lt;/p&gt;
&lt;p&gt;
I fiddled with little snippets of code in Whidbey beta 2, and it seems this has been resolved in .NET 2.0.
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=61937" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/rakeshrajan/archive/tags/.NET+2.0/default.aspx">.NET 2.0</category></item><item><title>HttpUnhandledException and HttpParseException - they are now Serializable :)</title><link>http://msmvps.com/blogs/rakeshrajan/archive/2005/07/08/56718.aspx</link><pubDate>Sat, 09 Jul 2005 00:09:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:56718</guid><dc:creator>rakeshrajan</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/rakeshrajan/rsscomments.aspx?PostID=56718</wfw:commentRss><comments>http://msmvps.com/blogs/rakeshrajan/archive/2005/07/08/56718.aspx#comments</comments><description>&lt;P&gt;In .NET 1.x, these exceptions weren't serializable - which meant we couldn't persist/transport them in a direct manner.&lt;/P&gt;
&lt;P&gt;Thankfully, .NET 2.0 has both of them serializable &lt;a title="" href="." &gt;&lt;img src="http://msmvps.com/images/msmvps_com/rakeshrajan/1260/o_smile.gif" border=0 /&gt;&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=56718" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/rakeshrajan/archive/tags/.NET+2.0/default.aspx">.NET 2.0</category></item></channel></rss>