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

Pass NancyContext to CreateRequestContainer #1784

Merged
merged 1 commit into from
Jan 20, 2015

Conversation

khellang
Copy link
Member

This will allow you to get a request-scoped container from the OWIN pipeline by accessing the OWIN environment dictionary.

Will update the bootstrappers after this is merged.

[Obsolete("This method is obsolete. Use the overload with NancyContext instead.")]
protected virtual TContainer CreateRequestContainer()
{
return this.CreateRequestContainer(null);
Copy link
Member Author

Choose a reason for hiding this comment

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

Not sure about this, but since the framework won't call this method anymore, I don't think it matters much.

@jchannon
Copy link
Member

seems good to me (apart from it doesn't build!) but best to get @NancyFx/owners to take a look

@khellang khellang added this to the 1.0 Alpha milestone Jan 20, 2015
horsdal added a commit that referenced this pull request Jan 20, 2015
Pass NancyContext to CreateRequestContainer
@horsdal horsdal merged commit 1f96d38 into NancyFx:master Jan 20, 2015
@khellang khellang deleted the request-container-context branch January 20, 2015 07:40
@khellang
Copy link
Member Author

Fixed overloads for the different bootstrappers:

StructureMap: NancyFx/Nancy.Bootstrappers.StructureMap#26
Unity: NancyFx/Nancy.Bootstrappers.Unity#8
Ninject: NancyFx/Nancy.Bootstrappers.Ninject#18
Autofac: NancyFx/Nancy.Bootstrappers.Autofac#22

Apparently Windsor doesn't have a request container, or it's solved using some other magic. TinyIoC is already taken care of.

@jchannon
Copy link
Member

Do think it's worth doing a simple OWIN example in one of the Demo projects
in the Nancy repo to show why you'd use this?

On Tuesday, 20 January 2015, Kristian Hellang notifications@github.com
wrote:

Fixed overloads for the different bootstrappers:

StructureMap: NancyFx/Nancy.Bootstrappers.StructureMap#26
NancyFx/Nancy.Bootstrappers.StructureMap#26
Unity: NancyFx/Nancy.Bootstrappers.Unity#8
NancyFx/Nancy.Bootstrappers.Unity#8
Ninject: NancyFx/Nancy.Bootstrappers.Ninject#18
NancyFx/Nancy.Bootstrappers.Ninject#18
Autofac: NancyFx/Nancy.Bootstrappers.Autofac#22
NancyFx/Nancy.Bootstrappers.Autofac#22

Apparently Windsor doesn't have a request container, or it's solved using
some other magic. TinyIoC is already taken care of.

Reply to this email directly or view it on GitHub
#1784 (comment).

@grumpydev grumpydev modified the milestones: 1.0 Alpha, 1.0 Feb 4, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants