GitSharp.Core.DirectoryCache.DirCacheEntry.setObjectIdFromRaw C# (CSharp) Method

setObjectIdFromRaw() public method

Set the ObjectId for the entry from the raw binary representation.
public setObjectIdFromRaw ( byte bs, int p ) : void
bs byte /// The raw byte buffer to read from. At least 20 bytes after /// must be available within this byte array. ///
p int position to read the first byte of data from.
return void
        public void setObjectIdFromRaw(byte[] bs, int p)
        {
            Array.Copy(bs, p, idBuffer(), idOffset(), Constants.OBJECT_ID_LENGTH);
        }

Usage Example

Exemplo n.º 1
0
        private static DirCacheEntry ToEntry(int stage, TreeWalk.TreeWalk tw)
        {
            var e        = new DirCacheEntry(tw.getRawPath(), stage);
            var iterator = tw.getTree <AbstractTreeIterator>(0, typeof(AbstractTreeIterator));

            e.setFileMode(tw.getFileMode(0));
            e.setObjectIdFromRaw(iterator.idBuffer(), iterator.idOffset());
            return(e);
        }
All Usage Examples Of GitSharp.Core.DirectoryCache.DirCacheEntry::setObjectIdFromRaw