NancyFx/Nancy — pull request #1199 by liddellj (2013-08-23 11:18:49+00:00)
Title: Moved default namespace init code into constructor of RazorViewEngine.

fixes #1173

This is a fix for a threading related issue using the RazorViewEngine - whereby multiple threads manipulating RazorEngineHost.NamespaceImports can result in empty using statements in generated Razor ("using ;"). This resulted from the fact that RazorEngineHost.NamespaceImports is an instance of HashSet - which is not thread safe. Moving the init code into the constructor avoids this.