Table of Contents

Class ScriptContext<TData>

Namespace
RisingV.Scripting
Assembly
RisingV.Scripting.dll

Represents the context in which a script is executed, including its associated data and metadata.

public record ScriptContext<TData> : IScriptContext<TData>, IScriptContext, IEquatable<ScriptContext<TData>>

Type Parameters

TData

The type of data associated with the script context, which can be any type that the script needs to operate on.

Inheritance
ScriptContext<TData>
Implements
Derived
Inherited Members
Extension Methods

Constructors

ScriptContext(TData, string, string, string, string, ScriptLoaderOptions?, ILogger)

Represents the context in which a script is executed, including its associated data and metadata.

public ScriptContext(TData Data, string Name, string FileName, string FilePath, string ClassNamespace, ScriptLoaderOptions? LoaderOptions, ILogger Log)

Parameters

Data TData

The data associated with the script context, which can be any type of data relevant to the script's operation.

Name string

The name of the script, typically used for identification or logging purposes.

FileName string

The name of the script file, which is usually the name of the script without the path.

FilePath string

The full file path of the script, including the directory and file name.

ClassNamespace string

The namespace of the class that contains the script, which helps in organizing scripts and avoiding naming conflicts.

LoaderOptions ScriptLoaderOptions

Optional options for loading the script, such as assembly load context or other loader-specific settings.

Log ILogger

The logger associated with the script context, used for logging messages related to script execution and debugging.

Properties

ClassNamespace

The namespace of the class that contains the script, which helps in organizing scripts and avoiding naming conflicts.

public string ClassNamespace { get; init; }

Property Value

string

Data

The data associated with the script context, which can be any type of data relevant to the script's operation.

public TData Data { get; init; }

Property Value

TData

FileName

The name of the script file, which is usually the name of the script without the path.

public string FileName { get; init; }

Property Value

string

FilePath

The full file path of the script, including the directory and file name.

public string FilePath { get; init; }

Property Value

string

LoaderOptions

Optional options for loading the script, such as assembly load context or other loader-specific settings.

public ScriptLoaderOptions? LoaderOptions { get; init; }

Property Value

ScriptLoaderOptions

Log

The logger associated with the script context, used for logging messages related to script execution and debugging.

public ILogger Log { get; init; }

Property Value

ILogger

Name

The name of the script, typically used for identification or logging purposes.

public string Name { get; init; }

Property Value

string