Exemple #1
0
        public static Timer DelayCall <T>(TimeSpan delay, TimeSpan interval, int count, TimerStateCallback <T> callback, T state)
        {
            Timer t = new DelayStateCallTimer <T>(delay, interval, count, callback, state);

            t.Start();

            return(t);
        }
Exemple #2
0
        public static Timer DelayCall(TimeSpan delay, TimeSpan interval, int count, TimerStateCallback callback, object state)
        {
            Timer t = new DelayStateCallTimer(delay, interval, count, callback, state);

            t.Start();

            return(t);
        }
Exemple #3
0
        public static Timer DelayCall <T1, T2, T3, T4>(TimeSpan delay, TimeSpan interval, int count, TimerStateCallback <T1, T2, T3, T4> callback, T1 state1, T2 state2, T3 state3, T4 state4)
        {
            Timer t = new DelayStateCallTimer <T1, T2, T3, T4>(delay, interval, count, callback, state1, state2, state3, state4)
            {
                Priority = ComputePriority(count == 1 ? delay : interval)
            };

            t.Start();

            return(t);
        }
Exemple #4
0
        public static Timer DelayCall <T>(TimeSpan delay, TimeSpan interval, int count, TimerStateCallback <T> callback, T state)
        {
            Timer t = new DelayStateCallTimer <T>(delay, interval, count, callback, state)
            {
                Priority = ComputePriority(count == 1 ? delay : interval)
            };

            t.Start();

            return(t);
        }
Exemple #5
0
        public static Timer DelayCall <T1, T2>(
            TimeSpan delay, TimeSpan interval, int count, TimerStateCallback <T1, T2> callback,
            T1 t1, T2 t2
            )
        {
            Timer t = new DelayStateCallTimer <T1, T2>(delay, interval, count, callback, t1, t2);

            t.Priority = ComputePriority(count == 1 ? delay : interval);

            t.Start();

            return(t);
        }
Exemple #6
0
 public static Server.Timer DelayCall(TimeSpan delay, TimeSpan interval, int count, TimerStateCallback callback, object state)
 {
     Server.Timer timer1 = new DelayStateCallTimer(delay, interval, count, callback, state);
     if (count == 1)
     {
         timer1.Priority = Server.Timer.ComputePriority(delay);
     }
     else
     {
         timer1.Priority = Server.Timer.ComputePriority(interval);
     }
     timer1.Start();
     return(timer1);
 }
Exemple #7
0
        public static Timer DelayCall <T>(TimeSpan delay, TimeSpan interval, int count, TimerStateCallback <T> callback, T state)
        {
            Timer t = new DelayStateCallTimer <T>(delay, interval, count, callback, state);

            if (count == 1)
            {
                t.Priority = ComputePriority(delay);
            }
            else
            {
                t.Priority = ComputePriority(interval);
            }

            t.Start();

            return(t);
        }
		public static Timer DelayCall( TimeSpan delay, TimeSpan interval, int count, TimerStateCallback callback, object state )
		{
			Timer t = new DelayStateCallTimer( delay, interval, count, callback, state );

			if ( count == 1 )
				t.Priority = ComputePriority( delay );
			else
				t.Priority = ComputePriority( interval );

			t.Start();

			return t;
		}