This otherwise great open source collection won't build on the Windows 7 Phone because it uses Serializable and the ICloneable interface, which is internal within Silverlight based frameworks. Does there exist an alternative or a ported version?
Asked
Active
Viewed 272 times
1 Answers
9
I recommend downloading the source from CodePlex and building it in a WP7 application.
What we do when we share code across platforms like this where specific attributes are not supported, is to add stub classes to the Silverlight project for the unsupported attributes. This allows the source to compile on all platforms without needing change.
For example, here is our stub for Serializable:
/// <summary>
/// This is a dummy attribute to support silverlight
/// </summary>
/// <remarks></remarks>
public class Serializable : Attribute
{
public Serializable() : base()
{
}
}
You may also find that there are unsupported method overloads (Silverlight has fewer overloads for various methods). If this is the case, you can just use conditional compilation to provide the correct overload for the missing methods.

competent_tech
- 44,465
- 11
- 90
- 113
-
Suggestion: Wrap it in `#if WINDOWS_PHONE ... #endif`. – Claus Jørgensen Dec 27 '11 at 15:09
-
2@Rhubarb: Just checking to see if you were interested in awarding the bounty on this question? – competent_tech Dec 31 '11 at 03:38