public EditorConfigConfiguration(string formatConfigFile)
        {
            var parser = new EditorConfig.Core.EditorConfigParser(formatConfigFile);
            FileConfiguration configFile = parser.Parse(formatConfigFile).First();

            if (configFile.Properties.ContainsKey("allowed_extensions"))
            {
                configFile.Properties.TryGetValue("allowed_extensions", out allowed);
            }

            if (configFile.Properties.ContainsKey("denied_extensions"))
            {
                configFile.Properties.TryGetValue("denied_extensions", out denied);
            }

            if (configFile.Properties.ContainsKey("command"))
            {
                configFile.Properties.TryGetValue("command", out command);
            }

            string enableInDebugAsString;

            if (configFile.Properties.ContainsKey("enable_in_debug"))
            {
                configFile.Properties.TryGetValue("enable_in_debug", out enableInDebugAsString);
                bool.TryParse(enableInDebugAsString, out enableInDebug);
            }
        }
示例#2
0
        public EditorConfigConfiguration(string formatConfigFile)
        {
            var parser = new EditorConfig.Core.EditorConfigParser(formatConfigFile);
            FileConfiguration configFile = parser.Parse(formatConfigFile).First();

            if (configFile.Properties.ContainsKey("allowed_extensions"))
            {
                configFile.Properties.TryGetValue("allowed_extensions", out allowed);
            }

            if (configFile.Properties.ContainsKey("denied_extensions"))
            {
                configFile.Properties.TryGetValue("denied_extensions", out denied);
            }

            if (configFile.Properties.ContainsKey("command"))
            {
                configFile.Properties.TryGetValue("command", out command);
            }
        }