DarthFubuMVC/FubuTransportation — pull request #133 by smerrell (2013-11-08 18:55:38+00:00)
Title: Fix XmlMessageSerializer bug handling Dictionaries

* Remove null check when iterating over dictionary KeyValuePairs in the
WriteObject method
* Add test covering serializing and deserializing of a dictionary in a
message

Dictionaries are an IEnumerable of KeyValuePair structs, which can never
be null. The null check was not necessary in Ayende's original code
which got carried over into FT. While unneccesary, this code originally
worked because the dictionary was cast as an IEnumerable of objects
allowing you to compare the KeyValuePair to null.

When the reflection was changed to using dynamic, the null check
caused a RuntimeBinderException stating a KeyValuePair struct can't be
compared to null with the == operator.