C# 클래스 WikiFunctions.Variables

Holds static variables, to allow functionality on different wikis.
파일 보기 프로젝트 열기: reedy/AutoWikiBrowser

공개 프로퍼티들

프로퍼티 타입 설명
CanonicalNamespaceAliases List>.Dictionary
CanonicalNamespaces string>.Dictionary
ENLangMonthNames string[]
MagicWords List>.Dictionary
MonthNames string[]
NamespaceAliases List>.Dictionary
Namespaces string>.Dictionary
NamespacesCaseInsensitive string>.Dictionary
Profiler Profiler
ReloadProjectSettings ProjectHoldArea
RetfPath string
SectStub string
SectStubRegex System.Text.RegularExpressions.Regex
Stub string
URL string
UnderscoredTitles List

공개 메소드들

메소드 설명
AWBVersionString ( string version ) : string
AddUnderscoredTitles ( List titles ) : void

For unit tests only, method to add entries to UnderscoredTitles

GetArticleHistoryURL ( string title ) : string

returns full URL to the history page of the input title, depends on project settings

GetEditURL ( string title ) : string

returns full URL to the edit page of the input title, depends on project settings

GetPlainTextURL ( string title ) : string

Returns the full URL to the input wiki page using current site settings, specifying &action=raw

GetUserTalkURL ( string username ) : string

returns full URL to the user talk page of the input user, depends on project settings

NonPrettifiedURL ( string title ) : string

returns full URL to the given page, depends on project settings

PrepareWebRequest ( string url ) : HttpWebRequest

Creates an HTTP web request. Timeout set to 15 seconds

PrepareWebRequest ( string url, string userAgent ) : HttpWebRequest

Creates an HTTP web request. Timeout set to 15 seconds

RefreshProxy ( ) : void

Refreshs the system proxy.

SetProject ( string langCode, ProjectEnum projectName ) : void

Sets different language variables, such as namespaces. Default is english Wikipedia

SetProject ( string langCode, ProjectEnum projectName, string customProject, string protocol ) : void

Sets different language variables, such as namespaces. Default is english Wikipedia

SetProjectLangCode ( string langCode ) : void

Sets the language code of the current project

Do not use this outside unit tests

SetProjectSimple ( string langCode, ProjectEnum projectName ) : void

Sets different language variables, such as namespaces. Default is English Wikipedia

Do not use this outside unit tests

WaitForDelayedRequests ( ) : void

Waits for all background stuff to be loaded

비공개 메소드들

메소드 설명
AWBDefaultSummaryTag ( ) : void

Sets the AWB default summary tag.

CancelBackgroundRequests ( ) : void
LoadUnderscores ( ) : void
PrepareAliases ( string>.Dictionary namespaces ) : List>.Dictionary
RegenerateRegexes ( ) : void

SetLanguageSpecificValues ( string langCode, ProjectEnum projectName ) : void

Sets the language specific values: summary tag, stub regex, AWB project link

SetToEnglish ( ) : void

UnderscoresLoaded ( WikiFunctions.Background.BackgroundRequest req ) : void
Variables ( ) : System

메소드 상세

AWBVersionString() 공개 정적인 메소드

public static AWBVersionString ( string version ) : string
version string
리턴 string

AddUnderscoredTitles() 공개 정적인 메소드

For unit tests only, method to add entries to UnderscoredTitles
public static AddUnderscoredTitles ( List titles ) : void
titles List
리턴 void

GetArticleHistoryURL() 공개 정적인 메소드

returns full URL to the history page of the input title, depends on project settings
public static GetArticleHistoryURL ( string title ) : string
title string
리턴 string

GetEditURL() 공개 정적인 메소드

returns full URL to the edit page of the input title, depends on project settings
public static GetEditURL ( string title ) : string
title string
리턴 string

GetPlainTextURL() 공개 정적인 메소드

Returns the full URL to the input wiki page using current site settings, specifying &action=raw
public static GetPlainTextURL ( string title ) : string
title string
리턴 string

GetUserTalkURL() 공개 정적인 메소드

returns full URL to the user talk page of the input user, depends on project settings
public static GetUserTalkURL ( string username ) : string
username string
리턴 string

NonPrettifiedURL() 공개 정적인 메소드

returns full URL to the given page, depends on project settings
public static NonPrettifiedURL ( string title ) : string
title string
리턴 string

PrepareWebRequest() 공개 정적인 메소드

Creates an HTTP web request. Timeout set to 15 seconds
public static PrepareWebRequest ( string url ) : HttpWebRequest
url string /// URL. ///
리턴 System.Net.HttpWebRequest

