Author: atsushi
Date: 2007-09-05 04:57:02 -0400 (Wed, 05 Sep 2007)
New Revision: 85336

Modified:
   trunk/mcs/class/System/System.Diagnostics/ChangeLog
   trunk/mcs/class/System/System.Diagnostics/CounterCreationDataCollection.cs
   trunk/mcs/class/System/System.Diagnostics/EventLog.cs
   trunk/mcs/class/System/System.Diagnostics/EventLogImpl.cs
   trunk/mcs/class/System/System.Diagnostics/LocalFileEventLog.cs
   trunk/mcs/class/System/System.Diagnostics/NullEventLog.cs
   trunk/mcs/class/System/System.Diagnostics/Process.cs
   trunk/mcs/class/System/System.Diagnostics/Win32EventLog.cs
Log:
2007-09-05  Atsushi Enomoto  <[EMAIL PROTECTED]>

        * EventLog.cs, EventLogImpl.cs, LocalFileEventLog.cs, NullEventLog.cs,
          Win32EventLog.cs : added missing members, will be left unsupported
          in non-Win32 impl and left unimplemented in Win32.
        * CounterCreationDataCollection.cs : in 2.0 OnValidate() is overriden
          instad of OnInsert().
        * Process.cs : removed StandardErrorEncoding and
          StandardOutputEncoding. They do not exist anymore.



Modified: trunk/mcs/class/System/System.Diagnostics/ChangeLog
===================================================================
--- trunk/mcs/class/System/System.Diagnostics/ChangeLog 2007-09-05 08:54:41 UTC 
(rev 85335)
+++ trunk/mcs/class/System/System.Diagnostics/ChangeLog 2007-09-05 08:57:02 UTC 
(rev 85336)
@@ -1,3 +1,13 @@
+2007-09-05  Atsushi Enomoto  <[EMAIL PROTECTED]>
+
+       * EventLog.cs, EventLogImpl.cs, LocalFileEventLog.cs, NullEventLog.cs,
+         Win32EventLog.cs : added missing members, will be left unsupported
+         in non-Win32 impl and left unimplemented in Win32.
+       * CounterCreationDataCollection.cs : in 2.0 OnValidate() is overriden
+         instad of OnInsert().
+       * Process.cs : removed StandardErrorEncoding and
+         StandardOutputEncoding. They do not exist anymore.
+
 2007-09-03  Atsushi Enomoto  <[EMAIL PROTECTED]>
 
        * ProcessStartInfo.cs : Implemented Verbs. It is done.

Modified: 
trunk/mcs/class/System/System.Diagnostics/CounterCreationDataCollection.cs
===================================================================
--- trunk/mcs/class/System/System.Diagnostics/CounterCreationDataCollection.cs  
2007-09-05 08:54:41 UTC (rev 85335)
+++ trunk/mcs/class/System/System.Diagnostics/CounterCreationDataCollection.cs  
2007-09-05 08:57:02 UTC (rev 85336)
@@ -100,7 +100,11 @@
                        InnerList.Insert (index, value);
                }
 
+#if NET_2_0
+               protected override void OnValidate (object value)
+#else
                protected override void OnInsert (int index, object value)
+#endif
                {
                        if (!(value is CounterCreationData))
                                throw new NotSupportedException (Locale.GetText(

Modified: trunk/mcs/class/System/System.Diagnostics/EventLog.cs
===================================================================
--- trunk/mcs/class/System/System.Diagnostics/EventLog.cs       2007-09-05 
08:54:41 UTC (rev 85335)
+++ trunk/mcs/class/System/System.Diagnostics/EventLog.cs       2007-09-05 
08:57:02 UTC (rev 85336)
@@ -194,6 +194,40 @@
                        set {synchronizingObject = value;}
                }
 
+#if NET_2_0
+               [MonoTODO]
+               [ComVisibleAttribute (false)]
+               public OverflowAction OverflowAction {
+                       get { return Impl.OverflowAction; }
+               }
+
+               [MonoTODO]
+               [ComVisibleAttribute (false)]
+               public int MinimumRetentionDays {
+                       get { return Impl.MinimumRetentionDays; }
+               }
+
+               [MonoTODO]
+               [ComVisibleAttribute (false)]
+               public long MaximumKilobytes {
+                       get { return Impl.MaximumKilobytes; }
+                       set { Impl.MaximumKilobytes = value; }
+               }
+
+               [MonoTODO]
+               public void ModifyOverflowPolicy (OverflowAction action, int 
retentionDays)
+               {
+                       Impl.ModifyOverflowPolicy (action, retentionDays);
+               }
+
+               [MonoTODO]
+               [ComVisibleAttribute (false)]
+               public void RegisterDisplayName (string resourceFile, long 
resourceId)
+               {
+                       Impl.RegisterDisplayName (resourceFile, resourceId);
+               }
+#endif
+
                public void BeginInit ()
                {
                        Impl.BeginInit();

Modified: trunk/mcs/class/System/System.Diagnostics/EventLogImpl.cs
===================================================================
--- trunk/mcs/class/System/System.Diagnostics/EventLogImpl.cs   2007-09-05 
08:54:41 UTC (rev 85335)
+++ trunk/mcs/class/System/System.Diagnostics/EventLogImpl.cs   2007-09-05 
08:57:02 UTC (rev 85336)
@@ -229,5 +229,17 @@
                                                logName, machineName));
                        }
                }
+
+#if NET_2_0
+               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);
+#endif
        }
 }

Modified: trunk/mcs/class/System/System.Diagnostics/LocalFileEventLog.cs
===================================================================
--- trunk/mcs/class/System/System.Diagnostics/LocalFileEventLog.cs      
2007-09-05 08:54:41 UTC (rev 85335)
+++ trunk/mcs/class/System/System.Diagnostics/LocalFileEventLog.cs      
2007-09-05 08:57:02 UTC (rev 85336)
@@ -431,5 +431,30 @@
                        }
                        p.Close ();
                }
+
+#if NET_2_0
+               public override OverflowAction OverflowAction {
+                       get { return OverflowAction.DoNotOverwrite; }
+               }
+
+               public override int MinimumRetentionDays {
+                       get { return int.MaxValue; }
+               }
+
+               public override long MaximumKilobytes {
+                       get { return long.MaxValue; }
+                       set { throw new NotSupportedException ("This EventLog 
implementation does not support setting max kilobytes policy"); }
+               }
+
+               public override void ModifyOverflowPolicy (OverflowAction 
action, int retentionDays)
+               {
+                       throw new NotSupportedException ("This EventLog 
implementation does not support modifying overflow policy");
+               }
+
+               public override void RegisterDisplayName (string resourceFile, 
long resourceId)
+               {
+                       throw new NotSupportedException ("This EventLog 
implementation does not support registering display name");
+               }
+#endif
        }
 }

Modified: trunk/mcs/class/System/System.Diagnostics/NullEventLog.cs
===================================================================
--- trunk/mcs/class/System/System.Diagnostics/NullEventLog.cs   2007-09-05 
08:54:41 UTC (rev 85335)
+++ trunk/mcs/class/System/System.Diagnostics/NullEventLog.cs   2007-09-05 
08:57:02 UTC (rev 85336)
@@ -126,5 +126,30 @@
                public override void WriteEntry (string [] replacementStrings, 
EventLogEntryType type, uint instanceID, short category, byte [] rawData)
                {
                }
+
+#if NET_2_0
+               public override OverflowAction OverflowAction {
+                       get { return OverflowAction.DoNotOverwrite; }
+               }
+
+               public override int MinimumRetentionDays {
+                       get { return int.MaxValue; }
+               }
+
+               public override long MaximumKilobytes {
+                       get { return long.MaxValue; }
+                       set { throw new NotSupportedException ("This EventLog 
implementation does not support setting max kilobytes policy"); }
+               }
+
+               public override void ModifyOverflowPolicy (OverflowAction 
action, int retentionDays)
+               {
+                       throw new NotSupportedException ("This EventLog 
implementation does not support modifying overflow policy");
+               }
+
+               public override void RegisterDisplayName (string resourceFile, 
long resourceId)
+               {
+                       throw new NotSupportedException ("This EventLog 
implementation does not support registering display name");
+               }
+#endif
        }
 }

Modified: trunk/mcs/class/System/System.Diagnostics/Process.cs
===================================================================
--- trunk/mcs/class/System/System.Diagnostics/Process.cs        2007-09-05 
08:54:41 UTC (rev 85335)
+++ trunk/mcs/class/System/System.Diagnostics/Process.cs        2007-09-05 
08:57:02 UTC (rev 85336)
@@ -82,10 +82,6 @@
                EventHandler exited_event;
                IntPtr stdout_rd;
                IntPtr stderr_rd;
-#if NET_2_0
-               Encoding stdout_encoding;
-               Encoding stderr_encoding;
-#endif
                
                /* Private constructor called from other methods */
                private Process(IntPtr handle, int id) {
@@ -1081,10 +1077,8 @@
                        }
 
 #if NET_2_0
-                       // TODO: which ones has precedence? The one from 
startInfo or the one set using
-                       // the Process instance properties?
-                       Encoding stdoutEncoding = 
startInfo.StandardOutputEncoding ?? process.StandardOutputEncoding;
-                       Encoding stderrEncoding = 
startInfo.StandardErrorEncoding ?? process.StandardErrorEncoding;
+                       Encoding stdoutEncoding = 
startInfo.StandardOutputEncoding ?? ConsoleEncoding.OutputEncoding;
+                       Encoding stderrEncoding = 
startInfo.StandardErrorEncoding ?? ConsoleEncoding.OutputEncoding;
 #else
                        Encoding stdoutEncoding = 
ConsoleEncoding.OutputEncoding;
                        Encoding stderrEncoding = 
ConsoleEncoding.OutputEncoding;
@@ -1579,32 +1573,6 @@
                        synchronizingObject.BeginInvoke (exited_event, args);
                }
 
-#if NET_2_0
-               public Encoding StandardOutputEncoding {
-                       get {
-                               if (stdout_encoding != null) {
-                                       return stdout_encoding;
-                               }
-                               return ConsoleEncoding.OutputEncoding;
-                       }
-                       set {
-                               stdout_encoding = value; // if null, we'll use 
the default
-                       }
-               }
-
-               public Encoding StandardErrorEncoding {
-                       get {
-                               if (stderr_encoding != null) {
-                                       return stderr_encoding;
-                               }
-                               return ConsoleEncoding.OutputEncoding;
-                       }
-                       set {
-                               stderr_encoding = value; // if null, we'll use 
the default
-                       }
-               }
-#endif
-
                class ProcessWaitHandle : WaitHandle
                {
                        public ProcessWaitHandle (IntPtr handle)

Modified: trunk/mcs/class/System/System.Diagnostics/Win32EventLog.cs
===================================================================
--- trunk/mcs/class/System/System.Diagnostics/Win32EventLog.cs  2007-09-05 
08:54:41 UTC (rev 85335)
+++ trunk/mcs/class/System/System.Diagnostics/Win32EventLog.cs  2007-09-05 
08:57:02 UTC (rev 85336)
@@ -760,6 +760,31 @@
                        }
                }
 
+#if NET_2_0
+               public override OverflowAction OverflowAction {
+                       get { throw new NotImplementedException (); }
+               }
+
+               public override int MinimumRetentionDays {
+                       get { throw new NotImplementedException (); }
+               }
+
+               public override long MaximumKilobytes {
+                       get { throw new NotImplementedException (); }
+                       set { throw new NotImplementedException (); }
+               }
+
+               public override void ModifyOverflowPolicy (OverflowAction 
action, int retentionDays)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public override void RegisterDisplayName (string resourceFile, 
long resourceId)
+               {
+                       throw new NotImplementedException ();
+               }
+#endif
+
                private class PInvoke
                {
                        [DllImport ("advapi32.dll", SetLastError=true)]

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to