public override void Execute(SharedObjects shared) { string listType = shared.Cpu.PopValue().ToString(); if (shared.Screen != null) { kList list = null; switch (listType) { case "files": list = GetFileList(shared); break; case "volumes": list = GetVolumeList(shared); break; case "bodies": list = GetBodyList(shared); break; case "targets": list = GetTargetList(shared); break; case "resources": list = GetResourceList(shared); break; case "parts": list = GetPartList(shared); break; case "engines": list = GetEngineList(shared); break; case "sensors": list = GetSensorList(shared); break; case "config": list = GetConfigList(shared); break; default: throw new Exception("List type not supported"); } if (list != null) { shared.Screen.Print(" "); shared.Screen.Print(list.ToString()); shared.Screen.Print(" "); } } }