private StyleKraftBundle ConstructStyleBundle(KraftGlobalConfigurationSettings kraftGlobalConfigurationSettings, string resFolderPath, string resProfileFileName) { string resProfilePhysFileName = Path.Combine(resFolderPath, resProfileFileName); if (Directory.Exists(resFolderPath) && File.Exists(resProfilePhysFileName)) { StyleKraftBundle resBundle = new StyleKraftBundle(); resBundle.ContentRootPath = kraftGlobalConfigurationSettings.EnvironmentSettings.ContentRootPath; //KraftBundle resBundle = new StyleKraftBundle() { ContentRootPath = _KraftEnvironmentSettings.ContentRootPath }; KraftBundleProfiles resBundleProfile = resBundle as KraftBundleProfiles; resBundleProfile.ContentRootPath = kraftGlobalConfigurationSettings.EnvironmentSettings.ContentRootPath; if (resBundleProfile != null) { resBundleProfile.StartDirPath = resFolderPath; resBundleProfile.ProfileFiles = new List <string> { resProfileFileName }; return(resBundle); } } return(null); }
private StyleKraftBundle ConstructStyleBundle(string rootPath, string resFolderPath, string resProfileFileName) { string resProfilePhysFileName = Path.Combine(resFolderPath, resProfileFileName); if (Directory.Exists(resFolderPath) && File.Exists(resProfilePhysFileName)) { StyleKraftBundle resBundle = new StyleKraftBundle { ContentRootPath = rootPath }; //KraftBundle resBundle = new StyleKraftBundle() { ContentRootPath = _KraftEnvironmentSettings.ContentRootPath }; KraftBundleProfiles resBundleProfile = resBundle as KraftBundleProfiles; resBundleProfile.ContentRootPath = rootPath; if (resBundleProfile != null) { resBundleProfile.StartDirPath = resFolderPath; resBundleProfile.ProfileFiles = new List <string> { resProfileFileName, RESOURCEDEPENDENCY_FILE_NAME }; //The default should be last return(resBundle); } } return(null); }