private void DisplayHelp(string arg, CMenuItem context, bool isInner) { if (arg == null) { throw new ArgumentNullException ("arg"); } if (context == null) { throw new ArgumentNullException ("context"); } if (string.IsNullOrEmpty (arg)) { if (!DisplayItemHelp (context, !context.Any ())) { DisplayAvailableCommands (context, isInner); } return; } var cmd = arg; var inner = context.GetMenuItem (ref cmd, out arg, false, false, false); if (inner != null) { DisplayHelp (arg, inner, true); return; } OnWriteLine ("Could not find inner command \"" + cmd + "\"."); if (context.Selector != null) { OnWriteLine ("Help for " + context.Selector + ":"); } DisplayItemHelp (context, true); }
private void DisplayHelp(string arg, CMenuItem context, bool isInner) { if (arg == null) { throw new ArgumentNullException("arg"); } if (context == null) { throw new ArgumentNullException("context"); } if (string.IsNullOrEmpty(arg)) { if (!DisplayItemHelp(context, !context.Any())) { DisplayAvailableCommands(context, isInner); } return; } var cmd = arg; var inner = context.GetMenuItem(ref cmd, out arg, true, false, false); if (inner != null) { DisplayHelp(arg, inner, true); } }
private static void DisplayHelp(string arg, CMenuItem context, bool isInner) { if (arg == null) { throw new ArgumentNullException("arg"); } if (context == null) { throw new ArgumentNullException("context"); } if (string.IsNullOrEmpty(arg)) { if (!DisplayItemHelp(context, !context.Any())) { DisplayAvailableCommands(context, isInner); } return; } var cmd = arg; var inner = context.GetMenuItem(ref cmd, out arg, false, false, false); if (inner != null) { DisplayHelp(arg, inner, true); return; } Console.WriteLine("Could not find inner command \"" + cmd + "\"."); if (context.Selector != null) { Console.WriteLine("Help for " + context.Selector + ":"); } DisplayItemHelp(context, true); }