DotNetWikiBot Framework Documentation
Protects or unprotects all pages in this PageList, so only chosen category of users can edit or rename it. Changing page protection modes requires administrator (sysop) rights on target wiki.

Namespace: DotNetWikiBot
Assembly: DotNetWikiBot (in DotNetWikiBot.dll) Version: 0.0.0.0

Syntax

C#
public void Protect(
	int editMode,
	int renameMode,
	bool cascadeMode,
	DateTime expiryDate,
	string reason
)

Parameters

editMode
Type: System..::..Int32
Protection mode for editing this page (0 = everyone allowed to edit, 1 = only registered users are allowed, 2 = only administrators are allowed to edit).
renameMode
Type: System..::..Int32
Protection mode for renaming this page (0 = everyone allowed to rename, 1 = only registered users are allowed, 2 = only administrators are allowed).
cascadeMode
Type: System..::..Boolean
In cascading mode, all the pages, included into this page (e.g., templates or images) are also fully automatically protected.
expiryDate
Type: System..::..DateTime
Date ant time, expressed in UTC, when the protection expires and page becomes fully unprotected. Use DateTime.ToUniversalTime() method to convert local time to UTC, if necessary. Pass DateTime.MinValue to make protection indefinite.
reason
Type: System..::..String
Reason for protecting this page.

See Also