Kephas.Scripting.Lua 11.1.0

.NET 6.0 .NET Standard 2.1
dotnet add package Kephas.Scripting.Lua --version 11.1.0
NuGet\Install-Package Kephas.Scripting.Lua -Version 11.1.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Kephas.Scripting.Lua" Version="11.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Kephas.Scripting.Lua --version 11.1.0
#r "nuget: Kephas.Scripting.Lua, 11.1.0"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install Kephas.Scripting.Lua as a Cake Addin
#addin nuget:?package=Kephas.Scripting.Lua&version=11.1.0

// Install Kephas.Scripting.Lua as a Cake Tool
#tool nuget:?package=Kephas.Scripting.Lua&version=11.1.0

LUA Scripting

Introduction

The LUA scripting area in Kephas handles LUA dynamic code execution using NeoLua.

Check the following packages for more information:

Usage

  • String based script execution
// normally you would get the processor injected into the service constructor.
var processor = injector.Resolve<IScriptProcessor>();

var script = new LuaStringScript(
@"function Power(a)
  return a * a
end

return Power(value) + 3");
var result = await processor.ExecuteAsync(script), new { value = 5 })).PreserveThreadContext();
Assert.Equals(28, result);
  • File based script execution

The file scripts assume that the language can be inferred from the file extension. For LUA, it means that the file needs to and with a *.lua extension. If this is not the case, make sure you specify the language explicitly when creating a FileScript.

// normally you would get the processor injected into the service constructor.
var processor = injector.Resolve<IScriptProcessor>();

// LUA scripts ending with *.lua
var result = await processor.ExecuteAsync(new FileScript("myscript.lua"), new { value = 5 })).PreserveThreadContext();
Assert.Equals(28, result);

