private void OnExcute(object state)
        {
            try
            {
                //Repetitive loading process
                var tempFile = Interlocked.Exchange(ref _changedFiles, new HashSet <string>());

                foreach (var fileName in tempFile)
                {
                    var e = new ConfigChangedEventArgs()
                    {
                        FileName = fileName
                    };
                    ConfigManager.OnConfigChanged(this, e);
                    Reload();
                    break;
                }
                //stop timer
                _excuteTimer.Change(Timeout.Infinite, Timeout.Infinite);
            }
            catch (Exception ex)
            {
                TraceLog.WriteError("XmlDataConfigger excute error:{0}", ex);
            }
        }
Beispiel #2
0
        internal static void OnConfigChanged(object sender, ConfigChangedEventArgs e)
        {
            EventHandler <ConfigChangedEventArgs> handler = ConfigChanged;

            if (handler != null)
            {
                handler(sender, e);
            }
        }