Retrieving Tasks by DateTime

Good morning from California,

Our C# WinForms application requires us to run reports at their pre-scheduled date and time. Your iCalendar product seems perfect for this application. I find the GenerateOccurrences method will generate a list of dates for a given recurrence pattern. I am looking for the inside-out version of that method.


We plan to have a Windows Service running that will check to see if any Tasks are due to run. This could be accomplished with a call to a "GenerateTasksList(DateTime from, DateTime to)" method which would return a list of "Tasks due to run" through which we iterate and instantiate each Task. We don't want to reinvent the wheel if there is already a designed-in way of performing this operation.

So my questions are:

Is there a method that will return a list of Tasks that are due to be run within a given DateTime frame?

What is the best practice to accomplish this?

Has anyone already done this and are you willing to share your thoughts?

Thanks for your time,
Jim

At the moment Aspose.iCalendar supports recurrence patterns only and has no notion of higher level calendar elements such as tasks or events.

You can easily add a Task class, add properties like Name, Description and RecurrencePattern to it. You can make Task pretty simple data only class and serialize it into XML. In fact, this is exactly the way its done in the demo project included with Aspose.iCalendar. When using the demo project, please ignore cosmetic issues, we are still working to finalize it.

In the future, we will add support for full iCalendar specification that includes events, todo etc objects. But I don’t suggest you wait for it because implementing a list of tasks is very easy.