VersionControlServer.QueryHistory Method (String, VersionSpec, Int32, RecursionType, String, VersionSpec, VersionSpec, Int32, Boolean, Boolean)
Gets the item history, in the form of an enumerable collection of Changesets for the specified items and versions. 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.
Assembly: Microsoft.TeamFoundation.VersionControl.Client (in Microsoft.TeamFoundation.VersionControl.Client.dll)
'Declaration Public Function QueryHistory ( _ path As String, _ version As VersionSpec, _ deletionId As Integer, _ recursion As RecursionType, _ user As String, _ versionFrom As VersionSpec, _ versionTo As VersionSpec, _ maxCount As Integer, _ includeChanges As Boolean, _ slotMode As Boolean _ ) As IEnumerable
'Usage Dim instance As VersionControlServer Dim path As String Dim version As VersionSpec Dim deletionId As Integer Dim recursion As RecursionType Dim user As String Dim versionFrom As VersionSpec Dim versionTo As VersionSpec Dim maxCount As Integer Dim includeChanges As Boolean Dim slotMode As Boolean Dim returnValue As IEnumerable returnValue = instance.QueryHistory(path, _ version, deletionId, recursion, user, _ versionFrom, versionTo, maxCount, _ includeChanges, slotMode)
public IEnumerable QueryHistory( string path, VersionSpec version, int deletionId, RecursionType recursion, string user, VersionSpec versionFrom, VersionSpec versionTo, int maxCount, bool includeChanges, bool slotMode )
public: IEnumerable^ QueryHistory( String^ path, VersionSpec^ version, int deletionId, RecursionType recursion, String^ user, VersionSpec^ versionFrom, VersionSpec^ versionTo, int maxCount, bool includeChanges, bool slotMode )
public function QueryHistory( path : String, version : VersionSpec, deletionId : int, recursion : RecursionType, user : String, versionFrom : VersionSpec, versionTo : VersionSpec, maxCount : int, includeChanges : boolean, slotMode : boolean ) : IEnumerable
The item for which you want to get the history. The string may represent a Team Foundation Server path ($/CmdLine/parse.cs) or a local path (C:\Code\CmdLine\parse.cs), in the latter case, the local path is mapped to a server path via a workspace. Wildcards are also supported.
The version of the specified item for which history should be queried.
This is not a filter on which versions will be returned, like versionFrom and versionTo, it clarifies what file or folder for which you getd the history.
A deletion ID assigned for the item, if it is deleted. Use 0 for a non-deleted item. Note that this refers to the passed item, not to any lower-level items which the histories of may be discovered in a recursive search.
The user for whom history should be queried (null for all users).
The start of a version range for which history should be queried. Use null to start with the first changeset.
The end of a version range for which history should be queried. Use null to end with the latest changeset.
The maximum number of history entries that should be returned. Use Int32.MaxValue to get all changes.
A flag that, if true, includes the individual item changes with the changesets, otherwise, only changeset metadata is included.
The slotMode comes into play when there have been multiple items with the same Team Foundation Server path. For instance, you may have had a file called $/CmdLine/parser.cs and then deleted it and added a different file called $/CmdLine/parser.cs. If slotMode is true, the returned changesets may reflect both (all) of these items. If it is false, the returned changesets will reflect the single item that currently occupies the requested path, regardless of whether it previously occupied the requested path in its historical version.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.