Also introduce a new ConfigurationReaderOptions class to avoid ReadFrom.Configuration() methods exponential growth when adding new options.
All olderConfiguration() methods go through the newly introduced Configuration(LoggerSettingsConfiguration, IConfiguration, ConfigurationReaderOptions) method that takes an ConfigurationReaderOptions instance.
Older methods explicitly set the FormatProvider option to null in order to preserve backward compatibility.
By using the new Configuration() method, users opt into the new default of having the invariant culture as the format provider.
Note: the = null default value in the Configuration() method taking a DependencyContext has been removed in order to make sure the CS0121 compilation does not occur:
[CS0121] The call is ambiguous between the following methods or properties: 'ConfigurationLoggerConfigurationExtensions.Configuration(LoggerSettingsConfiguration, IConfiguration, DependencyContext)' and 'ConfigurationLoggerConfigurationExtensions.Configuration(LoggerSettingsConfiguration, IConfiguration, ConfigurationReaderOptions)'
Also introduce a new
ConfigurationReaderOptions
class to avoidReadFrom.Configuration()
methods exponential growth when adding new options.All older
Configuration()
methods go through the newly introducedConfiguration(LoggerSettingsConfiguration, IConfiguration, ConfigurationReaderOptions)
method that takes anConfigurationReaderOptions
instance.Older methods explicitly set the
FormatProvider
option tonull
in order to preserve backward compatibility.By using the new
Configuration()
method, users opt into the new default of having the invariant culture as the format provider.Note: the
= null
default value in theConfiguration()
method taking aDependencyContext
has been removed in order to make sure the CS0121 compilation does not occur:Fixes #325