本文整理汇总了C#中NGit.Transport.RemoteConfig.RemoveURI方法的典型用法代码示例。如果您正苦于以下问题:C# RemoteConfig.RemoveURI方法的具体用法?C# RemoteConfig.RemoveURI怎么用?C# RemoteConfig.RemoveURI使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NGit.Transport.RemoteConfig
的用法示例。
在下文中一共展示了RemoteConfig.RemoveURI方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TestRemoveOnlyURI
public virtual void TestRemoveOnlyURI()
{
ReadConfig(string.Empty);
URIish a = new URIish("/some/dir");
RemoteConfig rc = new RemoteConfig(config, "backup");
NUnit.Framework.Assert.IsTrue(rc.AddURI(a));
NUnit.Framework.Assert.AreEqual(1, rc.URIs.Count);
NUnit.Framework.Assert.AreSame(a, rc.URIs[0]);
NUnit.Framework.Assert.IsTrue(rc.RemoveURI(a));
NUnit.Framework.Assert.AreEqual(0, rc.URIs.Count);
}
示例2: TestSaveRemoveFirstURI
public virtual void TestSaveRemoveFirstURI()
{
ReadConfig("[remote \"spearce\"]\n" + "url = http://www.spearce.org/egit.git\n" +
"url = /some/dir\n" + "fetch = +refs/heads/*:refs/remotes/spearce/*\n");
RemoteConfig rc = new RemoteConfig(config, "spearce");
NUnit.Framework.Assert.AreEqual(2, rc.URIs.Count);
rc.RemoveURI(new URIish("http://www.spearce.org/egit.git"));
NUnit.Framework.Assert.AreEqual(1, rc.URIs.Count);
rc.Update(config);
CheckConfig("[remote \"spearce\"]\n" + "\turl = /some/dir\n" + "\tfetch = +refs/heads/*:refs/remotes/spearce/*\n"
);
}
示例3: TestRemoveLastURI
public virtual void TestRemoveLastURI()
{
ReadConfig(string.Empty);
URIish a = new URIish("/some/dir");
URIish b = new URIish("/another/dir");
URIish c = new URIish("/more/dirs");
RemoteConfig rc = new RemoteConfig(config, "backup");
NUnit.Framework.Assert.IsTrue(rc.AddURI(a));
NUnit.Framework.Assert.IsTrue(rc.AddURI(b));
NUnit.Framework.Assert.IsTrue(rc.AddURI(c));
NUnit.Framework.Assert.AreEqual(3, rc.URIs.Count);
NUnit.Framework.Assert.AreSame(a, rc.URIs[0]);
NUnit.Framework.Assert.AreSame(b, rc.URIs[1]);
NUnit.Framework.Assert.AreSame(c, rc.URIs[2]);
NUnit.Framework.Assert.IsTrue(rc.RemoveURI(c));
NUnit.Framework.Assert.AreEqual(2, rc.URIs.Count);
NUnit.Framework.Assert.AreSame(a, rc.URIs[0]);
NUnit.Framework.Assert.AreSame(b, rc.URIs[1]);
}