I have to use a system file Watcher into a Windows service. I write a wrap class and I put it into the service class as shown below :
public partial class CaptureRecordingsService : ServiceBase
{
FileSystemWatcherWrapper myFSWrapper;
public CaptureRecordingsService()
{
InitializeComponent();
}
protected override void OnStart(string[] args)
{
System.Diagnostics.Debugger.Launch();
myFSWrapper = new FileSystemWatcherWrapper();
}
protected override void OnStop()
{
}
}
}
The class works done in Windows form but in the service the methods are not called.
Can someone help me?