Repository navigation
DiGi.Scripting.CSharp.Classes
Represents a C# script implementation that can be compiled and executed using the Roslyn scripting API.
public class Script : DiGi.Scripting.Classes.ScriptInheritance 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
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);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.
Initializes a new instance of the Script class by copying an existing script.
public Script(DiGi.Scripting.CSharp.Classes.Script? script);script Script
The source script to copy.
Initializes a new instance of the Script class from a JSON object.
public Script(System.Text.Json.Nodes.JsonObject? jsonObject);jsonObject System.Text.Json.Nodes.JsonObject
The JSON representation of the script.
Gets or sets the set of namespaces to be imported during script execution.
public System.Collections.Generic.HashSet<string>? Imports { get; set; }System.Collections.Generic.HashSet<System.String>
Gets or sets the set of assembly references required for script compilation and execution.
public System.Collections.Generic.HashSet<string>? References { get; set; }System.Collections.Generic.HashSet<System.String>
Executes the C# script using the provided input data.
public override DiGi.Scripting.Classes.Response? Execute(DiGi.Scripting.Classes.Data? inputData=null);inputData DiGi.Scripting.Classes.Data
The data to be passed into the script as globals.
DiGi.Scripting.Classes.Response
A DiGi.Scripting.Classes.Response containing the execution results or any encountered exceptions.