GitSharp.GitObjectStream.ReadToEnd C# (CSharp) Method

ReadToEnd() public method

public ReadToEnd ( ) : byte[]
return byte[]
        public byte[] ReadToEnd()
        {
            var bytes = new List<byte>();

            while (!IsEndOfFile)
            {
                bytes.Add((byte)stream.ReadByte());
            }

            return bytes.ToArray();
        }

Usage Example

Exemplo n.º 1
0
        private void ReadSignature(GitObjectStream content)
        {
            content.Position = content.Length - 20;

            Sha1Signature = content.ReadToEnd().ToHexString();

            content.Rewind();
        }