Commit graph

135 commits

Author SHA1 Message Date
PowerShell Team 22d2273ce4 Refactoring - use ?? in more places 2016-08-03 12:14:28 -07:00
PowerShell Team 85d6e9f022 Refactoring - adjust modifiers declaration order 2016-08-03 12:14:28 -07:00
PowerShell Team ae8d2ed794 Refactor - convert to auto-property
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.
2016-08-03 12:14:28 -07:00
PowerShell Team bc4901bd59 Remove unused using statements 2016-08-03 12:06:06 -07:00
Alex Jordan e2846379b8 Fixing default and error colors for PSReadLine 2016-08-02 00:16:54 -07:00
PowerShell Team 403ae3f53f Initial run of code formatter
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.
2016-08-01 15:57:03 -07:00
Sergei Vorobev 6626720e44 Introduce Microsoft.PowerShell.SDK
- introduce SDK project with our dependencies and CoreCLR framework
  for runtime.
- Move dependencies for Full from ConsoleHost to powershell-win-full
- make powershell-win-full Top-level project
- Change build.psm1 to do publish for -FullCLR build
- Update docs
2016-07-26 16:48:57 -07:00
Andrew Schwartzmeyer bcfe498ef4 Guard ProgressPane for pseudo-TTYs
Again due to the fact that relying on Console.IsOutputRedirected (as
System.Console does for these APIs) causes bugs when pseudo-TTYs are
used (since the output is not redirected, but the APIs nonetheless can't
be used properly). So we ran into a problem where the value of CursorTop
and Console.BufferHeight were lies, and so we accidentally attempted to
set it numbers below zero. Guard everything.
2016-07-24 17:13:39 -07:00
Sergei Vorobev 3674bacfa8 Copy pwrshplugin into the Full CLR version artifacts 2016-07-22 16:11:37 -07:00
Sergei Vorobev 875402ad53 Create separate Top-level directory per platform
- Replace src\powershell top level project by two
  new root-level projects:
    - src\powershell-unix
    - src\powershell-windows
- Break src\Modules into more granular structure:
  - Shared
  - Windows+Unix-Core
  - Windows-Core
  - Windows-Core+Full
  - Windows-Full
  - To be created: Unix-Core. We will do it as a separate PR
