Tuesday, December 11, 2007

Yesterday I announced the release of the MapperActivity. I said I'd clean up the source code and post it.

Two things are worth noting:

  1. The dependency on the CodeProject Type Browser has gone
  2. There is a known issue where you can map more than one source element to the same destination - in this case the last mapping you create will win. We will fix this in a subsequent release.

Here's the latest version with the code

MapperActivityLibrary.zip (933.62 KB)

 |  |  | 
Thursday, January 24, 2008 2:57:28 PM (GMT Standard Time, UTC+00:00)
I found a couple of issues with the code as posted and thought i would share them. First off, nice job!

When the designer is building the tree it doesn't handle Nullable<T> references very well. It tries to generate a hierarchy for the properties of Nullable<T> (HasValue, Value, etc.) as if it were another class, which doesn't work well since Reflection treats Nullable<T> uniquely. To fix this i have it check if the underlying type for a property is Nullable<T> and not build the rest of the tree underneath it.

Also as designed this Activity won't work with persistence turned on. The reason appears to be that backing WorkflowParameterBindingCollection with a private field is not sufficient and won't depersist correctly. To correct this i used a DependencyProperty instead and that worked fine. See this link:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=266563&SiteID=1

Let me know if you want me to share the code for these changes and I will.

Thanks,

Mike
Name
E-mail
Home page

Comment (HTML not allowed)  

Enter the code shown (prevents robots):