Click or drag to resize

ScribuntoWikiSiteExtensionsScribuntoLoadDataAsyncT(WikiSite, String, CancellationToken) Method

This is preliminary documentation and is subject to change.

Imports the Lua module with the specified name and gets the module content.

Namespace: WikiClientLibrary.Scribunto
Assembly: WikiClientLibrary (in WikiClientLibrary.dll) Version: 0.9.0-int.2+447d1d590e6726b7881f750a0a0e42908f3e417e
Syntax
public static Task<T> ScribuntoLoadDataAsync<T>(
	this WikiSite site,
	string moduleName,
	CancellationToken cancellationToken
)

Parameters

site  WikiSite
The MediaWiki site on which to evaluate the module.
moduleName  String
Name of the module to be imported, with or without Module: prefix.
cancellationToken  CancellationToken
A token used to cancel the operation.

Type Parameters

T
The expected evaluation return value type.

Return Value

TaskT
The deserialized Lua evaluation result of the module.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type WikiSite. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Remarks
This overload is intended to provide similar behavior to mw.loadData, it works as long as the imported module meets the requirement of loadData function.
See Also