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; }
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); } }
public void Add(object key, object value, IScheduleExpression expression) { if (key == null) { throw new ArgumentNullException("key"); } if (value == null) { throw new ArgumentNullException("@value"); } if (expression == null) { throw new ArgumentNullException("expression"); } CacheItem item = this.Wrap(key, value); this.Add(item); Schedule.AddSchedule(new ScheduleCallBack(item.Release), expression); }