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