public void DeployContosoThemeToWeb(Web web, string themeName, string colorFilePath, string fontFilePath, string backgroundImagePath, string masterPageName)
{
// Deploy files one by one to proper location
if (!string.IsNullOrEmpty(colorFilePath))
{
DeployFileToThemeFolderSite(web, colorFilePath);
}
if (!string.IsNullOrEmpty(fontFilePath))
{
DeployFileToThemeFolderSite(web, fontFilePath);
}
if (!string.IsNullOrEmpty(backgroundImagePath))
{
DeployFileToThemeFolderSite(web, backgroundImagePath);
}
// Let's also add entry to the Theme catalog. This is not actually required, but provides visibility for the theme option, if manually changed
AddNewThemeOptionToSite(web, themeName, colorFilePath, fontFilePath, backgroundImagePath, masterPageName);
}