<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>DevForce Community Forum : DeSerialization</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2009 : DeSerialization</description>
  <pubDate>Tue, 12 May 2026 19:36:18 -700</pubDate>
  <lastBuildDate>Wed, 21 Jul 2010 19:13:44 -700</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 9.69</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.ideablade.com/forum/RSS_post_feed.asp?TID=1974</WebWizForums:feedURL>
  <image>
   <title>DevForce Community Forum</title>
   <url>http://www.ideablade.com/forum/forum_images/IdeaBlade_logo_tm.png</url>
   <link>http://www.ideablade.com/forum/</link>
  </image>
  <item>
   <title>DeSerialization : In DevForce 2009, it is not possible...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1974&amp;PID=7738#7738</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=477" rel="nofollow">ting</a><br /><strong>Subject:</strong> 1974<br /><strong>Posted:</strong> 21-Jul-2010 at 7:13pm<br /><br />In DevForce 2009, it is not possible to serialize an entity by itself outside of the cache.&nbsp; This works in DevForce 2010 however.<DIV></DIV>]]>
   </description>
   <pubDate>Wed, 21 Jul 2010 19:13:44 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1974&amp;PID=7738#7738</guid>
  </item> 
  <item>
   <title>DeSerialization : Hi there.  I just cant seem...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1974&amp;PID=7676#7676</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=384" rel="nofollow">DjStitch</a><br /><strong>Subject:</strong> 1974<br /><strong>Posted:</strong> 19-Jul-2010 at 6:16am<br /><br />Hi there.<DIV>&nbsp;</DIV><DIV>I just cant seem to get this right, after Serialization my objects graph using <FONT size=2>NetDataContractSerializer i want ot use the same file to&nbsp;DeSerialization it back to the objects but i get an error. Please tell me what i'm doing wrong</FONT></DIV><DIV><FONT size=2>Here is my code:</FONT></DIV><DIV><FONT size=2></FONT>&nbsp;</DIV><FONT size=2><FONT size=2><P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>Dim</FONT></FONT><FONT size=2> serializer = </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>New</FONT></FONT><FONT size=2> NetDataContractSerializer() </FONT><FONT color=#008000 size=2><FONT color=#008000 size=2>' simpler because no need for</P></FONT></FONT><FONT size=2><P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>Dim</FONT></FONT><FONT size=2> ms = </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>New</FONT></FONT><FONT size=2> MemoryStream()</P><P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>Dim</FONT></FONT><FONT size=2> writer = System.Xml.XmlDictionaryWriter.CreateTextWriter(ms)</P><P>serializer.WriteObject(writer, g_Cust_Main)</P><P>writer.Flush()</P><P>ms.Position = 0</P><P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>Dim</FONT></FONT><FONT size=2> result = StreamFns.ToString(ms)</P><P>WriteReplyFile(sFileName, result)</P><DIV><FONT size=2><P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>Public</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>Function</FONT></FONT><FONT size=2> ReturnObject(</FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>ByVal</FONT></FONT><FONT size=2> fileName </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>As</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>String</FONT></FONT><FONT size=2>) </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>As</FONT></FONT><FONT size=2> cust_main</P><P></FONT><FONT color=#008000 size=2><FONT color=#008000 size=2>'Console.WriteLine("Deserializing an instance of the object.")</P></FONT></FONT><FONT size=2><P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>Dim</FONT></FONT><FONT size=2> fs </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>As</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>New</FONT></FONT><FONT size=2> FileStream(fileName, FileMode.Open)</P><P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>Dim</FONT></FONT><FONT size=2> serializer </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>As</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>New</FONT></FONT><FONT size=2> System.Runtime.Serialization.NetDataContractSerializer()</P><P></FONT><FONT color=#008000 size=2><FONT color=#008000 size=2>' simpler because no need for</P></FONT></FONT><FONT size=2><P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>Dim</FONT></FONT><FONT size=2> reader </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>As</FONT></FONT><FONT size=2> XmlDictionaryReader = XmlDictionaryReader.CreateTextReader(fs, </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>New</FONT></FONT><FONT size=2> XmlDictionaryReaderQuotas())</P><P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>Dim</FONT></FONT><FONT size=2> acust_main </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>As</FONT></FONT><FONT size=2> cust_main = </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>CType</FONT></FONT><FONT size=2>(serializer.ReadObject(reader, </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>True</FONT></FONT><FONT size=2>), cust_main)</P><P>reader.Close()</P><P>fs.Close()</P><P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>Return</FONT></FONT><FONT size=2> acust_main</P><P></P><P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>End</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>Function</P><DIV>&nbsp;</DIV><DIV>The reason why i'm using Serializer is i want toi interact with anoter system / software and if I use</DIV><DIV><FONT size=2><P>_ServerMgr.CacheStateManager.SaveCacheState the data is not readable, is there maybe another way i can aprotch this ?</P></FONT></DIV><DIV></FONT></FONT></FONT>&nbsp;</DIV></DIV><DIV>&nbsp;&nbsp;</FONT></DIV>]]>
   </description>
   <pubDate>Mon, 19 Jul 2010 06:16:17 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1974&amp;PID=7676#7676</guid>
  </item> 
 </channel>
</rss>