Export (0) Print
Expand All

VersionControlServer Members

The VersionControlServer object represents the database.

The VersionControlServer type exposes the following members.

  NameDescription
Public method CreateLabel Creates or updates a label. A label designates a collection of specific versions of files and folders. For example, the label Beta 1 may refer to the files server.cs, client.cs, and om.cs as they were on March 3, and the file server.cs as it was on March 5. When you applying a label, it allows you to get the versions of the files with that label. This procedure is commonly used to ensure that you can reproduce a build. Every label has a scope, and its name must be unique within that scope. Most commonly, a label is scoped by the team project. This means that within a given team project, there can be only one label called Beta 1. However, you can choose to set the scope of a label to a lower level in the folder hierarchy. If Beta 1 is scoped at $/CmdLine/shell, then there can be no other label called Beta 1 in $/CmdLine/shell or any folder below it; however, $/CmdLine/parser may use the same label.
Public method CreateTeamProjectFolder At the top level of the Team Foundation Server folder hierarchy are the team projects: the folders immediately below $/ in the tree. All folders and files under source control are directly or indirectly below the team projects. This function creates a team project and configures the folder's settings, permissions, and check-in notes.
Public method CreateWorkspace Overloaded. Creates a new workspace.
Public method DeleteLabel Deletes the label with the specified name and label scope.
Public method DeleteShelveset Overloaded. Removes a shelveset from the server.
Public method DeleteWorkspace Deletes the workspace with the specified name and owner.
Public method DownloadFile Overloaded. Downloads the latest version of a file from the server and puts its contents in a local file.
Public method Equals Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetAllCheckinNoteFieldNames When a user checks changes into the server that is running Team Foundation Server, he can leave, in addition to a generic comment string, a series of named note fields. For instance, a user might type at the command prompt /notes:reviewer=Bob;testsite=Chicago when they check in their files. Team Foundation Server does not have hard-coded fields called reviewer or testsite but they are entered as named properties of this changeset. In general, the property names are not established by the user checking in, but by company policy, so you can query later for all changesets where the testsite property was set to Chicago. This gives you the ability to extend the Team Foundation Server-provided fields associated with changesets. This method returns a list of all the check-in note field names that have ever been used in this Team Foundation Server database. So if the above example had ever been executed on any changeset, the returned list would include the strings reviewer and testsite.
Public method GetAllTeamProjects At the top level of the Team Foundation Server folder hierarchy are the team projects: the folders immediately below $/ in the tree. All folders and files under source control are directly or indirectly below the team projects. This function gets a list of all the team projects on the server that is running Team Foundation Server.
Public method GetBranchHistory Returns the branch history for the requested items.
Public method GetChangeset Overloaded. Gets the details of a changeset.
Public method GetCheckinNoteDefinitions When a user checks in changes into the server that is running Team Foundation Server, they can leave, in addition to a generic comment string, a series of named note fields. For instance, a user might type on the command line /notes:reviewer=Bob;testsite=Chicago when they check in their files. Team Foundation Server does not have hard-coded fields called reviewer or testsite but they are entered as named properties of this changeset. In general, the property names are not established by the user checking in files, but by company policy, so you can query later for all changesets where the testsite property was set to Chicago. This gives you the ability to extend the Team Foundation Server-provided fields associated with changesets. This method returns the field definitions for all the note fields in the specified Team Projects. A field definition shows the string (such as testsite in the above example), but also an item the definition is associated with, whether the field is required, and where the item should be displayed in the order that you choose.
Public method GetCheckinNoteDefinitionsForServerPaths When a user checks in changes into the server that is running Team Foundation Server server, they can leave, in addition to a generic comment string, a series of named note fields. For instance, a user might type at the command prompt /notes:reviewer=Bob;testsite=Chicago when they check-in files. Team Foundation Server does not have hard-coded fields called reviewer or testsite but they are entered as named properties of this changeset. In general, the property names are not established by the user checking in files, but by company policy, so you can query later for all changesets where the testsite property was set to Chicago. This gives you the ability to extend the Team Foundation Server-provided fields associated with changesets. This method returns the field definitions for all the note fields in the specified Team Projects. A field definition shows the string (such as testsite in the above example), but also an item the definition is associated with, whether the field is required, and where the item should be displayed in the order you choose.
Public method GetCheckinPoliciesForServerPaths Gets the list of check in policies for the specified team projects.
Public method GetEffectiveGlobalPermissions Global permissions are permissions that apply to an entire server that is running Team Foundation Server, rather than to one file or folder on that server. The global permissions govern different behaviors from item-level permissions. For instance, Checkin is an item-level permission and Administer Shelvets is a global permission. This method gets the global permissions for the specified user, taking into account both the explicitly set permissions and the permissions of any groups to which the user belongs.
Public method GetEffectivePermissions Does the user have permissions set to check in that particular file? When you answer this question in Team Foundation Server, it can involve some or all the following additional questions: What rights (both allow and deny) does this user have to this file? Does this file inherit rights from its parent folder? If so, what rights does this user have to that parent folder? (and continuing up the tree) What groups does this user belong to, and what rights do they have? This method takes into account all of these answers to return a set of actual rights that the specified user has to the specified file or folder.
Public method GetExtendedItems Overloaded. Gets a list of extended items in the database that matches the specified criteria.
Public method GetFileTypes The server that is running Team Foundation Server returns a list of all the file types registered. Team Foundation Server maintains a list of file types in order to control the multiple checkout option. Files that can be merged (text files) may allow multiple checkouts; files that cannot be merged (most types of binary files) generally do not. The Team Foundation Server administrator defines a list of known file types. When a new file is added to Team Foundation Server, its file extension is used to identify its file type, and thereby controls multiple checkouts.
Public method GetGlobalPermissions Global permissions are permissions that apply to an entire server that is running Team Foundation Server, rather than to one file or folder on that server. The global permissions govern different behaviors from item-level permissions. For instance, Checkin is an item-level permission and Administer Shelvets is a global permission. This method gets the global permissions for the server that is running Team Foundation Server for the specified users or groups. The permissions are returned in string form for easier user display. It is not possible to parse these strings to find a user's global permissions as this depends on the user's membership to certain groups. You can use the GetEffectiveGlobalPermissions method to find the permissions that are granted to a user.
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetItem Overloaded. Gets the Item object for the path specified.
Public method GetItems Overloaded. Gets a list of Items in the database.
Public method GetLatestChangesetId When a user adds, deletes, edits, branches or merges files, these changes are made in his workspace only. When a user checks in files, all these changes become one changeset which is automically updated on the server to be available to other users. That changeset is associated with a changeset ID which acts as a version number for every updated item.This function gets the changeset ID for the most recent changeset on the server that is running Team Foundation Server. The returned value can be passed to GetChangeset() to get all the details on that particular changeset.
Public method GetMergeCandidates Gets the merge candidates for merging between the requested items.
Public method GetPendingChange Overloaded. Gets a pending change from the database, based on the pending change ID.
Public method GetPendingChanges Overloaded.
Public method GetPendingSets When a user adds, deletes, edits, branches or merges a file, these changes are made in their workspace only. The changes are pending until the user checks them into Team Foundation Server. This function gets all the pending changes for the passed items, but download information is not included. Without download information the function call is faster, but if you want to download files, you should use the overload method that will allow you to get download information with the returned items.This function cannot return pending changes on deleted items: that can be done with an overload version of the same function.
Public method GetPermissions Overloaded. Gets the permissions for items in the database.
Public method GetTeamProject At the top level of the Team Foundation Server folder hierarchy are the team projects; the folders immediately below $/ in the tree. All folders and files under source control are directly or indirectly below the team projects. This function gets a specified team project.
Public method GetTeamProjectForServerPath At the top level of the Team Foundation Server folder hierarchy are the team projects; the folders immediately below $/ in the tree. All folders and files under source control are directly or indirectly below the team projects. This function gets a specified team project.
Public method GetTeamProjectsForServerPaths At the top level of the Team Foundation Server folder hierarchy are the team projects; the folders immediately below $/ in the tree. All folders and files under source control are directly or indirectly below the team projects. This function gets one or more team projects.
Public method GetType Gets the type of the current instance. (Inherited from Object.)
Public method GetWorkspace Overloaded. Gets a workspace.
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method QueryHistory Overloaded.
Public method QueryLabels Overloaded. Queries for a list of labels applied to items in the database.
Public method QueryMerges Gets information for all the passed merges in a specified branch, or between two specified branches. This function does not let you get information about deleted files or folders. If you want information about deleted files or folders, you can use the overload method that takes ItemSpec objects instead of strings. This function also does not give you details on which files within each changeset were merged or not merged. If you want information about the merged files you can use the QueryMergesWithDetails method.
Public method QueryPendingSets Overloaded.
Public method QueryShelvedChanges Overloaded. Gets the shelved changes for the specified query.
Public method QueryShelvesets Shelving enables you to take a batch of pending changes and set it aside as a named shelveset. The changes in a shelveset can be restored later into your workspace or into another user's workspace. This function enables you to query for shelvesets.
Public method QueryWorkspaces Gets a list of workspaces that matches the specified name, owner, and computer.
Public method RenameCheckinNoteFieldName Renames all instances of the specified check-in note field to the new specified name for the given team project folder.
Public method ServerItemExists Overloaded. Returns true if the server item of the specified type is in the database.
Public method SetFileTypes Team Foundation Server maintains a list of file types in order to control the multiple checkout option. Files that can be merged (text files) could allow multiple checkouts; files that cannot be merged (most types of binary files) generally do not allow for multiple checkouts. The Team Foundation Server administrator defines a list of known file types. When a new file is added to Team Foundation Server, its file name extension is used to identify its file type, and controls multiple checkouts. This method sends the list of file types to the server that is running Team Foundation Server. The new list of file types replaces the old list. Therefore, to add a new file type, you should first call GetFileTypes to get the current list. Then you can add your new type to the list and pass the complete list to SetFileTypes.
Public method SetGlobalPermissions Global prmissions are permissions that apply to a server that is running Team Foundation Server, instead of to one file or folder on that server. The global permissions govern different behavior from item-level permissions. For instance, Checkin is an item-level permission and Administer Shelvets is a global permission. This function sets the global permissions for the specified users or groups.
Public method SetPermissions Sets the permissions for items in the database.
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
Public method TryGetTeamProject At the top level of the Team Foundation Server folder hierarchy are the team projects; the folders immediately under $/ in the tree. All folders and files under source control are directly or indirectly under the team projects. This function gets a specified team project.
Public method TryGetTeamProjectForServerPath At the top level of the Team Foundation Server folder hierarchy are the team projects; the folders immediately under $/ in the tree. All folders and files under source control are directly or indirectly under the team projects. This function gets a specified team project.
Public method TryGetWorkspace This method starts with a local path and finds a workspace that contains a mapping to that path. Workspace mappings are recursive: if you pass C:\code\CmdLine and no explicit mapping for C:\code\CmdLine is found, Team Foundation Server will search for a mapping to C:\code and then C:\. The search is restricted to mappings for the current user on the current computer.
Public method UnlabelItem This method removes a label from one or more items. For instance, you might use this to remove the file parser.cs version 12 from the label Beta 1 and then add the file parser.cs version 15 to that same label. If you remove all the items from a label, the label itself is deleted.
Public method UpdateUserName relies on the Microsoft Windows Active Directory to authenticate usernames. However, Team Foundation Server also keeps its own cache of user information to enable quicker access. In some circumstances, these two lists can get out of sync. For example, if your username changes in Windows, Team Foundation Server may still be holding onto the old username. When you use this function, it updates the Team Foundation Server user cache with the current information that Windows is storing about the current user.
Top

  NameDescription
