Skip to content

DiGi.Scripting.CSharp.Classes

github-actions[bot] edited this page Jul 15, 2026 · 2 revisions

DiGi.Scripting.CSharp.Classes Namespace

Classes

Script Class

Represents a C# script implementation that can be compiled and executed using the Roslyn scripting API.

public class Script : DiGi.Scripting.Classes.Script

Inheritance DiGi.Core.Classes.SerializableObject → DiGi.Core.Interfaces.IObject → DiGi.Core.Interfaces.ISerializableObject → DiGi.Core.Interfaces.ICloneableObject → DiGi.Core.Interfaces.ICloneableObject → DiGi.Scripting.Classes.Script → Script

Constructors

Script(Code, IEnumerable<VariableType>, IEnumerable<VariableType>) Constructor

Initializes a new instance of the Script class.

public Script(DiGi.Scripting.Classes.Code? code, System.Collections.Generic.IEnumerable<DiGi.Scripting.Classes.VariableType>? inputVariableTypes, System.Collections.Generic.IEnumerable<DiGi.Scripting.Classes.VariableType>? outputVariableTypes);

Parameters

code DiGi.Scripting.Classes.Code

The source code to be executed.

inputVariableTypes System.Collections.Generic.IEnumerable<DiGi.Scripting.Classes.VariableType>

The collection of variable types used as inputs.

outputVariableTypes System.Collections.Generic.IEnumerable<DiGi.Scripting.Classes.VariableType>

The collection of variable types expected as outputs.

Script(Script) Constructor

Initializes a new instance of the Script class by copying an existing script.

public Script(DiGi.Scripting.CSharp.Classes.Script? script);

Parameters

script Script

The source script to copy.

Script(JsonObject) Constructor

Initializes a new instance of the Script class from a JSON object.

public Script(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The JSON representation of the script.

Properties

Script.Imports Property

Gets or sets the set of namespaces to be imported during script execution.

public System.Collections.Generic.HashSet<string>? Imports { get; set; }

Property Value

System.Collections.Generic.HashSet<System.String>

Script.References Property

Gets or sets the set of assembly references required for script compilation and execution.

public System.Collections.Generic.HashSet<string>? References { get; set; }

Property Value

System.Collections.Generic.HashSet<System.String>

Methods

Script.Execute(Data) Method

Executes the C# script using the provided input data.

public override DiGi.Scripting.Classes.Response? Execute(DiGi.Scripting.Classes.Data? inputData=null);

Parameters

inputData DiGi.Scripting.Classes.Data

The data to be passed into the script as globals.

Returns

DiGi.Scripting.Classes.Response
A DiGi.Scripting.Classes.Response containing the execution results or any encountered exceptions.

Clone this wiki locally