NancyFx/Nancy — pull request #1072 by half-ogre (2013-04-19 20:23:52+00:00)
Title: Request hooks

_This PR is still a work-in-progress. I'm opening this up now so you can take a look at what's already done and help me get this finished. See the To Do list at the bottom for the status._

This PR aims to add request hooks (type registratons and request start-up tasks) to Nancy's bootstrapping.

## Request Registration Tasks

There is a new interface, `IRequestRegistrations`, for injecting type registrations into the request container. It follows the same pattern and is used in the same way as the existing `IApplicationRegistrations`.

## Request Startup Tasks

There is a new interface, `IRequestStartup`, that lets you hook into a request's initialization. It follows the same pattern and is used in the same way as the existing `IApplicationStartup`.

## Sample App

I added a trivial sample app for manual testing and to see simple hooks in action at `Nancy.Demo.Bootstrapping.RequestHooks`. It's also an homage to my favorite past-time, Dungeon & Dragons. If you don't like that, let me know and I can use more boring material.

## Testing

A test plan is still TBD. I'll make the test plan after I've added the automated tests.

## To Do
- [x] Add the hooks
- [ ] Add automated tests
- [x] Create a sample app to test and play with request hooks
- [ ] Decide what to do with `ConfigurableBootstrapper`
- [ ] Investigate what else needs to change because of the new hooks (@thecodejunkie, @grumpydev, your help here is appreciated!)
- [ ] Make sure I'm following the Nancy style and conventions