TConfiguration.Current Property
The configuration of the application: one instance, shared by the whole process and reachable from anywhere.
Remarks
It needs no setup. Nothing exists until it is first read; that first read creates a configuration from the conventional sources of the application, the ones IConfigurationRoot.AddDefaults adds for the name of the executable, and every later read returns the same one.
An application that wants other sources builds its own configuration and assigns it here at startup, before anything reads it: the conventional sources are then never loaded. Assigning nil discards the current one, and the next read loads the conventional sources again.
A configuration that is there but cannot be loaded - a malformed file, for example - raises EConfigurationException from the read that tried to load it, and the next read tries again. Read it once while the application starts, so that such a failure stops it from starting.
Reading and assigning are thread safe.
Syntax
Unit: Bcl.Configuration
property TConfiguration.Current: IConfiguration