Add HttpContextBase version of class members using HttpContext

Dec 21, 2015 at 10:03 AM
You can easily create an HttpContextBase from an HttpContext while the opposite isn't easily possible. HttpContextBase is used in MVC so to simplify use of the library with HttpContextBase components it would be nice to have the library implementing members that support both function.

Practically members that use HttpContext can be modified to instead take an HttpContextBase then a new member that support HttpContext must be add and call the other member after wrapping the HttpContext in a HttpContextWrapper object that descents from HttpContextBase.