private void InitializePositionalArguments() { PositionalArguments.AddRange(typeof(T).GetTypeInfo().GetProperties() .Where(p => p.GetCustomAttribute <PositionalArgumentAttribute>() != null) .OrderBy(p => p.GetCustomAttribute <PositionalArgumentAttribute>().Index) .Select(p => p.ToPositionalArgument())); }
public ParsedCommandLine Merge ( [NotNull] ParsedCommandLine other ) { Code.NotNull(other, "other"); PositionalArguments.AddRange(other.PositionalArguments); foreach (CommandLineSwitch otherSwitch in other.Switches) { AddSwitch(otherSwitch); } return(this); }