jaster.cli.config

Contains services that are used to easily load, modify, and store the program's configuration.

Members

Aliases

RollbackOnFailure
alias RollbackOnFailure = Flag!"configRollbackOnError"

Undocumented in source.

SaveOnSuccess
alias SaveOnSuccess = Flag!"configSaveOnSuccess"

Undocumented in source.

WasExceptionThrown
alias WasExceptionThrown = Flag!"wasAnExceptionThrown?"

Undocumented in source.

Classes

AdaptableFileConfig
class AdaptableFileConfig(For, Adapter)

An IConfig with adapter support that uses the filesystem to store/retrieve its configuration value.

InMemoryConfig
class InMemoryConfig(For)

A very simple IConfig that simply stores the value in memory. This is mostly only useful for testing.

Functions

addFileConfig
ServiceInfo addFileConfig(string fileName)
ServiceInfo[] addFileConfig(ServiceInfo[] services, string fileName)

Note: The base type of the resulting service is IConfig!For, so ensure that your dependency injected code asks for IConfig!For instead of AdapatableFileConfig!(For, Adapter).

addInMemoryConfig
ServiceInfo addInMemoryConfig()
ServiceInfo[] addInMemoryConfig()

Interfaces

IConfig
interface IConfig(T)

The simplest interface for configuration.

Templates

isConfigAdapterFor
template isConfigAdapterFor(Adapter, For)

A template that evaluates to a bool which determines whether the given Adapter can successfully compile all the code needed to serialise and deserialise the For type.

Meta