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

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

            var tag = SilDataAccess.MetaDataCache.GetFieldId("ClassG", "TextPropsProp7", false);

            SilDataAccess.get_UnknownProp(hvo, tag);
        }
        public void UnkPropKNTTest()
        {
            CheckDisposed();

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

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

            int    tag = (int)SilDataAccess.MetaDataCache.GetFieldId("StPara", "StyleRules", false);
            object unk = SilDataAccess.get_UnknownProp(hvo, tag);
        }
Beispiel #3
0
        public void UnkPropTest()
        {
            // First, set up class id.
            const int hvo  = 1;
            var       clid = SilDataAccess.MetaDataCache.GetClassId("ClassG");

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

            var tsPropsBuilder = TsStringUtils.MakePropsBldr();
            var props          = tsPropsBuilder.GetTextProps();
            var tag            = SilDataAccess.MetaDataCache.GetFieldId("ClassG", "TextPropsProp7", false);

            SilDataAccess.SetUnknown(hvo, tag, props);
            var props2 = (ITsTextProps)SilDataAccess.get_UnknownProp(hvo, tag);

            Assert.AreEqual(props, props2, "Wrong text props in cache.");
        }
        public void UnkPropTest()
        {
            CheckDisposed();

            // First, set up class id.
            int  hvo  = 1;
            uint clid = SilDataAccess.MetaDataCache.GetClassId("StPara");

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

            ITsPropsBldr tsPropsBuilder = TsPropsBldrClass.Create();
            ITsTextProps props          = tsPropsBuilder.GetTextProps();
            int          tag            = (int)SilDataAccess.MetaDataCache.GetFieldId("StPara", "StyleRules", false);

            SilDataAccess.SetUnknown(hvo, tag, props);
            ITsTextProps props2 = (ITsTextProps)SilDataAccess.get_UnknownProp(hvo, tag);

            Assert.AreEqual(props, props2, "Wrong text props in cache.");
        }