public void CacheStringAlt(int obj, int tag, int ws, ITsString tss)
{
CheckDisposed();
CheckBasics(obj);
// Make sure ws is not for a magic ws.
// Magic WSes are all negative
if (ws < 0)
throw new ArgumentException("Magic writing system invalid in string.");
if (ws == 0)
throw new ArgumentException("Writing system of zero is invalid in string.");
CheckHvoTagMatch(obj, tag);
// Make sure ITsString is legal for the given tag.
var flidType = (CellarPropertyType)MetaDataCache.GetFieldType(tag);
if ((flidType == CellarPropertyType.MultiUnicode) ||
(flidType == CellarPropertyType.MultiString))
{
m_extendedKeyCache[new HvoFlidWSKey(obj, tag, ws)] = tss;
}
else
{
throw new ArgumentException(String.Format("Can only put ITsString data in the tag/flid '{0}'.", tag));
}
}