-
Notifications
You must be signed in to change notification settings - Fork 596
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
C# Line Delengthening #3776
base: main
Are you sure you want to change the base?
C# Line Delengthening #3776
Conversation
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.
Added some comments, didn't check all tests.
Sometimes > 120 lines is ok, but the reasons you list are not good ones. The reason to go over 120 lines are:
|
18cfce1
to
bd2cf24
Compare
protected sealed override void QueueTask( | ||
System.Threading.Tasks.Task task) => execute( | ||
() => TryExecuteTask(task), | ||
null); |
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.
Can we add a using for System.Threading.Tasks
and then write
protected sealed override void QueueTask(Task task) =>
execute(() => TryExecuteTask(task), null);
?
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.
I believe it's already auto-used.
|
||
public void add( | ||
string name, | ||
System.Reflection.MethodInfo method, |
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.
I think adding a using for System.Reflection
would be clear to shorten these names, unless it causes a conflict.
@@ -444,7 +448,8 @@ internal static void doListen(Socket socket, int backlog) | |||
} | |||
} | |||
|
|||
internal static int getProtocolSupport(IPAddress addr) => addr.AddressFamily == AddressFamily.InterNetwork ? EnableIPv4 : EnableIPv6; | |||
internal static int getProtocolSupport(IPAddress addr) => | |||
addr.AddressFamily == AddressFamily.InterNetwork ? EnableIPv4 : EnableIPv6; |
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.
This one is good!
protected sealed override void QueueTask( | ||
System.Threading.Tasks.Task task) => execute( | ||
() => TryExecuteTask(task), | ||
null); |
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.
I believe it's already auto-used.
Co-authored-by: Jose <pepone@users.noreply.github.com>
I cannot for the life of me remember why I broke the lines after the return types instead of the lambdas.
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.
Looks good.
string name, | ||
System.Reflection.MethodInfo method, | ||
System.Reflection.PropertyInfo property) => | ||
_attributes.Add(name, new MemberPropertyResolverI(name, method, property)); |
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.
No need to indent _attributes
here.
_attributes.Add(name, new MemberPropertyResolverI(name, method, property)); | |
_attributes.Add(name, new MemberPropertyResolverI(name, method, property)); |
Breaks up lines into more lines because they were all unsightly (and too long for readability!)
Not all lines are broken up. Some I was uncertain about - see here. Others, I made the decision to not break them up for readability's sake. These are <5 characters over the limit (but most often just one) , and the characters that are over the limit are typically of the
)
or;
varieties. I can go back and list these, however, they will likely be listed with the ones I was uncertain regarding a fix.