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

get_IsPropInCache() public method

Member get_IsPropInCache
public get_IsPropInCache ( int hvo, int tag, int cpt, int ws ) : bool
hvo int hvo
tag int tag
cpt int cpt
ws int ws
return bool
		public bool get_IsPropInCache(int hvo, int tag, int cpt, int ws)
		{
			CheckDisposed();

			var key = new HvoFlidKey(hvo, tag);
			var keyWs = new HvoFlidWSKey(hvo, tag, ws);
			switch ((CellarPropertyType)cpt)
			{
				default:
					throw new ArgumentException("Invalid field type (cpt).");
				case CellarPropertyType.Boolean:
					return m_boolCache.ContainsKey(key);
				case CellarPropertyType.Integer:
					return m_intCache.ContainsKey(key);
				case CellarPropertyType.Numeric:
					return false; // m_intCache.ContainsKey(key);
				case CellarPropertyType.Float:
					return false; // m_intCache.ContainsKey(key);
				case CellarPropertyType.Time:
					return m_longCache.ContainsKey(key);
				case CellarPropertyType.Guid:
					return m_guidCache.ContainsKey(key);
				case CellarPropertyType.Image:
					return false; //  m_intCache.ContainsKey(key);
				case CellarPropertyType.GenDate:
					return false; //  m_intCache.ContainsKey(key);
				case CellarPropertyType.Binary:
					return false;
				case CellarPropertyType.String:
					return m_basicITsStringCache.ContainsKey(key);
				case CellarPropertyType.MultiUnicode: // Fall through.
				case CellarPropertyType.MultiString:
					return m_extendedKeyCache.ContainsKey(keyWs);
				case CellarPropertyType.Unicode:
					return m_basicStringCache.ContainsKey(key);

				case CellarPropertyType.OwningAtomic:
					return m_intCache.ContainsKey(key);
				case CellarPropertyType.ReferenceAtomic:
					return m_intCache.ContainsKey(key);
				case CellarPropertyType.OwningCollection:
				case CellarPropertyType.ReferenceCollection:
				case CellarPropertyType.OwningSequence:
				case CellarPropertyType.ReferenceSequence:
					return m_vectorCache.ContainsKey(key);
			}
		}