Esempio n. 1
0
 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()));
 }
Esempio n. 2
0
        public ParsedCommandLine Merge
        (
            [NotNull] ParsedCommandLine other
        )
        {
            Code.NotNull(other, "other");

            PositionalArguments.AddRange(other.PositionalArguments);

            foreach (CommandLineSwitch otherSwitch in other.Switches)
            {
                AddSwitch(otherSwitch);
            }

            return(this);
        }