paulcbetts/splat — pull request #29 by paulcbetts (2013-11-11 04:57:23+00:00)
Title: Correctly type-forward System.Drawing and build Portable Libraries on Xamarin

This PR enables building the PLib version of Splat on Xamarin, as well as corrects a flaw in the current version of Splat with using PLibs.

Consider the following scenario under the old setup (where there were two DLLs, `Splat.Portable.dll` and `Splat-PLATFORM` which had *only* platform-specific code).

1. You create a Portable Library which is dependent on only `Splat.Portable.dll` and write a class that exposes `Color`.
1. You then want to use your shiny new PLib in a WPF 4.5 application
1. ERROR: "System.Drawing.Color" is defined in "System.Drawing.dll" and "Splat.Portable.dll".

This is solved via the following strategy:

* `Splat.Portable.dll` is dead, there is now only `Splat.dll`, and you *always* link to the one most closely appropriate to your platform.
* There is now a PLib version of `Splat.dll` that only includes PLibby things, but you should only link it to other PLibs.
* Using [the magic of Type Forwarding](http://stackoverflow.com/questions/16023742/is-there-any-way-i-can-implement-ivalidatableobject-on-portable-class-library-pr/16046668#16046668), everything Just Works.

Huge props to @dsplaisted for suggesting this plan!