Beispiel #1
0
        public void BoolPropTest()
        {
            // Set class first, or it will throw an exception.
            const int hvo    = 1;
            var       clidLe = SilDataAccess.MetaDataCache.GetClassId("ClassD");

            SilDataAccess.SetInt(hvo, (int)CmObjectFields.kflidCmObject_Class, clidLe);

            // Now set its 'BoolProp3' property.
            var        tag             = SilDataAccess.MetaDataCache.GetFieldId("ClassD", "BoolProp3", false);
            const bool excludeOriginal = true;

            SilDataAccess.SetBoolean(hvo, tag, excludeOriginal);
            var excludeOriginal1 = SilDataAccess.get_BooleanProp(hvo, tag);

            Assert.AreEqual(excludeOriginal, excludeOriginal1, "Wrong bool in cache.");
        }
        public void BoolPropTest()
        {
            // Set class first, or it will throw an exception.
            int  hvo    = 1;
            uint clidLe = SilDataAccess.MetaDataCache.GetClassId("LexEntry");

            SilDataAccess.SetInt(hvo, (int)CmObjectFields.kflidCmObject_Class, (int)clidLe);

            // Now set its 'ExcludeAsHeadword' property.
            int  tag             = (int)SilDataAccess.MetaDataCache.GetFieldId("LexEntry", "ExcludeAsHeadword", false);
            bool excludeOriginal = true;

            SilDataAccess.SetBoolean(hvo, tag, excludeOriginal);
            bool excludeOriginal1 = SilDataAccess.get_BooleanProp(hvo, tag);

            Assert.AreEqual(excludeOriginal, excludeOriginal1, "Wrong bool in cache.");
        }