Rewind() public method

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

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

            content.Rewind();
        }
Exemplo n.º 2
0
        public GitObject CreateFromContent(GitObjectStream content)
        {
            string type = ReadHeading(content);

            GitObject obj;

            if (type == "commit")
                obj = new Commit();
            else if (type == "tree")
                obj = new Tree();
            else if (type == "blob")
                obj = new Blob();
            else
                throw new NotImplementedException("Support for file type is not implemented.");

            content.Rewind();

            obj.Load(content);

            return obj;
        }