private void FillThemeEntries(dynamic preloaderSetupJson, PreloaderSetup preloaderSetup) { foreach (dynamic themeEntryJson in preloaderSetupJson.themeEntries) { preloaderSetup.ThemeEntries.Add(CreateThemeEntry(themeEntryJson)); } }
private void FillThemePaths(dynamic preloaderSetupJson, PreloaderSetup preloaderSetup) { foreach (dynamic themePathJson in preloaderSetupJson.themesPaths) { preloaderSetup.ThemesPaths.Add(CreateThemePath(themePathJson)); } }
private void FillEnvironmentSets(dynamic preloaderSetupJson, PreloaderSetup preloaderSetup) { JObject environmnetSetsJson = preloaderSetupJson.environmentSets; foreach (JProperty environmentSetJson in environmnetSetsJson.Properties()) { preloaderSetup.EnvironmentsSets.Add(CreateEnvironmentSet(environmentSetJson)); } }
public IPreloaderSetup Parse(string preloaderSetupContent) { var preloaderSetupJson = JsonConvert.DeserializeObject <dynamic>(preloaderSetupContent); var preloaderSetup = new PreloaderSetup(); preloaderSetup.DefaultEnvironment = ConvertDynamicValue <string>(preloaderSetupJson.defaultEnvironment); FillThemeEntries(preloaderSetupJson, preloaderSetup); FillThemePaths(preloaderSetupJson, preloaderSetup); FillEnvironmentSets(preloaderSetupJson, preloaderSetup); return(preloaderSetup); }