Skip to content

Conversation

@iSazonov
Copy link
Collaborator

Fix #3367

@iSazonov iSazonov added the Review - Needed The PR is being reviewed label Mar 24, 2017
{
long totalLength = 0;
byte[] buffer = new byte[StreamHelper.ChunkSize];
ProgressRecord record = new ProgressRecord(StreamHelper.ActivityId, WebCmdletStrings.ReadResponseProgressActivity, StringUtil.Format(WebCmdletStrings.ReadResponseProgressStatus, 0));
Copy link
Member

Choose a reason for hiding this comment

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

StringUtil.Format(WebCmdletStrings.ReadResponseProgressStatus, 0)

This is not necessary here. How about just new ProgressRecord(StreamHelper.ActivityId, WebCmdletStrings.ReadResponseProgressActivity, "statusDescriptionPlaceholder"). Then "statusDescriptionPlaceholder" would be a constant.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, but we cannot use String.Empty - ProgressRecord don't allow. So if we want a const it may be " " (single space). Is it well?
new ProgressRecord(StreamHelper.ActivityId, WebCmdletStrings.ReadResponseProgressActivity, " ")
or
new ProgressRecord(StreamHelper.ActivityId, WebCmdletStrings.ReadResponseProgressActivity, singleSpace) string static singleSpace = " ";

Copy link
Member

Choose a reason for hiding this comment

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

How about just using the string statusDescriptionPlaceholder as the placeholder?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.

@daxian-dbw daxian-dbw self-assigned this Mar 24, 2017
@daxian-dbw daxian-dbw merged commit b212c7a into PowerShell:master Mar 28, 2017
@iSazonov iSazonov deleted the recordprogress branch March 29, 2017 05:55
@iSazonov iSazonov removed the Review - Needed The PR is being reviewed label Mar 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants