 | SetupBuilderExtensionsLoadConfigurationFromSection Method |
Loads NLog LoggingConfiguration from appsettings.json from NLog-section
Namespace:
NLog.Extensions.Logging
Assembly:
NLog.Extensions.Logging (in NLog.Extensions.Logging.dll) Version: 6.0.0+b2556d03163fe4c7b4484f0ca757e7ee6f8c5e4e
Syntaxpublic static ISetupBuilder LoadConfigurationFromSection(
this ISetupBuilder setupBuilder,
IConfiguration configuration,
string configSection = "NLog"
)
<ExtensionAttribute>
Public Shared Function LoadConfigurationFromSection (
setupBuilder As ISetupBuilder,
configuration As IConfiguration,
Optional configSection As String = "NLog"
) As ISetupBuilder
Dim setupBuilder As ISetupBuilder
Dim configuration As IConfiguration
Dim configSection As String
Dim returnValue As ISetupBuilder
returnValue = setupBuilder.LoadConfigurationFromSection(configuration,
configSection)
[<ExtensionAttribute>]
static member LoadConfigurationFromSection :
setupBuilder : ISetupBuilder *
configuration : IConfiguration *
?configSection : string
(* Defaults:
let _configSection = defaultArg configSection "NLog"
*)
-> ISetupBuilder
Parameters
- setupBuilder
- Type: NLog.ConfigISetupBuilder
- configuration
- Type: IConfiguration
- configSection (Optional)
- Type: SystemString
Return Value
Type:
ISetupBuilderUsage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
ISetupBuilder. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also