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

            Framework = ParseFramework(runtimeConfigJson);

            IsPortable = Framework != null;
        }
Example #2
0
        public RuntimeConfig(string runtimeConfigPath)
        {
            JObject runtimeConfigJson;

            using (var streamReader = new StreamReader(File.OpenRead(runtimeConfigPath)))
            {
                runtimeConfigJson = OpenRuntimeConfig(streamReader);
            }

            Framework = ParseFramework(runtimeConfigJson);

            IsPortable = Framework != null;
        }
Example #3
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));
        }