public static IodineConfiguration Load(string path)
        {
            IodineConfiguration config = new IodineConfiguration ();

            string[] lines = File.ReadAllLines (path);
            var configLines = lines.Where (p => p.Trim () != "" && !p.StartsWith ("#"));
            foreach (string configLine in configLines) {
                string line = configLine.Trim ();
                if (line.Contains (" ")) {
                    string key = line.Substring (0, line.IndexOf (" "));
                    string value = line.Substring (line.IndexOf (" ")).Trim ();
                    config.SetField (key, value);
                }
            }
            return config;
        }
Example #2
0
        public static IodineConfiguration Load(string path)
        {
            var config = new IodineConfiguration();

            var lines       = File.ReadAllLines(path);
            var configLines = lines.Where(p => p.Trim() != "" && !p.StartsWith("#"));

            foreach (string configLine in configLines)
            {
                var line = configLine.Trim();
                if (line.Contains(" "))
                {
                    var key   = line.Substring(0, line.IndexOf(" "));
                    var value = line.Substring(line.IndexOf(" ")).Trim();
                    config.SetField(key, value);
                }
            }
            return(config);
        }
Example #3
0
 public IodineContext(IodineConfiguration config)
 {
     Configuration = config;
     ErrorLog = new ErrorLog ();
     VirtualMachine = new VirtualMachine (this);
 }