-
Notifications
You must be signed in to change notification settings - Fork 401
Move version option out of middleware #1969
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move version option out of middleware #1969
Conversation
@@ -38,7 +38,7 @@ public override ICommandHandler GetCommandHandler() | |||
} | |||
} | |||
|
|||
public override ModelDescriptor Parent => ModelDescriptor.FromType(_handlerMethodInfo.ReflectedType); | |||
public override ModelDescriptor Parent => ModelDescriptor.FromType(_handlerMethodInfo.ReflectedType!); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
though not the change here. I do wonder if we should be using ReflectedType. https://learn.microsoft.com/en-us/dotnet/api/system.runtime.interopservices._methodinfo.reflectedtype?view=netframework-4.8#remarks
3d2caac
to
1969612
Compare
…sign-experiment # Conflicts: # src/System.CommandLine/Builder/CommandLineBuilderExtensions.cs # src/System.CommandLine/Option.cs # src/System.CommandLine/Parsing/ParseResultVisitor.cs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! The allocations have dropped nicely!
Method | Args | before | after |
---|---|---|---|
DefaultsSync | String[0] | 10,584 B | 10,264 B |
DefaultsAsync | String[0] | 10,584 B | 10,264 B |
MinimalSync | String[0] | 3,256 B | 3,264 B |
MinimalAsync | String[0] | 3,256 B | 3,264 B |
DefaultsSync | String[4] | 12,080 B | 11,760 B |
DefaultsAsync | String[4] | 12,080 B | 11,760 B |
MinimalSync | String[4] | 4,752 B | 4,760 B |
MinimalAsync | String[4] | 4,752 B | 4,760 B |
No description provided.