Click or drag to resize

ScribuntoConsoleResetAsync(String, String, CancellationToken) Method

This is preliminary documentation and is subject to change.

Resets the current Lua evaluation session with the specified module content and module title.

Namespace: WikiClientLibrary.Scribunto
Assembly: WikiClientLibrary (in WikiClientLibrary.dll) Version: 0.9.0-int.2+447d1d590e6726b7881f750a0a0e42908f3e417e
Syntax
public Task ResetAsync(
	string? moduleContent,
	string? moduleTitle,
	CancellationToken cancellationToken
)

Parameters

moduleContent  String
Lua module content. The return value of the expression will be the return value of the module.
moduleTitle  String
Title of the Lua module, or null to use a dummy module name. To properly evaluate Lua modules, the title should start with Module: namespace prefix.
cancellationToken  CancellationToken
A token used to cancel the operation.

Return Value

Task
Exceptions
ExceptionCondition
ScribuntoConsoleExceptionThere is Scribunto console error evaluating module content.
UnexpectedDataExceptionCannot validate Scribunto console working properly. The sanity test does not pass.
NotSupportedExceptionThe MediaWiki site does not support Scribunto console.
Remarks

Upon reset of the console, this client library will attempt to evaluate =_VERSION and validates whether server can return any value (even if it's nil). This is the sanity test.

This operation usually does not change SessionId, if it's already has a valid value. To create a new Lua evaluation session with a different , create a new instance.

See Also