Some clean-up refactorings for UsedAssemblyReferences feature:#41268
Conversation
AlekseyTs
commented
Jan 28, 2020
- Update license comments
- Refactorings to address previous PR feedback and prototype comments
- Update license comments - Refactorings to address previous PR feedback and prototype comments
| internal CSDiagnosticInfo Add(ErrorCode code, Location location) | ||
| { | ||
| var info = new CSDiagnosticInfo(code); | ||
| DiagnosticBag?.Add(new CSDiagnostic(info, location)); |
There was a problem hiding this comment.
DiagnosticBag?.Add(new CSDiagnostic(info, location)) [](start = 12, length = 52)
Consider replacing with Add(info, location) here and in the two methods below. #Resolved
|
|
||
| Friend Overloads Function Add(code As ERRID, location As Location) As DiagnosticInfo | ||
| Dim info = ErrorFactory.ErrorInfo(code) | ||
| DiagnosticBag?.Add(New VBDiagnostic(info, location)) |
There was a problem hiding this comment.
DiagnosticBag?.Add(New VBDiagnostic(info, location)) [](start = 12, length = 52)
Consider using Add(info, location) here and method below. #Resolved
| { | ||
| Diagnostics = diagnostics.NullToEmpty(); | ||
| Dependencies = dependencies.NullToEmpty(); | ||
| _diagnostics = diagnostics.NullToEmpty(); |
There was a problem hiding this comment.
.NullToEmpty() [](start = 38, length = 14)
nit: Do we need the .NullToEmpty() here, since already done when returning from properties above? #Resolved
There was a problem hiding this comment.
Do we need the .NullToEmpty() here, since already done when returning from properties above?
I don't think it hurts.
In reply to: 372085003 [](ancestors = 372085003)