refactor(scripting): clarify sandbox-pin invariant + add RootNamespace (A0 review)
This commit is contained in:
+1
@@ -8,6 +8,7 @@
|
|||||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||||
<NoWarn>$(NoWarn);CS1591</NoWarn>
|
<NoWarn>$(NoWarn);CS1591</NoWarn>
|
||||||
|
<RootNamespace>ZB.MOM.WW.OtOpcUa.Core.Scripting</RootNamespace>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -56,7 +56,9 @@ public static class ScriptSandbox
|
|||||||
// Core.Abstractions — DataValueSnapshot + DriverDataType so scripts can name
|
// Core.Abstractions — DataValueSnapshot + DriverDataType so scripts can name
|
||||||
// the types they receive from ctx.GetTag.
|
// the types they receive from ctx.GetTag.
|
||||||
typeof(DataValueSnapshot).Assembly,
|
typeof(DataValueSnapshot).Assembly,
|
||||||
// Core.Scripting itself — ScriptContext base class + Deadband static.
|
// Core.Scripting.Abstractions — ScriptContext base class + Deadband static.
|
||||||
|
// Intentionally NOT Core.Scripting (which holds ScriptEvaluator/ScriptSandbox + Roslyn):
|
||||||
|
// keeping it out of the sandbox pin keeps Roslyn out of the globalsType assembly closure.
|
||||||
typeof(ScriptContext).Assembly,
|
typeof(ScriptContext).Assembly,
|
||||||
// Serilog.ILogger — script-side logger type.
|
// Serilog.ILogger — script-side logger type.
|
||||||
typeof(Serilog.ILogger).Assembly,
|
typeof(Serilog.ILogger).Assembly,
|
||||||
|
|||||||
Reference in New Issue
Block a user