Exemplo n.º 1
0
        public void TestRemoveObjRef_ForNonCmObjectGuid()
        {
            int  objFlid    = (int)CmObjectFields.kflidCmObject_Guid;
            int  nonObjFlid = 9005;            //CmFilterTags.kflidApp
            int  objHvo1    = 1124;
            int  objHvo2    = 1125;
            Guid guid       = Guid.NewGuid();

            // Cache the guids in this order. When this test failed, caching
            // the guid for objHvo2 clobbered the cached guid for object objHvo1
            // so there was no longer longer a guid in the cache for object objHvo1.
            m_IVwCacheDa.CacheGuidProp(objHvo1, objFlid, guid);
            m_IVwCacheDa.CacheGuidProp(objHvo2, nonObjFlid, guid);

            // Remove the object reference for objHvo2 and make sure it doesn't
            // remove the ability to get the object for objHvo1 using the same guid
            // that was a property for object objHvo2.
            m_ISilDataAccess.RemoveObjRefs(objHvo2);
            Assert.AreEqual(objHvo1, m_ISilDataAccess.get_ObjFromGuid(guid));
        }
Exemplo n.º 2
0
 /// <summary>
 /// Although the name sounds like an update operation, it's really just about
 /// cleaning up the cache.
 /// </summary>
 /// <param name="hvo"></param>
 public void RemoveObjRefs(int hvo)
 {
     m_sda.RemoveObjRefs(hvo);
 }
Exemplo n.º 3
0
 /// <summary>
 /// This processes all atomic and sequence owning and reference props in the cache
 /// and removes the given hvo from any property where it is found. PropChanged is
 /// called on each modified property to notify interested parties.
 ///</summary>
 /// <param name='hvo'> </param>
 public virtual void RemoveObjRefs(int hvo)
 {
     m_baseSda.RemoveObjRefs(hvo);
 }