本文整理匯總了C#中WikiFunctions.Controls.Lists.ListMaker.NormalizeTitle方法的典型用法代碼示例。如果您正苦於以下問題:C# ListMaker.NormalizeTitle方法的具體用法?C# ListMaker.NormalizeTitle怎麽用?C# ListMaker.NormalizeTitle使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類WikiFunctions.Controls.Lists.ListMaker
的用法示例。
在下文中一共展示了ListMaker.NormalizeTitle方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: NormalizeTitleSecure
public void NormalizeTitleSecure()
{
ListMaker LMaker = new ListMaker();
Assert.AreEqual("Foo", LMaker.NormalizeTitle(@"https://en.wikipedia.org/w/index.php?title=Foo&diff=3&oldid=4"));
}
示例2: NormalizeTitle
public void NormalizeTitle()
{
ListMaker LMaker = new ListMaker();
Assert.AreEqual("Foo", LMaker.NormalizeTitle(@"https://en.wikipedia.org/w/index.php?title=Foo&diff=3&oldid=4"));
Assert.AreEqual("Foo", LMaker.NormalizeTitle(@"https://en.wikipedia.org/w/index.php?title=Foo&diff=3&curid=4"));
Assert.AreEqual("Health effects of chocolate", LMaker.NormalizeTitle(@"https://en.wikipedia.org/w/index.php?title=Health_effects_of_chocolate&diff=4018&oldid=40182"));
Assert.AreEqual("Foo", LMaker.NormalizeTitle(@"https://en.wikipedia.org/w/index.php?title=Foo&action=history"));
Assert.AreEqual("Foo", LMaker.NormalizeTitle(@"https://en.wikipedia.org/w/index.php?title=Foo&action=edit"));
Assert.AreEqual("Foo", LMaker.NormalizeTitle(@"https://en.wikipedia.org/w/index.php?title=Foo&oldid=5"));
Assert.AreEqual("Science (journal)", LMaker.NormalizeTitle(@"https://en.wikipedia.org/w/index.php?title=Science%20%28journal%29&action=history"));
Assert.AreEqual(@"Wikipedia:AutoWikiBrowser/Sandbox", LMaker.NormalizeTitle(@"https://en.wikipedia.org/w/index.php?title=Wikipedia:AutoWikiBrowser/Sandbox&action=edit"));
Assert.AreEqual(@"Wikipedia:AutoWikiBrowser/Sandbox", LMaker.NormalizeTitle(@"en.wikipedia.org/w/index.php?title=Wikipedia:AutoWikiBrowser/Sandbox&action=edit"));
Assert.AreEqual("Foo", LMaker.NormalizeTitle(@"https://en.wikipedia.org/w/index.php?title=Foo#References"));
Assert.AreEqual("Foo", LMaker.NormalizeTitle(@" Foo"), "cleans spacing from Firefox Category paste");
Assert.AreEqual(@"Foo", LMaker.NormalizeTitle(@"https://en.wikipedia.org/w/index.php?title=Foo&pe=1&#Date_on"));
Assert.AreEqual(@"Foo", LMaker.NormalizeTitle(@"Foo"), "title has left-to-right mark at the end");
Assert.AreEqual("Foo", LMaker.NormalizeTitle(@"https://en.wikipedia.org/w/index.php?title=Foo&offset=20130214190000&action=history"), "cleans spacing from Firefox Category paste");
Assert.AreEqual("Foo", LMaker.NormalizeTitle(@"https://en.wikipedia.org/w/?title=Foo"));
Assert.AreEqual("Foo", LMaker.NormalizeTitle(@"https://en.wikipedia.org/wiki/Foo"));
Assert.AreEqual("Foo", LMaker.NormalizeTitle(@"http://en.wikipedia.org/wiki/Foo"), "HTTP not HTTPS support");
Assert.AreEqual("Foo", LMaker.NormalizeTitle(@"//en.wikipedia.org/w/index.php?title=Foo&action=history"), "Protocol-relative support");
Assert.AreEqual("Foo", LMaker.NormalizeTitle(@"https://en.wikipedia.org/w/index.php?title=Foo&redirect=no"));
Assert.AreEqual("Foo", LMaker.NormalizeTitle(@"https://en.wikipedia.org/w/index.php?title=Foo&type=revision&diff=75558108&oldid=65316243"));
Assert.AreEqual("#[[Foo]]", LMaker.NormalizeTitle(@"#[[Foo]]"), "#wikilinked");
Assert.AreEqual("Foo", LMaker.NormalizeTitle(@"Foo#bar"), "#wikilinked");
}