// ReSharper restore UnusedMember.Global static void InitializeApplicationContainer() { var factory = CreateApplicationContainerFactory(); _container = factory.CreateContainer(); CassetteApplicationContainer.SetApplicationAccessor(() => _container.Application); var forceCreation = _container.Application; }
public Bundles_Test() { urlGenerator = new Mock <IUrlGenerator>(); referenceBuilder = new Mock <IReferenceBuilder>(); bundleContainer = new Mock <IBundleContainer>(); application = new TestableApplication(urlGenerator.Object, referenceBuilder.Object, bundleContainer.Object); CassetteApplicationContainer.SetApplicationAccessor(() => application); }
public CassetteStartup(IRootPathProvider rootPathProvider) { this.rootPathProvider = rootPathProvider; // This will trigger creation of the Cassette infrastructure at the time of the first request. // The virtual directory is not known until that point, and the virtual directory is required for creation. this.getApplication = InitializeApplication; CassetteApplicationContainer.SetApplicationAccessor(() => getApplication()); routeGenerator = new CassetteRouteGenerator(rootPathProvider.GetRootPath(), GetCurrentContext); }