private IEnumerable<ClassifiedArgument> ParseFlagArguments(WholeArgumentStore result, IEnumerable<ClassifiedArgument> arguments) { var enumerator = arguments.GetEnumerator(); while (enumerator.MoveNext()) { var flagOption = enumerator.Current; if (flagOption.ArgumentType == ArgumentType.Flag) { result.StoreFlag(flagOption.ParameterInfo, true); } else { yield return flagOption; } } }