示例#1
0
        /// <summary>
        /// 清除所有缓存
        /// </summary>
        public override void Clear()
        {
            try
            {
                lock (lockObj)
                {
                    DBSchema.Clear();
                    TableSchema.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();
                    if (!string.IsNullOrEmpty(AppConfig.DB.SchemaMapPath))
                    {
                        if (Directory.Exists(AppConfig.RunPath + AppConfig.DB.SchemaMapPath))
                        {
                            Directory.Delete(AppConfig.RunPath + AppConfig.DB.SchemaMapPath, true);
                        }
                    }
                }
            }
            catch
            {
                errorCount++;
            }
        }
示例#2
0
        /// <summary>
        /// 清除所有缓存
        /// </summary>
        public override void Clear()
        {
            try
            {
                lock (lockObj)
                {
                    DBSchema.Clear();
                    TableSchema.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++;
            }
        }
 public virtual int Fill(DBSchema.OrderDetailsDataTable dataTable) {
     this.Adapter.SelectCommand = this.CommandCollection[0];
     if ((this.ClearBeforeFill == true)) {
         dataTable.Clear();
     }
     int returnValue = this.Adapter.Fill(dataTable);
     return returnValue;
 }