Xeku.Scripts
0.0.0.6
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Xeku.Scripts --version 0.0.0.6
NuGet\Install-Package Xeku.Scripts -Version 0.0.0.6
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="Xeku.Scripts" Version="0.0.0.6" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Xeku.Scripts" Version="0.0.0.6" />
<PackageReference Include="Xeku.Scripts" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Xeku.Scripts --version 0.0.0.6
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Xeku.Scripts, 0.0.0.6"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Xeku.Scripts@0.0.0.6
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Xeku.Scripts&version=0.0.0.6
#tool nuget:?package=Xeku.Scripts&version=0.0.0.6
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Xeku.Scripts
An XAF module for dynamic C# script compilation and execution using Roslyn.
Features
- Dynamic Compilation: Compile C# code at runtime using Roslyn.
- Monaco Editor Integration: Professional code editor with syntax highlighting.
- ScriptContext API: Simplified interface for scripts to interact with XAF.
- Execution Logging: Track script execution history with timestamps, duration, and results.
- Assembly Caching: Optimized performance through compiled assembly caching.
Installation
dotnet add package Xeku.Scripts
Dependencies
Xeku.Core- Core module with common servicesXeku.Editors- Monaco editor support
Usage
Basic Script Structure
public class ScriptMain
{
public void Run(ScriptContext ctx)
{
ctx.ShowMessage("Hello from Script!");
}
}
ScriptContext API
| Method | Description |
|---|---|
CreateObject<T>() |
Create a new business object |
Query<T>() |
Query objects using LINQ |
GetAll<T>() |
Get all objects of type T |
CommitChanges() |
Save pending changes |
ShowMessage(msg) |
Queue an info message |
ShowWarning(msg) |
Queue a warning message |
ShowError(msg) |
Queue an error message |
Log(msg) |
Write to trace output |
Integration
- Add module reference in your Module.cs:
RequiredModuleTypes.Add(typeof(Xeku.Scripts.ScriptsModule));
- For Blazor apps, ensure
Xeku.Editors.Blazoris properly configured with Monaco scripts in_Host.cshtml.
Business Objects
| Class | Description |
|---|---|
Script |
Stores script metadata, code, and compiled assembly |
ScriptExecutionLog |
Records execution history (read-only in UI) |
Actions
| Action | Description |
|---|---|
| Compile | Compile the script code |
| Run | Execute the script |
| Run with Context | Execute with ScriptContext parameter |
| Clear Logs | Delete all execution logs for the script |
Architecture
graph TD
subgraph Runtime
Script[Script Business Object]
Roslyn[Roslyn Compiler]
Cache[Assembly Cache]
end
subgraph Execution
Controller[ScriptController]
Context[ScriptContext]
Log[ExecutionLog]
end
Script --> Roslyn
Roslyn --> Cache
Controller --> Script
Controller --> Context
Controller --> Log
License
Proprietary - Xeku Solutions
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- DevExpress.ExpressApp (>= 25.2.3)
- DevExpress.ExpressApp.Xpo (>= 25.2.3)
- DevExpress.Persistent.Base (>= 25.2.3)
- DevExpress.Persistent.BaseImpl.Xpo (>= 25.2.3)
- Microsoft.CodeAnalysis.CSharp (>= 4.12.0)
- Xeku.AI (>= 0.0.0.6)
- Xeku.Core (>= 0.0.0.6)
- Xeku.Editors (>= 0.0.0.6)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on Xeku.Scripts:
| Package | Downloads |
|---|---|
|
Xeku.Triggers
XAF module providing trigger rules and webhook execution for CRUD operations. |
|
|
Xeku.Scripts.Blazor
Xeku Scripts Blazor module for DevExpress XAF Blazor applications. Enables Monaco editor support for script editing. |
|
|
Xeku.Scripts.WebApi
Xeku Scripts WebApi module for remote script execution via OData/REST API. |
GitHub repositories
This package is not used by any popular GitHub repositories.