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

CacheGuidProp() public method

Member CacheGuidProp
IVwCacheDa method
public CacheGuidProp ( int obj, int tag, System.Guid uid ) : void
obj int obj
tag int tag
uid System.Guid uid
return void
		public void CacheGuidProp(int obj, int tag, Guid uid)
		{
			CheckDisposed();

			CheckBasics(obj);
			switch (tag)
			{
				case (int)CmObjectFields.kflidCmObject_Guid:
					// Also put it into the reverse cache.
					m_guidToHvo[uid] = obj;
					break;
				default:
					// Make sure the obj has the given tag.
					CheckHvoTagMatch(obj, tag);
					// Make sure a Guid is legal for the given tag.
					var flidType = MetaDataCache.GetFieldType(tag);
					if (flidType != (int)CellarPropertyType.Guid)
						throw new ArgumentException(String.Format("Can only put Guids in the tag/flid '{0}'.", tag));
					break;
			}
			// Made it here, so set it.
			m_guidCache[new HvoFlidKey(obj, tag)] = uid;
		}