C# Class WikiFunctions.Namespace

Contains constants for canonical namespace numbers
Show file Open project: reedy/AutoWikiBrowser

Public Properties

Property Type Description
Image int
ImageTalk int
Mainspace int

Public Methods

Method Description
Determine ( string articleTitle ) : int

Deduces the namespace number from the input article title.

IsImportant ( int key ) : bool

Tests title to make sure it is either main, image, category or template namespace.

IsImportant ( string articleTitle ) : bool

Tests title to make sure it is either main, image, category or template namespace.

IsMainSpace ( int ns ) : bool

Tests title to make sure it is main space

IsMainSpace ( string articleTitle ) : bool

Tests title to make sure it is main space

IsSpecial ( int ns ) : bool

Returns true if the given namespace is non-editable, i.e. Special or Media

IsTalk ( int key ) : bool

Tests title to make sure it is a talk page (article talk, user talk etc.).

IsTalk ( string articleTitle ) : bool

Tests title to make sure it is a talk page.

IsUserPage ( string articleTitle ) : bool

IsUserSpace ( string articleTitle ) : bool

returns true if current page is a userpage

IsUserTalk ( string articleTitle ) : bool

Normalize ( string ns, int nsId ) : string

Normalizes a namespace string, but does not changes it to default namespace name

VerifyNamespaces ( string>.Dictionary namespaces ) : bool

Checks if given namespaces are sufficient for AWB to function properly and that their format is expected.

Private Methods

Method Description
Namespace ( ) : System

Method Details

Determine() public static method

Deduces the namespace number from the input article title.
public static Determine ( string articleTitle ) : int
articleTitle string
return int

IsImportant() public static method

Tests title to make sure it is either main, image, category or template namespace.
public static IsImportant ( int key ) : bool
key int Namespace key
return bool

IsImportant() public static method

Tests title to make sure it is either main, image, category or template namespace.
public static IsImportant ( string articleTitle ) : bool
articleTitle string The title.
return bool

IsMainSpace() public static method

Tests title to make sure it is main space
public static IsMainSpace ( int ns ) : bool
ns int
return bool

IsMainSpace() public static method

Tests title to make sure it is main space
public static IsMainSpace ( string articleTitle ) : bool
articleTitle string The title.
return bool

IsSpecial() public static method

Returns true if the given namespace is non-editable, i.e. Special or Media
public static IsSpecial ( int ns ) : bool
ns int
return bool

IsTalk() public static method

Tests title to make sure it is a talk page (article talk, user talk etc.).
public static IsTalk ( int key ) : bool
key int The namespace key
return bool

IsTalk() public static method

Tests title to make sure it is a talk page.
public static IsTalk ( string articleTitle ) : bool
articleTitle string The title.
return bool

IsUserPage() public static method

public static IsUserPage ( string articleTitle ) : bool
articleTitle string Title of the article
return bool

IsUserSpace() public static method

returns true if current page is a userpage
public static IsUserSpace ( string articleTitle ) : bool
articleTitle string
return bool

IsUserTalk() public static method

public static IsUserTalk ( string articleTitle ) : bool
articleTitle string Title of the article
return bool

Normalize() public static method

Normalizes a namespace string, but does not changes it to default namespace name
public static Normalize ( string ns, int nsId ) : string
ns string
nsId int
return string

VerifyNamespaces() public static method

Checks if given namespaces are sufficient for AWB to function properly and that their format is expected.
public static VerifyNamespaces ( string>.Dictionary namespaces ) : bool
namespaces string>.Dictionary namespaces to verify
return bool

Property Details

Image public static property

public static int Image
return int

ImageTalk public static property

public static int ImageTalk
return int

Mainspace public static property

public static int Mainspace
return int