Tue Sep 10 12:12:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
[mono.git] / mcs / class / corlib / System.Threading / Timer.cs
1 //
2 // System.Threading.Timer.cs
3 //
4 // Author:
5 //   Dick Porter (dick@ximian.com)
6 //
7 // (C) Ximian, Inc.  http://www.ximian.com
8 //
9
10
11 namespace System.Threading
12 {
13         public sealed class Timer : MarshalByRefObject, IDisposable
14         {
15                 [MonoTODO]
16                 public Timer(TimerCallback callback, object state, int dueTime, int period) {
17                         if(dueTime < -1) {
18                                 throw new ArgumentOutOfRangeException("Due time < -1");
19                         }
20                         if(period < -1) {
21                                 throw new ArgumentOutOfRangeException("Period < -1");
22                         }
23                         
24                         // FIXME
25                 }
26
27                 [MonoTODO]
28                 public Timer(TimerCallback callback, object state, long dueTime, long period) {
29                         if(dueTime < -1) {
30                                 throw new ArgumentOutOfRangeException("Due time < -1");
31                         }
32                         if(period < -1) {
33                                 throw new ArgumentOutOfRangeException("Period < -1");
34                         }
35                         // FIXME
36                 }
37
38                 [MonoTODO]
39                 public Timer(TimerCallback callback, object state, TimeSpan dueTime, TimeSpan period) {
40                         if(dueTime.Milliseconds < 0 || dueTime.Milliseconds > Int32.MaxValue) {
41                                 throw new ArgumentOutOfRangeException("Due time out of range");
42                         }
43                         if(period.Milliseconds < 0 || period.Milliseconds > Int32.MaxValue) {
44                                 throw new ArgumentOutOfRangeException("Period out of range");
45                         }
46                         // FIXME
47                 }
48
49                 [CLSCompliant(false)][MonoTODO]
50                 public Timer(TimerCallback callback, object state, uint dueTime, uint period) {
51                         // FIXME
52                 }
53
54                 [MonoTODO]
55                 public bool Change(int dueTime, int period) {
56                         if(dueTime < -1) {
57                                 throw new ArgumentOutOfRangeException("Due time < -1");
58                         }
59                         if(period < -1) {
60                                 throw new ArgumentOutOfRangeException("Period < -1");
61                         }
62                         // FIXME
63                         return(false);
64                 }
65
66                 [MonoTODO]
67                 public bool Change(long dueTime, long period) {
68                         if(dueTime < -1) {
69                                 throw new ArgumentOutOfRangeException("Due time < -1");
70                         }
71                         if(period < -1) {
72                                 throw new ArgumentOutOfRangeException("Period < -1");
73                         }
74                         if(dueTime > 4294967294) {
75                                 throw new NotSupportedException("Due time too large");
76                         }
77                         if(period > 4294967294) {
78                                 throw new NotSupportedException("Period too large");
79                         }
80                         // FIXME
81                         return(false);
82                 }
83
84                 [MonoTODO]
85                 public bool Change(TimeSpan dueTime, TimeSpan period) {
86                         // FIXME
87                         return(false);
88                 }
89
90                 [CLSCompliant(false)][MonoTODO]
91                 public bool Change(uint dueTime, uint period) {
92                         // FIXME
93                         return(false);
94                 }
95
96                 [MonoTODO]
97                 public void Dispose() {
98                         // FIXME
99                 }
100
101                 [MonoTODO]
102                 public bool Dispose(WaitHandle notifyObject) {
103                         // FIXME
104                         return(false);
105                 }
106
107                 [MonoTODO]
108                 ~Timer() {
109                         // FIXME
110                 }
111         }
112 }