Program.HelpCommand.cs 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. using Utilities;
  5. namespace ISCSIConsole
  6. {
  7. public partial class Program
  8. {
  9. public static void HelpCommand(string[] args)
  10. {
  11. if (args.Length == 1)
  12. {
  13. Console.WriteLine();
  14. Console.WriteLine("Available commands:");
  15. Console.WriteLine("-------------------");
  16. Console.WriteLine("ATTACH - Attach selected disk or volume to an iSCSI target.");
  17. Console.WriteLine("CREATE - Create a new VHD.");
  18. Console.WriteLine("DETAIL - Provide details about a selected object.");
  19. Console.WriteLine("LIST - List disks, volumes, partitions or volume extents.");
  20. Console.WriteLine("ONLINE - Takes the selected disk online.");
  21. Console.WriteLine("OFFLINE - Takes the selected disk offline.");
  22. Console.WriteLine("SELECT - Select disk, volume, partition or extent.");
  23. Console.WriteLine("SET - Set program variables.");
  24. Console.WriteLine("START - Start the iSCSI Server");
  25. Console.WriteLine("STOP - Stop the iSCSI Server");
  26. Console.WriteLine();
  27. Console.WriteLine("- Use the 'HELP XXX' command for help regarding command XXX.");
  28. }
  29. else
  30. {
  31. switch (args[1].ToLower())
  32. {
  33. case "attach":
  34. HelpAttach();
  35. break;
  36. case "create":
  37. HelpCreate();
  38. break;
  39. case "detail":
  40. HelpDetail();
  41. break;
  42. case "list":
  43. HelpList();
  44. break;
  45. case "offline":
  46. HelpOffline();
  47. break;
  48. case "online":
  49. HelpOnline();
  50. break;
  51. case "select":
  52. HelpSelect();
  53. break;
  54. case "set":
  55. HelpSet();
  56. break;
  57. case "start":
  58. HelpStart();
  59. break;
  60. case "stop":
  61. HelpStop();
  62. break;
  63. default:
  64. Console.WriteLine("No such command: {0}", args[1]);
  65. break;
  66. }
  67. }
  68. }
  69. }
  70. }