- Fix #1122 : Platform-specific set of Modules (and assemblies)
- Fix Start-TypeGen to work with new top level folders layout
2016-07-22 16:11:29 -07:00
Jason Shirk (POWERSHELL) 673dd2c355 Change preprocessor macro LINUX to UNIX 2016-07-22 10:49:45 -07:00
Alex Jordan 17b4bb354c Changing description of SetBufferContents function 2016-07-19 21:09:54 -07:00
Alex Jordan d9ac6d6401 Implementing Write-Progress using SetBufferContents 2016-07-19 21:07:06 -07:00
Andrew Schwartzmeyer 0f04de1e96 Fix some documentation warnings
Mostly low-hanging fruit and Linux additions/changes.
2016-07-18 19:08:28 -07:00
Andrew Schwartzmeyer 790a07222e Disable some XML documentation warnings
Some projects have more warnings than I can fix.
2016-07-18 19:07:32 -07:00
Andrew Schwartzmeyer b6f26ad7cc Enable XML documentation generation
This is enabled for PowerShell projects, but not PackageManagment,
WSMan, Cim, or MMI.
2016-07-18 18:40:42 -07:00
Sergei Vorobev 736eaade3c Add CimCmdlets module in the produced package of core modules 2016-07-15 13:25:38 -07:00
Andrew Schwartzmeyer 64a5cae4cb Remove char k 2016-07-08 16:46:26 -07:00
Andrew Schwartzmeyer 152b106375 Use Control-F/B for Right/Left arrow 2016-07-08 16:19:05 -07:00
Andrew Schwartzmeyer 7ae448f0b1 Blacklist control characters rather than whitelist 2016-07-08 16:17:32 -07:00
Andrew Schwartzmeyer 85aa47b489 Use Control-D for delete 2016-07-08 16:16:35 -07:00
Andrew Schwartzmeyer 5dd5aaf007 ReadLineFromConsole improvements
Also more guarding in ReadLineSafe
2016-07-08 13:48:51 -07:00
Andrew Schwartzmeyer 68875f0942 Handle Ctrl-C while prompting 2016-07-08 13:48:51 -07:00
Andrew Schwartzmeyer 3572367c00 Implement ReadLineFromConsole for Linux 2016-07-08 13:48:51 -07:00
Andrew Schwartzmeyer 53a3b760cd Remove ReadLineSafe from known issues 2016-07-08 13:48:51 -07:00
Andrew Schwartzmeyer 50e31e68bb Implement ReadLineSafe for Linux
This uses System.Console instead of ConsoleControl to read keys into a
SecureString in a portable manner. The Windows implementation is left
untouched.
2016-07-08 13:48:51 -07:00
Dongbo Wang 15fbd76df8 Exclude the unneeded gen/*.cs files from the build for each target framework 2016-07-07 09:32:21 -07:00
Dongbo Wang b4641986a2 Update project.json files to exclude certain .resx files for each target framework 2016-07-06 13:04:31 -07:00
Dongbo Wang b4089414de Add back missing files to OPS -- map.json/project.json udpates 2016-07-05 16:18:24 -07:00
Jason Shirk (POWERSHELL) efc83bbaa2 Add csproj files and sln for editing but not building 2016-07-05 10:27:41 -07:00
Jason Shirk 9a6655c147 Merge pull request #1246 from PowerShell/andschwa/guard-rawui
Guard RawUI when TTY is non-existent
2016-07-01 17:20:03 -07:00
Andrew Schwartzmeyer f70c0c51c2 Use ConsoleControl on Windows 2016-07-01 17:01:07 -07:00
Andrew Schwartzmeyer c1168e1a24 Note that CursorSize throws on Windows when output is redirected 2016-07-01 16:46:44 -07:00
Andrew Schwartzmeyer 75777b42ee Check that switchKey isn't empty 2016-07-01 14:36:15 -07:00
Andrew Schwartzmeyer e3fd809d42 Normalize slashes in path given to --file
Since we don't yet have a canonical way to normalize paths, here is yet
another use of String.Replace (and this is how it happens).
2016-07-01 14:36:15 -07:00
Andrew Schwartzmeyer 290cc2c2de Implement FlushInputBuffer 2016-07-01 14:36:15 -07:00
Andrew Schwartzmeyer 80486044d8 Guard use of throwable APIs in System.Console
This is reconciled with the .NET Core 1.0 Unix ConsolePal
implementation, with additional error handling for when System.Console
returns unusable values.
2016-07-01 14:36:15 -07:00
Sergei Vorobev 1a98407ee2 Fix Pester call for FullCLR from appveyor.yml 2016-07-01 13:16:52 -07:00
Sergei Vorobev afbf9dd2e1 Update project.json files to take Modules only from src/Modules 2016-07-01 12:20:48 -07:00
Sergei Vorobev e4e3206621 Move modules for Full in Module/Full 2016-07-01 12:20:48 -07:00
Sergei Vorobev 916d17e958 Fix Microsoft.PowerShell.ConsoleHost/map.json 2016-07-01 12:20:48 -07:00
Sergei Vorobev c1d1b52869 Exclude map.json files from copyToOutput and publishOptions 2016-07-01 12:20:48 -07:00
Andrew Schwartzmeyer e08c216c07 Downgrade Newtonsoft.Json package to 7.0.1
This is the same as on Nano.
2016-06-29 14:05:09 -07:00
PowerShell Team 85f53d3d0b Copy PSWorkflow files from [SD:717473]
commit 559488db3
2016-06-28 15:53:19 -07:00
Sergei Vorobev a640f69dd5 Add PSWorkflow files into map.json 2016-06-28 15:48:59 -07:00
Sergei Vorobev 5f5cd74f37 Move map.json for Microsoft.PowerShell.ConsoleHost\Modules in subfolder 2016-06-28 15:44:01 -07:00
Andrew Schwartzmeyer 000206ac90 Bump framework to netstandard1.6
This is required to use the new .NET Core RTM packages, specifically the
`IEnumerable Append` API.
2016-06-27 15:30:47 -07:00
Andrew Schwartzmeyer 10ea1733e9 Update to .NET Core 1.0 packages 2016-06-27 15:30:47 -07:00
Sergei Vorobev 7498c20aa3 build.psm1 changes for Activities dlls
- Add Start-PSBuild -Clean
- Normalize $env:PATH references in .\build.psm1
- Add more logging in Resolve-Xaml for troubleshooting
- Always use msbuild from the Microsoft.NET v4.0.30319
- Rename Resolve-Xaml into Start-XamlGen for consistency with Start-TypeGen and Start-ResGen
- Disable pwrshplugin build temporarely
2016-06-24 15:45:31 -07:00
Sergei Vorobev f81b5a5f6e Add *.Activities dlls in Full build
- Add activities as a dependency to ConsoleHost
- This creates a minor ambiguity in the type resolution in ConsoleHost.
  We are specifying a namespace name to workaround it.
2016-06-24 15:45:31 -07:00