using Microsoft.Win32.TaskScheduler;
using System;
using System.EnterpriseServices;
using System.IO;
using System.Runtime.InteropServices;
using System.Timers;
namespace $safeprojectname$
{
///
///
///
[ObjectPooling(MinPoolSize = 2, MaxPoolSize = 10, CreationTimeout = 20)]
[Transaction(TransactionOption.Required)]
[ComVisible(true), Guid("$guid2$"), ClassInterface(ClassInterfaceType.None)]
public class TaskHandler1 : TaskHandlerBase
{
///
/// Initializes a new instance of the class.
///
public TaskHandler1()
{
}
///
/// Called to start the COM handler.
///
/// Data string passed in from Task Scheduler action.
public override void Start(string data)
{
// When implementing this method, the handler should return control immediately.
// After the handler starts its processing, it can call the this.StatusHandler.UpdateStatus method to indicate
// its percentage of completion or call the this.StatusHandler.TaskCompleted method to indicate when the
// handler has completed its processing.
// if (notFinishedWorking)
// this.StatusHandler.UpdateStatus(percentComplete, statusMessageString);
// else
// this.StatusHandler.TaskCompleted(0); // or an error code on failure
}
///
/// Called to stop the COM handler.
///
/// The return code that the Task Schedule will raise as an event when the COM handler action is completed. Return 0 on success.
public override int Stop()
{
return 0;
}
///
/// Called to pause the COM handler. Implementing this method is optional.
///
public override void Pause()
{
}
///
/// Called to resume the COM handler. Implementing this method is optional.
///
public override void Resume()
{
}
}
}