示例#1
0
        /// <summary>
        /// Make one. Call DoIt to actually make the change.
        /// </summary>
        /// <param name="cache"></param>
        /// <param name="hvo"></param>
        /// <param name="flid"></param>
        /// <param name="ihvoMin"></param>
        /// <param name="ihvoLim"></param>
        /// <param name="newValues"></param>
        public CacheReplaceOneUndoAction(FdoCache cache, int hvo, int flid, int ihvoMin, int ihvoLim, int[] newValues)
        {
            m_cache = cache;
            m_sda   = cache.MainCacheAccessor;
            m_hvo   = hvo;
            m_flid  = flid;
            IVwVirtualHandler vh;

            if (m_cache.TryGetVirtualHandler(m_flid, out vh))
            {
                m_bvh = vh as BaseVirtualHandler;
            }
            m_index     = ihvoMin;
            m_newValues = newValues;
            m_cvDel     = ihvoLim - ihvoMin;
            Debug.Assert(m_cvDel >= 0 && m_cvDel <= 1, "Currently only support deleting one item at a time.");
            if (m_cvDel > 0)
            {
                m_oldValue = m_sda.get_VecItem(hvo, flid, ihvoMin);
            }
        }
示例#2
0
		/// <summary>
		/// Make one. Call DoIt to actually make the change.
		/// </summary>
		/// <param name="cache"></param>
		/// <param name="hvo"></param>
		/// <param name="flid"></param>
		/// <param name="ihvoMin"></param>
		/// <param name="ihvoLim"></param>
		/// <param name="newValues"></param>
		public CacheReplaceOneUndoAction(FdoCache cache, int hvo, int flid, int ihvoMin, int ihvoLim, int[] newValues)
		{
			m_cache = cache;
			m_sda = cache.MainCacheAccessor;
			m_hvo = hvo;
			m_flid = flid;
			IVwVirtualHandler vh;
			if (m_cache.TryGetVirtualHandler(m_flid, out vh))
			{
				m_bvh = vh as BaseVirtualHandler;
			}
			m_index = ihvoMin;
			m_newValues = newValues;
			m_cvDel = ihvoLim - ihvoMin;
			Debug.Assert(m_cvDel >= 0 && m_cvDel <= 1, "Currently only support deleting one item at a time.");
			if (m_cvDel > 0)
				m_oldValue = m_sda.get_VecItem(hvo, flid, ihvoMin);
		}