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
WebResponseObject.Common merge partials atomic commits #18703
WebResponseObject.Common merge partials atomic commits #18703
Conversation
| } | ||
|
|
||
| private MemoryStream _rawContentStream; | ||
| public MemoryStream RawContentStream { get; protected set; } |
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.
Why the change to protected?
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 followed the same convention as :
public byte[] Content { get; protected set; }and
public string RawContent { get; protected set; }
...ft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/Common/WebResponseObject.Common.cs
Outdated
Show resolved
Hide resolved
...ft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/Common/WebResponseObject.Common.cs
Outdated
Show resolved
Hide resolved
...ft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/Common/WebResponseObject.Common.cs
Outdated
Show resolved
Hide resolved
...ft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/Common/WebResponseObject.Common.cs
Outdated
Show resolved
Hide resolved
...ft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/Common/WebResponseObject.Common.cs
Outdated
Show resolved
Hide resolved
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.
LGTM with two comments.
| { | ||
| get { return (WebResponseHelper.GetStatusDescription(BaseResponse)); } | ||
| } | ||
| [SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")] |
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.
Eh, this rule is not active in the repo today so we can remove the line.
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.
done
| @@ -178,21 +118,23 @@ private void InitializeRawContent(HttpResponseMessage baseResponse) | |||
| this.RawContent = raw.ToString(); | |||
| } | |||
|
|
|||
| private static bool IsPrintable(char c) => char.IsLetterOrDigit(c) || char.IsPunctuation(c) || char.IsSeparator(c) || char.IsSymbol(c) || char.IsWhiteSpace(c); | |||
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.
Oh, too long string. Maybe:
private static bool IsPrintable(char c)
=> char.IsLetterOrDigit(c)
|| char.IsPunctuation(c)
|| char.IsSeparator(c)
|| char.IsSymbol(c)
|| char.IsWhiteSpace(c);
`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.
done
|
This PR has Quantification details
Why proper sizing of changes matters
Optimal pull request sizes drive a better predictable PR flow as they strike a
What can I do to optimize my changes
How to interpret the change counts in git diff output
Was this comment helpful? |
|
This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days. |
|
@CarloToso Thanks! |
|
Handy links: |
PR Summary
Merge partial classes in WebResponseObject.Common, rearrange Properties and Methods in alphabetical order and
RawContentStreamto auto-implemented property.PR Context
Justification: // TODO: Merge Partials
Replaces #18692