public void Trace(CmdParser parser) { var type = parser.GetAttribute("type") ?? parser.GetAttribute(0); switch (type) { case "d": Console.WriteLine(fileManager.TraceDirs()); break; case "f": Console.WriteLine(fileManager.TraceFiles()); break; default: Console.WriteLine(fileManager); break; } }