Changeset 751
- Timestamp:
- 12/6/2008 9:04:13 AM (4 years ago)
- File:
-
- 1 edited
-
branches/eraser6/Eraser/Program.cs (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eraser6/Eraser/Program.cs
r750 r751 356 356 throw new ArgumentException("--method must be specified with an Erasure " + 357 357 "method GUID."); 358 ErasureMethod = new Guid(param.Substring(equalPos + 1)); 358 359 List<KeyValuePair<string, string>> subParams = 360 GetSubParameters(param.Substring(equalPos + 1)); 361 ErasureMethod = new Guid(subParams[0].Key); 362 } 363 else if (IsParam(param, "schedule", "s")) 364 { 365 if (equalPos == -1) 366 throw new ArgumentException("--schedule must be specified with a Schedule " + 367 "type."); 368 369 List<KeyValuePair<string, string>> subParams = 370 GetSubParameters(param.Substring(equalPos + 1)); 371 switch (subParams[0].Key) 372 { 373 case "now": 374 Schedule = Schedule.RunNow; 375 break; 376 case "restart": 377 schedule = Schedule.RunOnRestart; 378 break; 379 default: 380 throw new ArgumentException("Unknown schedule type: " + subParams[0].Key); 381 } 359 382 } 360 383 else if (IsParam(param, "recycled", "r")) … … 448 471 449 472 /// <summary> 473 /// The schedule for the current set of targets. 474 /// </summary> 475 public Schedule Schedule 476 { 477 get 478 { 479 return schedule; 480 } 481 set 482 { 483 schedule = value; 484 } 485 } 486 487 /// <summary> 450 488 /// The list of targets which was specified on the command line. 451 489 /// </summary> … … 463 501 464 502 private Guid erasureMethod; 503 private Schedule schedule = null; 465 504 private List<Task.ErasureTarget> targets = new List<Task.ErasureTarget>(); 466 505 } … … 654 693 } 655 694 695 //Check the number of tasks in the task. 696 if (task.Targets.Count == 0) 697 throw new ArgumentException("Tasks must contain at least one erasure target."); 698 656 699 //Send the task out. 657 700 using (Program.eraserClient = new RemoteExecutorClient())
Note: See TracChangeset
for help on using the changeset viewer.
