示例#1
0
        public override void Change(CacheChangedArgs <CacheType> args)
        {
            dynamic key         = this.GetKey(args.Cache);
            dynamic snapshotKey = this.GetKey(args.Snapshot);

            if (key != snapshotKey)
            {
                this.Remove(snapshotKey);
                this.Add(args.Cache);
            }
        }
示例#2
0
        public virtual void Change(T cache, T snapshot)
        {
            CacheChangedArgs <T> changedArgs = new CacheChangedArgs <T>();

            changedArgs.Cache    = cache;
            changedArgs.Snapshot = snapshot;

            if (this.Changed != null)
            {
                this.Changed(changedArgs);
            }
        }
示例#3
0
 public abstract void Change(CacheChangedArgs <T> args);
示例#4
0
 private void CacheManager_Changed(CacheChangedArgs <T> args)
 {
     this.Change(args);
 }