Voici un point de départ:
TeamFoundationServer tfs = TeamFoundationServerFactory.GetServer("http://WhateverServerUrl");
IBuildServer buildServer = (IBuildServer)tfs.GetService(typeof(IBuildServer));
VersionControlServer VsServer = (VersionControlServer)tfs.GetService(typeof(VersionControlServer));
IBuildDetail build = buildServer.GetAllBuildDetails(new Uri("http://WhateverBuildUrl"));
List associatedChangesets = InformationNodeConverters.GetAssociatedChangesets(build);
foreach (IChangesetSummary changeSetData in associatedChangesets)
{
Changeset changeSet = VsServer.GetChangeset(changeSetData.ChangesetId);
foreach (Change change in changeSet.Changes)
{
bool a = change.Item.IsContentDestroyed;
long b = change.Item.ContentLength;
}
}
Changeset a le suivant:
public Change[] Changes { get; set; }
public int ChangesetId { get; set; }
public CheckinNote CheckinNote { get; set; }
public string Comment { get; set; }
public string Committer { get; set; }
public DateTime CreationDate { get; set; }
public string Owner { get; set; }
Change a le suivant:
public ChangeType ChangeType { get; }
public Item Item { get; }
public ReadOnlyCollection MergeSources { get; }
Item a le suivant:
public Uri ArtifactUri { get; }
public Uri ArtifactUriLatestItemVersion { get; }
public int ChangesetId { get; }
public DateTime CheckinDate { get; }
public static IComparer Comparer { get; }
public long ContentLength { get; }
public int DeletionId { get; }
public int Encoding { get; }
public byte[] HashValue { get; }
public bool IsBranch { get; }
public bool IsContentDestroyed { get; }
public int ItemId { get; }
public Stream DownloadFile();
public void DownloadFile(string localFileName);