SIL.FieldWorks.Common.Controls.ObjectListPublisher.CacheVecProp C# (CSharp) Method

CacheVecProp() public method

Determine absolutely what the new list of hvos will be.
public CacheVecProp ( int hvoObj, int hvos ) : void
hvoObj int The hvo.
hvos int The hvos.
return void
		public void CacheVecProp(int hvoObj, int[] hvos)
		{
			if (hvos == null)
				throw new ArgumentNullException("Should not pass null to CacheVecProp");
			int cvDel = 0;
			int[] old;
			if (m_values.TryGetValue(hvoObj, out old))
				cvDel = old.Length;

			m_values[hvoObj] = hvos;
			SendPropChanged(hvoObj, 0, hvos.Length, cvDel);
		}

Usage Example

Example #1
0
        /// <summary>
        /// Store the given hvos in the cache as a fake vector property belonging to the
        /// language project.
        /// </summary>
        /// <param name="objs">The objs.</param>
        private void StoreData(IEnumerable <ICmObject> objs)
        {
            var rghvo = (from obj in objs
                         select obj.Hvo).ToArray();

            m_listPublisher.CacheVecProp(m_cache.LanguageProject.Hvo, rghvo);
        }
All Usage Examples Of SIL.FieldWorks.Common.Controls.ObjectListPublisher::CacheVecProp