Hi, I have a number of different clases located in a class library in my project. I am using Quartz.NET (a scheduling system) to schedule and load jobs, and the actual job execution is done in these class libraries. I plan to have many types of job types, and each one will have their own class for execution in the class library.
An issue I have is that I can't nest methods in these classes. For example, here is my class:
public class FTPtoFTP : IJob
{
private static ILog _log = LogManager.GetLogger(typeof(HTTPtoFTP));
public FTPtoFTP()
{
}
public virtual void Execute(JobExecutionContext context)
{
//Code that executes, the variable context allows me to access the job information
}
}
If I try to put a method in the execution part of the class, such as...
string[] GetFileList()
{
//Code for getting file list
}
It expects the end of the execution method before my GetFileList one begins, and also doesn't let me access the context variable which I need.
I hope this makes sense, thanks again - you guys rule