Beispiel #1
0
 public virtual void StopWatching()
 {
     if (ConfigurationChangeWatcher != null)
     {
         ConfigurationChangeWatcher.StopWatching();
     }
 }
Beispiel #2
0
        protected override void Dispose(bool finalize)
        {
            //ChoQueuedExecutionService.GlobalApplicationQueuedExecutionService.Enqueue(() =>
            //    {
            if (ConfigurationChangeWatcher != null)
            {
                ConfigurationChangeWatcher.StopWatching();
            }

            if (ConfigStorage != null)
            {
                ConfigStorage.Dispose();

                //ConfigStorage = null;
            }
            //});
        }
        public override void Persist(object data, ChoDictionaryService <string, object> stateInfo)
        {
            ChoGuard.ArgumentNotNull(data, "Config Data Object");

            string configXml = ToXml(data);

            if (configXml.IsNullOrEmpty())
            {
                return;
            }

            lock (_padLock)
            {
                ConfigurationChangeWatcher.StopWatching();

                //Save the data
                if (_odbcSectionInfo != null)
                {
                    _odbcSectionInfo.SaveData(configXml);
                }

                ConfigurationChangeWatcher.StartWatching();
            }
        }