public TagDiffCommand(TagDiffOptions opt, ILoggerFactory?loggerFactory = null) { _options = opt; _factory = loggerFactory; _logger = loggerFactory?.CreateLogger <TagDiffCommand>() ?? NullLogger <TagDiffCommand> .Instance; try { ConfigSourceToScan(); } catch (OpException e) //group error handling { _logger.LogError(e.Message); throw; } }
public TagDiffCommand(TagDiffOptions opt) { _options = opt; _options.TestType ??= "equality"; try { _options.Log ??= Utils.SetupLogging(_options); WriteOnce.Log ??= _options.Log; ConfigureConsoleOutput(); ConfigureCompareType(); ConfigSourceToScan(); } catch (OpException e) //group error handling { WriteOnce.Error(e.Message); throw; } }