commandlineparser / commandlineparser/commandline
Why is DefaultSentenceBuilder private?
- Dominant language
- C#
- Stars
- 4.8k
- Forks
- 478
- PR merge metrics
- No merged PRs in 30d
Description
Is there a reason that `DefaultSentenceBuilder` is marked `private`? It would be much easier to customize `SentenceBuilder` if the class were public and could be inherited.
```csharp
public class MySentenceBuilder: DefaultSentenceBuilder
{
public override Func UsageHeadingText => () => "Usage:";
}
SentenceBuilder.Factory = () => new MySentenceBuilder();
```
Another possibility would be to make `SentenceBuilder` non-abstract, move the default implementations there from `DefaultSentenceBuilder`, and then get rid of `DefaultSentenceBuilder` altogether.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating the declarations of DefaultSentenceBuilder and SentenceBuilder and reviewing how SentenceBuilder.Factory is used. Compare the proposed inheritance approach with moving default implementations into SentenceBuilder, then establish which customization behavior should be supported and how it would be validated.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100