8000 Cleanup & update ErrorRecord class code style by vexx32 · Pull Request #9021 · PowerShell/PowerShell · GitHub
[go: up one dir, main page]

Skip to content

Cleanup & update ErrorRecord class code style#9021

Merged
iSazonov merged 4 commits intoPowerShell:masterfrom
vexx32:Style/ErrorRecord
Mar 6, 2019
Merged

Cleanup & update ErrorRecord class code style#9021
iSazonov merged 4 commits intoPowerShell:masterfrom
vexx32:Style/ErrorRecord

Conversation

@vexx32
Copy link
Collaborator
@vexx32 vexx32 commented Mar 1, 2019

PR Summary

Cleanup and update ErrorRecord class code style & improve consistency of style across the class.

There are no functional changes to this PR; everything is purely code-style-related. Some private properties were ditched entirely, being easily replaced with simple auto-properties (i.e., they just had a straightforward get/set anyway, and the extra code was adding complexity and nothing else).

PR Context

After speaking with @SteveL-MSFT on Twitter, I intend to implement a Suggestion property to ErrorRecord to replace the current Suggestions system.

Before that, I would like to clean up the ErrorRecord class first.

PR Checklist

@@ -1071,13 +1074,7 @@ public virtual void GetObjectData(SerializationInfo info, StreamingContext conte
/// Is this instance serialized.
/// </summary>
/// <value></value>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the tag mandatory? Can we remove it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's just automatically added by VS when adding comment XML. I'll remove it. :)

@vexx32 vexx32 changed the title ♻️ Cleanup & update ErrorRecord class code style Cleanup & update ErrorRecord class code style Mar 4, 2019
@vexx32
Copy link
Collaborator Author
vexx32 commented Mar 4, 2019

@iSazonov there were a few instances where we could use nameof() and a few of the empty <value></value> XML tags, so I fixed them all. 🙂

@iSazonov iSazonov added the CL-CodeCleanup Indicates that a PR should be marked as a Code Cleanup change in the Change Log label Mar 4, 2019
@iSazonov iSazonov self-assigned this Mar 6, 2019
@iSazonov iSazonov merged commit cd4b194 into PowerShell:master Mar 6, 2019
@vexx32 vexx32 deleted the Style/ErrorRecord branch March 6, 2019 04:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-CodeCleanup Indicates that a PR should be marked as a Code Cleanup change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

0