Class ScriptContext<TData>
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
-
IScriptContext<TData>IEquatable<ScriptContext<TData>>
- 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
TDataThe data associated with the script context, which can be any type of data relevant to the script's operation.
Name
stringThe name of the script, typically used for identification or logging purposes.
FileName
stringThe name of the script file, which is usually the name of the script without the path.
FilePath
stringThe full file path of the script, including the directory and file name.
ClassNamespace
stringThe namespace of the class that contains the script, which helps in organizing scripts and avoiding naming conflicts.
LoaderOptions
ScriptLoaderOptionsOptional options for loading the script, such as assembly load context or other loader-specific settings.
Log
ILoggerThe 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
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
FilePath
The full file path of the script, including the directory and file name.
public string FilePath { get; init; }
Property Value
LoaderOptions
Optional options for loading the script, such as assembly load context or other loader-specific settings.
public ScriptLoaderOptions? LoaderOptions { get; init; }
Property Value
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
Name
The name of the script, typically used for identification or logging purposes.
public string Name { get; init; }