/// <summary> /// Fires the <see cref="LimitReached"/> event. /// </summary> /// <param name="sender">The sender of the event.</param> /// <param name="args">The event arguments.</param> protected virtual void FireLimitReached(object sender, LimitReachedEventArgs args) { if (this.LimitReached != null) { this.LimitReached(sender, args); } }
/// <summary> /// Handles the LimitReached event of the TimeOutTimer. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="LimitReachedEventArgs"/> instance containing the event data.</param> private void TimeOutTimer_LimitReached(object sender, LimitReachedEventArgs e) { if (!this.messageInTime) { this.FireTimedOut(this, new TimedOutEventArgs(this)); } else { // Reset the flag. this.messageInTime = false; } }