PrepareWebRequest() 공개 정적인 메소드

Creates an HTTP web request. Timeout set to 15 seconds
public static PrepareWebRequest ( string url, string userAgent ) : HttpWebRequest
url string
userAgent string
리턴 System.Net.HttpWebRequest

RefreshProxy() 공개 정적인 메소드

Refreshs the system proxy.
public static RefreshProxy ( ) : void
리턴 void

SetProject() 공개 정적인 메소드

Sets different language variables, such as namespaces. Default is english Wikipedia
public static SetProject ( string langCode, ProjectEnum projectName ) : void
langCode string The language code, default is en
projectName ProjectEnum The project name default is Wikipedia
리턴 void

SetProject() 공개 정적인 메소드

Sets different language variables, such as namespaces. Default is english Wikipedia
public static SetProject ( string langCode, ProjectEnum projectName, string customProject, string protocol ) : void
langCode string The language code, default is en
projectName ProjectEnum The project name default is Wikipedia
customProject string Script path of a custom project or ""
protocol string
리턴 void

SetProjectLangCode() 공개 정적인 메소드

Sets the language code of the current project
Do not use this outside unit tests
public static SetProjectLangCode ( string langCode ) : void
langCode string The new language code to use
리턴 void

SetProjectSimple() 공개 정적인 메소드

Sets different language variables, such as namespaces. Default is English Wikipedia
Do not use this outside unit tests
public static SetProjectSimple ( string langCode, ProjectEnum projectName ) : void
langCode string The language code, default is en
projectName ProjectEnum The project name default is Wikipedia
리턴 void

WaitForDelayedRequests() 공개 정적인 메소드

Waits for all background stuff to be loaded
public static WaitForDelayedRequests ( ) : void
리턴 void

프로퍼티 상세

CanonicalNamespaceAliases 공개적으로 정적으로 프로퍼티

Canonical namespace aliases
public static Dictionary> CanonicalNamespaceAliases
리턴 List>.Dictionary

CanonicalNamespaces 공개적으로 정적으로 프로퍼티

Provides access to the en namespace keys e.g. Category:
public static Dictionary CanonicalNamespaces
리턴 string>.Dictionary

ENLangMonthNames 공개적으로 정적으로 프로퍼티

public static string[] ENLangMonthNames
리턴 string[]

MagicWords 공개적으로 정적으로 프로퍼티

public static Dictionary> MagicWords
리턴 List>.Dictionary

MonthNames 공개적으로 정적으로 프로퍼티

localized names of months
public static string[] MonthNames
리턴 string[]

NamespaceAliases 공개적으로 정적으로 프로퍼티

Aliases for current namespaces
public static Dictionary> NamespaceAliases
리턴 List>.Dictionary

Namespaces 공개적으로 정적으로 프로퍼티

Provides access to the namespace keys e.g. Category:
public static Dictionary Namespaces
리턴 string>.Dictionary

NamespacesCaseInsensitive 공개적으로 정적으로 프로퍼티

Provides access to the namespace keys in a form so the first letter is case insensitive e.g. [Ww]ikipedia:
public static Dictionary NamespacesCaseInsensitive
리턴 string>.Dictionary

Profiler 공개적으로 정적으로 프로퍼티

Performance profiler
public static Profiler,WikiFunctions Profiler
리턴 Profiler

ReloadProjectSettings 공개적으로 정적으로 프로퍼티

public static ProjectHoldArea ReloadProjectSettings
리턴 ProjectHoldArea

RetfPath 공개적으로 정적으로 프로퍼티

Page of RegexTypoFix rules page e.g. Project:AutoWikiBrowser/Typos. Can be full URL if specified as such on <!--Typos--> check page comment
public static string RetfPath
리턴 string

SectStub 공개적으로 정적으로 프로퍼티

public static string SectStub
리턴 string

SectStubRegex 공개적으로 정적으로 프로퍼티

public static Regex,System.Text.RegularExpressions SectStubRegex
리턴 System.Text.RegularExpressions.Regex

Stub 공개적으로 정적으로 프로퍼티

public static string Stub
리턴 string

URL 공개적으로 정적으로 프로퍼티

Gets a URL of the site, e.g. "https://en.wikipedia.org".
public static string URL
리턴 string

UnderscoredTitles 공개적으로 정적으로 프로퍼티

Contains list of pages with underscores in titles, from [[Category:Articles with underscores in the title]] for en wiki
public static List UnderscoredTitles
리턴 List