Changeset 2236 for trunk/eraser/Eraser/Program.cs
- Timestamp:
- 8/4/2010 10:26:21 AM (22 months ago)
- File:
-
- 1 edited
-
trunk/eraser/Eraser/Program.cs (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/eraser/Eraser/Program.cs
r2235 r2236 77 77 { 78 78 /// <summary> 79 /// Constructor. 80 /// </summary> 81 public ConsoleArguments() 82 { 83 } 84 85 /// <summary> 86 /// Copy constructor. 87 /// </summary> 88 /// <param name="arguments">The <see cref="ConsoleArguments"/> to use as a template 89 /// for this instance.</param> 90 protected ConsoleArguments(ConsoleArguments arguments) 91 { 92 Action = arguments.Action; 93 PositionalArguments = arguments.PositionalArguments; 94 } 95 96 /// <summary> 79 97 /// The Action which this handler is in charge of. 80 98 /// </summary> … … 88 106 } 89 107 90 class AddTaskArguments : ConsoleArguments 91 { 108 class EraseArguments : ConsoleArguments 109 { 110 /// <summary> 111 /// Constructor. 112 /// </summary> 113 public EraseArguments() 114 { 115 } 116 117 /// <summary> 118 /// Copy constructor. 119 /// </summary> 120 /// <param name="arguments">The <see cref="EraseArguments"/> to use as a template 121 /// for this instance.</param> 122 protected EraseArguments(EraseArguments arguments) 123 : base(arguments) 124 { 125 ErasureMethod = arguments.ErasureMethod; 126 } 127 92 128 /// <summary> 93 129 /// The erasure method which the user specified on the command line. … … 95 131 [Arg("method", "The erasure method to use", typeof(string), false, null, null)] 96 132 public string ErasureMethod { get; set; } 133 } 134 135 class AddTaskArguments : EraseArguments 136 { 137 /// <summary> 138 /// Constructor. 139 /// </summary> 140 public AddTaskArguments() 141 { 142 } 143 144 /// <summary> 145 /// Constructs Add Task arguments from Erase arguments. 146 /// </summary> 147 /// <param name="arguments">The <see cref="EraseArguments"/> to use as a template 148 /// for this instance.</param> 149 internal AddTaskArguments(EraseArguments arguments) 150 : base(arguments) 151 { 152 } 97 153 98 154 /// <summary> … … 260 316 program.Handlers.Add("help", 261 317 new ConsoleActionData(CommandHelp, new ConsoleArguments())); 318 program.Handlers.Add("erase", 319 new ConsoleActionData(CommandErase, new EraseArguments())); 262 320 program.Handlers.Add("addtask", 263 321 new ConsoleActionData(CommandAddTask, new AddTaskArguments())); … … 319 377 where action is 320 378 help Show this help message. 379 erase Erases items specified on the command line. This is 380 equivalent to addtask, with the schedule set to ""now"". 321 381 addtask Adds a task to the current task list. 322 382 importtasklist Imports an Eraser Task list to the current user's Task … … 331 391 no parameters to set. 332 392 333 parameters for addtask: 393 parameters for erase and addtask: 394 eraser erase [/method=(<methodGUID>|<methodName>)] <target> [target [...]] 334 395 eraser addtask [/method=(<methodGUID>|<methodName>)] [/schedule=(now|manually|restart)] <target> [target [...]] 335 396 … … 346 407 is next restarted. 347 408 409 This parameter is only valid for use with ""addtask"". 410 348 411 target is one or more of: 349 412 {1} … … 376 439 377 440 PrintCommandHelp(); 441 } 442 443 /// <summary> 444 /// Parses the command line for tasks and adds them to run immediately 445 /// using the <see cref="RemoveExecutor"/> class. 446 /// </summary> 447 /// <param name="arg">The command line parameters passed to the program.</param> 448 private static void CommandErase(ConsoleArguments arg) 449 { 450 AddTaskArguments arguments = new AddTaskArguments((EraseArguments)arg); 451 arguments.Schedule = "NOW"; 452 453 CommandAddTask(arguments); 378 454 } 379 455
Note: See TracChangeset
for help on using the changeset viewer.
