GitSharp.Core.DirectoryCache.DirCache.getEntryCount C# (CSharp) Method

getEntryCount() public method

Total number of file entries stored in the index. This count includes unmerged stages for a file entry if the file is currently conflicted in a merge. This means the total number of entries in the index may be up to 3 times larger than the number of files in the working directory. Note that this value counts only files.
public getEntryCount ( ) : int
return int
		public int getEntryCount()
		{
			return _entryCnt;
		}

Usage Example

        public void testReadIndex_LsFiles()
        {
            List<CGitIndexRecord> ls = ReadLsFiles();
            var dc = new DirCache(_index);
            Assert.AreEqual(0, dc.getEntryCount());
            dc.read();
            Assert.AreEqual(ls.Count, dc.getEntryCount());

            int i = 0;
            foreach (var val in ls)
            {
                AssertAreEqual(val, dc.getEntry(i));
                i++;
            }
        }
All Usage Examples Of GitSharp.Core.DirectoryCache.DirCache::getEntryCount