Esempio n. 1
0
        /// <summary>
        /// 重新加载数据
        /// </summary>
        protected virtual void reset()
        {
            insert insert = new insert {
                groups = dictionary <randomKey <keyType> > .Create <group>(), getKey = getKey
            };

            foreach (valueType value in cache.Values)
            {
                insert.onInserted(value);
            }
            groups = insert.groups;
            ++keyVersion;
        }
Esempio n. 2
0
        /// <summary>
        /// 重新加载数据
        /// </summary>
        private void reset()
        {
            insert insert = new insert {
                groups = new Dictionary <keyType, keyValue <keyType, list <valueType> > >(), getKey = getKey
            };

            Monitor.Enter(cache.SqlTool.Lock);
            try
            {
                foreach (valueType value in cache.Values)
                {
                    insert.onInserted(value);
                }
                this.groups = insert.groups;
                ++keyVersion;
            }
            finally { Monitor.Exit(cache.SqlTool.Lock); }
        }
Esempio n. 3
0
        /// <summary>
        /// 重新加载数据
        /// </summary>
        private void reset()
        {
            insert insert = new insert {
                groups = new Dictionary <groupKeyType, Dictionary <keyType, valueType> >(), getGroupKey = getGroupKey, getKey = getKey
            };

            Monitor.Enter(cache.SqlTool.Lock);
            try
            {
                foreach (valueType value in cache.Values)
                {
                    if (isValue(value))
                    {
                        insert.onInserted(value);
                    }
                }
                this.groups = insert.groups;
            }
            finally { Monitor.Exit(cache.SqlTool.Lock); }
        }