C# Класс WikiFunctions.Parse.HideText

This class provides functions for 'hiding' certain syntax by replacing it with unique tokens and then adding it back after an operation was performed on text
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
AddBack ( string articleText ) : string

Adds stuff removed by Hide back

AddBackMore ( string articleText ) : string

Adds back hidden stuff from HideMore

AddBackUnformatted ( string articleText ) : string

Adds things removed by HideUnformatted back

Hide ( string articleText ) : string

Hides Unformatted text (nowiki, pre, math, html comments, timelines), source tags Also hides images and external links if set on call to constructor

HideMore ( string articleText ) : string

Hides images, external links, templates, headings

HideMore ( string articleText, bool hideOnlyTargetOfWikilink ) : string

Hides images, external links, templates, headings

HideMore ( string articleText, bool hideOnlyTargetOfWikilink, bool hideWikiLinks ) : string

Hides images, external links, templates, headings and italics

HideMore ( string articleText, bool hideOnlyTargetOfWikilink, bool hideWikiLinks, bool hideItalics ) : string

Hides images, external links, templates, headings

HideText ( ) : System

HideText ( bool hideExternalLinks, bool leaveMetaHeadings, bool hideImages ) : System

Hides Unformatted text (nowiki, pre, math, html comments, timelines), source tags

HideUnformatted ( string articleText ) : string

Hides unformatted text regions: nowiki, pre, math, html comments, timelines

Приватные методы

Метод Описание
AddBack ( string articleText, List Tokens ) : string

Adds stuff removed by Hide back

Replace ( IEnumerable matches, string &articleText ) : void

Puts back hidden text

Replace ( IEnumerable matches, string &articleText, List Tokens ) : void

Puts back hidden text

ReplaceMore ( ICollection matches, string &articleText ) : void

Replaces hidden images, external links, templates, headings etc.

Описание методов

AddBack() публичный Метод

Adds stuff removed by Hide back
public AddBack ( string articleText ) : string
articleText string The wiki text of the article.
Результат string

AddBackMore() публичный Метод

Adds back hidden stuff from HideMore
public AddBackMore ( string articleText ) : string
articleText string
Результат string

AddBackUnformatted() публичный Метод

Adds things removed by HideUnformatted back
public AddBackUnformatted ( string articleText ) : string
articleText string The wiki text of the article.
Результат string

Hide() публичный Метод

Hides Unformatted text (nowiki, pre, math, html comments, timelines), source tags Also hides images and external links if set on call to constructor
public Hide ( string articleText ) : string
articleText string The wiki text of the article.
Результат string

HideMore() публичный Метод

Hides images, external links, templates, headings
public HideMore ( string articleText ) : string
articleText string the text of the article
Результат string

HideMore() публичный Метод

Hides images, external links, templates, headings
public HideMore ( string articleText, bool hideOnlyTargetOfWikilink ) : string
articleText string the text of the article
hideOnlyTargetOfWikilink bool whether to hide only the target of a wikilink (so that fixes such as typo corrections may be applied to the piped part of the link)
Результат string

HideMore() публичный Метод

Hides images, external links, templates, headings and italics
public HideMore ( string articleText, bool hideOnlyTargetOfWikilink, bool hideWikiLinks ) : string
articleText string the text of the article
hideOnlyTargetOfWikilink bool whether to hide only the target of a wikilink (so that fixes such as typo corrections may be applied to the piped part of the link)
hideWikiLinks bool whether to hide all wikilinks including those with words attached outside the link
Результат string

HideMore() публичный Метод

Hides images, external links, templates, headings
public HideMore ( string articleText, bool hideOnlyTargetOfWikilink, bool hideWikiLinks, bool hideItalics ) : string
articleText string the text of the article
hideOnlyTargetOfWikilink bool whether to hide only the target of a wikilink (so that fixes such as typo corrections may be applied to the piped part of the link)
hideWikiLinks bool whether to hide all wikilinks including those with words attached outside the link
hideItalics bool whether to hide italics
Результат string

HideText() публичный Метод

public HideText ( ) : System
Результат System

HideText() публичный Метод

Hides Unformatted text (nowiki, pre, math, html comments, timelines), source tags
public HideText ( bool hideExternalLinks, bool leaveMetaHeadings, bool hideImages ) : System
hideExternalLinks bool Whether external links should be hidden too
leaveMetaHeadings bool Whether to not hide section headings
hideImages bool Whether images should be hidden too
Результат System

HideUnformatted() публичный Метод

Hides unformatted text regions: nowiki, pre, math, html comments, timelines
public HideUnformatted ( string articleText ) : string
articleText string The wiki text of the article.
Результат string