GitSharp.Core.ObjectDatabase.openObject C# (CSharp) Method

openObject() public method

Open an object from this database. Alternates (if present) are searched automatically.
public openObject ( GitSharp.Core.WindowCursor curs, AnyObjectId objectId ) : GitSharp.Core.ObjectLoader
curs GitSharp.Core.WindowCursor /// Temporary working space associated with the calling thread. ///
objectId AnyObjectId Identity of the object to open.
return GitSharp.Core.ObjectLoader
        public ObjectLoader openObject(WindowCursor curs, AnyObjectId objectId)
        {
            if (objectId == null) return null;

            ObjectLoader ldr = OpenObjectImpl1(curs, objectId);
            if (ldr != null)
            {
                return ldr;
            }

            ldr = OpenObjectImpl2(curs, objectId.Name, objectId);
            if (ldr != null)
            {
                return ldr;
            }
            return null;
        }