Beispiel #1
0
        public void Int64Prop()
        {
            long valNew = m_ISilDataAccess.get_Int64Prop(1114, 2224);

            Assert.AreEqual(0, valNew);

            m_IVwCacheDa.CacheInt64Prop(1114, 2224, long.MaxValue);
            valNew = m_ISilDataAccess.get_Int64Prop(1114, 2224);
            Assert.AreEqual(long.MaxValue, valNew);

            m_IVwCacheDa.CacheInt64Prop(1114, 2224, long.MinValue);
            valNew = m_ISilDataAccess.get_Int64Prop(1114, 2224);
            Assert.AreEqual(long.MinValue, valNew);
        }
        /// ------------------------------------------------------------------------------------
        /// <summary>
        /// Clears the specified cda.
        /// </summary>
        /// <param name="cda">The cda.</param>
        /// <param name="hvo">The HVO.</param>
        /// <param name="ws">The writing system</param>
        /// ------------------------------------------------------------------------------------
        protected internal virtual void Clear(IVwCacheDa cda, int hvo, int ws)
        {
            switch (this.Type)
            {
            case (int)CellarModuleDefns.kcptReferenceSequence:
                cda.CacheVecProp(hvo, Tag, new int[0], 0);
                break;

            case (int)CellarModuleDefns.kcptTime:
                cda.CacheInt64Prop(hvo, Tag, 0);
                break;

            case (int)CellarModuleDefns.kcptReferenceAtom:
                cda.CacheObjProp(hvo, Tag, 0);
                break;

            default:
                Debug.Assert(false);
                break;
            }
        }
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Clears the specified cda.
		/// </summary>
		/// <param name="cda">The cda.</param>
		/// <param name="hvo">The HVO.</param>
		/// <param name="ws">The writing system</param>
		/// ------------------------------------------------------------------------------------
		protected internal virtual void Clear(IVwCacheDa cda, int hvo, int ws)
		{
			switch (this.Type)
			{
				case (int)CellarModuleDefns.kcptReferenceSequence:
					cda.CacheVecProp(hvo, Tag, new int[0], 0);
					break;
				case (int)CellarModuleDefns.kcptTime:
					cda.CacheInt64Prop(hvo, Tag, 0);
					break;
				case (int)CellarModuleDefns.kcptReferenceAtom:
					cda.CacheObjProp(hvo, Tag, 0);
					break;
				default:
					Debug.Assert(false);
					break;
			}
		}