| 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.ScribuntoAssembly: 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
)
<ExtensionAttribute>
Public Shared Function ScribuntoLoadDataAsync(Of T) (
site As WikiSite,
moduleName As String,
epilog As String,
serializerOptions As JsonSerializerOptions,
cancellationToken As CancellationToken
) As Task(Of T)
Dim site As WikiSite
Dim moduleName As String
Dim epilog As String
Dim serializerOptions As JsonSerializerOptions
Dim cancellationToken As CancellationToken
Dim returnValue As Task(Of T)
returnValue = site.ScribuntoLoadDataAsync(moduleName,
epilog, serializerOptions, cancellationToken)
public:
[ExtensionAttribute]
generic<typename T>
static Task<T>^ ScribuntoLoadDataAsync(
WikiSite^ site,
String^ moduleName,
String^ epilog,
JsonSerializerOptions^ serializerOptions,
CancellationToken cancellationToken
)
[<ExtensionAttribute>]
static member ScribuntoLoadDataAsync :
site : WikiSite *
moduleName : string *
epilog : string *
serializerOptions : JsonSerializerOptions *
cancellationToken : CancellationToken -> Task<'T>
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
TaskTThe 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