* Fixing Invoke-WebRequest InFile parameter
* Adding aliases for Invoke-RestMethod and Invoke-WebRequest
* Adding test cases for Web cmdlets -InFile parameter
* Adding tests for Invoke-WebRequest (iwr) and Invoke-RestMethod (irm) using the cmdlet aliases.
* Remove the extra leading space
Our private implementation of FailFast was likely introduced
when each individual application needed it's own code to
get Watson reports. The CLR takes care of this for us now,
so we don't need our implementation.
Our method CheckForSevereException was also introduced in
the early days of the CLR - the exceptions it was checking
for aren't actually raised the CLR anymore, they just FailFast.
I removed them as there is a tiny bit of overhead (in code size)
and also in the generated code, e.g. dynamic sites called the method.
This exception is no longer used by PowerShell, so it has been removed.
It is a public api, so removing it risks breaking somebody. Nobody has any reason
to catch or throw this exception, so it seems safe to remove, but I decided to
be conservative and keep it for Windows PowerShell. It seems safe enough to remove
in Nano.
Mostly using R# to automatically refactor, with some manual
fixups where it wouldn't work automatically (e.g. xml comments
on fields) or some it seemed to miss.
Some minor code reformatting was also done on properties near
other stuff I was manually inspecting.
I (Jason Shirk) ran https://github.com/dotnet/codeformatter with the default rules, basically:
codeformatter /nocopyright "/c:DEBUG,UNIX,CORECLR" @files.rsp
This caused a few problems building, which were fixed up manually.
Notable changes:
`this.` is removed unless needed to disambiguate.
private instance fields are renamed to have a `_` prefix.
private static fields are renamed to have a `s_` prefix.
I left some projects alone (like PackageManagement) and also left some generated code alone.
The aliases which conflict with Linux native commands were consolidated
and removed with the pre-processor definition `LINUX`. Additionally,
several "conflicts" are purposefully kept and likewise consolidated.
They are kept because Bash itself stomps on the native commands with its
own built-ins, and so we're adopting the same behavior.
The `clear` and `more` aliases are edge cases where the functions they
call are already fixed for Linux, and so we keep these too.
Resolves#567.