merge -r 60439:60440
[mono.git] / mcs / class / System.ServiceProcess / System.ServiceProcess / ServiceBase.cs
index f82863ba6a791aca9b2965c0057a414018cc36ab..82758996bed8268cb24d3183383c16c6a0a872bc 100644 (file)
@@ -40,9 +40,10 @@ namespace System.ServiceProcess
 {
        public class ServiceBase : System.ComponentModel.Component
        {
-               // These members are used for interoperation with mono-service
-               internal static ServiceBase [] RegisteredServices = null;
-               internal static EventHandler RunService = null;
+               internal delegate void RunServiceCallback (ServiceBase [] services);
+               
+               // This member is used for interoperation with mono-service
+               internal static RunServiceCallback RunService = null;
                
                public ServiceBase() { }
 
@@ -166,10 +167,8 @@ namespace System.ServiceProcess
 
                public static void Run (ServiceBase [] servicesToRun) 
                {
-                       RegisteredServices = servicesToRun;
-                       
                        if (RunService != null)
-                               RunService (null, EventArgs.Empty);
+                               RunService (servicesToRun);
                }
 
        }