Public property ArtifactProvider Gets the ArtifactProvider for this server.
Public property AuthenticatedUser Gets the identity used by the server to authenticate the user.
Public property Canceled Gets or sets the flag to indicate whether the user asked to cancel the current operation.
Public property Static member ClientTracing Gets or sets the TraceSwitch object that represents the tracing level for all instances of VersionControlServer.
Public property CurrentCommand Gets or sets the command that is being executed on the client. The server records this information in the activity log so that server administrators can more easily understand the context in which individual calls to the server have taken place. This property is equivalent to the TeamFoundationServer.OperationName property.
Public property ServerGuid Gets the GUID for the source control server's database.
Public property TeamFoundationServer Gets the TeamFoundationServer object that owns this instance of VersionControlServer.
Top

  NameDescription
Public event AfterWorkItemsUpdated Occurs when updating work items with a check-in.
Public event BeforeCheckinPendingChange Occurs when you check in a pending change.
Public event BeforeDeleteWorkspace Occurs when you delete an existing workspace.
Public event BeforeShelvePendingChange Occurs before shelving a pending change.
Public event BeforeWorkItemsUpdate Occurs before updating work items with a check-in.
Public event CommitCheckin Occurs when a new check-in is committed.
Public event CommitShelveset Occurs when a new shelveset is created.
Public event Conflict Occurs when a conflict is created.
Public event CreatedWorkspace Occurs when a workspace is created.
Public event DeletedShelveset Occurs when a shelveset is deleted.
Public event DeletedWorkspace Occurs when a workspace is deleted.
Public event Getting Occurs during a get operation.
Public event Merging Occurs during a merge operation.
Public event NewPendingChange Occurs when a new pending change is created.
Public event NonFatalError Occurs when errors are detected but does not prevent the operation from completing.
Public event OperationFinished Occurs when an operation finishes, such as when a set of changes finishes pending.
Public event OperationStarting Occurs when an operation starts, such as when a set of changes start pending.
Public event ResolvedConflict Occurs when a conflict is resolved.
Public event UndonePendingChange Occurs when an existing pending change is undone.
Public event UnshelveShelveset Occurs when unshelving a shelveset.
Public event UpdatedWorkspace Occurs when an existing workspace is updated.
Public event WorkItemUpdated Occurs when a work item has been updated with a check-in.
Top

Community Additions

ADD
Show:
© 2014 Microsoft