Merge pull request #963 from kebby/master
[mono.git] / mcs / class / System / System.Diagnostics / EventLogImpl.cs
index d72dc58b6c3837ecdff7118e8307a51337cff013..5a4b3e77445edb9d5db7ea6b0f6d1454722de81f 100644 (file)
@@ -49,8 +49,6 @@ namespace System.Diagnostics
                        _coreEventLog = coreEventLog;
                }
 
-               public event EntryWrittenEventHandler EntryWritten;
-
                protected EventLog CoreEventLog {
                        get { return _coreEventLog; }
                }
@@ -94,15 +92,16 @@ namespace System.Diagnostics
 
                public string LogDisplayName {
                        get {
-#if NET_2_0
                                // to-do perform valid character checks
                                if (_coreEventLog.Log != null && _coreEventLog.Log.Length == 0) {
                                        throw new InvalidOperationException ("Event log names must"
                                                + " consist of printable characters and cannot contain"
                                                + " \\, *, ?, or spaces.");
                                }
-#endif
                                if (_coreEventLog.Log != null) {
+                                       if (_coreEventLog.Log.Length == 0)
+                                               return string.Empty;
+
                                        if (!EventLog.Exists (_coreEventLog.Log, _coreEventLog.MachineName)) {
                                                throw new InvalidOperationException (string.Format (
                                                        CultureInfo.InvariantCulture, "Cannot find Log {0}"
@@ -135,6 +134,10 @@ namespace System.Diagnostics
                        return entries;
                }
 
+               public abstract void DisableNotification ();
+
+               public abstract void EnableNotification ();
+
                public abstract void BeginInit ();
 
                public abstract void Clear ();
@@ -224,5 +227,15 @@ namespace System.Diagnostics
                                                logName, machineName));
                        }
                }
+
+               public abstract OverflowAction OverflowAction { get; }
+
+               public abstract int MinimumRetentionDays { get; }
+
+               public abstract long MaximumKilobytes { get; set; }
+
+               public abstract void ModifyOverflowPolicy (OverflowAction action, int retentionDays);
+
+               public abstract void RegisterDisplayName (string resourceFile, long resourceId);
        }
 }