示例#1
0
        /// <summary>
        /// 清除所有缓存
        /// </summary>
        public override void Clear()
        {
            try
            {
                lock (lockObj)
                {
                    DBSchema.Clear();
                    TableSchema.Clear();
                    ColumnSchema.Clear();

                    theCache.Clear();
                    theTime.Clear();
                    theFileName.Clear();
                    theKeyTime.Clear();
                    for (int i = 0; i < theFolderWatcher.Count; i++)
                    {
                        theFolderWatcher[i].Changed -= new FileSystemEventHandler(fsy_Changed);
                        theFolderWatcher[i]          = null;
                    }
                    theFolderWatcher.Clear();
                    theFolderKeys.Clear();
                }
            }
            catch
            {
                errorCount++;
            }
        }