示例#1
0
        public KernelMain()
        {
            Console.WriteLine("Cosmos booted. Adding components...");
            _components    = new List <IComponent>();
            _reservedWords = new List <string>();

            _components.Add(new CoreComponent());
            FileManagerComponent file = FileManagerComponent.getInstance();

            _components.Add(file);
            _components.Add(new BatchComponent());
            MathComponent math = MathComponent.getInstance();

            _components.Add(math);

            foreach (IComponent component in _components)
            {
                foreach (string word in component.getCommands())
                {
                    _reservedWords.Add(word);
                }
            }

            math.setReservedWords(_reservedWords);

            Console.WriteLine("Components ready. Booting complete.");
        }
示例#2
0
 public BatchInvoker(string fileName, int run)
 {
     string[] args = { "fileName" };
     args[0]      = fileName;
     _currentLine = 0;
     _currentRun  = 0;
     _maxRun      = run;
     _fileManager = FileManagerComponent.getInstance();
     //Console.WriteLine("BatchInvoder\nfileName: " + fileName);
     //Console.WriteLine("args[0]: " + args[0]);
     _file = _fileManager.getFile(args);
     //if(_file != null)
     //{
     //    Console.WriteLine("Got file: " + _file.getFullFileName());
     //}else
     //{
     //    Console.WriteLine("WARNING: Did not find file");
     //}
 }