using System;
using System.Collections;
using System.Runtime.InteropServices;
using TaskSchedulerInterop;
namespace TaskScheduler
{
///
/// Deprecated. For V1 compatibility only.
///
///
///
Scheduler is just a wrapper around the TaskList class.
///
Provided for compatibility with version one of the library. Use of Scheduler
/// and TaskList will normally result in COM memory leaks.
///
public class Scheduler
{
///
/// Internal field which holds TaskList instance
///
private readonly TaskList tasks = null;
///
/// Creates instance of task scheduler on local machine
///
public Scheduler()
{
tasks = new TaskList();
}
///
/// Creates instance of task scheduler on remote machine
///
/// Name of remote machine
public Scheduler(string computer)
{
tasks = new TaskList();
TargetComputer = computer;
}
///
/// Gets/sets name of target computer. Null or emptry string specifies local computer.
///
public string TargetComputer
{
get
{
return tasks.TargetComputer;
}
set
{
tasks.TargetComputer = value;
}
}
///
/// Gets collection of system tasks
///
public TaskList Tasks
{
get
{
return tasks;
}
}
}
}