Interface IRuntime
The OpenMod runtime is responsible for initializing OpenMod.
Inherited Members
Namespace: OpenMod.API
Assembly: OpenMod.API.dll
Syntax
public interface IRuntime : IOpenModComponent
Properties
| Improve this Doc View SourceCommandlineArgs
Gets the commandline arguments.
Declaration
string[] CommandlineArgs { get; }
Property Value
Type | Description |
---|---|
System.String[] |
Host
Gets the .NET generic host instance. Returns null if the host is not loaded yet.
Declaration
IHost? Host { get; }
Property Value
Type | Description |
---|---|
System.Nullable<IHost> |
HostAssemblies
Gets the OpenMod host assemblies.
Declaration
IReadOnlyCollection<Assembly> HostAssemblies { get; }
Property Value
Type | Description |
---|---|
IReadOnlyCollection<Assembly> |
HostInformation
Information about the OpenMod host. Returns null if the host is not loaded yet.
Declaration
IHostInformation HostInformation { get; }
Property Value
Type | Description |
---|---|
IHostInformation |
IsDisposing
Checks if the runtime is shutting down or disposing.
Declaration
bool IsDisposing { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Status
Gets the runtime status.
Declaration
RuntimeStatus Status { get; }
Property Value
Type | Description |
---|---|
RuntimeStatus |
Version
Gets the OpenMod runtime version.
Declaration
SemVersion Version { get; }
Property Value
Type | Description |
---|---|
SemVersion |
Methods
| Improve this Doc View SourceInitAsync(List<Assembly>, RuntimeInitParameters, Func<IHostBuilder>)
Initializes the runtime.
Declaration
Task<IHost> InitAsync(List<Assembly> openModHostAssemblies, RuntimeInitParameters parameters, Func<IHostBuilder> hostBuilder)
Parameters
Type | Name | Description |
---|---|---|
List<Assembly> | openModHostAssemblies | |
RuntimeInitParameters | parameters | |
Func<IHostBuilder> | hostBuilder |
Returns
Type | Description |
---|---|
Task<IHost> | The .NET Generic Host interface. |
PerformSoftReloadAsync()
Rebuilds the DI container and reloads all plugins, services, configurations etc.
Declaration
Task PerformSoftReloadAsync()
Returns
Type | Description |
---|---|
Task |
ShutdownAsync()
Shuts OpenMod down gracefully and disposes all services.
Declaration
Task ShutdownAsync()
Returns
Type | Description |
---|---|
Task |