public ExportTagsCommand(ExportTagsOptions opt, ILoggerFactory?loggerFactory = null) { _options = opt; _logger = loggerFactory?.CreateLogger <ExportTagsCommand>() ?? NullLogger <ExportTagsCommand> .Instance; _loggerFactory = loggerFactory; _rules = new RuleSet(); ConfigRules(); }
public ExportTagsCommand(ExportTagsOptions opt) { _options = opt; try { _options.Log ??= Utils.SetupLogging(_options); WriteOnce.Log ??= _options.Log; _rules = new RuleSet(_options.Log); ConfigureConsoleOutput(); ConfigRules(); } catch (Exception e) { WriteOnce.Error(e.Message); throw new OpException(e.Message); } }