C# Line Delengthening#3776
Conversation
pepone
left a comment
There was a problem hiding this comment.
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.
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.
I believe it's already auto-used.
|
|
||
| public void add( | ||
| string name, | ||
| System.Reflection.MethodInfo method, |
There was a problem hiding this comment.
I think adding a using for System.Reflection would be clear to shorten these names, unless it causes a conflict.
|
|
||
| internal static int getProtocolSupport(IPAddress addr) => addr.AddressFamily == AddressFamily.InterNetwork ? EnableIPv4 : EnableIPv6; | ||
| internal static int getProtocolSupport(IPAddress addr) => | ||
| addr.AddressFamily == AddressFamily.InterNetwork ? EnableIPv4 : EnableIPv6; |
| protected sealed override void QueueTask( | ||
| System.Threading.Tasks.Task task) => execute( | ||
| () => TryExecuteTask(task), | ||
| null); |
There was a problem hiding this comment.
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.
|
|
||
| public ISubMapCloneFactory createCloneFactory(string subMapPrefix, Ice.Properties properties) => new SubMapCloneFactory<S>(new MetricsMap<S>(subMapPrefix, properties, null), _field); | ||
| public ISubMapCloneFactory createCloneFactory( | ||
| string subMapPrefix, |
There was a problem hiding this comment.
(minor) The params don't fit line 90?
Co-authored-by: Jose <pepone@users.noreply.github.com>
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.