cureos/csunits — pull request #2 by dgg (2013-05-14 16:03:12+00:00)
Title: Support for persistence

Measures are great runtime-wise, but when it comes to persist/serialize one measure, it can get ugly.
I was thinking of storing the amount as a double and the unit as a string, so when we re-hydrate that persisted measure we need a way to get unit from its string representation.
Generics get in the way big time and we have to resort to perform runtime casting to transform an IUnit into the IUnit.
Likewise, when getting a IMeasure we need to cast the created IMeasure to its generic type.

Besides, I only modified the portable project as I am not very familiar with that way of working. But the WinPho and WinRT already pose challenges (lack of serialization and ability to compile expressions, mainly).

Please, let me know what you think, and feel free to suggest further changes, using the pull request.

Thanks for a great library