Author: joergr
Date: 2005-04-06 13:16:38 -0400 (Wed, 06 Apr 2005)
New Revision: 42615
Modified:
trunk/mcs/class/System.ServiceProcess/System.ServiceProcess/ChangeLog
trunk/mcs/class/System.ServiceProcess/System.ServiceProcess/ServiceBase.cs
Log:
2004-04-06 Joerg Rosenkranz <[EMAIL PROTECTED]>
* ServiceBase.cs: Fixed default values of members.
Modified: trunk/mcs/class/System.ServiceProcess/System.ServiceProcess/ChangeLog
===================================================================
--- trunk/mcs/class/System.ServiceProcess/System.ServiceProcess/ChangeLog
2005-04-06 17:15:13 UTC (rev 42614)
+++ trunk/mcs/class/System.ServiceProcess/System.ServiceProcess/ChangeLog
2005-04-06 17:16:38 UTC (rev 42615)
@@ -1,3 +1,7 @@
+2004-04-06 Joerg Rosenkranz <[EMAIL PROTECTED]>
+
+ * ServiceBase.cs: Fixed default values of members.
+
2004-04-04 Joerg Rosenkranz <[EMAIL PROTECTED]>
* ServiceBase.cs: Introduced static field for interoperation with monod.
Modified:
trunk/mcs/class/System.ServiceProcess/System.ServiceProcess/ServiceBase.cs
===================================================================
--- trunk/mcs/class/System.ServiceProcess/System.ServiceProcess/ServiceBase.cs
2005-04-06 17:15:13 UTC (rev 42614)
+++ trunk/mcs/class/System.ServiceProcess/System.ServiceProcess/ServiceBase.cs
2005-04-06 17:16:38 UTC (rev 42615)
@@ -47,14 +47,14 @@
public const int MaxNameLength = 80;
- bool hasStarted;
+ bool hasStarted = false;
- bool auto_log;
- bool can_handle_power_event;
- bool can_pause_and_continue;
- bool can_shutdown;
- bool can_stop;
- EventLog event_log;
+ bool auto_log = true;
+ bool can_handle_power_event = false;
+ bool can_pause_and_continue = false;
+ bool can_shutdown = false;
+ bool can_stop = true;
+ EventLog event_log = null;
string service_name;
public bool AutoLog {
@@ -121,7 +121,11 @@
}
public virtual EventLog EventLog {
- get { return event_log; }
+ get {
+ if (event_log == null)
+ event_log = new
EventLog ("Application", ".", service_name);
+ return event_log;
+ }
}
public string ServiceName {
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches