-
Notifications
You must be signed in to change notification settings - Fork 71
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
Made the port optional #239
Conversation
Quality Gate passedIssues Measures |
✅ Build minestat 1.0.0.465 completed (commit 72fbbfe077 by @smellilac) |
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.
Thank you for the contribution, @smellilac. Aside from my review questions, the only other issue I see is with indentation. Our code style uses 2 spaces.
I am also including @Ajoro to see if he has any additional suggestions.
#elif NET46 | ||
using ARSoft.Tools.Net; | ||
using ARSoft.Tools.Net.Dns; | ||
#endif |
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.
Would we want to handle all other cases with an #else
here?
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 don't see how #else
can be used logically here. The only thing that comes to mind is a construction like this:
#else
#error This target framework is not supported by this code. Please ensure the target is .NET Standard 2.0 or greater, or .NET Framework 4.6 or greater.
var srvRecord = srvRecords.First(); | ||
return (ushort)srvRecord.Port; | ||
} | ||
#endif |
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.
Are there any conditions that should be covered under an #else
?
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.
In this case I would not use #else
, as I already suggested adding it above. That way, if the wrong framework is used. The compiler will not even get to this code.
Closing due to lack of response from author. |
Fixes #238