本文整理汇总了C#中Microsoft.TeamFoundation.VersionControl.Client.VersionControlServer.QueryBranchObjects方法的典型用法代码示例。如果您正苦于以下问题:C# VersionControlServer.QueryBranchObjects方法的具体用法?C# VersionControlServer.QueryBranchObjects怎么用?C# VersionControlServer.QueryBranchObjects使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Microsoft.TeamFoundation.VersionControl.Client.VersionControlServer
的用法示例。
在下文中一共展示了VersionControlServer.QueryBranchObjects方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RecursivelyProcessBranch
private static Branch RecursivelyProcessBranch(BranchObject bo, VersionControlServer vcs)
{
var rtnVal = new Branch {Name = bo.Properties.RootItem.Item, Text = bo.Properties.RootItem.Item};
var childBos = vcs.QueryBranchObjects(bo.Properties.RootItem, RecursionType.OneLevel);
foreach (var branchObject in childBos)
{
if (branchObject.Properties.RootItem.Item != bo.Properties.RootItem.Item)
rtnVal.Nodes.Add(RecursivelyProcessBranch(branchObject, vcs));
}
return rtnVal;
}
示例2: DisplayAllBranches
/// <summary>
/// Display all brannches
/// </summary>
/// <param name="bo">
/// oggetto branch
/// </param>
/// <param name="vcs">
/// version control server
/// </param>
/// <param name="tp">
/// Team project
/// </param>
private static void DisplayAllBranches(BranchObject bo, VersionControlServer vcs, string tp)
{
// 0.Prepare display indentation
for (int tabcounter = 0; tabcounter < recursionlevel; tabcounter++)
{
ritorno.Add("\t");
}
// 1.Display the current branch
ritorno.Add(string.Format("{0}", bo.Properties.RootItem.Item));
// 2.Query all child branches (one level deep)
BranchObject[] childBos = vcs.QueryBranchObjects(bo.Properties.RootItem, RecursionType.OneLevel);
// 3.Display all children recursively
recursionlevel++;
foreach (BranchObject child in childBos)
{
if (child.Properties.RootItem.Item == bo.Properties.RootItem.Item)
{
continue;
}
DisplayAllBranches(child, vcs, tp);
}
recursionlevel--;
}
示例3: LoadBranchObjects
private void LoadBranchObjects(BranchObject bo, VersionControlServer vcs, bool isDeleted)
{
if (bo.Properties.RootItem.IsDeleted == isDeleted)
_listOfBranchesObj.Add(bo);
var childBos = vcs.QueryBranchObjects(bo.Properties.RootItem, RecursionType.OneLevel);
foreach (var child in childBos)
{
if (child.Properties.RootItem.Item == bo.Properties.RootItem.Item)
continue;
LoadBranchObjects(child, vcs, isDeleted);
}
}