commandlineparser / commandlineparser/commandline

Support fake results

オープン
#85 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
enhancement
主要言語
C#
スター
4.8k
フォーク
478
PR マージ指標
30日以内にマージされた PR はありません

説明

**Issue by [themacguffinman](https://github.com/themacguffinman)**
_Thursday Aug 25, 2016 at 06:58 GMT_
_Originally opened as https://github.com/gsscoder/commandline/issues/345_

----

Right now it's impossible to raise my own parser errors because all classes relating to the error system are `sealed` with `internal` constructors.

This snippet from `HelpTextTests` is completely inaccessible:

```
var fakeResult = new NotParsed(
TypeInfo.Create(typeof(NullInstance)),
new Error[]
{
new BadFormatTokenError("badtoken"),
new MissingValueOptionError(new NameInfo("x", "switch")),
new UnknownOptionError("unknown"),
new MissingRequiredOptionError(new NameInfo("", "missing")),
new SequenceOutOfRangeError(new NameInfo("s", "sequence")),
new NoVerbSelectedError(),
new BadVerbSelectedError("badverb"),
new HelpRequestedError(), // should be ignored
new HelpVerbRequestedError(null, null, false) // should be ignored
});
```

Please publicly expose the error system to support custom error management.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。