It seems that when going into -i, the parser converts it to a SwitchElement type. Try this to see if it works.
static void Set(TopshelfArguments args, IEnumerable<ICommandLineElement> commandLineElements) { var command = commandLineElements .Take(1) .Select(x => (ISwitchElement) x) .Select(x => x.Key) .DefaultIfEmpty("commandline") .SingleOrDefault(); args.Command = command;
source share