コード例 #1
0
 internal ScheduledItem(ScheduleCallBack callBack, IScheduleExpression expression) : this()
 {
     if (callBack == null)
     {
         throw new ArgumentNullException("callBack");
     }
     if (expression == null)
     {
         throw new ArgumentNullException("expression");
     }
     this._callBack   = callBack;
     this._expression = expression;
 }
コード例 #2
0
        public static void AddSchedule(ScheduleCallBack callBack, IScheduleExpression expression)
        {
            if (callBack == null)
            {
                throw new ArgumentNullException("callBack");
            }
            if (expression == null)
            {
                throw new ArgumentNullException("expression");
            }
            ScheduledItem item = null;

            lock (_scheduleItems.SyncRoot)
            {
                item = new ScheduledItem(callBack, expression);
                _scheduleItems.Add(item);
            }
        }