// parse the configuration file return the root or // null if error. protected ConfigElement ParseConfiguration(bool toPrint) { ConfigElement root = null; root = ConfigFileParser.parseFile(configFile); if (root != null && toPrint) { System.Text.StringBuilder tree = new System.Text.StringBuilder(); ConfigFileParser.printConfigurationTree(root, tree, 0); System.Console.WriteLine(tree); } return(root); }