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


C# SvnClient.List方法代码示例

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


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

示例1: ExecuteCommand

        /// <summary>
        /// Actual method to be executed for the implementing task
        /// </summary>
        /// <param name="client">The instance of the SVN client</param>
        /// <returns></returns>
        public override bool ExecuteCommand(SvnClient client)
        {
            SvnTarget target = new SvnUriTarget(RepositoryPath);
            SvnListArgs args = new SvnListArgs();
            args.Depth = Recursive ? SvnDepth.Infinity : SvnDepth.Children;

            return client.List(target, args, listHandler);
        }
开发者ID:trentcioran,项目名称:SvnMSBuildTasks,代码行数:13,代码来源:SvnList.cs

示例2: ListSsh

        public void ListSsh()
        {
            using (SvnClient client = new SvnClient())
            {
                bool foundOne = false;
                client.List(new Uri("svn+ssh://vip.alh.net.qqn.nl/home/bert/repos/"), delegate(object sender, SvnListEventArgs e)
                {
                    foundOne = true;
                });

                Assert.That(foundOne);
            }
        }
开发者ID:riiiqpl,项目名称:sharpsvn,代码行数:13,代码来源:SvnAuthTests.cs

示例3: RemoteList

        public void RemoteList()
        {
            SvnClient cl = new SvnClient();
            bool found = false;
            SvnListArgs la = new SvnListArgs();
            la.RetrieveEntries = SvnDirEntryItems.AllFieldsV15;

                    cl.List(new Uri("https://ctf.open.collab.net/svn/repos/sharpsvn/trunk"), la, delegate(object Sender, SvnListEventArgs e)
                    {
                            Assert.That(e.Entry, Is.Not.Null);
                            Assert.That(e.Entry.Revision, Is.GreaterThan(0L));
                            Assert.That(e.Entry.Author, Is.Not.Null);
                            found = true;
                    });

                    Assert.That(found);

                    Collection<SvnListEventArgs> ee;
            cl.GetList(new Uri("https://ctf.open.collab.net/svn/repos/sharpsvn/trunk"), out ee);
                    Assert.That(ee, Is.Not.Null);
                    Assert.That(ee[0].Entry.Author, Is.Not.Null);
        }
开发者ID:riiiqpl,项目名称:sharpsvn,代码行数:22,代码来源:SvnRemoteTests.cs

示例4: TestSpace

        //[TestMethod]
        public void TestSpace()
        {
            using(SvnClient client = new SvnClient())
            {
                int n = 0;
                client.List(new Uri("http://sharpsvn.googlecode.com/svn/trunk/tests/folder%20with spaces"),
                    delegate(object sender, SvnListEventArgs e)
                    {
                        if (string.IsNullOrEmpty(e.Path))
                        {
                            Assert.That(e.RepositoryRoot, Is.EqualTo(new Uri("http://sharpsvn.googlecode.com/svn/")));
                            Assert.That(e.BaseUri, Is.EqualTo(new Uri("http://sharpsvn.googlecode.com/svn/trunk/tests/folder%20with spaces/")));
                            return;
                        }

                        n++;
                    }
                );

                Assert.That(n, Is.EqualTo(2));
            }
        }
开发者ID:riiiqpl,项目名称:sharpsvn,代码行数:23,代码来源:ListTests.cs

示例5: List_TestRoot

        public void List_TestRoot()
        {
            SvnSandBox sbox = new SvnSandBox(this);
            Uri CollabReposUri = sbox.CreateRepository(SandBoxRepository.MergeScenario);

            using (SvnClient client = new SvnClient())
            {
                client.List(CollabReposUri, delegate(object sender, SvnListEventArgs e)
                {
                    Assert.That(e.RepositoryRoot, Is.EqualTo(CollabReposUri));
                    Assert.That(e.RepositoryRoot.ToString().EndsWith("/"));
                });
            }
        }
开发者ID:riiiqpl,项目名称:sharpsvn,代码行数:14,代码来源:ListTests.cs

