public OptionSet Add(ArgumentSource source) { if (source is null) { throw new ArgumentNullException("source"); } Sources.Add(source); return(this); }
public override bool GetArguments(string value, out IEnumerable <string> replacement) { if (string.IsNullOrEmpty(value) || !value.StartsWith("@")) { replacement = null; return(false); } replacement = ArgumentSource.GetArgumentsFromFile(value.Substring(1)); return(true); }
public OptionSet Add(ArgumentSource source) { if (source is null) { throw new ArgumentNullException(nameof(source)); } Sources.Add(source); return this; }
public CommandSet Add(ArgumentSource source) { Options.Add(source); return(this); }
public static IEnumerable <string> GetArguments(TextReader reader) { return(ArgumentSource.GetArguments(reader, false)); }
public static IEnumerable <string> GetArgumentsFromFile(string file) { return(ArgumentSource.GetArguments((TextReader)File.OpenText(file), true)); }