private void OnConfigChange(object sender, FileSystemEventArgs e)
{
// There is a bug with the framework:
// When there is a file changed event detected, this method will be triggered twice
// The following conditional check helps to prevent this bug from triggering our code twice
if (!onConfigChange)
{
onConfigChange = true;
Globals.ThisAddIn.Dispatcher.Invoke(new ReflectConfigurationChange(reflectConfigurationChange), e.FullPath);
}
else
{
onConfigChange = false;
}
}