This documentation is archived and is not being maintained.

TfsGitRepository Class

Visual Studio 2013

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.

System.Object
  Microsoft.TeamFoundation.Git.Server.TfsGitRepository

Namespace:  Microsoft.TeamFoundation.Git.Server
Assembly:  Microsoft.TeamFoundation.Git.Server (in Microsoft.TeamFoundation.Git.Server.dll)

'Declaration
Public Class TfsGitRepository _
	Implements IDisposable

The TfsGitRepository type exposes the following members.

  NameDescription
Public propertyNameEvery Git repository has a name. The name is unique in the scope of the collection.
Public propertyRefsThe collection of refs for this Git repository. This object has multiple methods on it for reading and writing refs to the repository.
Public propertyRepositoryIdA Team Project Collection may contain multiple Git repositories. They are differentiated by their name as well as by their repository ID.
Public propertyTeamProjectUriThe uri for the team project that owns this Git Repository. Currently, a team project can only have one Git Repository
Top

  NameDescription
Public methodDispose
Protected methodDispose(Boolean)
Public methodEqualsDetermines whether the specified object is equal to the current object. (Inherited from Object.)
Protected methodFinalizeWe MUST make sure we dispose of the underlying memory mapped files! (Overrides Object.Finalize.)
Public methodGetDefaultBranchGet the default branch for this repository as a TfsGitRef. If there is not a default branch, it will return null.
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetRepositoryUri
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodLookupObjectLooks up the Git object with the given object ID (20-byte SHA-1 hash).
Public methodLookupObjectTypeLooks up the Git object type with the given object ID (20-byte SHA-1 hash).
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Public methodTryLookupObjectLooks up the Git object with the given object ID (20-byte SHA-1 hash).
Public methodTryLookupObjectTypeLooks up the Git object type with the given object ID (20-byte SHA-1 hash).
Top

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show: