<?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 : Partial class fields not being initialized</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : Partial class fields not being initialized</description>
  <pubDate>Sat, 11 Apr 2026 13:27:36 -700</pubDate>
  <lastBuildDate>Wed, 21 Jul 2010 16:04:24 -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=1988</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>Partial class fields not being initialized : This is per design, that there...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1988&amp;PID=7729#7729</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=23" rel="nofollow">davidklitzke</a><br /><strong>Subject:</strong> 1988<br /><strong>Posted:</strong> 21-Jul-2010 at 4:04pm<br /><br /><P =Ms&#111;normal><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'">This is per design, that there is actually a comment in the DF2010 release notes for version 6.0.1.<?: prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></P><P =Default><o:p>&nbsp;</o:p><SPAN style="FONT-SIZE: 10pt">A custom field intializer that you added to your entity (e.g., private int foo = 42;) may not always be set for every new instance. Our client-side “entity materialization” logic can by-pass field initializations. To ensure that “foo” is initialized, either set it lazily or mark “foo” as a WCF DataMember <o:p></o:p></SPAN></P><P =Ms&#111;normal><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"><o:p>&nbsp;</o:p></SPAN></P>]]>
   </description>
   <pubDate>Wed, 21 Jul 2010 16:04:24 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1988&amp;PID=7729#7729</guid>
  </item> 
  <item>
   <title>Partial class fields not being initialized : We&amp;#039;ve been struggling with...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1988&amp;PID=7724#7724</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=452" rel="nofollow">ken.nelson</a><br /><strong>Subject:</strong> 1988<br /><strong>Posted:</strong> 21-Jul-2010 at 11:30am<br /><br />We've been struggling with the rather arduous task of upgrading (rebuilding)&nbsp;our model from DevForce 2009 to DevForce 2010.&nbsp; We're nearing the end of the transition, and ran into something unexpected.&nbsp; Some of our partial classes have fields that get initialized (example: bool someField = true;).&nbsp; Well, in DevForce 2009, after fetching the entity via the entity manager, the fields in our partial classes were initialized properly,&nbsp;however in DevForce 2010 this does not appear to be the case.&nbsp; It appears that the initializer is hit on the server but not on the client, and for whatever reason those fields are also not being serialized.&nbsp; We also don't&nbsp;appear to be hitting the entity contructor on the client.&nbsp; <DIV>&nbsp;</DIV><DIV>What is the best strategy for&nbsp;initializing partial class fields so that they're correctly initialized&nbsp;on the client?</DIV>]]>
   </description>
   <pubDate>Wed, 21 Jul 2010 11:30:22 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1988&amp;PID=7724#7724</guid>
  </item> 
 </channel>
</rss>