private static void Create(string rootFolder, IServiceProvider serviceProvider, bool skipCrawl = true, bool skipPrecompile = true) { _Instance = new WebApplicationProxy(rootFolder, skipCrawl, skipPrecompile); _ServiceProvider = serviceProvider; ReadWebConfig(); InjectTestValuesIntoHttpRuntime(); _hostingEnvironment = new HostingEnvironmentWrapper(); _DummyRegisteredObject = new DummyRegisteredObject(); HostingEnvironment.RegisterObject(_DummyRegisteredObject); SubstituteDummyHttpContext("/"); _Instance.InitializeInternal(); }
static HostingEnvironmentWrapper() { _Instance = new HostingEnvironmentWrapper(new object()); }