commandlineparser / commandlineparser/commandline
Incorrent argument checks in HeadingInfo.cs
- Vorherrschende Sprache
- C#
- Sterne
- 4.8k
- Forks
- 478
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
**Issue by [zii-dmg](https://github.com/zii-dmg)**
_Friday Jan 20, 2017 at 15:30 GMT_
_Originally opened as https://github.com/gsscoder/commandline/issues/408_
----
[Constructor](https://github.com/gsscoder/commandline/blob/master/src/CommandLine/Text/HeadingInfo.cs#L30):
```
public HeadingInfo(string programName, string version = null)
{
if (string.IsNullOrWhiteSpace("programName")) throw new ArgumentException("programName");
```
Passing string `"programName"` instead of argument `programName` value. But HeadingInfo.Empty is creating object with empty string! So I suppose this check should removed and xml comment with exception description.
[WriteMessage](https://github.com/gsscoder/commandline/blob/master/src/CommandLine/Text/HeadingInfo.cs#L104):
```
if (string.IsNullOrWhiteSpace("message")) throw new ArgumentException("message");
```
Same - `"message"` vs `message`.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Bewertung
Dieses Issue wurde noch nicht bewertet.