Do not dispose the underlying Timer every time the Enabled is set to false, keep...
authorfengari <fengari.selas@gmail.com>
Mon, 18 Aug 2014 09:50:08 +0000 (12:50 +0300)
committerfengari <fengari.selas@gmail.com>
Tue, 19 Aug 2014 08:21:52 +0000 (11:21 +0300)
commitb3251b6248f0c7c03d401254b423f395420a4a5f
tree31bc617eade3a1ed2aebe858138be472555c6e59
parenta8a518752e1e9651d51fc682d94e3b6c6cb85599
Do not dispose the underlying Timer every time the Enabled is set to false, keep it around for as long as this Timer exists. Throw ObjectDisposedException on Enabled setter. ArgumentException throwing according to docs. Removed 'disposed' field. DueTime for underlying timer changes only if enabled (as per docs). Check for already disposed in Dispose(). Not firing Elapsed if disposed. Unit tests.
mcs/class/System/System.Timers/Timer.cs
mcs/class/System/Test/System.Timers/TimerTest.cs