Skip to content

Making argument internal to option - #1148

Merged
jonsequitur merged 4 commits into
dotnet:mainfrom
Keboo:fix1128
Feb 16, 2021
Merged

jonsequitur merged 4 commits into
dotnet:mainfrom
Keboo:fix1128

Conversation

@Keboo

@Keboo Keboo commented Dec 24, 2020

Copy link
Copy Markdown
Member

Still need to review new public API of option after this change.
Looking for feedback on new properties and constructors.

Fixes: #1128

string? description = null,
Type? argumentType = null,
Func<object?>? getDefaultValue = null,
IArgumentArity? arity = null)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this parameter be called argumentArity? It's more aligned with e.g. argumentType.

Or should we go the other way and remove the term "argument" from the public interface of Option? Is it confusing?

@Keboo Keboo changed the title WIP making argument internal to option Making argument internal to option Jan 22, 2021

options.Should()
.NotContain(o => o.Argument.ArgumentType == type);
.NotContain(o => o.ArgumentType == type);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if ValueType would be a better name for this property. That would match the IValueDescriptor interface, for what it's worth.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Consider making Option.Argument an internal implementation detail

2 participants