webadvanced / Structuremap.MVC5

Apache License 2.0
21 stars 9 forks source link

Does not fail gracefully when HttpContext does not exist #10

Closed jphamilton closed 7 years ago

jphamilton commented 9 years ago

I am running Quartz in process and using StructureMap to resolve IJob. HttpContext does not exist in this circumstance and the following line actually throws an exception:

IContainer container = (CurrentNestedContainer ?? Container);