public static ILogServiceCollection AddNLog(this ILogServiceCollection services, Action <NLogSinkOptions> settingAct = null,
                                                    Action <IConfiguration, NLogSinkConfiguration> configAction = null)
        {
            var settings = new NLogSinkOptions();

            settingAct?.Invoke(settings);
            return(services.AddNLog(settings, configAction));
        }
 public static ILogServiceCollection AddNLog(this ILogServiceCollection services, NLogSinkOptions options,
                                             Action <IConfiguration, NLogSinkConfiguration> configAction = null)
 {
     return(services.AddNLog(Options.Create(options), configAction));
 }
 /// <summary>
 /// Create a new instance of <see cref="NLogPayloadClientProvider"/>
 /// </summary>
 /// <param name="settings"></param>
 /// <param name="loggingConfiguration"></param>
 public NLogPayloadClientProvider(IOptions <NLogSinkOptions> settings, LoggingConfiguration loggingConfiguration)
 {
     _options = settings == null ? new NLogSinkOptions() : settings.Value;
     _loggingConfiguration = loggingConfiguration ?? throw new ArgumentNullException(nameof(loggingConfiguration));
 }