コード例 #1
0
        public static void Initialize()
        {
            // Global jasper.json file is mapped to config classes
            GlobalConfigDataProviderJson globalJsonProvider = new GlobalConfigDataProviderJson("jasper.json");
            GlobalWebsiteConfig          globalConfig       = new GlobalWebsiteConfig(globalJsonProvider);

            // Theme jasper.json file is mapped to theme config classes
            // Theme jasper.json file depends on global settings of theme folder location
            ConfigurationObjectProviderJson configurationObjectJsonProvider = new ConfigurationObjectProviderJson(globalConfig, "jasper.json");
            WebsiteConfig websiteConfig = new WebsiteConfig(configurationObjectJsonProvider);

            // Custom routing manager
            CustomRouting customRouting = new CustomRouting(websiteConfig, globalConfig);

            // Theme helper manager
            ThemeHelper themeHelper = new ThemeHelper();

            // Assigning variables of this static class - cross request persistent
            GlobalWebsiteConfig = globalConfig;
            WebsiteConfig       = websiteConfig;
            CustomRouting       = customRouting;
            ThemeHelper         = themeHelper;
        }
コード例 #2
0
 public CustomRouting(WebsiteConfig websiteConfig, GlobalWebsiteConfig globalWebsiteConfig)
 {
     this.WebsiteConfig       = websiteConfig;
     this.GlobalWebsiteConfig = globalWebsiteConfig;
 }