当前位置: 首页>>代码示例>>C#>>正文


C# VersionControlServer.QueryBranchObjects方法代码示例

本文整理汇总了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;
        }
开发者ID:Workshop2,项目名称:MergeReminder,代码行数:14,代码来源:Branch.cs

示例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--;
        }
开发者ID:AlmatoolboxCE,项目名称:FPCounter,代码行数:40,代码来源:TFS.cs

示例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);
            }
        }
开发者ID:rrober07,项目名称:CMPortal,代码行数:14,代码来源:TfsContext.cs


注:本文中的Microsoft.TeamFoundation.VersionControl.Client.VersionControlServer.QueryBranchObjects方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。