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

VecProp() public method

Get the full contents of the specified sequence in one go.
public VecProp ( int hvo, int tag, int chvoMax, int &chvo, [ MarshalTypeRef ) : void
hvo int hvo
tag int tag
chvoMax int chvoMax
chvo int chvo
MarshalTypeRef [
return void
		public void VecProp(int hvo, int tag, int chvoMax, out int chvo, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ArrayPtrMarshaler), SizeParamIndex = 2)] ArrayPtr/*long[]*/ rghvo)
		{
			CheckDisposed();

			CheckBasics(hvo);
			chvo = 0;

			var key = new HvoFlidKey(hvo, tag);
			var removeFromCache = false;
			if (!m_vectorCache.ContainsKey(key))
				removeFromCache = CheckForVirtual(hvo, tag);
			List<int> val = m_vectorCache[key];
			if (removeFromCache)
				m_vectorCache.Remove(key);

			if (val.Count > chvoMax)
				throw new ArgumentException("The count is greater than the parameter 'chvo'.");
			chvo = val.Count;
			MarshalEx.ArrayToNative(rghvo, chvoMax, val.ToArray());
		}