コード例 #1
0
        /// <summary>
        /// Adds a job to the timer to operate asyncronously.
        /// </summary>
        /// <param name="Schedule">The schedule that this delegate is to be run on.</param>
        /// <param name="f">The delegate to run</param>
        /// <param name="Params">The method parameters to pass if you leave any DateTime parameters unbound, then they will be set with the scheduled run time of the
        /// method.  Any unbound object parameters will get this Job object passed in.</param>
        public void AddAsyncJob(IScheduledItem Schedule, Delegate f, params object[] Params)
        {
            TimerJob Event = new TimerJob(Schedule, new DelegateMethodCall(f, Params));

            Event.SyncronizedEvent = false;
            _Jobs.Add(Event);
        }
コード例 #2
0
ファイル: ReportTimer.cs プロジェクト: kaotul/autotrade
 public void AddAsyncReportEvent(IScheduledItem Schedule, int reportNo)
 {
     if (Elapsed == null)
         throw new Exception("You must set elapsed before adding Events");
     TimerJob Event = new TimerJob(Schedule, new DelegateMethodCall(Handler, Elapsed, reportNo));
     Event.SyncronizedEvent = false;
     AddJob(Event);
 }
コード例 #3
0
        /// <summary>
        /// Adds a job to the timer to operate asyncronously.
        /// </summary>
        /// <param name="schedule">The schedule that this delegate is to be run on.</param>
        /// <param name="func">The delegate to run</param>
        /// <param name="parameters">The method parameters to pass if you leave any DateTime parameters unbound, then they will be set with the scheduled run time of the
        /// method.  Any unbound object parameters will get this Job object passed in.</param>
        public void AddAsyncJob(IScheduledItem schedule, Delegate func, params object[] parameters)
        {
            var timerJob = new TimerJob(schedule, new DelegateMethodCall(func, parameters))
            {
                IsSyncronized = false
            };

            _CollJobs.Add(timerJob);
        }
コード例 #4
0
        private void OnError(DateTime eventTime, TimerJob job, Exception e)
        {
            if (Error == null)
            {
                return;
            }

            try { Error(this, new ExceptionEventArgs(eventTime, e)); }
            catch (Exception) { }
        }
コード例 #5
0
        public void AddAsyncReportEvent(IScheduledItem Schedule, int reportNo)
        {
            if (Elapsed == null)
            {
                throw new Exception("You must set elapsed before adding Events");
            }
            TimerJob Event = new TimerJob(Schedule, new DelegateMethodCall(Handler, Elapsed, reportNo));

            Event.SyncronizedEvent = false;
            AddJob(Event);
        }
コード例 #6
0
        public void AddAsyncReportEvent(IScheduledItem schedule, int reportNo)
        {
            if (null == Elapsed)
            {
                throw new Exception("You must set elapsed before adding Events");
            }
            var Event = new TimerJob(schedule, new DelegateMethodCall(Handler, Elapsed, reportNo))
            {
                IsSyncronized = false
            };

            AddJob(Event);
        }
コード例 #7
0
 public void Add(TimerJob Event)
 {
     _List.Add(Event);
 }
コード例 #8
0
ファイル: TimerJob.cs プロジェクト: danielstutzman/Wasp
 public void RemoveJob(TimerJob job)
 {
     lock (_List)
         _List.Remove(job);
 }
コード例 #9
0
ファイル: TimerJob.cs プロジェクト: danielstutzman/Wasp
 public void Add(TimerJob Event)
 {
     lock (_List)
         _List.Add(Event);
 }
コード例 #10
0
ファイル: ScheduleTimer.cs プロジェクト: danielstutzman/Wasp
 /// <summary>Removes a specific job from the list</summary>
 /// <param name="i">the index of the job to remove.</param>
 public void RemoveJob(TimerJob job)
 {
     _Jobs.RemoveJob(job);
 }
コード例 #11
0
 /// <summary>
 /// Adds a job to the timer.
 /// </summary>
 /// <param name="Event"></param>
 public void AddJob(TimerJob Event)
 {
     _Jobs.Add(Event);
 }
コード例 #12
0
ファイル: ScheduleTimer.cs プロジェクト: kaotul/autotrade
        private void OnError(DateTime eventTime, TimerJob job, Exception e)
        {
            if (Error == null)
                return;

            try { Error(this, new ExceptionEventArgs(eventTime, e)); }
            catch (Exception) {}
        }
コード例 #13
0
ファイル: TimerJob.cs プロジェクト: kaotul/autotrade
 public void Add(TimerJob Event)
 {
     _List.Add(Event);
 }
コード例 #14
0
ファイル: ScheduleTimer.cs プロジェクト: kaotul/autotrade
 /// <summary>
 /// Adds a job to the timer.  
 /// </summary>
 /// <param name="Event"></param>
 public void AddJob(TimerJob Event)
 {
     _Jobs.Add(Event);
 }
コード例 #15
-1
 /// <summary>
 /// Adds a job to the timer to operate asyncronously.
 /// </summary>
 /// <param name="schedule">The schedule that this delegate is to be run on.</param>
 /// <param name="func">The delegate to run</param>
 /// <param name="parameters">The method parameters to pass if you leave any DateTime parameters unbound, then they will be set with the scheduled run time of the 
 /// method.  Any unbound object parameters will get this Job object passed in.</param>
 public void AddAsyncJob(IScheduledItem schedule, Delegate func, params object[] parameters)
 {
     var timerJob = new TimerJob(schedule, new DelegateMethodCall(func, parameters))
                    {
                        IsSyncronized = false
                    };
     _CollJobs.Add(timerJob);
 }
コード例 #16
-1
ファイル: ReportTimer.cs プロジェクト: erashid/ScheduleTimer
        public void AddAsyncReportEvent(IScheduledItem schedule, int reportNo)
        {
            if (null == Elapsed) throw new Exception("You must set elapsed before adding Events");
            var Event = new TimerJob(schedule, new DelegateMethodCall(Handler, Elapsed, reportNo))
                        {
                            IsSyncronized = false
                        };

            AddJob(Event);
        }
コード例 #17
-1
ファイル: ScheduleTimer.cs プロジェクト: kaotul/autotrade
 /// <summary>
 /// Adds a job to the timer to operate asyncronously.
 /// </summary>
 /// <param name="Schedule">The schedule that this delegate is to be run on.</param>
 /// <param name="f">The delegate to run</param>
 /// <param name="Params">The method parameters to pass if you leave any DateTime parameters unbound, then they will be set with the scheduled run time of the 
 /// method.  Any unbound object parameters will get this Job object passed in.</param>
 public void AddAsyncJob(IScheduledItem Schedule, Delegate f, params object[] Params)
 {
     TimerJob Event = new TimerJob(Schedule, new DelegateMethodCall(f, Params));
     Event.SyncronizedEvent = false;
     _Jobs.Add(Event);
 }