<?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="http://www.codeplex.com/rss.xsl"?><rss version="2.0"><channel><title>ActiveSharp Work Item Rss Feed</title><link>http://www.codeplex.com/ActiveSharp/WorkItem/List.aspx</link><description>ActiveSharp Work Item Rss Description</description><item><title>Commented Issue: Exception when running on .net 4.0 beta</title><link>http://activesharp.codeplex.com/WorkItem/View.aspx?WorkItemId=5425</link><description>System.NotSupportedException occurred&lt;br /&gt;  Message&amp;#61;Cannot execute code on a dynamic assembly without run access.&lt;br /&gt;  Source&amp;#61;mscorlib&lt;br /&gt;  StackTrace&amp;#58;&lt;br /&gt;       at System.Delegate.BindToMethodInfo&amp;#40;Object target, IRuntimeMethodInfo method, RuntimeType methodType, DelegateBindingFlags flags&amp;#41;&lt;br /&gt;       at System.Delegate.CreateDelegate&amp;#40;Type type, Object firstArgument, MethodInfo method, Boolean throwOnBindFailure&amp;#41;&lt;br /&gt;       at System.Delegate.CreateDelegate&amp;#40;Type type, Object firstArgument, MethodInfo method&amp;#41;&lt;br /&gt;       at ActiveSharp.PropertyMapping.OffsetUtil.OffsetInvoker&amp;#96;1..cctor&amp;#40;&amp;#41; in H&amp;#58;&amp;#92;WORK&amp;#92;SVN&amp;#92;trunk&amp;#92;code&amp;#92;thirdparty&amp;#92;model&amp;#92;ActiveSharp&amp;#92;PropertyMapping&amp;#92;OffsetUtil.cs&amp;#58;line 59&lt;br /&gt;  InnerException&amp;#58;&lt;br /&gt;Comments: ** Comment from web user: oysteinkrog ** &lt;p&gt;No problem.&lt;br /&gt;Let me know if you need any more information&amp;#59;P&lt;/p&gt;</description><author>oysteinkrog</author><pubDate>Thu, 20 Aug 2009 16:46:24 GMT</pubDate><guid isPermaLink="false">Commented Issue: Exception when running on .net 4.0 beta 20090820044624P</guid></item><item><title>Commented Issue: Exception when running on .net 4.0 beta</title><link>http://activesharp.codeplex.com/WorkItem/View.aspx?WorkItemId=5425</link><description>System.NotSupportedException occurred&lt;br /&gt;  Message&amp;#61;Cannot execute code on a dynamic assembly without run access.&lt;br /&gt;  Source&amp;#61;mscorlib&lt;br /&gt;  StackTrace&amp;#58;&lt;br /&gt;       at System.Delegate.BindToMethodInfo&amp;#40;Object target, IRuntimeMethodInfo method, RuntimeType methodType, DelegateBindingFlags flags&amp;#41;&lt;br /&gt;       at System.Delegate.CreateDelegate&amp;#40;Type type, Object firstArgument, MethodInfo method, Boolean throwOnBindFailure&amp;#41;&lt;br /&gt;       at System.Delegate.CreateDelegate&amp;#40;Type type, Object firstArgument, MethodInfo method&amp;#41;&lt;br /&gt;       at ActiveSharp.PropertyMapping.OffsetUtil.OffsetInvoker&amp;#96;1..cctor&amp;#40;&amp;#41; in H&amp;#58;&amp;#92;WORK&amp;#92;SVN&amp;#92;trunk&amp;#92;code&amp;#92;thirdparty&amp;#92;model&amp;#92;ActiveSharp&amp;#92;PropertyMapping&amp;#92;OffsetUtil.cs&amp;#58;line 59&lt;br /&gt;  InnerException&amp;#58;&lt;br /&gt;Comments: ** Comment from web user: johnrusk ** &lt;p&gt;Thanks for logging this.&lt;/p&gt;&lt;p&gt;I don&amp;#39;t have access to .NET 4.0 right now, but will make a note to look into this in the future.&lt;/p&gt;</description><author>johnrusk</author><pubDate>Tue, 18 Aug 2009 09:43:32 GMT</pubDate><guid isPermaLink="false">Commented Issue: Exception when running on .net 4.0 beta 20090818094332A</guid></item><item><title>Created Issue: Exception when running on .net 4.0 beta</title><link>http://activesharp.codeplex.com/WorkItem/View.aspx?WorkItemId=5425</link><description>System.NotSupportedException occurred&lt;br /&gt;  Message&amp;#61;Cannot execute code on a dynamic assembly without run access.&lt;br /&gt;  Source&amp;#61;mscorlib&lt;br /&gt;  StackTrace&amp;#58;&lt;br /&gt;       at System.Delegate.BindToMethodInfo&amp;#40;Object target, IRuntimeMethodInfo method, RuntimeType methodType, DelegateBindingFlags flags&amp;#41;&lt;br /&gt;       at System.Delegate.CreateDelegate&amp;#40;Type type, Object firstArgument, MethodInfo method, Boolean throwOnBindFailure&amp;#41;&lt;br /&gt;       at System.Delegate.CreateDelegate&amp;#40;Type type, Object firstArgument, MethodInfo method&amp;#41;&lt;br /&gt;       at ActiveSharp.PropertyMapping.OffsetUtil.OffsetInvoker&amp;#96;1..cctor&amp;#40;&amp;#41; in H&amp;#58;&amp;#92;WORK&amp;#92;SVN&amp;#92;trunk&amp;#92;code&amp;#92;thirdparty&amp;#92;model&amp;#92;ActiveSharp&amp;#92;PropertyMapping&amp;#92;OffsetUtil.cs&amp;#58;line 59&lt;br /&gt;  InnerException&amp;#58;&lt;br /&gt;</description><author>oysteinkrog</author><pubDate>Mon, 17 Aug 2009 21:51:44 GMT</pubDate><guid isPermaLink="false">Created Issue: Exception when running on .net 4.0 beta 20090817095144P</guid></item><item><title>Commented Issue: ArgumentException from PopulateMap when multiple Props reference same local variable byref</title><link>http://www.codeplex.com/ActiveSharp/WorkItem/View.aspx?WorkItemId=3260</link><description>In cases where there are multiple properties on an object which all reference the same underlying local variable by reference, then foundField will return an object which has already been added, so will throw an exception of type System.ArgumentException.&lt;br /&gt;&lt;br /&gt;This is in FieldToPropertyMap.PopulateMap&amp;#40;Type targetType&amp;#41;&lt;br /&gt;I&amp;#39;ve rebuilt the DLL and added an exception handler around the line &amp;#58; _map.Add&amp;#40;foundField.Name, property&amp;#41;&amp;#59;&lt;br /&gt;I believe this should be all that&amp;#39;s needed to change, but I&amp;#39;m not 100&amp;#37; sure yet I haven&amp;#39;t caused some unexpected side-effects.&lt;br /&gt;Comments: ** Comment from web user: mikestedman ** &lt;p&gt;John,&lt;/p&gt;&lt;p&gt;Thanks for the feedback.&lt;/p&gt;&lt;p&gt;You&amp;#39;re probably right about the requirement for &amp;#34;two properties&amp;#34; - I&amp;#39;ll turn my attention to solving the &amp;#34;right&amp;#34; problem. The second property was originally introduced to make binding easier.&lt;/p&gt;&lt;p&gt;Regards&lt;br /&gt;Mike&lt;/p&gt;</description><author>mikestedman</author><pubDate>Mon, 17 Nov 2008 09:33:20 GMT</pubDate><guid isPermaLink="false">Commented Issue: ArgumentException from PopulateMap when multiple Props reference same local variable byref 20081117093320A</guid></item><item><title>Commented Issue: ArgumentException from PopulateMap when multiple Props reference same local variable byref</title><link>http://www.codeplex.com/ActiveSharp/WorkItem/View.aspx?WorkItemId=3260</link><description>In cases where there are multiple properties on an object which all reference the same underlying local variable by reference, then foundField will return an object which has already been added, so will throw an exception of type System.ArgumentException.&lt;br /&gt;&lt;br /&gt;This is in FieldToPropertyMap.PopulateMap&amp;#40;Type targetType&amp;#41;&lt;br /&gt;I&amp;#39;ve rebuilt the DLL and added an exception handler around the line &amp;#58; _map.Add&amp;#40;foundField.Name, property&amp;#41;&amp;#59;&lt;br /&gt;I believe this should be all that&amp;#39;s needed to change, but I&amp;#39;m not 100&amp;#37; sure yet I haven&amp;#39;t caused some unexpected side-effects.&lt;br /&gt;Comments: ** Comment from web user: johnrusk ** &lt;p&gt;Mike,&lt;/p&gt;&lt;p&gt;Would you be able to give me any example of when you find it useful to have &amp;#34;two properties referencing the same field&amp;#34;&amp;#63;  As you can tell from my previous comments, I&amp;#39;ve assumed that it will be almost unheard of for two properties to pass the same field to SetValue.  I&amp;#39;d be interested to understand your examples, in case I&amp;#39;m missing something.&lt;/p&gt;&lt;p&gt;As for the trick of falling back to the StackFrame, it&amp;#39;s nice in theory but people have reported some issued with it in practice, to do with method inlining &amp;#40;which you might only see in Release builds&amp;#41;.  Here&amp;#39;s a link&amp;#58;&lt;/p&gt;&lt;p&gt;http&amp;#58;&amp;#47;&amp;#47;www.lhotka.net&amp;#47;Article.aspx&amp;#63;area&amp;#61;4&amp;#38;id&amp;#61;0708c745-f009-4d09-9f91-6a349b5b0317  &amp;#40;Need to mark all methods, including the property itself and all the way thru to the one that gets the stack, with an attribute to prevent inlining&amp;#41;&lt;br /&gt;I&amp;#39;ve only heard from one person who tried this.  They tried it on all properties, didn&amp;#39;t like it, and switched to ActiveSharp instead &amp;#59;-&amp;#41;&lt;/p&gt;&lt;p&gt;John&lt;/p&gt;</description><author>johnrusk</author><pubDate>Sat, 15 Nov 2008 21:57:57 GMT</pubDate><guid isPermaLink="false">Commented Issue: ArgumentException from PopulateMap when multiple Props reference same local variable byref 20081115095757P</guid></item><item><title>Commented Issue: ArgumentException from PopulateMap when multiple Props reference same local variable byref</title><link>http://www.codeplex.com/ActiveSharp/WorkItem/View.aspx?WorkItemId=3260</link><description>In cases where there are multiple properties on an object which all reference the same underlying local variable by reference, then foundField will return an object which has already been added, so will throw an exception of type System.ArgumentException.&lt;br /&gt;&lt;br /&gt;This is in FieldToPropertyMap.PopulateMap&amp;#40;Type targetType&amp;#41;&lt;br /&gt;I&amp;#39;ve rebuilt the DLL and added an exception handler around the line &amp;#58; _map.Add&amp;#40;foundField.Name, property&amp;#41;&amp;#59;&lt;br /&gt;I believe this should be all that&amp;#39;s needed to change, but I&amp;#39;m not 100&amp;#37; sure yet I haven&amp;#39;t caused some unexpected side-effects.&lt;br /&gt;Comments: ** Comment from web user: mikestedman ** &lt;p&gt;Hi John,&lt;/p&gt;&lt;p&gt;Thanks for your speedy reply to Martin&amp;#39;s &amp;#40;mcrimes&amp;#41; question. I work with Martin and stumbled across this issue with our use of ActiveSharp a couple of days ago.&lt;/p&gt;&lt;p&gt;We only use &amp;#34;two Properties referencing the same Field&amp;#34; occasionally so I&amp;#39;m loathe to give up ActiveSharp&amp;#39;s advantages &amp;#40;and speed&amp;#41;. But I&amp;#39;d also like to keep the SetValue in the client Property consistent to make it easier for our developers.&lt;/p&gt;&lt;p&gt;The approach I&amp;#39;ve taken so far is to modify ActiveSharp to detect the &amp;#34;two properties&amp;#34; situation and in those rare cases inspect the StackFrame to find the property name.&lt;/p&gt;&lt;p&gt;BTW I&amp;#39;m not asking you to change ActiveSharp or debug my code&amp;#33;&lt;/p&gt;&lt;p&gt;I&amp;#39;d just like your expert opinion on whether this is a worthwhile approach to pursue further. I accept that inspecting the StackFrame is much slower than your technique.&lt;/p&gt;&lt;p&gt;Regards&lt;/p&gt;&lt;p&gt;Mike&lt;/p&gt;</description><author>mikestedman</author><pubDate>Sat, 15 Nov 2008 08:50:32 GMT</pubDate><guid isPermaLink="false">Commented Issue: ArgumentException from PopulateMap when multiple Props reference same local variable byref 20081115085032A</guid></item><item><title>Commented Issue: Fix MSIL parsing for method calls on struct fields</title><link>http://www.codeplex.com/ActiveSharp/WorkItem/View.aspx?WorkItemId=3283</link><description>The MSIL parsing finds &amp;#34;by ref&amp;#34; usage of fields by looking for the ldflda &amp;#40;load field address&amp;#41; instruction.  However, that instruction is also used when the code needs to call a method on a field that is of a value &amp;#40;struct&amp;#41; type.&lt;br /&gt;&lt;br /&gt;This means that if you have one property which uses the field in the normal ActiveSharp way&amp;#59; and another which calls a method on the struct that&amp;#39;s in the field&amp;#59; then ActiveSharp will incorrectly say that two properties are using the same field &amp;#39;by ref&amp;#39;.&lt;br /&gt;&lt;br /&gt;As of today&amp;#39;s release &amp;#40;release 1.1&amp;#41; I have fixed this for calls to methods on structs that take no parameters &amp;#40;e.g. int&amp;#63;.HasValue&amp;#41; but I have not fixed it for calls to methods on structs which take parameters &amp;#40;e.g. int&amp;#63;.Equals&amp;#41;.  In the latter case you will still get the exception.&lt;br /&gt;&lt;br /&gt;The reason why the latter case is harder is that today&amp;#39;s fix works by pairing up the ldflda with the call to the struct method.  However, for methods that take parameters, there may be other calls in _between_ those two instructions &amp;#40;calls to prepare parameter values&amp;#41;, and the parsing code is currently not smart enough to tell which call actually goes with the ldflda.  The solution is possible, but regrettably I don&amp;#39;t have time to implement it right now.&lt;br /&gt;&lt;br /&gt;Let me know if its affecting you, since the more people it affects, the sooner I&amp;#39;ll find some time to fix it &amp;#59;-&amp;#41;&lt;br /&gt;Comments: ** Comment from web user: johnrusk ** &lt;p&gt;In the meantime, a workaround is to assign the struct field to a local variable, call the method on the local variable, then assign the local variable back to the struct.  This workaround will avoid the problem.&lt;/p&gt;</description><author>johnrusk</author><pubDate>Sat, 15 Nov 2008 05:08:56 GMT</pubDate><guid isPermaLink="false">Commented Issue: Fix MSIL parsing for method calls on struct fields 20081115050856A</guid></item><item><title>Created Issue: Fix MSIL parsing for method calls on struct fields</title><link>http://www.codeplex.com/ActiveSharp/WorkItem/View.aspx?WorkItemId=3283</link><description>The MSIL parsing finds &amp;#34;by ref&amp;#34; usage of fields by looking for the ldflda &amp;#40;load field address&amp;#41; instruction.  However, that instruction is also used when the code needs to call a method on a field that is of a value &amp;#40;struct&amp;#41; type.&lt;br /&gt;&lt;br /&gt;This means that if you have one property which uses the field in the normal ActiveSharp way&amp;#59; and another which calls a method on the struct that&amp;#39;s in the field&amp;#59; then ActiveSharp will incorrectly say that two properties are using the same field &amp;#39;by ref&amp;#39;.&lt;br /&gt;&lt;br /&gt;As of today&amp;#39;s release &amp;#40;release 1.1&amp;#41; I have fixed this for calls to methods on structs that take no parameters &amp;#40;e.g. int&amp;#63;.HasValue&amp;#41; but I have not fixed it for calls to methods on structs which take parameters &amp;#40;e.g. int&amp;#63;.Equals&amp;#41;.  In the latter case you will still get the exception.&lt;br /&gt;&lt;br /&gt;The reason why the latter case is harder is that today&amp;#39;s fix works by pairing up the ldflda with the call to the struct method.  However, for methods that take parameters, there may be other calls in _between_ those two instructions &amp;#40;calls to prepare parameter values&amp;#41;, and the parsing code is currently not smart enough to tell which call actually goes with the ldflda.  The solution is possible, but regrettably I don&amp;#39;t have time to implement it right now.&lt;br /&gt;&lt;br /&gt;Let me know if its affecting you, since the more people it affects, the sooner I&amp;#39;ll find some time to fix it &amp;#59;-&amp;#41;&lt;br /&gt;</description><author>johnrusk</author><pubDate>Sat, 15 Nov 2008 05:05:02 GMT</pubDate><guid isPermaLink="false">Created Issue: Fix MSIL parsing for method calls on struct fields 20081115050502A</guid></item><item><title>Closed Issue: ArgumentException from PopulateMap when multiple Props reference same local variable byref</title><link>http://www.codeplex.com/ActiveSharp/WorkItem/View.aspx?WorkItemId=3260</link><description>In cases where there are multiple properties on an object which all reference the same underlying local variable by reference, then foundField will return an object which has already been added, so will throw an exception of type System.ArgumentException.&lt;br /&gt;&lt;br /&gt;This is in FieldToPropertyMap.PopulateMap&amp;#40;Type targetType&amp;#41;&lt;br /&gt;I&amp;#39;ve rebuilt the DLL and added an exception handler around the line &amp;#58; _map.Add&amp;#40;foundField.Name, property&amp;#41;&amp;#59;&lt;br /&gt;I believe this should be all that&amp;#39;s needed to change, but I&amp;#39;m not 100&amp;#37; sure yet I haven&amp;#39;t caused some unexpected side-effects.&lt;br /&gt;Comments: Closed as "by design" (sorry ;-)</description><author>johnrusk</author><pubDate>Sat, 15 Nov 2008 04:55:40 GMT</pubDate><guid isPermaLink="false">Closed Issue: ArgumentException from PopulateMap when multiple Props reference same local variable byref 20081115045540A</guid></item><item><title>Commented Issue: ArgumentException from PopulateMap when multiple Props reference same local variable byref</title><link>http://www.codeplex.com/ActiveSharp/WorkItem/View.aspx?WorkItemId=3260</link><description>In cases where there are multiple properties on an object which all reference the same underlying local variable by reference, then foundField will return an object which has already been added, so will throw an exception of type System.ArgumentException.&lt;br /&gt;&lt;br /&gt;This is in FieldToPropertyMap.PopulateMap&amp;#40;Type targetType&amp;#41;&lt;br /&gt;I&amp;#39;ve rebuilt the DLL and added an exception handler around the line &amp;#58; _map.Add&amp;#40;foundField.Name, property&amp;#41;&amp;#59;&lt;br /&gt;I believe this should be all that&amp;#39;s needed to change, but I&amp;#39;m not 100&amp;#37; sure yet I haven&amp;#39;t caused some unexpected side-effects.&lt;br /&gt;Comments: ** Comment from web user: johnrusk ** &lt;p&gt;Hi,&lt;/p&gt;&lt;p&gt;Except for one situation, which I&amp;#39;ll describe below, I&amp;#39;m afraid this behaviour is actually &amp;#34;by design&amp;#34;.  &lt;/p&gt;&lt;p&gt;Yes, it should give a better exception message, and in fact, as of today&amp;#39;s release it does, but I&amp;#39;m not sure that any truly comprehensive solution is possible.  &lt;/p&gt;&lt;p&gt;In particular, if two properties were to pass the same field &amp;#34;by ref&amp;#34; to a &amp;#34;SetValue&amp;#34; method, then ActiveSharp would have no way to figure out which _one_ property maps to the field.  &amp;#40;And it needs to do that, so that when the field value is changed it can send out the right property change notification&amp;#41;.&lt;/p&gt;&lt;p&gt;So, it is impossible to pass the same field to SetValue from two different properties.  ActiveSharp will never be able to solve that for you, I&amp;#39;m sorry,&lt;/p&gt;&lt;p&gt;However, if you are only passing it to SetValue &amp;#40;or whatever your method is called&amp;#41; in _one_ property, and you are doing something else with it &amp;#39;by ref&amp;#39; in the other property, then you can probably use this work-around&amp;#58;  in the other property, assign the field to a local variable, pass the local variable by ref, and then assign it back to the field after you have finished.&lt;/p&gt;&lt;p&gt;I mentioned a situation where this behaviour is not &amp;#34;by design&amp;#34;.  It is when a property makes a method call on a field of a value type, and the method takes parameters.  You will see the same error in that case, and in that case it is a bug. I&amp;#39;ll log a separate issue on this shortly.&lt;/p&gt;&lt;p&gt;Regards&lt;/p&gt;&lt;p&gt;John&lt;/p&gt;</description><author>johnrusk</author><pubDate>Sat, 15 Nov 2008 04:53:41 GMT</pubDate><guid isPermaLink="false">Commented Issue: ArgumentException from PopulateMap when multiple Props reference same local variable byref 20081115045341A</guid></item><item><title>Created Issue: ArgumentException from PopulateMap when multiple Props reference same local variable byref</title><link>http://www.codeplex.com/ActiveSharp/WorkItem/View.aspx?WorkItemId=3260</link><description>In cases where there are multiple properties on an object which all reference the same underlying local variable by reference, then foundField will return an object which has already been added, so will throw an exception of type System.ArgumentException.&lt;br /&gt;&lt;br /&gt;This is in FieldToPropertyMap.PopulateMap&amp;#40;Type targetType&amp;#41;&lt;br /&gt;I&amp;#39;ve rebuilt the DLL and added an exception handler around the line &amp;#58; _map.Add&amp;#40;foundField.Name, property&amp;#41;&amp;#59;&lt;br /&gt;I believe this should be all that&amp;#39;s needed to change, but I&amp;#39;m not 100&amp;#37; sure yet I haven&amp;#39;t caused some unexpected side-effects.&lt;br /&gt;</description><author>mcrimes</author><pubDate>Thu, 13 Nov 2008 19:51:35 GMT</pubDate><guid isPermaLink="false">Created Issue: ArgumentException from PopulateMap when multiple Props reference same local variable byref 20081113075135P</guid></item><item><title>Commented Issue: Avoid ambiguity in complex inheritance situations</title><link>http://www.codeplex.com/ActiveSharp/WorkItem/View.aspx?WorkItemId=1188</link><description>Currently, fields are identified by name.  May be troublesome with derived fields having names that match ancestor ones.&lt;br /&gt;&lt;br /&gt;Also, private properties in ancestor classes may cause trouble &amp;#40;SetValue executes, knowing that &amp;#34;this&amp;#34; is of type Derived, but in response to setting of private property defined in Base.  The FieldToPropertyMap for Derived will not have that field in it.&amp;#41;&lt;br /&gt;&lt;br /&gt;To fix&amp;#58; &lt;br /&gt;&lt;br /&gt;&amp;#40;a&amp;#41; populate field to property map by reflecting on declared members only and walking up the inheritance hiearchy explictly&lt;br /&gt;&amp;#40;b&amp;#41; use FieldInfos rather than field names.  &amp;#40;Beware issues with mismatched ReflectedType properties, preventing expected equality of FieldInfo objects.  Will only be an issue if field is used at different point in heirarchcy from where it is defined &amp;#40;OffsetToFieldMap has one ReflectedType, FieldToPropertyMap has another&amp;#63;&amp;#63;&amp;#63;  Depends how the ReflectedType is set in the stuff we get back when setting up FieldToPropertyMap&amp;#41;&lt;br /&gt;Comments: ** Comment from web user: johnrusk ** &lt;p&gt;Thanks for your comment.  I do intend to address this issue, but can&amp;#39;t give a definite date right now &amp;#40;due to other commitments taking up my time&amp;#41;.&lt;/p&gt;</description><author>johnrusk</author><pubDate>Fri, 15 Aug 2008 08:04:43 GMT</pubDate><guid isPermaLink="false">Commented Issue: Avoid ambiguity in complex inheritance situations 20080815080443A</guid></item><item><title>Commented Issue: Avoid ambiguity in complex inheritance situations</title><link>http://www.codeplex.com/ActiveSharp/WorkItem/View.aspx?WorkItemId=1188</link><description>Currently, fields are identified by name.  May be troublesome with derived fields having names that match ancestor ones.&lt;br /&gt;&lt;br /&gt;Also, private properties in ancestor classes may cause trouble &amp;#40;SetValue executes, knowing that &amp;#34;this&amp;#34; is of type Derived, but in response to setting of private property defined in Base.  The FieldToPropertyMap for Derived will not have that field in it.&amp;#41;&lt;br /&gt;&lt;br /&gt;To fix&amp;#58; &lt;br /&gt;&lt;br /&gt;&amp;#40;a&amp;#41; populate field to property map by reflecting on declared members only and walking up the inheritance hiearchy explictly&lt;br /&gt;&amp;#40;b&amp;#41; use FieldInfos rather than field names.  &amp;#40;Beware issues with mismatched ReflectedType properties, preventing expected equality of FieldInfo objects.  Will only be an issue if field is used at different point in heirarchcy from where it is defined &amp;#40;OffsetToFieldMap has one ReflectedType, FieldToPropertyMap has another&amp;#63;&amp;#63;&amp;#63;  Depends how the ReflectedType is set in the stuff we get back when setting up FieldToPropertyMap&amp;#41;&lt;br /&gt;Comments: ** Comment from web user: HakanL ** &lt;p&gt;Hi,&lt;br /&gt;I&amp;#39;m running into this issue where I have a base class with an Id property that has a private set method. I&amp;#39;m setting this inside this class, but it&amp;#39;s called by an inherited class so the case above where the FieldToPropertyMap doesn&amp;#39;t have the field happens. I stepped thru your code to see what happens and I see that all the properties are returned by GetProperties in the PropertyMap, but it doesn&amp;#39;t identify the instructions to add it to the map. I can just change my class to not have this as private, but it would be &amp;#34;nice to have&amp;#34; this handled.&lt;br /&gt;&lt;/p&gt;</description><author>HakanL</author><pubDate>Wed, 13 Aug 2008 05:30:05 GMT</pubDate><guid isPermaLink="false">Commented Issue: Avoid ambiguity in complex inheritance situations 20080813053005A</guid></item><item><title>CREATED TASK: Optimize performance</title><link>http://www.codeplex.com/ActiveSharp/WorkItem/View.aspx?WorkItemId=2227</link><description>Two things worth trying and profiling&amp;#58;&lt;br /&gt;&lt;br /&gt;&amp;#40;a&amp;#41; Look up types by RuntimeTypeHandle rather than Type, since getting the former is faster.  Just need to sort out how LazyDictionaryOfTypes will work, since need to change it to be indexed by RuntimeTypeHandles - - see Type.GetTypeFromHandle because it will still need to get the type, to get the assembly, when initializing it&amp;#39;s list of &amp;#34;keys&amp;#34;&lt;br /&gt;&lt;br /&gt;&amp;#40;b&amp;#41; Make it so that it doesn&amp;#39;t have to do multi-step Dictionary lookups.  Want this&amp;#58; once we have the data for the type concerned, just use the offset value to index directly into an array of PropertyInfos.  &amp;#40;Array will have &amp;#34;gaps&amp;#34; if we just offset values directly, since most are 4 bytes apart from each other, except bools etc&amp;#41;.&lt;br /&gt;</description><author>johnrusk</author><pubDate>Sat, 24 May 2008 21:46:21 GMT</pubDate><guid isPermaLink="false">CREATED TASK: Optimize performance 20080524094621P</guid></item><item><title>CLOSED ISSUE: Doesn't work for private fields in abstract superclasses</title><link>http://www.codeplex.com/ActiveSharp/WorkItem/View.aspx?WorkItemId=1677</link><description>Since it works by making instance of the classes, it cannot work for those that are abstract.&lt;br /&gt;&lt;br /&gt;Need to re-organise the code so that it does not need to create instances of these classes, but can still get at their fields enough to get their offsets.&lt;br /&gt;Comments: It now makes instance of derived (non-abstract) class</description><author>johnrusk</author><pubDate>Wed, 12 Mar 2008 07:16:18 GMT</pubDate><guid isPermaLink="false">CLOSED ISSUE: Doesn't work for private fields in abstract superclasses 20080312071618A</guid></item><item><title>CREATED ISSUE: Doesn't work for private fields in abstract superclasses</title><link>http://www.codeplex.com/ActiveSharp/WorkItem/View.aspx?WorkItemId=1677</link><description>Since it works by making instance of the classes, it cannot work for those that are abstract.&lt;br /&gt;&lt;br /&gt;Need to re-organise the code so that it does not need to create instances of these classes, but can still get at their fields enough to get their offsets.&lt;br /&gt;</description><author>johnrusk</author><pubDate>Sun, 09 Mar 2008 04:27:46 GMT</pubDate><guid isPermaLink="false">CREATED ISSUE: Doesn't work for private fields in abstract superclasses 20080309042746A</guid></item><item><title>CREATED ISSUE: Avoid ambiguity in complex inheritance situations</title><link>http://www.codeplex.com/ActiveSharp/WorkItem/View.aspx?WorkItemId=1188</link><description>Currently, fields are identified by name.  May be troublesome with derived fields having names that match ancestor ones.&lt;br /&gt;&lt;br /&gt;Also, private properties in ancestor classes may cause trouble &amp;#40;SetValue executes, knowing that &amp;#34;this&amp;#34; is of type Derived, but in response to setting of private property defined in Base.  The FieldToPropertyMap for Derived will not have that field in it.&amp;#41;&lt;br /&gt;&lt;br /&gt;To fix&amp;#58; &lt;br /&gt;&lt;br /&gt;&amp;#40;a&amp;#41; populate field to property map by reflecting on declared members only and walking up the inheritance hiearchy explictly&lt;br /&gt;&amp;#40;b&amp;#41; use FieldInfos rather than field names.  &amp;#40;Beware issues with mismatched ReflectedType properties, preventing expected equality of FieldInfo objects.  Will only be an issue if field is used at different point in heirarchcy from where it is defined &amp;#40;OffsetToFieldMap has one ReflectedType, FieldToPropertyMap has another&amp;#63;&amp;#63;&amp;#63;  Depends how the ReflectedType is set in the stuff we get back when setting up FieldToPropertyMap&amp;#41;&lt;br /&gt;</description><author>johnrusk</author><pubDate>Sun, 10 Feb 2008 03:02:29 GMT</pubDate><guid isPermaLink="false">CREATED ISSUE: Avoid ambiguity in complex inheritance situations 20080210030229A</guid></item><item><title>CREATED ISSUE: Missing unit tests for LazyDictionary</title><link>http://www.codeplex.com/ActiveSharp/WorkItem/View.aspx?WorkItemId=1185</link><description>Tests are there, but not implemented.  Implement them&lt;br /&gt;</description><author>johnrusk</author><pubDate>Sun, 10 Feb 2008 02:55:18 GMT</pubDate><guid isPermaLink="false">CREATED ISSUE: Missing unit tests for LazyDictionary 20080210025518A</guid></item><item><title>CLOSED ISSUE: Error when derived classes use base's SetValueMethod</title><link>http://www.codeplex.com/ActiveSharp/WorkItem/View.aspx?WorkItemId=1164</link><description>You should be able to define a protectect SetValue method in a base class, and use it from derived classes.  Right now, that doesn&amp;#59;t work.&lt;br /&gt;Comments: Fixed in changeset 7395</description><author>johnrusk</author><pubDate>Sun, 10 Feb 2008 02:50:52 GMT</pubDate><guid isPermaLink="false">CLOSED ISSUE: Error when derived classes use base's SetValueMethod 20080210025052A</guid></item><item><title>CREATED ISSUE: Error when derived classes use base's SetValueMethod</title><link>http://www.codeplex.com/ActiveSharp/WorkItem/View.aspx?WorkItemId=1164</link><description>You should be able to define a protectect SetValue method in a base class, and use it from derived classes.  Right now, that doesn&amp;#59;t work.&lt;br /&gt;</description><author>johnrusk</author><pubDate>Sat, 09 Feb 2008 22:39:47 GMT</pubDate><guid isPermaLink="false">CREATED ISSUE: Error when derived classes use base's SetValueMethod 20080209103947P</guid></item></channel></rss>