本文整理汇总了C#中Article.SendPageToCustomModule方法的典型用法代码示例。如果您正苦于以下问题:C# Article.SendPageToCustomModule方法的具体用法?C# Article.SendPageToCustomModule怎么用?C# Article.SendPageToCustomModule使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Article
的用法示例。
在下文中一共展示了Article.SendPageToCustomModule方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ProcessPage
/// <summary>
/// Fully processes a page, applying all needed changes
/// </summary>
/// <param name="theArticle">Page to process</param>
/// <param name="mainProcess">True if the page is being processed for save as usual,
/// otherwise (Re-parse in context menu, prefetch, etc) false</param>
private void ProcessPage(Article theArticle, bool mainProcess)
{
bool process = true;
TypoStats = null;
#if DEBUG
Variables.Profiler.Start("ProcessPage(\"" + theArticle.Name + "\")");
#endif
try
{
// Must be performed regardless of general fixes, otherwise there may be breakage
theArticle.AWBChangeArticleText("Fixes for Unicode compatibility",
Parser.FixUnicode(theArticle.ArticleText),
true);
if (NoParse.Contains(theArticle.Name))
process = false;
if (!IgnoreNoBots &&
!Parsers.CheckNoBots(theArticle.ArticleText, TheSession.User.Name))
{
theArticle.AWBSkip("Restricted by {{bots}}/{{nobots}}");
return;
}
Variables.Profiler.Profile("Initial skip checks");
if (CModule.ModuleUsable)
{
theArticle.SendPageToCustomModule(CModule.Module);
if (theArticle.SkipArticle) return;
}
Variables.Profiler.Profile("Custom module");
if (ExtProgram.ModuleEnabled)
{
theArticle.SendPageToCustomModule(ExtProgram);
if (theArticle.SkipArticle) return;
}
Variables.Profiler.Profile("External Program");
if (Plugin.AWBPlugins.Count > 0)
{
foreach (KeyValuePair<string, IAWBPlugin> a in Plugin.AWBPlugins)
{
theArticle.SendPageToPlugin(a.Value, this);
if (theArticle.SkipArticle) return;
}
}
Variables.Profiler.Profile("Plugins");
// unicodify whole article
if (process && chkUnicodifyWhole.Checked)
{
theArticle.HideMoreText(RemoveText);
Variables.Profiler.Profile("HideMoreText");
theArticle.Unicodify(Skip.SkipNoUnicode, Parser);
Variables.Profiler.Profile("Unicodify");
theArticle.UnHideMoreText(RemoveText);
Variables.Profiler.Profile("UnHideMoreText");
}
// find and replace before general fixes
if (chkFindandReplace.Checked)
{
theArticle.PerformFindAndReplace(FindAndReplace, SubstTemplates, RplcSpecial,
chkSkipWhenNoFAR.Checked, chkSkipOnlyMinorFaR.Checked, false);
Variables.Profiler.Profile("F&R");
theArticle.DoFaRSkips(FindAndReplace);
if (theArticle.SkipArticle)
return;
}
// RegexTypoFix
if (chkRegExTypo.Checked && RegexTypos != null && !BotMode && !Namespace.IsTalk(theArticle.NameSpaceKey))
{
if (!NoRetf.Contains(theArticle.Name))
{
theArticle.PerformTypoFixes(RegexTypos, chkSkipIfNoRegexTypo.Checked);
Variables.Profiler.Profile("Typos");
TypoStats = RegexTypos.GetStatistics();
}
else if (chkSkipIfNoRegexTypo.Checked)
TheArticle.Trace.AWBSkipped("No typo fixes (Title blacklisted from RegExTypoFix Typo Fixing)");
if (theArticle.SkipArticle)
{
//.........这里部分代码省略.........