示例6: List_TestHash

        public void List_TestHash()
        {
            using (SvnClient client = new SvnClient())
            {
                Uri reposUri = new Uri("https://ctf.open.collab.net/svn/repos/ankhsvn/");
                string baseUri = "https://ctf.open.collab.net/svn/repos/ankhsvn/testcases/trunk/WorstCase/AllTypesSolution/";
                string exUri = baseUri + "%e3%83%97%e3%83%ad%e3%82%b0%e3%83%a9%e3%83%9f%e3%83%b3%e3%82%b0%23Silverlight/";

                client.Authentication.Clear();
                client.Authentication.DefaultCredentials = new NetworkCredential("guest", "");
                client.Authentication.SslServerTrustHandlers += SvnAuthentication.SubversionWindowsSslServerTrustHandler;
                client.Authentication.SslAuthorityTrustHandlers += SvnAuthentication.SubversionWindowsSslAuthorityTrustHandler;

                bool found = false;
                client.List(new SvnUriTarget(new Uri(baseUri), 11888),
                    delegate(object sender, SvnListEventArgs e)
                    {
                        if (string.IsNullOrEmpty(e.Path))
                        {
                            Assert.That(e.RepositoryRoot, Is.EqualTo(reposUri));
                            return;
                        }

                        if (e.Uri == new Uri(exUri))
                            found = true;
                    });

                Assert.That(found, "Found subdir");
                found = false;

                client.List(new SvnUriTarget(new Uri(baseUri), 11888),
                    delegate(object sender, SvnListEventArgs e)
                    {
                        if (string.IsNullOrEmpty(e.Path))
                        {
                            Assert.That(e.RepositoryRoot, Is.EqualTo(reposUri));
                            Assert.That(e.BaseUri, Is.EqualTo(new Uri(baseUri)));
                            return;
                        }
                    });

                client.List(new SvnUriTarget(new Uri(exUri + "Properties/"), 11888),
                    delegate(object sender, SvnListEventArgs e)
                    {
                        if (string.IsNullOrEmpty(e.Path))
                        {
                            Assert.That(e.RepositoryRoot, Is.EqualTo(reposUri));
                            Assert.That(e.BaseUri, Is.EqualTo(new Uri(exUri + "Properties/")));
                            return;
                        }
                    });
            }
        }
开发者ID:riiiqpl,项目名称:sharpsvn,代码行数:53,代码来源:ListTests.cs

示例7: List_ListSharp

        public void List_ListSharp()
        {
            using (SvnClient client = new SvnClient())
            {
                Client.Authentication.Clear();
                Client.Authentication.DefaultCredentials = new NetworkCredential("guest", "");

                client.List(new Uri("https://ctf.open.collab.net/svn/repos/sharpsvn/trunk"),
                    delegate(object sender, SvnListEventArgs e)
                    {
                        Assert.That(e.RepositoryRoot, Is.EqualTo(new Uri("https://ctf.open.collab.net/svn/repos/sharpsvn/")));
                        Assert.That(e.BaseUri, Is.EqualTo(new Uri("https://ctf.open.collab.net/svn/repos/sharpsvn/trunk/")));
                        Assert.That(e.BasePath, Is.EqualTo("/trunk"));
                    });

            }
        }
开发者ID:riiiqpl,项目名称:sharpsvn,代码行数:17,代码来源:ListTests.cs

示例8: TestSsh

        public void TestSsh()
        {
            SvnClient cl = new SvnClient();
            bool found = false;

            //cl.KeepSession = true;

            cl.Authentication.SshServerTrustHandlers += delegate(object sender, Security.SvnSshServerTrustEventArgs e)
                    {
                        e.AcceptedFailures = e.Failures;
                    };

            cl.Authentication.UserNameHandlers += delegate(object sender, Security.SvnUserNameEventArgs e)
                    {
                        e.UserName = "bert";
                        e.Save = true;
                    };
            cl.List(new Uri("svn+libssh2://vip/home/svn/repos/ankh-test"), delegate(object Sender, SvnListEventArgs e)
            {
                Assert.That(e.Entry, Is.Not.Null);
                Assert.That(e.Entry.Revision, Is.GreaterThan(0L));
                Assert.That(e.Entry.Author, Is.Not.Null);
                found = true;
            });

            Assert.That(found);

            found = false;

            cl.List(new Uri("svn+libssh2://[email protected]/home/svn/repos/ankh-test"), delegate(object Sender, SvnListEventArgs e)
            {
                Assert.That(e.Entry, Is.Not.Null);
                Assert.That(e.Entry.Revision, Is.GreaterThan(0L));
                Assert.That(e.Entry.Author, Is.Not.Null);
                found = true;
            });

            Assert.That(found);
        }
开发者ID:riiiqpl,项目名称:sharpsvn,代码行数:39,代码来源:SvnRemoteTests.cs


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