Click to Rate and Give Feedback
This page is specific to
Microsoft Visual Studio 2005/.NET Framework 2.0

Other versions are also available for the following:
Reference for Team Foundation Server SDK
VersionControlServer.QueryHistory Method
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
C# Example      Mahiways   |   Edit   |  

         private static IEnumerable QueryHistory()
{
// Get a reference to our Team Foundation Server.
String tfsName = @" http://ps4474:8080 ";
TeamFoundationServer tfs = new TeamFoundationServer(tfsName);
             // Get a reference to Version Control. 
VersionControlServer versionControl =
(VersionControlServer)tfs.GetService(typeof(VersionControlServer));
             string path = @"$/TempTeamProject2";
VersionSpec version = VersionSpec.Latest;
int deletionId =0;
RecursionType recursion = RecursionType.Full;
string user = "mahesh_lambe";
             VersionSpec versionFrom = VersionSpec.ParseSingleSpec("115894", "mahesh_lambe"); //keep it 'null' for first version
VersionSpec versionTo = VersionSpec.ParseSingleSpec("109014", "mahesh_lambe"); //keep it 'null' for latest version
             int maxCount = Int32.MaxValue;
bool includeChanges = true;
bool slotMode = true;
bool includeDownloadInfo = true;
            IEnumerable enumerable =
versionControl.QueryHistory(path,
version,
deletionId,
recursion,
user,
versionFrom,
versionTo,
maxCount,
includeChanges,
slotMode,
includeDownloadInfo);
            return enumerable;
}

~ Mahesh Lambe
http://mahiways.spaces.live.com/
http://maheshlambe.blogspot.com/

Tags What's this?: tfs (x) Add a tag
Flag as ContentBug
Processing
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker