Exemplo n.º 1
0
        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);
            }
        }
Exemplo n.º 2
0
 internal static void OnConfigChanged(object sender, ConfigChangedEventArgs e)
 {
     ConfigChanged?.Invoke(sender, e);
 }