|
using System;
using System.Collections.Generic;
using System.Text;
using System.Xml;
namespace RecurringClasses
{
/// <summary>
/// Concrete class to handle repeat forever.
/// Had to put a limit to date, picked 5 years
/// J. Finn Sep 2008
/// james.finn@gmail.com
/// </summary>
class RecurForever : absCompletion
{
const int MAX_YEARS = 5; // quit after MAX_YEARS
DateTime CutOffDate = DateTime.Now.AddYears(MAX_YEARS);
/// <summary>
/// constructor sets up variables necessary to respond to ProcecessedAll
/// </summary>
/// <param name="StartDate">Start Date</param>
/// <param name="EndDate">End Date</param>
/// <param name="ReccurNode">XML Node containing completion data</param>
public RecurForever(ref DateTime StartDate, ref DateTime EndDate, XmlNode ReccurNode)
: base(StartDate, EndDate)
{
}
/// <summary>
/// Have all events been processed?
/// </summary>
/// <param name="StartDate">Start Date</param>
/// <param name="EndDate">End Date</param>
/// <returns>true if all events are processed</returns>
public override bool ProcessedAll(DateTime StartDate, DateTime EndDate)
{
return (StartDate < CutOffDate);
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.