public PrintCommand(SeqCliOutputConfig outputConfig) { if (outputConfig == null) { throw new ArgumentNullException(nameof(outputConfig)); } _noColor = outputConfig.DisableColor; _forceColor = outputConfig.ForceColor; _fileInputFeature = Enable(new FileInputFeature("CLEF file to read", supportsWildcard: true)); Options.Add("f=|filter=", "Filter expression to select a subset of events", v => _filter = ArgumentString.Normalize(v)); Options.Add("template=", "Specify an output template to control plain text formatting", v => _template = ArgumentString.Normalize(v)); _invalidDataHandlingFeature = Enable <InvalidDataHandlingFeature>(); Options.Add("no-color", "Don't colorize text output", v => _noColor = true); Options.Add("force-color", "Force redirected output to have ANSI color (unless `--no-color` is also specified)", v => _forceColor = true); }
public ListCommand(SeqConnectionFactory connectionFactory, SeqCliOutputConfig outputConfig) { _connectionFactory = connectionFactory ?? throw new ArgumentNullException(nameof(connectionFactory)); Options.Add( "n=|name=", "The name of the cluster node to list", n => _name = n); Options.Add( "i=|id=", "The id of a single cluster node to list", id => _id = id); _output = Enable(new OutputFormatFeature(outputConfig)); _connection = Enable <ConnectionFeature>(); }
public OutputFormatFeature(SeqCliOutputConfig outputConfig) { _noColor = outputConfig.DisableColor; }