Class RuntimeConfiguration
- Namespace
- AsmResolver.DotNet.Config.Json
- Assembly
- AsmResolver.DotNet.dll
Represents the root object of a runtime configuration, stored in a *.runtimeconfig.json file.
public class RuntimeConfiguration
- Inheritance
-
RuntimeConfiguration
- Inherited Members
Constructors
RuntimeConfiguration()
Creates a new empty runtime configuration.
public RuntimeConfiguration()
RuntimeConfiguration(RuntimeOptions)
Creates a new runtime configuration with the provided options.
public RuntimeConfiguration(RuntimeOptions options)
Parameters
options
RuntimeOptions
Properties
RuntimeOptions
Gets or sets the runtime options.
public RuntimeOptions RuntimeOptions { get; set; }
Property Value
Methods
FromFile(string)
Parses runtime configuration from a JSON file.
public static RuntimeConfiguration? FromFile(string path)
Parameters
path
stringThe path to the runtime configuration file.
Returns
- RuntimeConfiguration
The parsed runtime configuration.
FromJson(string)
Parses runtime configuration from a JSON string.
public static RuntimeConfiguration? FromJson(string json)
Parameters
json
stringThe raw json string configuration file.
Returns
- RuntimeConfiguration
The parsed runtime configuration.
ToJson()
Serializes the configuration to a JSON string.
public string ToJson()
Returns
- string
The JSON string.
Write(string)
Writes the configuration to a file.
public void Write(string path)
Parameters
path
stringThe path to the JSON output file.