Engine → Scripting → dotnet_script_host.h
dotnet_script_host¶
| Type | Class |
| Namespace | conjure::scripting |
| Include File Path | engine/include/conjure/scripting/dotnet_script_host.h |
| Source File Path | engine/src/scripting/dotnet_script_host.cpp |
| API ↗ | Hosting, the native API and hot reload, Scripting |
Syntax¶
Inheritance Hierarchy¶
script_host → dotnet_script_host
Constructors¶
| Access | Signature | Description |
|---|---|---|
| public | dotnet_script_host(); |
Destructors¶
| Access | Signature | Description |
|---|---|---|
| public | ~dotnet_script_host() override; |
Variables¶
| Access | Name | Type | Default | Description |
|---|---|---|---|---|
| private | mManagedApi | conjure_managed_api | {} | |
| private | m | std::filesystem::path | {} | |
| private | mMode | host_mode | host_ | |
| private | mNativeApi | conjure_native_api * | nullptr | |
| private | mStatus | script_host_status | script_ |
Functions¶
Public¶
backend¶
backend¶[[nodiscard]] script_backend backend() const noexcept override;initialise¶
initialise¶[[nodiscard]] core::result<void> initialise(
const script_host_config &config,
conjure_native_api &nativeApi) override;Steps 1-10 of the hosting sequence: locate and load hostfxr, start (or attach to) the runtime, load Conjure.Managed into the default load context, resolve Initialize and hand it both tables. RUNTIME_NOT_FOUND, HOSTFXR_INCOMPATIBLE, RUNTIME_CONFIG_INVALID, MANAGED_SDK_MISSING, HOST_ALREADY_RUNNING, ABI_MISMATCH, WRONG_THREAD.
is_runtime_started¶
is_runtime_started¶[[nodiscard]] static bool is_runtime_started() noexcept;True once any host in this process started the CLR.
managed_api¶
managed_api¶[[nodiscard]] const conjure_managed_api &managed_api() const noexcept override;managed_directory¶
managed_directory¶[[nodiscard]] const std::filesystem::path &managed_directory() const noexcept;The managed directory the process runtime was started from (meaningful once READY). A later host asking for another directory attaches to this one with a WARN.
mode¶
mode¶[[nodiscard]] host_mode mode() const noexcept;The hosting mode the process runtime was started in (meaningful once READY).