Changeset 737
- Timestamp:
- 12/6/2008 3:29:53 AM (4 years ago)
- Location:
- branches/eraser6
- Files:
-
- 2 edited
-
Eraser/Program.cs (modified) (3 diffs)
-
Manager/RemoteExecutor.cs (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eraser6/Eraser/Program.cs
r631 r737 31 31 using System.Globalization; 32 32 using System.Reflection; 33 using System.Diagnostics; 33 34 34 35 namespace Eraser … … 82 83 using (Program.eraserClient = new RemoteExecutorClient()) 83 84 { 85 if (!((RemoteExecutorClient)Program.eraserClient).Connect()) 86 { 87 //The client cannot connect to the server. This probably means 88 //that the server process isn't running. Start an instance. 89 Process eraserInstance = Process.Start( 90 Assembly.GetExecutingAssembly().Location); 91 eraserInstance.WaitForInputIdle(); 92 } 93 84 94 eraserClient.Run(); 85 95 program.Run(); … … 629 639 private void AddTask() 630 640 { 631 //Check that all our command line parameters are present.632 641 AddTaskCommandLine arguments = (AddTaskCommandLine)Arguments; 633 if (arguments.ErasureMethod == Guid.Empty) 634 throw new ArgumentException("The --method parameter was not specified."); 635 642 636 643 //Create the task, and set the method to use. 637 644 Task task = new Task(); 638 ErasureMethod method = ErasureMethodManager.GetInstance(arguments.ErasureMethod); 645 ErasureMethod method = arguments.ErasureMethod == Guid.Empty ? 646 ErasureMethodManager.Default : 647 ErasureMethodManager.GetInstance(arguments.ErasureMethod); 639 648 foreach (Task.ErasureTarget target in arguments.Targets) 640 649 { -
branches/eraser6/Manager/RemoteExecutor.cs
r630 r737 306 306 } 307 307 308 /// <summary> 309 /// Connects to the remote server. 310 /// </summary> 311 /// <returns>True if the connection to the remote server was established.</returns> 312 public bool Connect() 313 { 314 try 315 { 316 client.Connect(250); 317 } 318 catch (TimeoutException) 319 { 320 } 321 322 return client.IsConnected; 323 } 324 308 325 private object SendRequest(RemoteRequest header) 309 326 {
Note: See TracChangeset
for help on using the changeset viewer.
