public static void Initialize() { ControllerBuilder.Current.SetControllerFactory(new LoveControllerFactory()); System.Web.Hosting.HostingEnvironment.RegisterVirtualPathProvider(LoveVirtualPathProvider.Initialize()); Providers.ViewRenderer = new LoveVirtualViewProvider(); }
public static LoveVirtualPathProvider Initialize() { if (Instance != null) { throw new InvalidOperationException("Only initialize the LoveVirtualPathProvider once."); } Instance = new LoveVirtualPathProvider(); return(Instance); }