marcusoftnet/SpecFlow.Assist.Dynamic — pull request #4 by Lumirris (2012-11-14 23:29:54+00:00)
Title: Add CreateDynamicSet<T> and CreateDynamicInstance<T>

Hi Marcus,

Here's my patch for allowing generic conversions. It's my first
contrib to a project, so if I've done anything improper, please
let me know. If I need to add more tests, or change anything,
I'm happy to do the work on it.

I hope this is useful!

Thanks,
Jeff

commit notes follow:

must implement IConvertible

If dynamic property cannot be cast to then it remains a string.
Not sure if this is the behavior desired, or if an exception should
be thrown instead.

Tested for types: string, int, double, bool, and DateTime.

Motivation for this was to inhibit conversion logic when string was
the desired value type - more complicated scenarios may exist that
won't work.