SIL.FieldWorks.CacheLight.RealDataCache.CacheUnicodeProp C# (CSharp) Method

CacheUnicodeProp() public method

Member CacheUnicodeProp
IVwCacheDa method
public CacheUnicodeProp ( int obj, int tag, string val, int cch ) : void
obj int obj
tag int tag
val string val
cch int cch
return void
		public void CacheUnicodeProp(int obj, int tag, string val, int cch)
		{
			CheckDisposed();

			CheckBasics(obj);
			if (val.Length != cch)
				throw new ArgumentException("Input string not the right length.");
			CheckHvoTagMatch(obj, tag);
			// Make sure Unicode is legal for the given tag.
			var flidType = (CellarPropertyType)MetaDataCache.GetFieldType(tag);
			if (flidType != CellarPropertyType.Unicode)
				throw new ArgumentException(String.Format("Can only put Unicode data in the tag/flid '{0}'.", tag));

			m_basicStringCache[new HvoFlidKey(obj, tag)] = val;
		}