TfsGitRepository Class
This is one of the two core classes to the TFS Git server object model. It represents a repository on a Team Project Collection. You can't new a TfsGitRepository yourself -- create, delete, fork, and acquisition of an existing TfsGitRepository are all done through the TeamFoundationGitRepositoryService's methods. Consumers of this class should not cache TfsGitRepository instances across logical requests.
Inheritance Hierarchy
System.Object
Microsoft.TeamFoundation.Git.Server.TfsGitRepository
Namespace: Microsoft.TeamFoundation.Git.Server
Assembly: Microsoft.TeamFoundation.Git.Server (in Microsoft.TeamFoundation.Git.Server.dll)
Syntax
'Declaration
Public Class TfsGitRepository _
Implements IDisposable
public class TfsGitRepository : IDisposable
public ref class TfsGitRepository : IDisposable
type TfsGitRepository =
class
interface IDisposable
end
public class TfsGitRepository implements IDisposable
The TfsGitRepository type exposes the following members.
Properties
Name | Description | |
---|---|---|
Name | Every Git repository has a name. The name is unique in the scope of the collection. | |
Refs | The collection of refs for this Git repository. This object has multiple methods on it for reading and writing refs to the repository. | |
RepositoryId | A Team Project Collection may contain multiple Git repositories. They are differentiated by their name as well as by their repository ID. | |
TeamProjectUri | The uri for the team project that owns this Git Repository. Currently, a team project can only have one Git Repository |
Top
Methods
Name | Description | |
---|---|---|
Dispose() | ||
Dispose(Boolean) | ||
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize | We MUST make sure we dispose of the underlying memory mapped files! (Overrides Object.Finalize().) | |
GetDefaultBranch | Get the default branch for this repository as a TfsGitRef. If there is not a default branch, it will return null. | |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetRepositoryUri | ||
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
LookupObject | Looks up the Git object with the given object ID (20-byte SHA-1 hash). | |
LookupObjectType | Looks up the Git object type with the given object ID (20-byte SHA-1 hash). | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) | |
TryLookupObject | Looks up the Git object with the given object ID (20-byte SHA-1 hash). | |
TryLookupObjectType | Looks up the Git object type with the given object ID (20-byte SHA-1 hash). |
Top
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.