Skip to content

Commit a81d1c6

Browse files
committed
docs for IConfigurationSection
1 parent 1239fda commit a81d1c6

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,3 +125,7 @@ When the configuration specifies a discrete value for a parameter (such as a str
125125

126126
If the parameter value is not a discrete value, the package will use the configuration binding system provided by _Microsoft.Extensions.Options.ConfigurationExtensions_ to attempt to populate the parameter. Almost anything that can be bound by `IConfiguration.Get<T>` should work with this package. An example of this is the optional `List<Column>` parameter used to configure the .NET Standard version of the _Serilog.Sinks.MSSqlServer_ package.
127127

128+
### IConfigurationSection parameters
129+
130+
Certain Serilog packages may require configuration information that can't be easily represented by discrete values or direct binding-friendly representations. An example might be lists of values to remove from a collection of default values. In this case the method can accept an entire `IConfigurationSection` as a call parameter and this package will recognize that and populate the parameter. In this way, Serilog packages can support arbitrarily complex configuration scenarios.
131+

src/Serilog.Settings.Configuration/Serilog.Settings.Configuration.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
<PackageProjectUrl>https://github.com/serilog/serilog-settings-configuration</PackageProjectUrl>
1818
<PackageLicenseUrl>https://www.apache.org/licenses/LICENSE-2.0</PackageLicenseUrl>
1919
<RootNamespace>Serilog</RootNamespace>
20-
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
21-
<Version>3.0.0.7</Version>
22-
<AssemblyVersion>3.0.0.0</AssemblyVersion>
20+
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
21+
<Version>3.0.0</Version>
22+
<AssemblyVersion>3.0.0</AssemblyVersion>
2323
<FileVersion>3.0.0</FileVersion>
2424
</PropertyGroup>
2525

0 commit comments

Comments
 (0)