Showing preview only (800K chars total). Download the full file or copy to clipboard to get everything.
Repository: aspnet/DotNetTools
Branch: master
Commit: da47b81a162a
Files: 282
Total size: 724.4 KB
Directory structure:
gitextract_sumg99vk/
├── .appveyor.yml
├── .editorconfig
├── .gitattributes
├── .gitignore
├── .travis.yml
├── .vsts-pipelines/
│ └── builds/
│ ├── ci-internal.yml
│ └── ci-public.yml
├── CONTRIBUTING.md
├── Directory.Build.props
├── Directory.Build.targets
├── DotNetTools.sln
├── LICENSE.txt
├── NuGet.config
├── NuGetPackageVerifier.json
├── README.md
├── build/
│ ├── Key.snk
│ ├── VSIX.props
│ ├── VSIX.targets
│ ├── dependencies.props
│ ├── repo.props
│ ├── repo.targets
│ └── sources.props
├── build.cmd
├── build.sh
├── korebuild-lock.txt
├── korebuild.json
├── run.cmd
├── run.ps1
├── run.sh
├── samples/
│ └── dotnet-watch/
│ ├── Directory.Build.props
│ ├── Directory.Build.targets
│ ├── LaunchAnyCommand/
│ │ ├── LaunchAnyCommand.csproj
│ │ ├── README.md
│ │ ├── package.json
│ │ └── say-hello.js
│ ├── README.md
│ ├── WatchJavascriptFiles/
│ │ ├── Program.cs
│ │ ├── README.md
│ │ ├── WatchJavascriptFiles.csproj
│ │ └── wwwroot/
│ │ └── app.js
│ └── WatchMultipleProjects/
│ ├── README.md
│ ├── Test/
│ │ ├── Test.csproj
│ │ └── UnitTest1.cs
│ ├── Web/
│ │ ├── Program.cs
│ │ └── Web.csproj
│ └── watch.csproj
├── shared/
│ ├── CliContext.cs
│ ├── CommandLineApplicationExtensions.cs
│ ├── ConsoleReporter.cs
│ ├── DebugHelper.cs
│ ├── Ensure.cs
│ ├── IConsole.cs
│ ├── IReporter.cs
│ ├── NullReporter.cs
│ └── PhysicalConsole.cs
├── src/
│ ├── Directory.Build.props
│ ├── Directory.Build.targets
│ ├── Microsoft.AspNetCore.DeveloperCertificates.XPlat/
│ │ ├── CertificateGenerator.cs
│ │ └── Microsoft.AspNetCore.DeveloperCertificates.XPlat.csproj
│ ├── Microsoft.HttpRepl/
│ │ ├── AggregateDirectoryStructure.cs
│ │ ├── Commands/
│ │ │ ├── BaseHttpCommand.cs
│ │ │ ├── ChangeDirectoryCommand.cs
│ │ │ ├── ClearCommand.cs
│ │ │ ├── ConfigCommand.cs
│ │ │ ├── DeleteCommand.cs
│ │ │ ├── EchoCommand.cs
│ │ │ ├── ExitCommand.cs
│ │ │ ├── Formatter.cs
│ │ │ ├── GetCommand.cs
│ │ │ ├── HeadCommand.cs
│ │ │ ├── HelpCommand.cs
│ │ │ ├── ListCommand.cs
│ │ │ ├── OptionsCommand.cs
│ │ │ ├── PatchCommand.cs
│ │ │ ├── PostCommand.cs
│ │ │ ├── PrefCommand.cs
│ │ │ ├── PutCommand.cs
│ │ │ ├── RunCommand.cs
│ │ │ ├── SetBaseCommand.cs
│ │ │ ├── SetDiagCommand.cs
│ │ │ ├── SetHeaderCommand.cs
│ │ │ ├── SetSwaggerCommand.cs
│ │ │ ├── TreeNode.cs
│ │ │ └── UICommand.cs
│ │ ├── Diagnostics/
│ │ │ ├── ConfigItem.cs
│ │ │ ├── DiagEndpoint.cs
│ │ │ ├── DiagEndpointMetadata.cs
│ │ │ ├── DiagItem.cs
│ │ │ └── DiagnosticsState.cs
│ │ ├── DirectoryStructure.cs
│ │ ├── DirectoryStructureExtensions.cs
│ │ ├── Formatting/
│ │ │ └── JsonVisitor.cs
│ │ ├── HttpState.cs
│ │ ├── IDirectoryStructure.cs
│ │ ├── IRequestInfo.cs
│ │ ├── Microsoft.HttpRepl.csproj
│ │ ├── OpenApi/
│ │ │ ├── Either.cs
│ │ │ ├── EitherConverter.cs
│ │ │ ├── EndpointMetadata.cs
│ │ │ ├── EndpointMetadataReader.cs
│ │ │ ├── IEndpointMetadataReader.cs
│ │ │ ├── OpenApiV3EndpointMetadataReader.cs
│ │ │ ├── Parameter.cs
│ │ │ ├── PointerUtil.cs
│ │ │ ├── Schema.cs
│ │ │ ├── SwaggerV1EndpointMetadataReader.cs
│ │ │ └── SwaggerV2EndpointMetadataReader.cs
│ │ ├── Preferences/
│ │ │ ├── IJsonConfig.cs
│ │ │ ├── JsonConfig.cs
│ │ │ ├── RequestConfig.cs
│ │ │ ├── RequestOrResponseConfig.cs
│ │ │ ├── ResponseConfig.cs
│ │ │ └── WellKnownPreference.cs
│ │ ├── Program.cs
│ │ ├── Properties/
│ │ │ └── launchSettings.json
│ │ └── Suggestions/
│ │ ├── HeaderCompletion.cs
│ │ └── ServerPathCompletion.cs
│ ├── Microsoft.Repl/
│ │ ├── Commanding/
│ │ │ ├── CommandHistory.cs
│ │ │ ├── CommandInputLocation.cs
│ │ │ ├── CommandInputProcessingIssue.cs
│ │ │ ├── CommandInputProcessingIssueKind.cs
│ │ │ ├── CommandInputSpecification.cs
│ │ │ ├── CommandInputSpecificationBuilder.cs
│ │ │ ├── CommandOptionSpecification.cs
│ │ │ ├── CommandWithStructuredInputBase.cs
│ │ │ ├── DefaultCommandDispatcher.cs
│ │ │ ├── DefaultCommandInput.cs
│ │ │ ├── ICommand.cs
│ │ │ ├── ICommandDispatcher.cs
│ │ │ ├── ICommandHistory.cs
│ │ │ └── InputElement.cs
│ │ ├── ConsoleHandling/
│ │ │ ├── AllowedColors.cs
│ │ │ ├── AnsiColorExtensions.cs
│ │ │ ├── AnsiConsole.cs
│ │ │ ├── ConsoleManager.cs
│ │ │ ├── IConsoleManager.cs
│ │ │ ├── IWritable.cs
│ │ │ ├── Point.cs
│ │ │ ├── Reporter.cs
│ │ │ └── Writable.cs
│ │ ├── Disposable.cs
│ │ ├── IShellState.cs
│ │ ├── Input/
│ │ │ ├── AsyncKeyPressHandler.cs
│ │ │ ├── IInputManager.cs
│ │ │ ├── InputManager.cs
│ │ │ └── KeyHandlers.cs
│ │ ├── Microsoft.Repl.csproj
│ │ ├── Parsing/
│ │ │ ├── CoreParseResult.cs
│ │ │ ├── CoreParser.cs
│ │ │ ├── ICoreParseResult.cs
│ │ │ └── IParser.cs
│ │ ├── Scripting/
│ │ │ ├── IScriptExecutor.cs
│ │ │ └── ScriptExecutor.cs
│ │ ├── Shell.cs
│ │ ├── ShellState.cs
│ │ ├── Suggestions/
│ │ │ ├── FileSystemCompletion.cs
│ │ │ ├── ISuggestionManager.cs
│ │ │ └── SuggestionManager.cs
│ │ └── Utils.cs
│ ├── dotnet-dev-certs/
│ │ ├── Program.cs
│ │ ├── README.md
│ │ └── dotnet-dev-certs.csproj
│ ├── dotnet-sql-cache/
│ │ ├── Program.cs
│ │ ├── README.md
│ │ ├── SqlQueries.cs
│ │ └── dotnet-sql-cache.csproj
│ ├── dotnet-user-secrets/
│ │ ├── CommandLineOptions.cs
│ │ ├── Internal/
│ │ │ ├── ClearCommand.cs
│ │ │ ├── CommandContext.cs
│ │ │ ├── ICommand.cs
│ │ │ ├── InitCommand.cs
│ │ │ ├── ListCommand.cs
│ │ │ ├── MsBuildProjectFinder.cs
│ │ │ ├── ProjectIdResolver.cs
│ │ │ ├── ReadableJsonConfigurationSource.cs
│ │ │ ├── RemoveCommand.cs
│ │ │ ├── SecretsStore.cs
│ │ │ └── SetCommand.cs
│ │ ├── Program.cs
│ │ ├── Properties/
│ │ │ ├── AssemblyInfo.cs
│ │ │ └── Resources.Designer.cs
│ │ ├── README.md
│ │ ├── Resources.resx
│ │ ├── assets/
│ │ │ └── SecretManager.targets
│ │ └── dotnet-user-secrets.csproj
│ └── dotnet-watch/
│ ├── CommandLineOptions.cs
│ ├── DotNetWatcher.cs
│ ├── IFileSet.cs
│ ├── IFileSetFactory.cs
│ ├── Internal/
│ │ ├── FileSet.cs
│ │ ├── FileSetWatcher.cs
│ │ ├── FileWatcher/
│ │ │ ├── DotnetFileWatcher.cs
│ │ │ ├── FileWatcherFactory.cs
│ │ │ ├── IFileSystemWatcher.cs
│ │ │ └── PollingFileWatcher.cs
│ │ ├── FileWatcher.cs
│ │ ├── MsBuildFileSetFactory.cs
│ │ ├── MsBuildProjectFinder.cs
│ │ ├── OutputCapture.cs
│ │ ├── OutputSink.cs
│ │ └── ProcessRunner.cs
│ ├── PrefixConsoleReporter.cs
│ ├── ProcessSpec.cs
│ ├── Program.cs
│ ├── Properties/
│ │ ├── AssemblyInfo.cs
│ │ └── Resources.Designer.cs
│ ├── README.md
│ ├── Resources.resx
│ ├── assets/
│ │ └── DotNetWatch.targets
│ └── dotnet-watch.csproj
├── test/
│ ├── Directory.Build.props
│ ├── Microsoft.HttpRepl.Tests/
│ │ ├── JsonVisitorTests.cs
│ │ └── Microsoft.HttpRepl.Tests.csproj
│ ├── Microsoft.Repl.Tests/
│ │ ├── Microsoft.Repl.Tests.csproj
│ │ └── ParserTests.cs
│ ├── Shared/
│ │ ├── TestConsole.cs
│ │ └── TestReporter.cs
│ ├── dotnet-user-secrets.Tests/
│ │ ├── InitCommandTest.cs
│ │ ├── MsBuildProjectFinderTest.cs
│ │ ├── SecretManagerTests.cs
│ │ ├── SetCommandTest.cs
│ │ ├── TemporaryFileProvider.cs
│ │ ├── UserSecretsTestFixture.cs
│ │ └── dotnet-user-secrets.Tests.csproj
│ ├── dotnet-watch.FunctionalTests/
│ │ ├── AppWithDepsTests.cs
│ │ ├── AwaitableProcess.cs
│ │ ├── DotNetWatcherTests.cs
│ │ ├── FileWatcherTests.cs
│ │ ├── GlobbingAppTests.cs
│ │ ├── NoDepsAppTests.cs
│ │ ├── Scenario/
│ │ │ ├── ProjectToolScenario.cs
│ │ │ └── WatchableApp.cs
│ │ ├── TestProjects/
│ │ │ ├── AppWithDeps/
│ │ │ │ ├── AppWithDeps.csproj
│ │ │ │ └── Program.cs
│ │ │ ├── Dependency/
│ │ │ │ ├── Dependency.csproj
│ │ │ │ └── Foo.cs
│ │ │ ├── GlobbingApp/
│ │ │ │ ├── GlobbingApp.csproj
│ │ │ │ ├── Program.cs
│ │ │ │ ├── exclude/
│ │ │ │ │ └── Baz.cs
│ │ │ │ └── include/
│ │ │ │ └── Foo.cs
│ │ │ ├── KitchenSink/
│ │ │ │ ├── KitchenSink.csproj
│ │ │ │ └── Program.cs
│ │ │ └── NoDepsApp/
│ │ │ ├── NoDepsApp.csproj
│ │ │ └── Program.cs
│ │ └── dotnet-watch.FunctionalTests.csproj
│ └── dotnet-watch.Tests/
│ ├── AssertEx.cs
│ ├── CommandLineOptionsTests.cs
│ ├── ConsoleReporterTests.cs
│ ├── MsBuildFileSetFactoryTest.cs
│ ├── ProgramTests.cs
│ ├── Utilities/
│ │ ├── TemporaryCSharpProject.cs
│ │ ├── TemporaryDirectory.cs
│ │ └── TestProjectGraph.cs
│ └── dotnet-watch.Tests.csproj
├── tooling/
│ ├── Microsoft.VisualStudio.SecretManager/
│ │ ├── Microsoft.VisualStudio.SecretManager.csproj
│ │ ├── ProjectLocalSecretsManager.cs
│ │ ├── Properties/
│ │ │ └── AssemblyInfo.cs
│ │ ├── Resources.Designer.cs
│ │ ├── Resources.resx
│ │ ├── SecretManagerFactory.cs
│ │ ├── SecretStore.cs
│ │ ├── Sources/
│ │ │ ├── ConfigurationPath.cs
│ │ │ ├── JsonConfigurationFileParser.cs
│ │ │ └── PathHelper.cs
│ │ └── source.extension.vsixmanifest
│ └── Microsoft.VisualStudio.SecretManager.TestExtension/
│ ├── Key.snk
│ ├── Microsoft.VisualStudio.SecretManager.TestExtension.csproj
│ ├── NotifyPropertyChanged.cs
│ ├── ProjectViewModel.cs
│ ├── Properties/
│ │ └── AssemblyInfo.cs
│ ├── RelayCommand.cs
│ ├── SecretManagerTestCommand.cs
│ ├── SecretManagerTestControl.xaml
│ ├── SecretManagerTestControl.xaml.cs
│ ├── SecretManagerTestPackage.cs
│ ├── SecretManagerTestPackage.vsct
│ ├── SecretManagerTestWindow.cs
│ ├── SecretManagerViewModel.cs
│ ├── VSPackage.resx
│ ├── app.config
│ └── source.extension.vsixmanifest
└── version.props
================================================
FILE CONTENTS
================================================
================================================
FILE: .appveyor.yml
================================================
init:
- git config --global core.autocrlf true
branches:
only:
- master
- /^release\/.*$/
- /^(.*\/)?ci-.*$/
build_script:
- ps: .\run.ps1 default-build
clone_depth: 1
environment:
global:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_CLI_TELEMETRY_OPTOUT: 1
test: 'off'
deploy: 'off'
os: Visual Studio 2017
================================================
FILE: .editorconfig
================================================
# EditorConfig is awesome:http://EditorConfig.org
# top-most EditorConfig file
root = true
[*]
indent_style = space
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[*.cs]
indent_size = 4
dotnet_sort_system_directives_first = true:warning
# Xml files
[*.{csproj,config,props,targets,ruleset,config,resx,xml}]
indent_size = 2
[*.{json, yml}]
indent_size = 2
[*.{ps1,sh}]
indent_size = 4
================================================
FILE: .gitattributes
================================================
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
*.jpg binary
*.png binary
*.gif binary
*.cs text=auto diff=csharp
*.vb text=auto
*.resx text=auto
*.c text=auto
*.cpp text=auto
*.cxx text=auto
*.h text=auto
*.hxx text=auto
*.py text=auto
*.rb text=auto
*.java text=auto
*.html text=auto
*.htm text=auto
*.css text=auto
*.scss text=auto
*.sass text=auto
*.less text=auto
*.js text=auto
*.lisp text=auto
*.clj text=auto
*.sql text=auto
*.php text=auto
*.lua text=auto
*.m text=auto
*.asm text=auto
*.erl text=auto
*.fs text=auto
*.fsx text=auto
*.hs text=auto
*.csproj text=auto
*.vbproj text=auto
*.fsproj text=auto
*.dbproj text=auto
*.sln text=auto eol=crlf
*.sh eol=lf
================================================
FILE: .gitignore
================================================
[Oo]bj/
[Bb]in/
TestResults/
.nuget/
_ReSharper.*/
packages/
artifacts/
PublishProfiles/
*.user
*.suo
*.cache
*.docstates
_ReSharper.*
nuget.exe
*net45.csproj
*net451.csproj
*k10.csproj
*.psess
*.vsp
*.pidb
*.userprefs
*DS_Store
*.ncrunchsolution
*.*sdf
*.ipch
*.sln.ide
project.lock.json
.testPublish/
.build/
/.vs/
.vscode/
*.nuget.props
*.nuget.targets
.idea/
.dotnet/
global.json
*.binlog
================================================
FILE: .travis.yml
================================================
language: csharp
sudo: false
dist: trusty
env:
global:
- DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
- DOTNET_CLI_TELEMETRY_OPTOUT: 1
mono: none
os:
- linux
- osx
osx_image: xcode8.2
addons:
apt:
packages:
- libunwind8
branches:
only:
- master
- /^release\/.*$/
- /^(.*\/)?ci-.*$/
before_install:
- if test "$TRAVIS_OS_NAME" == "osx"; then brew update; brew install openssl; ln -s
/usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib /usr/local/lib/; ln -s /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
/usr/local/lib/; fi
script:
- ./build.sh
================================================
FILE: .vsts-pipelines/builds/ci-internal.yml
================================================
trigger:
- master
- release/*
resources:
repositories:
- repository: buildtools
type: git
name: aspnet-BuildTools
ref: refs/heads/master
phases:
- template: .vsts-pipelines/templates/project-ci.yml@buildtools
================================================
FILE: .vsts-pipelines/builds/ci-public.yml
================================================
trigger:
- master
- release/*
# See https://github.com/aspnet/BuildTools
resources:
repositories:
- repository: buildtools
type: github
endpoint: DotNet-Bot GitHub Connection
name: aspnet/BuildTools
ref: refs/heads/master
phases:
- template: .vsts-pipelines/templates/project-ci.yml@buildtools
================================================
FILE: CONTRIBUTING.md
================================================
Contributing
======
Information on contributing to this repo is in the [Contributing Guide](https://github.com/aspnet/Home/blob/master/CONTRIBUTING.md) in the Home repo.
================================================
FILE: Directory.Build.props
================================================
<Project>
<Import
Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), AspNetCoreSettings.props))\AspNetCoreSettings.props"
Condition=" '$(CI)' != 'true' AND '$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), AspNetCoreSettings.props))' != '' " />
<Import Project="version.props" />
<Import Project="build\dependencies.props" />
<Import Project="build\sources.props" />
<PropertyGroup>
<Product>Microsoft .NET</Product>
<RepositoryUrl>https://github.com/aspnet/DotNetTools</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<RepositoryRoot>$(MSBuildThisFileDirectory)</RepositoryRoot>
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)build\Key.snk</AssemblyOriginatorKeyFile>
<SignAssembly>true</SignAssembly>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<!-- Binary compatiblity is not a goal for command-line tools. -->
<EnableApiCheck>false</EnableApiCheck>
<BaseIntermediateOutputPath>$(MSBuildThisFileDirectory)obj\$(MSBuildProjectName)\</BaseIntermediateOutputPath>
<BaseOutputPath>$(MSBuildThisFileDirectory)bin\$(MSBuildProjectName)\</BaseOutputPath>
</PropertyGroup>
</Project>
================================================
FILE: Directory.Build.targets
================================================
<Project>
<PropertyGroup>
<RuntimeFrameworkVersion Condition=" '$(TargetFramework)' == 'netcoreapp3.0' ">$(MicrosoftNETCoreApp30PackageVersion)</RuntimeFrameworkVersion>
<NETStandardImplicitPackageVersion Condition=" '$(TargetFramework)' == 'netstandard2.0' ">$(NETStandardLibrary20PackageVersion)</NETStandardImplicitPackageVersion>
<!-- aspnet/BuildTools#662 Don't police what version of NetCoreApp we use -->
<NETCoreAppMaximumVersion>99.9</NETCoreAppMaximumVersion>
</PropertyGroup>
</Project>
================================================
FILE: DotNetTools.sln
================================================
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27120.0
MinimumVisualStudioVersion = 15.0.26730.03
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{66517987-2A5A-4330-B130-207039378FD4}"
ProjectSection(SolutionItems) = preProject
src\Directory.Build.props = src\Directory.Build.props
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dotnet-watch", "src\dotnet-watch\dotnet-watch.csproj", "{8A8CEABC-AC47-43FF-A5DF-69224F7E1F46}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{8321E0D1-9A47-4D2F-AED8-3AE636D44E35}"
ProjectSection(SolutionItems) = preProject
.appveyor.yml = .appveyor.yml
.editorconfig = .editorconfig
.gitattributes = .gitattributes
.gitignore = .gitignore
.travis.yml = .travis.yml
build.cmd = build.cmd
build.ps1 = build.ps1
build.sh = build.sh
CONTRIBUTING.md = CONTRIBUTING.md
build\dependencies.props = build\dependencies.props
Directory.Build.props = Directory.Build.props
Directory.Build.targets = Directory.Build.targets
LICENSE.txt = LICENSE.txt
NuGet.config = NuGet.config
NuGetPackageVerifier.json = NuGetPackageVerifier.json
README.md = README.md
build\sources.props = build\sources.props
version.props = version.props
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{F5B382BC-258F-46E1-AC3D-10E5CCD55134}"
ProjectSection(SolutionItems) = preProject
test\Directory.Build.props = test\Directory.Build.props
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dotnet-watch.FunctionalTests", "test\dotnet-watch.FunctionalTests\dotnet-watch.FunctionalTests.csproj", "{16BADE2F-1184-4518-8A70-B68A19D0805B}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dotnet-user-secrets", "src\dotnet-user-secrets\dotnet-user-secrets.csproj", "{8730E848-CA0F-4E0A-9A2F-BC22AD0B2C4E}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dotnet-user-secrets.Tests", "test\dotnet-user-secrets.Tests\dotnet-user-secrets.Tests.csproj", "{7B331122-83B1-4F08-A119-DC846959844C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dotnet-watch.Tests", "test\dotnet-watch.Tests\dotnet-watch.Tests.csproj", "{8A2E6961-6B12-4A8E-8215-3E7301D52EAC}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dotnet-sql-cache", "src\dotnet-sql-cache\dotnet-sql-cache.csproj", "{53F3B53D-303A-4DAA-9C38-4F55195FA5B9}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dotnet-dev-certs", "src\dotnet-dev-certs\dotnet-dev-certs.csproj", "{4FED5119-EE5C-4753-88A4-D61BDEB4D6C8}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.VisualStudio.SecretManager", "tooling\Microsoft.VisualStudio.SecretManager\Microsoft.VisualStudio.SecretManager.csproj", "{5E117F2E-7152-447F-BF47-59F759EEF3A7}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tooling", "tooling", "{62826851-7D74-4F1E-B7D1-12553B789CD8}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.VisualStudio.SecretManager.TestExtension", "tooling\Microsoft.VisualStudio.SecretManager.TestExtension\Microsoft.VisualStudio.SecretManager.TestExtension.csproj", "{965F8820-F809-4081-9090-1AEC903F291B}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.DeveloperCertificates.XPlat", "src\Microsoft.AspNetCore.DeveloperCertificates.XPlat\Microsoft.AspNetCore.DeveloperCertificates.XPlat.csproj", "{96E71881-1465-44F5-B4B7-DF9B370FFD02}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.HttpRepl", "src\Microsoft.HttpRepl\Microsoft.HttpRepl.csproj", "{4725BEAD-34F0-43C1-BF46-7AB16B4DE81D}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Repl", "src\Microsoft.Repl\Microsoft.Repl.csproj", "{EE9A6128-3DE2-4206-A5A4-3ED935084590}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Repl.Tests", "test\Microsoft.Repl.Tests\Microsoft.Repl.Tests.csproj", "{59C2B354-3B5E-40EB-A7BC-74583A5707CA}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.HttpRepl.Tests", "test\Microsoft.HttpRepl.Tests\Microsoft.HttpRepl.Tests.csproj", "{BE7CC4CD-CD76-4211-B593-CAC84407162A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
DebugNoVSIX|Any CPU = DebugNoVSIX|Any CPU
Release|Any CPU = Release|Any CPU
ReleaseNoVSIX|Any CPU = ReleaseNoVSIX|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{8A8CEABC-AC47-43FF-A5DF-69224F7E1F46}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8A8CEABC-AC47-43FF-A5DF-69224F7E1F46}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8A8CEABC-AC47-43FF-A5DF-69224F7E1F46}.DebugNoVSIX|Any CPU.ActiveCfg = Debug|Any CPU
{8A8CEABC-AC47-43FF-A5DF-69224F7E1F46}.DebugNoVSIX|Any CPU.Build.0 = Debug|Any CPU
{8A8CEABC-AC47-43FF-A5DF-69224F7E1F46}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8A8CEABC-AC47-43FF-A5DF-69224F7E1F46}.Release|Any CPU.Build.0 = Release|Any CPU
{8A8CEABC-AC47-43FF-A5DF-69224F7E1F46}.ReleaseNoVSIX|Any CPU.ActiveCfg = Release|Any CPU
{8A8CEABC-AC47-43FF-A5DF-69224F7E1F46}.ReleaseNoVSIX|Any CPU.Build.0 = Release|Any CPU
{16BADE2F-1184-4518-8A70-B68A19D0805B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{16BADE2F-1184-4518-8A70-B68A19D0805B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{16BADE2F-1184-4518-8A70-B68A19D0805B}.DebugNoVSIX|Any CPU.ActiveCfg = Debug|Any CPU
{16BADE2F-1184-4518-8A70-B68A19D0805B}.DebugNoVSIX|Any CPU.Build.0 = Debug|Any CPU
{16BADE2F-1184-4518-8A70-B68A19D0805B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{16BADE2F-1184-4518-8A70-B68A19D0805B}.Release|Any CPU.Build.0 = Release|Any CPU
{16BADE2F-1184-4518-8A70-B68A19D0805B}.ReleaseNoVSIX|Any CPU.ActiveCfg = Release|Any CPU
{16BADE2F-1184-4518-8A70-B68A19D0805B}.ReleaseNoVSIX|Any CPU.Build.0 = Release|Any CPU
{8730E848-CA0F-4E0A-9A2F-BC22AD0B2C4E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8730E848-CA0F-4E0A-9A2F-BC22AD0B2C4E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8730E848-CA0F-4E0A-9A2F-BC22AD0B2C4E}.DebugNoVSIX|Any CPU.ActiveCfg = Debug|Any CPU
{8730E848-CA0F-4E0A-9A2F-BC22AD0B2C4E}.DebugNoVSIX|Any CPU.Build.0 = Debug|Any CPU
{8730E848-CA0F-4E0A-9A2F-BC22AD0B2C4E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8730E848-CA0F-4E0A-9A2F-BC22AD0B2C4E}.Release|Any CPU.Build.0 = Release|Any CPU
{8730E848-CA0F-4E0A-9A2F-BC22AD0B2C4E}.ReleaseNoVSIX|Any CPU.ActiveCfg = Release|Any CPU
{8730E848-CA0F-4E0A-9A2F-BC22AD0B2C4E}.ReleaseNoVSIX|Any CPU.Build.0 = Release|Any CPU
{7B331122-83B1-4F08-A119-DC846959844C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7B331122-83B1-4F08-A119-DC846959844C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7B331122-83B1-4F08-A119-DC846959844C}.DebugNoVSIX|Any CPU.ActiveCfg = Debug|Any CPU
{7B331122-83B1-4F08-A119-DC846959844C}.DebugNoVSIX|Any CPU.Build.0 = Debug|Any CPU
{7B331122-83B1-4F08-A119-DC846959844C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7B331122-83B1-4F08-A119-DC846959844C}.Release|Any CPU.Build.0 = Release|Any CPU
{7B331122-83B1-4F08-A119-DC846959844C}.ReleaseNoVSIX|Any CPU.ActiveCfg = Release|Any CPU
{7B331122-83B1-4F08-A119-DC846959844C}.ReleaseNoVSIX|Any CPU.Build.0 = Release|Any CPU
{8A2E6961-6B12-4A8E-8215-3E7301D52EAC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8A2E6961-6B12-4A8E-8215-3E7301D52EAC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8A2E6961-6B12-4A8E-8215-3E7301D52EAC}.DebugNoVSIX|Any CPU.ActiveCfg = Debug|Any CPU
{8A2E6961-6B12-4A8E-8215-3E7301D52EAC}.DebugNoVSIX|Any CPU.Build.0 = Debug|Any CPU
{8A2E6961-6B12-4A8E-8215-3E7301D52EAC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8A2E6961-6B12-4A8E-8215-3E7301D52EAC}.Release|Any CPU.Build.0 = Release|Any CPU
{8A2E6961-6B12-4A8E-8215-3E7301D52EAC}.ReleaseNoVSIX|Any CPU.ActiveCfg = Release|Any CPU
{8A2E6961-6B12-4A8E-8215-3E7301D52EAC}.ReleaseNoVSIX|Any CPU.Build.0 = Release|Any CPU
{53F3B53D-303A-4DAA-9C38-4F55195FA5B9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{53F3B53D-303A-4DAA-9C38-4F55195FA5B9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{53F3B53D-303A-4DAA-9C38-4F55195FA5B9}.DebugNoVSIX|Any CPU.ActiveCfg = Debug|Any CPU
{53F3B53D-303A-4DAA-9C38-4F55195FA5B9}.DebugNoVSIX|Any CPU.Build.0 = Debug|Any CPU
{53F3B53D-303A-4DAA-9C38-4F55195FA5B9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{53F3B53D-303A-4DAA-9C38-4F55195FA5B9}.Release|Any CPU.Build.0 = Release|Any CPU
{53F3B53D-303A-4DAA-9C38-4F55195FA5B9}.ReleaseNoVSIX|Any CPU.ActiveCfg = Release|Any CPU
{53F3B53D-303A-4DAA-9C38-4F55195FA5B9}.ReleaseNoVSIX|Any CPU.Build.0 = Release|Any CPU
{4FED5119-EE5C-4753-88A4-D61BDEB4D6C8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4FED5119-EE5C-4753-88A4-D61BDEB4D6C8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4FED5119-EE5C-4753-88A4-D61BDEB4D6C8}.DebugNoVSIX|Any CPU.ActiveCfg = Debug|Any CPU
{4FED5119-EE5C-4753-88A4-D61BDEB4D6C8}.DebugNoVSIX|Any CPU.Build.0 = Debug|Any CPU
{4FED5119-EE5C-4753-88A4-D61BDEB4D6C8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4FED5119-EE5C-4753-88A4-D61BDEB4D6C8}.Release|Any CPU.Build.0 = Release|Any CPU
{4FED5119-EE5C-4753-88A4-D61BDEB4D6C8}.ReleaseNoVSIX|Any CPU.ActiveCfg = Release|Any CPU
{4FED5119-EE5C-4753-88A4-D61BDEB4D6C8}.ReleaseNoVSIX|Any CPU.Build.0 = Release|Any CPU
{5E117F2E-7152-447F-BF47-59F759EEF3A7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5E117F2E-7152-447F-BF47-59F759EEF3A7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5E117F2E-7152-447F-BF47-59F759EEF3A7}.DebugNoVSIX|Any CPU.ActiveCfg = Debug|Any CPU
{5E117F2E-7152-447F-BF47-59F759EEF3A7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5E117F2E-7152-447F-BF47-59F759EEF3A7}.Release|Any CPU.Build.0 = Release|Any CPU
{5E117F2E-7152-447F-BF47-59F759EEF3A7}.ReleaseNoVSIX|Any CPU.ActiveCfg = Release|Any CPU
{965F8820-F809-4081-9090-1AEC903F291B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{965F8820-F809-4081-9090-1AEC903F291B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{965F8820-F809-4081-9090-1AEC903F291B}.DebugNoVSIX|Any CPU.ActiveCfg = Debug|Any CPU
{965F8820-F809-4081-9090-1AEC903F291B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{965F8820-F809-4081-9090-1AEC903F291B}.Release|Any CPU.Build.0 = Release|Any CPU
{965F8820-F809-4081-9090-1AEC903F291B}.ReleaseNoVSIX|Any CPU.ActiveCfg = Release|Any CPU
{96E71881-1465-44F5-B4B7-DF9B370FFD02}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{96E71881-1465-44F5-B4B7-DF9B370FFD02}.Debug|Any CPU.Build.0 = Debug|Any CPU
{96E71881-1465-44F5-B4B7-DF9B370FFD02}.DebugNoVSIX|Any CPU.ActiveCfg = Debug|Any CPU
{96E71881-1465-44F5-B4B7-DF9B370FFD02}.DebugNoVSIX|Any CPU.Build.0 = Debug|Any CPU
{96E71881-1465-44F5-B4B7-DF9B370FFD02}.Release|Any CPU.ActiveCfg = Release|Any CPU
{96E71881-1465-44F5-B4B7-DF9B370FFD02}.Release|Any CPU.Build.0 = Release|Any CPU
{96E71881-1465-44F5-B4B7-DF9B370FFD02}.ReleaseNoVSIX|Any CPU.ActiveCfg = Release|Any CPU
{96E71881-1465-44F5-B4B7-DF9B370FFD02}.ReleaseNoVSIX|Any CPU.Build.0 = Release|Any CPU
{4725BEAD-34F0-43C1-BF46-7AB16B4DE81D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4725BEAD-34F0-43C1-BF46-7AB16B4DE81D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4725BEAD-34F0-43C1-BF46-7AB16B4DE81D}.DebugNoVSIX|Any CPU.ActiveCfg = Debug|Any CPU
{4725BEAD-34F0-43C1-BF46-7AB16B4DE81D}.DebugNoVSIX|Any CPU.Build.0 = Debug|Any CPU
{4725BEAD-34F0-43C1-BF46-7AB16B4DE81D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4725BEAD-34F0-43C1-BF46-7AB16B4DE81D}.Release|Any CPU.Build.0 = Release|Any CPU
{4725BEAD-34F0-43C1-BF46-7AB16B4DE81D}.ReleaseNoVSIX|Any CPU.ActiveCfg = Release|Any CPU
{4725BEAD-34F0-43C1-BF46-7AB16B4DE81D}.ReleaseNoVSIX|Any CPU.Build.0 = Release|Any CPU
{EE9A6128-3DE2-4206-A5A4-3ED935084590}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EE9A6128-3DE2-4206-A5A4-3ED935084590}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EE9A6128-3DE2-4206-A5A4-3ED935084590}.DebugNoVSIX|Any CPU.ActiveCfg = Debug|Any CPU
{EE9A6128-3DE2-4206-A5A4-3ED935084590}.DebugNoVSIX|Any CPU.Build.0 = Debug|Any CPU
{EE9A6128-3DE2-4206-A5A4-3ED935084590}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EE9A6128-3DE2-4206-A5A4-3ED935084590}.Release|Any CPU.Build.0 = Release|Any CPU
{EE9A6128-3DE2-4206-A5A4-3ED935084590}.ReleaseNoVSIX|Any CPU.ActiveCfg = Release|Any CPU
{EE9A6128-3DE2-4206-A5A4-3ED935084590}.ReleaseNoVSIX|Any CPU.Build.0 = Release|Any CPU
{59C2B354-3B5E-40EB-A7BC-74583A5707CA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{59C2B354-3B5E-40EB-A7BC-74583A5707CA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{59C2B354-3B5E-40EB-A7BC-74583A5707CA}.DebugNoVSIX|Any CPU.ActiveCfg = Debug|Any CPU
{59C2B354-3B5E-40EB-A7BC-74583A5707CA}.DebugNoVSIX|Any CPU.Build.0 = Debug|Any CPU
{59C2B354-3B5E-40EB-A7BC-74583A5707CA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{59C2B354-3B5E-40EB-A7BC-74583A5707CA}.Release|Any CPU.Build.0 = Release|Any CPU
{59C2B354-3B5E-40EB-A7BC-74583A5707CA}.ReleaseNoVSIX|Any CPU.ActiveCfg = Release|Any CPU
{59C2B354-3B5E-40EB-A7BC-74583A5707CA}.ReleaseNoVSIX|Any CPU.Build.0 = Release|Any CPU
{BE7CC4CD-CD76-4211-B593-CAC84407162A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BE7CC4CD-CD76-4211-B593-CAC84407162A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BE7CC4CD-CD76-4211-B593-CAC84407162A}.DebugNoVSIX|Any CPU.ActiveCfg = Debug|Any CPU
{BE7CC4CD-CD76-4211-B593-CAC84407162A}.DebugNoVSIX|Any CPU.Build.0 = Debug|Any CPU
{BE7CC4CD-CD76-4211-B593-CAC84407162A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BE7CC4CD-CD76-4211-B593-CAC84407162A}.Release|Any CPU.Build.0 = Release|Any CPU
{BE7CC4CD-CD76-4211-B593-CAC84407162A}.ReleaseNoVSIX|Any CPU.ActiveCfg = Release|Any CPU
{BE7CC4CD-CD76-4211-B593-CAC84407162A}.ReleaseNoVSIX|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{8A8CEABC-AC47-43FF-A5DF-69224F7E1F46} = {66517987-2A5A-4330-B130-207039378FD4}
{16BADE2F-1184-4518-8A70-B68A19D0805B} = {F5B382BC-258F-46E1-AC3D-10E5CCD55134}
{8730E848-CA0F-4E0A-9A2F-BC22AD0B2C4E} = {66517987-2A5A-4330-B130-207039378FD4}
{7B331122-83B1-4F08-A119-DC846959844C} = {F5B382BC-258F-46E1-AC3D-10E5CCD55134}
{8A2E6961-6B12-4A8E-8215-3E7301D52EAC} = {F5B382BC-258F-46E1-AC3D-10E5CCD55134}
{53F3B53D-303A-4DAA-9C38-4F55195FA5B9} = {66517987-2A5A-4330-B130-207039378FD4}
{4FED5119-EE5C-4753-88A4-D61BDEB4D6C8} = {66517987-2A5A-4330-B130-207039378FD4}
{5E117F2E-7152-447F-BF47-59F759EEF3A7} = {62826851-7D74-4F1E-B7D1-12553B789CD8}
{965F8820-F809-4081-9090-1AEC903F291B} = {62826851-7D74-4F1E-B7D1-12553B789CD8}
{96E71881-1465-44F5-B4B7-DF9B370FFD02} = {66517987-2A5A-4330-B130-207039378FD4}
{4725BEAD-34F0-43C1-BF46-7AB16B4DE81D} = {66517987-2A5A-4330-B130-207039378FD4}
{EE9A6128-3DE2-4206-A5A4-3ED935084590} = {66517987-2A5A-4330-B130-207039378FD4}
{59C2B354-3B5E-40EB-A7BC-74583A5707CA} = {F5B382BC-258F-46E1-AC3D-10E5CCD55134}
{BE7CC4CD-CD76-4211-B593-CAC84407162A} = {F5B382BC-258F-46E1-AC3D-10E5CCD55134}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {57C07F14-2EAC-44FF-A277-B9221B4B2BF7}
EndGlobalSection
EndGlobal
================================================
FILE: LICENSE.txt
================================================
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright (c) .NET Foundation and Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
================================================
FILE: NuGet.config
================================================
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear />
<!-- Restore sources should be defined in build/sources.props. -->
</packageSources>
</configuration>
================================================
FILE: NuGetPackageVerifier.json
================================================
{
"adx": {
"rules": [
"AdxVerificationCompositeRule"
],
"packages": {
"dotnet-watch": {
"packageTypes": [
"DotnetTool"
]
},
"dotnet-sql-cache": {
"packageTypes": [
"DotnetTool"
]
},
"dotnet-user-secrets": {
"packageTypes": [
"DotnetTool"
]
},
"dotnet-dev-certs": {
"packageTypes": [
"DotnetTool"
]
},
"Microsoft.AspNetCore.DeveloperCertificates.XPlat": {
"Exclusions": {
"DOC_MISSING": {
"lib/netcoreapp3.0/Microsoft.AspNetCore.DeveloperCertificates.XPlat.dll": "Docs not required to shipoob package"
}
}
}
}
},
"Default": {
"rules": [
"DefaultCompositeRule"
]
}
}
================================================
FILE: README.md
================================================
DotNetTools [Archived]
======================
**This GitHub project has been archived.** Ongoing development on this project can be found in <https://github.com/aspnet/AspNetCore>.
This project is part of ASP.NET Core. You can find samples, documentation and getting started instructions for ASP.NET Core at <https://docs.asp.net>.
## Projects
The repository contains command-line tools for ASP.NET Core that are bundled* in the [.NET Core CLI](https://github.com/dotnet/cli).
Follow the links below for more details on each tool.
- [dotnet-watch](src/dotnet-watch/README.md)
- [dotnet-user-secrets](src/dotnet-user-secrets/README.md)
- [dotnet-sql-cache](src/dotnet-sql-cache/README.md)
- [dotnet-dev-certs](src/dotnet-dev-certs/README.md)
*\*This applies to .NET Core CLI 2.1.300-preview2 and up. For earlier versions of the CLI, these tools must be installed separately.*
*For 2.0 CLI and earlier, see <https://github.com/aspnet/DotNetTools/tree/rel/2.0.0/README.md> for details.*
*For 2.1.300-preview1 CLI, see <https://github.com/aspnet/DotNetTools/tree/2.1.0-preview1-final/README.md> for details.*
## Usage
The command line tools can be invoked as a subcommand of `dotnet`.
```sh
dotnet watch
dotnet user-secrets
dotnet sql-cache
dotnet dev-certs
```
Add `--help` to see more details. For example,
```
dotnet watch --help
```
================================================
FILE: build/VSIX.props
================================================
<!--
Workaround for https://github.com/dotnet/project-system/issues/2129 - VS does not support using MSBuild variables for PackageReference items.
Using a variable breaks a bunch of stuff, so this file is injected into the VSIX csproj only when building on commandline.
-->
<Project ToolsVersion="15.0">
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="$(VisualStudio_NewtonsoftJsonPackageVersion)" />
</ItemGroup>
</Project>
================================================
FILE: build/VSIX.targets
================================================
<Project>
<PropertyGroup>
<!-- Don't build the VSIX by default in this branch anymore. You can still build the fix by adding /p:BuildVSIX=true. -->
<BuildVSIX Condition="'$(BuildVSIX)' ==''">false</BuildVSIX>
<RestoreDependsOn Condition="'$(OS)'=='Windows_NT' AND '$(BuildVSIX)' == 'true'">$(RestoreDependsOn);RestoreVSIX</RestoreDependsOn>
<PackageDependsOn Condition="'$(OS)'=='Windows_NT' AND '$(BuildVSIX)' == 'true'">$(PackageDependsOn);PackageVSIX</PackageDependsOn>
<GetArtifactInfoDependsOn Condition="'$(OS)'=='Windows_NT' AND '$(BuildVSIX)' == 'true'">$(GetArtifactInfoDependsOn);GetVSIXArtifactInfo</GetArtifactInfoDependsOn>
<VSIXName>Microsoft.VisualStudio.SecretManager</VSIXName>
<VSIXProject>$(RepositoryRoot)tooling\$(VSIXName)\$(VSIXName).csproj</VSIXProject>
<VSIXOutputPath>$(BuildDir)$(VSIXName).vsix</VSIXOutputPath>
<VSIXManifestOutputPath>$(BuildDir)$(VSIXName).json</VSIXManifestOutputPath>
<VSIXSymbolsOutputPath>$(BuildDir)$(VSIXName).pdb</VSIXSymbolsOutputPath>
<VSIXArtifactCategory>shipoob</VSIXArtifactCategory>
</PropertyGroup>
<Target
Name="GenerateVSIX"
DependsOnTargets="RestoreVSIX;PackageVSIX"
Condition="'$(OS)'=='Windows_NT'" />
<Target Name="GetVSIXArtifactInfo">
<ItemGroup>
<ArtifactInfo Include="$(VSIXOutputPath)">
<ArtifactType>VsixPackage</ArtifactType>
<Version>$(PackageVersion)</Version>
<Category>$(VSIXArtifactCategory)</Category>
<PackageId>$(VSIXName)</PackageId>
</ArtifactInfo>
<ArtifactInfo Include="$(VSIXManifestOutputPath)">
<ArtifactType>VsixPackageManifestFile</ArtifactType>
<Category>$(VSIXArtifactCategory)</Category>
<Dependencies>$(VSIXName).vsix</Dependencies>
<PackageId>$(VSIXName)</PackageId>
</ArtifactInfo>
<ArtifactInfo Include="$(VSIXSymbolsOutputPath)">
<ArtifactType>SymbolsFile</ArtifactType>
<Category>$(VSIXArtifactCategory)</Category>
<Dependencies>$(VSIXName).vsix</Dependencies>
<DebugType>full</DebugType>
</ArtifactInfo>
<FilesToSign Include="$(VSIXOutputPath)" Certificate="$(VsixSigningCertName)" IsContainer="true" />
<FilesToSign Include="$(RepositoryRoot)tooling/Microsoft.VisualStudio.SecretManager/bin/$(Configuration)/Microsoft.VisualStudio.SecretManager.dll" Certificate="$(AssemblySigningCertName)" />
<FilesToExcludeFromSigning Include="$(VSIXManifestOutputPath)" />
<FilesToExcludeFromSigning Include="$(VSIXSymbolsOutputPath)" />
</ItemGroup>
</Target>
<!--
VisualStudioMSBuildx86Path is set by the GetToolsets target in KoreBuild if a version of VS matching the requirements in korebuild.json is found.
-->
<Target Name="RestoreVSIX" DependsOnTargets="GetToolsets">
<PropertyGroup>
<VSIXResponseFilePath>$(LogOutputDir)vsix-restore.rsp</VSIXResponseFilePath>
</PropertyGroup>
<ItemGroup>
<MSBuildArguments Remove="@(MSBuildArguments)" />
<MSBuildArguments Include="
$(VSIXProject);
/t:Restore;
/m;
/v:m;
/p:Configuration=$(Configuration);
/p:BuildNumber=$(BuildNumber);
/p:PackageReferencePropsPath=$(MSBuildThisFileDirectory)VSIX.props;" />
<MSBuildArguments Include="/p:DotNetPackageVersionPropsPath=$(DotNetPackageVersionPropsPath)" Condition="'$(DotNetPackageVersionPropsPath)' != ''" />
<MSBuildArguments Include="/p:DotNetRestoreSourcePropsPath=$(DotNetRestoreSourcePropsPath)" Condition="'$(DotNetRestoreSourcePropsPath)' != ''" />
</ItemGroup>
<MakeDir Directories="$(LogOutputDir)" />
<WriteLinesToFile
File="$(VSIXResponseFilePath)"
Lines="@(MSBuildArguments)"
Overwrite="true" />
<Exec Command=""$(VisualStudioMSBuildx86Path)" @"$(VSIXResponseFilePath)""
Condition="'$(VisualStudioMSBuildx86Path)' != ''" />
</Target>
<Target Name="PackageVSIX" DependsOnTargets="GetToolsets">
<Error Text="Could not find a version of Visual Studio that has the Visual Studio SDK installed. This is required to build the SecretManager VSIX."
Condition="'$(VisualStudioMSBuildx86Path)' == ''" />
<PropertyGroup>
<VSIXLogFilePath>$(LogOutputDir)vsix.log</VSIXLogFilePath>
<VSIXResponseFilePath>$(LogOutputDir)vsix-build.rsp</VSIXResponseFilePath>
</PropertyGroup>
<ItemGroup>
<MSBuildArguments Remove="@(MSBuildArguments)" />
<MSBuildArguments Include="
$(VSIXProject);
/m;
/v:M;
/fl;
/flp:LogFile=$(VSIXLogFilePath);
/p:DeployExtension=false;
/p:TargetVSIXContainer=$(VSIXOutputPath);
/p:Configuration=$(Configuration);
/p:SymbolsPublishDir=$(BuildDir);
/p:PackageReferencePropsPath=$(MSBuildThisFileDirectory)VSIX.props;" />
</ItemGroup>
<MakeDir Directories="$(LogOutputDir)" />
<WriteLinesToFile
File="$(VSIXResponseFilePath)"
Lines="@(MSBuildArguments)"
Overwrite="true" />
<Exec Command=""$(VisualStudioMSBuildx86Path)" @"$(VSIXResponseFilePath)""
Condition="'$(VisualStudioMSBuildx86Path)' != ''" />
</Target>
</Project>
================================================
FILE: build/dependencies.props
================================================
<Project>
<PropertyGroup>
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
</PropertyGroup>
<PropertyGroup Label="Package Versions">
<InternalAspNetCoreSdkPackageVersion>3.0.0-alpha1-20181026.5</InternalAspNetCoreSdkPackageVersion>
<MicrosoftAspNetCoreCertificatesGenerationSourcesPackageVersion>3.0.0-alpha1-10657</MicrosoftAspNetCoreCertificatesGenerationSourcesPackageVersion>
<MicrosoftAspNetCoreTestingPackageVersion>3.0.0-alpha1-10657</MicrosoftAspNetCoreTestingPackageVersion>
<MicrosoftExtensionsCommandLineUtilsSourcesPackageVersion>3.0.0-alpha1-10657</MicrosoftExtensionsCommandLineUtilsSourcesPackageVersion>
<MicrosoftExtensionsConfigurationUserSecretsPackageVersion>3.0.0-alpha1-10664</MicrosoftExtensionsConfigurationUserSecretsPackageVersion>
<MicrosoftExtensionsProcessSourcesPackageVersion>3.0.0-alpha1-10657</MicrosoftExtensionsProcessSourcesPackageVersion>
<MicrosoftNETCoreApp30PackageVersion>3.0.0-preview1-26907-05</MicrosoftNETCoreApp30PackageVersion>
<MicrosoftNETTestSdkPackageVersion>15.9.0</MicrosoftNETTestSdkPackageVersion>
<MicrosoftWebApiClientPackageVersion>5.2.6</MicrosoftWebApiClientPackageVersion>
<NETStandardLibrary20PackageVersion>2.0.3</NETStandardLibrary20PackageVersion>
<NewtonsoftJsonPackageVersion>11.0.2</NewtonsoftJsonPackageVersion>
<SystemDataSqlClientPackageVersion>4.6.0-preview1-26907-04</SystemDataSqlClientPackageVersion>
<SystemSecurityCryptographyCngPackageVersion>4.6.0-preview1-26907-04</SystemSecurityCryptographyCngPackageVersion>
<VisualStudio_NewtonsoftJsonPackageVersion>9.0.1</VisualStudio_NewtonsoftJsonPackageVersion>
<XunitPackageVersion>2.4.0</XunitPackageVersion>
<XunitRunnerVisualStudioPackageVersion>2.4.0</XunitRunnerVisualStudioPackageVersion>
</PropertyGroup>
<Import Project="$(DotNetPackageVersionPropsPath)" Condition=" '$(DotNetPackageVersionPropsPath)' != '' " />
<PropertyGroup Label="Package Versions: Pinned" />
</Project>
================================================
FILE: build/repo.props
================================================
<Project>
<Import Project="dependencies.props" />
<ItemGroup>
<DotNetCoreRuntime Include="$(MicrosoftNETCoreApp30PackageVersion)" />
</ItemGroup>
<PropertyGroup>
<!-- These properties are use by the automation that updates dependencies.props -->
<LineupPackageId>Internal.AspNetCore.Universe.Lineup</LineupPackageId>
<LineupPackageRestoreSource>https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json</LineupPackageRestoreSource>
</PropertyGroup>
</Project>
================================================
FILE: build/repo.targets
================================================
<Project>
<Import Project="VSIX.targets" />
<ItemGroup>
<Solutions Update="$(RepositoryRoot)DotNetTools.sln">
<!-- the 'DebugNoVSIX' and 'ReleaseNoVSIX' configurations exclude the VSIX project, which doesn't build with Microsoft.NET.Sdk yet. -->
<AdditionalProperties>Configuration=$(Configuration)NoVSIX</AdditionalProperties>
</Solutions>
</ItemGroup>
</Project>
================================================
FILE: build/sources.props
================================================
<Project>
<Import Project="$(DotNetRestoreSourcePropsPath)" Condition="'$(DotNetRestoreSourcePropsPath)' != ''"/>
<PropertyGroup Label="RestoreSources">
<RestoreSources>$(DotNetRestoreSources)</RestoreSources>
<RestoreSources Condition="'$(DotNetBuildOffline)' != 'true' AND '$(AspNetUniverseBuildOffline)' != 'true' ">
$(RestoreSources);
https://dotnet.myget.org/F/dotnet-core/api/v3/index.json;
https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json;
https://dotnet.myget.org/F/aspnetcore-tools/api/v3/index.json;
https://vside.myget.org/F/vssdk/api/v3/index.json;
https://vside.myget.org/F/devcore/api/v3/index.json
</RestoreSources>
<RestoreSources Condition="'$(DotNetBuildOffline)' != 'true'">
$(RestoreSources);
https://api.nuget.org/v3/index.json;
</RestoreSources>
</PropertyGroup>
</Project>
================================================
FILE: build.cmd
================================================
@ECHO OFF
PowerShell -NoProfile -NoLogo -ExecutionPolicy unrestricted -Command "[System.Threading.Thread]::CurrentThread.CurrentCulture = ''; [System.Threading.Thread]::CurrentThread.CurrentUICulture = '';& '%~dp0run.ps1' default-build %*; exit $LASTEXITCODE"
================================================
FILE: build.sh
================================================
#!/usr/bin/env bash
set -euo pipefail
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# Call "sync" between "chmod" and execution to prevent "text file busy" error in Docker (aufs)
chmod +x "$DIR/run.sh"; sync
"$DIR/run.sh" default-build "$@"
================================================
FILE: korebuild-lock.txt
================================================
version:3.0.0-alpha1-20181026.5
commithash:0c0410ef8b17d5177a05b50cb66f9ad89ce15e32
================================================
FILE: korebuild.json
================================================
{
"$schema": "https://raw.githubusercontent.com/aspnet/BuildTools/master/tools/korebuild.schema.json",
"channel": "master",
"toolsets": {
"visualstudio": {
"required": [
"windows"
],
"includePrerelease": true,
"versionRange": "[15.0.26730.03, 16.0)",
"requiredWorkloads": [
"Microsoft.VisualStudio.Component.VSSDK"
]
}
}
}
================================================
FILE: run.cmd
================================================
@ECHO OFF
PowerShell -NoProfile -NoLogo -ExecutionPolicy unrestricted -Command "[System.Threading.Thread]::CurrentThread.CurrentCulture = ''; [System.Threading.Thread]::CurrentThread.CurrentUICulture = '';& '%~dp0run.ps1' %*; exit $LASTEXITCODE"
================================================
FILE: run.ps1
================================================
#!/usr/bin/env powershell
#requires -version 4
<#
.SYNOPSIS
Executes KoreBuild commands.
.DESCRIPTION
Downloads korebuild if required. Then executes the KoreBuild command. To see available commands, execute with `-Command help`.
.PARAMETER Command
The KoreBuild command to run.
.PARAMETER Path
The folder to build. Defaults to the folder containing this script.
.PARAMETER Channel
The channel of KoreBuild to download. Overrides the value from the config file.
.PARAMETER DotNetHome
The directory where .NET Core tools will be stored.
.PARAMETER ToolsSource
The base url where build tools can be downloaded. Overrides the value from the config file.
.PARAMETER Update
Updates KoreBuild to the latest version even if a lock file is present.
.PARAMETER Reinstall
Re-installs KoreBuild
.PARAMETER ConfigFile
The path to the configuration file that stores values. Defaults to korebuild.json.
.PARAMETER ToolsSourceSuffix
The Suffix to append to the end of the ToolsSource. Useful for query strings in blob stores.
.PARAMETER CI
Sets up CI specific settings and variables.
.PARAMETER Arguments
Arguments to be passed to the command
.NOTES
This function will create a file $PSScriptRoot/korebuild-lock.txt. This lock file can be committed to source, but does not have to be.
When the lockfile is not present, KoreBuild will create one using latest available version from $Channel.
The $ConfigFile is expected to be an JSON file. It is optional, and the configuration values in it are optional as well. Any options set
in the file are overridden by command line parameters.
.EXAMPLE
Example config file:
```json
{
"$schema": "https://raw.githubusercontent.com/aspnet/BuildTools/master/tools/korebuild.schema.json",
"channel": "master",
"toolsSource": "https://aspnetcore.blob.core.windows.net/buildtools"
}
```
#>
[CmdletBinding(PositionalBinding = $false)]
param(
[Parameter(Mandatory = $true, Position = 0)]
[string]$Command,
[string]$Path = $PSScriptRoot,
[Alias('c')]
[string]$Channel,
[Alias('d')]
[string]$DotNetHome,
[Alias('s')]
[string]$ToolsSource,
[Alias('u')]
[switch]$Update,
[switch]$Reinstall,
[string]$ToolsSourceSuffix,
[string]$ConfigFile = $null,
[switch]$CI,
[Parameter(ValueFromRemainingArguments = $true)]
[string[]]$Arguments
)
Set-StrictMode -Version 2
$ErrorActionPreference = 'Stop'
#
# Functions
#
function Get-KoreBuild {
$lockFile = Join-Path $Path 'korebuild-lock.txt'
if (!(Test-Path $lockFile) -or $Update) {
Get-RemoteFile "$ToolsSource/korebuild/channels/$Channel/latest.txt" $lockFile $ToolsSourceSuffix
}
$version = Get-Content $lockFile | Where-Object { $_ -like 'version:*' } | Select-Object -first 1
if (!$version) {
Write-Error "Failed to parse version from $lockFile. Expected a line that begins with 'version:'"
}
$version = $version.TrimStart('version:').Trim()
$korebuildPath = Join-Paths $DotNetHome ('buildtools', 'korebuild', $version)
if ($Reinstall -and (Test-Path $korebuildPath)) {
Remove-Item -Force -Recurse $korebuildPath
}
if (!(Test-Path $korebuildPath)) {
Write-Host -ForegroundColor Magenta "Downloading KoreBuild $version"
New-Item -ItemType Directory -Path $korebuildPath | Out-Null
$remotePath = "$ToolsSource/korebuild/artifacts/$version/korebuild.$version.zip"
try {
$tmpfile = Join-Path ([IO.Path]::GetTempPath()) "KoreBuild-$([guid]::NewGuid()).zip"
Get-RemoteFile $remotePath $tmpfile $ToolsSourceSuffix
if (Get-Command -Name 'Microsoft.PowerShell.Archive\Expand-Archive' -ErrorAction Ignore) {
# Use built-in commands where possible as they are cross-plat compatible
Microsoft.PowerShell.Archive\Expand-Archive -Path $tmpfile -DestinationPath $korebuildPath
}
else {
# Fallback to old approach for old installations of PowerShell
Add-Type -AssemblyName System.IO.Compression.FileSystem
[System.IO.Compression.ZipFile]::ExtractToDirectory($tmpfile, $korebuildPath)
}
}
catch {
Remove-Item -Recurse -Force $korebuildPath -ErrorAction Ignore
throw
}
finally {
Remove-Item $tmpfile -ErrorAction Ignore
}
}
return $korebuildPath
}
function Join-Paths([string]$path, [string[]]$childPaths) {
$childPaths | ForEach-Object { $path = Join-Path $path $_ }
return $path
}
function Get-RemoteFile([string]$RemotePath, [string]$LocalPath, [string]$RemoteSuffix) {
if ($RemotePath -notlike 'http*') {
Copy-Item $RemotePath $LocalPath
return
}
$retries = 10
while ($retries -gt 0) {
$retries -= 1
try {
Invoke-WebRequest -UseBasicParsing -Uri $($RemotePath + $RemoteSuffix) -OutFile $LocalPath
return
}
catch {
Write-Verbose "Request failed. $retries retries remaining"
}
}
Write-Error "Download failed: '$RemotePath'."
}
#
# Main
#
# Load configuration or set defaults
$Path = Resolve-Path $Path
if (!$ConfigFile) { $ConfigFile = Join-Path $Path 'korebuild.json' }
if (Test-Path $ConfigFile) {
try {
$config = Get-Content -Raw -Encoding UTF8 -Path $ConfigFile | ConvertFrom-Json
if ($config) {
if (!($Channel) -and (Get-Member -Name 'channel' -InputObject $config)) { [string] $Channel = $config.channel }
if (!($ToolsSource) -and (Get-Member -Name 'toolsSource' -InputObject $config)) { [string] $ToolsSource = $config.toolsSource}
}
}
catch {
Write-Host -ForegroundColor Red $Error[0]
Write-Error "$ConfigFile contains invalid JSON."
exit 1
}
}
if (!$DotNetHome) {
$DotNetHome = if ($env:DOTNET_HOME) { $env:DOTNET_HOME } `
elseif ($CI) { Join-Path $PSScriptRoot '.dotnet' } `
elseif ($env:USERPROFILE) { Join-Path $env:USERPROFILE '.dotnet'} `
elseif ($env:HOME) {Join-Path $env:HOME '.dotnet'}`
else { Join-Path $PSScriptRoot '.dotnet'}
}
if (!$Channel) { $Channel = 'master' }
if (!$ToolsSource) { $ToolsSource = 'https://aspnetcore.blob.core.windows.net/buildtools' }
# Execute
$korebuildPath = Get-KoreBuild
Import-Module -Force -Scope Local (Join-Path $korebuildPath 'KoreBuild.psd1')
try {
Set-KoreBuildSettings -ToolsSource $ToolsSource -DotNetHome $DotNetHome -RepoPath $Path -ConfigFile $ConfigFile -CI:$CI
Invoke-KoreBuildCommand $Command @Arguments
}
finally {
Remove-Module 'KoreBuild' -ErrorAction Ignore
}
================================================
FILE: run.sh
================================================
#!/usr/bin/env bash
set -euo pipefail
#
# variables
#
RESET="\033[0m"
RED="\033[0;31m"
YELLOW="\033[0;33m"
MAGENTA="\033[0;95m"
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
verbose=false
update=false
reinstall=false
repo_path="$DIR"
channel=''
tools_source=''
tools_source_suffix=''
ci=false
#
# Functions
#
__usage() {
echo "Usage: $(basename "${BASH_SOURCE[0]}") command [options] [[--] <Arguments>...]"
echo ""
echo "Arguments:"
echo " command The command to be run."
echo " <Arguments>... Arguments passed to the command. Variable number of arguments allowed."
echo ""
echo "Options:"
echo " --verbose Show verbose output."
echo " -c|--channel <CHANNEL> The channel of KoreBuild to download. Overrides the value from the config file.."
echo " --config-file <FILE> The path to the configuration file that stores values. Defaults to korebuild.json."
echo " -d|--dotnet-home <DIR> The directory where .NET Core tools will be stored. Defaults to '\$DOTNET_HOME' or '\$HOME/.dotnet."
echo " --path <PATH> The directory to build. Defaults to the directory containing the script."
echo " -s|--tools-source|-ToolsSource <URL> The base url where build tools can be downloaded. Overrides the value from the config file."
echo " --tools-source-suffix|-ToolsSourceSuffix <SUFFIX> The suffix to append to tools-source. Useful for query strings."
echo " -u|--update Update to the latest KoreBuild even if the lock file is present."
echo " --reinstall Reinstall KoreBuild."
echo " --ci Apply CI specific settings and environment variables."
echo ""
echo "Description:"
echo " This function will create a file \$DIR/korebuild-lock.txt. This lock file can be committed to source, but does not have to be."
echo " When the lockfile is not present, KoreBuild will create one using latest available version from \$channel."
if [[ "${1:-}" != '--no-exit' ]]; then
exit 2
fi
}
get_korebuild() {
local version
local lock_file="$repo_path/korebuild-lock.txt"
if [ ! -f "$lock_file" ] || [ "$update" = true ]; then
__get_remote_file "$tools_source/korebuild/channels/$channel/latest.txt" "$lock_file" "$tools_source_suffix"
fi
version="$(grep 'version:*' -m 1 "$lock_file")"
if [[ "$version" == '' ]]; then
__error "Failed to parse version from $lock_file. Expected a line that begins with 'version:'"
return 1
fi
version="$(echo "${version#version:}" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')"
local korebuild_path="$DOTNET_HOME/buildtools/korebuild/$version"
if [ "$reinstall" = true ] && [ -d "$korebuild_path" ]; then
rm -rf "$korebuild_path"
fi
{
if [ ! -d "$korebuild_path" ]; then
mkdir -p "$korebuild_path"
local remote_path="$tools_source/korebuild/artifacts/$version/korebuild.$version.zip"
tmpfile="$(mktemp)"
echo -e "${MAGENTA}Downloading KoreBuild ${version}${RESET}"
if __get_remote_file "$remote_path" "$tmpfile" "$tools_source_suffix"; then
unzip -q -d "$korebuild_path" "$tmpfile"
fi
rm "$tmpfile" || true
fi
source "$korebuild_path/KoreBuild.sh"
} || {
if [ -d "$korebuild_path" ]; then
echo "Cleaning up after failed installation"
rm -rf "$korebuild_path" || true
fi
return 1
}
}
__error() {
echo -e "${RED}error: $*${RESET}" 1>&2
}
__warn() {
echo -e "${YELLOW}warning: $*${RESET}"
}
__machine_has() {
hash "$1" > /dev/null 2>&1
return $?
}
__get_remote_file() {
local remote_path=$1
local local_path=$2
local remote_path_suffix=$3
if [[ "$remote_path" != 'http'* ]]; then
cp "$remote_path" "$local_path"
return 0
fi
local failed=false
if __machine_has wget; then
wget --tries 10 --quiet -O "$local_path" "${remote_path}${remote_path_suffix}" || failed=true
else
failed=true
fi
if [ "$failed" = true ] && __machine_has curl; then
failed=false
curl --retry 10 -sSL -f --create-dirs -o "$local_path" "${remote_path}${remote_path_suffix}" || failed=true
fi
if [ "$failed" = true ]; then
__error "Download failed: $remote_path" 1>&2
return 1
fi
}
#
# main
#
command="${1:-}"
shift
while [[ $# -gt 0 ]]; do
case $1 in
-\?|-h|--help)
__usage --no-exit
exit 0
;;
-c|--channel|-Channel)
shift
channel="${1:-}"
[ -z "$channel" ] && __usage
;;
--config-file|-ConfigFile)
shift
config_file="${1:-}"
[ -z "$config_file" ] && __usage
if [ ! -f "$config_file" ]; then
__error "Invalid value for --config-file. $config_file does not exist."
exit 1
fi
;;
-d|--dotnet-home|-DotNetHome)
shift
DOTNET_HOME="${1:-}"
[ -z "$DOTNET_HOME" ] && __usage
;;
--path|-Path)
shift
repo_path="${1:-}"
[ -z "$repo_path" ] && __usage
;;
-s|--tools-source|-ToolsSource)
shift
tools_source="${1:-}"
[ -z "$tools_source" ] && __usage
;;
--tools-source-suffix|-ToolsSourceSuffix)
shift
tools_source_suffix="${1:-}"
[ -z "$tools_source_suffix" ] && __usage
;;
-u|--update|-Update)
update=true
;;
--reinstall|-[Rr]einstall)
reinstall=true
;;
--ci|-[Cc][Ii])
ci=true
if [[ -z "${DOTNET_HOME:-}" ]]; then
DOTNET_HOME="$DIR/.dotnet"
fi
;;
--verbose|-Verbose)
verbose=true
;;
--)
shift
break
;;
*)
break
;;
esac
shift
done
if ! __machine_has unzip; then
__error 'Missing required command: unzip'
exit 1
fi
if ! __machine_has curl && ! __machine_has wget; then
__error 'Missing required command. Either wget or curl is required.'
exit 1
fi
[ -z "${config_file:-}" ] && config_file="$repo_path/korebuild.json"
if [ -f "$config_file" ]; then
if __machine_has jq ; then
if jq '.' "$config_file" >/dev/null ; then
config_channel="$(jq -r 'select(.channel!=null) | .channel' "$config_file")"
config_tools_source="$(jq -r 'select(.toolsSource!=null) | .toolsSource' "$config_file")"
else
__error "$config_file contains invalid JSON."
exit 1
fi
elif __machine_has python ; then
if python -c "import json,codecs;obj=json.load(codecs.open('$config_file', 'r', 'utf-8-sig'))" >/dev/null ; then
config_channel="$(python -c "import json,codecs;obj=json.load(codecs.open('$config_file', 'r', 'utf-8-sig'));print(obj['channel'] if 'channel' in obj else '')")"
config_tools_source="$(python -c "import json,codecs;obj=json.load(codecs.open('$config_file', 'r', 'utf-8-sig'));print(obj['toolsSource'] if 'toolsSource' in obj else '')")"
else
__error "$config_file contains invalid JSON."
exit 1
fi
elif __machine_has python3 ; then
if python3 -c "import json,codecs;obj=json.load(codecs.open('$config_file', 'r', 'utf-8-sig'))" >/dev/null ; then
config_channel="$(python3 -c "import json,codecs;obj=json.load(codecs.open('$config_file', 'r', 'utf-8-sig'));print(obj['channel'] if 'channel' in obj else '')")"
config_tools_source="$(python3 -c "import json,codecs;obj=json.load(codecs.open('$config_file', 'r', 'utf-8-sig'));print(obj['toolsSource'] if 'toolsSource' in obj else '')")"
else
__error "$config_file contains invalid JSON."
exit 1
fi
else
__error 'Missing required command: jq or python. Could not parse the JSON file.'
exit 1
fi
[ ! -z "${config_channel:-}" ] && channel="$config_channel"
[ ! -z "${config_tools_source:-}" ] && tools_source="$config_tools_source"
fi
[ -z "${DOTNET_HOME:-}" ] && DOTNET_HOME="$HOME/.dotnet"
[ -z "$channel" ] && channel='master'
[ -z "$tools_source" ] && tools_source='https://aspnetcore.blob.core.windows.net/buildtools'
get_korebuild
set_korebuildsettings "$tools_source" "$DOTNET_HOME" "$repo_path" "$config_file" "$ci"
invoke_korebuild_command "$command" "$@"
================================================
FILE: samples/dotnet-watch/Directory.Build.props
================================================
<!-- Intentionally empty to isolate the samples. -->
<Project />
================================================
FILE: samples/dotnet-watch/Directory.Build.targets
================================================
<!-- Intentionally empty to isolate the samples. -->
<Project />
================================================
FILE: samples/dotnet-watch/LaunchAnyCommand/LaunchAnyCommand.csproj
================================================
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Watch Include="say-hello.js" />
</ItemGroup>
<Target Name="RunMyNpmCommand">
<Exec Command="npm run custom" />
</Target>
</Project>
================================================
FILE: samples/dotnet-watch/LaunchAnyCommand/README.md
================================================
Launch any command with dotnet-watch
====================================
## Prerequisites
1. Install .NET Core command line. <https://dot.net/core>
2. Install NodeJS. <https://nodejs.org>
## Usage
Open a terminal to the directory containing this project.
```
dotnet watch msbuild /t:RunMyNpmCommand
```
Changing the .csproj file, or the say-hello.js file will cause dotnet-watch to re-run the 'RunMyNpmCommand' target in MyApp.csproj.
================================================
FILE: samples/dotnet-watch/LaunchAnyCommand/package.json
================================================
{
"name": "any-command",
"version": "0.0.0",
"private": true,
"scripts": {
"custom": "node say-hello.js"
}
}
================================================
FILE: samples/dotnet-watch/LaunchAnyCommand/say-hello.js
================================================
console.log("Hello from Javascript");
================================================
FILE: samples/dotnet-watch/README.md
================================================
dotnet-watch samples
====================
The samples in this folder show some ways to customize dotnet-watch. For full details on
available settings and configuration, see the [README for the dotnet-watch](../../src/dotnet-watch/README.md) project.
================================================
FILE: samples/dotnet-watch/WatchJavascriptFiles/Program.cs
================================================
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.IO;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
namespace WatchJavascriptFiles
{
public class Program
{
public static void Main(string[] args)
{
var host = new WebHostBuilder()
.UseKestrel()
.UseContentRoot(Directory.GetCurrentDirectory())
.Configure(app =>
app.Run(async (context) =>
{
await context.Response.WriteAsync("Hello World!");
}))
.Build();
host.Run();
}
}
}
================================================
FILE: samples/dotnet-watch/WatchJavascriptFiles/README.md
================================================
Watch JavaScript files with dotnet-watch
========================================
## Prerequisites
Install .NET Core command line. <https://dot.net/core>
## Usage
Open a terminal to the directory containing this project.
```
dotnet watch run
```
Changing the .csproj file, or \*.js file in wwwroot, or any \*.cs file will cause dotnet-watch to restart the website.
================================================
FILE: samples/dotnet-watch/WatchJavascriptFiles/WatchJavascriptFiles.csproj
================================================
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Folder Include="wwwroot\" />
<Watch Include="wwwroot\**\*.js" Exclude="wwwroot\node_modules\**\*.js" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore" Version="2.0.0" />
</ItemGroup>
</Project>
================================================
FILE: samples/dotnet-watch/WatchJavascriptFiles/wwwroot/app.js
================================================
document.title = "My awesome website";
================================================
FILE: samples/dotnet-watch/WatchMultipleProjects/README.md
================================================
Watch multiple projects with dotnet-watch
=========================================
## Prerequisites
Install .NET Core command line. <https://dot.net/core>
## Usage
Open a terminal to the directory containing this project.
```
dotnet watch msbuild /t:TestAndRun
```
The "TestAndRun" target in watch.proj will execute "dotnet test" on Test.csproj and then launch the website by calling "dotnet run" on Web.csproj.
Changing any \*.cs file in Test/ or Web/, any \*.csproj file, or watch.proj, will cause dotnet-watch to relaunch the "TestAndRun" target from watch.proj.
================================================
FILE: samples/dotnet-watch/WatchMultipleProjects/Test/Test.csproj
================================================
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0" />
<PackageReference Include="xunit" Version="2.2.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />
</ItemGroup>
</Project>
================================================
FILE: samples/dotnet-watch/WatchMultipleProjects/Test/UnitTest1.cs
================================================
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using Xunit;
namespace Test
{
public class UnitTest1
{
[Fact]
public void Test1()
{
Assert.True(true);
}
}
}
================================================
FILE: samples/dotnet-watch/WatchMultipleProjects/Web/Program.cs
================================================
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.IO;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
namespace Web
{
public class Program
{
public static void Main(string[] args)
{
var host = new WebHostBuilder()
.UseKestrel()
.UseContentRoot(Directory.GetCurrentDirectory())
.Configure(app =>
app.Run(async (context) =>
{
await context.Response.WriteAsync("Hello World!");
}))
.Build();
host.Run();
}
}
}
================================================
FILE: samples/dotnet-watch/WatchMultipleProjects/Web/Web.csproj
================================================
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Folder Include="wwwroot\" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore" Version="1.1.1" />
</ItemGroup>
</Project>
================================================
FILE: samples/dotnet-watch/WatchMultipleProjects/watch.csproj
================================================
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<EnableDefaultItems>false</EnableDefaultItems>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="Web\Web.csproj" />
<ProjectReference Include="Test\Test.csproj" />
</ItemGroup>
<Target Name="TestAndRun">
<Exec Command="dotnet test" WorkingDirectory="Test/" />
<Exec Command="dotnet run" WorkingDirectory="Web/" />
</Target>
</Project>
================================================
FILE: shared/CliContext.cs
================================================
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
namespace Microsoft.Extensions.Tools.Internal
{
public static class CliContext
{
/// <summary>
/// dotnet -d|--diagnostics subcommand
/// </summary>
/// <returns></returns>
public static bool IsGlobalVerbose()
{
bool.TryParse(Environment.GetEnvironmentVariable("DOTNET_CLI_CONTEXT_VERBOSE"), out bool globalVerbose);
return globalVerbose;
}
}
}
================================================
FILE: shared/CommandLineApplicationExtensions.cs
================================================
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Reflection;
namespace Microsoft.Extensions.CommandLineUtils
{
internal static class CommandLineApplicationExtensions
{
public static CommandOption HelpOption(this CommandLineApplication app)
=> app.HelpOption("-?|-h|--help");
public static CommandOption VerboseOption(this CommandLineApplication app)
=> app.Option("-v|--verbose", "Show verbose output", CommandOptionType.NoValue, inherited: true);
public static void OnExecute(this CommandLineApplication app, Action action)
=> app.OnExecute(() =>
{
action();
return 0;
});
public static void VersionOptionFromAssemblyAttributes(this CommandLineApplication app, Assembly assembly)
=> app.VersionOption("--version", GetInformationalVersion(assembly));
private static string GetInformationalVersion(Assembly assembly)
{
var attribute = assembly.GetCustomAttribute<AssemblyInformationalVersionAttribute>();
var versionAttribute = attribute == null
? assembly.GetName().Version.ToString()
: attribute.InformationalVersion;
return versionAttribute;
}
}
}
================================================
FILE: shared/ConsoleReporter.cs
================================================
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.IO;
namespace Microsoft.Extensions.Tools.Internal
{
public class ConsoleReporter : IReporter
{
private object _writeLock = new object();
public ConsoleReporter(IConsole console)
: this(console, verbose: false, quiet: false)
{ }
public ConsoleReporter(IConsole console, bool verbose, bool quiet)
{
Ensure.NotNull(console, nameof(console));
Console = console;
IsVerbose = verbose;
IsQuiet = quiet;
}
protected IConsole Console { get; }
public bool IsVerbose { get; set; }
public bool IsQuiet { get; set; }
protected virtual void WriteLine(TextWriter writer, string message, ConsoleColor? color)
{
lock (_writeLock)
{
if (color.HasValue)
{
Console.ForegroundColor = color.Value;
}
writer.WriteLine(message);
if (color.HasValue)
{
Console.ResetColor();
}
}
}
public virtual void Error(string message)
=> WriteLine(Console.Error, message, ConsoleColor.Red);
public virtual void Warn(string message)
=> WriteLine(Console.Out, message, ConsoleColor.Yellow);
public virtual void Output(string message)
{
if (IsQuiet)
{
return;
}
WriteLine(Console.Out, message, color: null);
}
public virtual void Verbose(string message)
{
if (!IsVerbose)
{
return;
}
WriteLine(Console.Out, message, ConsoleColor.DarkGray);
}
}
}
================================================
FILE: shared/DebugHelper.cs
================================================
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Diagnostics;
using System.Linq;
namespace Microsoft.Extensions.Tools.Internal
{
public static class DebugHelper
{
[Conditional("DEBUG")]
public static void HandleDebugSwitch(ref string[] args)
{
if (args.Length > 0 && string.Equals("--debug", args[0], StringComparison.OrdinalIgnoreCase))
{
args = args.Skip(1).ToArray();
Console.WriteLine("Waiting for debugger to attach. Press ENTER to continue");
Console.WriteLine($"Process ID: {Process.GetCurrentProcess().Id}");
Console.ReadLine();
}
}
}
}
================================================
FILE: shared/Ensure.cs
================================================
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
namespace Microsoft.Extensions.Tools.Internal
{
internal static class Ensure
{
public static T NotNull<T>(T obj, string paramName)
where T : class
{
if (obj == null)
{
throw new ArgumentNullException(paramName);
}
return obj;
}
public static string NotNullOrEmpty(string obj, string paramName)
{
if (string.IsNullOrEmpty(obj))
{
throw new ArgumentException("Value cannot be null or an empty string.", paramName);
}
return obj;
}
}
}
================================================
FILE: shared/IConsole.cs
================================================
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.IO;
namespace Microsoft.Extensions.Tools.Internal
{
public interface IConsole
{
event ConsoleCancelEventHandler CancelKeyPress;
TextWriter Out { get; }
TextWriter Error { get; }
TextReader In { get; }
bool IsInputRedirected { get; }
bool IsOutputRedirected { get; }
bool IsErrorRedirected { get; }
ConsoleColor ForegroundColor { get; set; }
void ResetColor();
}
}
================================================
FILE: shared/IReporter.cs
================================================
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
namespace Microsoft.Extensions.Tools.Internal
{
public interface IReporter
{
void Verbose(string message);
void Output(string message);
void Warn(string message);
void Error(string message);
}
}
================================================
FILE: shared/NullReporter.cs
================================================
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
namespace Microsoft.Extensions.Tools.Internal
{
public class NullReporter : IReporter
{
private NullReporter()
{ }
public static IReporter Singleton { get; } = new NullReporter();
public void Verbose(string message)
{ }
public void Output(string message)
{ }
public void Warn(string message)
{ }
public void Error(string message)
{ }
}
}
================================================
FILE: shared/PhysicalConsole.cs
================================================
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.IO;
namespace Microsoft.Extensions.Tools.Internal
{
public class PhysicalConsole : IConsole
{
private PhysicalConsole()
{
Console.CancelKeyPress += (o, e) =>
{
CancelKeyPress?.Invoke(o, e);
};
}
public static IConsole Singleton { get; } = new PhysicalConsole();
public event ConsoleCancelEventHandler CancelKeyPress;
public TextWriter Error => Console.Error;
public TextReader In => Console.In;
public TextWriter Out => Console.Out;
public bool IsInputRedirected => Console.IsInputRedirected;
public bool IsOutputRedirected => Console.IsOutputRedirected;
public bool IsErrorRedirected => Console.IsErrorRedirected;
public ConsoleColor ForegroundColor
{
get => Console.ForegroundColor;
set => Console.ForegroundColor = value;
}
public void ResetColor() => Console.ResetColor();
}
}
================================================
FILE: src/Directory.Build.props
================================================
<Project>
<Import Project="..\Directory.Build.props" />
<ItemGroup>
<PackageReference Include="Internal.AspNetCore.Sdk" PrivateAssets="All" Version="$(InternalAspNetCoreSdkPackageVersion)" />
</ItemGroup>
</Project>
================================================
FILE: src/Directory.Build.targets
================================================
<Project>
<Import Project="..\Directory.Build.targets" />
<Target Name="CleanPublishDir" AfterTargets="CoreClean">
<RemoveDir Directories="$(PublishDir)" />
</Target>
</Project>
================================================
FILE: src/Microsoft.AspNetCore.DeveloperCertificates.XPlat/CertificateGenerator.cs
================================================
using System;
using Microsoft.AspNetCore.Certificates.Generation;
namespace Microsoft.AspNetCore.DeveloperCertificates.XPlat
{
public static class CertificateGenerator
{
public static void GenerateAspNetHttpsCertificate()
{
var manager = new CertificateManager();
var now = DateTimeOffset.Now;
manager.EnsureAspNetCoreHttpsDevelopmentCertificate(now, now.AddYears(1));
}
}
}
================================================
FILE: src/Microsoft.AspNetCore.DeveloperCertificates.XPlat/Microsoft.AspNetCore.DeveloperCertificates.XPlat.csproj
================================================
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<Description>Package for the CLI first run experience.</Description>
<DefineConstants>$(DefineConstants);XPLAT</DefineConstants>
<PackageTags>aspnet;cli</PackageTags>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Certificates.Generation.Sources" PrivateAssets="All" Version="$(MicrosoftAspNetCoreCertificatesGenerationSourcesPackageVersion)" />
</ItemGroup>
</Project>
================================================
FILE: src/Microsoft.HttpRepl/AggregateDirectoryStructure.cs
================================================
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Collections.Generic;
using System.Linq;
namespace Microsoft.HttpRepl
{
public class AggregateDirectoryStructure : IDirectoryStructure
{
private readonly IDirectoryStructure _first;
private readonly IDirectoryStructure _second;
public AggregateDirectoryStructure(IDirectoryStructure first, IDirectoryStructure second)
{
_first = first;
_second = second;
}
public IEnumerable<string> DirectoryNames
{
get
{
HashSet<string> values = new HashSet<string>(StringComparer.OrdinalIgnoreCase);
values.UnionWith(_first.DirectoryNames);
values.UnionWith(_second.DirectoryNames);
return values.OrderBy(x => x, StringComparer.OrdinalIgnoreCase);
}
}
public IDirectoryStructure Parent => _first.Parent ?? _second.Parent;
public IDirectoryStructure GetChildDirectory(string name)
{
return new AggregateDirectoryStructure(_first.GetChildDirectory(name), _second.GetChildDirectory(name));
}
public IRequestInfo RequestInfo => _first.RequestInfo ?? _second.RequestInfo;
}
}
================================================
FILE: src/Microsoft.HttpRepl/Commands/BaseHttpCommand.cs
================================================
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Xml.Linq;
using Microsoft.HttpRepl.Formatting;
using Microsoft.HttpRepl.Preferences;
using Microsoft.HttpRepl.Suggestions;
using Microsoft.Repl;
using Microsoft.Repl.Commanding;
using Microsoft.Repl.ConsoleHandling;
using Microsoft.Repl.Parsing;
using Microsoft.Repl.Suggestions;
using Newtonsoft.Json.Linq;
namespace Microsoft.HttpRepl.Commands
{
public abstract class BaseHttpCommand : CommandWithStructuredInputBase<HttpState, ICoreParseResult>
{
private const string HeaderOption = nameof(HeaderOption);
private const string ResponseHeadersFileOption = nameof(ResponseHeadersFileOption);
private const string ResponseBodyFileOption = nameof(ResponseBodyFileOption);
private const string ResponseFileOption = nameof(ResponseFileOption);
private const string BodyFileOption = nameof(BodyFileOption);
private const string NoBodyOption = nameof(NoBodyOption);
private const string NoFormattingOption = nameof(NoFormattingOption);
private const string StreamingOption = nameof(StreamingOption);
private const string BodyContentOption = nameof(BodyContentOption);
private static readonly char[] HeaderSeparatorChars = new[] { '=', ':' };
private CommandInputSpecification _inputSpec;
protected abstract string Verb { get; }
protected abstract bool RequiresBody { get; }
public override CommandInputSpecification InputSpec
{
get
{
if (_inputSpec != null)
{
return _inputSpec;
}
CommandInputSpecificationBuilder builder = CommandInputSpecification.Create(Verb)
.MaximumArgCount(1)
.WithOption(new CommandOptionSpecification(HeaderOption, requiresValue: true, forms: new[] {"--header", "-h"}))
.WithOption(new CommandOptionSpecification(ResponseFileOption, requiresValue: true, maximumOccurrences: 1, forms: new[] { "--response", }))
.WithOption(new CommandOptionSpecification(ResponseHeadersFileOption, requiresValue: true, maximumOccurrences: 1, forms: new[] { "--response:headers", }))
.WithOption(new CommandOptionSpecification(ResponseBodyFileOption, requiresValue: true, maximumOccurrences: 1, forms: new[] { "--response:body", }))
.WithOption(new CommandOptionSpecification(NoFormattingOption, maximumOccurrences: 1, forms: new[] { "--no-formatting", "-F" }))
.WithOption(new CommandOptionSpecification(StreamingOption, maximumOccurrences: 1, forms: new[] { "--streaming", "-s" }));
if (RequiresBody)
{
builder = builder.WithOption(new CommandOptionSpecification(NoBodyOption, maximumOccurrences: 1, forms: "--no-body"))
.WithOption(new CommandOptionSpecification(BodyFileOption, requiresValue: true, maximumOccurrences: 1, forms: new[] {"--file", "-f"}))
.WithOption(new CommandOptionSpecification(BodyContentOption, requiresValue: true, maximumOccurrences: 1, forms: new[] {"--content", "-c"}));
}
_inputSpec = builder.Finish();
return _inputSpec;
}
}
protected override async Task ExecuteAsync(IShellState shellState, HttpState programState, DefaultCommandInput<ICoreParseResult> commandInput, ICoreParseResult parseResult, CancellationToken cancellationToken)
{
if (programState.BaseAddress == null && (commandInput.Arguments.Count == 0 || !Uri.TryCreate(commandInput.Arguments[0].Text, UriKind.Absolute, out Uri _)))
{
shellState.ConsoleManager.Error.WriteLine("'set base {url}' must be called before issuing requests to a relative path".SetColor(programState.ErrorColor));
return;
}
if (programState.SwaggerEndpoint != null)
{
string swaggerRequeryBehaviorSetting = programState.GetStringPreference(WellKnownPreference.SwaggerRequeryBehavior, "auto");
if (swaggerRequeryBehaviorSetting.StartsWith("auto", StringComparison.OrdinalIgnoreCase))
{
await SetSwaggerCommand.CreateDirectoryStructureForSwaggerEndpointAsync(shellState, programState, programState.SwaggerEndpoint, cancellationToken).ConfigureAwait(false);
}
}
Dictionary<string, string> thisRequestHeaders = new Dictionary<string, string>();
foreach (InputElement header in commandInput.Options[HeaderOption])
{
int equalsIndex = header.Text.IndexOfAny(HeaderSeparatorChars);
if (equalsIndex < 0)
{
shellState.ConsoleManager.Error.WriteLine("Headers must be formatted as {header}={value} or {header}:{value}".SetColor(programState.ErrorColor));
return;
}
thisRequestHeaders[header.Text.Substring(0, equalsIndex)] = header.Text.Substring(equalsIndex + 1);
}
Uri effectivePath = programState.GetEffectivePath(commandInput.Arguments.Count > 0 ? commandInput.Arguments[0].Text : string.Empty);
HttpRequestMessage request = new HttpRequestMessage(new HttpMethod(Verb.ToUpperInvariant()), effectivePath);
bool noBody = false;
if (RequiresBody)
{
string filePath = null;
string bodyContent = null;
bool deleteFile = false;
noBody = commandInput.Options[NoBodyOption].Count > 0;
if (!thisRequestHeaders.TryGetValue("content-type", out string contentType) && programState.Headers.TryGetValue("content-type", out IEnumerable<string> contentTypes))
{
contentType = contentTypes.FirstOrDefault();
}
if (!noBody)
{
if (string.IsNullOrEmpty(contentType))
{
contentType = "application/json";
}
if (commandInput.Options[BodyFileOption].Count > 0)
{
filePath = commandInput.Options[BodyFileOption][0].Text;
if (!File.Exists(filePath))
{
shellState.ConsoleManager.Error.WriteLine($"Content file {filePath} does not exist".SetColor(programState.ErrorColor));
return;
}
}
else if (commandInput.Options[BodyContentOption].Count > 0)
{
bodyContent = commandInput.Options[BodyContentOption][0].Text;
}
else
{
string defaultEditorCommand = programState.GetStringPreference(WellKnownPreference.DefaultEditorCommand);
if (defaultEditorCommand == null)
{
shellState.ConsoleManager.Error.WriteLine($"The default editor must be configured using the command `pref set {WellKnownPreference.DefaultEditorCommand} \"{{commandline}}\"`".SetColor(programState.ErrorColor));
return;
}
deleteFile = true;
filePath = Path.GetTempFileName();
string exampleBody = programState.GetExampleBody(commandInput.Arguments.Count > 0 ? commandInput.Arguments[0].Text : string.Empty, ref contentType, Verb);
if (!string.IsNullOrEmpty(exampleBody))
{
File.WriteAllText(filePath, exampleBody);
}
string defaultEditorArguments = programState.GetStringPreference(WellKnownPreference.DefaultEditorArguments) ?? "";
string original = defaultEditorArguments;
string pathString = $"\"{filePath}\"";
defaultEditorArguments = defaultEditorArguments.Replace("{filename}", pathString);
if (string.Equals(defaultEditorArguments, original, StringComparison.Ordinal))
{
defaultEditorArguments = (defaultEditorArguments + " " + pathString).Trim();
}
ProcessStartInfo info = new ProcessStartInfo(defaultEditorCommand, defaultEditorArguments);
Process.Start(info)?.WaitForExit();
}
}
if (string.IsNullOrEmpty(contentType))
{
contentType = "application/json";
}
byte[] data = noBody
? new byte[0]
: string.IsNullOrEmpty(bodyContent)
? File.ReadAllBytes(filePath)
: Encoding.UTF8.GetBytes(bodyContent);
HttpContent content = new ByteArrayContent(data);
content.Headers.ContentType = new MediaTypeHeaderValue(contentType);
request.Content = content;
if (deleteFile)
{
File.Delete(filePath);
}
foreach (KeyValuePair<string, IEnumerable<string>> header in programState.Headers)
{
content.Headers.TryAddWithoutValidation(header.Key, header.Value);
}
foreach (KeyValuePair<string, string> header in thisRequestHeaders)
{
content.Headers.TryAddWithoutValidation(header.Key, header.Value);
}
}
foreach (KeyValuePair<string, IEnumerable<string>> header in programState.Headers)
{
request.Headers.TryAddWithoutValidation(header.Key, header.Value);
}
foreach (KeyValuePair<string, string> header in thisRequestHeaders)
{
request.Headers.TryAddWithoutValidation(header.Key, header.Value);
}
string headersTarget = commandInput.Options[ResponseHeadersFileOption].FirstOrDefault()?.Text ?? commandInput.Options[ResponseFileOption].FirstOrDefault()?.Text;
string bodyTarget = commandInput.Options[ResponseBodyFileOption].FirstOrDefault()?.Text ?? commandInput.Options[ResponseFileOption].FirstOrDefault()?.Text;
HttpResponseMessage response = await programState.Client.SendAsync(request, HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false);
await HandleResponseAsync(programState, commandInput, shellState.ConsoleManager, response, programState.EchoRequest, headersTarget, bodyTarget, cancellationToken).ConfigureAwait(false);
}
private static async Task HandleResponseAsync(HttpState programState, DefaultCommandInput<ICoreParseResult> commandInput, IConsoleManager consoleManager, HttpResponseMessage response, bool echoRequest, string headersTargetFile, string bodyTargetFile, CancellationToken cancellationToken)
{
RequestConfig requestConfig = new RequestConfig(programState);
ResponseConfig responseConfig = new ResponseConfig(programState);
string protocolInfo;
if (echoRequest)
{
string hostString = response.RequestMessage.RequestUri.Scheme + "://" + response.RequestMessage.RequestUri.Host + (!response.RequestMessage.RequestUri.IsDefaultPort ? ":" + response.RequestMessage.RequestUri.Port : "");
consoleManager.WriteLine($"Request to {hostString}...".SetColor(requestConfig.AddressColor));
consoleManager.WriteLine();
string method = response.RequestMessage.Method.ToString().ToUpperInvariant().SetColor(requestConfig.MethodColor);
string pathAndQuery = response.RequestMessage.RequestUri.PathAndQuery.SetColor(requestConfig.AddressColor);
protocolInfo = $"{"HTTP".SetColor(requestConfig.ProtocolNameColor)}{"/".SetColor(requestConfig.ProtocolSeparatorColor)}{response.Version.ToString().SetColor(requestConfig.ProtocolVersionColor)}";
consoleManager.WriteLine($"{method} {pathAndQuery} {protocolInfo}");
IEnumerable<KeyValuePair<string, IEnumerable<string>>> requestHeaders = response.RequestMessage.Headers;
if (response.RequestMessage.Content != null)
{
requestHeaders = requestHeaders.Union(response.RequestMessage.Content.Headers);
}
foreach (KeyValuePair<string, IEnumerable<string>> header in requestHeaders.OrderBy(x => x.Key))
{
string headerKey = header.Key.SetColor(requestConfig.HeaderKeyColor);
string headerSep = ":".SetColor(requestConfig.HeaderSeparatorColor);
string headerValue = string.Join(";".SetColor(requestConfig.HeaderValueSeparatorColor), header.Value.Select(x => x.Trim().SetColor(requestConfig.HeaderValueColor)));
consoleManager.WriteLine($"{headerKey}{headerSep} {headerValue}");
}
consoleManager.WriteLine();
if (response.RequestMessage.Content != null)
{
using (StreamWriter writer = new StreamWriter(new MemoryStream()))
{
await FormatBodyAsync(commandInput, programState, consoleManager, response.RequestMessage.Content, writer, cancellationToken).ConfigureAwait(false);
}
}
consoleManager.WriteLine();
consoleManager.WriteLine($"Response from {hostString}...".SetColor(requestConfig.AddressColor));
consoleManager.WriteLine();
}
protocolInfo = $"{"HTTP".SetColor(responseConfig.ProtocolNameColor)}{"/".SetColor(responseConfig.ProtocolSeparatorColor)}{response.Version.ToString().SetColor(responseConfig.ProtocolVersionColor)}";
string status = ((int)response.StatusCode).ToString().SetColor(responseConfig.StatusCodeColor) + " " + response.ReasonPhrase.SetColor(responseConfig.StatusReasonPhraseColor);
consoleManager.WriteLine($"{protocolInfo} {status}");
IEnumerable<KeyValuePair<string, IEnumerable<string>>> responseHeaders = response.Headers;
if (response.Content != null)
{
responseHeaders = responseHeaders.Union(response.Content.Headers);
}
StreamWriter headerFileWriter;
if (headersTargetFile != null)
{
headerFileWriter = new StreamWriter(File.Create(headersTargetFile));
}
else
{
headerFileWriter = new StreamWriter(new MemoryStream());
}
foreach (KeyValuePair<string, IEnumerable<string>> header in responseHeaders.OrderBy(x => x.Key))
{
string headerKey = header.Key.SetColor(responseConfig.HeaderKeyColor);
string headerSep = ":".SetColor(responseConfig.HeaderSeparatorColor);
string headerValue = string.Join(";".SetColor(responseConfig.HeaderValueSeparatorColor), header.Value.Select(x => x.Trim().SetColor(responseConfig.HeaderValueColor)));
consoleManager.WriteLine($"{headerKey}{headerSep} {headerValue}");
headerFileWriter.WriteLine($"{header.Key}: {string.Join(";", header.Value.Select(x => x.Trim()))}");
}
StreamWriter bodyFileWriter;
if (!string.Equals(headersTargetFile, bodyTargetFile, StringComparison.Ordinal))
{
headerFileWriter.Flush();
headerFileWriter.Close();
headerFileWriter.Dispose();
if (bodyTargetFile != null)
{
bodyFileWriter = new StreamWriter(File.Create(bodyTargetFile));
}
else
{
bodyFileWriter = new StreamWriter(new MemoryStream());
}
}
else
{
headerFileWriter.WriteLine();
bodyFileWriter = headerFileWriter;
}
consoleManager.WriteLine();
if (response.Content != null)
{
await FormatBodyAsync(commandInput, programState, consoleManager, response.Content, bodyFileWriter, cancellationToken).ConfigureAwait(false);
}
bodyFileWriter.Flush();
bodyFileWriter.Close();
bodyFileWriter.Dispose();
consoleManager.WriteLine();
}
private static async Task FormatBodyAsync(DefaultCommandInput<ICoreParseResult> commandInput, HttpState programState, IConsoleManager consoleManager, HttpContent content, StreamWriter bodyFileWriter, CancellationToken cancellationToken)
{
if (commandInput.Options[StreamingOption].Count > 0)
{
Memory<char> buffer = new Memory<char>(new char[2048]);
Stream s = await content.ReadAsStreamAsync().ConfigureAwait(false);
StreamReader reader = new StreamReader(s);
consoleManager.WriteLine("Streaming the response, press any key to stop...".SetColor(programState.WarningColor));
while (!cancellationToken.IsCancellationRequested)
{
try
{
ValueTask<int> readTask = reader.ReadAsync(buffer, cancellationToken);
if (await WaitForCompletionAsync(readTask, cancellationToken).ConfigureAwait(false))
{
if (readTask.Result == 0)
{
break;
}
string str = new string(buffer.Span.Slice(0, readTask.Result));
consoleManager.Write(str);
bodyFileWriter.Write(str);
}
else
{
break;
}
}
catch (OperationCanceledException)
{
}
}
return;
}
string contentType = null;
if (content.Headers.TryGetValues("Content-Type", out IEnumerable<string> contentTypeValues))
{
contentType = contentTypeValues.FirstOrDefault()?.Split(';').FirstOrDefault();
}
contentType = contentType?.ToUpperInvariant() ?? "text/plain";
if (commandInput.Options[NoFormattingOption].Count == 0)
{
if (contentType.EndsWith("/JSON", StringComparison.OrdinalIgnoreCase)
|| contentType.EndsWith("-JSON", StringComparison.OrdinalIgnoreCase)
|| contentType.EndsWith("+JSON", StringComparison.OrdinalIgnoreCase)
|| contentType.EndsWith("/JAVASCRIPT", StringComparison.OrdinalIgnoreCase)
|| contentType.EndsWith("-JAVASCRIPT", StringComparison.OrdinalIgnoreCase)
|| contentType.EndsWith("+JAVASCRIPT", StringComparison.OrdinalIgnoreCase))
{
if (await FormatJsonAsync(programState, consoleManager, content, bodyFileWriter))
{
return;
}
}
else if (contentType.EndsWith("/HTML", StringComparison.OrdinalIgnoreCase)
|| contentType.EndsWith("-HTML", StringComparison.OrdinalIgnoreCase)
|| contentType.EndsWith("+HTML", StringComparison.OrdinalIgnoreCase)
|| contentType.EndsWith("/XML", StringComparison.OrdinalIgnoreCase)
|| contentType.EndsWith("-XML", StringComparison.OrdinalIgnoreCase)
|| contentType.EndsWith("+XML", StringComparison.OrdinalIgnoreCase))
{
if (await FormatXmlAsync(consoleManager, content, bodyFileWriter))
{
return;
}
}
}
string responseContent = await content.ReadAsStringAsync().ConfigureAwait(false);
bodyFileWriter.WriteLine(responseContent);
consoleManager.WriteLine(responseContent);
}
private static async Task<bool> WaitForCompletionAsync(ValueTask<int> readTask, CancellationToken cancellationToken)
{
while (!readTask.IsCompleted && !cancellationToken.IsCancellationRequested && !Console.KeyAvailable)
{
await Task.Delay(1, cancellationToken).ConfigureAwait(false);
}
if (Console.KeyAvailable)
{
Console.ReadKey(false);
return false;
}
return readTask.IsCompleted;
}
private static async Task<bool> FormatXmlAsync(IWritable consoleManager, HttpContent content, StreamWriter bodyFileWriter)
{
string responseContent = await content.ReadAsStringAsync().ConfigureAwait(false);
try
{
XDocument body = XDocument.Parse(responseContent);
consoleManager.WriteLine(body.ToString());
bodyFileWriter.WriteLine(body.ToString());
return true;
}
catch
{
}
return false;
}
private static async Task<bool> FormatJsonAsync(HttpState programState, IWritable outputSink, HttpContent content, StreamWriter bodyFileWriter)
{
string responseContent = await content.ReadAsStringAsync().ConfigureAwait(false);
try
{
JsonConfig config = new JsonConfig(programState);
string formatted = JsonVisitor.FormatAndColorize(config, responseContent);
outputSink.WriteLine(formatted);
bodyFileWriter.WriteLine(JToken.Parse(responseContent).ToString());
return true;
}
catch
{
}
return false;
}
protected override string GetHelpDetails(IShellState shellState, HttpState programState, DefaultCommandInput<ICoreParseResult> commandInput, ICoreParseResult parseResult)
{
var helpText = new StringBuilder();
helpText.Append("Usage: ".Bold());
helpText.AppendLine($"{Verb.ToUpperInvariant()} [Options]");
helpText.AppendLine();
helpText.AppendLine($"Issues a {Verb.ToUpperInvariant()} request.");
if (RequiresBody)
{
helpText.AppendLine("Your default editor will be opened with a sample body if no options are provided.");
}
return helpText.ToString();
}
public override string GetHelpSummary(IShellState shellState, HttpState programState)
{
return $"{Verb.ToLowerInvariant()} - Issues a {Verb.ToUpperInvariant()} request";
}
protected override IEnumerable<string> GetArgumentSuggestionsForText(IShellState shellState, HttpState programState, ICoreParseResult parseResult, DefaultCommandInput<ICoreParseResult> commandInput, string normalCompletionString)
{
List<string> results = new List<string>();
if (programState.Structure != null && programState.BaseAddress != null)
{
//If it's an absolute URI, nothing to suggest
if (Uri.TryCreate(parseResult.Sections[1], UriKind.Absolute, out Uri _))
{
return null;
}
string path = normalCompletionString.Replace('\\', '/');
int searchFrom = normalCompletionString.Length - 1;
int lastSlash = path.LastIndexOf('/', searchFrom);
string prefix;
if (lastSlash < 0)
{
path = string.Empty;
prefix = normalCompletionString;
}
else
{
path = path.Substring(0, lastSlash + 1);
prefix = normalCompletionString.Substring(lastSlash + 1);
}
IDirectoryStructure s = programState.Structure.TraverseTo(programState.PathSections.Reverse()).TraverseTo(path);
foreach (string child in s.DirectoryNames)
{
if (child.StartsWith(prefix, StringComparison.OrdinalIgnoreCase))
{
results.Add(path + child);
}
}
}
return results;
}
protected override IEnumerable<string> GetOptionValueCompletions(IShellState shellState, HttpState programState, string optionId, DefaultCommandInput<ICoreParseResult> commandInput, ICoreParseResult parseResult, string normalizedCompletionText)
{
if (string.Equals(optionId, BodyFileOption, StringComparison.Ordinal) || string.Equals(optionId, ResponseFileOption, StringComparison.OrdinalIgnoreCase) || string.Equals(optionId, ResponseBodyFileOption, StringComparison.OrdinalIgnoreCase) || string.Equals(optionId, ResponseHeadersFileOption, StringComparison.OrdinalIgnoreCase))
{
return FileSystemCompletion.GetCompletions(normalizedCompletionText);
}
if (string.Equals(optionId, HeaderOption, StringComparison.Ordinal))
{
HashSet<string> alreadySpecifiedHeaders = new HashSet<string>(StringComparer.Ordinal);
IReadOnlyList<InputElement> options = commandInput.Options[HeaderOption];
for (int i = 0; i < options.Count; ++i)
{
if (options[i] == commandInput.SelectedElement)
{
continue;
}
string elementText = options[i].Text;
string existingHeaderName = elementText.Split(HeaderSeparatorChars)[0];
alreadySpecifiedHeaders.Add(existingHeaderName);
}
//Check to see if the selected element is in a header name or value
int equalsIndex = normalizedCompletionText.IndexOfAny(HeaderSeparatorChars);
string path = commandInput.Arguments.Count > 0 ? commandInput.Arguments[0].Text : string.Empty;
if (equalsIndex < 0)
{
IEnumerable<string> headerNameOptions = HeaderCompletion.GetCompletions(alreadySpecifiedHeaders, normalizedCompletionText);
if (headerNameOptions == null)
{
return null;
}
List<string> allSuggestions = new List<string>();
foreach (string suggestion in headerNameOptions.Select(x => x))
{
allSuggestions.Add(suggestion + ":");
IEnumerable<string> suggestions = HeaderCompletion.GetValueCompletions(Verb, path, suggestion, string.Empty, programState);
if (suggestions != null)
{
foreach (string valueSuggestion in suggestions)
{
allSuggestions.Add(suggestion + ":" + valueSuggestion);
}
}
}
return allSuggestions;
}
else
{
//Didn't exit from the header name check, so must be a value
string headerName = normalizedCompletionText.Substring(0, equalsIndex);
IEnumerable<string> suggestions = HeaderCompletion.GetValueCompletions(Verb, path, headerName, normalizedCompletionText.Substring(equalsIndex + 1), programState);
if (suggestions == null)
{
return null;
}
return suggestions.Select(x => normalizedCompletionText.Substring(0, equalsIndex + 1) + x);
}
}
return null;
}
}
}
================================================
FILE: src/Microsoft.HttpRepl/Commands/ChangeDirectoryCommand.cs
================================================
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.HttpRepl.Suggestions;
using Microsoft.Repl;
using Microsoft.Repl.Commanding;
using Microsoft.Repl.ConsoleHandling;
using Microsoft.Repl.Parsing;
namespace Microsoft.HttpRepl.Commands
{
public class ChangeDirectoryCommand : CommandWithStructuredInputBase<HttpState, ICoreParseResult>
{
protected override Task ExecuteAsync(IShellState shellState, HttpState programState, DefaultCommandInput<ICoreParseResult> commandInput, ICoreParseResult parseResult, CancellationToken cancellationToken)
{
if (commandInput.Arguments.Count == 0 || string.IsNullOrEmpty(commandInput.Arguments[0]?.Text))
{
shellState.ConsoleManager.WriteLine($"/{string.Join("/", programState.PathSections.Reverse())}");
}
else
{
string[] parts = commandInput.Arguments[0].Text.Replace('\\', '/').Split(new[] { '/' }, StringSplitOptions.RemoveEmptyEntries);
if (commandInput.Arguments[0].Text.StartsWith("/", StringComparison.Ordinal))
{
programState.PathSections.Clear();
}
foreach (string part in parts)
{
switch (part)
{
case ".":
break;
case "..":
if (programState.PathSections.Count > 0)
{
programState.PathSections.Pop();
}
break;
default:
programState.PathSections.Push(part);
break;
}
}
IDirectoryStructure s = programState.Structure.TraverseTo(programState.PathSections.Reverse());
string thisDirMethod = s.RequestInfo != null && s.RequestInfo.Methods.Count > 0
? "[" + string.Join("|", s.RequestInfo.Methods) + "]"
: "[]";
shellState.ConsoleManager.WriteLine($"/{string.Join("/", programState.PathSections.Reverse())} {thisDirMethod}");
}
return Task.CompletedTask;
}
public override CommandInputSpecification InputSpec { get; } = CommandInputSpecification.Create("cd")
.MaximumArgCount(1)
.Finish();
protected override string GetHelpDetails(IShellState shellState, HttpState programState, DefaultCommandInput<ICoreParseResult> commandInput, ICoreParseResult parseResult)
{
var help = new StringBuilder();
help.Append("Usage:".Bold());
help.AppendLine("cd [directory]");
help.AppendLine();
help.AppendLine("Prints the current directory if no argument is specified, otherwise changes to the specified directory");
return help.ToString();
}
public override string GetHelpSummary(IShellState shellState, HttpState programState)
{
return "cd [directory name] - Prints the current directory if no argument is specified, otherwise changes to the specified directory";
}
protected override IEnumerable<string> GetArgumentSuggestionsForText(IShellState shellState, HttpState programState, ICoreParseResult parseResult, DefaultCommandInput<ICoreParseResult> commandInput, string normalCompletionString)
{
return ServerPathCompletion.GetCompletions(programState, normalCompletionString);
}
}
}
================================================
FILE: src/Microsoft.HttpRepl/Commands/ClearCommand.cs
================================================
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Repl;
using Microsoft.Repl.Commanding;
using Microsoft.Repl.Parsing;
namespace Microsoft.HttpRepl.Commands
{
public class ClearCommand : ICommand<object, ICoreParseResult>
{
private static readonly string Name = "clear";
private static readonly string AlternateName = "cls";
public bool? CanHandle(IShellState shellState, object programState, ICoreParseResult parseResult)
{
return parseResult.Sections.Count == 1 && (string.Equals(parseResult.Sections[0], Name, StringComparison.OrdinalIgnoreCase) || string.Equals(parseResult.Sections[0], AlternateName, StringComparison.OrdinalIgnoreCase))
? (bool?) true
: null;
}
public Task ExecuteAsync(IShellState shellState, object programState, ICoreParseResult parseResult, CancellationToken cancellationToken)
{
shellState.ConsoleManager.Clear();
shellState.CommandDispatcher.OnReady(shellState);
return Task.CompletedTask;
}
public string GetHelpDetails(IShellState shellState, object programState, ICoreParseResult parseResult)
{
if (parseResult.Sections.Count == 1 && (string.Equals(parseResult.Sections[0], Name, StringComparison.OrdinalIgnoreCase) || string.Equals(parseResult.Sections[0], AlternateName, StringComparison.OrdinalIgnoreCase)))
{
return "Clears the shell";
}
return null;
}
public string GetHelpSummary(IShellState shellState, object programState)
{
return "clear - Clears the shell";
}
public IEnumerable<string> Suggest(IShellState shellState, object programState, ICoreParseResult parseResult)
{
if (parseResult.SelectedSection == 0 &&
(string.IsNullOrEmpty(parseResult.Sections[parseResult.SelectedSection]) || Name.StartsWith(parseResult.Sections[0].Substring(0, parseResult.CaretPositionWithinSelectedSection), StringComparison.OrdinalIgnoreCase)))
{
return new[] { Name };
}
if (parseResult.SelectedSection == 0 &&
(string.IsNullOrEmpty(parseResult.Sections[parseResult.SelectedSection]) || AlternateName.StartsWith(parseResult.Sections[0].Substring(0, parseResult.CaretPositionWithinSelectedSection), StringComparison.OrdinalIgnoreCase)))
{
return new[] { Name };
}
return null;
}
}
}
================================================
FILE: src/Microsoft.HttpRepl/Commands/ConfigCommand.cs
================================================
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.HttpRepl.Diagnostics;
using Microsoft.Repl;
using Microsoft.Repl.Commanding;
using Microsoft.Repl.ConsoleHandling;
using Microsoft.Repl.Parsing;
namespace Microsoft.HttpRepl.Commands
{
public class ConfigCommand : CommandWithStructuredInputBase<HttpState, ICoreParseResult>
{
protected override async Task ExecuteAsync(IShellState shellState, HttpState programState, DefaultCommandInput<ICoreParseResult> commandInput, ICoreParseResult parseResult, CancellationToken cancellationToken)
{
if (programState.BaseAddress == null)
{
shellState.ConsoleManager.Error.WriteLine("Must be connected to a server to query configuration".SetColor(programState.ErrorColor));
return;
}
if (string.IsNullOrEmpty(programState.DiagnosticsState.DiagnosticsEndpoint))
{
shellState.ConsoleManager.Error.WriteLine("Diagnostics endpoint must be set to query configuration (see set diag)".SetColor(programState.ErrorColor));
return;
}
string configUrl = programState.DiagnosticsState.DiagnosticItems.FirstOrDefault(x => x.DisplayName == "Configuration")?.Url;
if (configUrl == null)
{
shellState.ConsoleManager.Error.WriteLine("Diagnostics endpoint does not expose configuration information".SetColor(programState.ErrorColor));
return;
}
HttpResponseMessage response = await programState.Client.GetAsync(new Uri(programState.BaseAddress, configUrl), cancellationToken).ConfigureAwait(false);
if (!response.IsSuccessStatusCode)
{
shellState.ConsoleManager.Error.WriteLine("Unable to get configuration information from diagnostics endpoint".SetColor(programState.ErrorColor));
return;
}
List<ConfigItem> configItems = await response.Content.ReadAsAsync<List<ConfigItem>>(cancellationToken).ConfigureAwait(false);
foreach (ConfigItem item in configItems)
{
shellState.ConsoleManager.WriteLine($"{item.Key.Cyan()}: {item.Value}");
}
}
public override CommandInputSpecification InputSpec { get; } = CommandInputSpecification.Create("config").Finish();
protected override string GetHelpDetails(IShellState shellState, HttpState programState, DefaultCommandInput<ICoreParseResult> commandInput, ICoreParseResult parseResult)
{
return "config - Gets configuration information for the site if connected to a diagnostics endpoint";
}
public override string GetHelpSummary(IShellState shellState, HttpState programState)
{
return "config - Gets configuration information for the site if connected to a diagnostics endpoint";
}
}
}
================================================
FILE: src/Microsoft.HttpRepl/Commands/DeleteCommand.cs
================================================
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
namespace Microsoft.HttpRepl.Commands
{
public class DeleteCommand : BaseHttpCommand
{
protected override string Verb => "delete";
protected override bool RequiresBody => false;
}
}
================================================
FILE: src/Microsoft.HttpRepl/Commands/EchoCommand.cs
================================================
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Repl;
using Microsoft.Repl.Commanding;
using Microsoft.Repl.ConsoleHandling;
using Microsoft.Repl.Parsing;
namespace Microsoft.HttpRepl.Commands
{
public class EchoCommand : CommandWithStructuredInputBase<HttpState, ICoreParseResult>
{
private readonly HashSet<string> _allowedModes = new HashSet<string>(StringComparer.OrdinalIgnoreCase) {"on", "off"};
protected override bool CanHandle(IShellState shellState, HttpState programState, DefaultCommandInput<ICoreParseResult> commandInput)
{
if (commandInput.Arguments.Count == 0 || !_allowedModes.Contains(commandInput.Arguments[0]?.Text))
{
shellState.ConsoleManager.Error.WriteLine("Allowed echo modes are 'on' and 'off'".SetColor(programState.ErrorColor));
return false;
}
return true;
}
protected override Task ExecuteAsync(IShellState shellState, HttpState programState, DefaultCommandInput<ICoreParseResult> commandInput, ICoreParseResult parseResult, CancellationToken cancellationToken)
{
bool turnOn = string.Equals(commandInput.Arguments[0].Text, "on", StringComparison.OrdinalIgnoreCase);
programState.EchoRequest = turnOn;
shellState.ConsoleManager.WriteLine("Request echoing is " + (turnOn ? "on" : "off"));
return Task.CompletedTask;
}
public override CommandInputSpecification InputSpec { get; } = CommandInputSpecification.Create("echo").ExactArgCount(1).Finish();
protected override string GetHelpDetails(IShellState shellState, HttpState programState, DefaultCommandInput<ICoreParseResult> commandInput, ICoreParseResult parseResult)
{
var helpText = new StringBuilder();
helpText.Append("Usage: ".Bold());
helpText.AppendLine($"echo [on|off]");
helpText.AppendLine();
helpText.AppendLine($"Turns request echoing on or off. When request echoing is on we will display a text representation of requests made by the CLI.");
return helpText.ToString();
}
public override string GetHelpSummary(IShellState shellState, HttpState programState)
{
return "echo [on/off] - Turns request echoing on or off";
}
protected override IEnumerable<string> GetArgumentSuggestionsForText(IShellState shellState, HttpState programState, ICoreParseResult parseResult, DefaultCommandInput<ICoreParseResult> commandInput, string normalCompletionString)
{
List<string> result = _allowedModes.Where(x => x.StartsWith(normalCompletionString, StringComparison.OrdinalIgnoreCase)).ToList();
return result.Count > 0 ? result : null;
}
}
}
================================================
FILE: src/Microsoft.HttpRepl/Commands/ExitCommand.cs
================================================
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Repl;
using Microsoft.Repl.Commanding;
using Microsoft.Repl.ConsoleHandling;
using Microsoft.Repl.Parsing;
namespace Microsoft.HttpRepl.Commands
{
public class ExitCommand : CommandWithStructuredInputBase<object, ICoreParseResult>
{
protected override Task ExecuteAsync(IShellState shellState, object programState, DefaultCommandInput<ICoreParseResult> commandInput, ICoreParseResult parseResult, CancellationToken cancellationToken)
{
shellState.IsExiting = true;
return Task.CompletedTask;
}
public override CommandInputSpecification InputSpec { get; } = CommandInputSpecification.Create("exit").ExactArgCount(0).Finish();
protected override string GetHelpDetails(IShellState shellState, object programState, DefaultCommandInput<ICoreParseResult> commandInput, ICoreParseResult parseResult)
{
var helpText = new StringBuilder();
helpText.Append("Usage: ".Bold());
helpText.AppendLine($"exit");
helpText.AppendLine();
helpText.AppendLine($"Exits the shell");
return helpText.ToString();
}
public override string GetHelpSummary(IShellState shellState, object programState)
{
return "exit - Exits the shell";
}
}
}
================================================
FILE: src/Microsoft.HttpRepl/Commands/Formatter.cs
================================================
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
namespace Microsoft.HttpRepl.Commands
{
public class Formatter
{
private int _prefix;
private int _maxDepth;
public void RegisterEntry(int prefixLength, int depth)
{
if (depth > _maxDepth)
{
_maxDepth = depth;
}
if (prefixLength > _prefix)
{
_prefix = prefixLength;
}
}
public string Format(string prefix, string entry, int level)
{
string indent = "".PadRight(level * 4);
return (indent + prefix).PadRight(_prefix + 3 + _maxDepth * 4) + entry;
}
}
}
================================================
FILE: src/Microsoft.HttpRepl/Commands/GetCommand.cs
================================================
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
namespace Microsoft.HttpRepl.Commands
{
public class GetCommand : BaseHttpCommand
{
protected override string Verb => "get";
protected override bool RequiresBody => false;
}
}
================================================
FILE: src/Microsoft.HttpRepl/Commands/HeadCommand.cs
================================================
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
namespace Microsoft.HttpRepl.Commands
{
public class HeadCommand : BaseHttpCommand
{
protected override string Verb => "head";
protected override bool RequiresBody => false;
}
}
================================================
FILE: src/Microsoft.HttpRepl/Commands/HelpCommand.cs
================================================
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.HttpRepl.Preferences;
using Microsoft.HttpRepl.Suggestions;
using Microsoft.Repl;
using Microsoft.Repl.Commanding;
using Microsoft.Repl.ConsoleHandling;
using Microsoft.Repl.Parsing;
namespace Microsoft.HttpRepl.Commands
{
public class HelpCommand : ICommand<HttpState, ICoreParseResult>
{
private static readonly string Name = "help";
public bool? CanHandle(IShellState shellState, HttpState programState, ICoreParseResult parseResult)
{
return parseResult.Sections.Count > 0 && string.Equals(parseResult.Sections[0], Name)
? (bool?)true
: null;
}
public async Task ExecuteAsync(IShellState shellState, HttpState programState, ICoreParseResult parseResult, CancellationToken cancellationToken)
{
if (shellState.CommandDispatcher is ICommandDispatcher<HttpState, ICoreParseResult> dispatcher)
{
if (parseResult.Sections.Count == 1)
{
CoreGetHelp(shellState, dispatcher, programState);
}
else
{
bool anyHelp = false;
if (parseResult.Slice(1) is ICoreParseResult continuationParseResult)
{
foreach (ICommand<HttpState, ICoreParseResult> command in dispatcher.Commands)
{
string help = command.GetHelpDetails(shellState, programState, continuationParseResult);
if (!string.IsNullOrEmpty(help))
{
anyHelp = true;
shellState.ConsoleManager.WriteLine();
shellState.ConsoleManager.WriteLine(help);
var structuredCommand = command as CommandWithStructuredInputBase<HttpState, ICoreParseResult>;
if (structuredCommand != null && structuredCommand.InputSpec.Options.Any())
{
shellState.ConsoleManager.WriteLine();
shellState.ConsoleManager.WriteLine("Options:".Bold());
foreach (var option in structuredCommand.InputSpec.Options)
{
var optionText = string.Empty;
foreach (var form in option.Forms)
{
if (!string.IsNullOrEmpty(optionText))
{
optionText += "|";
}
optionText += form;
}
shellState.ConsoleManager.WriteLine($" {optionText}");
}
}
break;
}
}
}
if (!anyHelp)
{
//Maybe the input is an URL
if (parseResult.Sections.Count == 2)
{
if (programState.SwaggerEndpoint != null)
{
string swaggerRequeryBehaviorSetting = programState.GetStringPreference(WellKnownPreference.SwaggerRequeryBehavior, "auto");
if (swaggerRequeryBehaviorSetting.StartsWith("auto", StringComparison.OrdinalIgnoreCase))
{
await SetSwaggerCommand.CreateDirectoryStructureForSwaggerEndpointAsync(shellState, programState, programState.SwaggerEndpoint, cancellationToken).ConfigureAwait(false);
}
}
//Structure is null because, for example, SwaggerEndpoint exists but is not reachable.
if (programState.Structure != null)
{
IDirectoryStructure structure = programState.Structure.TraverseTo(parseResult.Sections[1]);
if (structure.DirectoryNames.Any())
{
shellState.ConsoleManager.WriteLine("Child directories:");
foreach (string name in structure.DirectoryNames)
{
shellState.ConsoleManager.WriteLine(" " + name + "/");
}
anyHelp = true;
}
if (structure.RequestInfo != null)
{
if (structure.RequestInfo.Methods.Count > 0)
{
if (anyHelp)
{
shellState.ConsoleManager.WriteLine();
}
anyHelp = true;
shellState.ConsoleManager.WriteLine("Available methods:");
foreach (string method in structure.RequestInfo.Methods)
{
shellState.ConsoleManager.WriteLine(" " + method.ToUpperInvariant());
IReadOnlyList<string> accepts = structure.RequestInfo.ContentTypesByMethod[method];
string acceptsString = string.Join(", ", accepts.Where(x => !string.IsNullOrEmpty(x)));
if (!string.IsNullOrEmpty(acceptsString))
{
shellState.ConsoleManager.WriteLine(" Accepts: " + acceptsString);
}
}
}
}
}
}
if (!anyHelp)
{
shellState.ConsoleManager.WriteLine("Unable to locate any help information for the specified command");
}
}
}
}
}
public string GetHelpDetails(IShellState shellState, HttpState programState, ICoreParseResult parseResult)
{
if (parseResult.Sections.Count > 0 && string.Equals(parseResult.Sections[0], Name, StringComparison.OrdinalIgnoreCase))
{
if (parseResult.Sections.Count > 1)
{
return "Gets help about " + parseResult.Slice(1).CommandText;
}
else
{
return "Gets help";
}
}
return null;
}
public string GetHelpSummary(IShellState shellState, HttpState programState)
{
return "help - Gets help";
}
public IEnumerable<string> Suggest(IShellState shellState, HttpState programState, ICoreParseResult parseResult)
{
if (parseResult.SelectedSection == 0 &&
(string.IsNullOrEmpty(parseResult.Sections[parseResult.SelectedSection]) || Name.StartsWith(parseResult.Sections[0].Substring(0, parseResult.CaretPositionWithinSelectedSection), StringComparison.OrdinalIgnoreCase)))
{
return new[] { Name };
}
else if (parseResult.Sections.Count > 1 && string.Equals(parseResult.Sections[0], Name, StringComparison.OrdinalIgnoreCase))
{
if (shellState.CommandDispatcher is ICommandDispatcher<HttpState, ICoreParseResult> dispatcher
&& parseResult.Slice(1) is ICoreParseResult continuationParseResult)
{
HashSet<string> suggestions = new HashSet<string>(StringComparer.OrdinalIgnoreCase);
foreach (ICommand<HttpState, ICoreParseResult> command in dispatcher.Commands)
{
IEnumerable<string> commandSuggestions = command.Suggest(shellState, programState, continuationParseResult);
if (commandSuggestions != null)
{
suggestions.UnionWith(commandSuggestions);
}
}
if (continuationParseResult.SelectedSection == 0)
{
string normalizedCompletionText = continuationParseResult.Sections[0].Substring(0, continuationParseResult.CaretPositionWithinSelectedSection);
suggestions.UnionWith(ServerPathCompletion.GetCompletions(programState, normalizedCompletionText));
}
return suggestions.OrderBy(x => x, StringComparer.OrdinalIgnoreCase).ToList();
}
}
return null;
}
public void CoreGetHelp(IShellState shellState, ICommandDispatcher<HttpState, ICoreParseResult> dispatcher, HttpState programState)
{
shellState.ConsoleManager.WriteLine();
shellState.ConsoleManager.WriteLine("HTTP Commands:".Bold().Cyan());
shellState.ConsoleManager.WriteLine("Use these commands to execute requests against your application.");
shellState.ConsoleManager.WriteLine();
const int navCommandColumn = -15;
shellState.ConsoleManager.WriteLine($"{"GET",navCommandColumn}{"Issues a GET request."}");
shellState.ConsoleManager.WriteLine($"{"POST",navCommandColumn}{"Issues a POST request."}");
shellState.ConsoleManager.WriteLine($"{"PUT",navCommandColumn}{"Issues a PUT request."}");
shellState.ConsoleManager.WriteLine($"{"DELETE",navCommandColumn}{"Issues a DELETE request."}");
shellState.ConsoleManager.WriteLine($"{"PATCH",navCommandColumn}{"Issues a PATCH request."}");
shellState.ConsoleManager.WriteLine($"{"HEAD",navCommandColumn}{"Issues a HEAD request."}");
shellState.ConsoleManager.WriteLine($"{"OPTIONS",navCommandColumn}{"Issues an OPTIONS request."}");
shellState.ConsoleManager.WriteLine();
shellState.ConsoleManager.WriteLine($"{"set header",navCommandColumn}{"Sets or clears a header for all requests. e.g. `set header content-type application/json`"}");
shellState.ConsoleManager.WriteLine();
shellState.ConsoleManager.WriteLine();
shellState.ConsoleManager.WriteLine("Navigation Commands:".Bold().Cyan());
shellState.ConsoleManager.WriteLine("The REPL allows you to navigate your URL space and focus on specific APIS that you are working on.");
shellState.ConsoleManager.WriteLine();
shellState.ConsoleManager.WriteLine($"{"set base",navCommandColumn}{"Set the base URI. e.g. `set base http://locahost:5000`"}");
shellState.ConsoleManager.WriteLine($"{"set swagger",navCommandColumn}{"Set the URI, relative to your base if set, of the Swagger document for this API. e.g. `set swagger /swagger/v1/swagger.json`"}");
shellState.ConsoleManager.WriteLine($"{"ls",navCommandColumn}{"Show all endpoints for the current path."}");
shellState.ConsoleManager.WriteLine($"{"cd",navCommandColumn}{"Append the given directory to the currently selected path, or move up a path when using `cd ..`."}");
shellState.ConsoleManager.WriteLine();
shellState.ConsoleManager.WriteLine("Shell Commands:".Bold().Cyan());
shellState.ConsoleManager.WriteLine("Use these commands to interact with the REPL shell.");
shellState.ConsoleManager.WriteLine();
shellState.ConsoleManager.WriteLine($"{"clear",navCommandColumn}{"Removes all text from the shell."}");
shellState.ConsoleManager.WriteLine($"{"echo [on/off]",navCommandColumn}{"Turns request echoing on or off, show the request that was mode when using request commands."}");
shellState.ConsoleManager.WriteLine($"{"exit",navCommandColumn}{"Exit the shell."}");
shellState.ConsoleManager.WriteLine();
shellState.ConsoleManager.WriteLine("REPL Customization Commands:".Bold().Cyan());
shellState.ConsoleManager.WriteLine("Use these commands to customize the REPL behavior..");
shellState.ConsoleManager.WriteLine();
shellState.ConsoleManager.WriteLine($"{"pref [get/set]",navCommandColumn}{"Allows viewing or changing preferences, e.g. 'pref set editor.command.default 'C:\\Program Files\\Microsoft VS Code\\Code.exe'`"}");
shellState.ConsoleManager.WriteLine($"{"run",navCommandColumn}{"Runs the script at the given path. A script is a set of commands that can be typed with one command per line."}");
shellState.ConsoleManager.WriteLine($"{"ui",navCommandColumn}{"Displays the swagger UI page, if available, in the default browser."}");
shellState.ConsoleManager.WriteLine();
shellState.ConsoleManager.WriteLine("Use help <COMMAND> to learn more details about individual commands. e.g. `help get`".Bold().Cyan());
shellState.ConsoleManager.WriteLine();
}
}
}
================================================
FILE: src/Microsoft.HttpRepl/Commands/ListCommand.cs
================================================
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.HttpRepl.Preferences;
using Microsoft.Repl;
using Microsoft.Repl.Commanding;
using Microsoft.Repl.ConsoleHandling;
using Microsoft.Repl.Parsing;
namespace Microsoft.HttpRepl.Commands
{
public class ListCommand : CommandWithStructuredInputBase<HttpState, ICoreParseResult>
{
private const string RecursiveOption = nameof(RecursiveOption);
protected override async Task ExecuteAsync(IShellState shellState, HttpState programState, DefaultCommandInput<ICoreParseResult> commandInput, ICoreParseResult parseResult, CancellationToken cancellationToken)
{
if (programState.SwaggerEndpoint != null)
{
string swaggerRequeryBehaviorSetting = programState.GetStringPreference(WellKnownPreference.SwaggerRequeryBehavior, "auto");
if (swaggerRequeryBehaviorSetting.StartsWith("auto", StringComparison.OrdinalIgnoreCase))
{
await SetSwaggerCommand.CreateDirectoryStructureForSwaggerEndpointAsync(shellState, programState, programState.SwaggerEndpoint, cancellationToken).ConfigureAwait(false);
}
}
if (programState.Structure == null || programState.BaseAddress == null)
{
return;
}
string path = commandInput.Arguments.Count > 0 ? commandInput.Arguments[0].Text : string.Empty;
//If it's an absolute URI, nothing to suggest
if (Uri.TryCreate(path, UriKind.Absolute, out Uri _))
{
return;
}
IDirectoryStructure s = programState.Structure.TraverseTo(programState.PathSections.Reverse()).TraverseTo(path);
string thisDirMethod = s.RequestInfo != null && s.RequestInfo.Methods.Count > 0
? "[" + string.Join("|", s.RequestInfo.Methods) + "]"
: "[]";
List<TreeNode> roots = new List<TreeNode>();
Formatter formatter = new Formatter();
roots.Add(new TreeNode(formatter, ".", thisDirMethod));
if (s.Parent != null)
{
string parentDirMethod = s.Parent.RequestInfo != null && s.Parent.RequestInfo.Methods.Count > 0
? "[" + string.Join("|", s.Parent.RequestInfo.Methods) + "]"
: "[]";
roots.Add(new TreeNode(formatter, "..", parentDirMethod));
}
int recursionDepth = 1;
if (commandInput.Options[RecursiveOption].Count > 0)
{
if (string.IsNullOrEmpty(commandInput.Options[RecursiveOption][0]?.Text))
{
recursionDepth = int.MaxValue;
}
else if (int.TryParse(commandInput.Options[RecursiveOption][0].Text, NumberStyles.Integer, CultureInfo.InvariantCulture, out int rd) && rd > 1)
{
recursionDepth = rd;
}
}
foreach (string child in s.DirectoryNames)
{
IDirectoryStructure dir = s.GetChildDirectory(child);
string methods = dir.RequestInfo != null && dir.RequestInfo.Methods.Count > 0
? "[" + string.Join("|", dir.RequestInfo.Methods) + "]"
: "[]";
TreeNode dirNode = new TreeNode(formatter, child, methods);
roots.Add(dirNode);
Recurse(dirNode, dir, recursionDepth - 1);
}
foreach (TreeNode node in roots)
{
shellState.ConsoleManager.WriteLine(node.ToString());
}
}
private static void Recurse(TreeNode parentNode, IDirectoryStructure parent, int remainingDepth)
{
if (remainingDepth <= 0)
{
return;
}
foreach (string child in parent.DirectoryNames)
{
IDirectoryStructure dir = parent.GetChildDirectory(child);
string methods = dir.RequestInfo != null && dir.RequestInfo.Methods.Count > 0
? "[" + string.Join("|", dir.RequestInfo.Methods) + "]"
: "[]";
TreeNode node = parentNode.AddChild(child, methods);
Recurse(node, dir, remainingDepth - 1);
}
}
public override CommandInputSpecification InputSpec { get; } = CommandInputSpecification.Create("ls").AlternateName("dir")
.MaximumArgCount(1)
.WithOption(new CommandOptionSpecification(RecursiveOption, maximumOccurrences: 1, acceptsValue: true, forms: new[] {"-r", "--recursive"}))
.Finish();
protected override string GetHelpDetails(IShellState shellState, HttpState programState, DefaultCommandInput<ICoreParseResult> commandInput, ICoreParseResult parseResult)
{
var helpText = new StringBuilder();
helpText.Append("Usage: ".Bold());
helpText.AppendLine($"ls [Options]");
helpText.AppendLine();
helpText.AppendLine($"Displays the known routes at the current location. Requires a Swagger document to be set.");
return helpText.ToString();
}
public override string GetHelpSummary(IShellState shellState, HttpState programState)
{
return "ls - List known routes for the current location";
}
protected override IEnumerable<string> GetArgumentSuggestionsForText(IShellState shellState, HttpState programState, ICoreParseResult parseResult, DefaultCommandInput<ICoreParseResult> commandInput, string normalCompletionString)
{
if (programState.Structure == null || programState.BaseAddress == null)
{
return null;
}
//If it's an absolute URI, nothing to suggest
if (Uri.TryCreate(normalCompletionString, UriKind.Absolute, out Uri _))
{
return null;
}
string path = normalCompletionString.Replace('\\', '/');
int searchFrom = normalCompletionString.Length - 1;
int lastSlash = path.LastIndexOf('/', searchFrom);
string prefix;
if (lastSlash < 0)
{
path = string.Empty;
prefix = normalCompletionString;
}
else
{
path = path.Substring(0, lastSlash + 1);
prefix = normalCompletionString.Substring(lastSlash + 1);
}
IDirectoryStructure s = programState.Structure.TraverseTo(programState.PathSections.Reverse()).TraverseTo(path);
List<string> results = new List<string>();
foreach (string child in s.DirectoryNames)
{
if (child.StartsWith(prefix, StringComparison.OrdinalIgnoreCase))
{
results.Add(path + child);
}
}
return results;
}
}
}
================================================
FILE: src/Microsoft.HttpRepl/Commands/OptionsCommand.cs
================================================
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
namespace Microsoft.HttpRepl.Commands
{
public class OptionsCommand : BaseHttpCommand
{
protected override string Verb => "options";
protected override bool RequiresBody => false;
}
}
================================================
FILE: src/Microsoft.HttpRepl/Commands/PatchCommand.cs
================================================
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
namespace Microsoft.HttpRepl.Commands
{
public class PatchCommand : BaseHttpCommand
{
protected override string Verb => "patch";
protected override bool RequiresBody => true;
}
}
================================================
FILE: src/Microsoft.HttpRepl/Commands/PostCommand.cs
================================================
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
namespace Microsoft.HttpRepl.Commands
{
public class PostCommand : BaseHttpCommand
{
protected override string Verb => "post";
protected override bool RequiresBody => true;
}
}
================================================
FILE: src/Microsoft.HttpRepl/Commands/PrefCommand.cs
================================================
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.HttpRepl.Preferences;
using Microsoft.Repl;
using Microsoft.Repl.Commanding;
using Microsoft.Repl.ConsoleHandling;
using Microsoft.Repl.Parsing;
namespace Microsoft.HttpRepl.Commands
{
public class PrefCommand : CommandWithStructuredInputBase<HttpState, ICoreParseResult>
{
private readonly HashSet<string> _allowedSubcommands = new HashSet<string>(StringComparer.OrdinalIgnoreCase) {"get", "set"};
public override string GetHelpSummary(IShellState shellState, HttpState programState)
{
return "pref [get/set] {setting} [{value}] - Allows viewing or changing preferences";
}
protected override bool CanHandle(IShellState shellState, HttpState programState, DefaultCommandInput<ICoreParseResult> commandInput)
{
if (commandInput.Arguments.Count == 0 || !_allowedSubcommands.Contains(commandInput.Arguments[0]?.Text))
{
shellState.ConsoleManager.Error.WriteLine("Whether get or set settings must be specified");
return false;
}
if (!string.Equals("get", commandInput.Arguments[0].Text) && (commandInput.Arguments.Count < 2 || string.IsNullOrEmpty(commandInput.Arguments[1]?.Text)))
{
shellState.ConsoleManager.Error.WriteLine("The preference to set must be specified");
return false;
}
return true;
}
protected override string GetHelpDetails(IShellState shellState, HttpState programState, DefaultCommandInput<ICoreParseResult> commandInput, ICoreParseResult parseResult)
{
var helpText = new StringBuilder();
helpText.Append("Usage: ".Bold());
if (commandInput.Arguments.Count == 0 || !_allowedSubcommands.Contains(commandInput.Arguments[0]?.Text))
{
helpText.AppendLine("pref [get/set] {setting} [{value}] - Get or sets a preference to a particular value");
}
else if (string.Equals(commandInput.Arguments[0].Text, "get", StringComparison.OrdinalIgnoreCase))
{
helpText.AppendLine("pref get [{setting}] - Gets the value of the specified preference or lists all preferences if no preference is specified");
}
else
{
helpText.AppendLine("pref set {setting} [{value}] - Sets (or clears if value is not specified) the value of the specified preference");
}
helpText.AppendLine();
helpText.AppendLine("Current Default Preferences:");
foreach (var pref in programState.DefaultPreferences)
{
var val = pref.Value;
if (pref.Key.Contains("colors"))
{
val = GetColor(val);
}
helpText.AppendLine($"{pref.Key,-50}{val}");
}
helpText.AppendLine();
helpText.AppendLine("Current Preferences:");
foreach (var pref in programState.Preferences)
{
var val = pref.Value;
if (pref.Key.Contains("colors"))
{
val = GetColor(val);
}
helpText.AppendLine($"{pref.Key,-50}{val}");
}
return helpText.ToString();
}
private static string GetColor(string value)
{
if (value.Contains("Bold"))
{
value = value.Bold();
}
if (value.Contains("Yellow"))
{
value = value.Yellow();
}
if (value.Contains("Cyan"))
{
value = value.Cyan();
}
if (value.Contains("Magenta"))
{
value = value.Magenta();
}
if (value.Contains("Green"))
{
value = value.Green();
}
if (value.Contains("White"))
{
value = value.White();
}
if (value.Contains("Black"))
{
value = value.Black();
}
return value;
}
protected override Task ExecuteAsync(IShellState shellState, HttpState programState, DefaultCommandInput<ICoreParseResult> commandInput, ICoreParseResult parseResult, CancellationToken cancellationToken)
{
if (string.Equals(commandInput.Arguments[0].Text, "get", StringComparison.OrdinalIgnoreCase))
{
return GetSetting(shellState, programState, commandInput);
}
return SetSetting(shellState, programState, commandInput);
}
private static Task SetSetting(IShellState shellState, HttpState programState, DefaultCommandInput<ICoreParseResult> commandInput)
{
string prefName = commandInput.Arguments[1].Text;
string prefValue = commandInput.Arguments.Count > 2 ? commandInput.Arguments[2]?.Text : null;
if (string.IsNullOrEmpty(prefValue))
{
if (!programState.DefaultPreferences.TryGetValue(prefName, out string defaultValue))
{
programState.Preferences.Remove(prefName);
}
else
{
programState.Preferences[prefName] = defaultValue;
}
}
else
{
programState.Preferences[prefName] = prefValue;
}
if (!programState.SavePreferences())
{
shellState.ConsoleManager.Error.WriteLine("Error saving preferences".SetColor(programState.ErrorColor));
}
return Task.CompletedTask;
}
private static Task GetSetting(IShellState shellState, HttpState programState, DefaultCommandInput<ICoreParseResult> commandInput)
{
string preferenceName = commandInput.Arguments.Count > 1 ? commandInput.Arguments[1]?.Text : null;
//If there's a particular setting to get the value of
if (!string.IsNullOrEmpty(preferenceName))
{
if (programState.Preferences.TryGetValue(preferenceName, out string value))
{
shellState.ConsoleManager.WriteLine("Configured value: " + value);
}
else
{
shellState.ConsoleManager.Error.WriteLine((commandInput.Arguments[1].Text + " does not have a configured value").SetColor(programState.ErrorColor));
}
}
else
{
foreach (KeyValuePair<string, string> entry in programState.Preferences.OrderBy(x => x.Key))
{
shellState.ConsoleManager.WriteLine($"{entry.Key}={entry.Value}");
}
}
return Task.CompletedTask;
}
public override CommandInputSpecification InputSpec { get; } = CommandInputSpecification.Create("pref")
.MinimumArgCount(1)
.MaximumArgCount(3)
.Finish();
protected override IEnumerable<string> GetArgumentSuggestionsForText(IShellState shellState, HttpState programState, ICoreParseResult parseResult, DefaultCommandInput<ICoreParseResult> commandInput, string normalCompletionString)
{
if (parseResult.SelectedSection == 1)
{
return _allowedSubcommands.Where(x => x.StartsWith(normalCompletionString, StringComparison.OrdinalIgnoreCase));
}
if (parseResult.SelectedSection == 2)
{
string prefix = parseResult.Sections.Count > 2 ? normalCompletionString : string.Empty;
List<string> matchingProperties = new List<string>();
foreach (string val in WellKnownPreference.Catalog.Names)
{
if (val.StartsWith(prefix, StringComparison.OrdinalIgnoreCase))
{
matchingProperties.Add(val);
}
}
return matchingProperties;
}
if (parseResult.SelectedSection == 3
&& parseResult.Sections[2].StartsWith("colors.", StringComparison.OrdinalIgnoreCase))
{
string prefix = parseResult.Sections.Count > 3 ? normalCompletionString : string.Empty;
List<string> matchingProperties = new List<string>();
foreach (string val in Enum.GetNames(typeof(AllowedColors)))
{
if (val.StartsWith(prefix, StringComparison.OrdinalIgnoreCase))
{
matchingProperties.Add(val);
}
}
return matchingProperties;
}
return null;
}
}
}
================================================
FILE: src/Microsoft.HttpRepl/Commands/PutCommand.cs
================================================
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
namespace Microsoft.HttpRepl.Commands
{
public class PutCommand : BaseHttpCommand
{
protected override string Verb => "put";
protected override bool RequiresBody => true;
}
}
================================================
FILE: src/Microsoft.HttpRepl/Commands/RunCommand.cs
================================================
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Repl;
using Microsoft.Repl.Commanding;
using Microsoft.Repl.ConsoleHandling;
using Microsoft.Repl.Parsing;
using Microsoft.Repl.Scripting;
using Microsoft.Repl.Suggestions;
namespace Microsoft.HttpRepl.Commands
{
public class RunCommand : ICommand<HttpState, ICoreParseResult>
{
private static readonly string Name = "run";
public bool? CanHandle(IShellState shellState, HttpState programState, ICoreParseResult parseResult)
{
return parseResult.Sections.Count > 1 && parseResult.Sections.Count < 4 && string.Equals(Name, parseResult.Sections[0], StringComparison.OrdinalIgnoreCase)
? (bool?)true
: null;
}
public async Task ExecuteAsync(IShellState shellState, HttpState programState, ICoreParseResult parseResult, CancellationToken cancellationToken)
{
if (!File.Exists(parseResult.Sections[1]))
{
shellState.ConsoleManager.Error.WriteLine($"Could not file script file {parseResult.Sections[1]}");
return;
}
bool suppressScriptLinesInHistory = true;
if (parseResult.Sections.Count == 3)
{
suppressScriptLinesInHistory = !string.Equals(parseResult.Sections[2], "+history");
}
string[] lines = File.ReadAllLines(parseResult.Sections[1]);
IScriptExecutor scriptExecutor = new ScriptExecutor<HttpState, ICoreParseResult>(suppressScriptLinesInHistory);
await scriptExecutor.ExecuteScriptAsync(shellState, lines, cancellationToken).ConfigureAwait(false);
}
public string GetHelpDetails(IShellState shellState, HttpState programState, ICoreParseResult parseResult)
{
if (parseResult.Sections.Count > 0 && string.Equals(parseResult.Sections[0], Name, StringComparison.OrdinalIgnoreCase))
{
var helpText = new StringBuilder();
helpText.Append("Usage: ".Bold());
helpText.AppendLine("run {path to script}");
helpText.AppendLine();
helpText.AppendLine("Runs the specified script.");
helpText.AppendLine("A script is a text file containing one CLI command per line. Each line will be run as if it was typed into the CLI.");
return helpText.ToString();
}
return null;
}
public string GetHelpSummary(IShellState shellState, HttpState programState)
{
return "run {path to script} - Runs a script";
}
public IEnumerable<string> Suggest(IShellState shellState, HttpState programState, ICoreParseResult parseResult)
{
if (parseResult.SelectedSection == 0 &&
(string.IsNullOrEmpty(parseResult.Sections[parseResult.SelectedSection]) || Name.StartsWith(parseResult.Sections[0].Substring(0, parseResult.CaretPositionWithinSelectedSection), StringComparison.OrdinalIgnoreCase)))
{
return new[] { Name };
}
if (parseResult.SelectedSection == 1 && string.Equals(parseResult.Sections[0], Name, StringComparison.OrdinalIgnoreCase))
{
return FileSystemCompletion.GetCompletions(parseResult.Sections[1].Substring(0, parseResult.CaretPositionWithinSelectedSection));
}
return null;
}
}
}
================================================
FILE: src/Microsoft.HttpRepl/Commands/SetBaseCommand.cs
================================================
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Sockets;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Repl;
using Microsoft.Repl.Commanding;
using Microsoft.Repl.ConsoleHandling;
using Microsoft.Repl.Parsing;
namespace Microsoft.HttpRepl.Commands
{
public class SetBaseCommand : ICommand<HttpState, ICoreParseResult>
{
private const string Name = "set";
private const string SubCommand = "base";
public string Description => "Sets the base address to direct requests to.";
public bool? CanHandle(IShellState shellState, HttpState programState, ICoreParseResult parseResult)
{
return parseResult.Sections.Count > 1 && string.Equals(parseResult.Sections[0], Name, StringComparison.OrdinalIgnoreCase) && string.Equals(parseResult.Sections[1], SubCommand, StringComparison.OrdinalIgnoreCase)
? (bool?)true
: null;
}
public async Task ExecuteAsync(IShellState shellState, HttpState state, ICoreParseResult parseResult, CancellationToken cancellationToken)
{
if (parseResult.Sections.Count == 2)
{
state.BaseAddress = null;
}
else if (parseResult.Sections.Count != 3 || string.IsNullOrEmpty(parseResult.Sections[2]) || !Uri.TryCreate(EnsureTrailingSlash(parseResult.Sections[2]), UriKind.Absolute, out Uri serverUri))
{
shellState.ConsoleManager.Error.WriteLine("Must specify a server".SetColor(state.ErrorColor));
}
else
{
state.BaseAddress = serverUri;
try
{
await state.Client.SendAsync(new HttpRequestMessage(HttpMethod.Head, serverUri)).ConfigureAwait(false);
}
catch (Exception ex) when (ex.InnerException is SocketException se)
{
shellState.ConsoleManager.Error.WriteLine($"Warning: HEAD request to the specified address was unsuccessful ({se.Message})".SetColor(state.WarningColor));
}
catch { }
}
if (state.BaseAddress == null || !Uri.TryCreate(state.BaseAddress, "swagger.json", out Uri result))
{
state.SwaggerStructure = null;
}
else
{
await SetSwaggerCommand.CreateDirectoryStructureForSwaggerEndpointAsync(shellState, state, result, cancellationToken).ConfigureAwait(false);
if (state.SwaggerStructure != null)
{
shellState.ConsoleManager.WriteLine("Using swagger metadata from " + result);
}
else
{
if (state.BaseAddress == null || !Uri.TryCreate(state.BaseAddress, "swagger/v1/swagger.json", out result))
{
state.SwaggerStructure = null;
}
else
{
await SetSwaggerCommand.CreateDirectoryStructureForSwaggerEndpointAsync(shellState, state, result, cancellationToken).ConfigureAwait(false);
if (state.SwaggerStructure != null)
{
shellState.ConsoleManager.WriteLine("Using swagger metadata from " + result);
}
}
}
}
}
private string EnsureTrailingSlash(string v)
{
if (!v.EndsWith("/", StringComparison.Ordinal))
{
v += "/";
}
return v;
}
public string GetHelpDetails(IShellState shellState, HttpState programState, ICoreParseResult parseResult)
{
if (parseResult.Sections.Count > 1 && string.Equals(parseResult.Sections[0], Name, StringComparison.OrdinalIgnoreCase) && string.Equals(parseResult.Sections[1], SubCommand, StringComparison.OrdinalIgnoreCase))
{
var helpText = new StringBuilder();
helpText.Append("Usage: ".Bold());
helpText.AppendLine($"set base [uri]");
helpText.AppendLine();
helpText.AppendLine(Description);
return helpText.ToString();
}
return null;
}
public string GetHelpSummary(IShellState shellState, HttpState programState)
{
return Description;
}
public IEnumerable<string> Suggest(IShellState shellState, HttpState programState, ICoreParseResult parseResult)
{
if (parseResult.Sections.Count == 0)
{
return new[] { Name };
}
if (parseResult.Sections.Count > 0 && parseResult.SelectedSection == 0 && Name.StartsWith(parseResult.Sections[0].Substring(0, parseResult.CaretPositionWithinSelectedSection), StringComparison.OrdinalIgnoreCase))
{
return new[] { Name };
}
if (string.Equals(Name, parseResult.Sections[0], StringComparison.OrdinalIgnoreCase) && parseResult.SelectedSection == 1 && (parseResult.Sections.Count < 2 || SubCommand.StartsWith(parseResult.Sections[1].Substring(0, parseResult.CaretPositionWithinSelectedSection), StringComparison.OrdinalIgnoreCase)))
{
return new[] { SubCommand };
}
return null;
}
}
}
================================================
FILE: src/Microsoft.HttpRepl/Commands/SetDiagCommand.cs
================================================
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.HttpRepl.Diagnostics;
using Microsoft.Repl;
using Microsoft.Repl.Commanding;
using Microsoft.Repl.ConsoleHandling;
using Microsoft.Repl.Parsing;
namespace Microsoft.HttpRepl.Commands
{
public class SetDiagCommand : ICommand<HttpState, ICoreParseResult>
{
private static readonly string Name = "set";
private static readonly string SubCommand = "diag";
public string Description => "Sets the diagnostics path to direct requests to.";
public bool? CanHandle(IShellState shellState, HttpState programState, ICoreParseResult parseResult)
{
return parseResult.Sections.Count > 1 && string.Equals(parseResult.Sections[0], Name, StringComparison.OrdinalIgnoreCase) && string.Equals(parseResult.Sections[1], SubCommand, StringComparison.OrdinalIgnoreCase)
? (bool?)true
: null;
}
public async Task ExecuteAsync(IShellState shellState, HttpState programState, ICoreParseResult parseResult, CancellationToken cancellationToken)
{
if (parseResult.Sections.Count == 2)
{
programState.DiagnosticsState.DiagnosticsEndpoint = null;
programState.DiagnosticsState.DiagnosticItems = null;
programState.DiagnosticsState.DiagEndpointsStructure = null;
return;
}
if (parseResult.Sections.Count != 3 || string.IsNullOrEmpty(parseResult.Sections[2]) || !Uri.TryCreate(parseResult.Sections[2], UriKind.Relative, out Uri _))
{
shellState.ConsoleManager.Error.WriteLine("Must specify a relative path".SetColor(programState.ErrorColor));
}
else
{
programState.DiagnosticsState.DiagnosticsEndpoint = parseResult.Sections[2];
HttpResponseMessage response = await programState.Client.GetAsync(new Uri(programState.BaseAddress, programState.DiagnosticsState.DiagnosticsEndpoint), cancellationToken).ConfigureAwait(false);
if (!response.IsSuccessStatusCode)
{
shellState.ConsoleManager.Error.WriteLine("Unable to access diagnostics endpoint".SetColor(programState.ErrorColor));
programState.DiagnosticsState.DiagnosticsEndpoint = null;
programState.DiagnosticsState.DiagnosticItems = null;
}
else
{
programState.DiagnosticsState.DiagnosticItems = (await response.Content.ReadAsAsync<Dictionary<string, DiagItem>>(cancellationToken).ConfigureAwait(false))?.Select(x => x.Value).ToList();
DiagItem endpointsItem = programState.DiagnosticsState.DiagnosticItems?.FirstOrDefault(x => string.Equals(x.DisplayName, "Endpoints", StringComparison.OrdinalIgnoreCase));
if (endpointsItem != null)
{
HttpResponseMessage endpointsResponse = await programState.Client.GetAsync(new Uri(programState.BaseAddress, endpointsItem.Url), cancellationToken).ConfigureAwait(false);
if (!endpointsResponse.IsSuccessStatusCode)
{
shellState.ConsoleManager.Error.WriteLine("Unable to get endpoints information from diagnostics endpoint".SetColor(programState.ErrorColor));
return;
}
List<DiagEndpoint> endpoints = await endpointsResponse.Content.ReadAsAsync<List<DiagEndpoint>>(cancellationToken).ConfigureAwait(false);
DirectoryStructure structure = new DirectoryStructure(null);
foreach (DiagEndpoint endpoint in endpoints)
{
if (endpoint.Url.StartsWith(endpointsItem.Url, StringComparison.OrdinalIgnoreCase)
|| endpoint.Url.StartsWith("/graphql", StringComparison.OrdinalIgnoreCase))
{
continue;
}
FillDirectoryInfo(structure, endpoint.Url);
}
programState.DiagnosticsState.DiagEndpointsStructure = structure;
}
}
}
}
private static void FillDirectoryInfo(DirectoryStructure parent, string endpoint)
{
string[] parts = endpoint.Split('/');
foreach (string part in parts)
{
if (!string.IsNullOrEmpty(part))
{
parent = parent.DeclareDirectory(part);
}
}
}
public string GetHelpSummary(IShellState shellState, HttpState programState)
{
return Description;
}
public string GetHelpDetails(IShellState shellState, HttpState programState, ICoreParseResult parseResult)
{
if (parseResult.Sections.Count > 1 && string.Equals(parseResult.Sections[0], Name, StringComparison.OrdinalIgnoreCase) && string.Equals(parseResult.Sections[1], SubCommand, StringComparison.OrdinalIgnoreCase))
{
return Description;
}
return null;
}
public IEnumerable<string> Suggest(IShellState shellState, HttpState programState, ICoreParseResult parseResult)
{
if (parseResult.Sections.Count == 0)
{
return new[] { Name };
}
if (parseResult.Sections.Count > 0 && parseResult.SelectedSection == 0 && Name.StartsWith(parseResult.Sections[0].Substring(0, parseResult.CaretPositionWithinSelectedSection), StringComparison.OrdinalIgnoreCase))
{
return new[] { Name };
}
if (string.Equals(Name, parseResult.Sections[0], StringComparison.OrdinalIgnoreCase) && parseResult.SelectedSection == 1 && (parseResult.Sections.Count < 2 || SubCommand.StartsWith(parseResult.Sections[1].Substring(0, parseResult.CaretPositionWithinSelectedSection), StringComparison.OrdinalIgnoreCase)))
{
return new[] { SubCommand };
}
return null;
}
}
}
================================================
FILE: src/Microsoft.HttpRepl/Commands/SetHeaderCommand.cs
================================================
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.HttpRepl.Suggestions;
using Microsoft.Repl;
using Microsoft.Repl.Commanding;
using Microsoft.Repl.ConsoleHandling;
using Microsoft.Repl.Parsing;
namespace Microsoft.HttpRepl.Commands
{
public class SetHeaderCommand : ICommand<HttpState, ICoreParseResult>
{
private static readonly string Name = "set";
private static readonly string SubCommand = "header";
public string Description => "set header {name} [value] - Sets or clears a header";
public bool? CanHandle(IShellState shellState, HttpState programState, ICoreParseResult parseResult)
{
return parseResult.Sections.Count > 2 && string.Equals(parseResult.Sections[0], Name, StringComparison.OrdinalIgnoreCase) && string.Equals(parseResult.Sections[1], SubCommand, StringComparison.OrdinalIgnoreCase)
? (bool?)true
: null;
}
public Task ExecuteAsync(IShellState shellState, HttpState programState, ICoreParseResult parseResult, CancellationToken cancellationToken)
{
if (parseResult.Sections.Count == 3)
{
programState.Headers.Remove(parseResult.Sections[2]);
}
else
{
programState.Headers[parseResult.Sections[2]] = parseResult.Sections.Skip(3).ToList();
}
return Task.CompletedTask;
}
public string GetHelpDetails(IShellState shellState, HttpState programState, ICoreParseResult parseResult)
{
var helpText = new StringBuilder();
helpText.Append("Usage: ".Bold());
helpText.AppendLine("set header {name} [value]");
helpText.AppendLine();
helpText.AppendLine("Sets or clears a header. When [value] is empty the header is cleared.");
return Description;
}
public string GetHelpSummary(IShellState shellState, HttpState programState)
{
return Description;
}
public IEnumerable<string> Suggest(IShellState shellState, HttpState programState, ICoreParseResult parseResult)
{
if (parseResult.Sections.Count == 0)
{
return new[] { Name };
}
if (parseResult.Sections.Count > 0 && parseResult.SelectedSection == 0 && Name.StartsWith(parseResult.Sections[0].Substring(0, parseResult.CaretPositionWithinSelectedSection), StringComparison.OrdinalIgnoreCase))
{
return new[] { Name };
}
if (string.Equals(Name, parseResult.Sections[0], StringComparison.OrdinalIgnoreCase) && parseResult.SelectedSection == 1 && (parseResult.Sections.Count < 2 || SubCommand.StartsWith(parseResult.Sections[1].Substring(0, parseResult.CaretPositionWithinSelectedSection), StringComparison.OrdinalIgnoreCase)))
{
return new[] { SubCommand };
}
if (parseResult.Sections.Count > 2
&& string.Equals(Name, parseResult.Sections[0], StringComparison.OrdinalIgnoreCase)
&& string.Equals(SubCommand, parseResult.Sections[1], StringComparison.OrdinalIgnoreCase) && parseResult.SelectedSection == 2)
{
string prefix = parseResult.Sections[2].Substring(0, parseResult.CaretPositionWithinSelectedSection);
return HeaderCompletion.GetCompletions(null, prefix);
}
if (parseResult.Sections.Count > 3
&& string.Equals(Name, parseResult.Sections[0], StringComparison.OrdinalIgnoreCase)
&& string.Equals(SubCommand, parseResult.Sections[1], StringComparison.OrdinalIgnoreCase) && parseResult.SelectedSection == 3)
{
string prefix = parseResult.Sections[3].Substring(0, parseResult.CaretPositionWithinSelectedSection);
return HeaderCompletion.GetValueCompletions(null, string.Empty, parseResult.Sections[2], prefix, programState);
}
return null;
}
}
}
================================================
FILE: src/Microsoft.HttpRepl/Commands/SetSwaggerCommand.cs
================================================
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.HttpRepl.OpenApi;
using Microsoft.Repl;
using Microsoft.Repl.Commanding;
using Microsoft.Repl.ConsoleHandling;
using Microsoft.Repl.Parsing;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
namespace Microsoft.HttpRepl.Commands
{
public class SetSwaggerCommand : ICommand<HttpState, ICoreParseResult>
{
private static readonly string Name = "set";
private static readonly string SubCommand = "swagger";
public string Description => "Sets the swagger document to use for information about the current server";
private static void FillDirectoryInfo(DirectoryStructure parent, EndpointMetadata entry)
{
string[] parts = entry.Path.Split('/');
foreach (string part in parts)
{
if (!string.IsNullOrEmpty(part))
{
parent = parent.DeclareDirectory(part);
}
}
RequestInfo dirRequestInfo = new RequestInfo();
foreach (KeyValuePair<string, IReadOnlyDictionary<string, IReadOnlyList<Parameter>>> requestInfo in entry.AvailableRequests)
{
string method = requestInfo.Key;
foreach (KeyValuePair<string, IReadOnlyList<Parameter>> parameterSetsByContentType in requestInfo.Value)
{
if (string.IsNullOrEmpty(parameterSetsByContentType.Key))
{
dirRequestInfo.SetFallbackRequestBody(method, parameterSetsByContentType.Key, GetBodyString(null, parameterSetsByContentType.Value));
}
dirRequestInfo.SetRequestBody(method, parameterSetsByContentType.Key, GetBodyString(parameterSetsByContentType.Key, parameterSetsByContentType.Value));
}
dirRequestInfo.AddMethod(method);
}
if (dirRequestInfo.Methods.Count > 0)
{
parent.RequestInfo = dirRequestInfo;
}
}
private static string GetBodyString(string contentType, IEnumerable<Parameter> operation)
{
Parameter body = operation.FirstOrDefault(x => string.Equals(x.Location, "body", StringComparison.OrdinalIgnoreCase));
if (body != null)
{
JToken result = GenerateData(body.Schema);
return result?.ToString() ?? "{\n}";
}
return null;
}
private static JToken GenerateData(Schema schema)
{
if (schema == null)
{
return null;
}
if (schema.Example != null)
{
return JToken.FromObject(schema.Example);
}
if (schema.Default != null)
{
return JToken.FromObject(schema.Default);
}
if (schema.Type is null)
{
if (schema.Properties != null || schema.AdditionalProperties != null || schema.MinProperties.HasValue || schema.MaxProperties.HasValue)
{
schema.Type = "OBJECT";
}
else if (schema.Items != null || schema.MinItems.HasValue || schema.MaxItems.HasValue)
{
schema.Type = "ARRAY";
}
else if (schema.Minimum.HasValue || schema.Maximum.HasValue || schema.MultipleOf.HasValue)
{
schema.Type = "INTEGER";
}
}
switch (schema.Type?.ToUpperInvariant())
{
case null:
case "STRING":
return "";
case "NUMBER":
if (schema.Minimum.HasValue)
{
if (schema.Maximum.HasValue)
{
return (schema.Maximum.Value + schema.Minimum.Value) / 2;
}
if (schema.ExclusiveMinimum)
{
return schema.Minimum.Value + 1;
}
return schema.Minimum.Value;
}
return 1.1;
case "INTEGER":
if (schema.Minimum.HasValue)
{
if (schema.Maximum.HasValue)
{
return (int)((schema.Maximum.Value + schema.Minimum.Value) / 2);
}
if (schema.ExclusiveMinimum)
{
return schema.Minimum.Value + 1;
}
return schema.Minimum.Value;
}
return 0;
case "BOOLEAN":
return true;
case "ARRAY":
JArray container = new JArray();
JToken item = GenerateData(schema.Items) ?? "";
int count = schema.MinItems.GetValueOrDefault();
count = Math.Max(1, count);
for (int i = 0; i < count; ++i)
{
container.Add(item.DeepClone());
}
return container;
case "OBJECT":
JObject obj = new JObject();
foreach (KeyValuePair<string, Schema> property in schema.Properties)
{
JToken data = GenerateData(property.Value) ?? "";
obj[property.Key] = data;
}
return obj;
}
return null;
}
private static async Task<IEnumerable<EndpointMetadata>> GetSwaggerDocAsync(HttpClient client, Uri uri)
{
var resp = await client.GetAsync(uri).ConfigureAwait(false);
resp.EnsureSuccessStatusCode();
string responseString = await resp.Content.ReadAsStringAsync().ConfigureAwait(false);
JsonSerializer serializer = new JsonSerializer{ PreserveReferencesHandling = PreserveReferencesHandling.All };
JObject responseObject = (JObject)serializer.Deserialize(new StringReader(responseString), typeof(JObject));
EndpointMetadataReader reader = new EndpointMetadataReader();
responseObject = await PointerUtil.ResolvePointersAsync(uri, responseObject, client).ConfigureAwait(false) as JObject;
if (responseObject is null)
{
return new EndpointMetadata[0];
}
return reader.Read(responseObject);
}
public string GetHelpSummary(IShellState shellState, HttpState programState)
{
return Description;
}
public string GetHelpDetails(IShellState shellState, HttpState programState, ICoreParseResult parseResult)
{
if (parseResult.Sections.Count > 1 && string.Equals(parseResult.Sections[0], Name, StringComparison.OrdinalIgnoreCase) && string.Equals(parseResult.Sections[1], SubCommand, StringComparison.OrdinalIgnoreCase))
{
return Description;
}
return null;
}
public IEnumerable<string> Suggest(IShellState shellState, HttpState programState, ICoreParseResult parseResult)
{
if (parseResult.Sections.Count == 0)
{
return new[] { Name };
}
if (parseResult.Sections.Count > 0 && parseResult.SelectedSection == 0 && Name.StartsWith(parseResult.Sections[0].Substring(0, parseResult.CaretPositionWithinSelectedSection), StringComparison.OrdinalIgnoreCase))
{
return new[] { Name };
}
if (string.Equals(Name, parseResult.Sections[0], StringComparison.OrdinalIgnoreCase) && parseResult.SelectedSection == 1 && (parseResult.Sections.Count < 2 || SubCommand.StartsWith(parseResult.Sections[1].Substring(0, parseResult.CaretPositionWithinSelectedSection), StringComparison.OrdinalIgnoreCase)))
{
return new[] { SubCommand };
}
return null;
}
public bool? CanHandle(IShellState shellState, HttpState programState, ICoreParseResult parseResult)
{
return parseResult.Sections.Count > 1 && string.Equals(parseResult.Sections[0], Name, StringComparison.OrdinalIgnoreCase) && string.Equals(parseResult.Sections[1], SubCommand, StringComparison.OrdinalIgnoreCase)
? (bool?)true
: null;
}
public async Task ExecuteAsync(IShellState shellState, HttpState programState, ICoreParseResult parseResult, CancellationToken cancellationToken)
{
if (parseResult.Sections.Count == 2)
{
programState.SwaggerStructure = null;
return;
}
if (parseResult.Sections.Count != 3 || string.IsNullOrEmpty(parseResult.Sections[2]) || !Uri.TryCreate(parseResult.Sections[2], UriKind.Absolute, out Uri serverUri))
{
shellState.ConsoleManager.Error.WriteLine("Must specify a swagger document".SetColor(programState.ErrorColor));
}
else
{
await CreateDirectoryStructureForSwaggerEndpointAsync(shellState, programState, serverUri, cancellationToken).ConfigureAwait(false);
}
}
internal static async Task CreateDirectoryStructureForSwaggerEndpointAsync(IShellState shellState, HttpState programState, Uri serverUri, CancellationToken cancellationToken)
{
programState.SwaggerEndpoint = serverUri;
try
{
IEnumerable<EndpointMetadata> doc = await GetSwaggerDocAsync(programState.Client, serverUri).ConfigureAwait(false);
DirectoryStructure d = new DirectoryStructure(null);
foreach (EndpointMetadata entry in doc)
{
FillDirectoryInfo(d, entry);
}
programState.SwaggerStructure = !cancellationToken.IsCancellationRequested ? d : null;
}
catch
{
programState.SwaggerStructure = null;
}
}
}
}
================================================
FILE: src/Microsoft.HttpRepl/Commands/TreeNode.cs
================================================
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Collections.Generic;
namespace Microsoft.HttpRepl.Commands
{
public class TreeNode
{
private readonly int _depth;
private readonly Formatter _formatter;
private readonly string _prefix;
private readonly string _entry;
private readonly List<TreeNode> _children = new List<TreeNode>();
public TreeNode(Formatter formatter, string prefix, string entry)
: this(formatter, prefix, entry, 0)
{
}
private TreeNode(Formatter formatter, string prefix, string entry, int depth)
{
_formatter = formatter;
formatter.RegisterEntry(prefix.Length, depth);
_prefix = prefix;
_entry = e
gitextract_sumg99vk/ ├── .appveyor.yml ├── .editorconfig ├── .gitattributes ├── .gitignore ├── .travis.yml ├── .vsts-pipelines/ │ └── builds/ │ ├── ci-internal.yml │ └── ci-public.yml ├── CONTRIBUTING.md ├── Directory.Build.props ├── Directory.Build.targets ├── DotNetTools.sln ├── LICENSE.txt ├── NuGet.config ├── NuGetPackageVerifier.json ├── README.md ├── build/ │ ├── Key.snk │ ├── VSIX.props │ ├── VSIX.targets │ ├── dependencies.props │ ├── repo.props │ ├── repo.targets │ └── sources.props ├── build.cmd ├── build.sh ├── korebuild-lock.txt ├── korebuild.json ├── run.cmd ├── run.ps1 ├── run.sh ├── samples/ │ └── dotnet-watch/ │ ├── Directory.Build.props │ ├── Directory.Build.targets │ ├── LaunchAnyCommand/ │ │ ├── LaunchAnyCommand.csproj │ │ ├── README.md │ │ ├── package.json │ │ └── say-hello.js │ ├── README.md │ ├── WatchJavascriptFiles/ │ │ ├── Program.cs │ │ ├── README.md │ │ ├── WatchJavascriptFiles.csproj │ │ └── wwwroot/ │ │ └── app.js │ └── WatchMultipleProjects/ │ ├── README.md │ ├── Test/ │ │ ├── Test.csproj │ │ └── UnitTest1.cs │ ├── Web/ │ │ ├── Program.cs │ │ └── Web.csproj │ └── watch.csproj ├── shared/ │ ├── CliContext.cs │ ├── CommandLineApplicationExtensions.cs │ ├── ConsoleReporter.cs │ ├── DebugHelper.cs │ ├── Ensure.cs │ ├── IConsole.cs │ ├── IReporter.cs │ ├── NullReporter.cs │ └── PhysicalConsole.cs ├── src/ │ ├── Directory.Build.props │ ├── Directory.Build.targets │ ├── Microsoft.AspNetCore.DeveloperCertificates.XPlat/ │ │ ├── CertificateGenerator.cs │ │ └── Microsoft.AspNetCore.DeveloperCertificates.XPlat.csproj │ ├── Microsoft.HttpRepl/ │ │ ├── AggregateDirectoryStructure.cs │ │ ├── Commands/ │ │ │ ├── BaseHttpCommand.cs │ │ │ ├── ChangeDirectoryCommand.cs │ │ │ ├── ClearCommand.cs │ │ │ ├── ConfigCommand.cs │ │ │ ├── DeleteCommand.cs │ │ │ ├── EchoCommand.cs │ │ │ ├── ExitCommand.cs │ │ │ ├── Formatter.cs │ │ │ ├── GetCommand.cs │ │ │ ├── HeadCommand.cs │ │ │ ├── HelpCommand.cs │ │ │ ├── ListCommand.cs │ │ │ ├── OptionsCommand.cs │ │ │ ├── PatchCommand.cs │ │ │ ├── PostCommand.cs │ │ │ ├── PrefCommand.cs │ │ │ ├── PutCommand.cs │ │ │ ├── RunCommand.cs │ │ │ ├── SetBaseCommand.cs │ │ │ ├── SetDiagCommand.cs │ │ │ ├── SetHeaderCommand.cs │ │ │ ├── SetSwaggerCommand.cs │ │ │ ├── TreeNode.cs │ │ │ └── UICommand.cs │ │ ├── Diagnostics/ │ │ │ ├── ConfigItem.cs │ │ │ ├── DiagEndpoint.cs │ │ │ ├── DiagEndpointMetadata.cs │ │ │ ├── DiagItem.cs │ │ │ └── DiagnosticsState.cs │ │ ├── DirectoryStructure.cs │ │ ├── DirectoryStructureExtensions.cs │ │ ├── Formatting/ │ │ │ └── JsonVisitor.cs │ │ ├── HttpState.cs │ │ ├── IDirectoryStructure.cs │ │ ├── IRequestInfo.cs │ │ ├── Microsoft.HttpRepl.csproj │ │ ├── OpenApi/ │ │ │ ├── Either.cs │ │ │ ├── EitherConverter.cs │ │ │ ├── EndpointMetadata.cs │ │ │ ├── EndpointMetadataReader.cs │ │ │ ├── IEndpointMetadataReader.cs │ │ │ ├── OpenApiV3EndpointMetadataReader.cs │ │ │ ├── Parameter.cs │ │ │ ├── PointerUtil.cs │ │ │ ├── Schema.cs │ │ │ ├── SwaggerV1EndpointMetadataReader.cs │ │ │ └── SwaggerV2EndpointMetadataReader.cs │ │ ├── Preferences/ │ │ │ ├── IJsonConfig.cs │ │ │ ├── JsonConfig.cs │ │ │ ├── RequestConfig.cs │ │ │ ├── RequestOrResponseConfig.cs │ │ │ ├── ResponseConfig.cs │ │ │ └── WellKnownPreference.cs │ │ ├── Program.cs │ │ ├── Properties/ │ │ │ └── launchSettings.json │ │ └── Suggestions/ │ │ ├── HeaderCompletion.cs │ │ └── ServerPathCompletion.cs │ ├── Microsoft.Repl/ │ │ ├── Commanding/ │ │ │ ├── CommandHistory.cs │ │ │ ├── CommandInputLocation.cs │ │ │ ├── CommandInputProcessingIssue.cs │ │ │ ├── CommandInputProcessingIssueKind.cs │ │ │ ├── CommandInputSpecification.cs │ │ │ ├── CommandInputSpecificationBuilder.cs │ │ │ ├── CommandOptionSpecification.cs │ │ │ ├── CommandWithStructuredInputBase.cs │ │ │ ├── DefaultCommandDispatcher.cs │ │ │ ├── DefaultCommandInput.cs │ │ │ ├── ICommand.cs │ │ │ ├── ICommandDispatcher.cs │ │ │ ├── ICommandHistory.cs │ │ │ └── InputElement.cs │ │ ├── ConsoleHandling/ │ │ │ ├── AllowedColors.cs │ │ │ ├── AnsiColorExtensions.cs │ │ │ ├── AnsiConsole.cs │ │ │ ├── ConsoleManager.cs │ │ │ ├── IConsoleManager.cs │ │ │ ├── IWritable.cs │ │ │ ├── Point.cs │ │ │ ├── Reporter.cs │ │ │ └── Writable.cs │ │ ├── Disposable.cs │ │ ├── IShellState.cs │ │ ├── Input/ │ │ │ ├── AsyncKeyPressHandler.cs │ │ │ ├── IInputManager.cs │ │ │ ├── InputManager.cs │ │ │ └── KeyHandlers.cs │ │ ├── Microsoft.Repl.csproj │ │ ├── Parsing/ │ │ │ ├── CoreParseResult.cs │ │ │ ├── CoreParser.cs │ │ │ ├── ICoreParseResult.cs │ │ │ └── IParser.cs │ │ ├── Scripting/ │ │ │ ├── IScriptExecutor.cs │ │ │ └── ScriptExecutor.cs │ │ ├── Shell.cs │ │ ├── ShellState.cs │ │ ├── Suggestions/ │ │ │ ├── FileSystemCompletion.cs │ │ │ ├── ISuggestionManager.cs │ │ │ └── SuggestionManager.cs │ │ └── Utils.cs │ ├── dotnet-dev-certs/ │ │ ├── Program.cs │ │ ├── README.md │ │ └── dotnet-dev-certs.csproj │ ├── dotnet-sql-cache/ │ │ ├── Program.cs │ │ ├── README.md │ │ ├── SqlQueries.cs │ │ └── dotnet-sql-cache.csproj │ ├── dotnet-user-secrets/ │ │ ├── CommandLineOptions.cs │ │ ├── Internal/ │ │ │ ├── ClearCommand.cs │ │ │ ├── CommandContext.cs │ │ │ ├── ICommand.cs │ │ │ ├── InitCommand.cs │ │ │ ├── ListCommand.cs │ │ │ ├── MsBuildProjectFinder.cs │ │ │ ├── ProjectIdResolver.cs │ │ │ ├── ReadableJsonConfigurationSource.cs │ │ │ ├── RemoveCommand.cs │ │ │ ├── SecretsStore.cs │ │ │ └── SetCommand.cs │ │ ├── Program.cs │ │ ├── Properties/ │ │ │ ├── AssemblyInfo.cs │ │ │ └── Resources.Designer.cs │ │ ├── README.md │ │ ├── Resources.resx │ │ ├── assets/ │ │ │ └── SecretManager.targets │ │ └── dotnet-user-secrets.csproj │ └── dotnet-watch/ │ ├── CommandLineOptions.cs │ ├── DotNetWatcher.cs │ ├── IFileSet.cs │ ├── IFileSetFactory.cs │ ├── Internal/ │ │ ├── FileSet.cs │ │ ├── FileSetWatcher.cs │ │ ├── FileWatcher/ │ │ │ ├── DotnetFileWatcher.cs │ │ │ ├── FileWatcherFactory.cs │ │ │ ├── IFileSystemWatcher.cs │ │ │ └── PollingFileWatcher.cs │ │ ├── FileWatcher.cs │ │ ├── MsBuildFileSetFactory.cs │ │ ├── MsBuildProjectFinder.cs │ │ ├── OutputCapture.cs │ │ ├── OutputSink.cs │ │ └── ProcessRunner.cs │ ├── PrefixConsoleReporter.cs │ ├── ProcessSpec.cs │ ├── Program.cs │ ├── Properties/ │ │ ├── AssemblyInfo.cs │ │ └── Resources.Designer.cs │ ├── README.md │ ├── Resources.resx │ ├── assets/ │ │ └── DotNetWatch.targets │ └── dotnet-watch.csproj ├── test/ │ ├── Directory.Build.props │ ├── Microsoft.HttpRepl.Tests/ │ │ ├── JsonVisitorTests.cs │ │ └── Microsoft.HttpRepl.Tests.csproj │ ├── Microsoft.Repl.Tests/ │ │ ├── Microsoft.Repl.Tests.csproj │ │ └── ParserTests.cs │ ├── Shared/ │ │ ├── TestConsole.cs │ │ └── TestReporter.cs │ ├── dotnet-user-secrets.Tests/ │ │ ├── InitCommandTest.cs │ │ ├── MsBuildProjectFinderTest.cs │ │ ├── SecretManagerTests.cs │ │ ├── SetCommandTest.cs │ │ ├── TemporaryFileProvider.cs │ │ ├── UserSecretsTestFixture.cs │ │ └── dotnet-user-secrets.Tests.csproj │ ├── dotnet-watch.FunctionalTests/ │ │ ├── AppWithDepsTests.cs │ │ ├── AwaitableProcess.cs │ │ ├── DotNetWatcherTests.cs │ │ ├── FileWatcherTests.cs │ │ ├── GlobbingAppTests.cs │ │ ├── NoDepsAppTests.cs │ │ ├── Scenario/ │ │ │ ├── ProjectToolScenario.cs │ │ │ └── WatchableApp.cs │ │ ├── TestProjects/ │ │ │ ├── AppWithDeps/ │ │ │ │ ├── AppWithDeps.csproj │ │ │ │ └── Program.cs │ │ │ ├── Dependency/ │ │ │ │ ├── Dependency.csproj │ │ │ │ └── Foo.cs │ │ │ ├── GlobbingApp/ │ │ │ │ ├── GlobbingApp.csproj │ │ │ │ ├── Program.cs │ │ │ │ ├── exclude/ │ │ │ │ │ └── Baz.cs │ │ │ │ └── include/ │ │ │ │ └── Foo.cs │ │ │ ├── KitchenSink/ │ │ │ │ ├── KitchenSink.csproj │ │ │ │ └── Program.cs │ │ │ └── NoDepsApp/ │ │ │ ├── NoDepsApp.csproj │ │ │ └── Program.cs │ │ └── dotnet-watch.FunctionalTests.csproj │ └── dotnet-watch.Tests/ │ ├── AssertEx.cs │ ├── CommandLineOptionsTests.cs │ ├── ConsoleReporterTests.cs │ ├── MsBuildFileSetFactoryTest.cs │ ├── ProgramTests.cs │ ├── Utilities/ │ │ ├── TemporaryCSharpProject.cs │ │ ├── TemporaryDirectory.cs │ │ └── TestProjectGraph.cs │ └── dotnet-watch.Tests.csproj ├── tooling/ │ ├── Microsoft.VisualStudio.SecretManager/ │ │ ├── Microsoft.VisualStudio.SecretManager.csproj │ │ ├── ProjectLocalSecretsManager.cs │ │ ├── Properties/ │ │ │ └── AssemblyInfo.cs │ │ ├── Resources.Designer.cs │ │ ├── Resources.resx │ │ ├── SecretManagerFactory.cs │ │ ├── SecretStore.cs │ │ ├── Sources/ │ │ │ ├── ConfigurationPath.cs │ │ │ ├── JsonConfigurationFileParser.cs │ │ │ └── PathHelper.cs │ │ └── source.extension.vsixmanifest │ └── Microsoft.VisualStudio.SecretManager.TestExtension/ │ ├── Key.snk │ ├── Microsoft.VisualStudio.SecretManager.TestExtension.csproj │ ├── NotifyPropertyChanged.cs │ ├── ProjectViewModel.cs │ ├── Properties/ │ │ └── AssemblyInfo.cs │ ├── RelayCommand.cs │ ├── SecretManagerTestCommand.cs │ ├── SecretManagerTestControl.xaml │ ├── SecretManagerTestControl.xaml.cs │ ├── SecretManagerTestPackage.cs │ ├── SecretManagerTestPackage.vsct │ ├── SecretManagerTestWindow.cs │ ├── SecretManagerViewModel.cs │ ├── VSPackage.resx │ ├── app.config │ └── source.extension.vsixmanifest └── version.props
SYMBOL INDEX (962 symbols across 193 files)
FILE: samples/dotnet-watch/WatchJavascriptFiles/Program.cs
class Program (line 11) | public class Program
method Main (line 13) | public static void Main(string[] args)
FILE: samples/dotnet-watch/WatchMultipleProjects/Test/UnitTest1.cs
class UnitTest1 (line 9) | public class UnitTest1
method Test1 (line 11) | [Fact]
FILE: samples/dotnet-watch/WatchMultipleProjects/Web/Program.cs
class Program (line 11) | public class Program
method Main (line 13) | public static void Main(string[] args)
FILE: shared/CliContext.cs
class CliContext (line 8) | public static class CliContext
method IsGlobalVerbose (line 14) | public static bool IsGlobalVerbose()
FILE: shared/CommandLineApplicationExtensions.cs
class CommandLineApplicationExtensions (line 9) | internal static class CommandLineApplicationExtensions
method HelpOption (line 11) | public static CommandOption HelpOption(this CommandLineApplication app)
method VerboseOption (line 14) | public static CommandOption VerboseOption(this CommandLineApplication ...
method OnExecute (line 17) | public static void OnExecute(this CommandLineApplication app, Action a...
method VersionOptionFromAssemblyAttributes (line 24) | public static void VersionOptionFromAssemblyAttributes(this CommandLin...
method GetInformationalVersion (line 27) | private static string GetInformationalVersion(Assembly assembly)
FILE: shared/ConsoleReporter.cs
class ConsoleReporter (line 9) | public class ConsoleReporter : IReporter
method ConsoleReporter (line 13) | public ConsoleReporter(IConsole console)
method ConsoleReporter (line 17) | public ConsoleReporter(IConsole console, bool verbose, bool quiet)
method WriteLine (line 30) | protected virtual void WriteLine(TextWriter writer, string message, Co...
method Error (line 48) | public virtual void Error(string message)
method Warn (line 50) | public virtual void Warn(string message)
method Output (line 53) | public virtual void Output(string message)
method Verbose (line 62) | public virtual void Verbose(string message)
FILE: shared/DebugHelper.cs
class DebugHelper (line 10) | public static class DebugHelper
method HandleDebugSwitch (line 12) | [Conditional("DEBUG")]
FILE: shared/Ensure.cs
class Ensure (line 8) | internal static class Ensure
method NotNull (line 10) | public static T NotNull<T>(T obj, string paramName)
method NotNullOrEmpty (line 20) | public static string NotNullOrEmpty(string obj, string paramName)
FILE: shared/IConsole.cs
type IConsole (line 9) | public interface IConsole
method ResetColor (line 19) | void ResetColor();
FILE: shared/IReporter.cs
type IReporter (line 6) | public interface IReporter
method Verbose (line 8) | void Verbose(string message);
method Output (line 9) | void Output(string message);
method Warn (line 10) | void Warn(string message);
method Error (line 11) | void Error(string message);
FILE: shared/NullReporter.cs
class NullReporter (line 6) | public class NullReporter : IReporter
method NullReporter (line 8) | private NullReporter()
method Verbose (line 13) | public void Verbose(string message)
method Output (line 16) | public void Output(string message)
method Warn (line 19) | public void Warn(string message)
method Error (line 22) | public void Error(string message)
FILE: shared/PhysicalConsole.cs
class PhysicalConsole (line 9) | public class PhysicalConsole : IConsole
method PhysicalConsole (line 11) | private PhysicalConsole()
method ResetColor (line 34) | public void ResetColor() => Console.ResetColor();
FILE: src/Microsoft.AspNetCore.DeveloperCertificates.XPlat/CertificateGenerator.cs
class CertificateGenerator (line 6) | public static class CertificateGenerator
method GenerateAspNetHttpsCertificate (line 8) | public static void GenerateAspNetHttpsCertificate()
FILE: src/Microsoft.HttpRepl/AggregateDirectoryStructure.cs
class AggregateDirectoryStructure (line 10) | public class AggregateDirectoryStructure : IDirectoryStructure
method AggregateDirectoryStructure (line 15) | public AggregateDirectoryStructure(IDirectoryStructure first, IDirecto...
method GetChildDirectory (line 34) | public IDirectoryStructure GetChildDirectory(string name)
FILE: src/Microsoft.HttpRepl/Commands/BaseHttpCommand.cs
class BaseHttpCommand (line 27) | public abstract class BaseHttpCommand : CommandWithStructuredInputBase<H...
method ExecuteAsync (line 76) | protected override async Task ExecuteAsync(IShellState shellState, Htt...
method HandleResponseAsync (line 230) | private static async Task HandleResponseAsync(HttpState programState, ...
method FormatBodyAsync (line 345) | private static async Task FormatBodyAsync(DefaultCommandInput<ICorePar...
method WaitForCompletionAsync (line 424) | private static async Task<bool> WaitForCompletionAsync(ValueTask<int> ...
method FormatXmlAsync (line 440) | private static async Task<bool> FormatXmlAsync(IWritable consoleManage...
method FormatJsonAsync (line 457) | private static async Task<bool> FormatJsonAsync(HttpState programState...
method GetHelpDetails (line 476) | protected override string GetHelpDetails(IShellState shellState, HttpS...
method GetHelpSummary (line 492) | public override string GetHelpSummary(IShellState shellState, HttpStat...
method GetArgumentSuggestionsForText (line 497) | protected override IEnumerable<string> GetArgumentSuggestionsForText(I...
method GetOptionValueCompletions (line 539) | protected override IEnumerable<string> GetOptionValueCompletions(IShel...
FILE: src/Microsoft.HttpRepl/Commands/ChangeDirectoryCommand.cs
class ChangeDirectoryCommand (line 18) | public class ChangeDirectoryCommand : CommandWithStructuredInputBase<Htt...
method ExecuteAsync (line 20) | protected override Task ExecuteAsync(IShellState shellState, HttpState...
method GetHelpDetails (line 69) | protected override string GetHelpDetails(IShellState shellState, HttpS...
method GetHelpSummary (line 80) | public override string GetHelpSummary(IShellState shellState, HttpStat...
method GetArgumentSuggestionsForText (line 85) | protected override IEnumerable<string> GetArgumentSuggestionsForText(I...
FILE: src/Microsoft.HttpRepl/Commands/ClearCommand.cs
class ClearCommand (line 14) | public class ClearCommand : ICommand<object, ICoreParseResult>
method CanHandle (line 19) | public bool? CanHandle(IShellState shellState, object programState, IC...
method ExecuteAsync (line 26) | public Task ExecuteAsync(IShellState shellState, object programState, ...
method GetHelpDetails (line 33) | public string GetHelpDetails(IShellState shellState, object programSta...
method GetHelpSummary (line 43) | public string GetHelpSummary(IShellState shellState, object programState)
method Suggest (line 48) | public IEnumerable<string> Suggest(IShellState shellState, object prog...
FILE: src/Microsoft.HttpRepl/Commands/ConfigCommand.cs
class ConfigCommand (line 18) | public class ConfigCommand : CommandWithStructuredInputBase<HttpState, I...
method ExecuteAsync (line 20) | protected override async Task ExecuteAsync(IShellState shellState, Htt...
method GetHelpDetails (line 60) | protected override string GetHelpDetails(IShellState shellState, HttpS...
method GetHelpSummary (line 65) | public override string GetHelpSummary(IShellState shellState, HttpStat...
FILE: src/Microsoft.HttpRepl/Commands/DeleteCommand.cs
class DeleteCommand (line 6) | public class DeleteCommand : BaseHttpCommand
FILE: src/Microsoft.HttpRepl/Commands/EchoCommand.cs
class EchoCommand (line 17) | public class EchoCommand : CommandWithStructuredInputBase<HttpState, ICo...
method CanHandle (line 21) | protected override bool CanHandle(IShellState shellState, HttpState pr...
method ExecuteAsync (line 32) | protected override Task ExecuteAsync(IShellState shellState, HttpState...
method GetHelpDetails (line 43) | protected override string GetHelpDetails(IShellState shellState, HttpS...
method GetHelpSummary (line 53) | public override string GetHelpSummary(IShellState shellState, HttpStat...
method GetArgumentSuggestionsForText (line 58) | protected override IEnumerable<string> GetArgumentSuggestionsForText(I...
FILE: src/Microsoft.HttpRepl/Commands/ExitCommand.cs
class ExitCommand (line 14) | public class ExitCommand : CommandWithStructuredInputBase<object, ICoreP...
method ExecuteAsync (line 16) | protected override Task ExecuteAsync(IShellState shellState, object pr...
method GetHelpDetails (line 24) | protected override string GetHelpDetails(IShellState shellState, objec...
method GetHelpSummary (line 34) | public override string GetHelpSummary(IShellState shellState, object p...
FILE: src/Microsoft.HttpRepl/Commands/Formatter.cs
class Formatter (line 6) | public class Formatter
method RegisterEntry (line 11) | public void RegisterEntry(int prefixLength, int depth)
method Format (line 24) | public string Format(string prefix, string entry, int level)
FILE: src/Microsoft.HttpRepl/Commands/GetCommand.cs
class GetCommand (line 6) | public class GetCommand : BaseHttpCommand
FILE: src/Microsoft.HttpRepl/Commands/HeadCommand.cs
class HeadCommand (line 6) | public class HeadCommand : BaseHttpCommand
FILE: src/Microsoft.HttpRepl/Commands/HelpCommand.cs
class HelpCommand (line 18) | public class HelpCommand : ICommand<HttpState, ICoreParseResult>
method CanHandle (line 22) | public bool? CanHandle(IShellState shellState, HttpState programState,...
method ExecuteAsync (line 29) | public async Task ExecuteAsync(IShellState shellState, HttpState progr...
method GetHelpDetails (line 145) | public string GetHelpDetails(IShellState shellState, HttpState program...
method GetHelpSummary (line 162) | public string GetHelpSummary(IShellState shellState, HttpState program...
method Suggest (line 167) | public IEnumerable<string> Suggest(IShellState shellState, HttpState p...
method CoreGetHelp (line 204) | public void CoreGetHelp(IShellState shellState, ICommandDispatcher<Htt...
FILE: src/Microsoft.HttpRepl/Commands/ListCommand.cs
class ListCommand (line 19) | public class ListCommand : CommandWithStructuredInputBase<HttpState, ICo...
method ExecuteAsync (line 23) | protected override async Task ExecuteAsync(IShellState shellState, Htt...
method Recurse (line 101) | private static void Recurse(TreeNode parentNode, IDirectoryStructure p...
method GetHelpDetails (line 128) | protected override string GetHelpDetails(IShellState shellState, HttpS...
method GetHelpSummary (line 138) | public override string GetHelpSummary(IShellState shellState, HttpStat...
method GetArgumentSuggestionsForText (line 143) | protected override IEnumerable<string> GetArgumentSuggestionsForText(I...
FILE: src/Microsoft.HttpRepl/Commands/OptionsCommand.cs
class OptionsCommand (line 6) | public class OptionsCommand : BaseHttpCommand
FILE: src/Microsoft.HttpRepl/Commands/PatchCommand.cs
class PatchCommand (line 6) | public class PatchCommand : BaseHttpCommand
FILE: src/Microsoft.HttpRepl/Commands/PostCommand.cs
class PostCommand (line 6) | public class PostCommand : BaseHttpCommand
FILE: src/Microsoft.HttpRepl/Commands/PrefCommand.cs
class PrefCommand (line 18) | public class PrefCommand : CommandWithStructuredInputBase<HttpState, ICo...
method GetHelpSummary (line 22) | public override string GetHelpSummary(IShellState shellState, HttpStat...
method CanHandle (line 27) | protected override bool CanHandle(IShellState shellState, HttpState pr...
method GetHelpDetails (line 44) | protected override string GetHelpDetails(IShellState shellState, HttpS...
method GetColor (line 88) | private static string GetColor(string value)
method ExecuteAsync (line 128) | protected override Task ExecuteAsync(IShellState shellState, HttpState...
method SetSetting (line 138) | private static Task SetSetting(IShellState shellState, HttpState progr...
method GetSetting (line 167) | private static Task GetSetting(IShellState shellState, HttpState progr...
method GetArgumentSuggestionsForText (line 200) | protected override IEnumerable<string> GetArgumentSuggestionsForText(I...
FILE: src/Microsoft.HttpRepl/Commands/PutCommand.cs
class PutCommand (line 6) | public class PutCommand : BaseHttpCommand
FILE: src/Microsoft.HttpRepl/Commands/RunCommand.cs
class RunCommand (line 19) | public class RunCommand : ICommand<HttpState, ICoreParseResult>
method CanHandle (line 23) | public bool? CanHandle(IShellState shellState, HttpState programState,...
method ExecuteAsync (line 30) | public async Task ExecuteAsync(IShellState shellState, HttpState progr...
method GetHelpDetails (line 49) | public string GetHelpDetails(IShellState shellState, HttpState program...
method GetHelpSummary (line 65) | public string GetHelpSummary(IShellState shellState, HttpState program...
method Suggest (line 70) | public IEnumerable<string> Suggest(IShellState shellState, HttpState p...
FILE: src/Microsoft.HttpRepl/Commands/SetBaseCommand.cs
class SetBaseCommand (line 18) | public class SetBaseCommand : ICommand<HttpState, ICoreParseResult>
method CanHandle (line 25) | public bool? CanHandle(IShellState shellState, HttpState programState,...
method ExecuteAsync (line 32) | public async Task ExecuteAsync(IShellState shellState, HttpState state...
method EnsureTrailingSlash (line 85) | private string EnsureTrailingSlash(string v)
method GetHelpDetails (line 95) | public string GetHelpDetails(IShellState shellState, HttpState program...
method GetHelpSummary (line 110) | public string GetHelpSummary(IShellState shellState, HttpState program...
method Suggest (line 115) | public IEnumerable<string> Suggest(IShellState shellState, HttpState p...
FILE: src/Microsoft.HttpRepl/Commands/SetDiagCommand.cs
class SetDiagCommand (line 18) | public class SetDiagCommand : ICommand<HttpState, ICoreParseResult>
method CanHandle (line 25) | public bool? CanHandle(IShellState shellState, HttpState programState,...
method ExecuteAsync (line 32) | public async Task ExecuteAsync(IShellState shellState, HttpState progr...
method FillDirectoryInfo (line 93) | private static void FillDirectoryInfo(DirectoryStructure parent, strin...
method GetHelpSummary (line 106) | public string GetHelpSummary(IShellState shellState, HttpState program...
method GetHelpDetails (line 111) | public string GetHelpDetails(IShellState shellState, HttpState program...
method Suggest (line 121) | public IEnumerable<string> Suggest(IShellState shellState, HttpState p...
FILE: src/Microsoft.HttpRepl/Commands/SetHeaderCommand.cs
class SetHeaderCommand (line 18) | public class SetHeaderCommand : ICommand<HttpState, ICoreParseResult>
method CanHandle (line 25) | public bool? CanHandle(IShellState shellState, HttpState programState,...
method ExecuteAsync (line 32) | public Task ExecuteAsync(IShellState shellState, HttpState programStat...
method GetHelpDetails (line 46) | public string GetHelpDetails(IShellState shellState, HttpState program...
method GetHelpSummary (line 56) | public string GetHelpSummary(IShellState shellState, HttpState program...
method Suggest (line 61) | public IEnumerable<string> Suggest(IShellState shellState, HttpState p...
FILE: src/Microsoft.HttpRepl/Commands/SetSwaggerCommand.cs
class SetSwaggerCommand (line 21) | public class SetSwaggerCommand : ICommand<HttpState, ICoreParseResult>
method FillDirectoryInfo (line 28) | private static void FillDirectoryInfo(DirectoryStructure parent, Endpo...
method GetBodyString (line 65) | private static string GetBodyString(string contentType, IEnumerable<Pa...
method GenerateData (line 78) | private static JToken GenerateData(Schema schema)
method GetSwaggerDocAsync (line 176) | private static async Task<IEnumerable<EndpointMetadata>> GetSwaggerDoc...
method GetHelpSummary (line 194) | public string GetHelpSummary(IShellState shellState, HttpState program...
method GetHelpDetails (line 199) | public string GetHelpDetails(IShellState shellState, HttpState program...
method Suggest (line 209) | public IEnumerable<string> Suggest(IShellState shellState, HttpState p...
method CanHandle (line 229) | public bool? CanHandle(IShellState shellState, HttpState programState,...
method ExecuteAsync (line 236) | public async Task ExecuteAsync(IShellState shellState, HttpState progr...
method CreateDirectoryStructureForSwaggerEndpointAsync (line 254) | internal static async Task CreateDirectoryStructureForSwaggerEndpointA...
FILE: src/Microsoft.HttpRepl/Commands/TreeNode.cs
class TreeNode (line 9) | public class TreeNode
method TreeNode (line 17) | public TreeNode(Formatter formatter, string prefix, string entry)
method TreeNode (line 22) | private TreeNode(Formatter formatter, string prefix, string entry, int...
method AddChild (line 31) | public TreeNode AddChild(string prefix, string entry)
method ToString (line 38) | public override string ToString()
FILE: src/Microsoft.HttpRepl/Commands/UICommand.cs
class UICommand (line 17) | public class UICommand : ICommand<HttpState, ICoreParseResult>
method CanHandle (line 21) | public bool? CanHandle(IShellState shellState, HttpState programState,...
method ExecuteAsync (line 28) | public Task ExecuteAsync(IShellState shellState, HttpState programStat...
method GetHelpDetails (line 55) | public string GetHelpDetails(IShellState shellState, HttpState program...
method GetHelpSummary (line 65) | public string GetHelpSummary(IShellState shellState, HttpState program...
method Suggest (line 70) | public IEnumerable<string> Suggest(IShellState shellState, HttpState p...
FILE: src/Microsoft.HttpRepl/Diagnostics/ConfigItem.cs
class ConfigItem (line 6) | public class ConfigItem
FILE: src/Microsoft.HttpRepl/Diagnostics/DiagEndpoint.cs
class DiagEndpoint (line 6) | public class DiagEndpoint
FILE: src/Microsoft.HttpRepl/Diagnostics/DiagEndpointMetadata.cs
class DiagEndpointMetadata (line 6) | public class DiagEndpointMetadata
FILE: src/Microsoft.HttpRepl/Diagnostics/DiagItem.cs
class DiagItem (line 6) | public class DiagItem
FILE: src/Microsoft.HttpRepl/Diagnostics/DiagnosticsState.cs
class DiagnosticsState (line 8) | public class DiagnosticsState
FILE: src/Microsoft.HttpRepl/DirectoryStructure.cs
class DirectoryStructure (line 10) | public class DirectoryStructure : IDirectoryStructure
method DirectoryStructure (line 14) | public DirectoryStructure(IDirectoryStructure parent)
method DeclareDirectory (line 23) | public DirectoryStructure DeclareDirectory(string name)
method GetChildDirectory (line 33) | public IDirectoryStructure GetChildDirectory(string name)
class RequestInfo (line 53) | public class RequestInfo : IRequestInfo
method GetRequestBodyForContentType (line 65) | public string GetRequestBodyForContentType(ref string contentType, str...
method SetRequestBody (line 86) | public void SetRequestBody(string method, string contentType, string b...
method AddMethod (line 104) | public void AddMethod(string method)
method SetFallbackRequestBody (line 109) | public void SetFallbackRequestBody(string method, string contentType, ...
FILE: src/Microsoft.HttpRepl/DirectoryStructureExtensions.cs
class DirectoryStructureExtensions (line 9) | public static class DirectoryStructureExtensions
method GetDirectoryListingAtPath (line 11) | public static IEnumerable<string> GetDirectoryListingAtPath(this IDire...
method TraverseTo (line 16) | public static IDirectoryStructure TraverseTo(this IDirectoryStructure ...
method TraverseTo (line 22) | public static IDirectoryStructure TraverseTo(this IDirectoryStructure ...
FILE: src/Microsoft.HttpRepl/Formatting/JsonVisitor.cs
class JsonVisitor (line 12) | public static class JsonVisitor
method FormatAndColorize (line 14) | public static string FormatAndColorize(IJsonConfig config, string json...
FILE: src/Microsoft.HttpRepl/HttpState.cs
class HttpState (line 16) | public class HttpState
method HttpState (line 72) | public HttpState()
method GetPrompt (line 87) | public string GetPrompt()
method LoadPreferences (line 92) | private void LoadPreferences()
method CreateDefaultPreferencs (line 112) | private IReadOnlyDictionary<string, string> CreateDefaultPreferencs()
method SavePreferences (line 128) | public bool SavePreferences()
method GetExampleBody (line 151) | public string GetExampleBody(string path, ref string contentType, stri...
method GetApplicableContentTypes (line 159) | public IEnumerable<string> GetApplicableContentTypes(string method, st...
method GetEffectivePath (line 182) | public Uri GetEffectivePath(string commandSpecifiedPath)
method GetEffectivePath (line 276) | public Uri GetEffectivePath(IReadOnlyList<string> sections, bool requi...
FILE: src/Microsoft.HttpRepl/IDirectoryStructure.cs
type IDirectoryStructure (line 8) | public interface IDirectoryStructure
method GetChildDirectory (line 14) | IDirectoryStructure GetChildDirectory(string name);
FILE: src/Microsoft.HttpRepl/IRequestInfo.cs
type IRequestInfo (line 8) | public interface IRequestInfo
method GetRequestBodyForContentType (line 14) | string GetRequestBodyForContentType(ref string contentType, string met...
FILE: src/Microsoft.HttpRepl/OpenApi/Either.cs
class Either (line 6) | public class Either<TOption1, TOption2>
method Either (line 8) | public Either(TOption1 option1)
method Either (line 14) | public Either(TOption2 option2)
FILE: src/Microsoft.HttpRepl/OpenApi/EitherConverter.cs
class EitherConverter (line 9) | public class EitherConverter<TOption1, TOption2> : JsonConverter
method CanConvert (line 11) | public override bool CanConvert(Type objectType)
method ReadJson (line 16) | public override object ReadJson(JsonReader reader, Type objectType, ob...
method WriteJson (line 30) | public override void WriteJson(JsonWriter writer, object value, JsonSe...
FILE: src/Microsoft.HttpRepl/OpenApi/EndpointMetadata.cs
class EndpointMetadata (line 8) | public class EndpointMetadata
method EndpointMetadata (line 10) | public EndpointMetadata(string path, IReadOnlyDictionary<string, IRead...
FILE: src/Microsoft.HttpRepl/OpenApi/EndpointMetadataReader.cs
class EndpointMetadataReader (line 9) | public class EndpointMetadataReader
method RegisterReader (line 18) | public void RegisterReader(IEndpointMetadataReader reader)
method Read (line 23) | public IEnumerable<EndpointMetadata> Read(JObject document)
FILE: src/Microsoft.HttpRepl/OpenApi/IEndpointMetadataReader.cs
type IEndpointMetadataReader (line 9) | public interface IEndpointMetadataReader
method CanHandle (line 11) | bool CanHandle(JObject document);
method ReadMetadata (line 13) | IEnumerable<EndpointMetadata> ReadMetadata(JObject document);
FILE: src/Microsoft.HttpRepl/OpenApi/OpenApiV3EndpointMetadataReader.cs
class OpenApiV3EndpointMetadataReader (line 11) | public class OpenApiV3EndpointMetadataReader : IEndpointMetadataReader
method CanHandle (line 13) | public bool CanHandle(JObject document)
method ReadMetadata (line 18) | public IEnumerable<EndpointMetadata> ReadMetadata(JObject document)
FILE: src/Microsoft.HttpRepl/OpenApi/Parameter.cs
class Parameter (line 6) | public class Parameter
FILE: src/Microsoft.HttpRepl/OpenApi/PointerUtil.cs
class PointerUtil (line 13) | public static class PointerUtil
method ResolvePointersAsync (line 15) | public static Task<JToken> ResolvePointersAsync(Uri loadLocation, JTok...
method ResolvePointersAsync (line 20) | private static async Task<JToken> ResolvePointersAsync(Uri loadLocatio...
FILE: src/Microsoft.HttpRepl/OpenApi/Schema.cs
class Schema (line 11) | public class Schema
method PrepareForUsage (line 13) | public void PrepareForUsage(JToken document)
FILE: src/Microsoft.HttpRepl/OpenApi/SwaggerV1EndpointMetadataReader.cs
method CanHandle (line 13) | public bool CanHandle(JObject document)
FILE: src/Microsoft.HttpRepl/OpenApi/SwaggerV2EndpointMetadataReader.cs
class SwaggerV2EndpointMetadataReader (line 11) | public class SwaggerV2EndpointMetadataReader : IEndpointMetadataReader
method CanHandle (line 13) | public bool CanHandle(JObject document)
method ReadMetadata (line 18) | public IEnumerable<EndpointMetadata> ReadMetadata(JObject document)
FILE: src/Microsoft.HttpRepl/Preferences/IJsonConfig.cs
type IJsonConfig (line 8) | public interface IJsonConfig
FILE: src/Microsoft.HttpRepl/Preferences/JsonConfig.cs
class JsonConfig (line 8) | public class JsonConfig : IJsonConfig
method JsonConfig (line 40) | public JsonConfig(HttpState state)
FILE: src/Microsoft.HttpRepl/Preferences/RequestConfig.cs
class RequestConfig (line 8) | public class RequestConfig : RequestOrResponseConfig
method RequestConfig (line 10) | public RequestConfig(HttpState state)
FILE: src/Microsoft.HttpRepl/Preferences/RequestOrResponseConfig.cs
class RequestOrResponseConfig (line 8) | public abstract class RequestOrResponseConfig
method RequestOrResponseConfig (line 12) | protected RequestOrResponseConfig(HttpState state)
FILE: src/Microsoft.HttpRepl/Preferences/ResponseConfig.cs
class ResponseConfig (line 8) | public class ResponseConfig : RequestOrResponseConfig
method ResponseConfig (line 10) | public ResponseConfig(HttpState state)
FILE: src/Microsoft.HttpRepl/Preferences/WellKnownPreference.cs
class WellKnownPreference (line 11) | public static class WellKnownPreference
class Catalog (line 13) | public static class Catalog
method GetColorPreference (line 176) | public static AllowedColors GetColorPreference(this HttpState programS...
method GetIntPreference (line 186) | public static int GetIntPreference(this HttpState programState, string...
method GetStringPreference (line 196) | public static string GetStringPreference(this HttpState programState, ...
FILE: src/Microsoft.HttpRepl/Program.cs
class Program (line 15) | class Program
method Main (line 17) | static async Task Main(string[] args)
FILE: src/Microsoft.HttpRepl/Suggestions/HeaderCompletion.cs
class HeaderCompletion (line 10) | public class HeaderCompletion
method GetCompletions (line 70) | public static IEnumerable<string> GetCompletions(IReadOnlyCollection<s...
method GetValueCompletions (line 82) | public static IEnumerable<string> GetValueCompletions(string method, s...
FILE: src/Microsoft.HttpRepl/Suggestions/ServerPathCompletion.cs
class ServerPathCompletion (line 10) | public static class ServerPathCompletion
method GetCompletions (line 12) | public static IEnumerable<string> GetCompletions(HttpState programStat...
FILE: src/Microsoft.Repl/Commanding/CommandHistory.cs
class CommandHistory (line 9) | public class CommandHistory : ICommandHistory
method CommandHistory (line 16) | public CommandHistory(int maxEntries = 50)
method AddCommand (line 21) | public void AddCommand(string command)
method GetNextCommand (line 36) | public string GetNextCommand()
method GetPreviousCommand (line 52) | public string GetPreviousCommand()
method SuspendHistory (line 72) | public IDisposable SuspendHistory()
FILE: src/Microsoft.Repl/Commanding/CommandInputLocation.cs
type CommandInputLocation (line 6) | public enum CommandInputLocation
FILE: src/Microsoft.Repl/Commanding/CommandInputProcessingIssue.cs
class CommandInputProcessingIssue (line 6) | public class CommandInputProcessingIssue
method CommandInputProcessingIssue (line 12) | public CommandInputProcessingIssue(CommandInputProcessingIssueKind kin...
FILE: src/Microsoft.Repl/Commanding/CommandInputProcessingIssueKind.cs
type CommandInputProcessingIssueKind (line 6) | public enum CommandInputProcessingIssueKind
FILE: src/Microsoft.Repl/Commanding/CommandInputSpecification.cs
class CommandInputSpecification (line 8) | public class CommandInputSpecification
method CommandInputSpecification (line 20) | public CommandInputSpecification(IReadOnlyList<IReadOnlyList<string>> ...
method Create (line 40) | public static CommandInputSpecificationBuilder Create(string baseName,...
FILE: src/Microsoft.Repl/Commanding/CommandInputSpecificationBuilder.cs
class CommandInputSpecificationBuilder (line 9) | public class CommandInputSpecificationBuilder
method CommandInputSpecificationBuilder (line 17) | public CommandInputSpecificationBuilder(IReadOnlyList<string> name)
method WithOptionPreamble (line 23) | public CommandInputSpecificationBuilder WithOptionPreamble(char option...
method ExactArgCount (line 29) | public CommandInputSpecificationBuilder ExactArgCount(int count)
method MinimumArgCount (line 36) | public CommandInputSpecificationBuilder MinimumArgCount(int count)
method MaximumArgCount (line 47) | public CommandInputSpecificationBuilder MaximumArgCount(int count)
method WithOption (line 59) | public CommandInputSpecificationBuilder WithOption(CommandOptionSpecif...
method Finish (line 65) | public CommandInputSpecification Finish()
method AlternateName (line 70) | public CommandInputSpecificationBuilder AlternateName(string baseName,...
FILE: src/Microsoft.Repl/Commanding/CommandOptionSpecification.cs
class CommandOptionSpecification (line 8) | public class CommandOptionSpecification
method CommandOptionSpecification (line 22) | public CommandOptionSpecification(string id, bool acceptsValue = false...
FILE: src/Microsoft.Repl/Commanding/CommandWithStructuredInputBase.cs
class CommandWithStructuredInputBase (line 13) | public abstract class CommandWithStructuredInputBase<TProgramState, TPar...
method GetHelpSummary (line 16) | public abstract string GetHelpSummary(IShellState shellState, TProgram...
method GetHelpDetails (line 18) | public string GetHelpDetails(IShellState shellState, TProgramState pro...
method GetHelpDetails (line 30) | protected abstract string GetHelpDetails(IShellState shellState, TProg...
method Suggest (line 32) | public IEnumerable<string> Suggest(IShellState shellState, TProgramSta...
method GetOptionValueCompletions (line 147) | protected virtual IEnumerable<string> GetOptionValueCompletions(IShell...
method GetArgumentSuggestionsForText (line 152) | protected virtual IEnumerable<string> GetArgumentSuggestionsForText(IS...
method GetOptionCompletions (line 157) | private IEnumerable<string> GetOptionCompletions(DefaultCommandInput<T...
method CanHandle (line 164) | public bool? CanHandle(IShellState shellState, TProgramState programSt...
method CanHandle (line 188) | protected virtual bool CanHandle(IShellState shellState, TProgramState...
method GetStringForIssue (line 193) | protected virtual string GetStringForIssue(CommandInputProcessingIssue...
method ExecuteAsync (line 199) | public Task ExecuteAsync(IShellState shellState, TProgramState program...
method ExecuteAsync (line 209) | protected abstract Task ExecuteAsync(IShellState shellState, TProgramS...
FILE: src/Microsoft.Repl/Commanding/DefaultCommandDispatcher.cs
class DefaultCommandDispatcher (line 14) | public static class DefaultCommandDispatcher
method Create (line 16) | public static DefaultCommandDispatcher<TProgramState> Create<TProgramS...
method Create (line 21) | public static DefaultCommandDispatcher<TProgramState> Create<TProgramS...
method Create (line 26) | public static DefaultCommandDispatcher<TProgramState, TParseResult> Cr...
method Create (line 32) | public static DefaultCommandDispatcher<TProgramState, TParseResult> Cr...
method DefaultCommandDispatcher (line 41) | public DefaultCommandDispatcher(Func<string> getPrompt, TProgramState ...
method DefaultCommandDispatcher (line 46) | public DefaultCommandDispatcher(Action<IShellState> onReady, TProgramS...
method DefaultCommandDispatcher (line 61) | public DefaultCommandDispatcher(Func<string> getPrompt, TProgramState ...
method DefaultCommandDispatcher (line 66) | public DefaultCommandDispatcher(Action<IShellState> onReady, TProgramS...
method AddCommand (line 73) | public void AddCommand(ICommand<TProgramState, TParseResult> command)
method CollectSuggestions (line 82) | public IReadOnlyList<string> CollectSuggestions(IShellState shellState)
method ExecuteCommandAsync (line 101) | public async Task ExecuteCommandAsync(IShellState shellState, Cancella...
method ExecuteCommandInternalAsync (line 135) | private async Task ExecuteCommandInternalAsync(IShellState shellState,...
method OnReady (line 163) | public void OnReady(IShellState shellState)
class DefaultCommandDispatcher (line 39) | public class DefaultCommandDispatcher<TProgramState> : DefaultCommandDis...
method Create (line 16) | public static DefaultCommandDispatcher<TProgramState> Create<TProgramS...
method Create (line 21) | public static DefaultCommandDispatcher<TProgramState> Create<TProgramS...
method Create (line 26) | public static DefaultCommandDispatcher<TProgramState, TParseResult> Cr...
method Create (line 32) | public static DefaultCommandDispatcher<TProgramState, TParseResult> Cr...
method DefaultCommandDispatcher (line 41) | public DefaultCommandDispatcher(Func<string> getPrompt, TProgramState ...
method DefaultCommandDispatcher (line 46) | public DefaultCommandDispatcher(Action<IShellState> onReady, TProgramS...
method DefaultCommandDispatcher (line 61) | public DefaultCommandDispatcher(Func<string> getPrompt, TProgramState ...
method DefaultCommandDispatcher (line 66) | public DefaultCommandDispatcher(Action<IShellState> onReady, TProgramS...
method AddCommand (line 73) | public void AddCommand(ICommand<TProgramState, TParseResult> command)
method CollectSuggestions (line 82) | public IReadOnlyList<string> CollectSuggestions(IShellState shellState)
method ExecuteCommandAsync (line 101) | public async Task ExecuteCommandAsync(IShellState shellState, Cancella...
method ExecuteCommandInternalAsync (line 135) | private async Task ExecuteCommandInternalAsync(IShellState shellState,...
method OnReady (line 163) | public void OnReady(IShellState shellState)
class DefaultCommandDispatcher (line 52) | public class DefaultCommandDispatcher<TProgramState, TParseResult> : ICo...
method Create (line 16) | public static DefaultCommandDispatcher<TProgramState> Create<TProgramS...
method Create (line 21) | public static DefaultCommandDispatcher<TProgramState> Create<TProgramS...
method Create (line 26) | public static DefaultCommandDispatcher<TProgramState, TParseResult> Cr...
method Create (line 32) | public static DefaultCommandDispatcher<TProgramState, TParseResult> Cr...
method DefaultCommandDispatcher (line 41) | public DefaultCommandDispatcher(Func<string> getPrompt, TProgramState ...
method DefaultCommandDispatcher (line 46) | public DefaultCommandDispatcher(Action<IShellState> onReady, TProgramS...
method DefaultCommandDispatcher (line 61) | public DefaultCommandDispatcher(Func<string> getPrompt, TProgramState ...
method DefaultCommandDispatcher (line 66) | public DefaultCommandDispatcher(Action<IShellState> onReady, TProgramS...
method AddCommand (line 73) | public void AddCommand(ICommand<TProgramState, TParseResult> command)
method CollectSuggestions (line 82) | public IReadOnlyList<string> CollectSuggestions(IShellState shellState)
method ExecuteCommandAsync (line 101) | public async Task ExecuteCommandAsync(IShellState shellState, Cancella...
method ExecuteCommandInternalAsync (line 135) | private async Task ExecuteCommandInternalAsync(IShellState shellState,...
method OnReady (line 163) | public void OnReady(IShellState shellState)
FILE: src/Microsoft.Repl/Commanding/DefaultCommandInput.cs
class DefaultCommandInput (line 11) | public class DefaultCommandInput<TParseResult>
method DefaultCommandInput (line 14) | public DefaultCommandInput(IReadOnlyList<InputElement> commandName, IR...
method TryProcess (line 22) | public static bool TryProcess(CommandInputSpecification spec, TParseRe...
method TryProcessCommandName (line 181) | private static bool TryProcessCommandName(IReadOnlyList<string> comman...
FILE: src/Microsoft.Repl/Commanding/ICommand.cs
type ICommand (line 11) | public interface ICommand<in TProgramState, in TParseResult>
method GetHelpSummary (line 14) | string GetHelpSummary(IShellState shellState, TProgramState programSta...
method GetHelpDetails (line 16) | string GetHelpDetails(IShellState shellState, TProgramState programSta...
method Suggest (line 18) | IEnumerable<string> Suggest(IShellState shellState, TProgramState prog...
method CanHandle (line 20) | bool? CanHandle(IShellState shellState, TProgramState programState, TP...
method ExecuteAsync (line 22) | Task ExecuteAsync(IShellState shellState, TProgramState programState, ...
FILE: src/Microsoft.Repl/Commanding/ICommandDispatcher.cs
type ICommandDispatcher (line 11) | public interface ICommandDispatcher
method CollectSuggestions (line 15) | IReadOnlyList<string> CollectSuggestions(IShellState shellState);
method OnReady (line 17) | void OnReady(IShellState shellState);
method ExecuteCommandAsync (line 19) | Task ExecuteCommandAsync(IShellState shellState, CancellationToken can...
type ICommandDispatcher (line 22) | public interface ICommandDispatcher<in TProgramState, in TParseResult> :...
method CollectSuggestions (line 15) | IReadOnlyList<string> CollectSuggestions(IShellState shellState);
method OnReady (line 17) | void OnReady(IShellState shellState);
method ExecuteCommandAsync (line 19) | Task ExecuteCommandAsync(IShellState shellState, CancellationToken can...
FILE: src/Microsoft.Repl/Commanding/ICommandHistory.cs
type ICommandHistory (line 8) | public interface ICommandHistory
method GetPreviousCommand (line 10) | string GetPreviousCommand();
method GetNextCommand (line 12) | string GetNextCommand();
method AddCommand (line 14) | void AddCommand(string command);
method SuspendHistory (line 16) | IDisposable SuspendHistory();
FILE: src/Microsoft.Repl/Commanding/InputElement.cs
class InputElement (line 6) | public class InputElement
method InputElement (line 18) | public InputElement(CommandInputLocation location, string text, string...
method InputElement (line 23) | public InputElement(InputElement owner, CommandInputLocation location,...
FILE: src/Microsoft.Repl/ConsoleHandling/AllowedColors.cs
type AllowedColors (line 8) | [Flags]
FILE: src/Microsoft.Repl/ConsoleHandling/AnsiColorExtensions.cs
class AnsiColorExtensions (line 6) | public static class AnsiColorExtensions
method Black (line 8) | public static string Black(this string text)
method Red (line 13) | public static string Red(this string text)
method Green (line 17) | public static string Green(this string text)
method Yellow (line 22) | public static string Yellow(this string text)
method Blue (line 27) | public static string Blue(this string text)
method Magenta (line 32) | public static string Magenta(this string text)
method Cyan (line 37) | public static string Cyan(this string text)
method White (line 42) | public static string White(this string text)
method Bold (line 47) | public static string Bold(this string text)
method SetColor (line 52) | public static string SetColor(this string text, AllowedColors color)
FILE: src/Microsoft.Repl/ConsoleHandling/AnsiConsole.cs
class AnsiConsole (line 9) | public class AnsiConsole
method AnsiConsole (line 11) | private AnsiConsole(TextWriter writer)
method GetOutput (line 20) | public static AnsiConsole GetOutput()
method GetError (line 25) | public static AnsiConsole GetError()
method SetColor (line 34) | private void SetColor(ConsoleColor color)
method SetBold (line 45) | private void SetBold(bool bold)
method WriteLine (line 57) | public void WriteLine(string message)
method Write (line 63) | public void Write(char message)
method Write (line 68) | public void Write(string message)
FILE: src/Microsoft.Repl/ConsoleHandling/ConsoleManager.cs
class ConsoleManager (line 11) | public class ConsoleManager : IConsoleManager
method ConsoleManager (line 29) | public ConsoleManager()
method Clear (line 35) | public void Clear()
method MoveCaret (line 44) | public void MoveCaret(int positions)
method ReadKey (line 122) | public ConsoleKeyInfo ReadKey(CancellationToken cancellationToken)
method ResetCommandStart (line 139) | public void ResetCommandStart()
method Write (line 144) | public void Write(char c)
method Write (line 152) | public void Write(string s)
method WriteLine (line 160) | public void WriteLine()
method WriteLine (line 168) | public void WriteLine(string s)
method AddBreakHandler (line 181) | public IDisposable AddBreakHandler(Action handler)
method CaretUpdateScope (line 188) | private IDisposable CaretUpdateScope()
method OnCancelKeyPress (line 199) | private void OnCancelKeyPress(object sender, ConsoleCancelEventArgs e)
method ReleaseBreakHandler (line 206) | private void ReleaseBreakHandler(Action handler)
FILE: src/Microsoft.Repl/ConsoleHandling/IConsoleManager.cs
type IConsoleManager (line 9) | public interface IConsoleManager : IWritable
method Clear (line 21) | void Clear();
method MoveCaret (line 23) | void MoveCaret(int positions);
method ReadKey (line 25) | ConsoleKeyInfo ReadKey(CancellationToken cancellationToken);
method ResetCommandStart (line 27) | void ResetCommandStart();
method AddBreakHandler (line 29) | IDisposable AddBreakHandler(Action onBreak);
FILE: src/Microsoft.Repl/ConsoleHandling/IWritable.cs
type IWritable (line 6) | public interface IWritable
method Write (line 8) | void Write(char c);
method Write (line 10) | void Write(string s);
method WriteLine (line 12) | void WriteLine();
method WriteLine (line 14) | void WriteLine(string s);
FILE: src/Microsoft.Repl/ConsoleHandling/Point.cs
type Point (line 6) | public struct Point
method Point (line 12) | public Point(int x, int y)
method Equals (line 38) | public override bool Equals(object obj)
method GetHashCode (line 43) | public override int GetHashCode()
method ToString (line 48) | public override string ToString()
FILE: src/Microsoft.Repl/ConsoleHandling/Reporter.cs
class Reporter (line 8) | public class Reporter : IWritable
method Reporter (line 15) | static Reporter()
method Reporter (line 20) | private Reporter(AnsiConsole console)
method Reset (line 32) | public static void Reset()
method WriteLine (line 44) | public void WriteLine(string message)
method WriteLine (line 64) | public void WriteLine()
method Write (line 72) | public void Write(char message)
method Write (line 87) | public void Write(string message)
FILE: src/Microsoft.Repl/ConsoleHandling/Writable.cs
class Writable (line 8) | internal class Writable : IWritable
method Writable (line 13) | public Writable(Func<IDisposable> caretUpdater, Reporter reporter)
method Write (line 25) | public void Write(char c)
method Write (line 33) | public void Write(string s)
method WriteLine (line 41) | public void WriteLine()
method WriteLine (line 49) | public void WriteLine(string s)
FILE: src/Microsoft.Repl/Disposable.cs
class Disposable (line 8) | public class Disposable : IDisposable
method Disposable (line 12) | public Disposable(Action onDispose)
method Dispose (line 16) | public virtual void Dispose()
method Disposable (line 26) | public Disposable(T value, Action onDispose)
method Dispose (line 34) | public override void Dispose()
class Disposable (line 23) | public class Disposable<T> : Disposable
method Disposable (line 12) | public Disposable(Action onDispose)
method Dispose (line 16) | public virtual void Dispose()
method Disposable (line 26) | public Disposable(T value, Action onDispose)
method Dispose (line 34) | public override void Dispose()
FILE: src/Microsoft.Repl/IShellState.cs
type IShellState (line 11) | public interface IShellState
FILE: src/Microsoft.Repl/Input/IInputManager.cs
type IInputManager (line 10) | public interface IInputManager
method RegisterKeyHandler (line 14) | IInputManager RegisterKeyHandler(ConsoleKey key, AsyncKeyPressHandler ...
method RegisterKeyHandler (line 16) | IInputManager RegisterKeyHandler(ConsoleKey key, ConsoleModifiers modi...
method ResetInput (line 18) | void ResetInput();
method StartAsync (line 20) | Task StartAsync(IShellState state, CancellationToken cancellationToken);
method SetInput (line 22) | void SetInput(IShellState state, string input);
method GetCurrentBuffer (line 24) | string GetCurrentBuffer();
method RemovePreviousCharacter (line 26) | void RemovePreviousCharacter(IShellState state);
method RemoveCurrentCharacter (line 28) | void RemoveCurrentCharacter(IShellState state);
method Clear (line 30) | void Clear(IShellState state);
FILE: src/Microsoft.Repl/Input/InputManager.cs
class InputManager (line 13) | public class InputManager : IInputManager
method Clear (line 20) | public void Clear(IShellState state)
method GetCurrentBuffer (line 25) | public string GetCurrentBuffer()
method RegisterKeyHandler (line 30) | public IInputManager RegisterKeyHandler(ConsoleKey key, AsyncKeyPressH...
method RegisterKeyHandler (line 49) | public IInputManager RegisterKeyHandler(ConsoleKey key, ConsoleModifie...
method RemoveCurrentCharacter (line 68) | public void RemoveCurrentCharacter(IShellState state)
method RemovePreviousCharacter (line 85) | public void RemovePreviousCharacter(IShellState state)
method SetInput (line 101) | public void SetInput(IShellState state, string input)
method ResetInput (line 106) | public void ResetInput()
method StashEchoState (line 113) | private void StashEchoState()
method GetTtyState (line 136) | private static string GetTtyState()
method RestoreTtyState (line 148) | private void RestoreTtyState()
method SetInput (line 158) | private void SetInput(IShellState state, IReadOnlyList<char> input, bo...
method StartAsync (line 193) | public async Task StartAsync(IShellState state, CancellationToken canc...
method FlushInput (line 341) | private void FlushInput(IShellState state, ref List<ConsoleKeyInfo> pr...
FILE: src/Microsoft.Repl/Input/KeyHandlers.cs
class KeyHandlers (line 11) | public static class KeyHandlers
method RegisterDefaultKeyHandlers (line 13) | public static void RegisterDefaultKeyHandlers(IInputManager inputManager)
method End (line 117) | private static Task End(ConsoleKeyInfo keyInfo, IShellState state, Can...
method Home (line 123) | public static Task Home(ConsoleKeyInfo keyInfo, IShellState state, Can...
method LeftArrow (line 129) | public static Task LeftArrow(ConsoleKeyInfo keyInfo, IShellState state...
method RightArrow (line 156) | public static Task RightArrow(ConsoleKeyInfo keyInfo, IShellState stat...
method UpArrow (line 186) | public static Task UpArrow(ConsoleKeyInfo keyInfo, IShellState state, ...
method DownArrow (line 193) | public static Task DownArrow(ConsoleKeyInfo keyInfo, IShellState state...
method Enter (line 200) | public static Task Enter(ConsoleKeyInfo keyInfo, IShellState state, Ca...
method Backspace (line 205) | public static Task Backspace(ConsoleKeyInfo keyInfo, IShellState state...
method Unhandled (line 211) | public static Task Unhandled(ConsoleKeyInfo keyInfo, IShellState state...
method Escape (line 216) | public static Task Escape(ConsoleKeyInfo keyInfo, IShellState state, C...
method Tab (line 222) | public static Task Tab(ConsoleKeyInfo keyInfo, IShellState state, Canc...
method Delete (line 236) | public static Task Delete(ConsoleKeyInfo keyInfo, IShellState state, C...
method Insert (line 242) | public static Task Insert(ConsoleKeyInfo keyInfo, IShellState state, C...
FILE: src/Microsoft.Repl/Parsing/CoreParseResult.cs
class CoreParseResult (line 10) | public class CoreParseResult : ICoreParseResult
method CoreParseResult (line 12) | public CoreParseResult(int caretPositionWithinCommandText, int caretPo...
method IsQuotedSection (line 37) | public bool IsQuotedSection(int index)
method Slice (line 42) | public virtual ICoreParseResult Slice(int numberOfLeadingSectionsToRem...
FILE: src/Microsoft.Repl/Parsing/CoreParser.cs
class CoreParser (line 9) | public class CoreParser : IParser<ICoreParseResult>
method Parse (line 11) | public ICoreParseResult Parse(string commandText, int caretPosition)
FILE: src/Microsoft.Repl/Parsing/ICoreParseResult.cs
type ICoreParseResult (line 8) | public interface ICoreParseResult
method IsQuotedSection (line 18) | bool IsQuotedSection(int index);
method Slice (line 24) | ICoreParseResult Slice(int numberOfLeadingSectionsToRemove);
FILE: src/Microsoft.Repl/Parsing/IParser.cs
type IParser (line 6) | public interface IParser
method Parse (line 8) | ICoreParseResult Parse(string commandText, int caretPosition);
method Parse (line 13) | new TParseResult Parse(string commandText, int caretPosition);
type IParser (line 11) | public interface IParser<out TParseResult> : IParser
method Parse (line 8) | ICoreParseResult Parse(string commandText, int caretPosition);
method Parse (line 13) | new TParseResult Parse(string commandText, int caretPosition);
FILE: src/Microsoft.Repl/Scripting/IScriptExecutor.cs
type IScriptExecutor (line 10) | public interface IScriptExecutor
method ExecuteScriptAsync (line 12) | Task ExecuteScriptAsync(IShellState shellState, IEnumerable<string> co...
FILE: src/Microsoft.Repl/Scripting/ScriptExecutor.cs
class ScriptExecutor (line 13) | public class ScriptExecutor<TProgramState, TParseResult> : IScriptExecutor
method ScriptExecutor (line 18) | public ScriptExecutor(bool hideScriptLinesFromHistory = true)
method ExecuteScriptAsync (line 23) | public async Task ExecuteScriptAsync(IShellState shellState, IEnumerab...
FILE: src/Microsoft.Repl/Shell.cs
class Shell (line 12) | public class Shell
method Shell (line 14) | public Shell(IShellState shellState)
method Shell (line 20) | public Shell(ICommandDispatcher dispatcher, ISuggestionManager suggest...
method RunAsync (line 27) | public Task RunAsync(CancellationToken cancellationToken)
FILE: src/Microsoft.Repl/ShellState.cs
class ShellState (line 11) | public class ShellState : IShellState
method ShellState (line 13) | public ShellState(ICommandDispatcher commandDispatcher, ISuggestionMan...
FILE: src/Microsoft.Repl/Suggestions/FileSystemCompletion.cs
class FileSystemCompletion (line 11) | public static class FileSystemCompletion
method GetCompletions (line 13) | public static IEnumerable<string> GetCompletions(string prefix)
FILE: src/Microsoft.Repl/Suggestions/ISuggestionManager.cs
type ISuggestionManager (line 6) | public interface ISuggestionManager
method NextSuggestion (line 8) | void NextSuggestion(IShellState shellState);
method PreviousSuggestion (line 10) | void PreviousSuggestion(IShellState shellState);
FILE: src/Microsoft.Repl/Suggestions/SuggestionManager.cs
class SuggestionManager (line 10) | public class SuggestionManager : ISuggestionManager
method NextSuggestion (line 16) | public void NextSuggestion(IShellState shellState)
method PreviousSuggestion (line 57) | public void PreviousSuggestion(IShellState shellState)
FILE: src/Microsoft.Repl/Utils.cs
class Utils (line 8) | public static class Utils
method Stringify (line 10) | public static string Stringify(this IReadOnlyList<char> keys)
FILE: src/dotnet-dev-certs/Program.cs
class Program (line 15) | internal class Program
method Main (line 30) | public static int Main(string[] args)
method CleanHttpsCertificates (line 119) | private static int CleanHttpsCertificates(IReporter reporter)
method CheckHttpsCertificate (line 148) | private static int CheckHttpsCertificate(CommandOption trust, IReporte...
method EnsureHttpsCertificate (line 182) | private static int EnsureHttpsCertificate(CommandOption exportPath, Co...
FILE: src/dotnet-sql-cache/Program.cs
class Program (line 13) | public class Program
method Program (line 20) | public Program(IConsole console)
method Main (line 27) | public static int Main(string[] args)
method Run (line 32) | public int Run(string[] args)
method CreateReporter (line 101) | private IReporter CreateReporter(bool verbose)
method CreateTableAndIndexes (line 103) | private int CreateTableAndIndexes(IReporter reporter)
method ValidateConnectionString (line 160) | private void ValidateConnectionString()
FILE: src/dotnet-sql-cache/SqlQueries.cs
class SqlQueries (line 8) | internal class SqlQueries
method SqlQueries (line 30) | public SqlQueries(string schemaName, string tableName)
method DelimitIdentifier (line 57) | private string DelimitIdentifier(string identifier)
method EscapeLiteral (line 62) | private string EscapeLiteral(string literal)
FILE: src/dotnet-user-secrets/CommandLineOptions.cs
class CommandLineOptions (line 11) | public class CommandLineOptions
method Parse (line 20) | public static CommandLineOptions Parse(string[] args, IConsole console)
FILE: src/dotnet-user-secrets/Internal/ClearCommand.cs
class ClearCommand (line 8) | internal class ClearCommand : ICommand
method Configure (line 10) | public static void Configure(CommandLineApplication command, CommandLi...
method Execute (line 21) | public void Execute(CommandContext context)
FILE: src/dotnet-user-secrets/Internal/CommandContext.cs
class CommandContext (line 8) | public class CommandContext
method CommandContext (line 10) | public CommandContext(
FILE: src/dotnet-user-secrets/Internal/ICommand.cs
type ICommand (line 6) | public interface ICommand
method Execute (line 8) | void Execute(CommandContext context);
FILE: src/dotnet-user-secrets/Internal/InitCommand.cs
class InitCommandFactory (line 14) | public class InitCommandFactory : ICommand
method Configure (line 18) | internal static void Configure(CommandLineApplication command, Command...
method InitCommandFactory (line 29) | public InitCommandFactory(CommandLineOptions options)
method Execute (line 34) | public void Execute(CommandContext context)
method Execute (line 39) | public void Execute(CommandContext context, string workingDirectory)
class InitCommand (line 45) | public class InitCommand : ICommand
method InitCommand (line 51) | public InitCommand(string id, string project)
method Execute (line 57) | public void Execute(CommandContext context, string workingDirectory)
method Execute (line 63) | public void Execute(CommandContext context)
method ResolveProjectPath (line 120) | private static string ResolveProjectPath(string name, string path)
FILE: src/dotnet-user-secrets/Internal/ListCommand.cs
class ListCommand (line 10) | internal class ListCommand : ICommand
method Configure (line 14) | public static void Configure(CommandLineApplication command, CommandLi...
method ListCommand (line 28) | public ListCommand(bool jsonOutput)
method Execute (line 33) | public void Execute(CommandContext context)
method ReportJson (line 54) | private void ReportJson(CommandContext context)
FILE: src/dotnet-user-secrets/Internal/MsBuildProjectFinder.cs
class MsBuildProjectFinder (line 11) | internal class MsBuildProjectFinder
method MsBuildProjectFinder (line 15) | public MsBuildProjectFinder(string directory)
method FindMsBuildProject (line 22) | public string FindMsBuildProject(string project)
FILE: src/dotnet-user-secrets/Internal/ProjectIdResolver.cs
class ProjectIdResolver (line 14) | public class ProjectIdResolver
method ProjectIdResolver (line 21) | public ProjectIdResolver(IReporter reporter, string workingDirectory)
method Resolve (line 28) | public string Resolve(string project, string configuration)
method FindTargetsFile (line 89) | private string FindTargetsFile()
method TryDelete (line 109) | private static void TryDelete(string file)
FILE: src/dotnet-user-secrets/Internal/ReadableJsonConfigurationSource.cs
class ReadableJsonConfigurationProvider (line 9) | public class ReadableJsonConfigurationProvider : JsonConfigurationProvider
method ReadableJsonConfigurationProvider (line 11) | public ReadableJsonConfigurationProvider()
FILE: src/dotnet-user-secrets/Internal/RemoveCommand.cs
class RemoveCommand (line 8) | internal class RemoveCommand : ICommand
method Configure (line 12) | public static void Configure(CommandLineApplication command, CommandLi...
method RemoveCommand (line 30) | public RemoveCommand(string keyName)
method Execute (line 35) | public void Execute(CommandContext context)
FILE: src/dotnet-user-secrets/Internal/SecretsStore.cs
class SecretsStore (line 16) | public class SecretsStore
method SecretsStore (line 21) | public SecretsStore(string userSecretsId, IReporter reporter)
method ContainsKey (line 45) | public bool ContainsKey(string key) => _secrets.ContainsKey(key);
method AsEnumerable (line 47) | public IEnumerable<KeyValuePair<string, string>> AsEnumerable() => _se...
method Clear (line 49) | public void Clear() => _secrets.Clear();
method Set (line 51) | public void Set(string key, string value) => _secrets[key] = value;
method Remove (line 53) | public void Remove(string key)
method Save (line 61) | public virtual void Save()
method Load (line 77) | protected virtual IDictionary<string, string> Load(string userSecretsId)
FILE: src/dotnet-user-secrets/Internal/SetCommand.cs
class SetCommand (line 12) | internal class SetCommand
method Configure (line 14) | public static void Configure(CommandLineApplication command, CommandLi...
class FromStdInStrategy (line 59) | public class FromStdInStrategy : ICommand
method Execute (line 61) | public void Execute(CommandContext context)
class ForOneValueStrategy (line 87) | public class ForOneValueStrategy : ICommand
method ForOneValueStrategy (line 92) | public ForOneValueStrategy(string keyName, string keyValue)
method Execute (line 98) | public void Execute(CommandContext context)
FILE: src/dotnet-user-secrets/Program.cs
class Program (line 12) | public class Program
method Main (line 17) | public static int Main(string[] args)
method Program (line 26) | public Program(IConsole console, string workingDirectory)
method TryRun (line 32) | public bool TryRun(string[] args, out int returnCode)
method RunInternal (line 49) | internal int RunInternal(params string[] args)
method CreateReporter (line 97) | private IReporter CreateReporter(bool verbose)
method ResolveId (line 100) | internal string ResolveId(CommandLineOptions options, IReporter reporter)
FILE: src/dotnet-user-secrets/Properties/Resources.Designer.cs
class Resources (line 8) | internal static class Resources
method FormatError_Command_Failed (line 24) | internal static string FormatError_Command_Failed(object message)
method FormatError_MissingArgument (line 40) | internal static string FormatError_MissingArgument(object name)
method FormatError_Missing_Secret (line 54) | internal static string FormatError_Missing_Secret(object key)
method FormatError_MultipleProjectsFound (line 68) | internal static string FormatError_MultipleProjectsFound(object projec...
method FormatError_No_Secrets_Found (line 82) | internal static string FormatError_No_Secrets_Found()
method FormatError_NoProjectsFound (line 96) | internal static string FormatError_NoProjectsFound(object projectPath)
method FormatError_ProjectMissingId (line 110) | internal static string FormatError_ProjectMissingId(object project)
method FormatError_ProjectPath_NotFound (line 124) | internal static string FormatError_ProjectPath_NotFound(object path)
method FormatError_ProjectFailedToLoad (line 138) | internal static string FormatError_ProjectFailedToLoad(object project)
method FormatMessage_Project_File_Path (line 152) | internal static string FormatMessage_Project_File_Path(object project)
method FormatMessage_Saved_Secret (line 166) | internal static string FormatMessage_Saved_Secret(object key, object v...
method FormatMessage_Saved_Secrets (line 180) | internal static string FormatMessage_Saved_Secrets(object number)
method FormatMessage_Secret_File_Path (line 194) | internal static string FormatMessage_Secret_File_Path(object secretsFi...
method FormatMessage_Secret_Value_Format (line 208) | internal static string FormatMessage_Secret_Value_Format(object key, o...
method FormatError_InvalidSecretsId (line 222) | internal static string FormatError_InvalidSecretsId(object userSecretsId)
method FormatMessage_ProjectAlreadyInitialized (line 236) | internal static string FormatMessage_ProjectAlreadyInitialized(object ...
method FormatMessage_SetUserSecretsIdForProject (line 250) | internal static string FormatMessage_SetUserSecretsIdForProject(object...
method GetString (line 253) | private static string GetString(string name, params string[] formatter...
FILE: src/dotnet-watch/CommandLineOptions.cs
class CommandLineOptions (line 13) | internal class CommandLineOptions
method Parse (line 33) | public static CommandLineOptions Parse(string[] args, IConsole console)
FILE: src/dotnet-watch/DotNetWatcher.cs
class DotNetWatcher (line 14) | public class DotNetWatcher
method DotNetWatcher (line 19) | public DotNetWatcher(IReporter reporter)
method WatchAsync (line 27) | public async Task WatchAsync(ProcessSpec processSpec, IFileSetFactory ...
FILE: src/dotnet-watch/IFileSet.cs
type IFileSet (line 8) | public interface IFileSet : IEnumerable<string>
method Contains (line 10) | bool Contains(string filePath);
FILE: src/dotnet-watch/IFileSetFactory.cs
type IFileSetFactory (line 9) | public interface IFileSetFactory
method CreateAsync (line 11) | Task<IFileSet> CreateAsync(CancellationToken cancellationToken);
FILE: src/dotnet-watch/Internal/FileSet.cs
class FileSet (line 10) | public class FileSet : IFileSet
method FileSet (line 14) | public FileSet(IEnumerable<string> files)
method Contains (line 19) | public bool Contains(string filePath) => _files.Contains(filePath);
method GetEnumerator (line 23) | public IEnumerator<string> GetEnumerator() => _files.GetEnumerator();
method GetEnumerator (line 24) | IEnumerator IEnumerable.GetEnumerator() => _files.GetEnumerator();
FILE: src/dotnet-watch/Internal/FileSetWatcher.cs
class FileSetWatcher (line 12) | public class FileSetWatcher : IDisposable
method FileSetWatcher (line 17) | public FileSetWatcher(IFileSet fileSet, IReporter reporter)
method GetChangedFileAsync (line 25) | public async Task<string> GetChangedFileAsync(CancellationToken cancel...
method Dispose (line 50) | public void Dispose()
FILE: src/dotnet-watch/Internal/FileWatcher.cs
class FileWatcher (line 12) | public class FileWatcher
method FileWatcher (line 19) | public FileWatcher()
method FileWatcher (line 23) | public FileWatcher(IReporter reporter)
method WatchDirectory (line 31) | public void WatchDirectory(string directory)
method Dispose (line 37) | public void Dispose()
method AddDirectoryWatcher (line 56) | private void AddDirectoryWatcher(string directory)
method WatcherErrorHandler (line 90) | private void WatcherErrorHandler(object sender, Exception error)
method WatcherChangedHandler (line 98) | private void WatcherChangedHandler(object sender, string changedPath)
method NotifyChange (line 103) | private void NotifyChange(string path)
method DisposeWatcher (line 111) | private void DisposeWatcher(string directory)
method EnsureNotDisposed (line 124) | private void EnsureNotDisposed()
method EnsureTrailingSlash (line 132) | private static string EnsureTrailingSlash(string path)
FILE: src/dotnet-watch/Internal/FileWatcher/DotnetFileWatcher.cs
class DotnetFileWatcher (line 11) | internal class DotnetFileWatcher : IFileSystemWatcher
method DotnetFileWatcher (line 21) | public DotnetFileWatcher(string watchedDirectory)
method DotnetFileWatcher (line 26) | internal DotnetFileWatcher(string watchedDirectory, Func<string, FileS...
method DefaultWatcherFactory (line 42) | private static FileSystemWatcher DefaultWatcherFactory(string watchedD...
method WatcherErrorHandler (line 49) | private void WatcherErrorHandler(object sender, ErrorEventArgs e)
method WatcherRenameHandler (line 70) | private void WatcherRenameHandler(object sender, RenamedEventArgs e)
method WatcherChangeHandler (line 92) | private void WatcherChangeHandler(object sender, FileSystemEventArgs e)
method NotifyChange (line 102) | private void NotifyChange(string fullPath)
method CreateFileSystemWatcher (line 108) | private void CreateFileSystemWatcher()
method DisposeInnerWatcher (line 134) | private void DisposeInnerWatcher()
method Dispose (line 153) | public void Dispose()
FILE: src/dotnet-watch/Internal/FileWatcher/FileWatcherFactory.cs
class FileWatcherFactory (line 8) | public static class FileWatcherFactory
method CreateWatcher (line 10) | public static IFileSystemWatcher CreateWatcher(string watchedDirectory)
method CreateWatcher (line 13) | public static IFileSystemWatcher CreateWatcher(string watchedDirectory...
FILE: src/dotnet-watch/Internal/FileWatcher/IFileSystemWatcher.cs
type IFileSystemWatcher (line 8) | public interface IFileSystemWatcher : IDisposable
FILE: src/dotnet-watch/Internal/FileWatcher/PollingFileWatcher.cs
class PollingFileWatcher (line 13) | internal class PollingFileWatcher : IFileSystemWatcher
method PollingFileWatcher (line 29) | public PollingFileWatcher(string watchedDirectory)
method PollingLoop (line 63) | private void PollingLoop()
method CreateKnownFilesSnapshot (line 91) | private void CreateKnownFilesSnapshot()
method CheckForChangedFiles (line 101) | private void CheckForChangedFiles()
method RecordChange (line 156) | private void RecordChange(FileSystemInfo fileInfo)
method ForeachEntityInDirectory (line 184) | private void ForeachEntityInDirectory(DirectoryInfo dirInfo, Action<Fi...
method NotifyChanges (line 204) | private void NotifyChanges()
method EnsureNotDisposed (line 220) | private void EnsureNotDisposed()
method Dispose (line 228) | public void Dispose()
type FileMeta (line 234) | private struct FileMeta
method FileMeta (line 236) | public FileMeta(FileSystemInfo fileInfo, bool foundAgain = false)
FILE: src/dotnet-watch/Internal/MsBuildFileSetFactory.cs
class MsBuildFileSetFactory (line 17) | public class MsBuildFileSetFactory : IFileSetFactory
method MsBuildFileSetFactory (line 28) | public MsBuildFileSetFactory(IReporter reporter,
method MsBuildFileSetFactory (line 38) | internal MsBuildFileSetFactory(IReporter reporter,
method CreateAsync (line 54) | public async Task<IFileSet> CreateAsync(CancellationToken cancellation...
method InitializeArgs (line 146) | private IReadOnlyList<string> InitializeArgs(string watchTargetsFile, ...
method FindTargetsFile (line 168) | private string FindTargetsFile()
FILE: src/dotnet-watch/Internal/MsBuildProjectFinder.cs
class MsBuildProjectFinder (line 12) | internal class MsBuildProjectFinder
method FindMsBuildProject (line 19) | public static string FindMsBuildProject(string searchBase, string proj...
FILE: src/dotnet-watch/Internal/OutputCapture.cs
class OutputCapture (line 8) | public class OutputCapture
method AddLine (line 12) | public void AddLine(string line) => _lines.Add(line);
FILE: src/dotnet-watch/Internal/OutputSink.cs
class OutputSink (line 6) | public class OutputSink
method StartCapture (line 9) | public OutputCapture StartCapture()
FILE: src/dotnet-watch/Internal/ProcessRunner.cs
class ProcessRunner (line 15) | public class ProcessRunner
method ProcessRunner (line 19) | public ProcessRunner(IReporter reporter)
method RunAsync (line 27) | public async Task<int> RunAsync(ProcessSpec processSpec, CancellationT...
method CreateProcess (line 65) | private Process CreateProcess(ProcessSpec processSpec)
method ConsumeStreamAsync (line 89) | private static async Task ConsumeStreamAsync(StreamReader reader, Acti...
class ProcessState (line 98) | private class ProcessState : IDisposable
method ProcessState (line 105) | public ProcessState(Process process, IReporter reporter)
method TryKill (line 135) | public void TryKill()
method OnExited (line 159) | private void OnExited(object sender, EventArgs args)
method Dispose (line 162) | public void Dispose()
FILE: src/dotnet-watch/PrefixConsoleReporter.cs
class PrefixConsoleReporter (line 10) | public class PrefixConsoleReporter : ConsoleReporter
method PrefixConsoleReporter (line 14) | public PrefixConsoleReporter(IConsole console, bool verbose, bool quiet)
method WriteLine (line 18) | protected override void WriteLine(TextWriter writer, string message, C...
FILE: src/dotnet-watch/ProcessSpec.cs
class ProcessSpec (line 10) | public class ProcessSpec
method ShortDisplayName (line 18) | public string ShortDisplayName()
FILE: src/dotnet-watch/Program.cs
class Program (line 15) | public class Program : IDisposable
method Program (line 22) | public Program(IConsole console, string workingDir)
method Main (line 34) | public static async Task<int> Main(string[] args)
method RunAsync (line 52) | public async Task<int> RunAsync(string[] args)
method OnCancelKeyPress (line 114) | private void OnCancelKeyPress(object sender, ConsoleCancelEventArgs args)
method MainInternalAsync (line 127) | private async Task<int> MainInternalAsync(
method ListFilesAsync (line 171) | private async Task<int> ListFilesAsync(
method CreateReporter (line 207) | private static IReporter CreateReporter(bool verbose, bool quiet, ICon...
method Dispose (line 210) | public void Dispose()
FILE: src/dotnet-watch/Properties/Resources.Designer.cs
class Resources (line 8) | internal static class Resources
method FormatError_ProjectPath_NotFound (line 24) | internal static string FormatError_ProjectPath_NotFound(object path)
method FormatError_MultipleProjectsFound (line 40) | internal static string FormatError_MultipleProjectsFound(object projec...
method FormatError_NoProjectsFound (line 56) | internal static string FormatError_NoProjectsFound(object projectPath)
method FormatError_QuietAndVerboseSpecified (line 72) | internal static string FormatError_QuietAndVerboseSpecified()
method GetString (line 77) | private static string GetString(string name, params string[] formatter...
FILE: test/Microsoft.HttpRepl.Tests/JsonVisitorTests.cs
class JsonVisitorTests (line 8) | public class JsonVisitorTests
method JsonVisitor_ObjectWithComments (line 10) | [Fact]
class MockJsonConfig (line 35) | private class MockJsonConfig : IJsonConfig
FILE: test/Microsoft.Repl.Tests/ParserTests.cs
class ParserTests (line 6) | public class ParserTests
method ParserTests_Basic (line 8) | [Fact]
FILE: test/Shared/TestConsole.cs
class TestConsole (line 14) | public class TestConsole : IConsole
method TestConsole (line 19) | public TestConsole(ITestOutputHelper output)
method ConsoleCancelKey (line 46) | public ConsoleCancelEventArgs ConsoleCancelKey()
method ResetColor (line 57) | public void ResetColor()
class TestOutputWriter (line 61) | private class TestOutputWriter : TextWriter
method TestOutputWriter (line 66) | public TestOutputWriter(ITestOutputHelper output)
method Write (line 73) | public override void Write(char value)
FILE: test/Shared/TestReporter.cs
class TestReporter (line 8) | public class TestReporter : IReporter
method TestReporter (line 12) | public TestReporter(ITestOutputHelper output)
method Verbose (line 17) | public void Verbose(string message)
method Output (line 22) | public void Output(string message)
method Warn (line 27) | public void Warn(string message)
method Error (line 32) | public void Error(string message)
FILE: test/dotnet-user-secrets.Tests/InitCommandTest.cs
class InitCommandTests (line 15) | public class InitCommandTests : IClassFixture<UserSecretsTestFixture>
method InitCommandTests (line 22) | public InitCommandTests(UserSecretsTestFixture fixture, ITestOutputHel...
method MakeCommandContext (line 35) | private CommandContext MakeCommandContext() => new CommandContext(null...
method AddsSecretIdToProject (line 37) | [Fact]
method AddsSpecificSecretIdToProject (line 49) | [Fact]
method AddsEscapedSpecificSecretIdToProject (line 63) | [Fact]
method DoesNotGenerateIdForProjectWithSecretId (line 77) | [Fact]
method OverridesIdForProjectWithSecretId (line 91) | [Fact]
method FailsForInvalidId (line 106) | [Fact]
FILE: test/dotnet-user-secrets.Tests/MsBuildProjectFinderTest.cs
class MsBuildProjectFinderTest (line 10) | public class MsBuildProjectFinderTest
method FindsSingleProject (line 12) | [Theory]
method ThrowsWhenNoFile (line 29) | [Fact]
method DoesNotMatchXproj (line 40) | [Fact]
method ThrowsWhenMultipleFile (line 52) | [Fact]
method ThrowsWhenFileDoesNotExist (line 65) | [Fact]
method ThrowsWhenRootDoesNotExist (line 76) | [Fact]
FILE: test/dotnet-user-secrets.Tests/SecretManagerTests.cs
class SecretManagerTests (line 16) | public class SecretManagerTests : IClassFixture<UserSecretsTestFixture>
method SecretManagerTests (line 22) | public SecretManagerTests(UserSecretsTestFixture fixture, ITestOutputH...
method CreateProgram (line 33) | private Program CreateProgram()
method Error_MissingId (line 38) | [Theory]
method Error_InvalidProjectFormat (line 50) | [Fact]
method Error_Project_DoesNotExist (line 60) | [Fact]
method SupportsRelativePaths (line 70) | [Fact]
method SetSecrets (line 83) | [Theory]
method SetSecret_Update_Existing_Secret (line 148) | [Fact]
method SetSecret_With_Verbose_Flag (line 165) | [Fact]
method Remove_Non_Existing_Secret (line 185) | [Fact]
method Remove_Is_Case_Insensitive (line 194) | [Fact]
method List_Flattens_Nested_Objects (line 210) | [Fact]
method List_Json (line 223) | [Fact]
method Set_Flattens_Nested_Objects (line 239) | [Fact]
method List_Empty_Secrets_File (line 259) | [Fact]
method Clear_Secrets (line 268) | [Theory]
method Init_When_Project_Has_No_Secrets_Id (line 327) | [Fact]
FILE: test/dotnet-user-secrets.Tests/SetCommandTest.cs
class SetCommandTest (line 14) | public class SetCommandTest
method SetCommandTest (line 18) | public SetCommandTest(ITestOutputHelper output)
method SetsFromPipedInput (line 23) | [Fact]
method ParsesNestedObjects (line 48) | [Fact]
method OnlyPipesInIfNoArgs (line 76) | [Fact]
class TestSecretsStore (line 88) | private class TestSecretsStore : SecretsStore
method TestSecretsStore (line 90) | public TestSecretsStore(ITestOutputHelper output)
method Load (line 95) | protected override IDictionary<string, string> Load(string userSecre...
method Save (line 100) | public override void Save()
FILE: test/dotnet-user-secrets.Tests/TemporaryFileProvider.cs
class TemporaryFileProvider (line 10) | internal class TemporaryFileProvider : IDisposable
method TemporaryFileProvider (line 12) | public TemporaryFileProvider()
method Add (line 19) | public void Add(string filename, string contents)
method Dispose (line 24) | public void Dispose()
FILE: test/dotnet-user-secrets.Tests/UserSecretsTestFixture.cs
class UserSecretsTestFixture (line 10) | public class UserSecretsTestFixture : IDisposable
method UserSecretsTestFixture (line 16) | public UserSecretsTestFixture()
method Dispose (line 21) | public void Dispose()
method GetTempSecretProject (line 29) | public string GetTempSecretProject()
method GetTempSecretProject (line 48) | public string GetTempSecretProject(out string userSecretsId)
method CreateProject (line 54) | public string CreateProject(string userSecretsId)
method TryDelete (line 81) | private static void TryDelete(string directory)
FILE: test/dotnet-watch.FunctionalTests/AppWithDepsTests.cs
class AppWithDepsTests (line 13) | public class AppWithDepsTests : IDisposable
method AppWithDepsTests (line 17) | public AppWithDepsTests(ITestOutputHelper logger)
method ChangeFileInDependency (line 22) | [Fact]
method Dispose (line 34) | public void Dispose()
class AppWithDeps (line 39) | private class AppWithDeps : WatchableApp
method AppWithDeps (line 43) | public AppWithDeps(ITestOutputHelper logger)
FILE: test/dotnet-watch.FunctionalTests/AwaitableProcess.cs
class AwaitableProcess (line 16) | public class AwaitableProcess : IDisposable
method AwaitableProcess (line 25) | public AwaitableProcess(ProcessSpec spec, ITestOutputHelper logger)
method Start (line 40) | public void Start()
method GetOutputLineAsync (line 80) | public async Task<string> GetOutputLineAsync(string message, TimeSpan ...
method GetOutputLineStartsWithAsync (line 88) | public async Task<string> GetOutputLineStartsWithAsync(string message,...
method GetOutputLineAsync (line 96) | private async Task<string> GetOutputLineAsync(string predicateName, Pr...
method GetAllOutputLinesAsync (line 116) | public async Task<IList<string>> GetAllOutputLinesAsync(CancellationTo...
method OnData (line 131) | private void OnData(object sender, DataReceivedEventArgs args)
method OnExit (line 138) | private void OnExit(object sender, EventArgs args)
method Dispose (line 147) | public void Dispose()
FILE: test/dotnet-watch.FunctionalTests/DotNetWatcherTests.cs
class DotNetWatcherTests (line 14) | public class DotNetWatcherTests : IDisposable
method DotNetWatcherTests (line 19) | public DotNetWatcherTests(ITestOutputHelper logger)
method RunsWithDotnetWatchEnvVariable (line 25) | [Fact]
method RunsWithIterationEnvVariable (line 37) | [Fact]
method Dispose (line 68) | public void Dispose()
class KitchenSinkApp (line 73) | private class KitchenSinkApp : WatchableApp
method KitchenSinkApp (line 75) | public KitchenSinkApp(ITestOutputHelper logger)
FILE: test/dotnet-watch.FunctionalTests/FileWatcherTests.cs
class FileWatcherTests (line 15) | public class FileWatcherTests
method FileWatcherTests (line 17) | public FileWatcherTests(ITestOutputHelper output)
method NewFile (line 25) | [Theory]
method ChangeFile (line 53) | [Theory]
method MoveFile (line 93) | [Theory]
method FileInSubdirectory (line 136) | [Fact]
method NoNotificationIfDisabled (line 181) | [Theory]
method DisposedNoEvents (line 209) | [Theory]
method MultipleFiles (line 237) | [Theory]
method MultipleTriggers (line 282) | [Theory]
method AssertFileChangeRaisesEvent (line 305) | private void AssertFileChangeRaisesEvent(string directory, IFileSystem...
method DeleteSubfolder (line 348) | [Theory]
method UsingTempDirectory (line 399) | private static void UsingTempDirectory(Action<string> action)
FILE: test/dotnet-watch.FunctionalTests/GlobbingAppTests.cs
class GlobbingAppTests (line 15) | public class GlobbingAppTests : IDisposable
method GlobbingAppTests (line 18) | public GlobbingAppTests(ITestOutputHelper logger)
method ChangeCompiledFile (line 23) | [Theory]
method DeleteCompiledFile (line 43) | [Fact]
method DeleteSourceFolder (line 59) | [Fact]
method RenameCompiledFile (line 75) | [Fact]
method ChangeExcludedFile (line 87) | [Fact]
method ListsFiles (line 100) | [Fact]
method Dispose (line 121) | public void Dispose()
class GlobbingApp (line 126) | private class GlobbingApp : WatchableApp
method GlobbingApp (line 128) | public GlobbingApp(ITestOutputHelper logger)
method GetCompiledAppDefinedTypes (line 133) | public async Task<int> GetCompiledAppDefinedTypes()
FILE: test/dotnet-watch.FunctionalTests/NoDepsAppTests.cs
class NoDepsAppTests (line 13) | public class NoDepsAppTests : IDisposable
method NoDepsAppTests (line 20) | public NoDepsAppTests(ITestOutputHelper logger)
method RestartProcessOnFileChange (line 26) | [Fact]
method RestartProcessThatTerminatesAfterFileChange (line 44) | [Fact]
method Dispose (line 71) | public void Dispose()
FILE: test/dotnet-watch.FunctionalTests/Scenario/ProjectToolScenario.cs
class ProjectToolScenario (line 18) | public class ProjectToolScenario : IDisposable
method ProjectToolScenario (line 23) | public ProjectToolScenario()
method ProjectToolScenario (line 28) | public ProjectToolScenario(ITestOutputHelper logger)
method AddTestProjectFolder (line 43) | public void AddTestProjectFolder(string projectName)
method RestoreAsync (line 62) | public Task RestoreAsync(string project)
method BuildAsync (line 68) | public Task BuildAsync(string project)
method ExecuteCommandAsync (line 74) | private async Task ExecuteCommandAsync(string project, TimeSpan timeou...
method CreateTestDirectory (line 144) | private void CreateTestDirectory()
method GetMetadata (line 161) | private string GetMetadata(string key)
method Dispose (line 170) | public void Dispose()
FILE: test/dotnet-watch.FunctionalTests/Scenario/WatchableApp.cs
class WatchableApp (line 15) | public class WatchableApp : IDisposable
method WatchableApp (line 29) | public WatchableApp(string appName, ITestOutputHelper logger)
method HasRestarted (line 44) | public Task HasRestarted()
method HasExited (line 47) | public async Task HasExited()
method IsWaitingForFileChange (line 53) | public async Task IsWaitingForFileChange()
method GetProcessIdentifier (line 60) | public async Task<string> GetProcessIdentifier()
method PrepareAsync (line 68) | public async Task PrepareAsync()
method Start (line 75) | public void Start(IEnumerable<string> arguments, [CallerMemberName] st...
method StartWatcherAsync (line 104) | public Task StartWatcherAsync([CallerMemberName] string name = null)
method StartWatcherAsync (line 107) | public async Task StartWatcherAsync(string[] arguments, [CallerMemberN...
method Dispose (line 122) | public virtual void Dispose()
FILE: test/dotnet-watch.FunctionalTests/TestProjects/AppWithDeps/Program.cs
class Program (line 10) | public class Program
method Main (line 14) | public static void Main(string[] args)
FILE: test/dotnet-watch.FunctionalTests/TestProjects/Dependency/Foo.cs
class Foo (line 6) | public class Foo
FILE: test/dotnet-watch.FunctionalTests/TestProjects/GlobbingApp/Program.cs
class Program (line 12) | public class Program
method Main (line 14) | public static void Main(string[] args)
FILE: test/dotnet-watch.FunctionalTests/TestProjects/GlobbingApp/include/Foo.cs
class Foo (line 6) | public class Foo
FILE: test/dotnet-watch.FunctionalTests/TestProjects/KitchenSink/Program.cs
class Program (line 9) | class Program
method Main (line 11) | static void Main(string[] args)
FILE: test/dotnet-watch.FunctionalTests/TestProjects/NoDepsApp/Program.cs
class Program (line 10) | public class Program
method Main (line 12) | public static void Main(string[] args)
FILE: test/dotnet-watch.Tests/AssertEx.cs
class AssertEx (line 13) | public static class AssertEx
method EqualFileList (line 15) | public static void EqualFileList(string root, IEnumerable<string> expe...
method EqualFileList (line 21) | public static void EqualFileList(IEnumerable<string> expectedFiles, IE...
FILE: test/dotnet-watch.Tests/CommandLineOptionsTests.cs
class CommandLineOptionsTests (line 14) | public class CommandLineOptionsTests
method CommandLineOptionsTests (line 19) | public CommandLineOptionsTests(ITestOutputHelper output)
method HelpArgs (line 27) | [Theory]
method ParsesRemainingArgs (line 42) | [Theory]
method CannotHaveQuietAndVerbose (line 56) | [Fact]
FILE: test/dotnet-watch.Tests/ConsoleReporterTests.cs
class ReporterTests (line 12) | public class ReporterTests
method WritesToStandardStreams (line 16) | [Fact]
class TestConsole (line 41) | private class TestConsole : IConsole
method TestConsole (line 46) | public TestConsole()
method GetOutput (line 60) | public string GetOutput() => _out.ToString();
method GetError (line 61) | public string GetError() => _error.ToString();
method Clear (line 63) | public void Clear()
method ResetColor (line 69) | public void ResetColor()
FILE: test/dotnet-watch.Tests/MsBuildFileSetFactoryTest.cs
class MsBuildFileSetFactoryTest (line 19) | public class MsBuildFileSetFactoryTest : IDisposable
method MsBuildFileSetFactoryTest (line 23) | public MsBuildFileSetFactoryTest(ITestOutputHelper output)
method FindsCustomWatchItems (line 29) | [Fact]
method ExcludesDefaultItemsWithWatchFalseMetadata (line 55) | [Fact]
method SingleTfm (line 79) | [Fact]
method MultiTfm (line 112) | [Fact]
method ProjectReferences_OneLevel (line 142) | [Fact]
method TransitiveProjectReferences_TwoLevels (line 175) | [Fact]
method ProjectReferences_Graph (line 217) | [Fact]
method GetFileSet (line 273) | private Task<IFileSet> GetFileSet(TemporaryCSharpProject target)
method GetFileSet (line 276) | private async Task<IFileSet> GetFileSet(MsBuildFileSetFactory filesetF...
method Dispose (line 284) | public void Dispose()
FILE: test/dotnet-watch.Tests/ProgramTests.cs
class ProgramTests (line 15) | public class ProgramTests : IDisposable
method ProgramTests (line 20) | public ProgramTests(ITestOutputHelper output)
method ConsoleCancelKey (line 26) | [Fact]
method Dispose (line 52) | public void Dispose()
FILE: test/dotnet-watch.Tests/Utilities/TemporaryCSharpProject.cs
class TemporaryCSharpProject (line 11) | public class TemporaryCSharpProject
method TemporaryCSharpProject (line 29) | public TemporaryCSharpProject(string name, TemporaryDirectory directory)
method WithTargetFrameworks (line 39) | public TemporaryCSharpProject WithTargetFrameworks(params string[] tfms)
method WithProperty (line 53) | public TemporaryCSharpProject WithProperty(string name, string value)
method WithProperty (line 56) | public TemporaryCSharpProject WithProperty(PropertySpec property)
method WithItem (line 66) | public TemporaryCSharpProject WithItem(string itemName, string include...
method WithItem (line 69) | public TemporaryCSharpProject WithItem(ItemSpec item)
method WithProjectReference (line 84) | public TemporaryCSharpProject WithProjectReference(TemporaryCSharpProj...
method Dir (line 94) | public TemporaryDirectory Dir() => _directory;
method Create (line 96) | public void Create()
class ItemSpec (line 101) | public class ItemSpec
class PropertySpec (line 112) | public class PropertySpec
FILE: test/dotnet-watch.Tests/Utilities/TemporaryDirectory.cs
class TemporaryDirectory (line 10) | public class TemporaryDirectory : IDisposable
method TemporaryDirectory (line 17) | public TemporaryDirectory()
method TemporaryDirectory (line 22) | private TemporaryDirectory(string path, TemporaryDirectory parent)
method SubDir (line 28) | public TemporaryDirectory SubDir(string name)
method WithCSharpProject (line 37) | public TemporaryCSharpProject WithCSharpProject(string name)
method WithCSharpProject (line 44) | public TemporaryCSharpProject WithCSharpProject(string name, out Tempo...
method WithFile (line 50) | public TemporaryDirectory WithFile(string name, string contents = "")
method Up (line 56) | public TemporaryDirectory Up()
method Create (line 65) | public void Create()
method CreateFile (line 85) | public void CreateFile(string filename, string contents)
method Dispose (line 90) | public void Dispose()
FILE: test/dotnet-watch.Tests/Utilities/TestProjectGraph.cs
class TestProjectGraph (line 9) | public class TestProjectGraph
method TestProjectGraph (line 14) | public TestProjectGraph(TemporaryDirectory directory)
method OnCreate (line 19) | public void OnCreate(Action<TemporaryCSharpProject> onCreate)
method Find (line 24) | public TemporaryCSharpProject Find(string projectName)
method GetOrCreate (line 29) | public TemporaryCSharpProject GetOrCreate(string projectName)
FILE: tooling/Microsoft.VisualStudio.SecretManager.TestExtension/NotifyPropertyChanged.cs
class NotifyPropertyChanged (line 9) | public abstract class NotifyPropertyChanged : INotifyPropertyChanged
method OnPropertyChanged (line 13) | protected void OnPropertyChanged([CallerMemberName] string propertyNam...
FILE: tooling/Microsoft.VisualStudio.SecretManager.TestExtension/ProjectViewModel.cs
class ProjectViewModel (line 9) | public class ProjectViewModel : NotifyPropertyChanged
method ProjectViewModel (line 11) | public ProjectViewModel(UnconfiguredProject project)
FILE: tooling/Microsoft.VisualStudio.SecretManager.TestExtension/RelayCommand.cs
class RelayCommand (line 9) | public class RelayCommand<T> : ICommand
method RelayCommand (line 14) | public RelayCommand(Action<T> execute)
method RelayCommand (line 19) | public RelayCommand(Action<T> execute, Predicate<T> canExecute)
method CanExecute (line 28) | public bool CanExecute(object parameter)
method Execute (line 39) | public void Execute(object parameter)
FILE: tooling/Microsoft.VisualStudio.SecretManager.TestExtension/SecretManagerTestCommand.cs
class SecretManagerTestCommand (line 11) | internal sealed class SecretManagerTestCommand
method SecretManagerTestCommand (line 33) | private SecretManagerTestCommand(Package package)
method Initialize (line 75) | public static void Initialize(Package package)
method ShowToolWindow (line 85) | private void ShowToolWindow(object sender, EventArgs e)
FILE: tooling/Microsoft.VisualStudio.SecretManager.TestExtension/SecretManagerTestControl.xaml.cs
class SecretManagerTestControl (line 13) | public partial class SecretManagerTestControl : UserControl
method SecretManagerTestControl (line 18) | public SecretManagerTestControl()
method button1_Click (line 28) | [SuppressMessage("Microsoft.Globalization", "CA1300:SpecifyMessageBoxO...
FILE: tooling/Microsoft.VisualStudio.SecretManager.TestExtension/SecretManagerTestPackage.cs
class SecretManagerTestPackage (line 11) | [PackageRegistration(UseManagedResourcesOnly = true)]
method Initialize (line 21) | protected override void Initialize()
FILE: tooling/Microsoft.VisualStudio.SecretManager.TestExtension/SecretManagerTestWindow.cs
class SecretManagerTestWindow (line 12) | [Guid("6afffd63-17b6-4ef2-b515-fee22d767631")]
method SecretManagerTestWindow (line 15) | public SecretManagerTestWindow()
method Initialize (line 22) | protected override void Initialize()
FILE: tooling/Microsoft.VisualStudio.SecretManager.TestExtension/SecretManagerViewModel.cs
class SecretManagerViewModel (line 20) | public class SecretManagerViewModel : NotifyPropertyChanged
method SecretManagerViewModel (line 28) | public SecretManagerViewModel(IProjectService projectService)
method RefreshIsEnabled (line 97) | private bool RefreshIsEnabled(object obj) => IsLoaded || SelectedProje...
method Refresh (line 99) | private void Refresh(object obj)
method IsProjectLoaded (line 109) | private bool IsProjectLoaded(object obj) => IsLoaded && SelectedProjec...
method Add (line 111) | private void Add(object obj)
method Save (line 116) | private async void Save(object obj)
method OnSelectedProjectChanged (line 155) | private async void OnSelectedProjectChanged()
FILE: tooling/Microsoft.VisualStudio.SecretManager/ProjectLocalSecretsManager.cs
class ProjectLocalSecretsManager (line 17) | internal class ProjectLocalSecretsManager : Shell.IVsProjectSecrets, She...
method ProjectLocalSecretsManager (line 25) | public ProjectLocalSecretsManager(IProjectPropertiesProvider propertie...
method SanitizeName (line 32) | public string SanitizeName(string name) => name;
method GetInvalidCharactersFrom (line 34) | public IReadOnlyCollection<char> GetInvalidCharactersFrom(string name)...
method AddSecretAsync (line 36) | public async Task AddSecretAsync(string name, string value, Cancellati...
method SetSecretAsync (line 54) | public async Task SetSecretAsync(string name, string value, Cancellati...
method GetSecretAsync (line 67) | public async Task<string> GetSecretAsync(string name, CancellationToke...
method GetSecretNamesAsync (line 79) | public async Task<IReadOnlyCollection<string>> GetSecretNamesAsync(Can...
method GetSecretsAsync (line 91) | public async Task<IReadOnlyDictionary<string, string>> GetSecretsAsync...
method RemoveSecretAsync (line 102) | public async Task<bool> RemoveSecretAsync(string name, CancellationTok...
method EnsureKeyNameIsValid (line 120) | private void EnsureKeyNameIsValid(string name)
method GetOrCreateStoreAsync (line 133) | private async Task<SecretStore> GetOrCreateStoreAsync(CancellationToke...
FILE: tooling/Microsoft.VisualStudio.SecretManager/Resources.Designer.cs
class Resources (line 8) | internal static class Resources
method FormatCommon_StringNullOrEmpty (line 32) | internal static string FormatCommon_StringNullOrEmpty()
method FormatError_Invalid_Character_In_UserSecrets_Id (line 46) | internal static string FormatError_Invalid_Character_In_UserSecrets_Id...
method FormatError_Missing_UserSecretsIdAttribute (line 64) | internal static string FormatError_Missing_UserSecretsIdAttribute(obje...
method FormatError_InvalidFilePath (line 78) | internal static string FormatError_InvalidFilePath()
method FormatError_JSONParseError (line 92) | internal static string FormatError_JSONParseError(object p0, object p1)
method FormatError_KeyIsDuplicated (line 106) | internal static string FormatError_KeyIsDuplicated(object p0)
method FormatError_UnsupportedJSONToken (line 120) | internal static string FormatError_UnsupportedJSONToken(object p0, obj...
method GetString (line 123) | private static string GetString(string name, params string[] formatter...
FILE: tooling/Microsoft.VisualStudio.SecretManager/SecretManagerFactory.cs
class SecretManagerFactory (line 11) | internal class SecretManagerFactory
method SecretManagerFactory (line 19) | [ImportingConstructor]
FILE: tooling/Microsoft.VisualStudio.SecretManager/SecretStore.cs
class SecretStore (line 24) | internal class SecretStore : IDisposable
method SecretStore (line 32) | public SecretStore(string userSecretsId)
method ContainsKey (line 57) | public bool ContainsKey(string key)
method Get (line 64) | public string Get(string name)
method Set (line 71) | public void Set(string key, string value)
method Remove (line 79) | public bool Remove(string key)
method LoadAsync (line 86) | public async Task LoadAsync(CancellationToken cancellationToken)
method SaveAsync (line 103) | public async Task SaveAsync(CancellationToken cancellationToken)
method EnsureNotDisposed (line 121) | private void EnsureNotDisposed()
method Stringify (line 129) | private static string Stringify(Dictionary<string, string> secrets)
method DeserializeJson (line 143) | private static Dictionary<string, string> DeserializeJson(string text)
method Dispose (line 163) | public void Dispose()
FILE: tooling/Microsoft.VisualStudio.SecretManager/Sources/ConfigurationPath.cs
class ConfigurationPath (line 12) | internal static class ConfigurationPath
method Combine (line 24) | public static string Combine(params string[] pathSegments)
method Combine (line 38) | public static string Combine(IEnumerable<string> pathSegments)
method GetSectionKey (line 52) | public static string GetSectionKey(string path)
method GetParentPath (line 68) | public static string GetParentPath(string path)
FILE: tooling/Microsoft.VisualStudio.SecretManager/Sources/JsonConfigurationFileParser.cs
class JsonConfigurationFileParser (line 15) | internal class JsonConfigurationFileParser
method JsonConfigurationFileParser (line 17) | private JsonConfigurationFileParser() { }
method Parse (line 25) | public static IDictionary<string, string> Parse(Stream input)
method ParseStream (line 28) | private IDictionary<string, string> ParseStream(Stream input)
method VisitJObject (line 41) | private void VisitJObject(JObject jObject)
method VisitProperty (line 51) | private void VisitProperty(JProperty property)
method VisitToken (line 56) | private void VisitToken(JToken token)
method VisitArray (line 87) | private void VisitArray(JArray array)
method VisitPrimitive (line 97) | private void VisitPrimitive(JValue data)
method EnterContext (line 108) | private void EnterContext(string context)
method ExitContext (line 114) | private void ExitContext()
FILE: tooling/Microsoft.VisualStudio.SecretManager/Sources/PathHelper.cs
class PathHelper (line 13) | internal class PathHelper
method GetSecretsPathFromSecretsId (line 27) | public static string GetSecretsPathFromSecretsId(string userSecretsId)
Condensed preview — 282 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (789K chars).
[
{
"path": ".appveyor.yml",
"chars": 327,
"preview": "init:\n- git config --global core.autocrlf true\nbranches:\n only:\n - master\n - /^release\\/.*$/\n - /^(.*\\/)?ci-.*$/\nbui"
},
{
"path": ".editorconfig",
"chars": 419,
"preview": "# EditorConfig is awesome:http://EditorConfig.org\n\n# top-most EditorConfig file\nroot = true\n\n[*]\nindent_style = space\nc"
},
{
"path": ".gitattributes",
"chars": 863,
"preview": "*.doc diff=astextplain\n*.DOC\tdiff=astextplain\n*.docx\tdiff=astextplain\n*.DOCX\tdiff=astextplain\n*.dot\tdiff=astextplain\n*."
},
{
"path": ".gitignore",
"chars": 393,
"preview": "[Oo]bj/\n[Bb]in/\nTestResults/\n.nuget/\n_ReSharper.*/\npackages/\nartifacts/\nPublishProfiles/\n*.user\n*.suo\n*.cache\n*.docstate"
},
{
"path": ".travis.yml",
"chars": 564,
"preview": "language: csharp\nsudo: false\ndist: trusty\nenv:\n global:\n - DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true\n - DOTNET_CLI_TELE"
},
{
"path": ".vsts-pipelines/builds/ci-internal.yml",
"chars": 227,
"preview": "trigger:\n- master\n- release/*\n\nresources:\n repositories:\n - repository: buildtools\n type: git\n name: aspnet-Buil"
},
{
"path": ".vsts-pipelines/builds/ci-public.yml",
"chars": 316,
"preview": "trigger:\n- master\n- release/*\n\n# See https://github.com/aspnet/BuildTools\nresources:\n repositories:\n - repository: bui"
},
{
"path": "CONTRIBUTING.md",
"chars": 171,
"preview": "Contributing\n======\n\nInformation on contributing to this repo is in the [Contributing Guide](https://github.com/aspnet/H"
},
{
"path": "Directory.Build.props",
"chars": 1215,
"preview": "<Project>\n <Import\n Project=\"$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), AspNetCoreSetting"
},
{
"path": "Directory.Build.targets",
"chars": 518,
"preview": "<Project>\n <PropertyGroup>\n <RuntimeFrameworkVersion Condition=\" '$(TargetFramework)' == 'netcoreapp3.0' \">$(Microso"
},
{
"path": "DotNetTools.sln",
"chars": 15515,
"preview": "Microsoft Visual Studio Solution File, Format Version 12.00\r\n# Visual Studio 15\r\nVisualStudioVersion = 15.0.27120.0\r\nMin"
},
{
"path": "LICENSE.txt",
"chars": 11361,
"preview": " Apache License\n Version 2.0, January 2004\n "
},
{
"path": "NuGet.config",
"chars": 197,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<configuration>\n <packageSources>\n <clear />\n <!-- Restore sources should"
},
{
"path": "NuGetPackageVerifier.json",
"chars": 862,
"preview": "{\r\n \"adx\": {\r\n \"rules\": [\r\n \"AdxVerificationCompositeRule\"\r\n ],\r\n \"packages\": {\r\n \"dotnet-watch\": {\r"
},
{
"path": "README.md",
"chars": 1350,
"preview": "DotNetTools [Archived]\n======================\n\n**This GitHub project has been archived.** Ongoing development on this pr"
},
{
"path": "build/VSIX.props",
"chars": 450,
"preview": "<!--\nWorkaround for https://github.com/dotnet/project-system/issues/2129 - VS does not support using MSBuild variables f"
},
{
"path": "build/VSIX.targets",
"chars": 5232,
"preview": "<Project>\n <PropertyGroup>\n <!-- Don't build the VSIX by default in this branch anymore. You can still build the f"
},
{
"path": "build/dependencies.props",
"chars": 2028,
"preview": "<Project>\n <PropertyGroup>\n <MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProject"
},
{
"path": "build/repo.props",
"chars": 491,
"preview": "<Project>\n <Import Project=\"dependencies.props\" />\n\n <ItemGroup>\n <DotNetCoreRuntime Include=\"$(MicrosoftNETCoreApp"
},
{
"path": "build/repo.targets",
"chars": 392,
"preview": "<Project>\n <Import Project=\"VSIX.targets\" />\n\n <ItemGroup>\n <Solutions Update=\"$(RepositoryRoot)DotNetTools.sln\">\n "
},
{
"path": "build/sources.props",
"chars": 882,
"preview": "<Project>\n <Import Project=\"$(DotNetRestoreSourcePropsPath)\" Condition=\"'$(DotNetRestoreSourcePropsPath)' != ''\"/>\n\n <"
},
{
"path": "build.cmd",
"chars": 260,
"preview": "@ECHO OFF\nPowerShell -NoProfile -NoLogo -ExecutionPolicy unrestricted -Command \"[System.Threading.Thread]::CurrentThread"
},
{
"path": "build.sh",
"chars": 253,
"preview": "#!/usr/bin/env bash\n\nset -euo pipefail\nDIR=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" && pwd )\"\n\n# Call \"sync\" between \"c"
},
{
"path": "korebuild-lock.txt",
"chars": 86,
"preview": "version:3.0.0-alpha1-20181026.5\r\ncommithash:0c0410ef8b17d5177a05b50cb66f9ad89ce15e32\r\n"
},
{
"path": "korebuild.json",
"chars": 391,
"preview": "{\n \"$schema\": \"https://raw.githubusercontent.com/aspnet/BuildTools/master/tools/korebuild.schema.json\",\n \"channel\": \"m"
},
{
"path": "run.cmd",
"chars": 246,
"preview": "@ECHO OFF\nPowerShell -NoProfile -NoLogo -ExecutionPolicy unrestricted -Command \"[System.Threading.Thread]::CurrentThread"
},
{
"path": "run.ps1",
"chars": 6678,
"preview": "#!/usr/bin/env powershell\n#requires -version 4\n\n<#\n.SYNOPSIS\nExecutes KoreBuild commands.\n\n.DESCRIPTION\nDownloads korebu"
},
{
"path": "run.sh",
"chars": 9057,
"preview": "#!/usr/bin/env bash\n\nset -euo pipefail\n\n#\n# variables\n#\n\nRESET=\"\\033[0m\"\nRED=\"\\033[0;31m\"\nYELLOW=\"\\033[0;33m\"\nMAGENTA=\"\\"
},
{
"path": "samples/dotnet-watch/Directory.Build.props",
"chars": 65,
"preview": "<!-- Intentionally empty to isolate the samples. -->\n<Project />\n"
},
{
"path": "samples/dotnet-watch/Directory.Build.targets",
"chars": 65,
"preview": "<!-- Intentionally empty to isolate the samples. -->\n<Project />\n"
},
{
"path": "samples/dotnet-watch/LaunchAnyCommand/LaunchAnyCommand.csproj",
"chars": 287,
"preview": "<Project Sdk=\"Microsoft.NET.Sdk\">\n <PropertyGroup>\n <TargetFramework>netcoreapp3.0</TargetFramework>\n </PropertyGro"
},
{
"path": "samples/dotnet-watch/LaunchAnyCommand/README.md",
"chars": 442,
"preview": "Launch any command with dotnet-watch\n====================================\n\n## Prerequisites\n\n1. Install .NET Core comman"
},
{
"path": "samples/dotnet-watch/LaunchAnyCommand/package.json",
"chars": 123,
"preview": "{\n \"name\": \"any-command\",\n \"version\": \"0.0.0\",\n \"private\": true,\n \"scripts\": {\n \"custom\": \"node say-hello.js\"\n }"
},
{
"path": "samples/dotnet-watch/LaunchAnyCommand/say-hello.js",
"chars": 38,
"preview": "console.log(\"Hello from Javascript\");\n"
},
{
"path": "samples/dotnet-watch/README.md",
"chars": 251,
"preview": "dotnet-watch samples\n====================\n\nThe samples in this folder show some ways to customize dotnet-watch. For full"
},
{
"path": "samples/dotnet-watch/WatchJavascriptFiles/Program.cs",
"chars": 823,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.t"
},
{
"path": "samples/dotnet-watch/WatchJavascriptFiles/README.md",
"chars": 371,
"preview": "Watch JavaScript files with dotnet-watch\n========================================\n\n## Prerequisites\n\nInstall .NET Core c"
},
{
"path": "samples/dotnet-watch/WatchJavascriptFiles/WatchJavascriptFiles.csproj",
"chars": 386,
"preview": "<Project Sdk=\"Microsoft.NET.Sdk.Web\">\n\n <PropertyGroup>\n <TargetFramework>netcoreapp3.0</TargetFramework>\n </Proper"
},
{
"path": "samples/dotnet-watch/WatchJavascriptFiles/wwwroot/app.js",
"chars": 39,
"preview": "document.title = \"My awesome website\";\n"
},
{
"path": "samples/dotnet-watch/WatchMultipleProjects/README.md",
"chars": 574,
"preview": "Watch multiple projects with dotnet-watch\n=========================================\n\n## Prerequisites\n\nInstall .NET Core"
},
{
"path": "samples/dotnet-watch/WatchMultipleProjects/Test/Test.csproj",
"chars": 376,
"preview": "<Project Sdk=\"Microsoft.NET.Sdk\">\n\n <PropertyGroup>\n <TargetFramework>netcoreapp3.0</TargetFramework>\n </PropertyGr"
},
{
"path": "samples/dotnet-watch/WatchMultipleProjects/Test/UnitTest1.cs",
"chars": 348,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "samples/dotnet-watch/WatchMultipleProjects/Web/Program.cs",
"chars": 806,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.t"
},
{
"path": "samples/dotnet-watch/WatchMultipleProjects/Web/Web.csproj",
"chars": 307,
"preview": "<Project Sdk=\"Microsoft.NET.Sdk.Web\">\n\n <PropertyGroup>\n <TargetFramework>netcoreapp3.0</TargetFramework>\n </Proper"
},
{
"path": "samples/dotnet-watch/WatchMultipleProjects/watch.csproj",
"chars": 479,
"preview": "<Project Sdk=\"Microsoft.NET.Sdk\">\n <PropertyGroup>\n <TargetFramework>netcoreapp3.0</TargetFramework>\n <EnableDefa"
},
{
"path": "shared/CliContext.cs",
"chars": 620,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "shared/CommandLineApplicationExtensions.cs",
"chars": 1459,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "shared/ConsoleReporter.cs",
"chars": 1984,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "shared/DebugHelper.cs",
"chars": 835,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "shared/Ensure.cs",
"chars": 818,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.t"
},
{
"path": "shared/IConsole.cs",
"chars": 645,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.t"
},
{
"path": "shared/IReporter.cs",
"chars": 407,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.t"
},
{
"path": "shared/NullReporter.cs",
"chars": 611,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "shared/PhysicalConsole.cs",
"chars": 1189,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.t"
},
{
"path": "src/Directory.Build.props",
"chars": 227,
"preview": "<Project>\n <Import Project=\"..\\Directory.Build.props\" />\n\n <ItemGroup>\n <PackageReference Include=\"Internal.AspNetC"
},
{
"path": "src/Directory.Build.targets",
"chars": 189,
"preview": "<Project>\n <Import Project=\"..\\Directory.Build.targets\" />\n\n <Target Name=\"CleanPublishDir\" AfterTargets=\"CoreClean\">\n"
},
{
"path": "src/Microsoft.AspNetCore.DeveloperCertificates.XPlat/CertificateGenerator.cs",
"chars": 448,
"preview": "using System;\nusing Microsoft.AspNetCore.Certificates.Generation;\n\nnamespace Microsoft.AspNetCore.DeveloperCertificates."
},
{
"path": "src/Microsoft.AspNetCore.DeveloperCertificates.XPlat/Microsoft.AspNetCore.DeveloperCertificates.XPlat.csproj",
"chars": 530,
"preview": "<Project Sdk=\"Microsoft.NET.Sdk\">\n\n <PropertyGroup>\n <TargetFramework>netcoreapp3.0</TargetFramework>\n <Descripti"
},
{
"path": "src/Microsoft.HttpRepl/AggregateDirectoryStructure.cs",
"chars": 1409,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.HttpRepl/Commands/BaseHttpCommand.cs",
"chars": 29325,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.HttpRepl/Commands/ChangeDirectoryCommand.cs",
"chars": 3915,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.HttpRepl/Commands/ClearCommand.cs",
"chars": 2806,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.HttpRepl/Commands/ConfigCommand.cs",
"chars": 3211,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.HttpRepl/Commands/DeleteCommand.cs",
"chars": 379,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.HttpRepl/Commands/EchoCommand.cs",
"chars": 3093,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.HttpRepl/Commands/ExitCommand.cs",
"chars": 1575,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.HttpRepl/Commands/Formatter.cs",
"chars": 826,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.HttpRepl/Commands/GetCommand.cs",
"chars": 373,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.HttpRepl/Commands/HeadCommand.cs",
"chars": 375,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.HttpRepl/Commands/HelpCommand.cs",
"chars": 14193,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.HttpRepl/Commands/ListCommand.cs",
"chars": 7385,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.HttpRepl/Commands/OptionsCommand.cs",
"chars": 381,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.HttpRepl/Commands/PatchCommand.cs",
"chars": 376,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.HttpRepl/Commands/PostCommand.cs",
"chars": 374,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.HttpRepl/Commands/PrefCommand.cs",
"chars": 9314,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.HttpRepl/Commands/PutCommand.cs",
"chars": 372,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.HttpRepl/Commands/RunCommand.cs",
"chars": 3749,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.HttpRepl/Commands/SetBaseCommand.cs",
"chars": 5730,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.HttpRepl/Commands/SetDiagCommand.cs",
"chars": 6616,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.HttpRepl/Commands/SetHeaderCommand.cs",
"chars": 4362,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.HttpRepl/Commands/SetSwaggerCommand.cs",
"chars": 10762,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.HttpRepl/Commands/TreeNode.cs",
"chars": 1515,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.HttpRepl/Commands/UICommand.cs",
"chars": 3112,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.HttpRepl/Diagnostics/ConfigItem.cs",
"chars": 336,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.HttpRepl/Diagnostics/DiagEndpoint.cs",
"chars": 404,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.HttpRepl/Diagnostics/DiagEndpointMetadata.cs",
"chars": 394,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.HttpRepl/Diagnostics/DiagItem.cs",
"chars": 389,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.HttpRepl/Diagnostics/DiagnosticsState.cs",
"chars": 502,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.HttpRepl/DirectoryStructure.cs",
"chars": 4561,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.HttpRepl/DirectoryStructureExtensions.cs",
"chars": 1740,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.HttpRepl/Formatting/JsonVisitor.cs",
"chars": 4719,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.HttpRepl/HttpState.cs",
"chars": 12870,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.HttpRepl/IDirectoryStructure.cs",
"chars": 490,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.HttpRepl/IRequestInfo.cs",
"chars": 504,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.HttpRepl/Microsoft.HttpRepl.csproj",
"chars": 1744,
"preview": "<Project Sdk=\"Microsoft.NET.Sdk\">\n\n <PropertyGroup>\n <OutputType>Exe</OutputType>\n <TargetFramework>netcoreapp3."
},
{
"path": "src/Microsoft.HttpRepl/OpenApi/Either.cs",
"chars": 957,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.HttpRepl/OpenApi/EitherConverter.cs",
"chars": 1268,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.HttpRepl/OpenApi/EndpointMetadata.cs",
"chars": 805,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.HttpRepl/OpenApi/EndpointMetadataReader.cs",
"chars": 1225,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.HttpRepl/OpenApi/IEndpointMetadataReader.cs",
"chars": 442,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.HttpRepl/OpenApi/OpenApiV3EndpointMetadataReader.cs",
"chars": 4752,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.HttpRepl/OpenApi/Parameter.cs",
"chars": 425,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.HttpRepl/OpenApi/PointerUtil.cs",
"chars": 6707,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.HttpRepl/OpenApi/Schema.cs",
"chars": 3456,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.HttpRepl/OpenApi/SwaggerV1EndpointMetadataReader.cs",
"chars": 4816,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.HttpRepl/OpenApi/SwaggerV2EndpointMetadataReader.cs",
"chars": 3800,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.HttpRepl/Preferences/IJsonConfig.cs",
"chars": 780,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.HttpRepl/Preferences/JsonConfig.cs",
"chars": 2218,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.HttpRepl/Preferences/RequestConfig.cs",
"chars": 2951,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.HttpRepl/Preferences/RequestOrResponseConfig.cs",
"chars": 2505,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.HttpRepl/Preferences/ResponseConfig.cs",
"chars": 2716,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.HttpRepl/Preferences/WellKnownPreference.cs",
"chars": 8277,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.HttpRepl/Program.cs",
"chars": 3890,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.HttpRepl/Properties/launchSettings.json",
"chars": 140,
"preview": "{\r\n \"profiles\": {\r\n \"Microsoft.HttpRepl\": {\r\n \"commandName\": \"Project\",\r\n \"commandLineArgs\": \"http://local"
},
{
"path": "src/Microsoft.HttpRepl/Suggestions/HeaderCompletion.cs",
"chars": 3104,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.HttpRepl/Suggestions/ServerPathCompletion.cs",
"chars": 1778,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.t"
},
{
"path": "src/Microsoft.Repl/Commanding/CommandHistory.cs",
"chars": 2003,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.Repl/Commanding/CommandInputLocation.cs",
"chars": 336,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.Repl/Commanding/CommandInputProcessingIssue.cs",
"chars": 528,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.Repl/Commanding/CommandInputProcessingIssueKind.cs",
"chars": 419,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.Repl/Commanding/CommandInputSpecification.cs",
"chars": 1555,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.Repl/Commanding/CommandInputSpecificationBuilder.cs",
"chars": 2342,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.Repl/Commanding/CommandOptionSpecification.cs",
"chars": 1106,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.Repl/Commanding/CommandWithStructuredInputBase.cs",
"chars": 9478,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.Repl/Commanding/DefaultCommandDispatcher.cs",
"chars": 7033,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.Repl/Commanding/DefaultCommandInput.cs",
"chars": 9931,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.Repl/Commanding/ICommand.cs",
"chars": 1007,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.t"
},
{
"path": "src/Microsoft.Repl/Commanding/ICommandDispatcher.cs",
"chars": 861,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.Repl/Commanding/ICommandHistory.cs",
"chars": 425,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.t"
},
{
"path": "src/Microsoft.Repl/Commanding/InputElement.cs",
"chars": 1026,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.Repl/ConsoleHandling/AllowedColors.cs",
"chars": 769,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.Repl/ConsoleHandling/AnsiColorExtensions.cs",
"chars": 2431,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.Repl/ConsoleHandling/AnsiConsole.cs",
"chars": 5293,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.Repl/ConsoleHandling/ConsoleManager.cs",
"chars": 6043,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.Repl/ConsoleHandling/IConsoleManager.cs",
"chars": 709,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.Repl/ConsoleHandling/IWritable.cs",
"chars": 420,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.Repl/ConsoleHandling/Point.cs",
"chars": 1353,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.t"
},
{
"path": "src/Microsoft.Repl/ConsoleHandling/Reporter.cs",
"chars": 3219,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.Repl/ConsoleHandling/Writable.cs",
"chars": 1342,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.Repl/Disposable.cs",
"chars": 999,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.Repl/IShellState.cs",
"chars": 666,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.Repl/Input/AsyncKeyPressHandler.cs",
"chars": 399,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.Repl/Input/IInputManager.cs",
"chars": 926,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.Repl/Input/InputManager.cs",
"chars": 14650,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.Repl/Input/KeyHandlers.cs",
"chars": 12521,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.Repl/Microsoft.Repl.csproj",
"chars": 292,
"preview": "<Project Sdk=\"Microsoft.NET.Sdk\">\n\n <PropertyGroup>\n <TargetFramework>netcoreapp3.0</TargetFramework>\n <Descript"
},
{
"path": "src/Microsoft.Repl/Parsing/CoreParseResult.cs",
"chars": 3324,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.Repl/Parsing/CoreParser.cs",
"chars": 5772,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.Repl/Parsing/ICoreParseResult.cs",
"chars": 702,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.Repl/Parsing/IParser.cs",
"chars": 459,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.t"
},
{
"path": "src/Microsoft.Repl/Scripting/IScriptExecutor.cs",
"chars": 474,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.t"
},
{
"path": "src/Microsoft.Repl/Scripting/ScriptExecutor.cs",
"chars": 1973,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.Repl/Shell.cs",
"chars": 1028,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.Repl/ShellState.cs",
"chars": 1290,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.Repl/Suggestions/FileSystemCompletion.cs",
"chars": 1828,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.Repl/Suggestions/ISuggestionManager.cs",
"chars": 373,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.t"
},
{
"path": "src/Microsoft.Repl/Suggestions/SuggestionManager.cs",
"chars": 4673,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/Microsoft.Repl/Utils.cs",
"chars": 406,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/dotnet-dev-certs/Program.cs",
"chars": 11398,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/dotnet-dev-certs/README.md",
"chars": 224,
"preview": "dotnet-dev-certs\n================\n\n`dotnet-dev-certs` is a command line tool to generate certificates used in ASP.NET Co"
},
{
"path": "src/dotnet-dev-certs/dotnet-dev-certs.csproj",
"chars": 1883,
"preview": "<Project Sdk=\"Microsoft.NET.Sdk\">\n\n <PropertyGroup>\n <TargetFramework>netcoreapp3.0</TargetFramework>\n <OutputTyp"
},
{
"path": "src/dotnet-sql-cache/Program.cs",
"chars": 6129,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/dotnet-sql-cache/README.md",
"chars": 257,
"preview": "dotnet-sql-cache\n================\n\n`dotnet-sql-cache` is a command line tool that creates table and indexes in Microsoft"
},
{
"path": "src/dotnet-sql-cache/SqlQueries.cs",
"chars": 2780,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/dotnet-sql-cache/dotnet-sql-cache.csproj",
"chars": 2898,
"preview": "<Project Sdk=\"Microsoft.NET.Sdk\">\n\n <PropertyGroup>\n <TargetFramework>netcoreapp3.0</TargetFramework>\n <OutputTyp"
},
{
"path": "src/dotnet-user-secrets/CommandLineOptions.cs",
"chars": 3060,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/dotnet-user-secrets/Internal/ClearCommand.cs",
"chars": 832,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/dotnet-user-secrets/Internal/CommandContext.cs",
"chars": 696,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.t"
},
{
"path": "src/dotnet-user-secrets/Internal/ICommand.cs",
"chars": 319,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/dotnet-user-secrets/Internal/InitCommand.cs",
"chars": 4551,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/dotnet-user-secrets/Internal/ListCommand.cs",
"chars": 2095,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/dotnet-user-secrets/Internal/MsBuildProjectFinder.cs",
"chars": 1833,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/dotnet-user-secrets/Internal/ProjectIdResolver.cs",
"chars": 4297,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/dotnet-user-secrets/Internal/ReadableJsonConfigurationSource.cs",
"chars": 591,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.t"
},
{
"path": "src/dotnet-user-secrets/Internal/RemoveCommand.cs",
"chars": 1488,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/dotnet-user-secrets/Internal/SecretsStore.cs",
"chars": 2726,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/dotnet-user-secrets/Internal/SetCommand.cs",
"chars": 3828,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/dotnet-user-secrets/Program.cs",
"chars": 3420,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/dotnet-user-secrets/Properties/AssemblyInfo.cs",
"chars": 621,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/dotnet-user-secrets/Properties/Resources.Designer.cs",
"chars": 10786,
"preview": "// <auto-generated />\nnamespace Microsoft.Extensions.SecretManager.Tools\n{\n using System.Globalization;\n using Sys"
},
{
"path": "src/dotnet-user-secrets/README.md",
"chars": 219,
"preview": "dotnet-user-secrets\n===================\n\n`dotnet-user-secrets` is a command line tool for managing the secrets in a user"
},
{
"path": "src/dotnet-user-secrets/Resources.resx",
"chars": 8356,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n <!-- \n Microsoft ResX Schema \n \n Version 2.0\n \n The prim"
},
{
"path": "src/dotnet-user-secrets/assets/SecretManager.targets",
"chars": 164,
"preview": "<Project>\n <Target Name=\"_ExtractUserSecretsMetadata\">\n <WriteLinesToFile File=\"$(_UserSecretsMetadataFile)\" Lines=\""
},
{
"path": "src/dotnet-user-secrets/dotnet-user-secrets.csproj",
"chars": 3497,
"preview": "<Project Sdk=\"Microsoft.NET.Sdk\">\n\n <PropertyGroup>\n <TargetFramework>netcoreapp3.0</TargetFramework>\n <OutputTy"
},
{
"path": "src/dotnet-watch/CommandLineOptions.cs",
"chars": 4433,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/dotnet-watch/DotNetWatcher.cs",
"chars": 4566,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/dotnet-watch/IFileSet.cs",
"chars": 347,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.t"
},
{
"path": "src/dotnet-watch/IFileSetFactory.cs",
"chars": 384,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.t"
},
{
"path": "src/dotnet-watch/Internal/FileSet.cs",
"chars": 817,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.t"
},
{
"path": "src/dotnet-watch/Internal/FileSetWatcher.cs",
"chars": 1585,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.t"
},
{
"path": "src/dotnet-watch/Internal/FileWatcher/DotnetFileWatcher.cs",
"chars": 5192,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.t"
},
{
"path": "src/dotnet-watch/Internal/FileWatcher/FileWatcherFactory.cs",
"chars": 754,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.t"
},
{
"path": "src/dotnet-watch/Internal/FileWatcher/IFileSystemWatcher.cs",
"chars": 477,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.t"
},
{
"path": "src/dotnet-watch/Internal/FileWatcher/PollingFileWatcher.cs",
"chars": 7071,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.t"
},
{
"path": "src/dotnet-watch/Internal/FileWatcher.cs",
"chars": 3976,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/dotnet-watch/Internal/MsBuildFileSetFactory.cs",
"chars": 6919,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/dotnet-watch/Internal/MsBuildProjectFinder.cs",
"chars": 1979,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.t"
},
{
"path": "src/dotnet-watch/Internal/OutputCapture.cs",
"chars": 474,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/dotnet-watch/Internal/OutputSink.cs",
"chars": 430,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
},
{
"path": "src/dotnet-watch/Internal/ProcessRunner.cs",
"chars": 6123,
"preview": "// Copyright (c) .NET Foundation. All rights reserved.\n// Licensed under the Apache License, Version 2.0. See License.tx"
}
]
// ... and 82 more files (download for full content)
About this extraction
This page contains the full source code of the aspnet/DotNetTools GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 282 files (724.4 KB), approximately 158.4k tokens, and a symbol index with 962 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.