Helper class that reads a container’s configuration from a JSON or YAML file.
Description
The ContainerConfigReader class allows you to read a container’s configuration from a JSON or YAML file.
Static methods
ReadFromFile
Reads a container’s configuration from a JSON or YAML file. The type of the file is determined by the file extension.
public static
ContainerConfig ReadFromFile(IContext context, string path, ConfigParams parameters)
- context: IContext - (optional) a context to trace execution through a call chain.
- path: string - path to the component’s configuration file.
- parameters: ConfigParams - configuration parameters or null to skip parameterization.
- returns: ContainerConfig - read container configuration
ReadFromJsonFile
Reads a container’s configuration from a JSON file.
public static
ContainerConfig ReadFromJsonFile(IContext context, string path, ConfigParams parameters)
- context: IContext - (optional) a context to trace execution through a call chain.
- path: string - path to the component’s configuration file.
- parameters: ConfigParams - configuration parameters or null to skip parameterization.
- returns: ContainerConfig - read container configuration
ReadFromYamlFile
Reads container configuration from a YAML file.
public static
ContainerConfig ReadFromYamlFile(IContext context, string path, ConfigParams parameters)
- context: IContext - (optional) a context to trace execution through a call chain.
- path: string - path to the component’s configuration file.
- parameters: ConfigParams - configuration parameters or null to skip parameterization.
- returns: ContainerConfig - read container configuration