I am writing a piece of owin middleware, where I need to use some legacy code, which uses the HTTandAssistBase as a method argument. Legacy code does not follow SOLID, so it is impossible to extend HttpRequestBase instead of using OWINRequest.
Is there an extension (or a method) to convert an OwinRequest to HttpRequestBase?
If you have access to IOwinContext
of the request, To use the hack, use httpttextbaz
:
HTTPTTTasebase HKTPXXT = reference.get
And then, you'll just:
HTTPRACEbase http r equest = httpContext.Request;