void FsWatcherChanged(object sender, FileSystemEventArgs e)
{
if (IsDuplicateEvent()) return;
bool completed = false;
Console.WriteLine("Found change in file. Recompiling...");
while(!completed){
try
{
compilationDelegate();
completed = true;
}
catch(IOException)
{
Thread.Sleep(100);
Console.WriteLine("[Waiting]");
Console.WriteLine("File still locked, waiting 100ms");
}
}
}