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


C# SvnClient.LoadConfiguration方法代码示例

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


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

示例1: GetAvailableRevisions

        public override string[] GetAvailableRevisions()
        {
            string url = Url.TrimEnd('/');

              using (SvnClient client = new SvnClient())
              {
              client.LoadConfiguration("path");
              client.Authentication.DefaultCredentials = new NetworkCredential(Login, Password);
              SvnTarget folderTarget = SvnTarget.FromString(url);

              List<String> filesFound = new List<String>();
              Collection<SvnListEventArgs> listResults;

              if (client.GetList(folderTarget, out listResults))
              {
              foreach (SvnListEventArgs item in listResults)
                  if (item.Entry.NodeKind == SvnNodeKind.Directory && !string.IsNullOrEmpty(item.Name))
                      filesFound.Add(item.Name);

              return filesFound.ToArray();
              }
              }

             return new string[0];
        }
开发者ID:jayvin,项目名称:Courier,代码行数:25,代码来源:SubversionRepository.cs

示例2: CommitRevision

        public override void CommitRevision(Revision revision)
        {
            string localPath = PackagingManager.Instance.OutputDirectory;
              string url = Url.TrimEnd('/') + "/" + revision.Directory;

              using (SvnClient client = new SvnClient())
              {
              client.LoadConfiguration("path");
              client.Authentication.DefaultCredentials = new NetworkCredential(Login, Password);
              SvnTarget folderTarget = SvnTarget.FromString(url);

              //client.Export(folderTarget, tempFolder);
              }
        }
开发者ID:jayvin,项目名称:Courier,代码行数:14,代码来源:SubversionRepository.cs

示例3: CreateSvnClient

        public override SvnClient CreateSvnClient()
        {
            var client = new SvnClient();

            if (!string.IsNullOrEmpty(_userName) && !string.IsNullOrEmpty(_password))
            {
                client.Authentication.ForceCredentials(_userName, _password);
            }

            client.LoadConfiguration(Path.Combine(Path.GetTempPath(), "Svn"), true);

            client.Authentication.Clear();
            client.Authentication.SslServerTrustHandlers +=
                (sender, e) =>
                {
                    e.AcceptedFailures = e.Failures;
                    e.Save = true;
                };

            return client;
        }
开发者ID:jpb12,项目名称:auto-merger,代码行数:21,代码来源:SvnInterface.cs

示例4: GetRevision

        public override Revision GetRevision(string alias)
        {
            string url = Url.TrimEnd('/');
            string tempFolder = Context.Current.MapPath(Core.Settings.rootPath + "/svnRepoTemp/");

            if (System.IO.Directory.Exists(tempFolder))
            System.IO.Directory.Delete(tempFolder);

            using (SvnClient client = new SvnClient())
            {
            client.LoadConfiguration("path");
            client.Authentication.DefaultCredentials = new NetworkCredential(Login, Password);
            SvnTarget folderTarget = SvnTarget.FromString(url);
            client.Export(folderTarget, tempFolder);

            RevisionStorage rs = new RevisionStorage();
            var r = rs.GetFromDirectory(alias, tempFolder + alias);

            rs.Save(r, alias);

            rs.Dispose();

            return r;
            }

            return null;
        }
开发者ID:jayvin,项目名称:Courier,代码行数:27,代码来源:SubversionRepository.cs


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