C# 클래스 LibGit2Sharp.Repository

A Repository is the primary interface into a git repository
상속: IDisposable
파일 보기 프로젝트 열기: tclem/libgit2sharp 1 사용 예제들

Private Properties

프로퍼티 타입 설명
IsReferencePeelable bool

공개 메소드들

메소드 설명
Discover ( string startingPath ) : string

Probe for a git repository.

The lookup start from startingPath and walk upward parent directories if nothing has been found.

Dispose ( ) : void

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

HasObject ( string sha ) : bool

Tells if the specified sha exists in the repository. Exceptions: ArgumentException ArgumentNullException

Init ( string path, bool isBare = false ) : string

Init a repo at the specified path.

Lookup ( ObjectId id, GitObjectType type = GitObjectType.Any ) : GitObject

Try to lookup an object by its ObjectId and GitObjectType. If no matching object is found, null will be returned.

Lookup ( string shaOrReferenceName, GitObjectType type = GitObjectType.Any ) : GitObject

Try to lookup an object by its sha or a reference canonical name and GitObjectType. If no matching object is found, null will be returned.

Repository ( string path ) : System

Initializes a new instance of the Repository class.

For a standard repository, path should point to the ".git" folder. For a bare repository, path should directly point to the repository folder.

보호된 메소드들

메소드 설명
Dispose ( bool disposing ) : void

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

비공개 메소드들

메소드 설명
IsReferencePeelable ( System.Reference reference ) : bool

메소드 상세

Discover() 공개 정적인 메소드

Probe for a git repository.

The lookup start from startingPath and walk upward parent directories if nothing has been found.

public static Discover ( string startingPath ) : string
startingPath string The base path where the lookup starts.
리턴 string

Dispose() 공개 메소드

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public Dispose ( ) : void
리턴 void

Dispose() 보호된 메소드

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
protected Dispose ( bool disposing ) : void
disposing bool
리턴 void

HasObject() 공개 메소드

Tells if the specified sha exists in the repository. Exceptions: ArgumentException ArgumentNullException
public HasObject ( string sha ) : bool
sha string The sha.
리턴 bool

Init() 공개 정적인 메소드

Init a repo at the specified path.
public static Init ( string path, bool isBare = false ) : string
path string The path to the working folder when initializing a standard ".git" repository. Otherwise, when initializing a bare repository, the path to the expected location of this later.
isBare bool true to initialize a bare repository. False otherwise, to initialize a standard ".git" repository.
리턴 string

Lookup() 공개 메소드

Try to lookup an object by its ObjectId and GitObjectType. If no matching object is found, null will be returned.
public Lookup ( ObjectId id, GitObjectType type = GitObjectType.Any ) : GitObject
id ObjectId The id to lookup.
type GitObjectType The kind of GitObject being looked up
리턴 GitObject

Lookup() 공개 메소드

Try to lookup an object by its sha or a reference canonical name and GitObjectType. If no matching object is found, null will be returned.
public Lookup ( string shaOrReferenceName, GitObjectType type = GitObjectType.Any ) : GitObject
shaOrReferenceName string The sha or reference canonical name to lookup.
type GitObjectType The kind of being looked up
리턴 GitObject

Repository() 공개 메소드

Initializes a new instance of the Repository class.

For a standard repository, path should point to the ".git" folder. For a bare repository, path should directly point to the repository folder.

public Repository ( string path ) : System
path string The path to the git repository to open.
리턴 System