Changeset 2770


Ignore:
Timestamp:
7/3/2012 4:35:31 AM (22 months ago)
Author:
lowjoel
Message:

When we are running the service, intercept the exit of the RemoteExecutorServer? instance so that the service will also quit.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eraser6/EraserService/Eraser.Service/Program.cs

    r2761 r2770  
    6262                try 
    6363                { 
    64                     eraserClient = new RemoteExecutorServer(); 
     64                    eraserClient = new RemoteExecutorServiceServer(); 
    6565                } 
    6666                catch (InvalidOperationException) 
     
    141141        public const string CommandLineSeparators = "(:|=)"; 
    142142    } 
     143 
     144    /// <summary> 
     145    /// A subclass of RemoteExecutorServer so that we will quit when the client requests Exit. 
     146    /// </summary> 
     147    class RemoteExecutorServiceServer : RemoteExecutorServer 
     148    { 
     149        protected override void Dispose(bool disposing) 
     150        { 
     151            base.Dispose(disposing); 
     152 
     153            if (disposing) 
     154                Application.Exit(); 
     155        } 
     156    } 
    143157} 
Note: See TracChangeset for help on using the changeset viewer.