public void GuidPropKNTTest() { const int hvo = 1; // Set class first, or it will throw the exception in the wrong place. var clidLe = SilDataAccess.MetaDataCache.GetClassId("ClassD"); SilDataAccess.SetInt(hvo, (int)CmObjectFields.kflidCmObject_Class, clidLe); const int tag = (int)CmObjectFields.kflidCmObject_Guid; SilDataAccess.get_GuidProp(hvo, tag); }
public void GuidPropKNTTest() { CheckDisposed(); int hvo = 1; // Set class first, or it will throw the exception in the wrong place. uint clidLe = SilDataAccess.MetaDataCache.GetClassId("LexEntry"); SilDataAccess.SetInt(hvo, (int)CmObjectFields.kflidCmObject_Class, (int)clidLe); int tag = (int)CmObjectFields.kflidCmObject_Guid; Guid uid = SilDataAccess.get_GuidProp(hvo, tag); }
public void GuidPropTest() { // Set class first, or it will throw an exception. const int hvo = 1; var clidAnal = SilDataAccess.MetaDataCache.GetClassId("ClassA"); SilDataAccess.SetInt(hvo, (int)CmObjectFields.kflidCmObject_Class, clidAnal); // Now set its 'Guid' property. const int tag = (int)CmObjectFields.kflidCmObject_Guid; var uid = Guid.NewGuid(); SilDataAccess.SetGuid(hvo, tag, uid); var uid2 = SilDataAccess.get_GuidProp(hvo, tag); Assert.AreEqual(uid, uid2, "Wrong uid in cache."); // Test the reverse method. var hvo2 = SilDataAccess.get_ObjFromGuid(uid2); Assert.AreEqual(hvo, hvo2, "Wrong hvo in cache for Guid."); }