| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Simplify some variable declarations, fix up some uber long lines, etc.
& some misc cleanup. Implementing IDisposable allows us to put the Ping() instances used everywhere into a single field and dispose it whenever the command is.
Kinda in the name aight?
There was a problem hiding this comment.
Rain Sallow (/u/ta11ow) (@vexx32) Please move all style changes in 1,2,3 new simple PRs.
Also I think it makes no sense create a workaround with async if we get Core Preview8 soon.
Sorry, something went wrong.
| { Test-Connection $targetName -BufferSize 0 } | Should Not Throw | ||
| { Test-Connection $targetName -BufferSize -1 } | Should -Throw -ErrorId "ParameterArgumentValidationError,Microsoft.PowerShell.Commands.TestConnectionCommand" | ||
| { Test-Connection $targetName -BufferSize 65501 } | Should -Throw -ErrorId "ParameterArgumentValidationError,Microsoft.PowerShell.Commands.TestConnectionCommand" | ||
| { Test-Connection $targetName -BufferSize 0 } | Should -Not Throw |
There was a problem hiding this comment.
| { Test-Connection $targetName -BufferSize 0 } | Should -Not Throw | |
| { Test-Connection $targetName -BufferSize 0 } | Should -Not -Throw |
Sorry, something went wrong.
|
Not sure it even makes sense to split style changes to be honest as this changes / rewrites a heck of a lot that I would cover in a style PR anyway. We're still blocked on preview6 so I'm leaving the temp fix in for now so we can trust test results. When we get preview8 it isn't difficult to switch the pattern back. |
Sorry, something went wrong.
|
Have pity!😭 We have open about 50 PRs... |
Sorry, something went wrong.
|
I know. But is one of these better, or four for the same thing? 😕 If you'd really rather extra style PRs I can probably look to trim some of that out, but in a lot of ways the style changes are kind of tied into the rest of the changes. Let me know what you'd prefer! 😊 |
Sorry, something went wrong.
|
Rain Sallow (/u/ta11ow) (@vexx32) You will spend some time for temporary PRs but save a lot of time of reviewers. |
Sorry, something went wrong.
|
Yeah, I guess that makes sense. I'll look to do a style pass and see how I can split it out from there. Thanks! 💖 |
Sorry, something went wrong.
Bug with native exceptions was fixed in .NET Core 3-preview7 Should be safe to use synchronous ping.
|
Closing this as this has been superceded by #10697 |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
PR Summary
Refactor the Test-Connection cmdlet according to PowerShell/PowerShell-RFC#172
PR Context
Resolves #6768
NOTE: Currently this changes the pattern from Ping.Send() to Ping.SendAsync() with a manual event handler. This is due to a bug that was only recently resolved (see https://github.com/dotnet/corefx/issues/38770#issuecomment-507788270)
We can return to the simpler Ping.Send() pattern once we hit .NET Core 3-preview8 per the comment in that issue. 🙂
TODO:
Additional suggestions:
PR Checklist