コード例 #1
0
ファイル: LocalCache.cs プロジェクト: wangscript007/cyqdata
        /// <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
ファイル: LocalCache.cs プロジェクト: zzgzzgok/cyqdata
        /// <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++;
            }
        }
コード例 #3
0
 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;
 }