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

CacheBinaryProp() public method

Member CacheBinaryProp
IVwCacheDa method
public CacheBinaryProp ( int obj, int tag, [ SizeParamIndex = 3)]Byte[]rgb, int cb ) : void
obj int obj
tag int tag
SizeParamIndex [
cb int cb
return void
		public void CacheBinaryProp(int obj, int tag, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 3)] Byte[] rgb, int cb)
		{
			CheckDisposed();

			CheckBasics(obj);
			if (rgb.Length != cb)
				throw new ArgumentException("Binary input not the right length.");

			CheckHvoTagMatch(obj, tag);
			// Make sure Binary is legal for the given tag.
			var flidType = MetaDataCache.GetFieldType(tag);
			if (flidType != (int)CellarPropertyType.Binary)
				throw new ArgumentException(String.Format("Can only put Binary data in the tag/flid '{0}'.", tag));

			m_basicByteArrayCache[new HvoFlidKey(obj, tag)] = rgb;
		}