NancyFx/Nancy — pull request #1572 by xt0rted (2014-06-15 06:57:39+00:00)
Title: Add enum support to DynamicDictionaryValue

This came up when trying to get an enum value from my `ViewBag`
```c#
enum Sections { }

// throws
Sections section = ViewBag.Section;

// doesn't throw
int section = ViewBag.Section;
```
This throws because when you call [Type.GetTypeCode()](https://github.com/NancyFx/Nancy/blob/6f9927f04b6924f6628f1a588096160be9896feb/src/Nancy/DynamicDictionaryValue.cs#L256) it returns the underlying type, such as `Int32`, and then [Convert.ChangeType()](https://github.com/NancyFx/Nancy/blob/6f9927f04b6924f6628f1a588096160be9896feb/src/Nancy/DynamicDictionaryValue.cs#L271) returns an integer. This results in an invalid cast exception when the result of `TryConvert()` is assigned to an `Enum`.

There's three conversion types I can think of which are
- enum to enum
- number to enum
- string to enum

This only does the first two because I didn't think of string to enum until just now. I can add that in as well if you'd like.

Since `TryConvert()` doesn't have any tests I wasn't sure how else to test these changes. If there's a better way let me know.