Beispiel #1
0
        public RuntimeConfig(string runtimeConfigPath)
        {
            var runtimeConfigJson = OpenRuntimeConfig(runtimeConfigPath);

            Framework = ParseFramework(runtimeConfigJson);

            IsPortable = Framework != null;
        }
Beispiel #2
0
        private RuntimeConfigFramework ParseFramework(JObject runtimeConfigRoot)
        {
            var runtimeOptionsRoot = runtimeConfigRoot["runtimeOptions"];

            if (runtimeOptionsRoot == null)
            {
                return(null);
            }

            var framework = (JObject)runtimeOptionsRoot["framework"];

            if (framework == null)
            {
                return(null);
            }

            return(RuntimeConfigFramework.ParseFromFrameworkRoot(framework));
        }