예제 #1
0
 private void FillThemeEntries(dynamic preloaderSetupJson, PreloaderSetup preloaderSetup)
 {
     foreach (dynamic themeEntryJson in preloaderSetupJson.themeEntries)
     {
         preloaderSetup.ThemeEntries.Add(CreateThemeEntry(themeEntryJson));
     }
 }
예제 #2
0
 private void FillThemePaths(dynamic preloaderSetupJson, PreloaderSetup preloaderSetup)
 {
     foreach (dynamic themePathJson in preloaderSetupJson.themesPaths)
     {
         preloaderSetup.ThemesPaths.Add(CreateThemePath(themePathJson));
     }
 }
예제 #3
0
        private void FillEnvironmentSets(dynamic preloaderSetupJson, PreloaderSetup preloaderSetup)
        {
            JObject environmnetSetsJson = preloaderSetupJson.environmentSets;

            foreach (JProperty environmentSetJson in environmnetSetsJson.Properties())
            {
                preloaderSetup.EnvironmentsSets.Add(CreateEnvironmentSet(environmentSetJson));
            }
        }
예제 #4
0
        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);
        }