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


C# Entities.Path方法代码示例

本文整理汇总了C#中Entities.Path方法的典型用法代码示例。如果您正苦于以下问题:C# Entities.Path方法的具体用法?C# Entities.Path怎么用?C# Entities.Path使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Entities的用法示例。


在下文中一共展示了Entities.Path方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Execute

        public bool Execute(string workingCopyBase,
                            Entities.Branch source,
                            Entities.Branch target,
                            List<Entities.RevisionRange> ranges)
        {
            Dictionary<string, string> settings = settingsBLL.Get();

            string userName = SettingsHelper.ValidateUsername(settings);
            string password = SettingsHelper.ValidatePassword(settings);

            string workingCopyPath = target.Path(workingCopyBase);

            using (SharpSvn.SvnClient client = BusinessLogic.VersionControl.Svn.ClientHelper.Default())
            {
                client.Authentication.DefaultCredentials = new System.Net.NetworkCredential(userName, password);

                SharpSvn.SvnUriTarget svnSource = new SharpSvn.SvnUriTarget(source.Url);
                checkoutBLL.Execute(target, workingCopyBase);
                revertBLL.Execute(target, workingCopyBase);
                updateBLL.Execute(target, workingCopyBase);

                client.Conflict += (object sender, SharpSvn.SvnConflictEventArgs e) =>
                {
                    this.successful = false;
                };

                List<Entities.RevisionRange> conflictedRanges = new List<RevisionRange>();

                SharpSvn.SvnMergeArgs args = new SharpSvn.SvnMergeArgs();

                foreach (var item in ranges.OrderBy(x => x.StartRevision))
                {
                    bool success = client.Merge(workingCopyPath, svnSource, new SharpSvn.SvnRevisionRange(Convert.ToInt64(item.StartRevision), Convert.ToInt64(item.EndRevision)), args);

                    if (!this.successful)
                    {
                        revertBLL.Execute(target, workingCopyBase);
                        break;
                    }
                }
            }

            return successful;
        }
开发者ID:kwmcrell,项目名称:SourceManager,代码行数:44,代码来源:Merge.cs

示例2: Execute

        public void Execute(string workingCopyBase, Entities.Branch branch, string logMessage)
        {
            Dictionary<string, string> settings = settingsBLL.Get();

            string userName = SettingsHelper.ValidateUsername(settings);
            string password = SettingsHelper.ValidatePassword(settings);

            string workingCopyPath = branch.Path(workingCopyBase);

            using (SharpSvn.SvnClient client = BusinessLogic.VersionControl.Svn.ClientHelper.Default())
            {
                client.Authentication.DefaultCredentials = new System.Net.NetworkCredential(userName, password);

                SharpSvn.SvnCommitArgs args = new SharpSvn.SvnCommitArgs();
                args.LogMessage = logMessage;

                client.Commit(workingCopyPath, args);
            }
        }
开发者ID:kwmcrell,项目名称:SourceManager,代码行数:19,代码来源:Commit.cs

示例3: Execute

        public void Execute(Entities.Branch branch, string workingCopyBase)
        {
            Dictionary<string, string> settings = settingsBLL.Get();

            string userName = SettingsHelper.ValidateUsername(settings);
            string password = SettingsHelper.ValidatePassword(settings);

            string workingCopyPath = branch.Path(workingCopyBase);

            if (!System.IO.Directory.Exists(workingCopyPath))
            {
                using (SharpSvn.SvnClient client = BusinessLogic.VersionControl.Svn.ClientHelper.Default())
                {
                    client.Authentication.DefaultCredentials = new System.Net.NetworkCredential(userName, password);

                    SharpSvn.SvnUriTarget repo = new SharpSvn.SvnUriTarget(branch.Url);

                    client.CheckOut(repo, workingCopyPath);
                }
            }
        }
开发者ID:kwmcrell,项目名称:SourceManager,代码行数:21,代码来源:Checkout.cs

示例4: Execute

        public void Execute(Entities.Branch branch, string workingCopyBase)
        {
            Dictionary<string, string> settings = settingsBLL.Get();

            string userName = SettingsHelper.ValidateUsername(settings);
            string password = SettingsHelper.ValidatePassword(settings);

            string workingCopyPath = branch.Path(workingCopyBase);

            if (System.IO.Directory.Exists(workingCopyPath))
            {
                using (SharpSvn.SvnClient client = BusinessLogic.VersionControl.Svn.ClientHelper.Default())
                {
                    client.Authentication.DefaultCredentials = new System.Net.NetworkCredential(userName, password);

                    SharpSvn.SvnRevertArgs args = new SharpSvn.SvnRevertArgs();
                    args.Depth = SharpSvn.SvnDepth.Infinity;

                    client.Revert(workingCopyPath, args);
                }
            }
        }
开发者ID:kwmcrell,项目名称:SourceManager,代码行数:22,代码来源:Revert.cs

示例5: Execute

        public bool Execute(Entities.Branch branch, string workingCopyBase)
        {
            bool updated = false;

            Dictionary<string, string> settings = settingsBLL.Get();

            string userName = SettingsHelper.ValidateUsername(settings);
            string password = SettingsHelper.ValidatePassword(settings);

            string workingCopyPath = branch.Path(workingCopyBase);

            if (System.IO.Directory.Exists(workingCopyPath))
            {
                using (SharpSvn.SvnClient client = BusinessLogic.VersionControl.Svn.ClientHelper.Default())
                {
                    client.Authentication.DefaultCredentials = new System.Net.NetworkCredential(userName, password);

                    updated = client.Update(workingCopyPath);
                }
            }

            return updated;
        }
开发者ID:kwmcrell,项目名称:SourceManager,代码行数:23,代码来源:Update.cs


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