markrendle/Simple.Web — pull request #50 by ianbattersby (2013-01-31 18:59:37+00:00)
Title: Initial Razor improvements

## Note
Can't believe I haven't broke something with the below, but if I have shout with a failing test and I'm right on it. There is a lot to do here but I believe the below is a start in the right direction.

## Summary
### Refactor
Through the process of working through the implementation I've re-factored certain elements including `RazorTypeBuilder`, `TypeResolver`, and `RazorViews`.

In particular I've tried to improve the adoption of referenced assemblies for @model and @handler types; not sure if we need to consider 3rd-party references but didn't hit that in testing (just generic types). Also changes to `web.config.transform` to minimize required XML, cause XML is yuk!

Hope this might be more performant too, but yet to be established. Certainly made efforts to ensure stupidities like returning projections are quashed.

### Intellisense
The objective here was to aid adoption through friction-less use of Razor in Simple.Web; unfortunately due to (as I'm led to understand) a bug in Visual Studio to do this for `@model` requires an `@inherits` statement, perhaps more so additions to web.config.

Personally felt this was too much of a compromise so we have - perhaps temporarily - have a dependency on `System.Web.Mvc` (our Razor NuSpec references it for us on unpacking) to accomplish the same thing without relying on the VS tooling support).

Bringing in `System.Web.Mvc` does however give us the option of adopting/supporting the more traditional @Html, @Url, etc helpers that traditional MS MVC users will be familiar with. I've started playing with this but decided to leave out for discussion. In the meantime using these methods will blow (use Fix >= 0.3.2 to bubble errors).

### Layouts
Initial stab at layouts using recursion into `SimpleTemplateBase`, will see how this holds up to more common usage and implementing sections.

### Sections
Coming soon, the above should make it easy(er).

### Partials
Coming soon.

### ViewBag
Found myself writing test samples using ViewBag so again to reduce friction of adoption included this via a simple dynamic dictionary. Needs more thought/work perhaps.

### Fix
Changed nuspec to require >= 0.3

### xUnit
Seemed we had two versions of xUnit being used via NuGet, so normalized.