/// -------------------------------------------------------------------------------- /// <summary> /// Tests the object to see if it matches the criteria. /// </summary> /// <param name="hvoObj">The hvo obj.</param> /// <returns></returns> /// -------------------------------------------------------------------------------- public bool MatchesCriteria(int hvoObj) { if (!m_fInitCriteriaCalled) { throw new InvalidOperationException("InitCriteria not called for the OddRowFilter class."); } DummyRow text = new DummyRow(m_cache, hvoObj); return((text.Id % 2) == 0); }
/// ------------------------------------------------------------------------------------ /// <summary> /// Adds the specified row to the filter and issues a PropChanged. /// </summary> /// <param name="filter">The filter.</param> /// <param name="dummyRow">The dummy row.</param> /// ------------------------------------------------------------------------------------ private void AddRow(ICmFilter filter, DummyRow dummyRow) { filter.RowsOS.Append(dummyRow); Cache.PropChanged(null, PropChangeType.kpctNotifyAll, dummyRow.OwnerHVO, dummyRow.OwningFlid, filter.RowsOS.Count - 1, 1, 0); }
/// -------------------------------------------------------------------------------- /// <summary> /// Tests the object to see if it matches the criteria. /// </summary> /// <param name="hvoObj">The hvo obj.</param> /// <returns></returns> /// -------------------------------------------------------------------------------- public bool MatchesCriteria(int hvoObj) { if (!m_fInitCriteriaCalled) throw new InvalidOperationException("InitCriteria not called for the OddRowFilter class."); DummyRow text = new DummyRow(m_cache, hvoObj); return (text.Id % 2) == 0; }
/// ------------------------------------------------------------------------------------ /// <summary> /// Initialize the FDO cache and open database /// </summary> /// <remarks>This method is called before each test</remarks> /// ------------------------------------------------------------------------------------ public override void Initialize() { DummyRow.ResetId(); base.Initialize(); }