Exemple #1
0
        private bool ValidateRequiredCsvArguments(IEnumerable <IArgument> args, out string message)
        {
            message = string.Empty;

            var required = ArgumentHelper.GetCsvArguments().Where(x => x.IsRequired);
            var target   = args.Where(x => x.IsRequired);

            if (required.All(x => target.Select(y => y.ArgumentKind).Contains(x.ArgumentKind)))
            {
                return(true);
            }

            var extracted = this.Extract(required, target);

            message = $"CSV 変換の必須オプションが不足しています : {extracted.Select(x => x.Alias.Join(" | ")).Join(",")}";

            return(false);
        }
Exemple #2
0
 public CsvArgumentResolver() : base(ArgumentHelper.GetCsvArguments())
 {
 }