Skip to content
This repository has been archived by the owner on Jan 24, 2021. It is now read-only.

NancyContext available everywhere #551

Merged
merged 15 commits into from
Mar 14, 2012

Conversation

thecodejunkie
Copy link
Member

Fixes #550

Also fixes #514 and is the pre-requisite for #483

This is a first step in the "Context Everywhere" update and will make it
possible for us to access the context from inside views
Also upadated the DefaultViewResolver so that is calls the current
IViewLocator with the context of the current request
Added a second parameter to the Match method and updated the
DefaultRouteResolver to call the matcher with the context
Also updated the DefaultRoutePatternMatcher so it passes in the correct
context to the result. Also updated the FakeRoutePatternMatchResult
type to have the new property.
It's now possible to set the Context property, of the fake
pattern match response, using the configurator.
The IErrorHandler.HandelsStatusCode method is now passed the current
NancyContext instance when being invoked. Also updated the XML comment
of the function + implementations
The model binder adapter will not pass in the NancyContext, of the
current request, into the IModelBinderLocator instances.
The engine and renderContext fields on HtmlHelper<TModel> were set to
public. Big boo boo =)
}

[Fact]
public void Should_return_match_result_with_context_of_current_request_when_paths_do_not_matched()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be match not matched :)

grumpydev added a commit that referenced this pull request Mar 14, 2012
@grumpydev grumpydev merged commit 3966dde into NancyFx:master Mar 14, 2012
@thecodejunkie thecodejunkie deleted the contexteverywhere-550 branch February 17, 2016 07:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make the NancyContext available everywhere add NancyContext as parameter in IErrorHandler.HandlesStatusCode
2 participants