Merge branch 'master' of https://github.com/PowerShell/PowerShell into PesterTest_Temp

This commit is contained in:
TingLiu6
2016-03-24 19:50:03 -07:00
45 changed files with 3023 additions and 18151 deletions
+8 -1
View File
@@ -84,8 +84,15 @@ function Start-PSBuild
{
# cmake is needed to build powershell.exe
$precheck = $precheck -and (precheck 'cmake' 'cmake not found. You can install it from https://chocolatey.org/packages/cmake.portable')
# msbuild is needed to build powershell.exe
$precheck = $precheck -and (precheck 'msbuild' 'msbuild not found. Install Visual Studio and add msbuild to $env:PATH')
# msbuild is part of .NET Framework, we can try to get it from well-known location.
if (-not (Get-Command -Name msbuild -ErrorAction Ignore))
{
$env:path += ";${env:SystemRoot}\Microsoft.Net\Framework\v4.0.30319"
}
$precheck = $precheck -and (precheck 'msbuild' 'msbuild not found. Install Visual Studio 2015.')
}
if (-not $precheck) { return }
+3 -8
View File
@@ -60,7 +60,7 @@ their [documentation][cli-docs].
The version of .NET CLI is very important, you want a recent 1.0.0 beta
(**not** 1.0.1). The following instructions will install precisely
1.0.0.001718, though any 1.0.0 version *should* work.
1.0.0.001888, though any 1.0.0 version *should* work.
> Previous installations of DNX, `dnvm`, or older installations of .NET CLI
> can cause odd failures when running. Please check your version.
@@ -109,7 +109,8 @@ Tested on Windows 10 and Windows Server 2012 R2.
```powershell
Invoke-WebRequest -Uri https://raw.githubusercontent.com/dotnet/cli/rel/1.0.0/scripts/obtain/install.ps1 -OutFile install.ps1
./install.ps1 -version 1.0.0.001718 -channel beta
./install.ps1 -version 1.0.0.001888
$env:Path += ";$env:LocalAppData\Microsoft\dotnet\cli
```
If you meet `Unable to cast COM object of type 'System.__ComObject' to
@@ -359,12 +360,6 @@ If you don't have any Visual Studio installed, you can use
`C` and `CXX` compilers, you either don't have Visual Studio, or you
don't have the Visual C++ Compiler component installed.
* Add `msbuild` to `PATH`, or create a PowerShell alias to it.
```powershell
Set-Alias msbuild C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe
```
* Install CMake and add it to `PATH.`
You can install it from [Chocolatey][] or [manually][].
+2 -2
View File
@@ -22,11 +22,11 @@ install:
- git config --global url.git@github.com:.insteadOf https://github.com/
- git submodule update --init --recursive -- src/monad src/windows-build src/Microsoft.PowerShell.Linux.Host/Modules/Pester
- ps: Invoke-WebRequest -Uri https://raw.githubusercontent.com/dotnet/cli/rel/1.0.0/scripts/obtain/install.ps1 -OutFile install.ps1
- ps: ./install.ps1 -version 1.0.0.001718 -channel beta
- ps: ./install.ps1 -version 1.0.0.001888
build_script:
- ps: |
$env:Path += ";$env:LocalAppData\Microsoft\dotnet\cli\bin"
$env:Path += ";$env:LocalAppData\Microsoft\dotnet\cli"
dotnet --version
Import-Module .\PowerShellGitHubDev.psm1
Start-PSBuild
@@ -11,7 +11,7 @@
"warningsAsErrors": true
},
"dependencies": {
"NETStandard.Library": "1.5.0-rc2-23911",
"NETStandard.Library": "1.5.0-rc2-23922",
"System.Security.SecureString": "1.0.0-*"
}
},
@@ -19,8 +19,8 @@
"define": [ "_CORECLR" ]
},
"dependencies": {
"System.Runtime.Serialization.Xml": "4.1.1-rc3-23914",
"System.Threading.ThreadPool": "4.0.10-rc3-23914"
"System.Runtime.Serialization.Xml": "4.1.1-rc2-23922",
"System.Threading.ThreadPool": "4.0.10-rc2-23922"
}
},
"net451": {
@@ -19,8 +19,8 @@
"define": [ "CORECLR" ]
},
"dependencies": {
"System.ServiceProcess.ServiceController": "4.1.0-rc3-23914",
"System.Net.NameResolution": "4.0.0-rc3-23914"
"System.ServiceProcess.ServiceController": "4.1.0-rc2-23922",
"System.Net.NameResolution": "4.0.0-rc2-23922"
}
},
"net451": {
@@ -125,214 +125,6 @@
"../monad/monad/src/commands/utility/ShowCommand/ShowCommandProxy.cs",
"../monad/monad/src/commands/utility/sort-object.cs",
"../monad/monad/src/commands/utility/StartSleepCommand.cs",
"../monad/monad/src/commands/utility/StringManipulation/Cmdlets/ConvertFromStringCommand.cs",
"../monad/monad/src/commands/utility/StringManipulation/Cmdlets/ConvertStringCommand.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashExtract.Shared/ExtractionProgram.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashExtract.Shared/Regions.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashExtract.Shared/SchemaParser/BotSchemaElement.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashExtract.Shared/SchemaParser/ConvertSchemaElement.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashExtract.Shared/SchemaParser/FieldSchemaElement.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashExtract.Shared/SchemaParser/SchemaElement.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashExtract.Shared/SchemaParser/SchemaGrammar.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashExtract.Shared/SchemaParser/SchemaVisitor.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashExtract.Shared/SchemaParser/SequenceSchemaElement.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashExtract.Shared/SchemaParser/StructSchemaElement.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashExtract.Shared/SchemaParser/TreeElement.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashExtract.Shared/SchemaParser/UnionSchemaElement.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashExtract.Shared/SchemaProgram.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashExtract.Shared/SchemaProgramLearner.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashExtract.Shared/Specifications.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashExtractText.Semantics/BooleanWitnesses.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashExtractText.Semantics/GlobalSuppressions.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashExtractText.Semantics/PositionWitnesses.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashExtractText.Semantics/RankingScore.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashExtractText.Semantics/RegularExpressions.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashExtractText.Semantics/Semantics.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashExtractText.Semantics/StringRegion.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashExtractText.Semantics/SubstringWitnesses.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashExtractText.Semantics/SynthesisContext.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashExtractText.Semantics/Witnesses.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashExtractText/FlashExtractFieldProgram.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashExtractText/FlashExtractProgramLearner.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashExtractText/Grammar.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashExtractWrapper/FlashExtract/ExtractResults.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashExtractWrapper/FlashExtract/FlashExtractCache.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashExtractWrapper/FlashExtract/FlashExtractDriver.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashExtractWrapper/FlashExtract/ProgramNotFoundException.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashExtractWrapper/FlashExtract/ResultNotFoundException.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashExtractWrapper/FlashExtractInternalException.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashExtractWrapper/Property.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashExtractWrapper/PropertyTree.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashExtractWrapper/Span.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashExtractWrapper/SpanTree.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashExtractWrapper/StringUtil.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashExtractWrapper/StringUtilities.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashExtractWrapper/TemplateParsing/ParserResults.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashExtractWrapper/TemplateParsing/ParserSpan.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashExtractWrapper/TemplateParsing/ParserState.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashExtractWrapper/TemplateParsing/TemplateParser.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashExtractWrapper/TemplateParsing/TemplateParsingException.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashExtractWrapper/TemplateParsing/TemplateReader.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashFill.Semantics/RankingScore.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashFill.Semantics/Semantics.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashFill.Semantics/Witnesses.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashFill/FlashfillProgram.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashFill/Grammar.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Core/AST/CustomBehaviorHole.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Core/AST/EvaluationFinishedEventArgs.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Core/AST/Hole.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Core/AST/LambdaNode.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Core/AST/LetNode.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Core/AST/LiteralNode.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Core/AST/NonterminalNode.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Core/AST/Parser/ASTParserVisitor.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Core/AST/ProgramNode.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Core/AST/ProgramNodeExtensions.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Core/AST/ProgramNodeOrigin.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Core/AST/ProgramNodeVisitor.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Core/AST/TerminalNode.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Core/AST/VariableNode.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Core/AST/Visitors/HumanReadablePrintVisitor.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Core/AST/Visitors/XmlPrintVisitor.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Core/BindingManager.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Core/Diagnostics/AllDiagnostics.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Core/Diagnostics/Diagnostic.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Core/Diagnostics/Location.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Core/Diagnostics/Result.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Core/FeatureInfo.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Core/Grammar.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Core/IRenderableLiteral.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Core/LoadingContext.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Core/Rules/BlackBoxRule.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Core/Rules/BlackBoxRule_Semantics.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Core/Rules/Concepts/ConceptRule.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Core/Rules/Concepts/Conjunct.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Core/Rules/Concepts/Disjunct.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Core/Rules/Concepts/Filter.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Core/Rules/Concepts/FilterInt.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Core/Rules/Concepts/First.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Core/Rules/Concepts/FrontierConceptRule.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Core/Rules/Concepts/IfRule.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Core/Rules/Concepts/Kth.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Core/Rules/Concepts/Map.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Core/Rules/Concepts/Pair.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Core/Rules/Concepts/Windowed.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Core/Rules/ConversionRule.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Core/Rules/FunctionalSymbol.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Core/Rules/GrammarRule.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Core/Rules/LambdaRule.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Core/Rules/LetRule.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Core/Rules/NonterminalRule.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Core/Rules/TerminalRule.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Core/Specifications/DisjunctiveExamplesSpecification.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Core/Specifications/ExamplesSpecification.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Core/Specifications/FunctionalOutputNonEmptySpecification.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Core/Specifications/FunctionalOutputSpecification.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Core/Specifications/InductiveSpecification.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Core/Specifications/OutputNonEmptySpecification.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Core/Specifications/PrefixSpecification.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Core/Specifications/Specification.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Core/Specifications/SubsequenceSpecification.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Core/Specifications/TopSpecification.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Core/State.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Core/Symbol.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Core/Synthesis/StdGenerators.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Core/Synthesis/WitnessFunction.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Core/Synthesis/WitnessFunctionAttribute.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Core/VersionSpace/DirectProgramSet.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Core/VersionSpace/JoinProgramSet.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Core/VersionSpace/ProgramSet.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Core/VersionSpace/ProgramSetExtensions.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Core/VersionSpace/UnionProgramSet.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Utils/Bottom.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Utils/CollectionUtils.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Utils/CSharpUtils.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Utils/FuncEqualityComparer.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Utils/GraphUtils.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Utils/IdentityEquality.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Utils/JsonUtils.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Utils/KeyValueComparer.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Utils/MathUtils.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Utils/MethodReference.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Utils/MethodUtils.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Utils/MoreSpecificTypeComparer.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Utils/MultiValueDictionary.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Utils/ObjectArrayEquality.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Utils/ObjectUtils.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Utils/Optional.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Utils/OptionalUtils.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Utils/RegexValueEquality.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Utils/StringUtils.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Utils/TupleUtils.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Utils/ValueEquality.cs",
"../monad/monad/src/commands/utility/StringManipulation/FlashMeta.Utils/XmlUtils.cs",
"../monad/monad/src/commands/utility/StringManipulation/Immutable/System/Collections/Generic/IHashKeyCollection.cs",
"../monad/monad/src/commands/utility/StringManipulation/Immutable/System/Collections/Generic/ISortKeyCollection.cs",
"../monad/monad/src/commands/utility/StringManipulation/Immutable/System/Collections/Immutable/AllocFreeConcurrentStack.cs",
"../monad/monad/src/commands/utility/StringManipulation/Immutable/System/Collections/Immutable/DictionaryEnumerator.cs",
"../monad/monad/src/commands/utility/StringManipulation/Immutable/System/Collections/Immutable/DisposableEnumeratorAdapter`2.cs",
"../monad/monad/src/commands/utility/StringManipulation/Immutable/System/Collections/Immutable/IBinaryTree.cs",
"../monad/monad/src/commands/utility/StringManipulation/Immutable/System/Collections/Immutable/IImmutableArray.cs",
"../monad/monad/src/commands/utility/StringManipulation/Immutable/System/Collections/Immutable/IImmutableDictionary.cs",
"../monad/monad/src/commands/utility/StringManipulation/Immutable/System/Collections/Immutable/IImmutableDictionaryInternal.cs",
"../monad/monad/src/commands/utility/StringManipulation/Immutable/System/Collections/Immutable/IImmutableList.cs",
"../monad/monad/src/commands/utility/StringManipulation/Immutable/System/Collections/Immutable/IImmutableListQueries.cs",
"../monad/monad/src/commands/utility/StringManipulation/Immutable/System/Collections/Immutable/IImmutableQueue.cs",
"../monad/monad/src/commands/utility/StringManipulation/Immutable/System/Collections/Immutable/IImmutableStack.cs",
"../monad/monad/src/commands/utility/StringManipulation/Immutable/System/Collections/Immutable/ImmutableArray.cs",
"../monad/monad/src/commands/utility/StringManipulation/Immutable/System/Collections/Immutable/ImmutableArray`1+Builder.cs",
"../monad/monad/src/commands/utility/StringManipulation/Immutable/System/Collections/Immutable/ImmutableArray`1+Enumerator.cs",
"../monad/monad/src/commands/utility/StringManipulation/Immutable/System/Collections/Immutable/ImmutableArray`1.cs",
"../monad/monad/src/commands/utility/StringManipulation/Immutable/System/Collections/Immutable/ImmutableDictionary.cs",
"../monad/monad/src/commands/utility/StringManipulation/Immutable/System/Collections/Immutable/ImmutableDictionary`2+Builder.cs",
"../monad/monad/src/commands/utility/StringManipulation/Immutable/System/Collections/Immutable/ImmutableDictionary`2+Comparers.cs",
"../monad/monad/src/commands/utility/StringManipulation/Immutable/System/Collections/Immutable/ImmutableDictionary`2+DebuggerProxy.cs",
"../monad/monad/src/commands/utility/StringManipulation/Immutable/System/Collections/Immutable/ImmutableDictionary`2+Enumerator.cs",
"../monad/monad/src/commands/utility/StringManipulation/Immutable/System/Collections/Immutable/ImmutableDictionary`2+HashBucket.cs",
"../monad/monad/src/commands/utility/StringManipulation/Immutable/System/Collections/Immutable/ImmutableDictionary`2+MutationInput.cs",
"../monad/monad/src/commands/utility/StringManipulation/Immutable/System/Collections/Immutable/ImmutableDictionary`2+MutationResult.cs",
"../monad/monad/src/commands/utility/StringManipulation/Immutable/System/Collections/Immutable/ImmutableDictionary`2.cs",
"../monad/monad/src/commands/utility/StringManipulation/Immutable/System/Collections/Immutable/ImmutableExtensions.cs",
"../monad/monad/src/commands/utility/StringManipulation/Immutable/System/Collections/Immutable/ImmutableList.cs",
"../monad/monad/src/commands/utility/StringManipulation/Immutable/System/Collections/Immutable/ImmutableList`1+Builder.cs",
"../monad/monad/src/commands/utility/StringManipulation/Immutable/System/Collections/Immutable/ImmutableList`1.cs",
"../monad/monad/src/commands/utility/StringManipulation/Immutable/System/Collections/Immutable/ImmutableQueue`1.cs",
"../monad/monad/src/commands/utility/StringManipulation/Immutable/System/Collections/Immutable/ImmutableSortedDictionary`2+Builder.cs",
"../monad/monad/src/commands/utility/StringManipulation/Immutable/System/Collections/Immutable/ImmutableSortedDictionary`2.cs",
"../monad/monad/src/commands/utility/StringManipulation/Immutable/System/Collections/Immutable/ImmutableStack.cs",
"../monad/monad/src/commands/utility/StringManipulation/Immutable/System/Collections/Immutable/ImmutableStack`1.cs",
"../monad/monad/src/commands/utility/StringManipulation/Immutable/System/Collections/Immutable/IOrderedCollection.cs",
"../monad/monad/src/commands/utility/StringManipulation/Immutable/System/Collections/Immutable/IStrongEnumerable`2.cs",
"../monad/monad/src/commands/utility/StringManipulation/Immutable/System/Collections/Immutable/IStrongEnumerator`1.cs",
"../monad/monad/src/commands/utility/StringManipulation/Immutable/System/Collections/Immutable/KeysOrValuesCollectionAccessor.cs",
"../monad/monad/src/commands/utility/StringManipulation/Immutable/System/Collections/Immutable/RefAsValueType.cs",
"../monad/monad/src/commands/utility/StringManipulation/Immutable/System/Collections/Immutable/SecureObjectPool.cs",
"../monad/monad/src/commands/utility/StringManipulation/Immutable/System/Collections/Immutable/SortedInt32KeyNode.cs",
"../monad/monad/src/commands/utility/StringManipulation/Immutable/Validation/Requires.cs",
"../monad/monad/src/commands/utility/StringManipulation/Immutable/Validation/ValidatedNotNullAttribute.cs",
"../monad/monad/src/commands/utility/StringManipulation/Synthesis/Interfaces.cs",
"../monad/monad/src/commands/utility/StringManipulation/Synthesis/LearningTask.cs",
"../monad/monad/src/commands/utility/StringManipulation/Synthesis/Strategies/ComponentBasedSynthesis.cs",
"../monad/monad/src/commands/utility/StringManipulation/Synthesis/Strategies/EnumerativeSynthesis.cs",
"../monad/monad/src/commands/utility/StringManipulation/Synthesis/Strategies/StdSynthesisStrategy.cs",
"../monad/monad/src/commands/utility/StringManipulation/Synthesis/Strategies/TopDown/Combiners/FunctionalCombiner.cs",
"../monad/monad/src/commands/utility/StringManipulation/Synthesis/Strategies/TopDown/Combiners/JoinCombiner.cs",
"../monad/monad/src/commands/utility/StringManipulation/Synthesis/Strategies/TopDown/Combiners/VerifyAndJoinCombiner.cs",
"../monad/monad/src/commands/utility/StringManipulation/Synthesis/Strategies/TopDown/Combiners/VersionSpaceCombiner.cs",
"../monad/monad/src/commands/utility/StringManipulation/Synthesis/Strategies/TopDown/IRuleLearner.cs",
"../monad/monad/src/commands/utility/StringManipulation/Synthesis/Strategies/TopDown/StdWitnessTactics/ConversionWitnessTactic.cs",
"../monad/monad/src/commands/utility/StringManipulation/Synthesis/Strategies/TopDown/StdWitnessTactics/FilterIntWitnessTactic.cs",
"../monad/monad/src/commands/utility/StringManipulation/Synthesis/Strategies/TopDown/StdWitnessTactics/FilterWitnessTactic_FlashParse.cs",
"../monad/monad/src/commands/utility/StringManipulation/Synthesis/Strategies/TopDown/StdWitnessTactics/FirstWitnessTactic.cs",
"../monad/monad/src/commands/utility/StringManipulation/Synthesis/Strategies/TopDown/StdWitnessTactics/KthWitnessTactic.cs",
"../monad/monad/src/commands/utility/StringManipulation/Synthesis/Strategies/TopDown/StdWitnessTactics/LiteralWitnessTactic.cs",
"../monad/monad/src/commands/utility/StringManipulation/Synthesis/Strategies/TopDown/StdWitnessTactics/PairWitnessTactic.cs",
"../monad/monad/src/commands/utility/StringManipulation/Synthesis/Strategies/TopDown/StdWitnessTactics/StdWitnessTactic.cs",
"../monad/monad/src/commands/utility/StringManipulation/Synthesis/Strategies/TopDown/StdWitnessTactics/VerifyWitnessTactic.cs",
"../monad/monad/src/commands/utility/StringManipulation/Synthesis/Strategies/TopDown/WitnessTactic.cs",
"../monad/monad/src/commands/utility/StringManipulation/Synthesis/Strategies/TopDownSynthesis.cs",
"../monad/monad/src/commands/utility/StringManipulation/Synthesis/StrategyConfig.cs",
"../monad/monad/src/commands/utility/StringManipulation/Synthesis/SynthesisEngine.cs",
"../monad/monad/src/commands/utility/WebCmdlet/ConvertFromJsonCommand.cs",
"../monad/monad/src/commands/utility/WebCmdlet/ConvertToJsonCommand.cs",
"../monad/monad/src/commands/utility/WebCmdlet/JsonObject.cs",
@@ -20,44 +20,44 @@
},
"compile": [
"../../src/windows-build/gen/CONSOLE_HOST/*.cs"
"../windows-build/gen/CONSOLE_HOST/*.cs"
],
"compileFiles": [
"../../src/monad/monad/src/host/msh/CommandLineParameterParser.cs",
"../../src/monad/monad/src/host/msh/ConsoleControl.cs",
"../../src/monad/monad/src/host/msh/Executor.cs",
"../../src/monad/monad/src/host/msh/ConsoleHost.cs",
"../../src/monad/monad/src/host/msh/ConsoleHostRawUserInterface.cs",
"../../src/monad/monad/src/host/msh/ConsoleHostTranscript.cs",
"../../src/monad/monad/src/host/msh/ConsoleHostUserInterface.cs",
"../../src/monad/monad/src/host/msh/ConsoleHostUserInterfaceProgress.cs",
"../../src/monad/monad/src/host/msh/ConsoleHostUserInterfacePrompt.cs",
"../../src/monad/monad/src/host/msh/ConsoleHostUserInterfacePromptForChoice.cs",
"../../src/monad/monad/src/host/msh/ConsoleHostUserInterfaceSecurity.cs",
"../../src/monad/monad/src/host/msh/ConsoleShell.cs",
"../../src/monad/monad/src/host/msh/ConsoleTextWriter.cs",
"../../src/monad/monad/src/host/msh/ProgressPane.cs",
"../../src/monad/monad/src/host/msh/PendingProgress.cs",
"../../src/monad/monad/src/host/msh/ProgressNode.cs",
"../../src/monad/monad/src/host/msh/Serialization.cs",
"../../src/monad/monad/src/host/msh/StartTranscriptCmdlet.cs",
"../../src/monad/monad/src/host/msh/StopTranscriptCmdlet.cs",
"../../src/monad/monad/src/singleshell/installer/MshHostMshSnapin.cs",
"../../src/monad/monad/src/singleshell/installer/EngineInstaller.cs",
"../../src/monad/monad/src/host/msh/ManagedEntrance.cs"
"../monad/monad/src/host/msh/CommandLineParameterParser.cs",
"../monad/monad/src/host/msh/ConsoleControl.cs",
"../monad/monad/src/host/msh/Executor.cs",
"../monad/monad/src/host/msh/ConsoleHost.cs",
"../monad/monad/src/host/msh/ConsoleHostRawUserInterface.cs",
"../monad/monad/src/host/msh/ConsoleHostTranscript.cs",
"../monad/monad/src/host/msh/ConsoleHostUserInterface.cs",
"../monad/monad/src/host/msh/ConsoleHostUserInterfaceProgress.cs",
"../monad/monad/src/host/msh/ConsoleHostUserInterfacePrompt.cs",
"../monad/monad/src/host/msh/ConsoleHostUserInterfacePromptForChoice.cs",
"../monad/monad/src/host/msh/ConsoleHostUserInterfaceSecurity.cs",
"../monad/monad/src/host/msh/ConsoleShell.cs",
"../monad/monad/src/host/msh/ConsoleTextWriter.cs",
"../monad/monad/src/host/msh/ProgressPane.cs",
"../monad/monad/src/host/msh/PendingProgress.cs",
"../monad/monad/src/host/msh/ProgressNode.cs",
"../monad/monad/src/host/msh/Serialization.cs",
"../monad/monad/src/host/msh/StartTranscriptCmdlet.cs",
"../monad/monad/src/host/msh/StopTranscriptCmdlet.cs",
"../monad/monad/src/singleshell/installer/MshHostMshSnapin.cs",
"../monad/monad/src/singleshell/installer/EngineInstaller.cs",
"../monad/monad/src/host/msh/ManagedEntrance.cs"
],
"namedResource": {
"TranscriptStrings": "../../src/windows-build/gen/CONSOLE_HOST/TranscriptStrings.resources",
"ProgressNodeStrings": "../../src/windows-build/gen/CONSOLE_HOST/ProgressNodeStrings.resources",
"ManagedEntranceStrings": "../../src/windows-build/gen/CONSOLE_HOST/ManagedEntranceStrings.resources",
"HostMshSnapInResources": "../../src/windows-build/gen/CONSOLE_HOST/HostMshSnapInResources.resources",
"ConsoleHostUserInterfaceStrings": "../../src/windows-build/gen/CONSOLE_HOST/ConsoleHostUserInterfaceStrings.resources",
"ConsoleHostUserInterfaceSecurityResources": "../../src/windows-build/gen/CONSOLE_HOST/ConsoleHostUserInterfaceSecurityResources.resources",
"ConsoleHostStrings": "../../src/windows-build/gen/CONSOLE_HOST/ConsoleHostStrings.resources",
"ConsoleHostRawUserInterfaceStrings": "../../src/windows-build/gen/CONSOLE_HOST/ConsoleHostRawUserInterfaceStrings.resources",
"ConsoleControlStrings": "../../src/windows-build/gen/CONSOLE_HOST/ConsoleControlStrings.resources",
"CommandLineParameterParserStrings": "../../src/windows-build/gen/CONSOLE_HOST/CommandLineParameterParserStrings.resources"
"TranscriptStrings": "../windows-build/gen/CONSOLE_HOST/TranscriptStrings.resources",
"ProgressNodeStrings": "../windows-build/gen/CONSOLE_HOST/ProgressNodeStrings.resources",
"ManagedEntranceStrings": "../windows-build/gen/CONSOLE_HOST/ManagedEntranceStrings.resources",
"HostMshSnapInResources": "../windows-build/gen/CONSOLE_HOST/HostMshSnapInResources.resources",
"ConsoleHostUserInterfaceStrings": "../windows-build/gen/CONSOLE_HOST/ConsoleHostUserInterfaceStrings.resources",
"ConsoleHostUserInterfaceSecurityResources": "../windows-build/gen/CONSOLE_HOST/ConsoleHostUserInterfaceSecurityResources.resources",
"ConsoleHostStrings": "../windows-build/gen/CONSOLE_HOST/ConsoleHostStrings.resources",
"ConsoleHostRawUserInterfaceStrings": "../windows-build/gen/CONSOLE_HOST/ConsoleHostRawUserInterfaceStrings.resources",
"ConsoleControlStrings": "../windows-build/gen/CONSOLE_HOST/ConsoleControlStrings.resources",
"CommandLineParameterParserStrings": "../windows-build/gen/CONSOLE_HOST/CommandLineParameterParserStrings.resources"
}
}
File diff suppressed because it is too large Load Diff
@@ -22,8 +22,8 @@
"define": [ "CORECLR" ]
},
"dependencies": {
"NETStandard.Library": "1.5.0-rc2-23911",
"System.Runtime.Loader": "4.0.0-rc3-23914"
"NETStandard.Library": "1.5.0-rc2-23922",
"System.Runtime.Loader": "4.0.0-rc2-23922"
}
}
},
@@ -0,0 +1,5 @@
using System.Runtime.CompilerServices;
using System.Reflection;
[assembly:InternalsVisibleTo("System.Management.Automation")]
[assembly:AssemblyFileVersionAttribute("1.0.0.0")]
[assembly:AssemblyVersion("1.0.0.0")]
@@ -0,0 +1,72 @@
{
"name": "Microsoft.PowerShell.CoreCLR.Eventing",
"version": "1.0.0-*",
"authors": [ "sevoroby" ],
"compilationOptions": {
"warningsAsErrors": true,
"allowUnsafe": true
},
"configurations": {
"Linux": {
"compilationOptions": {
"define": [ "NOETW" ]
}
}
},
"frameworks": {
"netstandard1.5": {
"imports": [ "dnxcore50" ],
"compilationOptions": {
"define": [ "CORECLR" ]
},
"dependencies": {
"System.Security.Principal": "4.0.1-rc2-23922",
"System.Security.Principal.Windows": "4.0.0-rc2-23922",
"System.Diagnostics.TraceSource": "4.0.0-rc2-23922",
"System.Security.SecureString": "1.0.0-*"
}
}
},
"compile": [ "../windows-build/gen/CORECLR_EVENTING/*.cs" ],
"compileFiles": [
"../monad/monad/src/DotNetCode/Eventing/EventDescriptor.cs",
"../monad/monad/src/DotNetCode/Eventing/EventProvider.cs",
"../monad/monad/src/DotNetCode/Eventing/EventProviderTraceListener.cs",
"../monad/monad/src/DotNetCode/Eventing/UnsafeNativeMethods.cs",
"../monad/monad/src/DotNetCode/Eventing/Reader/CoTaskMemSafeHandle.cs",
"../monad/monad/src/DotNetCode/Eventing/Reader/CoTaskMemUnicodeSafeHandle.cs",
"../monad/monad/src/DotNetCode/Eventing/Reader/EventBookmark.cs",
"../monad/monad/src/DotNetCode/Eventing/Reader/EventKeyword.cs",
"../monad/monad/src/DotNetCode/Eventing/Reader/EventLevel.cs",
"../monad/monad/src/DotNetCode/Eventing/Reader/EventLogConfiguration.cs",
"../monad/monad/src/DotNetCode/Eventing/Reader/EventLogException.cs",
"../monad/monad/src/DotNetCode/Eventing/Reader/EventLogHandle.cs",
"../monad/monad/src/DotNetCode/Eventing/Reader/EventLogInformation.cs",
"../monad/monad/src/DotNetCode/Eventing/Reader/EventLogLink.cs",
"../monad/monad/src/DotNetCode/Eventing/Reader/EventLogPropertySelector.cs",
"../monad/monad/src/DotNetCode/Eventing/Reader/EventLogQuery.cs",
"../monad/monad/src/DotNetCode/Eventing/Reader/EventLogReader.cs",
"../monad/monad/src/DotNetCode/Eventing/Reader/EventLogRecord.cs",
"../monad/monad/src/DotNetCode/Eventing/Reader/EventLogSession.cs",
"../monad/monad/src/DotNetCode/Eventing/Reader/EventLogStatus.cs",
"../monad/monad/src/DotNetCode/Eventing/Reader/EventMetadata.cs",
"../monad/monad/src/DotNetCode/Eventing/Reader/EventOpcode.cs",
"../monad/monad/src/DotNetCode/Eventing/Reader/EventProperty.cs",
"../monad/monad/src/DotNetCode/Eventing/Reader/EventPropertyContext.cs",
"../monad/monad/src/DotNetCode/Eventing/Reader/EventRecord.cs",
"../monad/monad/src/DotNetCode/Eventing/Reader/EventTask.cs",
"../monad/monad/src/DotNetCode/Eventing/Reader/NativeWrapper.cs",
"../monad/monad/src/DotNetCode/Eventing/Reader/ProviderMetadata.cs",
"../monad/monad/src/DotNetCode/Eventing/Reader/ProviderMetadataCachedInformation.cs",
"../monad/monad/src/DotNetCode/Eventing/Reader/Winmeta.cs"
],
"namedResource": {
"DotNetEventingStrings": "../windows-build/gen/CORECLR_EVENTING/DotNetEventingStrings.resources"
}
}
@@ -1,289 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- *******************************************************************
These sample files contain formatting information used by the Windows
PowerShell engine. Do not edit or change the contents of this file
directly. Please see the Windows PowerShell documentation or type
Get-Help Update-FormatData for more information.
Copyright (c) Microsoft Corporation. All rights reserved.
THIS SAMPLE CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY
OF ANY KIND,WHETHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
PURPOSE. IF THIS CODE AND INFORMATION IS MODIFIED, THE ENTIRE RISK OF USE
OR RESULTS IN CONNECTION WITH THE USE OF THIS CODE AND INFORMATION
REMAINS WITH THE USER.
******************************************************************** -->
<Configuration>
<SelectionSets>
<SelectionSet>
<Name>CertificateProviderTypes</Name>
<Types>
<TypeName>System.Security.Cryptography.X509Certificates.X509Certificate2</TypeName>
<TypeName>System.Security.Cryptography.X509Certificates.X509Store</TypeName>
<TypeName>Microsoft.PowerShell.Commands.X509StoreLocation</TypeName>
</Types>
</SelectionSet>
</SelectionSets>
<Controls>
<Control>
<Name>SignatureTypes-GroupingFormat</Name>
<CustomControl>
<CustomEntries>
<CustomEntry>
<CustomItem>
<Frame>
<LeftIndent>4</LeftIndent>
<CustomItem>
<Text AssemblyName="System.Management.Automation" BaseName="FileSystemProviderStrings" ResourceId="DirectoryDisplayGrouping"/>
<ExpressionBinding>
<ScriptBlock>split-path $_.Path</ScriptBlock>
</ExpressionBinding>
<NewLine/>
</CustomItem>
</Frame>
</CustomItem>
</CustomEntry>
</CustomEntries>
</CustomControl>
</Control>
</Controls>
<ViewDefinitions>
<View>
<Name>ThumbprintTable</Name>
<ViewSelectedBy>
<TypeName>System.Security.Cryptography.X509Certificates.X509Certificate2</TypeName>
</ViewSelectedBy>
<GroupBy>
<PropertyName>PSParentPath</PropertyName>
<CustomControlName>FileSystemTypes-GroupingFormat</CustomControlName>
</GroupBy>
<TableControl>
<TableHeaders>
<TableColumnHeader>
<Width>41</Width>
</TableColumnHeader>
<TableColumnHeader/>
</TableHeaders>
<TableRowEntries>
<TableRowEntry>
<TableColumnItems>
<TableColumnItem>
<PropertyName>Thumbprint</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>Subject</PropertyName>
</TableColumnItem>
</TableColumnItems>
</TableRowEntry>
</TableRowEntries>
</TableControl>
</View>
<View>
<Name>ThumbprintList</Name>
<ViewSelectedBy>
<SelectionSetName>CertificateProviderTypes</SelectionSetName>
</ViewSelectedBy>
<ListControl>
<ListEntries>
<ListEntry>
<EntrySelectedBy>
<TypeName>Microsoft.PowerShell.Commands.X509StoreLocation</TypeName>
</EntrySelectedBy>
<ListItems>
<ListItem>
<PropertyName>Location</PropertyName>
</ListItem>
<ListItem>
<PropertyName>StoreNames</PropertyName>
</ListItem>
</ListItems>
</ListEntry>
<ListEntry>
<EntrySelectedBy>
<TypeName>System.Security.Cryptography.X509Certificates.X509Store</TypeName>
</EntrySelectedBy>
<ListItems>
<ListItem>
<PropertyName>Name</PropertyName>
</ListItem>
</ListItems>
</ListEntry>
<ListEntry>
<ListItems>
<ListItem>
<ScriptBlock>$_.SubjectName.Name</ScriptBlock>
<Label>Subject</Label>
</ListItem>
<ListItem>
<ScriptBlock>$_.IssuerName.Name</ScriptBlock>
<Label>Issuer</Label>
</ListItem>
<ListItem>
<PropertyName>Thumbprint</PropertyName>
</ListItem>
<ListItem>
<PropertyName>FriendlyName</PropertyName>
</ListItem>
<ListItem>
<PropertyName>NotBefore</PropertyName>
</ListItem>
<ListItem>
<PropertyName>NotAfter</PropertyName>
</ListItem>
<ListItem>
<PropertyName>Extensions</PropertyName>
</ListItem>
</ListItems>
</ListEntry>
</ListEntries>
</ListControl>
</View>
<View>
<Name>ThumbprintWide</Name>
<ViewSelectedBy>
<SelectionSetName>CertificateProviderTypes</SelectionSetName>
</ViewSelectedBy>
<GroupBy>
<PropertyName>PSParentPath</PropertyName>
<CustomControlName>FileSystemTypes-GroupingFormat</CustomControlName>
</GroupBy>
<WideControl>
<WideEntries>
<WideEntry>
<WideItem>
<PropertyName>ThumbPrint</PropertyName>
</WideItem>
</WideEntry>
</WideEntries>
</WideControl>
</View>
<View>
<Name>PSThumbprintTable</Name>
<ViewSelectedBy>
<TypeName>System.Management.Automation.Signature</TypeName>
</ViewSelectedBy>
<GroupBy>
<ScriptBlock>split-path $_.Path</ScriptBlock>
<CustomControlName>SignatureTypes-GroupingFormat</CustomControlName>
</GroupBy>
<TableControl>
<TableHeaders>
<TableColumnHeader>
<Label>SignerCertificate</Label>
<Width>41</Width>
</TableColumnHeader>
<TableColumnHeader/>
<TableColumnHeader>
<Label>Path</Label>
</TableColumnHeader>
</TableHeaders>
<TableRowEntries>
<TableRowEntry>
<TableColumnItems>
<TableColumnItem>
<ScriptBlock>$_.SignerCertificate.Thumbprint</ScriptBlock>
</TableColumnItem>
<TableColumnItem>
<PropertyName>Status</PropertyName>
</TableColumnItem>
<TableColumnItem>
<ScriptBlock>split-path $_.Path -leaf</ScriptBlock>
</TableColumnItem>
</TableColumnItems>
</TableRowEntry>
</TableRowEntries>
</TableControl>
</View>
<View>
<Name>PSThumbprintWide</Name>
<ViewSelectedBy>
<TypeName>System.Management.Automation.Signature</TypeName>
</ViewSelectedBy>
<GroupBy>
<ScriptBlock>split-path $_.Path</ScriptBlock>
<CustomControlName>SignatureTypes-GroupingFormat</CustomControlName>
</GroupBy>
<WideControl>
<WideEntries>
<WideEntry>
<WideItem>
<ScriptBlock>"$(split-path $_.Path -leaf): $($_.Status)"</ScriptBlock>
</WideItem>
</WideEntry>
</WideEntries>
</WideControl>
</View>
<View>
<Name>PathOnly</Name>
<ViewSelectedBy>
<SelectionSetName>CertificateProviderTypes</SelectionSetName>
</ViewSelectedBy>
<ListControl>
<ListEntries>
<ListEntry>
<ListItems>
<ListItem>
<PropertyName>PSPathPath</PropertyName>
</ListItem>
</ListItems>
</ListEntry>
<ListEntry>
<EntrySelectedBy>
<TypeName>Microsoft.PowerShell.Commands.X509StoreLocation</TypeName>
</EntrySelectedBy>
<ListItems>
<ListItem>
<PropertyName>PSPathPath</PropertyName>
</ListItem>
</ListItems>
</ListEntry>
<ListEntry>
<EntrySelectedBy>
<TypeName>System.Security.Cryptography.X509Certificates.X509Store</TypeName>
</EntrySelectedBy>
<ListItems>
<ListItem>
<PropertyName>PSPath</PropertyName>
</ListItem>
</ListItems>
</ListEntry>
</ListEntries>
</ListControl>
</View>
<View>
<Name>System.Security.Cryptography.X509Certificates.X509CertificateEx</Name>
<ViewSelectedBy>
<TypeName>System.Security.Cryptography.X509Certificates.X509CertificateEx</TypeName>
</ViewSelectedBy>
<GroupBy>
<PropertyName>PSParentPath</PropertyName>
<CustomControlName>FileSystemTypes-GroupingFormat</CustomControlName>
</GroupBy>
<TableControl>
<TableHeaders>
<TableColumnHeader>
<Width>41</Width>
</TableColumnHeader>
<TableColumnHeader/>
</TableHeaders>
<TableRowEntries>
<TableRowEntry>
<TableColumnItems>
<TableColumnItem>
<PropertyName>Thumbprint</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>Subject</PropertyName>
</TableColumnItem>
</TableColumnItems>
</TableRowEntry>
</TableRowEntries>
</TableControl>
</View>
</ViewDefinitions>
</Configuration>
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -1,91 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- *******************************************************************
These sample files contain formatting information used by the Windows
PowerShell engine. Do not edit or change the contents of this file
directly. Please see the Windows PowerShell documentation or type
Get-Help Update-FormatData for more information.
Copyright (c) Microsoft Corporation. All rights reserved.
THIS SAMPLE CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY
OF ANY KIND,WHETHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
PURPOSE. IF THIS CODE AND INFORMATION IS MODIFIED, THE ENTIRE RISK OF USE
OR RESULTS IN CONNECTION WITH THE USE OF THIS CODE AND INFORMATION
REMAINS WITH THE USER.
******************************************************************** -->
<Configuration>
<ViewDefinitions>
<View>
<Name>System.Management.Automation.PSTraceSource</Name>
<ViewSelectedBy>
<TypeName>System.Management.Automation.PSTraceSource</TypeName>
</ViewSelectedBy>
<TableControl>
<TableHeaders>
<TableColumnHeader>
<Width>8</Width>
</TableColumnHeader>
<TableColumnHeader>
<Width>20</Width>
</TableColumnHeader>
<TableColumnHeader>
<Width>20</Width>
</TableColumnHeader>
<TableColumnHeader/>
</TableHeaders>
<TableRowEntries>
<TableRowEntry>
<TableColumnItems>
<TableColumnItem>
<PropertyName>Options</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>Name</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>Listeners</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>Description</PropertyName>
</TableColumnItem>
</TableColumnItems>
</TableRowEntry>
</TableRowEntries>
</TableControl>
</View>
<View>
<Name>System.Management.Automation.PSTraceSource</Name>
<ViewSelectedBy>
<TypeName>System.Management.Automation.PSTraceSource</TypeName>
</ViewSelectedBy>
<ListControl>
<ListEntries>
<ListEntry>
<ListItems>
<ListItem>
<PropertyName>Name</PropertyName>
</ListItem>
<ListItem>
<PropertyName>Description</PropertyName>
</ListItem>
<ListItem>
<PropertyName>Options</PropertyName>
</ListItem>
<ListItem>
<PropertyName>Listeners</PropertyName>
</ListItem>
<ListItem>
<PropertyName>Attributes</PropertyName>
</ListItem>
<ListItem>
<PropertyName>Switch</PropertyName>
</ListItem>
</ListItems>
</ListEntry>
</ListEntries>
</ListControl>
</View>
</ViewDefinitions>
</Configuration>
+86 -34
View File
@@ -109,6 +109,9 @@ OPTIONS
}
// TODO: check for input on stdin
ConsoleColor InitialForegroundColor = Console.ForegroundColor;
ConsoleColor InitialBackgroundColor = Console.BackgroundColor;
// Create the listener and run it
Listener listener = new Listener(initialScript, loadProfiles);
@@ -118,6 +121,9 @@ OPTIONS
listener.Run();
}
Console.ForegroundColor = InitialForegroundColor;
Console.BackgroundColor = InitialBackgroundColor;
// Exit with the desired exit code that was set by the exit command.
// The exit code is set in the host by the MyHost.SetShouldExit() method.
System.Environment.Exit(listener.ExitCode);
@@ -129,7 +135,7 @@ OPTIONS
/// <summary>
/// Used to read user input.
/// </summary>
internal ConsoleReadLine consoleReadLine = new ConsoleReadLine();
internal ConsoleReadLine consoleReadLine;
/// <summary>
/// Holds a reference to the runspace for this interpeter.
@@ -213,6 +219,7 @@ OPTIONS
InitialSessionState iss = InitialSessionState.CreateDefault2();
this.myRunSpace = RunspaceFactory.CreateRunspace(this.myHost, iss);
this.myRunSpace.Open();
this.consoleReadLine = new ConsoleReadLine(this.myHost.Runspace, this.myHost.UI);
if (this.myRunSpace.Debugger != null)
{
@@ -222,7 +229,6 @@ OPTIONS
// feature. In order to debug Workflow script functions the debugger
// DebugMode must include the DebugModes.LocalScript flag.
this.myRunSpace.Debugger.SetDebugMode(DebugModes.LocalScript);
}
if (loadProfiles)
@@ -360,14 +366,8 @@ OPTIONS
{
this.currentPowerShell.Runspace = this.myRunSpace;
if (incompleteLine)
{
this.currentPowerShell.AddScript(partialLine + cmd);
}
else
{
this.currentPowerShell.AddScript(cmd);
}
string fullCommand = incompleteLine ? (partialLine + cmd) : cmd;
this.currentPowerShell.AddScript(fullCommand);
incompleteLine = false;
// Add the default outputter to the end of the pipe and then call the
@@ -394,11 +394,7 @@ OPTIONS
catch (IncompleteParseException)
{
incompleteLine = true;
cmd = cmd.Trim();
partialLine += cmd;
partialLine += System.Environment.NewLine;
partialLine = $"{partialLine}{cmd}{System.Environment.NewLine}";
}
finally
@@ -526,7 +522,6 @@ OPTIONS
this.currentPowerShell.Stop();
}
}
e.Cancel = true;
}
catch (Exception exception)
@@ -544,7 +539,8 @@ OPTIONS
{
// Set up the control-C handler.
Console.CancelKeyPress += new ConsoleCancelEventHandler(this.HandleControlC);
//Console.TreatControlCAsInput = false;
string initialCommand = String.Empty;
// Read commands and run them until the ShouldExit flag is set by
// the user calling "exit".
@@ -564,9 +560,26 @@ OPTIONS
prompt = "PS> ";
}
this.myHost.UI.Write(ConsoleColor.White, Console.BackgroundColor, prompt);
string cmd = consoleReadLine.Read(this.myHost.Runspace, false);
this.Execute(cmd);
this.myHost.UI.Write(prompt);
ConsoleReadLine.ReadResult result = consoleReadLine.Read(false, initialCommand);
switch(result.state)
{
case ConsoleReadLine.ReadResult.State.Abort:
incompleteLine = false;
partialLine = string.Empty;
initialCommand = String.Empty;
break;
case ConsoleReadLine.ReadResult.State.Redraw:
initialCommand = result.command;
break;
case ConsoleReadLine.ReadResult.State.Complete:
default:
this.Execute(result.command);
initialCommand = String.Empty;
break;
}
}
}
@@ -582,12 +595,31 @@ OPTIONS
WriteDebuggerStopMessages(args);
string initialCommand = String.Empty;
// loop to process Debugger commands.
while (resumeAction == null)
{
Console.Write("[DBG] PS >> ");
string command = consoleReadLine.Read(this.myHost.Runspace, true);
Console.WriteLine();
string prompt = incompleteLine ? ">> " : "[DBG] PS >> ";
this.myHost.UI.Write(prompt);
ConsoleReadLine.ReadResult result = consoleReadLine.Read(true, initialCommand);
switch(result.state)
{
case ConsoleReadLine.ReadResult.State.Abort:
incompleteLine = false;
partialLine = string.Empty;
initialCommand = String.Empty;
continue;
case ConsoleReadLine.ReadResult.State.Redraw:
initialCommand = result.command;
continue;
case ConsoleReadLine.ReadResult.State.Complete:
default:
initialCommand = String.Empty;
break;
}
// Stream output from command processing to console.
var output = new PSDataCollection<PSObject>();
@@ -595,7 +627,7 @@ OPTIONS
{
foreach (var item in output.ReadAll())
{
Console.WriteLine(item);
this.myHost.UI.WriteLine(item.ToString());
}
};
@@ -606,10 +638,30 @@ OPTIONS
// command or script. The returned DebuggerCommandResults object will indicate
// whether the command was evaluated by the debugger and if the debugger should
// be released with a specific resume action.
PSCommand psCommand = new PSCommand();
psCommand.AddScript(command).AddCommand("Out-String").AddParameter("Stream", true);
DebuggerCommandResults results = debugger.ProcessCommand(psCommand, output);
if (results.ResumeAction != null)
string fullCommand = incompleteLine ? (partialLine + result.command) : result.command;
psCommand.AddScript(fullCommand).AddCommand("Out-String").AddParameter("Stream", true);
incompleteLine = false;
DebuggerCommandResults results = null;
try
{
results = debugger.ProcessCommand(psCommand, output);
}
catch (IncompleteParseException)
{
incompleteLine = true;
partialLine = $"{partialLine}{result.command}{System.Environment.NewLine}";
}
if (!incompleteLine)
{
partialLine = string.Empty;
}
if (!incompleteLine && results.ResumeAction != null)
{
resumeAction = results.ResumeAction;
}
@@ -632,8 +684,8 @@ OPTIONS
// Show help message only once.
if (!_showHelpMessage)
{
Console.WriteLine("Entering debug mode. Type 'h' to get help.");
Console.WriteLine();
this.myHost.UI.WriteLine("Entering debug mode. Type 'h' to get help.");
this.myHost.UI.WriteLine();
_showHelpMessage = true;
}
@@ -641,12 +693,12 @@ OPTIONS
// pertain to this debugger execution stop point.
if (args.Breakpoints.Count > 0)
{
Console.WriteLine("Debugger hit breakpoint on:");
this.myHost.UI.WriteLine("Debugger hit breakpoint on:");
foreach (var breakPoint in args.Breakpoints)
{
Console.WriteLine(breakPoint.ToString());
this.myHost.UI.WriteLine(breakPoint.ToString());
}
Console.WriteLine();
this.myHost.UI.WriteLine();
}
// Script position stop information.
@@ -654,8 +706,8 @@ OPTIONS
// there is one.
if (args.InvocationInfo != null)
{
Console.WriteLine(args.InvocationInfo.PositionMessage);
Console.WriteLine();
this.myHost.UI.WriteLine(args.InvocationInfo.PositionMessage);
this.myHost.UI.WriteLine();
}
Console.ForegroundColor = saveFGColor;
@@ -10,32 +10,15 @@
},
"dependencies": {
"Microsoft.NETCore.Unsupported.Platform.API": "1.0.0-rc3-00001",
"Newtonsoft.Json": "8.0.2",
"System.Xml.XDocument": "4.0.11-rc3-23914",
"System.Xml.XDocument": "4.0.11-rc2-23922",
"Microsoft.PowerShell.Commands.Management": "1.0.0-*",
"Microsoft.PowerShell.Commands.Utility": "1.0.0-*"
},
"content": [
"Modules",
"PSL_profile.ps1",
"types.ps1xml",
"typesv3.ps1xml",
"Certificate.format.ps1xml",
"Diagnostics.Format.ps1xml",
"DotNetTypes.format.ps1xml",
"Event.format.ps1xml",
"FileSystem.format.ps1xml",
"Help.format.ps1xml",
"HelpV3.format.ps1xml",
"PowerShellCore.format.ps1xml",
"PowerShellTrace.format.ps1xml",
"Registry.format.ps1xml",
"WSMan.format.ps1xml"
"PSL_profile.ps1"
],
"frameworks": {
+28 -2
View File
@@ -122,14 +122,40 @@ namespace Microsoft.PowerShell.Linux.Host
set { Console.SetWindowSize(value.Width, value.Height); }
}
/// <summary>
/// Cached Window Title, for systems that needs it
/// </summary>
private string title = String.Empty;
/// <summary>
/// Gets or sets the title of the displayed window. The example
/// maps the Console.Title property to the value of this property.
/// </summary>
public override string WindowTitle
{
get { return Console.Title; }
set { Console.Title = value; }
get
{
// In Unix/Linux systems, Console.Title current results in a not-implemented
// exception. In that case, we return a cached copy of title that was set earlier.
// Obviously, this will not work if: 1) Title was never set in PowerShell, or 2)
// one sets the windows's title outside of PowerShell.
string result;
try
{
result = Console.Title;
}
catch (PlatformNotSupportedException)
{
return title;
}
return result;
}
set
{
Console.Title = value;
title = value;
}
}
/// <summary>
+459 -141
View File
@@ -4,6 +4,7 @@ namespace Microsoft.PowerShell.Linux.Host
using System.Collections.ObjectModel;
using System.IO;
using System.Management.Automation;
using System.Management.Automation.Host;
using System.Management.Automation.Runspaces;
using System.Text;
@@ -19,6 +20,11 @@ namespace Microsoft.PowerShell.Linux.Host
/// </summary>
private PowerShell powershell = PowerShell.Create();
/// <summary>
/// Host's UserInterface
/// </summary>
private PSHostUserInterface ui;
/// <summary>
/// The buffer used to edit.
/// </summary>
@@ -78,7 +84,7 @@ namespace Microsoft.PowerShell.Linux.Host
/// We do not pick different colors for every token, those tokens
/// use this default.
/// </summary>
private ConsoleColor defaultColor = ConsoleColor.White;
private ConsoleColor defaultColor = Console.ForegroundColor;
/// <summary>
/// To keep track of whether we have hit "enter" key since last arrow up/down key
@@ -90,10 +96,48 @@ namespace Microsoft.PowerShell.Linux.Host
/// </summary>
private string preTabBuffer;
/// <summary>
/// kill buffer used by Ctrl-K and Ctrl-Y
/// </summary>
private string killBuffer = String.Empty;
/// <summary>
/// Indicator that command input is complete
/// </summary>
private bool commandComplete;
/// <summary>
/// Indicator that current command is to be aborted
/// </summary>
private bool abort;
/// <summary>
/// Indicator that we are to redraw current command
/// </summary>
private bool redraw;
/// <summary>
/// What Read() outputs
/// </summary>
public class ReadResult
{
public ReadResult(State s, string cmd)
{
this.command = cmd;
this.state = s;
Console.TreatControlCAsInput = false;
}
public enum State {Complete, Abort, Redraw}
public string command;
public State state;
}
/// <summary>
/// Initializes a new instance of the ConsoleReadLine class.
/// </summary>
public ConsoleReadLine()
public ConsoleReadLine(Runspace runspace, PSHostUserInterface hostUI)
{
this.tokenColors = new ConsoleColor[]
{
@@ -118,147 +162,215 @@ namespace Microsoft.PowerShell.Linux.Host
this.defaultColor, // LineContinuation
this.defaultColor, // Position
};
this.powershell.Runspace = runspace;
this.ui = hostUI;
}
/// <summary>
/// Read a line of text, colorizing while typing.
/// </summary>
/// <returns>The command line read</returns>
public string Read(Runspace runspace, bool nested)
public ReadResult Read(bool nested, string initialValue)
{
this.powershell.Runspace = runspace;
this.Initialize();
if (!String.IsNullOrEmpty(initialValue))
{
this.BufferFromString(initialValue);
this.Render();
}
while (true)
{
ConsoleKeyInfo key = Console.ReadKey(true);
// Basic Emacs-style readline implementation
if (key.Modifiers.HasFlag(ConsoleModifiers.Control))
try
{
switch (key.Key)
ConsoleKeyInfo key = Console.ReadKey(true);
// Basic Emacs-style readline implementation
if (key.Modifiers.HasFlag(ConsoleModifiers.Control))
{
case ConsoleKey.A:
this.OnHome();
break;
case ConsoleKey.E:
this.OnEnd();
break;
// TODO: save buffer, yank with Ctrl-Y
/*
case ConsoleKey.K:
this.OnEscape();
break;
*/
case ConsoleKey.D:
this.OnDelete();
break;
case ConsoleKey.B:
this.OnLeft(key.Modifiers);
break;
case ConsoleKey.F:
this.OnRight(key.Modifiers);
break;
case ConsoleKey.P:
// TODO: incremental search
case ConsoleKey.R:
this.OnUpArrow(nested);
break;
case ConsoleKey.N:
// TODO: incremental search
case ConsoleKey.S:
this.OnDownArrow(nested);
break;
case ConsoleKey.J:
this.OnEnter();
break;
// TODO: save and restore buffer
/*
case ConsoleKey.L:
this.BufferFromString("clear");
previousKeyPress = key;
return this.OnEnter();
*/
commandComplete = ProcessControlKey(key, nested);
}
else if (key.Modifiers.HasFlag(ConsoleModifiers.Alt))
{
commandComplete = ProcessAltKey(key);
}
// Unmodified keys
else
{
commandComplete = ProcessNormalKey(key, nested);
}
previousKeyPress = key;
}
else if (key.Modifiers.HasFlag(ConsoleModifiers.Alt))
catch
{
switch (key.Key)
{
// TODO: OnDelete(key)
// TODO: OnBackspace(key)
case ConsoleKey.B:
this.OnLeft(key.Modifiers);
break;
case ConsoleKey.F:
this.OnRight(key.Modifiers);
break;
}
// if anything goes wrong, abort
abort = true;
}
// Unmodified keys
else
if (abort)
{
switch (key.Key)
{
case ConsoleKey.Backspace:
this.OnBackspace();
break;
case ConsoleKey.Delete:
this.OnDelete();
break;
case ConsoleKey.Enter:
previousKeyPress = key;
return this.OnEnter();
case ConsoleKey.RightArrow:
this.OnRight(key.Modifiers);
break;
case ConsoleKey.LeftArrow:
this.OnLeft(key.Modifiers);
break;
case ConsoleKey.Escape:
this.OnEscape();
break;
case ConsoleKey.Home:
this.OnHome();
break;
case ConsoleKey.End:
this.OnEnd();
break;
case ConsoleKey.Tab:
this.OnTab();
break;
case ConsoleKey.UpArrow:
this.OnUpArrow(nested);
break;
case ConsoleKey.DownArrow:
this.OnDownArrow(nested);
break;
// TODO: case ConsoleKey.LeftWindows: not available in linux
// TODO: case ConsoleKey.RightWindows: not available in linux
default:
if (key.KeyChar == '\x0D')
{
goto case ConsoleKey.Enter; // Ctrl-M
}
if (key.KeyChar == '\x08')
{
goto case ConsoleKey.Backspace; // Ctrl-H
}
this.Insert(key.KeyChar);
this.Render();
break;
}
return new ReadResult(ReadResult.State.Abort, String.Empty);
}
if (redraw)
{
return new ReadResult(ReadResult.State.Redraw, this.buffer.ToString());
}
if (commandComplete)
{
return new ReadResult(ReadResult.State.Complete, this.OnEnter());
}
previousKeyPress = key;
}
}
/// <summary>
/// Process Control-Key combo
/// </summary>
private bool ProcessControlKey(ConsoleKeyInfo key, bool nested)
{
switch (key.Key)
{
case ConsoleKey.A:
this.OnHome();
break;
case ConsoleKey.E:
this.OnEnd();
break;
case ConsoleKey.K:
this.OnKill();
break;
case ConsoleKey.Y:
this.OnYank();
break;
case ConsoleKey.D:
this.OnDelete();
break;
case ConsoleKey.B:
this.OnLeft(false);
break;
case ConsoleKey.F:
this.OnRight(false);
break;
case ConsoleKey.R:
return this.ReverseSearch(nested);
case ConsoleKey.J:
previousKeyPress = key;
return true;
case ConsoleKey.L:
Console.Clear();
redraw = true;
return false;
case ConsoleKey.C:
this.Abort();
return true;
case ConsoleKey.P:
this.OnUpArrow(nested);
break;
case ConsoleKey.N:
this.OnDownArrow(nested);
break;
case ConsoleKey.RightArrow:
this.OnRight(true);
break;
case ConsoleKey.LeftArrow:
this.OnLeft(true);
break;
case ConsoleKey.Home:
this.OnKillBackward();
break;
case ConsoleKey.End:
this.OnKill();
break;
}
return false;
}
/// <summary>
/// Process Alt-Key combo
/// </summary>
private bool ProcessAltKey(ConsoleKeyInfo key)
{
switch (key.Key)
{
// TODO: OnDelete(key)
// TODO: OnBackspace(key)
case ConsoleKey.B:
this.OnLeft(true);
break;
case ConsoleKey.F:
this.OnRight(true);
break;
}
return false;
}
/// <summary>
/// Process normal key
/// </summary>
private bool ProcessNormalKey(ConsoleKeyInfo key, bool nested)
{
switch (key.Key)
{
case ConsoleKey.Backspace:
this.OnBackspace();
break;
case ConsoleKey.Delete:
this.OnDelete();
break;
case ConsoleKey.Enter:
previousKeyPress = key;
return true;
case ConsoleKey.RightArrow:
this.OnRight(false);
break;
case ConsoleKey.LeftArrow:
this.OnLeft(false);
break;
case ConsoleKey.Escape:
this.OnEscape();
break;
case ConsoleKey.Home:
this.OnHome();
break;
case ConsoleKey.End:
this.OnEnd();
break;
case ConsoleKey.Tab:
this.OnTab();
break;
case ConsoleKey.UpArrow:
this.OnUpArrow(nested);
break;
case ConsoleKey.DownArrow:
this.OnDownArrow(nested);
break;
// TODO: case ConsoleKey.LeftWindows: not available in linux
// TODO: case ConsoleKey.RightWindows: not available in linux
default:
if (key.KeyChar == '\x0D')
{
goto case ConsoleKey.Enter; // Ctrl-M
}
if (key.KeyChar == '\x08')
{
goto case ConsoleKey.Backspace; // Ctrl-H
}
this.Insert(key.KeyChar);
this.Render();
break;
}
return false;
}
/// <summary>
/// Initializes the buffer.
/// </summary>
@@ -270,6 +382,10 @@ namespace Microsoft.PowerShell.Linux.Host
this.current = 0;
this.rendered = 0;
this.cursor = new Cursor();
this.commandComplete = false;
this.abort = false;
this.redraw = false;
Console.TreatControlCAsInput = true;
}
/// <summary>
@@ -494,6 +610,135 @@ namespace Microsoft.PowerShell.Linux.Host
this.newHistory = false;
}
/// <summary>
/// Reverse search through history
/// </summary>
private bool ReverseSearch(bool nested)
{
GetHistory(nested);
if (historyResult.Count == 0)
{
return false;
}
int searchPos = historyResult.Count - 1;
StringBuilder searchString = new StringBuilder();
string searchResult = String.Empty;
string failed = String.Empty;
while (true)
{
OnEscape();
ui.Write("(");
ui.Write(ConsoleColor.Red, Console.BackgroundColor, $"{failed}");
ui.Write($"bck-i-search)'{searchString}");
this.current = this.cursor.GetPosition();
ui.Write("': ");
ui.Write(ConsoleColor.Green, Console.BackgroundColor, $"{searchResult}");
this.rendered = this.cursor.GetPosition();
this.cursor.Place(this.current);
ConsoleKeyInfo key = Console.ReadKey(true);
bool terminateSearch = false;
if (key.Modifiers.HasFlag(ConsoleModifiers.Control))
{
switch (key.Key)
{
case ConsoleKey.R: // repeat search
searchPos--;
break;
case ConsoleKey.C:
Abort();
return true;
default:
terminateSearch = true;
break;
}
}
else if (key.Modifiers.HasFlag(ConsoleModifiers.Alt))
{
terminateSearch = true;
}
else
{
switch (key.Key)
{
case ConsoleKey.Backspace:
if (searchString.Length > 0)
{
searchString.Length--;
}
searchPos = historyResult.Count - 1;
break;
case ConsoleKey.Enter:
BufferFromString(searchResult);
Render();
return true;
case ConsoleKey.Delete:
case ConsoleKey.RightArrow:
case ConsoleKey.LeftArrow:
case ConsoleKey.Escape:
case ConsoleKey.Home:
case ConsoleKey.End:
case ConsoleKey.Tab:
case ConsoleKey.UpArrow:
case ConsoleKey.DownArrow:
terminateSearch = true;
break;
default:
searchString.Append(key.KeyChar);
break;
}
}
if (terminateSearch)
{
BufferFromString(searchResult);
Render();
return false;
}
if (searchString.Length == 0)
{
searchResult = String.Empty;
failed = String.Empty;
}
else
{
string result = reverseSearchHistory(searchString.ToString(), ref searchPos);
if (String.IsNullOrEmpty(result))
{
failed = "failed-";
}
else
{
failed = String.Empty;
searchResult = result;
}
}
}
}
/// <summary>
/// Reverse search command history for one that match pattern
/// </summary>
private string reverseSearchHistory(string pattern, ref int pos)
{
for (int i = pos; i >= 0; --i)
{
string command = historyResult[i].Members["CommandLine"].Value.ToString();
if (command.Contains(pattern))
{
pos = i;
return command;
}
}
pos = -1;
return String.Empty;
}
/// <summary>
/// Helper function to get command history
/// </summary>
@@ -510,11 +755,11 @@ namespace Microsoft.PowerShell.Linux.Host
/// <summary>
/// Moves to the left of the cursor position.
/// </summary>
/// <param name="consoleModifiers">Enumeration for Alt, Control,
/// <param name="byWord">move by word instead of by letter
/// and Shift keys.</param>
private void OnLeft(ConsoleModifiers consoleModifiers)
private void OnLeft(bool byWord)
{
if (consoleModifiers.HasFlag(ConsoleModifiers.Alt))
if (byWord)
{
// Move back to the start of the previous word.
if (this.buffer.Length > 0 && this.current != 0)
@@ -557,11 +802,11 @@ namespace Microsoft.PowerShell.Linux.Host
/// <summary>
/// Moves to what is to the right of the cursor position.
/// </summary>
/// <param name="consoleModifiers">Enumeration for Alt, Control,
/// <param name="byWord">move by word instead of by letter
/// and Shift keys.</param>
private void OnRight(ConsoleModifiers consoleModifiers)
private void OnRight(bool byWord)
{
if (consoleModifiers.HasFlag(ConsoleModifiers.Alt))
if (byWord)
{
// Move to the next word.
if (this.buffer.Length != 0 && this.current < this.buffer.Length)
@@ -625,7 +870,7 @@ namespace Microsoft.PowerShell.Linux.Host
private string OnEnter()
{
this.newHistory = true;
Console.Out.WriteLine();
ui.WriteLine();
return this.buffer.ToString();
}
@@ -641,6 +886,54 @@ namespace Microsoft.PowerShell.Linux.Host
}
}
/// <summary>
/// Ctrl-K or Ctrl-End was entered.
/// </summary>
private void OnKill()
{
if (this.buffer.Length > 0 && this.current < this.buffer.Length)
{
this.killBuffer = this.buffer.ToString().Substring(this.current);
this.buffer.Remove(this.current, killBuffer.Length);
this.Render();
}
else
{
this.killBuffer = String.Empty;
}
}
/// <summary>
/// Ctrl-Home was entered, kill from begin-of-line to current position
/// </summary>
private void OnKillBackward()
{
if (this.current > 0)
{
this.killBuffer = this.buffer.ToString().Substring(0, this.current);
this.buffer.Remove(0, this.current);
this.current = 0;
this.Render();
}
else
{
this.killBuffer = String.Empty;
}
}
/// <summary>
/// Ctrl-Y was entered.
/// </summary>
private void OnYank()
{
if (!String.IsNullOrEmpty(killBuffer))
{
this.buffer.Insert(this.current, killBuffer);
this.current += killBuffer.Length;
this.Render();
}
}
/// <summary>
/// The Backspace key was entered.
/// </summary>
@@ -663,6 +956,10 @@ namespace Microsoft.PowerShell.Linux.Host
string text = this.buffer.ToString();
// TODO: Rendering of a multiline command on separate lines.
// For now, just display it as a single-line command.
text = text.Replace(System.Environment.NewLine, " ");
// The PowerShell tokenizer is used to decide how to colorize
// the input. Any errors in the input are returned in 'errors',
// but we won't be looking at those here.
@@ -671,15 +968,12 @@ namespace Microsoft.PowerShell.Linux.Host
if (tokens.Count > 0)
{
// We can skip rendering tokens that end before the cursor.
int i;
ConsoleColor saveFGColor = Console.ForegroundColor;
for (i = 0; i < tokens.Count; ++i)
// Print leading blanks
if (tokens[0].Start != 0)
{
if (this.current >= tokens[i].Start)
{
break;
}
ui.Write(new string(' ', tokens[0].Start));
}
// Place the cursor at the start of the first token to render. The
@@ -687,13 +981,14 @@ namespace Microsoft.PowerShell.Linux.Host
// preceding the cursor.
//this.cursor.Place(tokens[i].Start);
for (; i < tokens.Count; ++i)
int i;
for (i = 0; i < tokens.Count; ++i)
{
// Write out the token. We don't use tokens[i].Content, instead we
// use the actual text from our input because the content sometimes
// excludes part of the token, e.g. the quote characters of a string.
Console.ForegroundColor = this.tokenColors[(int)tokens[i].Type];
Console.Out.Write(text.Substring(tokens[i].Start, tokens[i].Length));
ui.Write(text.Substring(tokens[i].Start, tokens[i].Length));
// Whitespace doesn't show up in the array of tokens. Write it out here.
if (i != (tokens.Count - 1))
@@ -701,7 +996,7 @@ namespace Microsoft.PowerShell.Linux.Host
Console.ForegroundColor = this.defaultColor;
for (int j = (tokens[i].Start + tokens[i].Length); j < tokens[i + 1].Start; ++j)
{
Console.Out.Write(text[j]);
ui.Write(text[j].ToString());
}
}
}
@@ -711,8 +1006,10 @@ namespace Microsoft.PowerShell.Linux.Host
Console.ForegroundColor = this.defaultColor;
for (int j = tokens[i - 1].Start + tokens[i - 1].Length; j < text.Length; ++j)
{
Console.Out.Write(text[j]);
ui.Write(text[j].ToString());
}
Console.ForegroundColor = saveFGColor;
}
else
{
@@ -720,19 +1017,31 @@ namespace Microsoft.PowerShell.Linux.Host
// happens most frequently when the first token is incomplete, like a string
// literal missing a closing quote.
this.cursor.Reset();
Console.Out.Write(text);
ui.Write(text);
}
// If characters were deleted, we must write over previously written characters
if (text.Length < this.rendered)
{
Console.Out.Write(new string(' ', this.rendered - text.Length));
ui.Write(new string(' ', this.rendered - text.Length));
}
this.rendered = text.Length;
this.cursor.Place(this.current);
}
/// <summary>
/// Abort current command
/// </summary>
public void Abort()
{
ConsoleColor saveFGColor = Console.ForegroundColor;
Console.ForegroundColor = ConsoleColor.Red;
ui.WriteLine("^C");
Console.ForegroundColor = saveFGColor;
this.abort = true;
}
/// <summary>
/// A helper class for maintaining the cursor while editing the command line.
/// </summary>
@@ -796,6 +1105,15 @@ namespace Microsoft.PowerShell.Linux.Host
Console.CursorTop = cursorTop;
}
/// <summary>
/// Return current position, relative to anchorLeft
/// </summary>
internal int GetPosition()
{
return Console.CursorLeft - this.anchorLeft;
}
} // End Cursor
}
File diff suppressed because it is too large Load Diff
@@ -1,387 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<Types>
<Type>
<Name>System.Security.Cryptography.X509Certificates.X509Certificate2</Name>
<Members>
<ScriptProperty>
<Name>EnhancedKeyUsageList</Name>
<GetScriptBlock>
,(new-object Microsoft.Powershell.Commands.EnhancedKeyUsageProperty -argumentlist $this).EnhancedKeyUsageList;
</GetScriptBlock>
</ScriptProperty>
<ScriptProperty>
<Name>DnsNameList</Name>
<GetScriptBlock>
,(new-object Microsoft.Powershell.Commands.DnsNameProperty -argumentlist $this).DnsNameList;
</GetScriptBlock>
</ScriptProperty>
<ScriptProperty>
<Name>SendAsTrustedIssuer</Name>
<GetScriptBlock>
[Microsoft.Powershell.Commands.SendAsTrustedIssuerProperty]::ReadSendAsTrustedIssuerProperty($this)
</GetScriptBlock>
<SetScriptBlock>
$sendAsTrustedIssuer = $args[0]
[Microsoft.Powershell.Commands.SendAsTrustedIssuerProperty]::WriteSendAsTrustedIssuerProperty($this,$this.PsPath,$sendAsTrustedIssuer)
</SetScriptBlock>
</ScriptProperty>
</Members>
</Type>
<Type>
<Name>System.Management.Automation.Remoting.PSSenderInfo</Name>
<Members>
<ScriptProperty>
<Name>ConnectedUser</Name>
<GetScriptBlock>
$this.UserInfo.Identity.Name
</GetScriptBlock>
</ScriptProperty>
<ScriptProperty>
<Name>RunAsUser</Name>
<GetScriptBlock>
if($this.UserInfo.WindowsIdentity -ne $null)
{
$this.UserInfo.WindowsIdentity.Name
}
</GetScriptBlock>
</ScriptProperty>
</Members>
</Type>
<Type>
<Name>System.Management.Automation.CompletionResult</Name>
<Members>
<MemberSet>
<Name>PSStandardMembers</Name>
<Members>
<NoteProperty>
<Name>SerializationDepth</Name>
<Value>1</Value>
</NoteProperty>
</Members>
</MemberSet>
</Members>
</Type>
<Type>
<Name>Deserialized.System.Management.Automation.CompletionResult</Name>
<Members>
<MemberSet>
<Name>PSStandardMembers</Name>
<Members>
<NoteProperty>
<Name>TargetTypeForDeserialization</Name>
<Value>Microsoft.PowerShell.DeserializingTypeConverter</Value>
</NoteProperty>
</Members>
</MemberSet>
</Members>
</Type>
<Type>
<Name>System.Management.Automation.CommandCompletion</Name>
<Members>
<MemberSet>
<Name>PSStandardMembers</Name>
<Members>
<NoteProperty>
<Name>SerializationDepth</Name>
<Value>1</Value>
</NoteProperty>
</Members>
</MemberSet>
</Members>
</Type>
<Type>
<Name>Deserialized.System.Management.Automation.CommandCompletion</Name>
<Members>
<MemberSet>
<Name>PSStandardMembers</Name>
<Members>
<NoteProperty>
<Name>TargetTypeForDeserialization</Name>
<Value>Microsoft.PowerShell.DeserializingTypeConverter</Value>
</NoteProperty>
</Members>
</MemberSet>
</Members>
</Type>
<Type>
<Name>Microsoft.PowerShell.Commands.ModuleSpecification</Name>
<Members>
<MemberSet>
<Name>PSStandardMembers</Name>
<Members>
<NoteProperty>
<Name>SerializationDepth</Name>
<Value>1</Value>
</NoteProperty>
</Members>
</MemberSet>
</Members>
</Type>
<Type>
<Name>Deserialized.Microsoft.PowerShell.Commands.ModuleSpecification</Name>
<Members>
<MemberSet>
<Name>PSStandardMembers</Name>
<Members>
<NoteProperty>
<Name>TargetTypeForDeserialization</Name>
<Value>Microsoft.PowerShell.DeserializingTypeConverter</Value>
</NoteProperty>
</Members>
</MemberSet>
</Members>
</Type>
<Type>
<Name>System.Management.Automation.JobStateEventArgs</Name>
<Members>
<MemberSet>
<Name>PSStandardMembers</Name>
<Members>
<NoteProperty>
<Name>SerializationDepth</Name>
<Value>2</Value>
</NoteProperty>
</Members>
</MemberSet>
</Members>
</Type>
<Type>
<Name>Deserialized.System.Management.Automation.JobStateEventArgs</Name>
<Members>
<MemberSet>
<Name>PSStandardMembers</Name>
<Members>
<NoteProperty>
<Name>TargetTypeForDeserialization</Name>
<Value>Microsoft.PowerShell.DeserializingTypeConverter</Value>
</NoteProperty>
</Members>
</MemberSet>
</Members>
</Type>
<Type>
<Name>System.Exception</Name>
<Members>
<MemberSet>
<Name>PSStandardMembers</Name>
<Members>
<NoteProperty>
<Name>SerializationDepth</Name>
<Value>1</Value>
</NoteProperty>
</Members>
</MemberSet>
</Members>
</Type>
<Type>
<Name>System.Management.Automation.Remoting.PSSessionOption</Name>
<Members>
<MemberSet>
<Name>PSStandardMembers</Name>
<Members>
<NoteProperty>
<Name>SerializationDepth</Name>
<Value>1</Value>
</NoteProperty>
</Members>
</MemberSet>
</Members>
</Type>
<Type>
<Name>Deserialized.System.Management.Automation.Remoting.PSSessionOption</Name>
<Members>
<MemberSet>
<Name>PSStandardMembers</Name>
<Members>
<NoteProperty>
<Name>TargetTypeForDeserialization</Name>
<Value>Microsoft.PowerShell.DeserializingTypeConverter</Value>
</NoteProperty>
</Members>
</MemberSet>
</Members>
</Type>
<Type>
<Name>System.Management.Automation.DebuggerStopEventArgs</Name>
<Members>
<CodeProperty IsHidden="true">
<Name>SerializedInvocationInfo</Name>
<GetCodeReference>
<TypeName>Microsoft.PowerShell.DeserializingTypeConverter</TypeName>
<MethodName>GetInvocationInfo</MethodName>
</GetCodeReference>
</CodeProperty>
<MemberSet>
<Name>PSStandardMembers</Name>
<Members>
<NoteProperty>
<Name>SerializationDepth</Name>
<Value>2</Value>
</NoteProperty>
<NoteProperty>
<Name>SerializationMethod</Name>
<Value>SpecificProperties</Value>
</NoteProperty>
<PropertySet>
<Name>PropertySerializationSet</Name>
<ReferencedProperties>
<Name>Breakpoints</Name>
<Name>ResumeAction</Name>
<Name>SerializedInvocationInfo</Name>
</ReferencedProperties>
</PropertySet>
</Members>
</MemberSet>
</Members>
</Type>
<Type>
<Name>Deserialized.System.Management.Automation.DebuggerStopEventArgs</Name>
<Members>
<MemberSet>
<Name>PSStandardMembers</Name>
<Members>
<NoteProperty>
<Name>TargetTypeForDeserialization</Name>
<Value>Microsoft.PowerShell.DeserializingTypeConverter</Value>
</NoteProperty>
</Members>
</MemberSet>
</Members>
</Type>
</Types>
<!-- SIG # Begin signature block -->
<!-- MIIY0gYJKoZIhvcNAQcCoIIYwzCCGL8CAQEx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<!-- 8Aqdb5CCbXtm0ht9BFqhzJZm5dd3YuXpgT3PTnP8zAYRWmivw6CK45AF9E5Y42X8 -->
<!-- 6qGCAiEwggIdBgkqhkiG9w0BCQYxggIOMIICCgIBATCBhzB5MQswCQYDVQQGEwJV -->
<!-- UzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9uZDEeMBwGA1UE -->
<!-- ChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMSMwIQYDVQQDExpNaWNyb3NvZnQgVGlt -->
<!-- ZXN0YW1waW5nIFBDQQIKYQd/NAAAAAAADzAJBgUrDgMCGgUAoF0wGAYJKoZIhvcN -->
<!-- AQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0BCQUxDxcNMTIxMTI5MjA0MDEzWjAj -->
<!-- BgkqhkiG9w0BCQQxFgQU9pV90nypOn3swRl68q7KgO4oYbAwDQYJKoZIhvcNAQEF -->
<!-- BQAEggEAKhlqI240E17oHZELnK68zbex8Tc4Se4XEsxeo7qDcN50gXIm423JCir0 -->
<!-- /dDGsJO8c3wkmFPuCSMeaYV9oCGZf2xB3OfdrcJYzeje2HgtAqDJzXX48VoCQ1/l -->
<!-- BJGIbNBE+3P0uc2R455tU6PZvzBCW7cQfiBynbBXyClDMHqf45JbkBQqtCw+q4zj -->
<!-- us6h4xgLASUos2SO9OTGeOXmBuK3mcfV8myLM/skoxKLwxhgb77J3zhAbuS7Cpqw -->
<!-- XE53/LbBPuQnBY07zchI7Ka9rTATEU/hlhboBlLEi2vJ7Y98aYbo5rawef+B16Ks -->
<!-- r8VP+awQAe58VS+Lav++E706/+5dbA== -->
<!-- SIG # End signature block -->
+8 -2
View File
@@ -349,10 +349,13 @@ ReadNext:
ConsoleColor backgroundColor,
string value)
{
ConsoleColor oldFg = Console.ForegroundColor;
ConsoleColor oldBg = Console.BackgroundColor;
Console.ForegroundColor = foregroundColor;
Console.BackgroundColor = backgroundColor;
Console.Write(value);
Console.ResetColor();
Console.ForegroundColor = oldFg;
Console.BackgroundColor = oldBg;
}
@@ -368,10 +371,13 @@ ReadNext:
ConsoleColor backgroundColor,
string value)
{
ConsoleColor oldFg = Console.ForegroundColor;
ConsoleColor oldBg = Console.BackgroundColor;
Console.ForegroundColor = foregroundColor;
Console.BackgroundColor = backgroundColor;
Console.WriteLine(value);
Console.ResetColor();
Console.ForegroundColor = oldFg;
Console.BackgroundColor = oldBg;
}
/// <summary>
+34 -34
View File
@@ -11,7 +11,7 @@
"configurations": {
"Linux": {
"compilationOptions": {
"define": [ "LINUX" ]
"define": [ "LINUX", "NOETW" ]
}
}
},
@@ -24,42 +24,42 @@
"netstandard1.5": {
"imports": [ "dnxcore50" ],
"compilationOptions": {
"define": [ "CORECLR", "NOETW" ]
"define": [ "CORECLR" ]
},
"dependencies": {
"Microsoft.PowerShell.CoreCLR.AssemblyLoadContext": "1.0.0-*",
"Microsoft.PowerShell.CoreCLR.AssemblyLoadContext": "1.0.0-*",
"Microsoft.PowerShell.CoreCLR.Eventing": "1.0.0-*",
"Microsoft.CSharp": "4.0.1-rc3-23914",
"Microsoft.Win32.Registry.AccessControl": "4.0.0-rc3-23914",
"System.Collections.Specialized": "4.0.1-rc3-23914",
"System.Collections.NonGeneric": "4.0.1-rc3-23914",
"System.ComponentModel.EventBasedAsync": "4.0.11-rc3-23914",
"System.ComponentModel.TypeConverter": "4.0.1-rc3-23914",
"System.Data.Common": "4.0.1-rc3-23914",
"System.Diagnostics.Contracts": "4.0.1-rc3-23914",
"System.Diagnostics.FileVersionInfo": "4.0.0-rc3-23914",
"System.Diagnostics.Process": "4.1.0-rc3-23914",
"System.Diagnostics.StackTrace": "4.0.1-rc3-23914",
"System.Diagnostics.TraceSource": "4.0.0-rc3-23914",
"System.Dynamic.Runtime": "4.0.11-rc3-23914",
"System.IO.FileSystem.AccessControl": "4.0.0-rc3-23914",
"System.IO.FileSystem.DriveInfo": "4.0.0-rc3-23914",
"System.IO.FileSystem.Watcher": "4.0.0-rc3-23914",
"System.IO.Pipes": "4.0.0-rc3-23914",
"System.Linq.Expressions": "4.0.11-rc3-23914",
"System.Net.Http": "4.0.1-rc3-23914",
"System.Net.NetworkInformation": "4.1.0-rc3-23914",
"System.Reflection.Emit": "4.0.1-rc3-23914",
"System.Reflection.Emit.Lightweight": "4.0.1-rc3-23914",
"System.Reflection.TypeExtensions": "4.1.0-rc3-23914",
"System.Security.AccessControl": "4.0.0-rc3-23914",
"System.Security.Cryptography.Algorithms": "4.1.0-rc3-23914",
"System.Security.Cryptography.X509Certificates": "4.1.0-rc3-23914",
"System.Threading.Thread": "4.0.0-rc3-23914",
"System.Threading.Tasks.Parallel": "4.0.1-rc3-23914",
"System.Xml.XPath.XmlDocument": "4.0.1-rc3-23914",
"System.Xml.XmlDocument": "4.0.1-rc3-23914",
"System.Xml.XmlSerializer": "4.0.11-rc3-23914"
"Microsoft.CSharp": "4.0.1-rc2-23922",
"Microsoft.Win32.Registry.AccessControl": "4.0.0-rc2-23922",
"System.Collections.Specialized": "4.0.1-rc2-23922",
"System.Collections.NonGeneric": "4.0.1-rc2-23922",
"System.ComponentModel.EventBasedAsync": "4.0.11-rc2-23922",
"System.ComponentModel.TypeConverter": "4.0.1-rc2-23922",
"System.Data.Common": "4.0.1-rc2-23922",
"System.Diagnostics.Contracts": "4.0.1-rc2-23922",
"System.Diagnostics.FileVersionInfo": "4.0.0-rc2-23922",
"System.Diagnostics.Process": "4.1.0-rc2-23922",
"System.Diagnostics.StackTrace": "4.0.1-rc2-23922",
"System.Diagnostics.TraceSource": "4.0.0-rc2-23922",
"System.Dynamic.Runtime": "4.0.11-rc2-23922",
"System.IO.FileSystem.AccessControl": "4.0.0-rc2-23922",
"System.IO.FileSystem.DriveInfo": "4.0.0-rc2-23922",
"System.IO.FileSystem.Watcher": "4.0.0-rc2-23922",
"System.IO.Pipes": "4.0.0-rc2-23922",
"System.Linq.Expressions": "4.0.11-rc2-23922",
"System.Net.Http": "4.0.1-rc2-23922",
"System.Net.NetworkInformation": "4.1.0-rc2-23922",
"System.Reflection.Emit": "4.0.1-rc2-23922",
"System.Reflection.Emit.Lightweight": "4.0.1-rc2-23922",
"System.Security.AccessControl": "4.0.0-rc2-23922",
"System.Security.Cryptography.Algorithms": "4.1.0-rc2-23922",
"System.Security.Cryptography.X509Certificates": "4.1.0-rc2-23922",
"System.Threading.Thread": "4.0.0-rc2-23922",
"System.Threading.Tasks.Parallel": "4.0.1-rc2-23922",
"System.Xml.XPath.XmlDocument": "4.0.1-rc2-23922",
"System.Xml.XmlDocument": "4.0.1-rc2-23922",
"System.Xml.XmlSerializer": "4.0.11-rc2-23922"
}
},
"net451": {
@@ -12,7 +12,7 @@
"frameworks": {
"netstandard1.5": {
"dependencies": {
"NETStandard.Library": "1.5.0-rc2-23911"
"NETStandard.Library": "1.5.0-rc2-23922"
},
"imports": [ "dnxcore50" ]
}
-50
View File
@@ -1,50 +0,0 @@
{
"description": "Facade to generate folder of dependencies",
"authors": [ "andschwa" ],
"dependencies": {
"Microsoft.NETCore.Unsupported.Platform.API": "1.0.0-rc3-00001",
"NETStandard.Library": "1.5.0-rc2-23911",
"System.Runtime.Loader": "4.0.0-rc3-23914",
"System.Security.SecureString": "1.0.0-*",
"System.Runtime.Serialization.Xml": "4.1.1-rc3-23914",
"System.Threading.ThreadPool": "4.0.10-rc3-23914",
"Microsoft.CSharp": "4.0.1-rc3-23914",
"Microsoft.Win32.Registry.AccessControl": "4.0.0-rc3-23914",
"System.Collections.Specialized": "4.0.1-rc3-23914",
"System.ComponentModel.EventBasedAsync": "4.0.11-rc3-23914",
"System.ComponentModel.TypeConverter": "4.0.1-rc3-23914",
"System.Data.Common": "4.0.1-rc3-23914",
"System.Diagnostics.Contracts": "4.0.1-rc3-23914",
"System.Diagnostics.FileVersionInfo": "4.0.0-rc3-23914",
"System.Diagnostics.Process": "4.1.0-rc3-23914",
"System.Diagnostics.StackTrace": "4.0.1-rc3-23914",
"System.Diagnostics.TraceSource": "4.0.0-rc3-23914",
"System.Dynamic.Runtime": "4.0.11-rc3-23914",
"System.IO.FileSystem.AccessControl": "4.0.0-rc3-23914",
"System.IO.FileSystem.DriveInfo": "4.0.0-rc3-23914",
"System.IO.FileSystem.Watcher": "4.0.0-rc3-23914",
"System.IO.Pipes": "4.0.0-rc3-23914",
"System.Linq.Expressions": "4.0.11-rc3-23914",
"System.Net.Http": "4.0.1-rc3-23914",
"System.Net.NetworkInformation": "4.1.0-rc3-23914",
"System.Reflection.Emit.Lightweight": "4.0.1-rc3-23914",
"System.Security.AccessControl": "4.0.0-rc3-23914",
"System.Security.Cryptography.Algorithms": "4.1.0-rc3-23914",
"System.Security.Cryptography.X509Certificates": "4.1.0-rc3-23914",
"System.Threading.Thread": "4.0.0-rc3-23914",
"System.Threading.Tasks.Parallel": "4.0.1-rc3-23914",
"System.Xml.XPath.XmlDocument": "4.0.1-rc3-23914",
"System.Xml.XmlDocument": "4.0.1-rc3-23914",
"System.Xml.XmlSerializer": "4.0.11-rc3-23914",
"System.ServiceProcess.ServiceController": "4.1.0-rc3-23914",
"System.Net.NameResolution": "4.0.0-rc3-23914",
"System.Xml.XDocument": "4.0.11-rc3-23914"
},
"frameworks": {
"netstandardapp1.5": {
"imports": [ "dnxcore50", "netstandardapp1.5", "portable-net45+win8" ]
}
}
}
+3 -6
View File
@@ -1,13 +1,10 @@
. mono-snapshot mono
export DOTNET_REFERENCE_ASSEMBLIES_PATH=$MONO_PREFIX/lib/mono/xbuild-frameworks/
pushd Runtime
pushd ../TypeCatalogParser
dotnet restore
dotnet publish --output bin
dotnet run
popd
ls Runtime/bin/*.dll | sed ':a;N;$!ba;s/\n/;/g' > powershell.inc
dotnet restore
dotnet run CorePsTypeCatalog.cs powershell.inc
cp CorePsTypeCatalog.cs ../Microsoft.PowerShell.CoreCLR.AssemblyLoadContext/
dotnet run ../Microsoft.PowerShell.CoreCLR.AssemblyLoadContext/CorePsTypeCatalog.cs powershell.inc
+35
View File
@@ -0,0 +1,35 @@
using System;
using System.IO;
using System.Linq;
using NuGet.Frameworks;
using Microsoft.DotNet.Cli.Utils;
using Microsoft.DotNet.ProjectModel;
using Microsoft.DotNet.ProjectModel.Graph;
using Microsoft.Extensions.DependencyModel.Resolution;
namespace ConsoleApplication
{
public class Program
{
public static void Main(string[] args)
{
// The TypeCatalogGen project takes this as input
var outputPath = "../TypeCatalogGen/powershell.inc";
// Get a context for our top level project
var context = ProjectContext.Create("../Microsoft.PowerShell.Linux.Host", NuGetFramework.Parse("netstandardapp1.5"));
System.IO.File.WriteAllLines(outputPath,
// Get the target for the current runtime
from t in context.LockFile.Targets where t.RuntimeIdentifier == Constants.RuntimeIdentifier
// Get the packages (not projects)
from x in t.Libraries where x.Type == "package"
// Get the real reference assemblies
from y in x.CompileTimeAssemblies where y.Path.EndsWith(".dll")
// Construct the path to the assemblies
select $"{context.PackagesDirectory}/{x.Name}/{x.Version}/{y.Path};");
Console.WriteLine($"List of reference assemblies written to {outputPath}");
}
}
}
+26
View File
@@ -0,0 +1,26 @@
{
"compilationOptions": {
"warningsAsErrors": true,
"emitEntryPoint": true
},
"dependencies": {
"Microsoft.DotNet.ProjectModel": "1.0.0-beta-*",
"Microsoft.DotNet.Cli.Utils": "1.0.0-beta-*"
},
"frameworks": {
"netstandardapp1.5": {
"imports": [ "dnxcore50", "portable-net45+win8" ]
}
},
"runtimes": {
"ubuntu.14.04-x64": { },
"centos.7.1-x64": { },
"win7-x64": { },
"win10-x64": { },
"osx.10.10-x64": { },
"osx.10.11-x64": { }
}
}
+1 -1
Submodule src/omi updated: 3b24543f61...6fbc8b0b62
+99
View File
@@ -1,17 +1,116 @@
using Xunit;
using System;
using System.Collections.ObjectModel;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Management.Automation;
using System.Management.Automation.Host;
using System.Management.Automation.Internal;
using System.Management.Automation.Internal.Host;
using System.Management.Automation.Provider;
using System.Management.Automation.Runspaces;
using Microsoft.PowerShell;
using Microsoft.PowerShell.Commands;
using Microsoft.PowerShell.Linux.Host;
namespace PSTests
{
[Collection("AssemblyLoadContext")]
public static class FileSystemProviderTests
{
private static ProviderInfo GetProvider()
{
CultureInfo currentCulture = CultureInfo.CurrentCulture;
PSHost hostInterface = new DefaultHost(currentCulture,currentCulture);
RunspaceConfiguration runspaceConfiguration = RunspaceConfiguration.Create();
InitialSessionState iss = InitialSessionState.CreateDefault2();
AutomationEngine engine = new AutomationEngine(hostInterface, runspaceConfiguration, iss);
ExecutionContext executionContext = new ExecutionContext(engine, hostInterface, iss);
SessionStateInternal sessionState = new SessionStateInternal(executionContext);
SessionStateProviderEntry providerEntry = new SessionStateProviderEntry("FileSystem",typeof(FileSystemProvider), null);
sessionState.AddSessionStateEntry(providerEntry);
ProviderInfo matchingProvider = sessionState.ProviderList.ToList()[0];
return matchingProvider;
}
[Fact]
public static void TestCreateJunctionFails()
{
Assert.False(InternalSymbolicLinkLinkCodeMethods.CreateJunction("",""));
}
[Fact]
public static void TestGetHelpMaml()
{
FileSystemProvider fileSystemProvider = new FileSystemProvider();
Assert.Equal(fileSystemProvider.GetHelpMaml(String.Empty,String.Empty),String.Empty);
Assert.Equal(fileSystemProvider.GetHelpMaml("helpItemName",String.Empty),String.Empty);
Assert.Equal(fileSystemProvider.GetHelpMaml(String.Empty,"path"),String.Empty);
}
[Fact]
public static void TestMode()
{
Assert.Equal(FileSystemProvider.Mode(null),String.Empty);
FileSystemInfo fileSystemObject = new DirectoryInfo(@"/");
Assert.NotEqual(FileSystemProvider.Mode(PSObject.AsPSObject(fileSystemObject)),String.Empty);
}
[Fact(Skip = "Need mock")]
public static void TestGetProperty()
{
string path = @"/filesystemobject1";
FileSystemProvider fileSystemProvider = new FileSystemProvider();
ProviderInfo providerInfoToSet = GetProvider();
fileSystemProvider.SetProviderInformation(providerInfoToSet);
FileInfo fileSystemObject1 = new FileInfo(path);
fileSystemProvider.SetProperty(path, PSObject.AsPSObject(fileSystemObject1));
fileSystemProvider.GetProperty(path, new Collection<string>(){"Attributes"});
}
[Fact(Skip = "Need mock")]
public static void TestSetProperty()
{
string path = @"/filesystemobject1";
FileSystemProvider fileSystemProvider = new FileSystemProvider();
ProviderInfo providerInfoToSet = GetProvider();
fileSystemProvider.SetProviderInformation(providerInfoToSet);
FileInfo fileSystemObject1 = new FileInfo(path);
fileSystemProvider.SetProperty(@"/root", PSObject.AsPSObject(fileSystemObject1));
}
[Fact(Skip = "Need mock")]
public static void TestClearProperty()
{
FileSystemProvider fileSystemProvider = new FileSystemProvider();
fileSystemProvider.ClearProperty(@"/test", new Collection<string>(){"Attributes"});
}
[Fact(Skip = "Need mock")]
public static void TestGetContentReader()
{
FileSystemProvider fileSystemProvider = new FileSystemProvider();
IContentReader contentReader = fileSystemProvider.GetContentReader(@"/test");
Assert.NotNull(contentReader);
}
[Fact(Skip = "Need mock")]
public static void TestGetContentWriter()
{
FileSystemProvider fileSystemProvider = new FileSystemProvider();
IContentWriter contentWriter = fileSystemProvider.GetContentWriter(@"/test");
Assert.NotNull(contentWriter);
}
[Fact(Skip = "Need mock")]
public static void TestClearContent()
{
FileSystemProvider fileSystemProvider = new FileSystemProvider();
fileSystemProvider.ClearContent(@"/test");
}
}
}
@@ -0,0 +1,71 @@
Describe "ComparisonOperator" {
It "Should be $true for 1 -lt 2" {
1 -lt 2 | Should Be $true
}
It "Should be $false for 1 -gt 2" {
1 -gt 2 | Should Be $false
}
It "Should be $true for 1 -le 2" {
1 -le 2 | Should Be $true
}
It "Should be $true for 1 -le 1" {
1 -le 1 | Should Be $true
}
It "Should be $false for 1 -ge 2" {
1 -ge 2 | Should Be $false
}
It "Should be $true for 1 -ge 1" {
1 -ge 1 | Should Be $true
}
It "Should be $true for 1 -eq 1" {
1 -eq 1 | Should Be $true
}
It "Should be $true for 'abc' -ceq 'abc' and $false for 'abc' -ceq 'Abc'" {
'abc' -ceq 'abc' | Should Be $true
'abc' -ceq 'Abc' | Should Be $false
}
It "Should be $true for 1 -ne 2" {
1 -ne 2 | Should Be $true
}
It "Should be $true for 1 -and 1, $false for 1 -and 0, $false for 0 -and 0" {
1 -and 1 | Should Be $true
1 -and 0 | Should Be $false
0 -and 0 | Should Be $false
}
It "Should be $true for 1 -or 1, $true for 1 -or 0, $false for 0 -or 0" {
1 -or 1 | Should Be $true
1 -or 0 | Should Be $true
0 -or 0 | Should Be $false
}
It "Should be $false for -not 1, $true for -not 0" {
-not 1 | Should Be $false
-not 0 | Should Be $true
}
It "Should be $false for !1, $true for !0" {
!1 | Should Be $false
!0 | Should Be $true
}
It "Should be $true for 'Hello','world' -contains 'Hello'" {
$arr= 'Hello','world'
$arr -contains 'Hello' | Should Be $true
}
It "Should be $false for 'Hello','world' -ccontains 'hello' and $true for 'Hello','world' -ccontains 'Hello'" {
$arr= 'Hello','world'
$arr -ccontains 'hello' | Should Be $false
$arr -ccontains 'Hello' | Should Be $true
}
It "Should be $true for 'Hello world' -match 'Hello*'" {
"Hello world" -match "Hello*" | Should Be $true
}
It "Should be $true for 'Hello world' -like 'Hello*'" {
"Hello world" -like "Hello*" | Should Be $true
}
It "Should be $false for 'Hello world' -notmatch 'Hello*'" {
"Hello world" -notmatch "Hello*" | Should Be $false
}
It "Should be $false for 'Hello world' -notlike 'Hello*'" {
"Hello world" -notlike "Hello*" | Should Be $false
}
}
+5
View File
@@ -0,0 +1,5 @@
Describe ".NET class interoperability" {
It "Should access types in System.Console" {
[System.Console]::TreatControlCAsInput | Should Be $false
}
}
@@ -0,0 +1,30 @@
Describe "NativeLinuxCommands" {
It "Should return a type of System.Object for hostname cmdlet" {
(hostname).GetType().BaseType | Should Be 'System.Object'
(hostname).GetType().Name | Should Be String
}
It "Should have not empty Name flags set for ps object" {
ps | foreach-object { $_.ProcessName | Should Not BeNullOrEmpty }
}
It "Should find Application grep" -Skip:$IsWindows {
(get-command grep).CommandType | Should Be Application
}
It "Should pipe to grep and get result" -Skip:$IsWindows {
"hello world" | grep hello | Should Be "hello world"
}
It "Should find Application touch" -Skip:$IsWindows {
(get-command touch).CommandType | Should Be Application
}
It "Should find Alias ls" -Skip:$IsWindows {
(get-command ls).CommandType | Should Be Alias
}
It "Should find Function mkdir" -Skip:$IsWindows {
(get-command mkdir).CommandType | Should Be Function
}
}
+1 -1
View File
@@ -22,7 +22,7 @@ pushd test/csharp
## Build
dotnet build -c Linux
## Work-around dotnet/cli#753
cp -r ../../src/Microsoft.PowerShell.Linux.Host/{Modules,*ps1xml} bin/Linux/netstandardapp1.5/ubuntu.14.04-x64
cp -r ../../src/Microsoft.PowerShell.Linux.Host/Modules bin/Linux/netstandardapp1.5/ubuntu.14.04-x64
## Test
dotnet test -c Linux
result=$?