public void Parse(string[] args) { var parser = new Fclp.FluentCommandLineParser(); parser.Setup<List<string>>(CaseType.CaseInsensitive, Common.OptionSource_LongName, Common.OptionSource_ShortName) .Callback(items => ManifestFiles = items); parser.Setup<string>(CaseType.CaseInsensitive, Common.OptionDirectory_LongName, Common.OptionDirectory_ShortName) .Callback(dir => ManifestDirectory = dir); var result = parser.Parse(args); if (result.HasErrors) { throw new Exception(result.ErrorText); } }
/// <summary> /// Initialises a new instance of the <see cref="FluentCommandLineParser{TBuildType}"/> class. /// </summary> public FluentCommandLineParser() { Object = new TBuildType(); Parser = new FluentCommandLineParser(); }