private static void Shutdown() { if (_configurationChangeWatcher != null) { _configurationChangeWatcher.Dispose(); } _configurationChangeWatcher = null; }
protected override void Dispose(bool finalize) { if (_configurationChangeWatcher != null) { _configurationChangeWatcher.Dispose(); } _configurationChangeWatcher = null; }
private static void Shutdown() { if (_metaDataChangeWatcher != null) { _metaDataChangeWatcher.Dispose(); } _metaDataChangeWatcher = null; }
private static void Refresh() { try { lock (_padLock) { //_propDict.Clear(); } if (ChoMetaDataFilePathSettings.Me != null) { _pbsDataFilepath = ChoMetaDataFilePathSettings.Me.OverridenPBSDataFilePath; } if (!ChoAppFrxSettings.Me.DisableMetaDataConfig) { ChoXmlDocument.CreateXmlFileIfEmpty(_pbsDataFilepath); _pbsDataChangeWatcher = new ChoAppConfigurationChangeFileWatcher(PBS_DATA_KEY, _pbsDataFilepath, _includeFiles); _pbsDataChangeWatcher.SetConfigurationChangedEventHandler(PBS_DATA_FILE_WATCHER_KEY, (sender, e) => { Refresh(); }); } if (!_pbsDataFilepath.IsNullOrWhiteSpace() && File.Exists(_pbsDataFilepath)) { using (ChoXmlDocument xmlDocument = new ChoXmlDocument(_pbsDataFilepath)) { _rootNode = xmlDocument.XmlDocument.DocumentElement; _includeFiles = xmlDocument != null ? xmlDocument.IncludeFiles : null; } } BuildProfileBackingStores(); } catch (Exception ex) { ChoTrace.Error(ex.ToString()); //throw; } }
private static void Shutdown() { ChoProfile.DisposeAll(); if (_pbsDataChangeWatcher != null) { _pbsDataChangeWatcher.Dispose(); } _pbsDataChangeWatcher = null; ChoProfile.Default.Dispose(); _pbsStore.ForEach((keyValuePair) => { if (_profileBackingStopActionsCache.ContainsKey(keyValuePair.Key)) { keyValuePair.Value.Stop(_profileBackingStopActionsCache[keyValuePair.Key]); } }); //_profilerCache.Clear(); _profileBackingStopActionsCache.Clear(); }