Beispiel #1
0
		public ScheduledOperation Schedule(TimeSpan interval, Fiber fiber, Action operation)
		{
			var scheduled = new ScheduledOperationExecuterImpl(GetScheduledTime(interval), fiber, operation);
			Schedule(scheduled);

			return scheduled;
		}
Beispiel #2
0
        public ScheduledOperation Schedule(TimeSpan interval, Fiber fiber, Action operation)
        {
            var scheduled = new ScheduledOperationExecuterImpl(GetScheduledTime(interval), fiber, operation);

            Schedule(scheduled);

            return(scheduled);
        }
Beispiel #3
0
        public ScheduledOperation Schedule(TimeSpan interval, TimeSpan periodicInterval, Fiber fiber, Action operation)
        {
            ScheduledOperationExecuterImpl scheduled = null;

            scheduled = new ScheduledOperationExecuterImpl(GetScheduledTime(interval), fiber, () =>
            {
                try
                {
                    operation();
                }
                catch
                {
                }
                finally
                {
                    scheduled.ScheduledAt = GetScheduledTime(periodicInterval);
                    Schedule(scheduled);
                }
            });
            Schedule(scheduled);

            return(scheduled);
        }
Beispiel #4
0
		public ScheduledOperation Schedule(TimeSpan interval, TimeSpan periodicInterval, Fiber fiber, Action operation)
		{
			ScheduledOperationExecuterImpl scheduled = null;
			scheduled = new ScheduledOperationExecuterImpl(GetScheduledTime(interval), fiber, () =>
				{
					try
					{
						operation();
					}
					catch
					{
					}
					finally
					{
						scheduled.ScheduledAt = GetScheduledTime(periodicInterval);
						Schedule(scheduled);
					}
				});
			Schedule(scheduled);

			return scheduled;
		}