public static MultiSourceKeyValueConfiguration Build(
            [NotNull] this AppSettingsDecoratorBuilder appSettingsBuild,
            Action <string>?logAction = null)
        {
            if (appSettingsBuild is null)
            {
                throw new ArgumentNullException(nameof(appSettingsBuild));
            }

            var multiSourceKeyValueConfiguration = new MultiSourceKeyValueConfiguration(appSettingsBuild, logAction);

            return(Initialize(multiSourceKeyValueConfiguration));
        }
        public static AppSettingsDecoratorBuilder DecorateWith(
            [NotNull] this AppSettingsDecoratorBuilder builder,
            [NotNull] IKeyValueConfigurationDecorator decorator)
        {
            if (builder is null)
            {
                throw new ArgumentNullException(nameof(builder));
            }

            if (decorator is null)
            {
                throw new ArgumentNullException(nameof(decorator));
            }

            return(new AppSettingsDecoratorBuilder(builder, decorator));
        }
        public MultiSourceKeyValueConfiguration(
            [NotNull] AppSettingsDecoratorBuilder appSettingsDecoratorBuilder,
            Action <string>?logAction = null)
        {
            _appSettingsDecoratorBuilder = appSettingsDecoratorBuilder ??
                                           throw new ArgumentNullException(nameof(appSettingsDecoratorBuilder));

            _logAction = logAction;

            string decorators = BuildDecoratorsAsString(_appSettingsDecoratorBuilder);

            _sourceChain = "source chain: " + BuildChainAsString(_appSettingsDecoratorBuilder.AppSettingsBuilder) +
                           (string.IsNullOrWhiteSpace(decorators)
                              ? string.Empty
                              : ", decorators: " + decorators);
        }