Link Search Menu Expand Document

C-Sharp Script Options

Aug 15 2023 at 12:00 AM

  1. Optimization Levels
File./Data/Config/CSharpScriptOptions.json
NuGet PackageIoTnxt.Raptor.Script.CSharp
Program.cs Stub.AddRaptorCSharpScript()
Required ByAny Service that uses scripting.

This is used to control the compilation of C# scripts.

{
  "DeviceCommunicatorOptions": {
    "Debug": false,
    "OptimizationLevel": "Release",
    "WarningsAsErrors": true,
    "AsyncTimeout": 10000
  }
}
PropertyDescription
DebugIf true, turns on debug logging. Defaults to false.
OptimizationLevelDetermines the level of optimization of the generated code. See below. Defaults to Release.
WarningsAsErrorsWhether to treat warnings as errors. Defaults to true.
AsyncTimeoutAsynchronous timeout, in milliseconds, used for various calls. Defaults to 10,000 (10 seconds)

Optimization Levels

LevelDescription
DebugDisables all optimizations and instruments of the generated code to improve the debugging experience.
ReleaseEnables all optimizations, the debugging experience might be degraded.