Class ConfigSchemaHelper

Namespace
Datamine.MineTrustConnector.Core.ConfigSchemas
Assembly
Datamine.MineTrustConnector.Core.dll

Utility class for processing config schemas

public static class ConfigSchemaHelper
Inheritance
ConfigSchemaHelper
Inherited Members

Methods

GetConfigSchema(string?, bool)

Gets the configuration schema defined at the specified config root. If no config root is specified then the entire local config schema is produced.

public static ConfigSchema? GetConfigSchema(string? root = null, bool suppressErrors = false)

Parameters

root string

The root of the schema.

suppressErrors bool

if set to true [suppress errors].

Returns

ConfigSchema

The config schema

GetPermittedValue(string?)

Gets the permitted value at the specified config path as defined by the local config schema. Returns the first valid value if more than one exists, or null if none do.

public static string? GetPermittedValue(string? configPath)

Parameters

configPath string

The config path.

Returns

string

The permitted config value at the specified path

GetPermittedValues(string?, bool)

Gets all permitted config values at the specified path, as defined by the local config schema.

public static IEnumerable<string> GetPermittedValues(string? configPath = null, bool suppressErrors = false)

Parameters

configPath string

The config path.

suppressErrors bool

if set to true [suppress errors].

Returns

IEnumerable<string>

All permitted config values