コード例 #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);
        }