Click or drag to resize

ScribuntoWikiSiteExtensionsScribuntoLoadDataAsyncT(WikiSite, String, String, JsonSerializerOptions, CancellationToken) Method

This is preliminary documentation and is subject to change.

Imports the Lua module with the specified name and evaluates the specified Lua code with it.

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,
	string? epilog,
	JsonSerializerOptions? serializerOptions,
	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.
epilog  String
The Lua code snippet used to return value from the imported module (denoted as p in Lua), or null to use default epilog (return p).
serializerOptions  JsonSerializerOptions
The JsonSerializerOptions used to deserialize the return value from JSON, or null to use default JSON serializer.
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.

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).
See Also