Skip to content

DiGi.Scripting.Core

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

DiGi.Scripting.Core Namespace

Classes

Create Class

public static class Create

Inheritance System.Object → Create

Methods

Create.Data<TInput>(this IEnumerable<TInput>) Method

Converts a collection of IInput objects into a Data<TInput>(this IEnumerable<TInput>) object.

public static DiGi.Scripting.Classes.Data? Data<TInput>(this System.Collections.Generic.IEnumerable<TInput> inputs)
    where TInput : DiGi.Scripting.Interfaces.IInput;

Type parameters

TInput

The type of input variables, which must implement IInput.

Parameters

inputs System.Collections.Generic.IEnumerable<TInput>

A collection of input variables to be converted.

Returns

Data
A Data<TInput>(this IEnumerable<TInput>) instance containing the name-value pairs from the inputs, or null if the input collection is null.

Query Class

public static class Query

Inheritance System.Object → Query

Methods

Query.Execute(this Script, IEnumerable<Data>, ThreadingMode) Method

Executes a Script against multiple sets of input data using the specified threading mode.

public static System.Collections.Generic.List<DiGi.Scripting.Classes.Response?>? Execute(this DiGi.Scripting.Classes.Script? script, System.Collections.Generic.IEnumerable<DiGi.Scripting.Classes.Data>? inputDatas, DiGi.Scripting.Enums.ThreadingMode threadingMode=DiGi.Scripting.Enums.ThreadingMode.Parallel);

Parameters

script Script

The script to execute.

inputDatas System.Collections.Generic.IEnumerable<Data>

A collection of Data objects providing inputs for each execution.

threadingMode ThreadingMode

The ThreadingMode used to control the parallelism of the execution. Defaults to Parallel.

Returns

System.Collections.Generic.List<Response>
A list of Response objects containing the results, or null if the script, input data, or threading mode is invalid.

Query.Execute(this Script, IEnumerable<Data>, ParallelOptions) Method

Executes a Script against multiple sets of input data using the provided parallel options.

public static System.Collections.Generic.List<DiGi.Scripting.Classes.Response?>? Execute(this DiGi.Scripting.Classes.Script? script, System.Collections.Generic.IEnumerable<DiGi.Scripting.Classes.Data>? inputDatas, System.Threading.Tasks.ParallelOptions parallelOptions);

Parameters

script Script

The script to execute.

inputDatas System.Collections.Generic.IEnumerable<Data>

A collection of Data objects providing inputs for each execution.

parallelOptions System.Threading.Tasks.ParallelOptions

The System.Threading.Tasks.ParallelOptions used to configure the parallel loop.

Returns

System.Collections.Generic.List<Response>
A list of Response objects containing the results, or null if the script or input data is null.

Query.Execute(this Script, IEnumerable<Data>, ParallelOptions, Func<Response,bool>, Response) Method

Executes a Script against multiple sets of input data with the ability to stop execution based on a response predicate.

public static System.Collections.Generic.List<DiGi.Scripting.Classes.Response?>? Execute(this DiGi.Scripting.Classes.Script? script, System.Collections.Generic.IEnumerable<DiGi.Scripting.Classes.Data>? inputDatas, System.Threading.Tasks.ParallelOptions? parallelOptions, System.Func<DiGi.Scripting.Classes.Response?,bool>? stopFunc, out DiGi.Scripting.Classes.Response? stopResponse);

Parameters

script Script

The script to execute.

inputDatas System.Collections.Generic.IEnumerable<Data>

A collection of Data objects providing inputs for each execution.

parallelOptions System.Threading.Tasks.ParallelOptions

The System.Threading.Tasks.ParallelOptions used to configure the parallel loop.

stopFunc System.Func<Response,System.Boolean>

A function that takes a Response and returns true if the overall execution should stop.

stopResponse Response

When this method returns, contains the Response that triggered the stop condition, if any.

Returns

System.Collections.Generic.List<Response>
A list of Response objects containing the results, or null if the script or input data is null.

Clone this wiki locally