Beispiel #1
0
        public void BoolPropKNTTest()
        {
            const int hvo = 1;
            // Set class first, or it will throw the exception in the wrong place.
            var clidLe = SilDataAccess.MetaDataCache.GetClassId("ClassA");

            SilDataAccess.SetInt(hvo, (int)CmObjectFields.kflidCmObject_Class, clidLe);
            var tag = SilDataAccess.MetaDataCache.GetFieldId("ClassA", "Prop1", false);

            SilDataAccess.get_BooleanProp(hvo, tag);
        }
        public void BoolPropKNTTest()
        {
            CheckDisposed();

            int hvo = 1;
            // Set class first, or it will throw the exception in the wrong place.
            uint clidLe = SilDataAccess.MetaDataCache.GetClassId("WfiAnalysis");

            SilDataAccess.SetInt(hvo, (int)CmObjectFields.kflidCmObject_Class, (int)clidLe);
            int tag = (int)SilDataAccess.MetaDataCache.GetFieldId("WfiAnalysis", "Category", false);

            bool excludeOriginal = SilDataAccess.get_BooleanProp(hvo, tag);
        }
Beispiel #3
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.");
        }