// LUA scripts not ending with *.lua
var result = await processor.ExecuteAsync(new FileScript("myscript.txt", LuaLanguageService.Language), new { value = 5 })).PreserveThreadContext();
Assert.Equals(28, result);
Product Versions
.NET net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows
.NET Core netcoreapp3.0 netcoreapp3.1
.NET Standard netstandard2.1
MonoAndroid monoandroid
MonoMac monomac
MonoTouch monotouch
Tizen tizen60
Xamarin.iOS xamarinios
Xamarin.Mac xamarinmac
Xamarin.TVOS xamarintvos
Xamarin.WatchOS xamarinwatchos
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
11.1.0 198 4/13/2022
11.1.0-dev.4 77 4/6/2022
11.1.0-dev.3 63 3/30/2022
11.1.0-dev.2 68 3/23/2022
11.1.0-dev.1 61 3/23/2022
11.0.0 179 3/11/2022
11.0.0-dev.7 64 3/7/2022
11.0.0-dev.6 64 2/28/2022
11.0.0-dev.5 57 2/26/2022
11.0.0-dev.4 63 2/24/2022
11.0.0-dev.3 63 2/23/2022
11.0.0-dev.2 66 2/18/2022
11.0.0-dev.1 72 2/7/2022
10.3.0 194 1/18/2022
10.2.0 664 12/3/2021
10.1.0 4,743 11/23/2021
10.1.0-dev.7 126 11/17/2021
10.1.0-dev.6 98 11/16/2021
10.1.0-dev.5 103 11/10/2021
10.1.0-dev.4 99 11/8/2021
10.1.0-dev.3 82 11/8/2021
10.1.0-dev.2 100 11/4/2021
10.1.0-dev.1 99 11/3/2021
10.0.1 235 10/16/2021
10.0.0 219 10/13/2021
10.0.0-dev.4 94 10/13/2021
10.0.0-dev.3 112 10/11/2021
10.0.0-dev.2 158 10/8/2021
9.3.4 206 8/25/2021
9.3.3 221 8/25/2021
9.3.2 224 8/24/2021
9.3.1 219 8/12/2021
9.3.0 236 8/12/2021
9.2.0 232 6/17/2021
9.1.0 248 6/17/2021
9.1.0-dev.8 129 5/26/2021
9.1.0-dev.7 124 5/17/2021
9.1.0-dev.6 118 4/28/2021
9.1.0-dev.5 138 4/23/2021
9.1.0-dev.4 130 4/21/2021
9.1.0-dev.3 130 4/17/2021
9.1.0-dev.2 125 4/12/2021
9.1.0-dev.1 132 4/9/2021
9.0.5 217 3/31/2021
9.0.4 254 3/23/2021
9.0.3 259 3/20/2021
9.0.1 213 3/18/2021
9.0.0 247 3/17/2021
9.0.0-dev.4 129 3/4/2021
9.0.0-dev.3 130 3/1/2021
9.0.0-dev.2 156 2/22/2021
8.4.0 315 11/11/2020
8.3.0 296 10/28/2020
8.2.0 329 10/16/2020
8.1.0 378 9/23/2020
8.0.0 313 7/1/2020
8.0.0-dev.44 221 6/25/2020
8.0.0-dev.43 224 6/23/2020
8.0.0-dev.42 249 6/22/2020
8.0.0-dev.41 241 6/18/2020
8.0.0-dev.40 207 6/18/2020
8.0.0-dev.39 228 6/15/2020
8.0.0-dev.38 339 6/14/2020
8.0.0-dev.37 197 6/13/2020
8.0.0-dev.36 248 6/13/2020
8.0.0-dev.35 188 6/12/2020
8.0.0-dev.34 236 6/12/2020
8.0.0-dev.33 278 6/10/2020
8.0.0-dev.32 206 6/1/2020
8.0.0-dev.31 241 6/1/2020
8.0.0-dev.30 297 5/30/2020
8.0.0-dev.28 233 5/28/2020
8.0.0-dev.27 222 5/15/2020
8.0.0-dev.26 202 5/14/2020
8.0.0-dev.25 213 5/14/2020
8.0.0-dev.24 218 5/13/2020
8.0.0-dev.23 215 5/13/2020
8.0.0-dev.22 219 5/13/2020
8.0.0-dev.21 215 5/12/2020
8.0.0-dev.20 217 5/12/2020
8.0.0-dev.19 216 5/7/2020
8.0.0-dev.18 218 5/7/2020
8.0.0-dev.17 211 5/6/2020
8.0.0-dev.16 222 5/6/2020
8.0.0-dev.15 212 5/5/2020
8.0.0-dev.14 207 5/5/2020
8.0.0-dev.13 232 5/4/2020
7.6.0-dev.13 237 5/1/2020
7.6.0-dev.12 240 4/30/2020
7.6.0-dev.11 213 4/28/2020
7.6.0-dev.10 205 4/27/2020
7.6.0-dev.9 210 4/24/2020
7.6.0-dev.8 210 4/22/2020
7.6.0-dev.7 202 4/15/2020
7.6.0-dev.6 202 4/15/2020
7.6.0-dev.5 204 4/15/2020
7.6.0-dev.4 327 4/11/2020
7.6.0-dev.3 212 4/10/2020
7.6.0-dev.2 196 4/10/2020
7.6.0-dev.1 285 4/8/2020
7.5.2 375 3/20/2020
7.5.1 340 3/12/2020
7.5.0 332 3/10/2020
7.5.0-dev.18 230 3/5/2020
7.5.0-dev.17 231 3/5/2020
7.5.0-dev.16 258 3/4/2020
7.5.0-dev.15 197 3/3/2020
7.5.0-dev.14 212 3/3/2020
7.5.0-dev.13 193 2/29/2020
7.5.0-dev.12 317 2/29/2020
7.5.0-dev.10 191 2/25/2020
7.5.0-dev.9 248 2/20/2020
7.5.0-dev.8 268 2/18/2020
7.5.0-dev.7 203 2/18/2020
7.5.0-dev.6 224 2/14/2020
7.5.0-dev.5 246 2/12/2020
7.5.0-dev.4 213 2/11/2020
7.5.0-dev.3 189 2/11/2020
7.5.0-dev.2 341 2/8/2020
7.5.0-dev.1 228 2/7/2020
7.4.2 325 2/5/2020
7.4.1 423 2/3/2020
7.4.0 432 1/31/2020
7.4.0-dev.4 278 1/31/2020
7.4.0-dev.3 253 1/29/2020
7.4.0-dev.2 207 1/28/2020
7.3.1 397 1/21/2020
7.3.1-preview.7 213 1/21/2020
7.3.1-preview.1 246 1/20/2020
7.3.0 348 1/19/2020
7.2.6 408 1/18/2020
7.2.5 385 12/19/2019
7.2.4 360 12/19/2019
7.2.3 378 12/16/2019
7.2.2 382 12/9/2019
7.2.1 386 12/4/2019
7.2.0 358 11/26/2019
7.2.0-preview.10 210 11/20/2019
7.2.0-preview.9 208 11/19/2019
7.2.0-preview.8 212 11/18/2019
7.2.0-preview.6 227 11/14/2019
7.2.0-preview.5 214 11/14/2019
7.2.0-preview.4 215 11/14/2019
7.2.0-preview.2 214 11/11/2019
7.2.0-preview.1 214 11/9/2019
7.1.0 405 11/6/2019
7.1.0-preview.8 226 11/5/2019
7.1.0-preview.7 218 11/4/2019
7.1.0-preview.6 217 11/1/2019
7.1.0-preview.5 232 10/31/2019
7.1.0-preview.4 238 10/30/2019
7.1.0-preview.3 213 10/26/2019
7.1.0-preview.2 222 10/25/2019
7.1.0-preview.1 219 10/24/2019

Please check https://github.com/kephas-software/kephas/releases for the change log.
           Also check the documentation and the samples from https://github.com/kephas-software/kephas/wiki and https://github.com/kephas-software/kephas/tree/master/Samples.