ConfigurationLoader

open class ConfigurationLoader

A ConfigurationLoader acts as a container of configuration providers (objects that conform to the ConfigurationProviding protocol), and provides an interface to access them. This class acts as a mediator between configuration providers and the application, providing callback mechanisms through a ConfigurationLoaderDelegate. In addition, an alternate method to save data may be supplied by an object that implements the ConfigurationPersisting protocol.

  • The queue of configuration providers held by this object. Corresponds to the providers specified during initialization, however, if nil was specified, the default queue will be constructed.

    Declaration

    Swift

    public var providers: [ConfigurationProviding] { get set }
  • Delegate used to communicate between the loader instance and the application.

    Declaration

    Swift

    public weak var delegate: ConfigurationLoaderDelegate?
  • Optionally supplied property that uses a ConfigurationPersisting object’s implementation of persistConfiguration(_:) to pass configuration data to. If nil, configuration data will be written to UserDefaults under ConfigurationProviderUserDefaultsKey(com.sap.configuration.provider.configurationstore).

    Declaration

    Swift

    public var outputHandler: ConfigurationPersisting? { get set }