nemec/clipr — pull request #5 by alexgalli (2014-11-20 22:20:40+00:00)
Title: Fix: Ensure IntegrityChecker honors positional argument ordering

LastPositionalArgumentCanTakeMultipleValuesCheck in IntegrityChecker ensures that all but the last positional argument takes a constant number of arguments.

It does this based off of the default ordering returned by GetProperties(). However, this order does not correspond to Positional Index. This will cause errors if the arguments are specified out of order, like:

public class Options
{
[PositionalArgument(1)]
public string Argument1 { get; set; }

[PositionalArgument(0)]
public string Argument0 { get; set; }
}

Or if the properties are specified in subclasses:

public class Options
{
[PositionalArgument(0)]
public string Argument0 { get; set; }
}

public class SubOptions
{
[PositionalArgument(1)]
public string Argument1 { get; set; }
}

Adding the OrderBy ensure we are not dependent on anything but PositionalArgument.Index.

Let me know if there's anything else you need.