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

get_CachedIntProp() public method

Method to retrieve a particular int property if it is in the cache, and return a bool to say whether it was or not. Similar to ISilDataAccess::get_IntProp, but this method is guaranteed not to do a lazy load of the property and it makes it easier for .Net clients to see whether the property was loaded, because this info is not hidden in an HRESULT.
IVwCacheDa method
public get_CachedIntProp ( int obj, int tag, bool &isInCache ) : int
obj int obj
tag int tag
isInCache bool isInCache
return int
		public int get_CachedIntProp(int obj, int tag, out bool isInCache)
		{
			CheckDisposed();

			var val = 0;
			isInCache = true;
			try
			{
				val = get_IntProp(obj, tag);
			}
			catch (KeyNotFoundException)
			{
				// We'll take it to mean it isn't in the cache.
				// Eat this exception.
				isInCache = false;
			}
			return val;
		}