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

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

            Schedule(scheduled);

            return(scheduled);
        }
Esempio n. 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);
        }
Esempio n. 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;
		}