NancyFx/Nancy — pull request #602 by prabirshrestha (2012-04-26 19:17:48+00:00)
Title: response.WithStatusCode extension method

added extension method for changing status code so. It can take status code as both HttpStatusCode enum or int.

This is specially useful when using it with `View["404"]`;

currently we need to create a new variable to change view.

```csharp
var view = View["404"];
view.StatusCode = HttpStatusCode.NotFound;
return view;
```

With this extension method you can now use either

```csharp
return View["404"].WithStatusCode(404);
```
or

```csharp
return view["404"].WithStatusCode(HttpStatusCode.NotFound);
```