autofac / Autofac.Owin

OWIN integration for Autofac
MIT License
23 stars 15 forks source link

Only Microsoft.Owin.Middleware #7

Closed johnkors closed 9 years ago

johnkors commented 9 years ago

Hi guys!

Does this package only work for middleware that inherit from Microsoft.Owin.OwinMiddleware?

Sample: https://github.com/johnkors/Autofac.OwinMiddleware.Sample/tree/master

Just wondering, seeing as there are several ways of implementing middlewares.. http://benfoster.io/blog/how-to-write-owin-middleware-in-5-different-steps

tillig commented 9 years ago

Yes, only Microsoft.Owin.OwinMiddleware. You can see the type constraint here: https://github.com/autofac/Autofac.Owin/blob/master/src/Autofac.Integration.Owin/AutofacMiddleware.cs

johnkors commented 9 years ago

As well as here, I presume : https://github.com/autofac/Autofac.Owin/blob/master/src/Autofac.Integration.Owin/AutofacAppBuilderExtensions.cs#L308

Will have to do a quick rewrite of my mw's then. Thanks for the quick reply :+1: