Author: gert
Date: 2007-09-05 09:13:38 -0400 (Wed, 05 Sep 2007)
New Revision: 85357

Modified:
   trunk/mcs/class/System/System.Timers/ChangeLog
   trunk/mcs/class/System/System.Timers/ElapsedEventArgs.cs
   trunk/mcs/class/System/System.Timers/ElapsedEventHandler.cs
   trunk/mcs/class/System/System.Timers/Timer.cs
   trunk/mcs/class/System/System.Timers/TimersDescriptionAttribute.cs
Log:
* Timer.cs: On 2.0 profile, only allow 32-bit interval in ctor.


Modified: trunk/mcs/class/System/System.Timers/ChangeLog
===================================================================
--- trunk/mcs/class/System/System.Timers/ChangeLog      2007-09-05 12:38:47 UTC 
(rev 85356)
+++ trunk/mcs/class/System/System.Timers/ChangeLog      2007-09-05 13:13:38 UTC 
(rev 85357)
@@ -1,3 +1,7 @@
+2007-09-05  Gert Driesen  <[EMAIL PROTECTED]>
+
+       * Timer.cs: On 2.0 profile, only allow 32-bit interval in ctor.
+
 2006-12-19  Robert Jordan  <[EMAIL PROTECTED]>
 
        * Timer.cs: Apply the latest patch at attached to bug #77847.


Property changes on: trunk/mcs/class/System/System.Timers/ElapsedEventArgs.cs
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: trunk/mcs/class/System/System.Timers/ElapsedEventHandler.cs
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/mcs/class/System/System.Timers/Timer.cs
===================================================================
--- trunk/mcs/class/System/System.Timers/Timer.cs       2007-09-05 12:38:47 UTC 
(rev 85356)
+++ trunk/mcs/class/System/System.Timers/Timer.cs       2007-09-05 13:13:38 UTC 
(rev 85357)
@@ -46,7 +46,7 @@
                ISynchronizeInvoke so;
                ManualResetEvent wait;
                Thread thread;
-               object locker = new object ();
+               readonly object locker = new object ();
 
                [Category("Behavior")]
                [TimersDescription("Occurs when the Interval has elapsed.")]
@@ -58,14 +58,16 @@
 
                public Timer (double interval)
                {
+#if NET_2_0
+                       // MSBUG: 
https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=296761
+                       if (interval > 0x7FFFFFFF)
+                               throw new ArgumentException ("Invalid value: " 
+ interval, "interval");
+#endif
+
                        autoReset = true;
-                       enabled = false;
                        Interval = interval;
-                       so = null;
-                       wait = null;
                }
 
-
                [Category("Behavior")]
                [DefaultValue(true)]
                [TimersDescription("Indicates whether the timer will be 
restarted when it is enabled.")]
@@ -212,4 +214,3 @@
                }
        }
 }
-


Property changes on: trunk/mcs/class/System/System.Timers/Timer.cs
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: 
trunk/mcs/class/System/System.Timers/TimersDescriptionAttribute.cs
___________________________________________________________________
Name: svn:eol-style
   + native

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

Reply via email to