Blog Stats
  • Posts - 36
  • Articles - 2
  • Comments - 17
  • Trackbacks - 14

 

Service Provider

There are 1 entries for the tag Service Provider

Temp service provider implementation

Well, Bill Pierce in his post about making the HttpContext wrapper use the application as a service provider got me to a good enough solution for the script service I had wanted in my previous post. While not quite as clean as adding it to the HttpContext, I think an extension method on HttpApplication like this will work well for now. public static object GetService(this HttpApplication application,Type service) { IServiceProvider provider = application as IServiceProvider; if (provider == null) return null; return provider.GetService(service); } Then add/implement the IServiceProvider...

 

 

Copyright © Sean Lynch