private static void InitializeSettings()
{
if (!s_settingsInitialized)
{
// we should avoid 2 threads altering the state concurrently for predictable behavior
// though it may not be strictly necessary at present
lock (critSec)
{
if (!s_settingsInitialized)
{
SetIndentSize(DiagnosticsConfiguration.IndentSize);
s_autoFlush = DiagnosticsConfiguration.AutoFlush;
s_useGlobalLock = DiagnosticsConfiguration.UseGlobalLock;
s_settingsInitialized = true;
}
}
}
}