예제 #1
0
 public OptionSet Add(ArgumentSource source)
 {
     if (source is null)
     {
         throw new ArgumentNullException("source");
     }
     Sources.Add(source);
     return(this);
 }
예제 #2
0
 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);
 }
예제 #3
0
		public OptionSet Add(ArgumentSource source)
		{
			if (source is null)
			{
				throw new ArgumentNullException(nameof(source));
			}

			Sources.Add(source);
			return this;
		}
예제 #4
0
 public CommandSet Add(ArgumentSource source)
 {
     Options.Add(source);
     return(this);
 }
예제 #5
0
 public static IEnumerable <string> GetArguments(TextReader reader)
 {
     return(ArgumentSource.GetArguments(reader, false));
 }
예제 #6
0
 public static IEnumerable <string> GetArgumentsFromFile(string file)
 {
     return(ArgumentSource.GetArguments((TextReader)File.OpenText(file), true));
 }