public void UnknownProp() { CheckDisposed(); object obj = m_ISilDataAccess.get_UnknownProp(1120, 2220); Assert.IsNull(obj); Assert.IsFalse(m_ISilDataAccess.IsDirty()); ITsPropsBldr propsBldr = TsPropsBldrClass.Create(); ITsTextProps ttp = propsBldr.GetTextProps(); m_ISilDataAccess.SetUnknown(1120, 2220, ttp); obj = m_ISilDataAccess.get_UnknownProp(1120, 2220); Assert.AreEqual(ttp, obj); Assert.IsTrue(m_ISilDataAccess.IsDirty()); }
/// ------------------------------------------------------------------------------------ /// <summary> /// Copies a "binary" Flid as ITsTextProps. /// </summary> /// <param name="thisFlid">The this flid.</param> /// <param name="hvoSrc">The hvo SRC.</param> /// <param name="hvoNew">The hvo new.</param> /// ------------------------------------------------------------------------------------ private void CopyBinaryAsTextProps(int thisFlid, int hvoSrc, int hvoNew) { ITsTextProps txtProps = (ITsTextProps)m_sda.get_UnknownProp(hvoSrc, thisFlid); // If the above line happens to return null (either it WAS null or it WASN'T an ITsTextProps) // then this line will set the copy to null. m_sda.SetUnknown(hvoNew, thisFlid, txtProps); }
/// <summary> /// /// </summary> /// <param name="hvo"></param> /// <param name="tag"></param> /// <param name="_unk"></param> public void SetUnknown(int hvo, int tag, object _unk) { VerifyUpdate(hvo, tag); m_sda.SetUnknown(hvo, tag, _unk); }
/// <summary> /// Change a binary property of an object to a suitable representation of /// the object represented by the IUnknown. Particular implementations may /// differ in the range of object types supported. The current implementation /// only handles ITsTextProps objects. /// The caller should also call PropChanged to notify interested parties, /// except where the change is being made to a newly created object. ///</summary> /// <param name='hvo'> </param> /// <param name='tag'> </param> /// <param name='_unk'> </param> public virtual void SetUnknown(int hvo, int tag, object _unk) { m_baseSda.SetUnknown(hvo, tag, _unk); }