├── .github └── workflows │ └── main.yml ├── .gitignore ├── .whitesource ├── DocumentationSources.bat ├── LICENSE ├── README.md ├── azure-pipelines.yml ├── docs ├── Author.md ├── Demo.md ├── FAQ.md ├── Web2CLI.pdf ├── index.html ├── packageList.md ├── packageListHeader.md ├── packageOutdated.md ├── packageOutdatedHeader.md └── sitedocs │ ├── api │ └── index.html │ ├── articles │ ├── intro.html │ └── toc.html │ ├── favicon.ico │ ├── fonts │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.svg │ ├── glyphicons-halflings-regular.ttf │ ├── glyphicons-halflings-regular.woff │ └── glyphicons-halflings-regular.woff2 │ ├── index.html │ ├── logo.svg │ ├── manifest.json │ ├── search-stopwords.json │ ├── styles │ ├── docfx.css │ ├── docfx.js │ ├── docfx.vendor.css │ ├── docfx.vendor.js │ ├── lunr.js │ ├── lunr.min.js │ ├── main.css │ ├── main.js │ └── search-worker.js │ ├── toc.html │ └── xrefmap.yml ├── externals ├── docfx.zip └── docfx │ ├── AutoMapper.dll │ ├── CommandLine.dll │ ├── Documentation │ ├── .gitignore │ ├── api │ │ ├── .gitignore │ │ └── index.md │ ├── articles │ │ ├── intro.md │ │ └── toc.yml │ ├── docfx.json │ ├── index.md │ └── toc.yml │ ├── DotLiquid.dll │ ├── Dotnet.ProjInfo.Helpers.dll │ ├── Dotnet.ProjInfo.dll │ ├── FSharp.Compiler.Service.MSBuild.v12.dll │ ├── FSharp.Compiler.Service.dll │ ├── FSharp.Core.dll │ ├── HtmlAgilityPack.dll │ ├── Jint.dll │ ├── Markdig.dll │ ├── Microsoft.Build.Locator.dll │ ├── Microsoft.CodeAnalysis.CSharp.Features.dll │ ├── Microsoft.CodeAnalysis.CSharp.Workspaces.dll │ ├── Microsoft.CodeAnalysis.CSharp.dll │ ├── Microsoft.CodeAnalysis.Features.dll │ ├── Microsoft.CodeAnalysis.FlowAnalysis.Utilities.dll │ ├── Microsoft.CodeAnalysis.VisualBasic.Features.dll │ ├── Microsoft.CodeAnalysis.VisualBasic.Workspaces.dll │ ├── Microsoft.CodeAnalysis.VisualBasic.dll │ ├── Microsoft.CodeAnalysis.Workspaces.MSBuild.dll │ ├── Microsoft.CodeAnalysis.Workspaces.dll │ ├── Microsoft.CodeAnalysis.dll │ ├── Microsoft.DiaSymReader.dll │ ├── Microsoft.DocAsCode.Build.Common.dll │ ├── Microsoft.DocAsCode.Build.ConceptualDocuments.dll │ ├── Microsoft.DocAsCode.Build.Engine.dll │ ├── Microsoft.DocAsCode.Build.ManagedReference.dll │ ├── Microsoft.DocAsCode.Build.OverwriteDocuments.dll │ ├── Microsoft.DocAsCode.Build.ResourceFiles.dll │ ├── Microsoft.DocAsCode.Build.RestApi.dll │ ├── Microsoft.DocAsCode.Build.SchemaDriven.dll │ ├── Microsoft.DocAsCode.Build.TableOfContents.dll │ ├── Microsoft.DocAsCode.Build.UniversalReference.dll │ ├── Microsoft.DocAsCode.Common.dll │ ├── Microsoft.DocAsCode.DataContracts.Common.dll │ ├── Microsoft.DocAsCode.DataContracts.ManagedReference.dll │ ├── Microsoft.DocAsCode.DataContracts.RestApi.dll │ ├── Microsoft.DocAsCode.DataContracts.UniversalReference.dll │ ├── Microsoft.DocAsCode.Dfm.dll │ ├── Microsoft.DocAsCode.Glob.dll │ ├── Microsoft.DocAsCode.HtmlToPdf.dll │ ├── Microsoft.DocAsCode.MarkdigEngine.Extensions.dll │ ├── Microsoft.DocAsCode.MarkdigEngine.Validators.dll │ ├── Microsoft.DocAsCode.MarkdigEngine.dll │ ├── Microsoft.DocAsCode.MarkdownLite.dll │ ├── Microsoft.DocAsCode.Metadata.ManagedReference.Common.dll │ ├── Microsoft.DocAsCode.Metadata.ManagedReference.FSharp.dll │ ├── Microsoft.DocAsCode.Metadata.ManagedReference.Roslyn.dll │ ├── Microsoft.DocAsCode.Metadata.ManagedReference.dll │ ├── Microsoft.DocAsCode.Plugins.dll │ ├── Microsoft.DocAsCode.YamlSerialization.dll │ ├── Microsoft.Owin.Diagnostics.dll │ ├── Microsoft.Owin.FileSystems.dll │ ├── Microsoft.Owin.Host.HttpListener.dll │ ├── Microsoft.Owin.Hosting.dll │ ├── Microsoft.Owin.StaticFiles.dll │ ├── Microsoft.Owin.dll │ ├── Microsoft.VisualStudio.RemoteControl.dll │ ├── Microsoft.VisualStudio.Utilities.Internal.dll │ ├── Newtonsoft.Json.Schema.dll │ ├── Newtonsoft.Json.dll │ ├── NuGet.Common.dll │ ├── NuGet.Configuration.dll │ ├── NuGet.DependencyResolver.Core.dll │ ├── NuGet.Frameworks.dll │ ├── NuGet.LibraryModel.dll │ ├── NuGet.Packaging.Core.Types.dll │ ├── NuGet.Packaging.Core.dll │ ├── NuGet.Packaging.dll │ ├── NuGet.ProjectModel.dll │ ├── NuGet.Protocol.dll │ ├── NuGet.Versioning.dll │ ├── Nustache.Core.dll │ ├── Owin.dll │ ├── SQLitePCLRaw.core.dll │ ├── System.Buffers.dll │ ├── System.Collections.Immutable.dll │ ├── System.Composition.AttributedModel.dll │ ├── System.Composition.Convention.dll │ ├── System.Composition.Hosting.dll │ ├── System.Composition.Runtime.dll │ ├── System.Composition.TypedParts.dll │ ├── System.Memory.dll │ ├── System.Numerics.Vectors.dll │ ├── System.Reflection.Metadata.dll │ ├── System.Runtime.CompilerServices.Unsafe.dll │ ├── System.Text.Encoding.CodePages.dll │ ├── System.Threading.Tasks.Dataflow.dll │ ├── System.Threading.Tasks.Extensions.dll │ ├── YamlDotNet.dll │ ├── docfx.exe │ ├── docfx.exe.config │ └── itextsharp.dll └── src ├── .config └── dotnet-tools.json ├── CLIExecute ├── CLICommandSerialize.cs ├── CLICommand_v1.cs ├── CLICommands.cs ├── CLIExecute.csproj ├── CLIExecute.xml ├── Dictionary.cs ├── Executor.cs ├── ICLICommand_v1.cs └── ReturnValue.cs ├── CLITests ├── CLITests.csproj ├── TestDefaultValue.cs ├── TestExecutorWithFakes.cs ├── TestMath.cs ├── TestRest.cs └── appsettingsEnableCLI.json ├── ExtensionNetCore3 ├── CLIAPIHostedService.cs ├── CLIExtension.cs ├── ExtensionNetCore3.csproj └── Properties │ └── launchSettings.json ├── TestWebAPISite ├── Controllers │ ├── MathAddController.cs │ ├── MyTestController.cs │ ├── SumArgs.cs │ └── WeatherForecastController.cs ├── Program.cs ├── Properties │ └── launchSettings.json ├── Startup.cs ├── TestWebAPISite.csproj ├── WeatherForecast.cs ├── appsettings.Development.json ├── appsettings.json └── cli.txt ├── WebAPI2CLI.sln ├── a.txt └── setVersion.ps1 /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | # This is a basic workflow to help you get started with Actions 2 | 3 | name: generateDocs 4 | 5 | # Controls when the action will run. Triggers the workflow on push or pull request 6 | # events but only for the master branch 7 | on: 8 | push: 9 | branches: [ master ] 10 | paths: 11 | - '**.md' 12 | - '**.yml' 13 | 14 | 15 | jobs: 16 | 17 | build: 18 | # The type of runner that the job will run on 19 | runs-on: ubuntu-latest 20 | needs: docs_csharp 21 | steps: 22 | # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it 23 | - uses: actions/checkout@v2 24 | - run: | 25 | echo generate help file 26 | mkdir output 27 | git pull 28 | 29 | - name: generate html 30 | uses: docker://pandoc/latex:2.9 31 | with: # needs a README in your repo root! 32 | #args: "--standalone --output=output/README.html README.md" 33 | args: "README.md docs/Demo.md docs/FAQ.md docs/Author.md docs/packageOutdated.md docs/packageList.md --standalone -f gfm -t html --toc -o output/output.html --metadata title=WebAPI2CLI" 34 | 35 | - name: generate pdf 36 | uses: docker://pandoc/latex:2.9 37 | with: # needs a README in your repo root! 38 | #args: "--standalone --output=output/README.html README.md" 39 | args: "README.md docs/Demo.md docs/FAQ.md docs/Author.md --standalone -f gfm -t pdf --toc -o output/output.pdf --metadata title=WebAPI2CLI" 40 | 41 | - run: | 42 | cp ./output/output.html ./docs/index.html 43 | cp ./output/output.pdf ./docs/Web2CLI.pdf 44 | rm -rf ./output 45 | 46 | - name: Commit files 47 | run: | 48 | git config --local user.email "action@github.com" 49 | git config --local user.name "GitHub Action" 50 | git commit -m "generate html" -a --allow-empty 51 | 52 | - name: Push changes 53 | uses: ad-m/github-push-action@master 54 | with: 55 | github_token: ${{ secrets.GITHUB_TOKEN }} 56 | 57 | 58 | docs_csharp: 59 | # The type of runner that the job will run on 60 | runs-on: windows-latest 61 | 62 | steps: 63 | # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it 64 | - uses: actions/checkout@v2 65 | 66 | - name: run list packages 67 | run: | 68 | dotnet restore src/WebAPI2CLI.sln 69 | dotnet list src/WebAPI2CLI.sln package > docs/packageList.md 70 | dotnet list src/WebAPI2CLI.sln package --outdated > docs/packageOutdated.md 71 | copy docs\packageListHeader.md+docs\packageList.md docs\packageList1.md 72 | move /Y docs\packageList1.md docs\packageList.md 73 | copy docs\packageOutdatedHeader.md+docs\packageOutdated.md docs\packageOutdated1.md 74 | move /Y docs\packageOutdated1.md docs\packageOutdated.md 75 | shell: cmd 76 | 77 | - name: run documentation 78 | run: | 79 | DocumentationSources.bat 80 | shell: cmd 81 | 82 | - name: run commit 83 | run: | 84 | git config --local user.email "action@github.com" 85 | git config --local user.name "GitHub Action" 86 | git commit -m "generate documentation sources" -a --allow-empty 87 | shell: cmd 88 | 89 | - name: Push changes 90 | uses: ad-m/github-push-action@master 91 | with: 92 | github_token: ${{ secrets.GITHUB_TOKEN }} 93 | 94 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.rsuser 8 | *.suo 9 | *.user 10 | *.userosscache 11 | *.sln.docstates 12 | 13 | # User-specific files (MonoDevelop/Xamarin Studio) 14 | *.userprefs 15 | 16 | # Mono auto generated files 17 | mono_crash.* 18 | 19 | # Build results 20 | [Dd]ebug/ 21 | [Dd]ebugPublic/ 22 | [Rr]elease/ 23 | [Rr]eleases/ 24 | x64/ 25 | x86/ 26 | [Aa][Rr][Mm]/ 27 | [Aa][Rr][Mm]64/ 28 | bld/ 29 | [Bb]in/ 30 | [Oo]bj/ 31 | [Ll]og/ 32 | [Ll]ogs/ 33 | 34 | # Visual Studio 2015/2017 cache/options directory 35 | .vs/ 36 | # Uncomment if you have tasks that create the project's static files in wwwroot 37 | #wwwroot/ 38 | 39 | # Visual Studio 2017 auto generated files 40 | Generated\ Files/ 41 | 42 | # MSTest test Results 43 | [Tt]est[Rr]esult*/ 44 | [Bb]uild[Ll]og.* 45 | 46 | # NUnit 47 | *.VisualState.xml 48 | TestResult.xml 49 | nunit-*.xml 50 | 51 | # Build Results of an ATL Project 52 | [Dd]ebugPS/ 53 | [Rr]eleasePS/ 54 | dlldata.c 55 | 56 | # Benchmark Results 57 | BenchmarkDotNet.Artifacts/ 58 | 59 | # .NET Core 60 | project.lock.json 61 | project.fragment.lock.json 62 | artifacts/ 63 | 64 | # StyleCop 65 | StyleCopReport.xml 66 | 67 | # Files built by Visual Studio 68 | *_i.c 69 | *_p.c 70 | *_h.h 71 | *.ilk 72 | *.meta 73 | *.obj 74 | *.iobj 75 | *.pch 76 | *.pdb 77 | *.ipdb 78 | *.pgc 79 | *.pgd 80 | *.rsp 81 | *.sbr 82 | *.tlb 83 | *.tli 84 | *.tlh 85 | *.tmp 86 | *.tmp_proj 87 | *_wpftmp.csproj 88 | *.log 89 | *.vspscc 90 | *.vssscc 91 | .builds 92 | *.pidb 93 | *.svclog 94 | *.scc 95 | 96 | # Chutzpah Test files 97 | _Chutzpah* 98 | 99 | # Visual C++ cache files 100 | ipch/ 101 | *.aps 102 | *.ncb 103 | *.opendb 104 | *.opensdf 105 | *.sdf 106 | *.cachefile 107 | *.VC.db 108 | *.VC.VC.opendb 109 | 110 | # Visual Studio profiler 111 | *.psess 112 | *.vsp 113 | *.vspx 114 | *.sap 115 | 116 | # Visual Studio Trace Files 117 | *.e2e 118 | 119 | # TFS 2012 Local Workspace 120 | $tf/ 121 | 122 | # Guidance Automation Toolkit 123 | *.gpState 124 | 125 | # ReSharper is a .NET coding add-in 126 | _ReSharper*/ 127 | *.[Rr]e[Ss]harper 128 | *.DotSettings.user 129 | 130 | # TeamCity is a build add-in 131 | _TeamCity* 132 | 133 | # DotCover is a Code Coverage Tool 134 | *.dotCover 135 | 136 | # AxoCover is a Code Coverage Tool 137 | .axoCover/* 138 | !.axoCover/settings.json 139 | 140 | # Visual Studio code coverage results 141 | *.coverage 142 | *.coveragexml 143 | 144 | # NCrunch 145 | _NCrunch_* 146 | .*crunch*.local.xml 147 | nCrunchTemp_* 148 | 149 | # MightyMoose 150 | *.mm.* 151 | AutoTest.Net/ 152 | 153 | # Web workbench (sass) 154 | .sass-cache/ 155 | 156 | # Installshield output folder 157 | [Ee]xpress/ 158 | 159 | # DocProject is a documentation generator add-in 160 | DocProject/buildhelp/ 161 | DocProject/Help/*.HxT 162 | DocProject/Help/*.HxC 163 | DocProject/Help/*.hhc 164 | DocProject/Help/*.hhk 165 | DocProject/Help/*.hhp 166 | DocProject/Help/Html2 167 | DocProject/Help/html 168 | 169 | # Click-Once directory 170 | publish/ 171 | 172 | # Publish Web Output 173 | *.[Pp]ublish.xml 174 | *.azurePubxml 175 | # Note: Comment the next line if you want to checkin your web deploy settings, 176 | # but database connection strings (with potential passwords) will be unencrypted 177 | *.pubxml 178 | *.publishproj 179 | 180 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 181 | # checkin your Azure Web App publish settings, but sensitive information contained 182 | # in these scripts will be unencrypted 183 | PublishScripts/ 184 | 185 | # NuGet Packages 186 | *.nupkg 187 | # NuGet Symbol Packages 188 | *.snupkg 189 | # The packages folder can be ignored because of Package Restore 190 | **/[Pp]ackages/* 191 | # except build/, which is used as an MSBuild target. 192 | !**/[Pp]ackages/build/ 193 | # Uncomment if necessary however generally it will be regenerated when needed 194 | #!**/[Pp]ackages/repositories.config 195 | # NuGet v3's project.json files produces more ignorable files 196 | *.nuget.props 197 | *.nuget.targets 198 | 199 | # Microsoft Azure Build Output 200 | csx/ 201 | *.build.csdef 202 | 203 | # Microsoft Azure Emulator 204 | ecf/ 205 | rcf/ 206 | 207 | # Windows Store app package directories and files 208 | AppPackages/ 209 | BundleArtifacts/ 210 | Package.StoreAssociation.xml 211 | _pkginfo.txt 212 | *.appx 213 | *.appxbundle 214 | *.appxupload 215 | 216 | # Visual Studio cache files 217 | # files ending in .cache can be ignored 218 | *.[Cc]ache 219 | # but keep track of directories ending in .cache 220 | !?*.[Cc]ache/ 221 | 222 | # Others 223 | ClientBin/ 224 | ~$* 225 | *~ 226 | *.dbmdl 227 | *.dbproj.schemaview 228 | *.jfm 229 | *.pfx 230 | *.publishsettings 231 | orleans.codegen.cs 232 | 233 | # Including strong name files can present a security risk 234 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 235 | #*.snk 236 | 237 | # Since there are multiple workflows, uncomment next line to ignore bower_components 238 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 239 | #bower_components/ 240 | 241 | # RIA/Silverlight projects 242 | Generated_Code/ 243 | 244 | # Backup & report files from converting an old project file 245 | # to a newer Visual Studio version. Backup files are not needed, 246 | # because we have git ;-) 247 | _UpgradeReport_Files/ 248 | Backup*/ 249 | UpgradeLog*.XML 250 | UpgradeLog*.htm 251 | ServiceFabricBackup/ 252 | *.rptproj.bak 253 | 254 | # SQL Server files 255 | *.mdf 256 | *.ldf 257 | *.ndf 258 | 259 | # Business Intelligence projects 260 | *.rdl.data 261 | *.bim.layout 262 | *.bim_*.settings 263 | *.rptproj.rsuser 264 | *- [Bb]ackup.rdl 265 | *- [Bb]ackup ([0-9]).rdl 266 | *- [Bb]ackup ([0-9][0-9]).rdl 267 | 268 | # Microsoft Fakes 269 | FakesAssemblies/ 270 | 271 | # GhostDoc plugin setting file 272 | *.GhostDoc.xml 273 | 274 | # Node.js Tools for Visual Studio 275 | .ntvs_analysis.dat 276 | node_modules/ 277 | 278 | # Visual Studio 6 build log 279 | *.plg 280 | 281 | # Visual Studio 6 workspace options file 282 | *.opt 283 | 284 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 285 | *.vbw 286 | 287 | # Visual Studio LightSwitch build output 288 | **/*.HTMLClient/GeneratedArtifacts 289 | **/*.DesktopClient/GeneratedArtifacts 290 | **/*.DesktopClient/ModelManifest.xml 291 | **/*.Server/GeneratedArtifacts 292 | **/*.Server/ModelManifest.xml 293 | _Pvt_Extensions 294 | 295 | # Paket dependency manager 296 | .paket/paket.exe 297 | paket-files/ 298 | 299 | # FAKE - F# Make 300 | .fake/ 301 | 302 | # CodeRush personal settings 303 | .cr/personal 304 | 305 | # Python Tools for Visual Studio (PTVS) 306 | __pycache__/ 307 | *.pyc 308 | 309 | # Cake - Uncomment if you are using it 310 | # tools/** 311 | # !tools/packages.config 312 | 313 | # Tabs Studio 314 | *.tss 315 | 316 | # Telerik's JustMock configuration file 317 | *.jmconfig 318 | 319 | # BizTalk build output 320 | *.btp.cs 321 | *.btm.cs 322 | *.odx.cs 323 | *.xsd.cs 324 | 325 | # OpenCover UI analysis results 326 | OpenCover/ 327 | 328 | # Azure Stream Analytics local run output 329 | ASALocalRun/ 330 | 331 | # MSBuild Binary and Structured Log 332 | *.binlog 333 | 334 | # NVidia Nsight GPU debugger configuration file 335 | *.nvuser 336 | 337 | # MFractors (Xamarin productivity tool) working folder 338 | .mfractor/ 339 | 340 | # Local History for Visual Studio 341 | .localhistory/ 342 | 343 | # BeatPulse healthcheck temp database 344 | healthchecksdb 345 | 346 | # Backup folder for Package Reference Convert tool in Visual Studio 2017 347 | MigrationBackup/ 348 | 349 | # Ionide (cross platform F# VS Code tools) working folder 350 | .ionide/ 351 | -------------------------------------------------------------------------------- /.whitesource: -------------------------------------------------------------------------------- 1 | { 2 | "checkRunSettings": { 3 | "vulnerableCheckRunConclusionLevel": "failure" 4 | }, 5 | "issueSettings": { 6 | "minSeverityLevel": "LOW" 7 | } 8 | } -------------------------------------------------------------------------------- /DocumentationSources.bat: -------------------------------------------------------------------------------- 1 | cd externals 2 | cd docfx 3 | rmdir ..\..\docs\sitedocs /s /q 4 | mkdir ..\..\docs\sitedocs 5 | docfx Documentation\docfx.json -o ..\..\docs\DocumentationAPIcd 6 | xcopy ..\..\docs\DocumentationAPIcd\_site ..\..\docs\sitedocs /S /Y 7 | rmdir ..\..\docs\DocumentationAPIcd /s /q -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Andrei Ignat 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # WebAPI2CLI 2 | Execute ASP.NET Core WebAPI from Command Line . Source at https://github.com/ignatandrei/WebAPI2CLI 3 | 4 | [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/ignatandrei/WebAPI2CLI/blob/master/LICENSE) 5 | [![NuGet](https://img.shields.io/nuget/v/ExtensionNetCore3.svg)](https://www.nuget.org/packages/ExtensionNetCore3) 6 | ![MyGet](https://img.shields.io/myget/ignatandrei/v/ExtensionNetCore3?label=CD2MyGet) 7 | [![Build Status](https://dev.azure.com/ignatandrei0674/WebAPI2CLI/_apis/build/status/ignatandrei.WebAPI2CLI?branchName=master)](https://dev.azure.com/ignatandrei0674/WebAPI2CLI/_build/latest?definitionId=7&branchName=master) 8 | ![Azure DevOps tests (branch)](https://img.shields.io/azure-devops/tests/ignatandrei0674/WebAPI2CLI/7/master) 9 | ![Azure DevOps coverage (branch)](https://img.shields.io/azure-devops/coverage/ignatandrei0674/WebAPI2CLI/7/master) 10 | ![generateDocs](https://github.com/ignatandrei/webAPI2CLI/workflows/generateDocs/badge.svg) 11 | 12 | # Why 13 | 14 | What if, instead of running the WebAPI ( or just the site ) and waiting for commands from the user, you want also to execute from the command line some controllers actions ? 15 | 16 | This project let's you do that by enabling the command line with 17 | 18 | < myexe >.exe --CLI_ENABLED=1 --CLI_Commands=" ... " 19 | 20 | The command names are in a *cli.txt* file that can be generated with 21 | 22 | < myexe >.exe --CLI_ENABLED=1 --CLI_HELP=1 23 | 24 | 25 | # How to use ( for .NET Core 3.1 ) 26 | 27 | ## Step 0 : install into your ASP.NET Core Web 28 | 29 | Install the package https://www.nuget.org/packages/ExtensionNetCore3 30 | 31 | Modify your ASP.NET Core as below: 32 | 33 | ```csharp 34 | public void ConfigureServices(IServiceCollection services) 35 | { 36 | services.AddCLI(); 37 | //your code omitted 38 | } 39 | public void Configure(IApplicationBuilder app, IWebHostEnvironment env) 40 | { 41 | app.UseCLI(); 42 | //your code omitted 43 | } 44 | ``` 45 | And that is all modifications that you need to do for the source code. 46 | 47 | ## Step 1 - find and save the definition of the commands, i.e. WebAPI endpoints 48 | 49 | First, you must generate the definition of the commands. For this, we take the OPEN API (swagger ) approach. 50 | 51 | For this, after you compile the project, you will run your .exe program with arguments: 52 | 53 | < myexe >.exe --CLI_ENABLED=1 --CLI_HELP=1 54 | 55 | ( or make this from *Visual Studio, Project, Properties, Debug* ) 56 | 57 | This will generate a *cli.txt* file with all definitions of the WebAPI. 58 | ( if your API does not appear, check if you have *ApiController* defined) 59 | 60 | Open your *cli.txt* file and modify the names of the commands as you wish (also , the arguments ) 61 | 62 | Copy this *cli.txt* in your solution and be sure that is copied with the exe ( in Visual Studio right click the file, properties, Build Action = Content, CopyToOutputDirectory = Copy if newer) 63 | 64 | ## Step 2 - run the commands 65 | 66 | Ensure that the file is near your exe WebAPI. 67 | 68 | Run the exe with the following: 69 | 70 | < myexe >.exe --CLI_ENABLED=1 --CLI_Commands="your first command,your second command, and enumerate all commands" 71 | 72 | The program will run the commands and output the result. 73 | 74 | ## Optional Step 3 - letting others download the app to use as CLI 75 | Modify the endpoints to add zip 76 | 77 | ```csharp 78 | app.UseEndpoints(endpoints => 79 | { 80 | endpoints.MapControllers(); 81 | 82 | endpoints.MakeZip(app); 83 | }); 84 | ``` 85 | and browser to /zip to download the whole application. 86 | More details here( including a demo) 87 | 88 | https://ignatandrei.github.io/WebAPI2CLI/ 89 | 90 | 91 | Environment Variables: see https://github.com/ignatandrei/Interpreter 92 | -------------------------------------------------------------------------------- /azure-pipelines.yml: -------------------------------------------------------------------------------- 1 | # ASP.NET Core (.NET Framework) 2 | # Build and test ASP.NET Core projects targeting the full .NET Framework. 3 | # Add steps that publish symbols, save build artifacts, and more: 4 | # https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core 5 | 6 | trigger: 7 | branches: 8 | include: 9 | - master 10 | paths: 11 | exclude: 12 | - docs/* 13 | - README.md 14 | - azure-pipelines.yml 15 | 16 | 17 | pool: 18 | vmImage: 'windows-latest' 19 | 20 | variables: 21 | solution: '**/*.sln' 22 | buildPlatform: 'Any CPU' 23 | buildConfiguration: 'Release' 24 | deployNuget: '1' 25 | 26 | steps: 27 | - task: NuGetToolInstaller@1 28 | 29 | - task: NuGetCommand@2 30 | inputs: 31 | restoreSolution: '$(solution)' 32 | 33 | - script: | 34 | cd src 35 | dotnet tool restore --add-source https://myget.org/F/natemcmaster/api/v3/index.json 36 | pwsh ./setVersion.ps1 37 | dotnet build --configuration $(buildConfiguration) WebAPI2CLI.sln /m:1 38 | dotnet publish TestWebAPISite/TestWebAPISite.csproj -c $(buildConfiguration) --self-contained true --no-build -r win10-x64 -p:PublishSingleFile=true -o:$(Build.ArtifactStagingDirectory) 39 | copy TestWebAPISite\cli.txt $(Build.ArtifactStagingDirectory)\cli.txt 40 | displayName: build sln 41 | 42 | - script: | 43 | cd src 44 | cmd /k set 45 | dotnet tool restore --add-source https://myget.org/F/natemcmaster/api/v3/index.json 46 | dotnet test WebAPI2CLI.sln --logger trx --no-build -r $(Build.ArtifactStagingDirectory)\trx -o CLITests\bin\$(buildConfiguration)\netcoreapp3.1 47 | cd CLITests 48 | rem echo 'xunit' 49 | rem dotnet xunit bin\$(buildConfiguration)\netcoreapp3.1\CLITests.dll -parallel none -html $(Build.ArtifactStagingDirectory)\tests.html 50 | echo 'coverlet' 51 | dotnet coverlet bin\$(buildConfiguration)\netcoreapp3.1\CLITests.dll --target "dotnet" --targetargs "test --no-build --configuration $(buildConfiguration)" --exclude '[*Test*]*' --format opencover --output $(Build.ArtifactStagingDirectory)\testResults\coverlet.xml 52 | dotnet reportgenerator "-reports:$(Build.ArtifactStagingDirectory)\testResults\coverlet.xml" "-targetdir:$(Build.ArtifactStagingDirectory)\testResults" "-reporttypes:Cobertura;HtmlSummary;Badges;HtmlInline_AzurePipelines" 53 | displayName: execute tests 54 | 55 | - task: PublishTestResults@2 56 | inputs: 57 | testResultsFormat: 'VSTest' 58 | testResultsFiles: '**/*.trx' 59 | searchFolder: '$(Build.ArtifactStagingDirectory)\trx' 60 | displayName: publish tests 61 | 62 | - task: PublishCodeCoverageResults@1 63 | displayName: 'Publish code coverage' 64 | inputs: 65 | codeCoverageTool: Cobertura 66 | summaryFileLocation: '$(Build.ArtifactStagingDirectory)\testResults\Cobertura.xml' 67 | reportDirectory: '$(Build.ArtifactStagingDirectory)\testResults' 68 | 69 | # - task: VSTest@2 70 | # inputs: 71 | # testSelector: 'testAssemblies' 72 | # testAssemblyVer2: | # Required when testSelector == TestAssemblies 73 | # **\*CLITests*.dll 74 | # !**\obj\** 75 | # runInParallel: False 76 | # publishRunAttachments: true 77 | # codeCoverageEnabled: true 78 | 79 | 80 | - script: | 81 | echo "pack ExtensionNetCore3.csproj" 82 | dotnet pack src/ExtensionNetCore3/ExtensionNetCore3.csproj --include-source --no-build -o $(Build.ArtifactStagingDirectory) /p:Configuration=$(buildConfiguration) 83 | echo "pack CLIExecute.csproj" 84 | dotnet pack src/CLIExecute/CLIExecute.csproj --include-source --no-build -o $(Build.ArtifactStagingDirectory) /p:Configuration=$(buildConfiguration) 85 | displayName: 'dotnet pack ' 86 | 87 | - task: PublishBuildArtifacts@1 88 | inputs: 89 | pathtoPublish: '$(Build.ArtifactStagingDirectory)' 90 | artifactName: drop1 91 | 92 | - task: NuGetCommand@2 93 | condition: and(succeeded(), eq(variables['deployNuget'], '1')) 94 | inputs: 95 | command: push 96 | nuGetFeedType: external 97 | packagesToPush: '$(Build.ArtifactStagingDirectory)/**/*.symbols.nupkg' 98 | publishFeedCredentials: 'nugetAndrei' 99 | displayName: 'dotnet nuget push' 100 | 101 | - script: | 102 | nuget push $(Build.ArtifactStagingDirectory)/**/*.symbols.nupkg %MYGETAPIKEY% -Source https://www.myget.org/F/ignatandrei/api/v2/package 103 | displayName: push myget 104 | 105 | - script: | 106 | cd $(Build.ArtifactStagingDirectory) 107 | dir *.exe 108 | echo "testing" 109 | TestWebAPISite.exe --CLI_ENABLED=1 --CLI_Commands="GetMathId_Http,MathPOST" 110 | 111 | displayName: runningADemo -------------------------------------------------------------------------------- /docs/Author.md: -------------------------------------------------------------------------------- 1 | # Various abouts 2 | 3 | ## About how I wrote the application 4 | 5 | If you want to find more about the pains of creating this app,please see 6 | 7 | http://msprogrammer.serviciipeweb.ro/category/webapi2cli/ 8 | 9 | 10 | ## About me 11 | 12 | Please see 13 | 14 | http://msprogrammer.serviciipeweb.ro/personal-trainer-in-net-asp-net-mvc-vba-sql-server/ -------------------------------------------------------------------------------- /docs/Demo.md: -------------------------------------------------------------------------------- 1 | # If you want a demo 2 | 3 | ## If you have Win10 x64 4 | 5 | Go to https://dev.azure.com/ignatandrei0674/WebAPI2CLI/_build?definitionId=7&_a=summary 6 | 7 | Click on the latest job. 8 | 9 | Click on artifacts. 10 | 11 | See drop1 . In the right of drop1 , you can download the drop1 folder. 12 | 13 | Unzip the drop1 ( you will need the cli.txt that contains the WebAPI definitions) 14 | 15 | Inside drop1 , you will find TestWebAPISite.exe 16 | 17 | Run TestWebAPISite.exe and browse to http://localhost:5000/swagger 18 | 19 | Close TestWebAPISite.exe command prompt. 20 | 21 | Now run 22 | 23 | TestWebAPISite.exe --CLI_Enabled=1 --CLI_COMMANDS="GetMathId_Http,WeatherGet" 24 | 25 | ( ensure the cli.txt is near to TestWebAPISite.exe) 26 | 27 | ## If you have another operating system than Win10-x64 and want a demo 28 | 29 | It is easy to make a demo for you. 30 | Modify the .csproj and the yml file in azure. Or make an issue at https://github.com/ignatandrei/webAPI2CLI/issues and I will do it for you. 31 | 32 | ## Could I see an example of the output ? 33 | 34 | Of course. Every build in AzureDevOps has a last step , runningADemo. 35 | See https://dev.azure.com/ignatandrei0674/WebAPI2CLI/_build?definitionId=7&_a=summary 36 | 37 | ## Could you put here the output ? 38 | Yes. 39 | This is the output of 40 | 41 | TestWebAPISite.exe --CLI_ENABLED=1 --CLI_Commands="GetMathId_Http,MathPOST" 42 | 43 | See *Result* variable 44 | 45 | 1. 2020-03-10T19:03:39.2929915Z ExtensionNetCore3 version:1.2020.10310.11900 46 | 1. 2020-03-10T19:03:40.0045036Z info: Microsoft.Hosting.Lifetime[0] 47 | 1. 2020-03-10T19:03:40.0046360Z Now listening on: http://localhost:5000 48 | 1. 2020-03-10T19:03:40.0047178Z info: Microsoft.Hosting.Lifetime[0] 49 | 1. 2020-03-10T19:03:40.0047815Z Now listening on: https://localhost:5001 50 | 1. 2020-03-10T19:03:40.0048438Z info: Microsoft.Hosting.Lifetime[0] 51 | 1. 2020-03-10T19:03:40.0049078Z Application started. Press Ctrl+C to shut down. 52 | 1. 2020-03-10T19:03:40.0049702Z info: Microsoft.Hosting.Lifetime[0] 53 | 1. 2020-03-10T19:03:40.0050292Z Hosting environment: Production 54 | 1. 2020-03-10T19:03:40.0050877Z info: Microsoft.Hosting.Lifetime[0] 55 | 1. 2020-03-10T19:03:40.0051895Z Content root path: D:\a\1\a 56 | 1. 2020-03-10T19:03:44.6267548Z CLIExecute version:1.2020.10310.11900 57 | 1. 2020-03-10T19:03:45.4122334Z *executing GetMathId_Http* 58 | 1. 2020-03-10T19:03:46.0585725Z { 59 | 1. 2020-03-10T19:03:46.0586788Z "Command": { 60 | 1. 2020-03-10T19:03:46.0587511Z "NameCommand": "GetMathId_Http", 61 | 1. 2020-03-10T19:03:46.0588202Z "Host": "http://localhost:5000", 62 | 1. 2020-03-10T19:03:46.0588851Z "RelativeRequestUrl": "api/MathAdd/5", 63 | 1. 2020-03-10T19:03:46.0589427Z "Verb": "GET" 64 | 1. 2020-03-10T19:03:46.0589936Z }, 65 | 1. 2020-03-10T19:03:46.0590434Z "StatusCode": 200, 66 | 1. 2020-03-10T19:03:46.0590955Z "*Result*": "value5" 67 | 1. 2020-03-10T19:03:46.0591452Z } 68 | 1. 2020-03-10T19:03:46.0591977Z executing *MathPOST* 69 | 1. 2020-03-10T19:03:46.1304847Z { 70 | 1. 2020-03-10T19:03:46.1306343Z "Command": { 71 | 1. 2020-03-10T19:03:46.1307062Z "NameCommand": "MathPOST", 72 | 1. 2020-03-10T19:03:46.1307766Z "Host": "http://localhost:5000", 73 | 1. 2020-03-10T19:03:46.1308471Z "RelativeRequestUrl": "api/MathAdd", 74 | 1. 2020-03-10T19:03:46.1309710Z "Verb": "POST" 75 | 1. 2020-03-10T19:03:46.1310813Z }, 76 | 1. 2020-03-10T19:03:46.1311457Z "StatusCode": 200, 77 | 1. 2020-03-10T19:03:46.1312079Z "Result": "" 78 | 1. 2020-03-10T19:03:46.1312652Z } 79 | 80 | -------------------------------------------------------------------------------- /docs/FAQ.md: -------------------------------------------------------------------------------- 1 | # F.A.Q. 2 | 3 | ## My port changes from development to integration. How to wrote the address one time ? 4 | 5 | WebAPI2CLI has a cli.txt file ( see https://github.com/ignatandrei/WebAPI2CLI/blob/master/src/TestWebAPISite/cli.txt ) 6 | 7 | In this file put just - 8 | 9 | Host: http:// 10 | 11 | or 12 | 13 | Host: https:// 14 | 15 | ( Assumption : just one http and/or just 1 https when asp.net core will start ) 16 | 17 | WebAPI2CLI will find the adress and the port comparing 18 | 19 | Alternatively, you can put the full URI ( without RelativeRequestUrl ! ) 20 | 21 | Host: http://localhost:5000/ 22 | 23 | ## I want to contribute . Where is the code ? 24 | 25 | All code source is at https://github.com/ignatandrei/WebAPI2CLI/ 26 | 27 | Please see issues tab if you want to know what needs development . 28 | 29 | ## Will my WebAPI work as before? 30 | 31 | The software takes care about 32 | 33 | --CLI_ENABLED=1 34 | 35 | If you do not have this command, your website runs as before 36 | 37 | ## I want to run and store results separately 38 | 39 | Use 40 | < myexe >.exe --CLI_ENABLED=1 --CLI_Commands="your first command,your second command" --CLI_FILENAME="your file name" 41 | 42 | ## I want to run as a CLI and then use the WebAPI as before. Could I do that? 43 | 44 | Yes. Use 45 | 46 | < myexe >.exe --CLI_ENABLED=1 --CLI_Commands="your first command,your second command" --CLI_STAY=1 47 | 48 | ## I found a bug / I need a feature . Where can I report ? 49 | 50 | You can report problems at https://github.com/ignatandrei/WebAPI2CLI/issues 51 | 52 | ## I want to see the classes documentation before downloading the project. 53 | 54 | Glad you asked . See https://ignatandrei.github.io/WebAPI2CLI/sitedocs/api/index.html and choose from the left menu the classes. 55 | 56 | ## I want to let others to download my whole application to use from command line. 57 | Modify the endpoints to add zip 58 | 59 | ```csharp 60 | app.UseEndpoints(endpoints => 61 | { 62 | endpoints.MapControllers(); 63 | 64 | endpoints.MakeZip(app); 65 | }); 66 | ``` 67 | and point your browser to /zip to download the whole application. 68 | 69 | Caveat: The downloaded application will work if the user have the same operating system as the site ;-). 70 | Also, the publishing of .NET Core should be self contained to have a better experience. 71 | 72 | ## Where can I download this document ? 73 | 74 | There is a PDF at https://ignatandrei.github.io/WebAPI2CLI/Web2CLI.pdf 75 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /docs/Web2CLI.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/docs/Web2CLI.pdf -------------------------------------------------------------------------------- /docs/packageList.md: -------------------------------------------------------------------------------- 1 | # Referenced packages 2 | Project 'CLIExecute' has the following package references 3 | [netcoreapp3.1]: 4 | Top-level Package Requested Resolved 5 | > InterpreterDll 2020.7.14.5 2020.7.14.5 6 | > Microsoft.AspNetCore.Hosting.Server.Abstractions 2.2.0 2.2.0 7 | > Microsoft.AspNetCore.Mvc.ApiExplorer 2.2.0 2.2.0 8 | > Microsoft.Extensions.Configuration.Abstractions 3.1.2 3.1.2 9 | > Microsoft.Extensions.Configuration.Binder 3.1.2 3.1.2 10 | > Microsoft.SourceLink.GitHub 1.0.0 1.0.0 11 | > System.Text.Json 4.7.1 4.7.1 12 | > YamlDotNet 8.1.0 8.1.0 13 | 14 | Project 'ExtensionNetCore3' has the following package references 15 | [netcoreapp3.1]: 16 | Top-level Package Requested Resolved 17 | > Microsoft.AspNetCore.Hosting.Server.Abstractions 2.2.0 2.2.0 18 | > Microsoft.AspNetCore.Mvc.Abstractions 2.2.0 2.2.0 19 | > Microsoft.AspNetCore.Mvc.ApiExplorer 2.2.0 2.2.0 20 | > Microsoft.Extensions.DependencyInjection.Abstractions 3.1.2 3.1.2 21 | > Microsoft.Extensions.Hosting.Abstractions 3.1.2 3.1.2 22 | > Microsoft.SourceLink.GitHub 1.0.0 1.0.0 23 | > System.IO.Pipelines 4.7.2 4.7.2 24 | 25 | Project 'TestWebAPISite' has the following package references 26 | [netcoreapp3.1]: 27 | Top-level Package Requested Resolved 28 | > Microsoft.VisualStudio.Web.CodeGeneration.Design 3.1.1 3.1.1 29 | > Moq 4.13.1 4.13.1 30 | > Swashbuckle.AspNetCore 5.1.0 5.1.0 31 | 32 | Project 'CLITests' has the following package references 33 | [netcoreapp3.1]: 34 | Top-level Package Requested Resolved 35 | > coverlet.collector 1.2.0 1.2.0 36 | > FluentAssertions 5.10.2 5.10.2 37 | > Microsoft.AspNetCore.Mvc.Testing 3.1.2 3.1.2 38 | > Microsoft.AspNetCore.Server.Kestrel 2.2.0 2.2.0 39 | > Microsoft.NET.Test.Sdk 16.5.0 16.5.0 40 | > Xbehave 2.4.1 2.4.1 41 | > xunit 2.4.1 2.4.1 42 | > xunit.runner.visualstudio 2.4.1 2.4.1 43 | 44 |  -------------------------------------------------------------------------------- /docs/packageListHeader.md: -------------------------------------------------------------------------------- 1 | # Referenced packages 2 | -------------------------------------------------------------------------------- /docs/packageOutdated.md: -------------------------------------------------------------------------------- 1 | # Outdated packages 2 | 3 | The following sources were used: 4 | https://api.nuget.org/v3/index.json 5 | C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\ 6 | 7 | Project `CLIExecute` has the following updates to its packages 8 | [netcoreapp3.1]: 9 | Top-level Package Requested Resolved Latest 10 | > Microsoft.Extensions.Configuration.Abstractions 3.1.2 3.1.2 3.1.7 11 | > Microsoft.Extensions.Configuration.Binder 3.1.2 3.1.2 3.1.7 12 | > System.Text.Json 4.7.1 4.7.1 4.7.2 13 | > YamlDotNet 8.1.0 8.1.0 8.1.2 14 | 15 | Project `ExtensionNetCore3` has the following updates to its packages 16 | [netcoreapp3.1]: 17 | Top-level Package Requested Resolved Latest 18 | > Microsoft.Extensions.DependencyInjection.Abstractions 3.1.2 3.1.2 3.1.7 19 | > Microsoft.Extensions.Hosting.Abstractions 3.1.2 3.1.2 3.1.7 20 | 21 | Project `TestWebAPISite` has the following updates to its packages 22 | [netcoreapp3.1]: 23 | Top-level Package Requested Resolved Latest 24 | > Microsoft.VisualStudio.Web.CodeGeneration.Design 3.1.1 3.1.1 3.1.4 25 | > Moq 4.13.1 4.13.1 4.14.5 26 | > Swashbuckle.AspNetCore 5.1.0 5.1.0 5.5.1 27 | 28 | Project `CLITests` has the following updates to its packages 29 | [netcoreapp3.1]: 30 | Top-level Package Requested Resolved Latest 31 | > coverlet.collector 1.2.0 1.2.0 1.3.0 32 | > FluentAssertions 5.10.2 5.10.2 5.10.3 33 | > Microsoft.AspNetCore.Mvc.Testing 3.1.2 3.1.2 3.1.7 34 | > Microsoft.NET.Test.Sdk 16.5.0 16.5.0 16.7.0 35 | > xunit.runner.visualstudio 2.4.1 2.4.1 2.4.3 36 | 37 |  -------------------------------------------------------------------------------- /docs/packageOutdatedHeader.md: -------------------------------------------------------------------------------- 1 | # Outdated packages 2 | -------------------------------------------------------------------------------- /docs/sitedocs/api/index.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | WebAPI2CLI Index 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 |
26 | 27 | 50 | 51 | 58 |
59 | 85 | 86 |
87 |
88 | 97 |
98 |
99 | 100 | 101 | 102 | 103 | 104 | 105 | -------------------------------------------------------------------------------- /docs/sitedocs/articles/intro.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | WebAPI2CLI documentation 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 |
26 | 27 | 50 | 51 | 58 |
59 | 98 | 99 |
100 |
101 | 110 |
111 |
112 | 113 | 114 | 115 | 116 | 117 | 118 | -------------------------------------------------------------------------------- /docs/sitedocs/articles/toc.html: -------------------------------------------------------------------------------- 1 |  2 |
3 |
4 |
5 |
6 | 7 | 8 | 9 |
10 |
11 |
12 |
13 | 14 | 19 |
20 |
21 |
22 |
-------------------------------------------------------------------------------- /docs/sitedocs/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/docs/sitedocs/favicon.ico -------------------------------------------------------------------------------- /docs/sitedocs/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/docs/sitedocs/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /docs/sitedocs/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/docs/sitedocs/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /docs/sitedocs/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/docs/sitedocs/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /docs/sitedocs/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/docs/sitedocs/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /docs/sitedocs/index.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | WebAPI2CLI sources documentation 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 |
26 | 27 | 50 | 51 | 58 |
59 | 91 | 92 |
93 |
94 | 103 |
104 |
105 | 106 | 107 | 108 | 109 | 110 | 111 | -------------------------------------------------------------------------------- /docs/sitedocs/logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 8 | Created by Docfx 9 | 10 | 12 | 15 | 21 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /docs/sitedocs/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "homepages": [], 3 | "source_base_path": "d:/a/WebAPI2CLI/WebAPI2CLI/externals/docfx/Documentation", 4 | "xrefmap": "xrefmap.yml", 5 | "files": [ 6 | { 7 | "type": "Conceptual", 8 | "source_relative_path": "api/index.md", 9 | "output": { 10 | ".html": { 11 | "relative_path": "api/index.html", 12 | "hash": "bHnbic92Z4sJ/ke66F1E6w==" 13 | } 14 | }, 15 | "is_incremental": false, 16 | "version": "" 17 | }, 18 | { 19 | "type": "Conceptual", 20 | "source_relative_path": "articles/intro.md", 21 | "output": { 22 | ".html": { 23 | "relative_path": "articles/intro.html", 24 | "hash": "cUl4+1p8nHv5j6wDhW/SUw==" 25 | } 26 | }, 27 | "is_incremental": false, 28 | "version": "" 29 | }, 30 | { 31 | "type": "Toc", 32 | "source_relative_path": "articles/toc.yml", 33 | "output": { 34 | ".html": { 35 | "relative_path": "articles/toc.html", 36 | "hash": "gB8AESyvNru97tzIZofEEg==" 37 | } 38 | }, 39 | "is_incremental": false, 40 | "version": "" 41 | }, 42 | { 43 | "type": "Conceptual", 44 | "source_relative_path": "index.md", 45 | "output": { 46 | ".html": { 47 | "relative_path": "index.html", 48 | "hash": "o9GspvfmcJTrlenmuFg6XA==" 49 | } 50 | }, 51 | "is_incremental": false, 52 | "version": "" 53 | }, 54 | { 55 | "type": "Toc", 56 | "source_relative_path": "toc.yml", 57 | "output": { 58 | ".html": { 59 | "relative_path": "toc.html", 60 | "hash": "IGK1ZSYI4NbShXZSeUUd6Q==" 61 | } 62 | }, 63 | "is_incremental": false, 64 | "version": "" 65 | } 66 | ], 67 | "incremental_info": [ 68 | { 69 | "status": { 70 | "can_incremental": false, 71 | "details": "Cannot build incrementally because last build info is missing.", 72 | "incrementalPhase": "build", 73 | "total_file_count": 0, 74 | "skipped_file_count": 0, 75 | "full_build_reason_code": "NoAvailableBuildCache" 76 | }, 77 | "processors": { 78 | "ConceptualDocumentProcessor": { 79 | "can_incremental": false, 80 | "incrementalPhase": "build", 81 | "total_file_count": 3, 82 | "skipped_file_count": 0 83 | }, 84 | "TocDocumentProcessor": { 85 | "can_incremental": false, 86 | "details": "Processor TocDocumentProcessor cannot support incremental build because the processor doesn't implement ISupportIncrementalDocumentProcessor interface.", 87 | "incrementalPhase": "build", 88 | "total_file_count": 0, 89 | "skipped_file_count": 0 90 | } 91 | } 92 | }, 93 | { 94 | "status": { 95 | "can_incremental": false, 96 | "details": "Cannot support incremental post processing, the reason is: last post processor info is null.", 97 | "incrementalPhase": "postProcessing", 98 | "total_file_count": 0, 99 | "skipped_file_count": 0 100 | }, 101 | "processors": {} 102 | } 103 | ], 104 | "version_info": {}, 105 | "groups": [ 106 | { 107 | "xrefmap": "xrefmap.yml" 108 | } 109 | ] 110 | } -------------------------------------------------------------------------------- /docs/sitedocs/search-stopwords.json: -------------------------------------------------------------------------------- 1 | [ 2 | "a", 3 | "able", 4 | "about", 5 | "across", 6 | "after", 7 | "all", 8 | "almost", 9 | "also", 10 | "am", 11 | "among", 12 | "an", 13 | "and", 14 | "any", 15 | "are", 16 | "as", 17 | "at", 18 | "be", 19 | "because", 20 | "been", 21 | "but", 22 | "by", 23 | "can", 24 | "cannot", 25 | "could", 26 | "dear", 27 | "did", 28 | "do", 29 | "does", 30 | "either", 31 | "else", 32 | "ever", 33 | "every", 34 | "for", 35 | "from", 36 | "get", 37 | "got", 38 | "had", 39 | "has", 40 | "have", 41 | "he", 42 | "her", 43 | "hers", 44 | "him", 45 | "his", 46 | "how", 47 | "however", 48 | "i", 49 | "if", 50 | "in", 51 | "into", 52 | "is", 53 | "it", 54 | "its", 55 | "just", 56 | "least", 57 | "let", 58 | "like", 59 | "likely", 60 | "may", 61 | "me", 62 | "might", 63 | "most", 64 | "must", 65 | "my", 66 | "neither", 67 | "no", 68 | "nor", 69 | "not", 70 | "of", 71 | "off", 72 | "often", 73 | "on", 74 | "only", 75 | "or", 76 | "other", 77 | "our", 78 | "own", 79 | "rather", 80 | "said", 81 | "say", 82 | "says", 83 | "she", 84 | "should", 85 | "since", 86 | "so", 87 | "some", 88 | "than", 89 | "that", 90 | "the", 91 | "their", 92 | "them", 93 | "then", 94 | "there", 95 | "these", 96 | "they", 97 | "this", 98 | "tis", 99 | "to", 100 | "too", 101 | "twas", 102 | "us", 103 | "wants", 104 | "was", 105 | "we", 106 | "were", 107 | "what", 108 | "when", 109 | "where", 110 | "which", 111 | "while", 112 | "who", 113 | "whom", 114 | "why", 115 | "will", 116 | "with", 117 | "would", 118 | "yet", 119 | "you", 120 | "your" 121 | ] 122 | -------------------------------------------------------------------------------- /docs/sitedocs/styles/docfx.css: -------------------------------------------------------------------------------- 1 | /* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License.txt in the project root for license information. */ 2 | html, 3 | body { 4 | font-family: 'Segoe UI', Tahoma, Helvetica, sans-serif; 5 | height: 100%; 6 | } 7 | button, 8 | a { 9 | color: #337ab7; 10 | cursor: pointer; 11 | } 12 | button:hover, 13 | button:focus, 14 | a:hover, 15 | a:focus { 16 | color: #23527c; 17 | text-decoration: none; 18 | } 19 | a.disable, 20 | a.disable:hover { 21 | text-decoration: none; 22 | cursor: default; 23 | color: #000000; 24 | } 25 | 26 | h1, h2, h3, h4, h5, h6, .text-break { 27 | word-wrap: break-word; 28 | word-break: break-word; 29 | } 30 | 31 | h1 mark, 32 | h2 mark, 33 | h3 mark, 34 | h4 mark, 35 | h5 mark, 36 | h6 mark { 37 | padding: 0; 38 | } 39 | 40 | .inheritance .level0:before, 41 | .inheritance .level1:before, 42 | .inheritance .level2:before, 43 | .inheritance .level3:before, 44 | .inheritance .level4:before, 45 | .inheritance .level5:before { 46 | content: '↳'; 47 | margin-right: 5px; 48 | } 49 | 50 | .inheritance .level0 { 51 | margin-left: 0em; 52 | } 53 | 54 | .inheritance .level1 { 55 | margin-left: 1em; 56 | } 57 | 58 | .inheritance .level2 { 59 | margin-left: 2em; 60 | } 61 | 62 | .inheritance .level3 { 63 | margin-left: 3em; 64 | } 65 | 66 | .inheritance .level4 { 67 | margin-left: 4em; 68 | } 69 | 70 | .inheritance .level5 { 71 | margin-left: 5em; 72 | } 73 | 74 | span.parametername, 75 | span.paramref, 76 | span.typeparamref { 77 | font-style: italic; 78 | } 79 | span.languagekeyword{ 80 | font-weight: bold; 81 | } 82 | 83 | svg:hover path { 84 | fill: #ffffff; 85 | } 86 | 87 | .hljs { 88 | display: inline; 89 | background-color: inherit; 90 | padding: 0; 91 | } 92 | /* additional spacing fixes */ 93 | .btn + .btn { 94 | margin-left: 10px; 95 | } 96 | .btn.pull-right { 97 | margin-left: 10px; 98 | margin-top: 5px; 99 | } 100 | .table { 101 | margin-bottom: 10px; 102 | } 103 | table p { 104 | margin-bottom: 0; 105 | } 106 | table a { 107 | display: inline-block; 108 | } 109 | 110 | /* Make hidden attribute compatible with old browser.*/ 111 | [hidden] { 112 | display: none !important; 113 | } 114 | 115 | h1, 116 | .h1, 117 | h2, 118 | .h2, 119 | h3, 120 | .h3 { 121 | margin-top: 15px; 122 | margin-bottom: 10px; 123 | font-weight: 400; 124 | } 125 | h4, 126 | .h4, 127 | h5, 128 | .h5, 129 | h6, 130 | .h6 { 131 | margin-top: 10px; 132 | margin-bottom: 5px; 133 | } 134 | .navbar { 135 | margin-bottom: 0; 136 | } 137 | #wrapper { 138 | min-height: 100%; 139 | position: relative; 140 | } 141 | /* blends header footer and content together with gradient effect */ 142 | .grad-top { 143 | /* For Safari 5.1 to 6.0 */ 144 | /* For Opera 11.1 to 12.0 */ 145 | /* For Firefox 3.6 to 15 */ 146 | background: linear-gradient(rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0)); 147 | /* Standard syntax */ 148 | height: 5px; 149 | } 150 | .grad-bottom { 151 | /* For Safari 5.1 to 6.0 */ 152 | /* For Opera 11.1 to 12.0 */ 153 | /* For Firefox 3.6 to 15 */ 154 | background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.05)); 155 | /* Standard syntax */ 156 | height: 5px; 157 | } 158 | .divider { 159 | margin: 0 5px; 160 | color: #cccccc; 161 | } 162 | hr { 163 | border-color: #cccccc; 164 | } 165 | header { 166 | position: fixed; 167 | top: 0; 168 | left: 0; 169 | right: 0; 170 | z-index: 1000; 171 | } 172 | header .navbar { 173 | border-width: 0 0 1px; 174 | border-radius: 0; 175 | } 176 | .navbar-brand { 177 | font-size: inherit; 178 | padding: 0; 179 | } 180 | .navbar-collapse { 181 | margin: 0 -15px; 182 | } 183 | .subnav { 184 | min-height: 40px; 185 | } 186 | 187 | .inheritance h5, .inheritedMembers h5{ 188 | padding-bottom: 5px; 189 | border-bottom: 1px solid #ccc; 190 | } 191 | 192 | article h1, article h2, article h3, article h4{ 193 | margin-top: 25px; 194 | } 195 | 196 | article h4{ 197 | border-bottom: 1px solid #ccc; 198 | } 199 | 200 | article span.small.pull-right{ 201 | margin-top: 20px; 202 | } 203 | 204 | article section { 205 | margin-left: 1em; 206 | } 207 | 208 | /*.expand-all { 209 | padding: 10px 0; 210 | }*/ 211 | .breadcrumb { 212 | margin: 0; 213 | padding: 10px 0; 214 | background-color: inherit; 215 | white-space: nowrap; 216 | } 217 | .breadcrumb > li + li:before { 218 | content: "\00a0/"; 219 | } 220 | #autocollapse.collapsed .navbar-header { 221 | float: none; 222 | } 223 | #autocollapse.collapsed .navbar-toggle { 224 | display: block; 225 | } 226 | #autocollapse.collapsed .navbar-collapse { 227 | border-top: 1px solid transparent; 228 | box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1); 229 | } 230 | #autocollapse.collapsed .navbar-collapse.collapse { 231 | display: none !important; 232 | } 233 | #autocollapse.collapsed .navbar-nav { 234 | float: none !important; 235 | margin: 7.5px -15px; 236 | } 237 | #autocollapse.collapsed .navbar-nav > li { 238 | float: none; 239 | } 240 | #autocollapse.collapsed .navbar-nav > li > a { 241 | padding-top: 10px; 242 | padding-bottom: 10px; 243 | } 244 | #autocollapse.collapsed .collapse.in, 245 | #autocollapse.collapsed .collapsing { 246 | display: block !important; 247 | } 248 | #autocollapse.collapsed .collapse.in .navbar-right, 249 | #autocollapse.collapsed .collapsing .navbar-right { 250 | float: none !important; 251 | } 252 | #autocollapse .form-group { 253 | width: 100%; 254 | } 255 | #autocollapse .form-control { 256 | width: 100%; 257 | } 258 | #autocollapse .navbar-header { 259 | margin-left: 0; 260 | margin-right: 0; 261 | } 262 | #autocollapse .navbar-brand { 263 | margin-left: 0; 264 | } 265 | .collapse.in, 266 | .collapsing { 267 | text-align: center; 268 | } 269 | .collapsing .navbar-form { 270 | margin: 0 auto; 271 | max-width: 400px; 272 | padding: 10px 15px; 273 | box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1); 274 | } 275 | .collapsed .collapse.in .navbar-form { 276 | margin: 0 auto; 277 | max-width: 400px; 278 | padding: 10px 15px; 279 | box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1); 280 | } 281 | .navbar .navbar-nav { 282 | display: inline-block; 283 | } 284 | .docs-search { 285 | background: white; 286 | vertical-align: middle; 287 | } 288 | .docs-search > .search-query { 289 | font-size: 14px; 290 | border: 0; 291 | width: 120%; 292 | color: #555; 293 | } 294 | .docs-search > .search-query:focus { 295 | outline: 0; 296 | } 297 | .search-results-frame { 298 | clear: both; 299 | display: table; 300 | width: 100%; 301 | } 302 | .search-results.ng-hide { 303 | display: none; 304 | } 305 | .search-results-container { 306 | padding-bottom: 1em; 307 | border-top: 1px solid #111; 308 | background: rgba(25, 25, 25, 0.5); 309 | } 310 | .search-results-container .search-results-group { 311 | padding-top: 50px !important; 312 | padding: 10px; 313 | } 314 | .search-results-group-heading { 315 | font-family: "Open Sans"; 316 | padding-left: 10px; 317 | color: white; 318 | } 319 | .search-close { 320 | position: absolute; 321 | left: 50%; 322 | margin-left: -100px; 323 | color: white; 324 | text-align: center; 325 | padding: 5px; 326 | background: #333; 327 | border-top-right-radius: 5px; 328 | border-top-left-radius: 5px; 329 | width: 200px; 330 | box-shadow: 0 0 10px #111; 331 | } 332 | #search { 333 | display: none; 334 | } 335 | 336 | /* Search results display*/ 337 | #search-results { 338 | max-width: 960px !important; 339 | margin-top: 120px; 340 | margin-bottom: 115px; 341 | margin-left: auto; 342 | margin-right: auto; 343 | line-height: 1.8; 344 | display: none; 345 | } 346 | 347 | #search-results>.search-list { 348 | text-align: center; 349 | font-size: 2.5rem; 350 | margin-bottom: 50px; 351 | } 352 | 353 | #search-results p { 354 | text-align: center; 355 | } 356 | 357 | #search-results p .index-loading { 358 | animation: index-loading 1.5s infinite linear; 359 | -webkit-animation: index-loading 1.5s infinite linear; 360 | -o-animation: index-loading 1.5s infinite linear; 361 | font-size: 2.5rem; 362 | } 363 | 364 | @keyframes index-loading { 365 | from { transform: scale(1) rotate(0deg);} 366 | to { transform: scale(1) rotate(360deg);} 367 | } 368 | 369 | @-webkit-keyframes index-loading { 370 | from { -webkit-transform: rotate(0deg);} 371 | to { -webkit-transform: rotate(360deg);} 372 | } 373 | 374 | @-o-keyframes index-loading { 375 | from { -o-transform: rotate(0deg);} 376 | to { -o-transform: rotate(360deg);} 377 | } 378 | 379 | #search-results .sr-items { 380 | font-size: 24px; 381 | } 382 | 383 | .sr-item { 384 | margin-bottom: 25px; 385 | } 386 | 387 | .sr-item>.item-href { 388 | font-size: 14px; 389 | color: #093; 390 | } 391 | 392 | .sr-item>.item-brief { 393 | font-size: 13px; 394 | } 395 | 396 | .pagination>li>a { 397 | color: #47A7A0 398 | } 399 | 400 | .pagination>.active>a { 401 | background-color: #47A7A0; 402 | border-color: #47A7A0; 403 | } 404 | 405 | .fixed_header { 406 | position: fixed; 407 | width: 100%; 408 | padding-bottom: 10px; 409 | padding-top: 10px; 410 | margin: 0px; 411 | top: 0; 412 | z-index: 9999; 413 | left: 0; 414 | } 415 | 416 | .fixed_header+.toc{ 417 | margin-top: 50px; 418 | margin-left: 0; 419 | } 420 | 421 | .sidenav, .fixed_header, .toc { 422 | background-color: #f1f1f1; 423 | } 424 | 425 | .sidetoc { 426 | position: fixed; 427 | width: 260px; 428 | top: 150px; 429 | bottom: 0; 430 | overflow-x: hidden; 431 | overflow-y: auto; 432 | background-color: #f1f1f1; 433 | border-left: 1px solid #e7e7e7; 434 | border-right: 1px solid #e7e7e7; 435 | z-index: 1; 436 | } 437 | 438 | .sidetoc.shiftup { 439 | bottom: 70px; 440 | } 441 | 442 | body .toc{ 443 | background-color: #f1f1f1; 444 | overflow-x: hidden; 445 | } 446 | 447 | .sidetoggle.ng-hide { 448 | display: block !important; 449 | } 450 | .sidetoc-expand > .caret { 451 | margin-left: 0px; 452 | margin-top: -2px; 453 | } 454 | .sidetoc-expand > .caret-side { 455 | border-left: 4px solid; 456 | border-top: 4px solid transparent; 457 | border-bottom: 4px solid transparent; 458 | margin-left: 4px; 459 | margin-top: -4px; 460 | } 461 | .sidetoc-heading { 462 | font-weight: 500; 463 | } 464 | 465 | .toc { 466 | margin: 0px 0 0 10px; 467 | padding: 0 10px; 468 | } 469 | .expand-stub { 470 | position: absolute; 471 | left: -10px; 472 | } 473 | .toc .nav > li > a.sidetoc-expand { 474 | position: absolute; 475 | top: 0; 476 | left: 0; 477 | } 478 | .toc .nav > li > a { 479 | color: #666666; 480 | margin-left: 5px; 481 | display: block; 482 | padding: 0; 483 | } 484 | .toc .nav > li > a:hover, 485 | .toc .nav > li > a:focus { 486 | color: #000000; 487 | background: none; 488 | text-decoration: inherit; 489 | } 490 | .toc .nav > li.active > a { 491 | color: #337ab7; 492 | } 493 | .toc .nav > li.active > a:hover, 494 | .toc .nav > li.active > a:focus { 495 | color: #23527c; 496 | } 497 | 498 | .toc .nav > li> .expand-stub { 499 | cursor: pointer; 500 | } 501 | 502 | .toc .nav > li.active > .expand-stub::before, 503 | .toc .nav > li.in > .expand-stub::before, 504 | .toc .nav > li.in.active > .expand-stub::before, 505 | .toc .nav > li.filtered > .expand-stub::before { 506 | content: "-"; 507 | } 508 | 509 | .toc .nav > li > .expand-stub::before, 510 | .toc .nav > li.active > .expand-stub::before { 511 | content: "+"; 512 | } 513 | 514 | .toc .nav > li.filtered > ul, 515 | .toc .nav > li.in > ul { 516 | display: block; 517 | } 518 | 519 | .toc .nav > li > ul { 520 | display: none; 521 | } 522 | 523 | .toc ul{ 524 | font-size: 12px; 525 | margin: 0 0 0 3px; 526 | } 527 | 528 | .toc .level1 > li { 529 | font-weight: bold; 530 | margin-top: 10px; 531 | position: relative; 532 | font-size: 16px; 533 | } 534 | .toc .level2 { 535 | font-weight: normal; 536 | margin: 5px 0 0 15px; 537 | font-size: 14px; 538 | } 539 | .toc-toggle { 540 | display: none; 541 | margin: 0 15px 0px 15px; 542 | } 543 | .sidefilter { 544 | position: fixed; 545 | top: 90px; 546 | width: 260px; 547 | background-color: #f1f1f1; 548 | padding: 15px; 549 | border-left: 1px solid #e7e7e7; 550 | border-right: 1px solid #e7e7e7; 551 | z-index: 1; 552 | } 553 | .toc-filter { 554 | border-radius: 5px; 555 | background: #fff; 556 | color: #666666; 557 | padding: 5px; 558 | position: relative; 559 | margin: 0 5px 0 5px; 560 | } 561 | .toc-filter > input { 562 | border: 0; 563 | color: #666666; 564 | padding-left: 20px; 565 | padding-right: 20px; 566 | width: 100%; 567 | } 568 | .toc-filter > input:focus { 569 | outline: 0; 570 | } 571 | .toc-filter > .filter-icon { 572 | position: absolute; 573 | top: 10px; 574 | left: 5px; 575 | } 576 | .toc-filter > .clear-icon { 577 | position: absolute; 578 | top: 10px; 579 | right: 5px; 580 | } 581 | .article { 582 | margin-top: 120px; 583 | margin-bottom: 115px; 584 | } 585 | 586 | #_content>a{ 587 | margin-top: 105px; 588 | } 589 | 590 | .article.grid-right { 591 | margin-left: 280px; 592 | } 593 | 594 | .inheritance hr { 595 | margin-top: 5px; 596 | margin-bottom: 5px; 597 | } 598 | .article img { 599 | max-width: 100%; 600 | } 601 | .sideaffix { 602 | margin-top: 50px; 603 | font-size: 12px; 604 | max-height: 100%; 605 | overflow: hidden; 606 | top: 100px; 607 | bottom: 10px; 608 | position: fixed; 609 | } 610 | .sideaffix.shiftup { 611 | bottom: 70px; 612 | } 613 | .affix { 614 | position: relative; 615 | height: 100%; 616 | } 617 | .sideaffix > div.contribution { 618 | margin-bottom: 20px; 619 | } 620 | .sideaffix > div.contribution > ul > li > a.contribution-link { 621 | padding: 6px 10px; 622 | font-weight: bold; 623 | font-size: 14px; 624 | } 625 | .sideaffix > div.contribution > ul > li > a.contribution-link:hover { 626 | background-color: #ffffff; 627 | } 628 | .sideaffix ul.nav > li > a:focus { 629 | background: none; 630 | } 631 | .affix h5 { 632 | font-weight: bold; 633 | text-transform: uppercase; 634 | padding-left: 10px; 635 | font-size: 12px; 636 | } 637 | .affix > ul.level1 { 638 | overflow: hidden; 639 | padding-bottom: 10px; 640 | height: calc(100% - 100px); 641 | } 642 | .affix ul > li > a:before { 643 | color: #cccccc; 644 | position: absolute; 645 | } 646 | .affix ul > li > a:hover { 647 | background: none; 648 | color: #666666; 649 | } 650 | .affix ul > li.active > a, 651 | .affix ul > li.active > a:before { 652 | color: #337ab7; 653 | } 654 | .affix ul > li > a { 655 | padding: 5px 12px; 656 | color: #666666; 657 | } 658 | .affix > ul > li.active:last-child { 659 | margin-bottom: 50px; 660 | } 661 | .affix > ul > li > a:before { 662 | content: "|"; 663 | font-size: 16px; 664 | top: 1px; 665 | left: 0; 666 | } 667 | .affix > ul > li.active > a, 668 | .affix > ul > li.active > a:before { 669 | color: #337ab7; 670 | font-weight: bold; 671 | } 672 | .affix ul ul > li > a { 673 | padding: 2px 15px; 674 | } 675 | .affix ul ul > li > a:before { 676 | content: ">"; 677 | font-size: 14px; 678 | top: -1px; 679 | left: 5px; 680 | } 681 | .affix ul > li > a:before, 682 | .affix ul ul { 683 | display: none; 684 | } 685 | .affix ul > li.active > ul, 686 | .affix ul > li.active > a:before, 687 | .affix ul > li > a:hover:before { 688 | display: block; 689 | white-space: nowrap; 690 | } 691 | .codewrapper { 692 | position: relative; 693 | } 694 | .trydiv { 695 | height: 0px; 696 | } 697 | .tryspan { 698 | position: absolute; 699 | top: 0px; 700 | right: 0px; 701 | border-style: solid; 702 | border-radius: 0px 4px; 703 | box-sizing: border-box; 704 | border-width: 1px; 705 | border-color: #cccccc; 706 | text-align: center; 707 | padding: 2px 8px; 708 | background-color: white; 709 | font-size: 12px; 710 | cursor: pointer; 711 | z-index: 100; 712 | display: none; 713 | color: #767676; 714 | } 715 | .tryspan:hover { 716 | background-color: #3b8bd0; 717 | color: white; 718 | border-color: #3b8bd0; 719 | } 720 | .codewrapper:hover .tryspan { 721 | display: block; 722 | } 723 | .sample-response .response-content{ 724 | max-height: 200px; 725 | } 726 | footer { 727 | position: absolute; 728 | left: 0; 729 | right: 0; 730 | bottom: 0; 731 | z-index: 1000; 732 | } 733 | .footer { 734 | border-top: 1px solid #e7e7e7; 735 | background-color: #f8f8f8; 736 | padding: 15px 0; 737 | } 738 | @media (min-width: 768px) { 739 | #sidetoggle.collapse { 740 | display: block; 741 | } 742 | .topnav .navbar-nav { 743 | float: none; 744 | white-space: nowrap; 745 | } 746 | .topnav .navbar-nav > li { 747 | float: none; 748 | display: inline-block; 749 | } 750 | } 751 | @media only screen and (max-width: 768px) { 752 | #mobile-indicator { 753 | display: block; 754 | } 755 | /* TOC display for responsive */ 756 | .article { 757 | margin-top: 30px !important; 758 | } 759 | header { 760 | position: static; 761 | } 762 | .topnav { 763 | text-align: center; 764 | } 765 | .sidenav { 766 | padding: 15px 0; 767 | margin-left: -15px; 768 | margin-right: -15px; 769 | } 770 | .sidefilter { 771 | position: static; 772 | width: auto; 773 | float: none; 774 | border: none; 775 | } 776 | .sidetoc { 777 | position: static; 778 | width: auto; 779 | float: none; 780 | padding-bottom: 0px; 781 | border: none; 782 | } 783 | .toc .nav > li, .toc .nav > li >a { 784 | display: inline-block; 785 | } 786 | .toc li:after { 787 | margin-left: -3px; 788 | margin-right: 5px; 789 | content: ", "; 790 | color: #666666; 791 | } 792 | .toc .level1 > li { 793 | display: block; 794 | } 795 | 796 | .toc .level1 > li:after { 797 | display: none; 798 | } 799 | .article.grid-right { 800 | margin-left: 0; 801 | } 802 | .grad-top, 803 | .grad-bottom { 804 | display: none; 805 | } 806 | .toc-toggle { 807 | display: block; 808 | } 809 | .sidetoggle.ng-hide { 810 | display: none !important; 811 | } 812 | /*.expand-all { 813 | display: none; 814 | }*/ 815 | .sideaffix { 816 | display: none; 817 | } 818 | .mobile-hide { 819 | display: none; 820 | } 821 | .breadcrumb { 822 | white-space: inherit; 823 | } 824 | 825 | /* workaround for #hashtag url is no longer needed*/ 826 | h1:before, 827 | h2:before, 828 | h3:before, 829 | h4:before { 830 | content: ''; 831 | display: none; 832 | } 833 | } 834 | 835 | /* For toc iframe */ 836 | @media (max-width: 260px) { 837 | .toc .level2 > li { 838 | display: block; 839 | } 840 | 841 | .toc .level2 > li:after { 842 | display: none; 843 | } 844 | } 845 | 846 | /* For code snippet line highlight */ 847 | pre > code .line-highlight { 848 | background-color: #ffffcc; 849 | } 850 | 851 | /* Alerts */ 852 | .alert h5 { 853 | text-transform: uppercase; 854 | font-weight: bold; 855 | margin-top: 0; 856 | } 857 | 858 | .alert h5:before { 859 | position:relative; 860 | top:1px; 861 | display:inline-block; 862 | font-family:'Glyphicons Halflings'; 863 | line-height:1; 864 | -webkit-font-smoothing:antialiased; 865 | -moz-osx-font-smoothing:grayscale; 866 | margin-right: 5px; 867 | font-weight: normal; 868 | } 869 | 870 | .alert-info h5:before { 871 | content:"\e086" 872 | } 873 | 874 | .alert-warning h5:before { 875 | content:"\e127" 876 | } 877 | 878 | .alert-danger h5:before { 879 | content:"\e107" 880 | } 881 | 882 | /* For Embedded Video */ 883 | div.embeddedvideo { 884 | padding-top: 56.25%; 885 | position: relative; 886 | width: 100%; 887 | } 888 | 889 | div.embeddedvideo iframe { 890 | position: absolute; 891 | top: 0; 892 | left: 0; 893 | right: 0; 894 | bottom: 0; 895 | width: 100%; 896 | height: 100%; 897 | } 898 | 899 | /* For printer */ 900 | @media print{ 901 | .article.grid-right { 902 | margin-top: 0px; 903 | margin-left: 0px; 904 | } 905 | .sideaffix { 906 | display: none; 907 | } 908 | .mobile-hide { 909 | display: none; 910 | } 911 | .footer { 912 | display: none; 913 | } 914 | } 915 | 916 | /* For tabbed content */ 917 | 918 | .tabGroup { 919 | margin-top: 1rem; } 920 | .tabGroup ul[role="tablist"] { 921 | margin: 0; 922 | padding: 0; 923 | list-style: none; } 924 | .tabGroup ul[role="tablist"] > li { 925 | list-style: none; 926 | display: inline-block; } 927 | .tabGroup a[role="tab"] { 928 | color: #6e6e6e; 929 | box-sizing: border-box; 930 | display: inline-block; 931 | padding: 5px 7.5px; 932 | text-decoration: none; 933 | border-bottom: 2px solid #fff; } 934 | .tabGroup a[role="tab"]:hover, .tabGroup a[role="tab"]:focus, .tabGroup a[role="tab"][aria-selected="true"] { 935 | border-bottom: 2px solid #0050C5; } 936 | .tabGroup a[role="tab"][aria-selected="true"] { 937 | color: #222; } 938 | .tabGroup a[role="tab"]:hover, .tabGroup a[role="tab"]:focus { 939 | color: #0050C5; } 940 | .tabGroup a[role="tab"]:focus { 941 | outline: 1px solid #0050C5; 942 | outline-offset: -1px; } 943 | @media (min-width: 768px) { 944 | .tabGroup a[role="tab"] { 945 | padding: 5px 15px; } } 946 | .tabGroup section[role="tabpanel"] { 947 | border: 1px solid #e0e0e0; 948 | padding: 15px; 949 | margin: 0; 950 | overflow: hidden; } 951 | .tabGroup section[role="tabpanel"] > .codeHeader, 952 | .tabGroup section[role="tabpanel"] > pre { 953 | margin-left: -16px; 954 | margin-right: -16px; } 955 | .tabGroup section[role="tabpanel"] > :first-child { 956 | margin-top: 0; } 957 | .tabGroup section[role="tabpanel"] > pre:last-child { 958 | display: block; 959 | margin-bottom: -16px; } 960 | 961 | .mainContainer[dir='rtl'] main ul[role="tablist"] { 962 | margin: 0; } 963 | -------------------------------------------------------------------------------- /docs/sitedocs/styles/main.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/docs/sitedocs/styles/main.css -------------------------------------------------------------------------------- /docs/sitedocs/styles/main.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information. 2 | -------------------------------------------------------------------------------- /docs/sitedocs/styles/search-worker.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | importScripts('lunr.min.js'); 3 | 4 | var lunrIndex; 5 | 6 | var stopWords = null; 7 | var searchData = {}; 8 | 9 | lunr.tokenizer.separator = /[\s\-\.]+/; 10 | 11 | var stopWordsRequest = new XMLHttpRequest(); 12 | stopWordsRequest.open('GET', '../search-stopwords.json'); 13 | stopWordsRequest.onload = function () { 14 | if (this.status != 200) { 15 | return; 16 | } 17 | stopWords = JSON.parse(this.responseText); 18 | buildIndex(); 19 | } 20 | stopWordsRequest.send(); 21 | 22 | var searchDataRequest = new XMLHttpRequest(); 23 | 24 | searchDataRequest.open('GET', '../index.json'); 25 | searchDataRequest.onload = function () { 26 | if (this.status != 200) { 27 | return; 28 | } 29 | searchData = JSON.parse(this.responseText); 30 | 31 | buildIndex(); 32 | 33 | postMessage({ e: 'index-ready' }); 34 | } 35 | searchDataRequest.send(); 36 | 37 | onmessage = function (oEvent) { 38 | var q = oEvent.data.q; 39 | var hits = lunrIndex.search(q); 40 | var results = []; 41 | hits.forEach(function (hit) { 42 | var item = searchData[hit.ref]; 43 | results.push({ 'href': item.href, 'title': item.title, 'keywords': item.keywords }); 44 | }); 45 | postMessage({ e: 'query-ready', q: q, d: results }); 46 | } 47 | 48 | function buildIndex() { 49 | if (stopWords !== null && !isEmpty(searchData)) { 50 | lunrIndex = lunr(function () { 51 | this.pipeline.remove(lunr.stopWordFilter); 52 | this.ref('href'); 53 | this.field('title', { boost: 50 }); 54 | this.field('keywords', { boost: 20 }); 55 | 56 | for (var prop in searchData) { 57 | if (searchData.hasOwnProperty(prop)) { 58 | this.add(searchData[prop]); 59 | } 60 | } 61 | 62 | var docfxStopWordFilter = lunr.generateStopWordFilter(stopWords); 63 | lunr.Pipeline.registerFunction(docfxStopWordFilter, 'docfxStopWordFilter'); 64 | this.pipeline.add(docfxStopWordFilter); 65 | this.searchPipeline.add(docfxStopWordFilter); 66 | }); 67 | } 68 | } 69 | 70 | function isEmpty(obj) { 71 | if(!obj) return true; 72 | 73 | for (var prop in obj) { 74 | if (obj.hasOwnProperty(prop)) 75 | return false; 76 | } 77 | 78 | return true; 79 | } 80 | })(); 81 | -------------------------------------------------------------------------------- /docs/sitedocs/toc.html: -------------------------------------------------------------------------------- 1 |  2 |
3 |
4 |
5 |
6 | 7 | 8 | 9 |
10 |
11 |
12 |
13 | 14 | 22 |
23 |
24 |
25 |
-------------------------------------------------------------------------------- /docs/sitedocs/xrefmap.yml: -------------------------------------------------------------------------------- 1 | ### YamlMime:XRefMap 2 | sorted: true 3 | references: [] 4 | -------------------------------------------------------------------------------- /externals/docfx.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx.zip -------------------------------------------------------------------------------- /externals/docfx/AutoMapper.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/AutoMapper.dll -------------------------------------------------------------------------------- /externals/docfx/CommandLine.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/CommandLine.dll -------------------------------------------------------------------------------- /externals/docfx/Documentation/.gitignore: -------------------------------------------------------------------------------- 1 | ############### 2 | # folder # 3 | ############### 4 | /**/DROP/ 5 | /**/TEMP/ 6 | /**/packages/ 7 | /**/bin/ 8 | /**/obj/ 9 | _site 10 | -------------------------------------------------------------------------------- /externals/docfx/Documentation/api/.gitignore: -------------------------------------------------------------------------------- 1 | ############### 2 | # temp file # 3 | ############### 4 | *.yml 5 | .manifest 6 | -------------------------------------------------------------------------------- /externals/docfx/Documentation/api/index.md: -------------------------------------------------------------------------------- 1 | # WebAPI2CLI Index 2 | 3 | Please select the projects documentation from the left. -------------------------------------------------------------------------------- /externals/docfx/Documentation/articles/intro.md: -------------------------------------------------------------------------------- 1 | # WebAPI2CLI documentation 2 | 3 | No articles, just see below. 4 | 5 | ## Quick Start Notes: 6 | 7 | 1. [Classes documentation](https://ignatandrei.github.io/WebAPI2CLI/sitedocs/api/index.html) 8 | 1. [General Help Site](https://ignatandrei.github.io/WebAPI2CLI/) 9 | 1. [Sources](https://github.com/ignatandrei/webAPI2CLI/) 10 | 11 | -------------------------------------------------------------------------------- /externals/docfx/Documentation/articles/toc.yml: -------------------------------------------------------------------------------- 1 | - name: Introduction 2 | href: intro.md 3 | -------------------------------------------------------------------------------- /externals/docfx/Documentation/docfx.json: -------------------------------------------------------------------------------- 1 | { 2 | "metadata": [ 3 | { 4 | "src": [ 5 | { 6 | "files": [ 7 | "src/CLIExecute/CLIExecute.csproj", 8 | "src/ExtensionNetCore3/ExtensionNetCore3.csproj" 9 | ], 10 | "src": "../../../" 11 | } 12 | ], 13 | "dest": "api", 14 | "disableGitFeatures": false, 15 | "disableDefaultFilter": false 16 | } 17 | ], 18 | "build": { 19 | "content": [ 20 | { 21 | "files": [ 22 | "api/**.yml", 23 | "api/index.md" 24 | ] 25 | }, 26 | { 27 | "files": [ 28 | "articles/**.md", 29 | "articles/**/toc.yml", 30 | "toc.yml", 31 | "*.md" 32 | ] 33 | } 34 | ], 35 | "resource": [ 36 | { 37 | "files": [ 38 | "images/**" 39 | ] 40 | } 41 | ], 42 | "overwrite": [ 43 | { 44 | "files": [ 45 | "apidoc/**.md" 46 | ], 47 | "exclude": [ 48 | "obj/**", 49 | "_site/**" 50 | ] 51 | } 52 | ], 53 | "dest": "_site", 54 | "globalMetadataFiles": [], 55 | "fileMetadataFiles": [], 56 | "template": [ 57 | "default" 58 | ], 59 | "postProcessors": [], 60 | "markdownEngineName": "markdig", 61 | "noLangKeyword": false, 62 | "keepFileLink": false, 63 | "cleanupCacheHistory": false, 64 | "disableGitFeatures": false 65 | } 66 | } -------------------------------------------------------------------------------- /externals/docfx/Documentation/index.md: -------------------------------------------------------------------------------- 1 | # WebAPI2CLI sources documentation 2 | 3 | This is just for the sources. See below for links. 4 | 5 | ## Quick Start Notes: 6 | 7 | 1. [Classes documentation](https://ignatandrei.github.io/WebAPI2CLI/sitedocs/api/index.html) 8 | 1. [General Help Site](https://ignatandrei.github.io/WebAPI2CLI/) 9 | 1. [Sources](https://github.com/ignatandrei/webAPI2CLI/) 10 | -------------------------------------------------------------------------------- /externals/docfx/Documentation/toc.yml: -------------------------------------------------------------------------------- 1 | - name: Articles 2 | href: articles/ 3 | - name: Api Documentation 4 | href: api/ 5 | homepage: api/index.md 6 | -------------------------------------------------------------------------------- /externals/docfx/DotLiquid.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/DotLiquid.dll -------------------------------------------------------------------------------- /externals/docfx/Dotnet.ProjInfo.Helpers.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/Dotnet.ProjInfo.Helpers.dll -------------------------------------------------------------------------------- /externals/docfx/Dotnet.ProjInfo.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/Dotnet.ProjInfo.dll -------------------------------------------------------------------------------- /externals/docfx/FSharp.Compiler.Service.MSBuild.v12.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/FSharp.Compiler.Service.MSBuild.v12.dll -------------------------------------------------------------------------------- /externals/docfx/FSharp.Compiler.Service.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/FSharp.Compiler.Service.dll -------------------------------------------------------------------------------- /externals/docfx/FSharp.Core.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/FSharp.Core.dll -------------------------------------------------------------------------------- /externals/docfx/HtmlAgilityPack.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/HtmlAgilityPack.dll -------------------------------------------------------------------------------- /externals/docfx/Jint.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/Jint.dll -------------------------------------------------------------------------------- /externals/docfx/Markdig.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/Markdig.dll -------------------------------------------------------------------------------- /externals/docfx/Microsoft.Build.Locator.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/Microsoft.Build.Locator.dll -------------------------------------------------------------------------------- /externals/docfx/Microsoft.CodeAnalysis.CSharp.Features.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/Microsoft.CodeAnalysis.CSharp.Features.dll -------------------------------------------------------------------------------- /externals/docfx/Microsoft.CodeAnalysis.CSharp.Workspaces.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/Microsoft.CodeAnalysis.CSharp.Workspaces.dll -------------------------------------------------------------------------------- /externals/docfx/Microsoft.CodeAnalysis.CSharp.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/Microsoft.CodeAnalysis.CSharp.dll -------------------------------------------------------------------------------- /externals/docfx/Microsoft.CodeAnalysis.Features.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/Microsoft.CodeAnalysis.Features.dll -------------------------------------------------------------------------------- /externals/docfx/Microsoft.CodeAnalysis.FlowAnalysis.Utilities.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/Microsoft.CodeAnalysis.FlowAnalysis.Utilities.dll -------------------------------------------------------------------------------- /externals/docfx/Microsoft.CodeAnalysis.VisualBasic.Features.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/Microsoft.CodeAnalysis.VisualBasic.Features.dll -------------------------------------------------------------------------------- /externals/docfx/Microsoft.CodeAnalysis.VisualBasic.Workspaces.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/Microsoft.CodeAnalysis.VisualBasic.Workspaces.dll -------------------------------------------------------------------------------- /externals/docfx/Microsoft.CodeAnalysis.VisualBasic.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/Microsoft.CodeAnalysis.VisualBasic.dll -------------------------------------------------------------------------------- /externals/docfx/Microsoft.CodeAnalysis.Workspaces.MSBuild.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/Microsoft.CodeAnalysis.Workspaces.MSBuild.dll -------------------------------------------------------------------------------- /externals/docfx/Microsoft.CodeAnalysis.Workspaces.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/Microsoft.CodeAnalysis.Workspaces.dll -------------------------------------------------------------------------------- /externals/docfx/Microsoft.CodeAnalysis.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/Microsoft.CodeAnalysis.dll -------------------------------------------------------------------------------- /externals/docfx/Microsoft.DiaSymReader.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/Microsoft.DiaSymReader.dll -------------------------------------------------------------------------------- /externals/docfx/Microsoft.DocAsCode.Build.Common.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/Microsoft.DocAsCode.Build.Common.dll -------------------------------------------------------------------------------- /externals/docfx/Microsoft.DocAsCode.Build.ConceptualDocuments.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/Microsoft.DocAsCode.Build.ConceptualDocuments.dll -------------------------------------------------------------------------------- /externals/docfx/Microsoft.DocAsCode.Build.Engine.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/Microsoft.DocAsCode.Build.Engine.dll -------------------------------------------------------------------------------- /externals/docfx/Microsoft.DocAsCode.Build.ManagedReference.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/Microsoft.DocAsCode.Build.ManagedReference.dll -------------------------------------------------------------------------------- /externals/docfx/Microsoft.DocAsCode.Build.OverwriteDocuments.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/Microsoft.DocAsCode.Build.OverwriteDocuments.dll -------------------------------------------------------------------------------- /externals/docfx/Microsoft.DocAsCode.Build.ResourceFiles.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/Microsoft.DocAsCode.Build.ResourceFiles.dll -------------------------------------------------------------------------------- /externals/docfx/Microsoft.DocAsCode.Build.RestApi.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/Microsoft.DocAsCode.Build.RestApi.dll -------------------------------------------------------------------------------- /externals/docfx/Microsoft.DocAsCode.Build.SchemaDriven.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/Microsoft.DocAsCode.Build.SchemaDriven.dll -------------------------------------------------------------------------------- /externals/docfx/Microsoft.DocAsCode.Build.TableOfContents.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/Microsoft.DocAsCode.Build.TableOfContents.dll -------------------------------------------------------------------------------- /externals/docfx/Microsoft.DocAsCode.Build.UniversalReference.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/Microsoft.DocAsCode.Build.UniversalReference.dll -------------------------------------------------------------------------------- /externals/docfx/Microsoft.DocAsCode.Common.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/Microsoft.DocAsCode.Common.dll -------------------------------------------------------------------------------- /externals/docfx/Microsoft.DocAsCode.DataContracts.Common.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/Microsoft.DocAsCode.DataContracts.Common.dll -------------------------------------------------------------------------------- /externals/docfx/Microsoft.DocAsCode.DataContracts.ManagedReference.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/Microsoft.DocAsCode.DataContracts.ManagedReference.dll -------------------------------------------------------------------------------- /externals/docfx/Microsoft.DocAsCode.DataContracts.RestApi.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/Microsoft.DocAsCode.DataContracts.RestApi.dll -------------------------------------------------------------------------------- /externals/docfx/Microsoft.DocAsCode.DataContracts.UniversalReference.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/Microsoft.DocAsCode.DataContracts.UniversalReference.dll -------------------------------------------------------------------------------- /externals/docfx/Microsoft.DocAsCode.Dfm.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/Microsoft.DocAsCode.Dfm.dll -------------------------------------------------------------------------------- /externals/docfx/Microsoft.DocAsCode.Glob.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/Microsoft.DocAsCode.Glob.dll -------------------------------------------------------------------------------- /externals/docfx/Microsoft.DocAsCode.HtmlToPdf.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/Microsoft.DocAsCode.HtmlToPdf.dll -------------------------------------------------------------------------------- /externals/docfx/Microsoft.DocAsCode.MarkdigEngine.Extensions.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/Microsoft.DocAsCode.MarkdigEngine.Extensions.dll -------------------------------------------------------------------------------- /externals/docfx/Microsoft.DocAsCode.MarkdigEngine.Validators.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/Microsoft.DocAsCode.MarkdigEngine.Validators.dll -------------------------------------------------------------------------------- /externals/docfx/Microsoft.DocAsCode.MarkdigEngine.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/Microsoft.DocAsCode.MarkdigEngine.dll -------------------------------------------------------------------------------- /externals/docfx/Microsoft.DocAsCode.MarkdownLite.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/Microsoft.DocAsCode.MarkdownLite.dll -------------------------------------------------------------------------------- /externals/docfx/Microsoft.DocAsCode.Metadata.ManagedReference.Common.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/Microsoft.DocAsCode.Metadata.ManagedReference.Common.dll -------------------------------------------------------------------------------- /externals/docfx/Microsoft.DocAsCode.Metadata.ManagedReference.FSharp.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/Microsoft.DocAsCode.Metadata.ManagedReference.FSharp.dll -------------------------------------------------------------------------------- /externals/docfx/Microsoft.DocAsCode.Metadata.ManagedReference.Roslyn.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/Microsoft.DocAsCode.Metadata.ManagedReference.Roslyn.dll -------------------------------------------------------------------------------- /externals/docfx/Microsoft.DocAsCode.Metadata.ManagedReference.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/Microsoft.DocAsCode.Metadata.ManagedReference.dll -------------------------------------------------------------------------------- /externals/docfx/Microsoft.DocAsCode.Plugins.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/Microsoft.DocAsCode.Plugins.dll -------------------------------------------------------------------------------- /externals/docfx/Microsoft.DocAsCode.YamlSerialization.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/Microsoft.DocAsCode.YamlSerialization.dll -------------------------------------------------------------------------------- /externals/docfx/Microsoft.Owin.Diagnostics.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/Microsoft.Owin.Diagnostics.dll -------------------------------------------------------------------------------- /externals/docfx/Microsoft.Owin.FileSystems.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/Microsoft.Owin.FileSystems.dll -------------------------------------------------------------------------------- /externals/docfx/Microsoft.Owin.Host.HttpListener.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/Microsoft.Owin.Host.HttpListener.dll -------------------------------------------------------------------------------- /externals/docfx/Microsoft.Owin.Hosting.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/Microsoft.Owin.Hosting.dll -------------------------------------------------------------------------------- /externals/docfx/Microsoft.Owin.StaticFiles.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/Microsoft.Owin.StaticFiles.dll -------------------------------------------------------------------------------- /externals/docfx/Microsoft.Owin.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/Microsoft.Owin.dll -------------------------------------------------------------------------------- /externals/docfx/Microsoft.VisualStudio.RemoteControl.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/Microsoft.VisualStudio.RemoteControl.dll -------------------------------------------------------------------------------- /externals/docfx/Microsoft.VisualStudio.Utilities.Internal.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/Microsoft.VisualStudio.Utilities.Internal.dll -------------------------------------------------------------------------------- /externals/docfx/Newtonsoft.Json.Schema.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/Newtonsoft.Json.Schema.dll -------------------------------------------------------------------------------- /externals/docfx/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /externals/docfx/NuGet.Common.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/NuGet.Common.dll -------------------------------------------------------------------------------- /externals/docfx/NuGet.Configuration.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/NuGet.Configuration.dll -------------------------------------------------------------------------------- /externals/docfx/NuGet.DependencyResolver.Core.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/NuGet.DependencyResolver.Core.dll -------------------------------------------------------------------------------- /externals/docfx/NuGet.Frameworks.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/NuGet.Frameworks.dll -------------------------------------------------------------------------------- /externals/docfx/NuGet.LibraryModel.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/NuGet.LibraryModel.dll -------------------------------------------------------------------------------- /externals/docfx/NuGet.Packaging.Core.Types.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/NuGet.Packaging.Core.Types.dll -------------------------------------------------------------------------------- /externals/docfx/NuGet.Packaging.Core.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/NuGet.Packaging.Core.dll -------------------------------------------------------------------------------- /externals/docfx/NuGet.Packaging.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/NuGet.Packaging.dll -------------------------------------------------------------------------------- /externals/docfx/NuGet.ProjectModel.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/NuGet.ProjectModel.dll -------------------------------------------------------------------------------- /externals/docfx/NuGet.Protocol.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/NuGet.Protocol.dll -------------------------------------------------------------------------------- /externals/docfx/NuGet.Versioning.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/NuGet.Versioning.dll -------------------------------------------------------------------------------- /externals/docfx/Nustache.Core.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/Nustache.Core.dll -------------------------------------------------------------------------------- /externals/docfx/Owin.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/Owin.dll -------------------------------------------------------------------------------- /externals/docfx/SQLitePCLRaw.core.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/SQLitePCLRaw.core.dll -------------------------------------------------------------------------------- /externals/docfx/System.Buffers.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/System.Buffers.dll -------------------------------------------------------------------------------- /externals/docfx/System.Collections.Immutable.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/System.Collections.Immutable.dll -------------------------------------------------------------------------------- /externals/docfx/System.Composition.AttributedModel.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/System.Composition.AttributedModel.dll -------------------------------------------------------------------------------- /externals/docfx/System.Composition.Convention.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/System.Composition.Convention.dll -------------------------------------------------------------------------------- /externals/docfx/System.Composition.Hosting.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/System.Composition.Hosting.dll -------------------------------------------------------------------------------- /externals/docfx/System.Composition.Runtime.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/System.Composition.Runtime.dll -------------------------------------------------------------------------------- /externals/docfx/System.Composition.TypedParts.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/System.Composition.TypedParts.dll -------------------------------------------------------------------------------- /externals/docfx/System.Memory.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/System.Memory.dll -------------------------------------------------------------------------------- /externals/docfx/System.Numerics.Vectors.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/System.Numerics.Vectors.dll -------------------------------------------------------------------------------- /externals/docfx/System.Reflection.Metadata.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/System.Reflection.Metadata.dll -------------------------------------------------------------------------------- /externals/docfx/System.Runtime.CompilerServices.Unsafe.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/System.Runtime.CompilerServices.Unsafe.dll -------------------------------------------------------------------------------- /externals/docfx/System.Text.Encoding.CodePages.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/System.Text.Encoding.CodePages.dll -------------------------------------------------------------------------------- /externals/docfx/System.Threading.Tasks.Dataflow.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/System.Threading.Tasks.Dataflow.dll -------------------------------------------------------------------------------- /externals/docfx/System.Threading.Tasks.Extensions.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/System.Threading.Tasks.Extensions.dll -------------------------------------------------------------------------------- /externals/docfx/YamlDotNet.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/YamlDotNet.dll -------------------------------------------------------------------------------- /externals/docfx/docfx.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/docfx.exe -------------------------------------------------------------------------------- /externals/docfx/docfx.exe.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |
5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | -------------------------------------------------------------------------------- /externals/docfx/itextsharp.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/externals/docfx/itextsharp.dll -------------------------------------------------------------------------------- /src/.config/dotnet-tools.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 1, 3 | "isRoot": true, 4 | "tools": { 5 | "dotnet-property": { 6 | "version": "1.0.0.11", 7 | "commands": [ 8 | "dotnet-property" 9 | ] 10 | }, 11 | "powershell": { 12 | "version": "7.0.0", 13 | "commands": [ 14 | "pwsh" 15 | ] 16 | }, 17 | "xunit-cli": { 18 | "version": "0.1.3", 19 | "commands": [ 20 | "xunit" 21 | ] 22 | }, 23 | "coverlet.console": { 24 | "version": "1.7.0", 25 | "commands": [ 26 | "coverlet" 27 | ] 28 | }, 29 | "dotnet-reportgenerator-globaltool": { 30 | "version": "4.5.0", 31 | "commands": [ 32 | "reportgenerator" 33 | ] 34 | }, 35 | "dotnet-aop": { 36 | "version": "2020.2.17.1904", 37 | "commands": [ 38 | "dotnet-aop" 39 | ] 40 | }, 41 | "loxsmoke.mddox": { 42 | "version": "0.5.1", 43 | "commands": [ 44 | "mddox" 45 | ] 46 | }, 47 | "dotnet-project-licenses": { 48 | "version": "1.1.1", 49 | "commands": [ 50 | "dotnet-project-licenses" 51 | ] 52 | }, 53 | "dotnetthx": { 54 | "version": "0.2.0", 55 | "commands": [ 56 | "dotnet-thx" 57 | ] 58 | }, 59 | "dotnet-depends": { 60 | "version": "0.4.0", 61 | "commands": [ 62 | "dotnet-depends" 63 | ] 64 | }, 65 | "dotnet-outdated": { 66 | "version": "2.10.0", 67 | "commands": [ 68 | "dotnet-outdated" 69 | ] 70 | }, 71 | "moniker.cli": { 72 | "version": "1.0.0", 73 | "commands": [ 74 | "moniker" 75 | ] 76 | } 77 | } 78 | } -------------------------------------------------------------------------------- /src/CLIExecute/CLICommandSerialize.cs: -------------------------------------------------------------------------------- 1 | using InterpreterDll; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Text; 5 | using YamlDotNet.Serialization; 6 | using YamlDotNet.Serialization.NamingConventions; 7 | 8 | namespace CLIExecute 9 | { 10 | /// 11 | /// serialize commands 12 | /// 13 | public class CLI_Commandserialize 14 | { 15 | //public static string Serialize(CLICommand_v1 v1) 16 | //{ 17 | // var serializer = new SerializerBuilder().Build(); 18 | // return serializer.Serialize(v1); 19 | //} 20 | //public static ICLICommand_v1 DeSerializeV1(string v1) 21 | //{ 22 | // var deserializer = new DeserializerBuilder() 23 | // .WithNamingConvention(CamelCaseNamingConvention.Instance) 24 | // .Build(); 25 | // return deserializer.Deserialize(v1); 26 | //} 27 | /// 28 | /// Serializes the specified object in YAML 29 | /// 30 | /// The o. 31 | /// 32 | public static string Serialize(object o) 33 | { 34 | var serializer = new SerializerBuilder().Build(); 35 | return serializer.Serialize(o); 36 | } 37 | /// 38 | /// from YAML to CLI_Commands 39 | /// 40 | /// The text. 41 | /// CLI_Commands 42 | public static CLI_Commands DeSerialize(string text) 43 | { 44 | var i = new Interpret(); 45 | text = i.InterpretText(text); 46 | var serializer = new DeserializerBuilder() 47 | //.WithNamingConvention(CamelCaseNamingConvention.Instance) 48 | .Build(); 49 | return serializer.Deserialize(text); 50 | 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/CLIExecute/CLICommand_v1.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Net; 3 | using System.Net.Http; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace CLIExecute 8 | { 9 | /// 10 | /// First type of commands 11 | /// 12 | /// 13 | public class CLICommand_v1 : ICLICommand_v1 14 | { 15 | private string[] possibleFullAddress; 16 | 17 | /// 18 | /// Initializes a new instance of the class. 19 | /// 20 | public CLICommand_v1() 21 | { 22 | 23 | } 24 | /// 25 | /// Gets or sets the name of the command. 26 | /// 27 | /// 28 | /// The name of the command. 29 | /// 30 | public string NameCommand { get; set; } 31 | /// 32 | /// Gets or sets the host. 33 | /// 34 | /// 35 | /// The host. 36 | /// 37 | public string Host { get; set; } 38 | /// 39 | /// Gets or sets the relative request URL. 40 | /// 41 | /// 42 | /// The relative request URL. 43 | /// 44 | public string RelativeRequestUrl { get; set; } 45 | /// 46 | /// Gets or sets the verb. 47 | /// 48 | /// 49 | /// The verb. 50 | /// 51 | public string Verb { get; set; } 52 | /// 53 | /// Gets or sets the type of the content. 54 | /// 55 | /// 56 | /// The type of the content. 57 | /// 58 | public string ContentType { get; set; } = "application/json"; 59 | /// 60 | /// Gets or sets the data to send. 61 | /// 62 | /// 63 | /// The data to send. 64 | /// 65 | public string DataToSend { get; set; } 66 | 67 | 68 | 69 | /// 70 | /// Executes this instance. 71 | /// 72 | /// 73 | /// for the moment, cannot work with {Verb.ToUpper()} 74 | public async Task Execute() 75 | { 76 | if (!Uri.TryCreate(Host,UriKind.Absolute, out Uri newUri)) 77 | { 78 | if(possibleFullAddress.Length == 1) 79 | { 80 | Host = possibleFullAddress[0]; 81 | } 82 | else 83 | { 84 | foreach (var item in possibleFullAddress) 85 | { 86 | if (item.StartsWith(Host)) 87 | { 88 | Host = item; 89 | continue; 90 | } 91 | } 92 | } 93 | } 94 | var h = new HttpClient(); 95 | Console.WriteLine($"host : {Host}"); 96 | Host = Host.Replace("0.0.0.0", "localhost"); 97 | Host = Host.Replace("[::]", "localhost"); 98 | h.BaseAddress = new Uri(Host); 99 | 100 | StringContent sc=null; 101 | if (!string.IsNullOrWhiteSpace(DataToSend)) 102 | { 103 | sc = new StringContent(DataToSend,Encoding.UTF8,ContentType); 104 | } 105 | ; 106 | HttpResponseMessage responseMessage; 107 | switch (Verb.ToUpper()) 108 | { 109 | case "POST": 110 | responseMessage = await h.PostAsync(RelativeRequestUrl, sc); 111 | break; 112 | case "GET": 113 | responseMessage = await h.GetAsync(RelativeRequestUrl); 114 | break; 115 | case "DELETE": 116 | responseMessage = await h.DeleteAsync(RelativeRequestUrl); 117 | break; 118 | case "PUT": 119 | responseMessage = await h.PutAsync(RelativeRequestUrl, sc); 120 | break; 121 | default: 122 | throw new ArgumentException($"for the moment, cannot work with {Verb.ToUpper()}"); 123 | } 124 | 125 | var data = await responseMessage.Content.ReadAsStringAsync(); 126 | return new ReturnValue_v1(responseMessage.StatusCode, data).FromCommand(this); 127 | 128 | } 129 | 130 | /// 131 | /// Sets the possible full hosts . 132 | /// Usefull if you want just pass the start of the host 133 | /// e.g. http 134 | /// 135 | /// The adresses. 136 | public void SetPossibleFullHosts(params string[] adresses) 137 | { 138 | this.possibleFullAddress = adresses; 139 | } 140 | } 141 | } 142 | -------------------------------------------------------------------------------- /src/CLIExecute/CLICommands.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace CLIExecute 7 | { 8 | /// 9 | /// Contains commands to be executed. 10 | /// Now just V1 11 | /// 12 | public class CLI_Commands 13 | { 14 | 15 | private List Commands_v1 { get; set; } = new List(); 16 | 17 | /// 18 | /// Gets or sets the v1 version of commands. 19 | /// 20 | /// 21 | /// The v1 version of commands 22 | /// 23 | public CLICommand_v1[] V1 24 | { 25 | get 26 | { 27 | return Commands_v1?.ToArray(); 28 | } 29 | set 30 | { 31 | Commands_v1 = new List(value); 32 | } 33 | } 34 | /// 35 | /// Finds the commands with name 36 | /// 37 | /// The name. 38 | /// 39 | /// command {name} not found 40 | public ICLICommand[] FindCommands(string name) 41 | { 42 | var names = name 43 | .Split(',') 44 | .Where(it => !string.IsNullOrWhiteSpace(it)) 45 | .Select(it => it.Trim().ToLowerInvariant()) 46 | .ToArray(); 47 | var cmd = V1 48 | .Where(it =>names.Contains(it.NameCommand.Trim().ToLowerInvariant())) 49 | .ToArray(); 50 | 51 | if(cmd.Length != names.Length) 52 | { 53 | //TODO: find names of command that are spelled wrong ;-) 54 | Console.WriteLine($"Web2APICLI:there are {names.Length-cmd.Length} commands names not found"); 55 | } 56 | 57 | if (cmd.Length==0) 58 | { 59 | throw new ArgumentException($"command {name} not found", name); 60 | } 61 | return cmd; 62 | } 63 | /// 64 | /// Adds the command to the list of the commands 65 | /// 66 | /// The command. 67 | /// 68 | /// unsupported type {cmd?.GetType()} 69 | public CLI_Commands AddCommand(ICLICommand cmd) 70 | { 71 | if (cmd is CLICommand_v1 v) 72 | { 73 | Commands_v1.Add(v); 74 | return this; 75 | } 76 | 77 | throw new ArgumentException($"unsupported type {cmd?.GetType()}"); 78 | } 79 | 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /src/CLIExecute/CLIExecute.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | netcoreapp3.1 5 | false 6 | https://github.com/ignatandrei/WebAPI2CLI 7 | Git 8 | WebAPI to CLI 9 | 10 | 11 | This program will execute ASP.NET Core WebAPI from Command Line. 12 | Can be usefull for a CI integration or just making a demo. 13 | Please see https://github.com/ignatandrei/WebAPI2CLI for details 14 | Please see http://msprogrammer.serviciipeweb.ro/category/WEBAPI2CLI/ about how I made it. 15 | 16 | Andrei Ignat 17 | MIT 18 | LICENSE 19 | 20 | 21 | 22 | true 23 | 24 | true 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | True 46 | 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /src/CLIExecute/CLIExecute.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CLIExecute 5 | 6 | 7 | 8 | 9 | Contains commands to be executed. 10 | Now just V1 11 | 12 | 13 | 14 | 15 | Gets or sets the v1 version of commands. 16 | 17 | 18 | The v1 version of commands 19 | 20 | 21 | 22 | 23 | Finds the commands with name 24 | 25 | The name. 26 | 27 | command {name} not found 28 | 29 | 30 | 31 | Adds the command to the list of the commands 32 | 33 | The command. 34 | 35 | unsupported type {cmd?.GetType()} 36 | 37 | 38 | 39 | serialize commands 40 | 41 | 42 | 43 | 44 | Serializes the specified object in YAML 45 | 46 | The o. 47 | 48 | 49 | 50 | 51 | from YAML to CLI_Commands 52 | 53 | The text. 54 | CLI_Commands 55 | 56 | 57 | 58 | First type of commands 59 | 60 | 61 | 62 | 63 | 64 | Initializes a new instance of the class. 65 | 66 | 67 | 68 | 69 | Gets or sets the name of the command. 70 | 71 | 72 | The name of the command. 73 | 74 | 75 | 76 | 77 | Gets or sets the host. 78 | 79 | 80 | The host. 81 | 82 | 83 | 84 | 85 | Gets or sets the relative request URL. 86 | 87 | 88 | The relative request URL. 89 | 90 | 91 | 92 | 93 | Gets or sets the verb. 94 | 95 | 96 | The verb. 97 | 98 | 99 | 100 | 101 | Gets or sets the type of the content. 102 | 103 | 104 | The type of the content. 105 | 106 | 107 | 108 | 109 | Gets or sets the data to send. 110 | 111 | 112 | The data to send. 113 | 114 | 115 | 116 | 117 | Executes this instance. 118 | 119 | 120 | for the moment, cannot work with {Verb.ToUpper()} 121 | 122 | 123 | 124 | Sets the possible full hosts . 125 | Usefull if you want just pass the start of the host 126 | e.g. http 127 | 128 | The adresses. 129 | 130 | 131 | 132 | Executes multiple commands 133 | 134 | 135 | 136 | 137 | Initializes a new instance of the class. 138 | 139 | The configuration. 140 | The server addresses. 141 | The API. 142 | The service provider. 143 | 144 | 145 | 146 | has some commands to executed in CLI_Commands 147 | 148 | 149 | 150 | 151 | 152 | find commands to execute. 153 | 154 | 155 | 156 | 157 | 158 | Executes the commands. 159 | 160 | 161 | 162 | 163 | Executes this instance. 164 | 165 | 166 | 167 | 168 | CLI_HELP ==1 169 | 170 | true/false 171 | 172 | 173 | 174 | Describes the command to be executed 175 | 176 | 177 | 178 | 179 | Gets or sets the name of the command. 180 | 181 | 182 | The name of the command. 183 | 184 | 185 | 186 | 187 | Gets or sets the host. 188 | 189 | 190 | The host. 191 | 192 | 193 | 194 | 195 | Gets or sets the relative request URL. 196 | 197 | 198 | The relative request URL. 199 | 200 | 201 | 202 | 203 | Gets or sets the verb. 204 | 205 | 206 | The verb. 207 | 208 | 209 | 210 | 211 | Sets the possible full hosts . 212 | Usefull if you want just pass the start of the host 213 | e.g. http 214 | 215 | The adresses. 216 | 217 | 218 | 219 | first type of commands 220 | 221 | 222 | 223 | 224 | 225 | Gets or sets the data to send. 226 | 227 | 228 | The data to send. 229 | 230 | 231 | 232 | 233 | Executes this instance. 234 | 235 | 236 | 237 | 238 | 239 | return value for WebAPI 240 | 241 | 242 | 243 | 244 | Initializes a new instance of the class. 245 | 246 | The status code. 247 | 248 | 249 | 250 | Initializes a new instance of the class. 251 | 252 | The status code. 253 | The result. 254 | 255 | 256 | 257 | Gets the command that was executed 258 | 259 | 260 | The command. 261 | 262 | 263 | 264 | 265 | Gets the status code received 266 | 267 | 268 | The status code. 269 | 270 | 271 | 272 | 273 | Gets the result. 274 | 275 | 276 | The result. 277 | 278 | 279 | 280 | 281 | -------------------------------------------------------------------------------- /src/CLIExecute/Dictionary.cs: -------------------------------------------------------------------------------- 1 | namespace CLIExecute 2 | { 3 | internal class Dictionary 4 | { 5 | public Dictionary() 6 | { 7 | } 8 | } 9 | } -------------------------------------------------------------------------------- /src/CLIExecute/Executor.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Hosting.Server.Features; 2 | using Microsoft.AspNetCore.Mvc.Abstractions; 3 | using Microsoft.AspNetCore.Mvc.ApiExplorer; 4 | using Microsoft.AspNetCore.Mvc.ModelBinding; 5 | using Microsoft.Extensions.Configuration; 6 | using System; 7 | using System.Collections.Generic; 8 | using System.IO; 9 | using System.Linq; 10 | using System.Reflection; 11 | using System.Runtime.CompilerServices; 12 | using System.Runtime.Serialization; 13 | using System.Text; 14 | using System.Text.Json; 15 | using System.Threading.Tasks; 16 | [assembly: InternalsVisibleTo("CLITests")] 17 | namespace CLIExecute 18 | { 19 | /// 20 | /// Executes multiple commands 21 | /// 22 | public class Executor 23 | { 24 | static Executor() 25 | { 26 | var assName = Assembly.GetExecutingAssembly().GetName(); 27 | Console.WriteLine($"Web2APICLI:{assName.Name} version:{assName.Version.ToString()}"); 28 | } 29 | private readonly IServerAddressesFeature serverAddresses; 30 | private readonly IApiDescriptionGroupCollectionProvider api; 31 | private readonly IServiceProvider serviceProvider; 32 | private readonly IConfiguration configuration; 33 | /// 34 | /// Initializes a new instance of the class. 35 | /// 36 | /// The configuration. 37 | /// The server addresses. 38 | /// The API. 39 | /// The service provider. 40 | public Executor(IConfiguration configuration, IServerAddressesFeature serverAddresses,IApiDescriptionGroupCollectionProvider api, IServiceProvider serviceProvider) 41 | { 42 | this.serverAddresses = serverAddresses; 43 | this.api = api; 44 | this.serviceProvider = serviceProvider; 45 | this.configuration = configuration; 46 | } 47 | 48 | private string NameCommandsToExecute() 49 | { 50 | //return configuration.GetValue("CLI_Commands"); 51 | return configuration["CLI_Commands"]; 52 | } 53 | /// 54 | /// has some commands to executed in CLI_Commands 55 | /// 56 | /// 57 | public bool ShouldExecuteCommands() 58 | { 59 | return !string.IsNullOrWhiteSpace(NameCommandsToExecute()); 60 | } 61 | internal static CLI_Commands FindAllCommands() 62 | { 63 | string nameFile = "cli.txt"; 64 | if (!File.Exists(nameFile)) 65 | throw new FileNotFoundException( 66 | $"cannot find {nameFile} in {Environment.CurrentDirectory}",nameFile); 67 | 68 | var fileContents = File.ReadAllText(nameFile).Trim(); 69 | var s = CLI_Commandserialize.DeSerialize(fileContents); 70 | return s; 71 | } 72 | /// 73 | /// find commands to execute. 74 | /// 75 | /// 76 | public ICLICommand[] CommandsToExecute() 77 | { 78 | 79 | return FindAllCommands().FindCommands(NameCommandsToExecute()); 80 | } 81 | /// 82 | /// Executes the commands. 83 | /// 84 | /// The writer, console.out 85 | public async Task ExecuteCommands(TextWriter tw) 86 | { 87 | var cmds = CommandsToExecute(); 88 | foreach (var cmd in cmds) 89 | if (cmd is ICLICommand_v1 v1) 90 | { 91 | v1.SetPossibleFullHosts(serverAddresses.Addresses.ToArray()); 92 | try 93 | { 94 | 95 | Console.WriteLine($"Web2APICLI:executing {v1.NameCommand}"); 96 | var x = await v1.Execute(); 97 | tw.WriteLine(JsonSerializer.Serialize(x, new JsonSerializerOptions() 98 | { 99 | WriteIndented = true 100 | })); 101 | } 102 | catch (Exception ex) 103 | { 104 | Console.WriteLine(ex); 105 | 106 | } 107 | } 108 | } 109 | /// 110 | /// Executes this instance. 111 | /// 112 | public async Task Execute() 113 | { 114 | if (ShouldShowHelp()) 115 | { 116 | Console.WriteLine("Web2APICLI:put this in a cli.txt file in the same path as the exe:"); 117 | Console.WriteLine(""); 118 | var api= EnumerateWebAPI(); 119 | Console.WriteLine(api); 120 | Console.WriteLine(""); 121 | Console.WriteLine("Web2APICLI:then run the exe with following parameters :"); 122 | Console.WriteLine("--CLI_ENABLED=1 --CLI_Commands=\"Command001,Command002,...\""); 123 | Console.WriteLine(""); 124 | try 125 | { 126 | File.WriteAllText("cli.txt", api); 127 | } 128 | catch(Exception ex) 129 | { 130 | Console.WriteLine("Web2APICLI:cannot write cli.txt because " + ex.Message); 131 | } 132 | } 133 | TextWriter sw = Console.Out; 134 | string nameFile = FileNameToWrite() ; 135 | bool shouldWrite = !string.IsNullOrEmpty(nameFile); 136 | if (shouldWrite) 137 | { 138 | sw = new StreamWriter(nameFile, true); 139 | } 140 | 141 | if (ShouldExecuteCommands()) 142 | await ExecuteCommands(sw); 143 | 144 | if (shouldWrite) 145 | sw.Close(); 146 | 147 | } 148 | /// 149 | /// Files the name to write the commands 150 | /// 151 | /// 152 | public string FileNameToWrite() 153 | { 154 | return configuration["CLI_FILENAME"]; 155 | } 156 | /// 157 | /// CLI_HELP ==1 158 | /// 159 | /// true/false 160 | public bool ShouldShowHelp() 161 | { 162 | //deleted for easy of automating testing 163 | //var showHelp = configuration.GetValue("CLI_HELP", null); 164 | var cliHelp = configuration["CLI_HELP"]; 165 | var showHelp = int.TryParse(cliHelp, out var val) && val == 1; 166 | return showHelp; 167 | } 168 | private string EnumerateWebAPI() 169 | { 170 | var allAdresses = serverAddresses.Addresses.ToArray(); 171 | var nr = 0; 172 | 173 | var groups = api.ApiDescriptionGroups; 174 | var allCommands = new CLI_Commands(); 175 | foreach (var g in groups.Items) 176 | { 177 | 178 | foreach (var api in g.Items) 179 | { 180 | 181 | foreach (var adress in allAdresses) 182 | { 183 | var v1 = serviceProvider.GetService(typeof(ICLICommand_v1))as ICLICommand_v1; 184 | 185 | v1.NameCommand = $"Command{(++nr).ToString("00#")}"; 186 | //v1.Host = new Uri(adress).GetLeftPart(UriPartial.Authority); 187 | v1.Host = new Uri(adress).GetLeftPart(UriPartial.Scheme); 188 | v1.RelativeRequestUrl = api.RelativePath; 189 | v1.Verb = api.HttpMethod; 190 | v1.DataToSend = GetJsonFromParameters(api.ParameterDescriptions.ToArray()); 191 | allCommands.AddCommand(v1); 192 | 193 | } 194 | } 195 | } 196 | var serialize = CLI_Commandserialize.Serialize(allCommands); 197 | return serialize; 198 | } 199 | private string GetJsonFromParameters(ApiParameterDescription[] parameterDescriptions) 200 | { 201 | if (parameterDescriptions?.Length == 0) 202 | return null; 203 | 204 | var desc = new Dictionary(); 205 | var pdAll = parameterDescriptions 206 | .Where(it => it != null) 207 | .Select(it => it.ParameterDescriptor) 208 | .Where(it => it != null) 209 | .Distinct() 210 | .ToArray(); 211 | var strType = typeof(string).FullName; 212 | foreach (var pd in pdAll) 213 | { 214 | var strValue = ""; 215 | 216 | switch (pd.ParameterType) 217 | { 218 | case Type T when T.FullName == strType: 219 | strValue = "\"\""; 220 | 221 | break; 222 | case Type T when T.IsValueType: 223 | strValue = GetDefaultValue(T).ToString(); 224 | break; 225 | 226 | case Type T: 227 | var o = FormatterServices.GetUninitializedObject(T); 228 | strValue= JsonSerializer.Serialize(o); 229 | break; 230 | } 231 | desc.Add(pd.Name, (strValue, pd)); 232 | } 233 | var okBindingSource = new[] 234 | { 235 | BindingSource.Body, 236 | BindingSource.Form 237 | }; 238 | var code = 239 | string.Join(",", 240 | desc 241 | .Where(pd => 242 | pd.Value.pd?.BindingInfo?.BindingSource != null && 243 | okBindingSource.Contains(pd.Value.pd.BindingInfo.BindingSource)) 244 | .Select(it => $"{it.Value.value}") 245 | .ToArray()); 246 | 247 | return code; 248 | } 249 | internal static object GetDefaultValue(Type t) 250 | { 251 | if (t.IsValueType) 252 | return Activator.CreateInstance(t); 253 | if (t.FullName == typeof(string).FullName) 254 | { 255 | return default(string); 256 | } 257 | 258 | return null; 259 | } 260 | } 261 | } 262 | -------------------------------------------------------------------------------- /src/CLIExecute/ICLICommand_v1.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | 3 | namespace CLIExecute 4 | { 5 | /// 6 | /// Describes the command to be executed 7 | /// 8 | public interface ICLICommand 9 | { 10 | /// 11 | /// Gets or sets the name of the command. 12 | /// 13 | /// 14 | /// The name of the command. 15 | /// 16 | string NameCommand { get; set; } 17 | /// 18 | /// Gets or sets the host. 19 | /// 20 | /// 21 | /// The host. 22 | /// 23 | string Host { get; set; } 24 | /// 25 | /// Gets or sets the relative request URL. 26 | /// 27 | /// 28 | /// The relative request URL. 29 | /// 30 | string RelativeRequestUrl { get; set; } 31 | /// 32 | /// Gets or sets the verb. 33 | /// 34 | /// 35 | /// The verb. 36 | /// 37 | string Verb { get; set; } 38 | 39 | /// 40 | /// Sets the possible full hosts . 41 | /// Usefull if you want just pass the start of the host 42 | /// e.g. http 43 | /// 44 | /// The adresses. 45 | void SetPossibleFullHosts(params string[] adresses); 46 | 47 | } 48 | /// 49 | /// first type of commands 50 | /// 51 | /// 52 | public interface ICLICommand_v1: ICLICommand 53 | { 54 | 55 | /// 56 | /// Gets or sets the data to send. 57 | /// 58 | /// 59 | /// The data to send. 60 | /// 61 | string DataToSend { get; set; } 62 | /// 63 | /// Executes this instance. 64 | /// 65 | /// 66 | Task Execute(); 67 | } 68 | } -------------------------------------------------------------------------------- /src/CLIExecute/ReturnValue.cs: -------------------------------------------------------------------------------- 1 | using System.Net; 2 | 3 | namespace CLIExecute 4 | { 5 | /// 6 | /// return value for WebAPI 7 | /// 8 | public class ReturnValue_v1 9 | { 10 | /// 11 | /// Initializes a new instance of the class. 12 | /// 13 | /// The status code. 14 | public ReturnValue_v1(HttpStatusCode statusCode):this(statusCode,null) 15 | { 16 | 17 | } 18 | /// 19 | /// Initializes a new instance of the class. 20 | /// 21 | /// The status code. 22 | /// The result. 23 | public ReturnValue_v1(HttpStatusCode statusCode,string result) 24 | { 25 | StatusCode = statusCode; 26 | Result = result; 27 | } 28 | /// 29 | /// Gets the command that was executed 30 | /// 31 | /// 32 | /// The command. 33 | /// 34 | public ICLICommand Command { get; private set; } 35 | 36 | /// 37 | /// Gets the status code received 38 | /// 39 | /// 40 | /// The status code. 41 | /// 42 | public HttpStatusCode StatusCode { get; private set; } 43 | /// 44 | /// Gets the result. 45 | /// 46 | /// 47 | /// The result. 48 | /// 49 | public string Result { get; private set; } 50 | 51 | 52 | internal ReturnValue_v1 FromCommand(ICLICommand cmd) 53 | { 54 | this.Command = cmd; 55 | return this; 56 | } 57 | 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/CLITests/CLITests.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | netcoreapp3.1 5 | 6 | false 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | PreserveNewest 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | all 28 | runtime; build; native; contentfiles; analyzers; buildtransitive 29 | 30 | 31 | all 32 | runtime; build; native; contentfiles; analyzers; buildtransitive 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /src/CLITests/TestDefaultValue.cs: -------------------------------------------------------------------------------- 1 | using CLIExecute; 2 | using FluentAssertions; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Text; 6 | using Xbehave; 7 | 8 | namespace CLITests 9 | { 10 | public class TestDefaultValue 11 | { 12 | [Scenario] 13 | [Example(typeof(int), 0)] 14 | [Example(typeof(string), default(string))] 15 | public void TestGetDefaultValue(Type type, object value) 16 | { 17 | object result = null; 18 | $"when testing {nameof(Executor.GetDefaultValue)} with {type.Name}".x(() => 19 | { 20 | result = Executor.GetDefaultValue(type); 21 | }); 22 | $"then the resulted value {result} should be {value}".x(() => 23 | { 24 | result.Should().BeEquivalentTo(value); 25 | }); 26 | 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/CLITests/TestExecutorWithFakes.cs: -------------------------------------------------------------------------------- 1 | using CLIExecute; 2 | using FluentAssertions; 3 | using Microsoft.Extensions.Configuration; 4 | using Moq; 5 | using System; 6 | using System.Collections.Generic; 7 | using System.Text; 8 | using Xbehave; 9 | 10 | namespace CLITests 11 | { 12 | public class TestExecutorWithFakes 13 | { 14 | [Scenario] 15 | [Example("Test_Get_Add_Http", 1)] 16 | [Example("test_get_add_http", 1)] 17 | [Example("GetMathId_Http", 1)] 18 | [Example("MathPOST", 1)] 19 | [Example("MathPut", 1)] 20 | [Example("MathDelete", 1)] 21 | [Example("WeatherGet", 1)] 22 | [Example("WeatherGet,MathDelete", 2)] 23 | [Example("WeatherGet,NotExistThisCommand", 1)] 24 | [Example("NotExistThisCommand", 0)] 25 | public void TestRetrieveCommand(string command, int numberCommandsFound) 26 | { 27 | Executor e = null; 28 | $"creating executor with fake ".x(() => 29 | { 30 | var m = new Mock(); 31 | m.Setup(it => it["CLI_Commands"]) 32 | .Returns(command); 33 | 34 | e = new Executor(m.Object, null, null, null); 35 | }); 36 | if(numberCommandsFound>0) 37 | $"then asking for commands should retrieve only {command}".x(() => 38 | { 39 | var execs = e.CommandsToExecute(); 40 | execs.Should().NotBeNull(); 41 | execs.Should().HaveCount(numberCommandsFound); 42 | if( command.IndexOf(",")<0) 43 | execs[0].NameCommand.Should().BeEquivalentTo(command); 44 | }); 45 | if (numberCommandsFound == 0) 46 | { 47 | $"then asking for a command that not exists with name: {command}".x(() => 48 | { 49 | e.Invoking(e => e.CommandsToExecute()) 50 | .Should().Throw() 51 | ; 52 | }); 53 | } 54 | $"then asking for ShouldExecuteCommands should return {command?.Length > 0}".x(() => 55 | { 56 | var shouldExecute = e.ShouldExecuteCommands(); 57 | shouldExecute.Should().Be((command?.Length > 0)); 58 | }); 59 | } 60 | [Scenario] 61 | [Example("1", true)] 62 | [Example("0", false)] 63 | [Example("", false)] 64 | [Example(null, false)] 65 | public void TestShowHelp(string commandValue, bool showHelp) 66 | { 67 | Executor e = null; 68 | $"creating executor with fake ".x(() => 69 | { 70 | var m = new Mock(); 71 | m.Setup(it => it["CLI_HELP"]) 72 | .Returns(commandValue); 73 | 74 | e = new Executor(m.Object, null, null, null); 75 | }); 76 | $"then asking for ShowHelp should return {showHelp}".x(() => 77 | { 78 | var execs = e.ShouldShowHelp(); 79 | execs.Should().Be(showHelp); 80 | }); 81 | } 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /src/CLITests/TestMath.cs: -------------------------------------------------------------------------------- 1 | using CLIExecute; 2 | using ExtensionNetCore3; 3 | using FluentAssertions; 4 | using Microsoft.AspNetCore; 5 | using Microsoft.AspNetCore.Hosting; 6 | using Microsoft.AspNetCore.Hosting.Server.Features; 7 | using Microsoft.AspNetCore.Mvc.Testing; 8 | using Microsoft.AspNetCore.TestHost; 9 | using Microsoft.Extensions.Configuration; 10 | using System; 11 | using System.Collections.Generic; 12 | using System.IO; 13 | using System.Linq; 14 | using System.Net; 15 | using System.Net.Security; 16 | using System.Security.Cryptography.X509Certificates; 17 | using System.Text; 18 | using System.Text.Json; 19 | using System.Threading.Tasks; 20 | using TestWebAPISite; 21 | using Xbehave; 22 | using Xunit; 23 | 24 | namespace CLITests 25 | { 26 | public class LocalServerFactory : WebApplicationFactory 27 | where TStartup : class 28 | { 29 | private const string _LocalhostBaseAddress = "https://localhost"; 30 | private IWebHost _host; 31 | public LocalServerFactory() 32 | { 33 | ClientOptions.BaseAddress = new Uri(_LocalhostBaseAddress); 34 | // Breaking change while migrating from 2.2 to 3.1, TestServer was not called anymore 35 | CreateServer(CreateWebHostBuilder()); 36 | } 37 | public string RootUri { get; private set; } 38 | protected override TestServer CreateServer(IWebHostBuilder builder) 39 | { 40 | 41 | 42 | _host = builder.Build(); 43 | _host.Start(); 44 | RootUri = _host.ServerFeatures.Get().Addresses.LastOrDefault(); 45 | // not used but needed in the CreateServer method logic 46 | 47 | return new TestServer(new WebHostBuilder().UseStartup()); 48 | } 49 | protected override IWebHostBuilder CreateWebHostBuilder() 50 | { 51 | var args=new[] 52 | { 53 | "CLI_ENABLED=1", 54 | "CLI_STAY=1" 55 | }; 56 | var builder = WebHost.CreateDefaultBuilder(Array.Empty()) 57 | .ConfigureKestrel(opt => 58 | { 59 | opt.ConfigureHttpsDefaults(a => 60 | { 61 | a.AllowAnyClientCertificate(); 62 | }); 63 | }).UseKestrel(options => { 64 | options.Listen(IPAddress.Loopback, 5080); //HTTP port 65 | }) 66 | ; 67 | builder.UseStartup(); 68 | 69 | //builder.UseSetting("CLI_ENABLED", "1"); 70 | //builder.UseSetting("CLI_STAY", "1"); 71 | //builder.UseSetting("CLI_Commands", "Test_Get_Add"); 72 | return builder; 73 | } 74 | protected override void Dispose(bool disposing) 75 | { 76 | base.Dispose(disposing); 77 | if (disposing) 78 | { 79 | _host?.Dispose(); 80 | } 81 | } 82 | } 83 | 84 | public class TestActions : IClassFixture> 85 | { 86 | private readonly LocalServerFactory factoryConfig; 87 | public TestActions(LocalServerFactory factoryConfig) 88 | { 89 | 90 | this.factoryConfig = factoryConfig; 91 | } 92 | //private WebApplicationFactory ConfigureServices(WebApplicationFactory f, string command) 93 | //{ 94 | // var projectDir = Directory.GetCurrentDirectory(); 95 | // var configPath = Path.Combine(projectDir, $"appsettingsEnableCLI.json"); 96 | // f.ClientOptions.BaseAddress= new Uri("https://localhost:5000"); 97 | // return f.WithWebHostBuilder(builder => 98 | // { 99 | // builder.UseSetting("CLI_STAY", "1"); 100 | // builder.UseSetting("CLI_Commands", command); 101 | // //builder.Start(); 102 | // }); 103 | 104 | //} 105 | [Scenario] 106 | [Example("Test_Get_Add_Http", "[1,2]")] 107 | [Example("GetMathId_Http", "value5")] 108 | [Example("MathPOST","")] 109 | [Example("MathPut","")] 110 | [Example("MathDelete", "")] 111 | [Example("WeatherGet", "[{\"date\":\"1970-04-17T00:00:00\",\"temperatureC\":-10,\"temperatureF\":15,\"summary\":\"Bracing\"},{\"date\":\"1970-04-18T00:00:00\",\"temperatureC\":0,\"temperatureF\":32,\"summary\":\"Chilly\"},{\"date\":\"1970-04-19T00:00:00\",\"temperatureC\":10,\"temperatureF\":49,\"summary\":\"Cool\"},{\"date\":\"1970-04-20T00:00:00\",\"temperatureC\":20,\"temperatureF\":67,\"summary\":\"Mild\"},{\"date\":\"1970-04-21T00:00:00\",\"temperatureC\":30,\"temperatureF\":85,\"summary\":\"Warm\"}]")] 112 | public void TestCommand(string commandToExecute, string result, CLIAPIHostedService service) 113 | { 114 | var newFactory = this.factoryConfig;// ConfigureServices(this.factoryConfig, commandToExecute); ; 115 | string address = newFactory.RootUri; 116 | $"Given the starting addresses configured {address} ".x(() => 117 | { 118 | 119 | }); 120 | //$"When asking for the service {typeof(CLIAPIHostedService)}".x(() => 121 | //{ 122 | // service = newFactory.Services.GetService(typeof(CLIAPIHostedService)) as CLIAPIHostedService; 123 | //}); 124 | 125 | //$"Then the service should exists ".x(() => 126 | //{ 127 | 128 | // service.Should().NotBeNull(); 129 | 130 | //}); 131 | //$"And the executor should execute the command".x(async () => 132 | //{ 133 | // return; 134 | // var c = newFactory.CreateClient(); 135 | // //var r = await c.GetAsync("api/Mathadd"); 136 | // //r.StatusCode.Should().Be(HttpStatusCode.OK); 137 | // await Task.Delay(10000); 138 | // var cmds = service.exec?.CommandsToExecute(); 139 | // cmds.Should().NotBeNull(); 140 | // cmds?.Length.Should().Be(1); 141 | // cmds[0].NameCommand.Should().Be(commandToExecute); 142 | 143 | //}); 144 | CLI_Commands cmds = null; 145 | $"When finding all commands".x(() => 146 | { 147 | cmds = Executor.FindAllCommands(); 148 | cmds.V1.Should().NotBeNull(); 149 | cmds.V1.Length.Should().BeGreaterThan(0); 150 | }); 151 | $"and the execution of {commandToExecute} should be 200 and the result {result} ".x(async () => 152 | { 153 | 154 | ServicePointManager.ServerCertificateValidationCallback = delegate { return true; }; 155 | var find = cmds.FindCommands(commandToExecute); 156 | find.Should().NotBeNull(); 157 | find.Length.Should().Be(1); 158 | var v1 = find[0] as ICLICommand_v1; 159 | v1.Should().NotBeNull(); 160 | v1.SetPossibleFullHosts(newFactory.RootUri); 161 | var res = await v1.Execute(); 162 | res.StatusCode.Should().Be(HttpStatusCode.OK); 163 | res.Result.Should().Be(result); 164 | }); 165 | 166 | } 167 | } 168 | } -------------------------------------------------------------------------------- /src/CLITests/TestRest.cs: -------------------------------------------------------------------------------- 1 | using ExtensionNetCore3; 2 | using FluentAssertions; 3 | using Microsoft.AspNetCore.Mvc.Testing; 4 | using Microsoft.Extensions.Configuration; 5 | using Microsoft.Extensions.Hosting; 6 | using System; 7 | using System.Collections.Generic; 8 | using System.IO; 9 | using System.Threading.Tasks; 10 | using TestWebAPISite; 11 | using Xbehave; 12 | using Xunit; 13 | 14 | namespace CLITests 15 | { 16 | public class TestAllServices: 17 | IClassFixture> 18 | { 19 | private Dictionary> _factory=new Dictionary>() ; 20 | 21 | public TestAllServices(WebApplicationFactory factoryConfig) 22 | { 23 | 24 | 25 | _factory.Add(false, factoryConfig); 26 | var factoryConfig1 = ConfigureServices(factoryConfig); 27 | var b = factoryConfig != factoryConfig1; 28 | _factory.Add(true, factoryConfig1); 29 | } 30 | private WebApplicationFactory ConfigureServices(WebApplicationFactory f) 31 | { 32 | var projectDir = Directory.GetCurrentDirectory(); 33 | var configPath = Path.Combine(projectDir, $"appsettingsEnableCLI.json"); 34 | 35 | return f.WithWebHostBuilder(builder => 36 | { 37 | //builder.ConfigureAppConfiguration((context, conf) => 38 | //{ 39 | // conf.AddJsonFile(configPath); 40 | //}); 41 | builder.UseSetting("CLI_ENABLED", "1"); 42 | 43 | }); 44 | 45 | } 46 | [Scenario] 47 | [Example(true)] 48 | [Example(false)] 49 | public void TestService(bool WithConfiguration, WebApplicationFactory f, object service) 50 | { 51 | $"Given the factory configured {WithConfiguration}".x(() => 52 | { 53 | f = _factory[WithConfiguration]; 54 | }); 55 | $"When asking for the service {typeof(CLIAPIHostedService)}".x(() => 56 | { 57 | service = f.Services.GetService(typeof(CLIAPIHostedService)); 58 | }); 59 | 60 | $"Then the service should exists ".x(() => 61 | { 62 | service.Should().BeOfType(); 63 | 64 | }); 65 | $"Then service should be enabled: {WithConfiguration} ".x(() => 66 | { 67 | var cliService = service as CLIAPIHostedService; 68 | cliService.IsEnabled().Should().Be(WithConfiguration); 69 | 70 | }); 71 | $"Then later the app should be transmitted".x(async () => 72 | { 73 | var cliService = service as CLIAPIHostedService; 74 | await Task.Delay(10 * 1000); 75 | cliService.ExistsApp().Should().BeTrue(); 76 | 77 | }); 78 | 79 | } 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /src/CLITests/appsettingsEnableCLI.json: -------------------------------------------------------------------------------- 1 | { 2 | "CLI_ENABLED": 1 3 | 4 | } -------------------------------------------------------------------------------- /src/ExtensionNetCore3/CLIAPIHostedService.cs: -------------------------------------------------------------------------------- 1 | using CLIExecute; 2 | using Microsoft.AspNetCore.Builder; 3 | using Microsoft.AspNetCore.Hosting.Server.Features; 4 | using Microsoft.AspNetCore.Mvc.ApiExplorer; 5 | using Microsoft.AspNetCore.Mvc.ModelBinding; 6 | using Microsoft.Extensions.Configuration; 7 | using Microsoft.Extensions.Hosting; 8 | using System; 9 | using System.Collections.Generic; 10 | using System.Linq; 11 | using System.Runtime.CompilerServices; 12 | using System.Threading; 13 | using System.Threading.Tasks; 14 | [assembly: InternalsVisibleTo("CLITests")] 15 | namespace ExtensionNetCore3 16 | { 17 | 18 | /// 19 | /// The service that starts execution of the CLI 20 | /// TODO: add IHostApplicationLifetime DI instead of Environment.Exit 21 | /// 22 | /// 23 | public class CLIAPIHostedService : IHostedService 24 | { 25 | private readonly IApiDescriptionGroupCollectionProvider api; 26 | private readonly IConfiguration configuration; 27 | private IServerAddressesFeature serverAddresses; 28 | /// The application builder. 29 | /// It is passed when UseCLI 30 | /// 31 | public IApplicationBuilder app; 32 | private Timer _timer; 33 | /// 34 | /// Initializes a new instance of the class. 35 | /// 36 | /// The API for find the WebAPI 37 | /// The configuration to find CLI commands 38 | public CLIAPIHostedService(IApiDescriptionGroupCollectionProvider api, IConfiguration configuration) 39 | { 40 | this.api = api; 41 | this.configuration = configuration; 42 | } 43 | /// 44 | /// Determines whether this instance is enabled. 45 | /// 46 | /// 47 | /// true if this instance is enabled; otherwise, false. 48 | /// 49 | public bool IsEnabled() 50 | { 51 | return configuration.GetValue("CLI_ENABLED") == 1; 52 | } 53 | /// 54 | /// Triggered when the application host is ready to start the service. 55 | /// It works after server addresses is available 56 | /// 57 | /// Indicates that the start process has been aborted. 58 | /// 59 | public Task StartAsync(CancellationToken cancellationToken) 60 | { 61 | if (IsEnabled()) 62 | { 63 | _timer = new Timer(DoWork, null, TimeSpan.Zero, TimeSpan.FromSeconds(5)); 64 | } 65 | 66 | return Task.CompletedTask; 67 | 68 | } 69 | /// 70 | /// Default: false 71 | /// If true , executes and then not exits. 72 | /// If false , executes and then exits. 73 | /// 74 | /// CLI_STAY ==1 75 | public bool ShouldStay() 76 | { 77 | return configuration.GetValue("CLI_STAY") == 1; 78 | } 79 | /// 80 | /// Waits to see if the app exists. 81 | /// It is passed later in the lifecycle 82 | /// 83 | /// 84 | public bool ExistsApp() 85 | { 86 | return (app != null); 87 | 88 | } 89 | private async void DoWork(object state) 90 | { 91 | if (!ExistsApp()) 92 | { 93 | Console.WriteLine("WebAPI2CLI: waiting to have app"); 94 | return; 95 | } 96 | 97 | 98 | serverAddresses = app.ServerFeatures.Get(); 99 | if (serverAddresses == null) 100 | { 101 | Console.WriteLine("WebAPI2CLI: waiting to have server adresses"); 102 | return; 103 | } 104 | 105 | _timer.Dispose(); 106 | exec = new Executor(configuration, serverAddresses, api, app.ApplicationServices); 107 | await exec.Execute(); 108 | 109 | if (!ShouldStay()) 110 | Environment.Exit(0); 111 | 112 | 113 | } 114 | internal Executor exec; 115 | /// 116 | /// Triggered when the application host is performing a graceful shutdown. 117 | /// 118 | /// Indicates that the shutdown process should no longer be graceful. 119 | /// 120 | public Task StopAsync(CancellationToken cancellationToken) 121 | { 122 | return Task.CompletedTask; 123 | } 124 | 125 | 126 | } 127 | } 128 | -------------------------------------------------------------------------------- /src/ExtensionNetCore3/CLIExtension.cs: -------------------------------------------------------------------------------- 1 | using CLIExecute; 2 | using Microsoft.AspNetCore.Builder; 3 | using Microsoft.AspNetCore.Hosting; 4 | using Microsoft.AspNetCore.Mvc; 5 | using Microsoft.AspNetCore.Mvc.ApiExplorer; 6 | using Microsoft.AspNetCore.Mvc.Infrastructure; 7 | using Microsoft.AspNetCore.Routing; 8 | using Microsoft.Extensions.DependencyInjection; 9 | using Microsoft.Extensions.DependencyInjection.Extensions; 10 | using Microsoft.Net.Http.Headers; 11 | using System; 12 | using System.Collections.Generic; 13 | using System.IO; 14 | using System.IO.Compression; 15 | using System.Linq; 16 | using System.Net.Http.Headers; 17 | using System.Reflection; 18 | using System.Text; 19 | 20 | namespace ExtensionNetCore3 21 | { 22 | /// 23 | /// helper extension class 24 | /// 25 | public static class CLIExtension 26 | { 27 | static CLIExtension() 28 | { 29 | var assName = Assembly.GetExecutingAssembly().GetName(); 30 | Console.WriteLine($"Web2APICLI:{assName.Name} version:{assName.Version.ToString()}"); 31 | 32 | } 33 | 34 | /// 35 | /// Helper method to be used at 36 | /// public void ConfigureServices 37 | /// 38 | /// 39 | /// 40 | public static IServiceCollection AddCLI(this IServiceCollection serviceCollection) 41 | { 42 | Console.WriteLine($"Web2APICLI:For more details please refer to about Web2APICLI refer to https://github.com/ignatandrei/WebAPI2CLI"); 43 | 44 | serviceCollection.TryAddSingleton(); 45 | serviceCollection.TryAddEnumerable( 46 | ServiceDescriptor.Transient()); 47 | 48 | 49 | serviceCollection.AddSingleton(); 50 | 51 | serviceCollection.AddHostedService(p => p.GetService()); 52 | serviceCollection.AddTransient(sc => new CLICommand_v1()); 53 | return serviceCollection; 54 | } 55 | 56 | /// 57 | /// Helper method to be used at 58 | /// public void Configure 59 | /// 60 | /// 61 | /// 62 | public static IApplicationBuilder UseCLI(this IApplicationBuilder app) 63 | { 64 | 65 | var service = app.ApplicationServices.GetService(); 66 | service.app = app; 67 | return app; 68 | } 69 | 70 | /// 71 | /// Makes the zip of the app to download 72 | /// 73 | /// The endpoints. 74 | /// App builder. 75 | public static void MapZip(this IEndpointRouteBuilder endpoints, IApplicationBuilder app) 76 | { 77 | //see more at 78 | //https://andrewlock.net/converting-a-terminal-middleware-to-endpoint-routing-in-aspnetcore-3/ 79 | endpoints.Map("/zip", async context => 80 | { 81 | var response = context.Response; 82 | var name = Assembly.GetEntryAssembly().GetName().Name + ".zip"; 83 | response.ContentType = "application/octet-stream"; 84 | var b = GetZip(app.ApplicationServices.GetService()); 85 | //https://github.com/dotnet/aspnetcore/blob/master/src/Mvc/Mvc.Core/src/Infrastructure/FileResultExecutorBase.cs 86 | var contentDisposition = new Microsoft.Net.Http.Headers.ContentDispositionHeaderValue("attachment"); 87 | contentDisposition.SetHttpFileName(name); 88 | response.Headers[HeaderNames.ContentDisposition] = contentDisposition.ToString(); 89 | await response.Body.WriteAsync(b); 90 | 91 | }); 92 | 93 | 94 | } 95 | private static Memory GetZip(IWebHostEnvironment env) 96 | { 97 | //var b = new Memory(Encoding.ASCII.GetBytes($"{env.ContentRootPath}")); 98 | var firstDir = new DirectoryInfo(env.ContentRootPath); 99 | var nameLength = firstDir.FullName.Length + 1; 100 | using var memoryStream = new MemoryStream(); 101 | using var zipToOpen = new ZipArchive(memoryStream, ZipArchiveMode.Create, true); 102 | 103 | 104 | 105 | foreach (FileInfo file in firstDir.RecursiveFilesAndFolders().Where(o => o is FileInfo).Cast()) 106 | { 107 | var relPath = file.FullName.Substring(nameLength); 108 | var readmeEntry = zipToOpen.CreateEntryFromFile(file.FullName, relPath); 109 | } 110 | zipToOpen.Dispose(); 111 | var b = new Memory(memoryStream.ToArray()); 112 | return b; 113 | 114 | } 115 | 116 | private static IEnumerable RecursiveFilesAndFolders(this DirectoryInfo dir) 117 | { 118 | foreach (var f in dir.GetFiles()) 119 | yield return f; 120 | foreach (var d in dir.GetDirectories()) 121 | { 122 | yield return d; 123 | foreach (var o in RecursiveFilesAndFolders(d)) 124 | yield return o; 125 | } 126 | } 127 | } 128 | } 129 | -------------------------------------------------------------------------------- /src/ExtensionNetCore3/ExtensionNetCore3.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | netcoreapp3.1 5 | false 6 | MIT 7 | https://github.com/ignatandrei/WebAPI2CLI 8 | GIT 9 | Andrei Ignat 10 | 11 | LICENSE 12 | WebAPI;ASP.NET Core;.NET Core;CLI;Command Line 13 | 14 | This program will execute ASP.NET Core WebAPI from Command Line. 15 | Can be usefull for a CI integration or just making a demo. 16 | Please see https://github.com/ignatandrei/WebAPI2CLI for details 17 | Please see http://msprogrammer.serviciipeweb.ro/category/WEBAPI2CLI/ about how I made it. 18 | 19 | 20 | 21 | 22 | true 23 | 24 | true 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | True 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /src/ExtensionNetCore3/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "ExtensionNetCore3": { 4 | "commandName": "Executable" 5 | } 6 | } 7 | } -------------------------------------------------------------------------------- /src/TestWebAPISite/Controllers/MathAddController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore.Http; 7 | using Microsoft.AspNetCore.Mvc; 8 | 9 | namespace TestWebAPISite.Controllers 10 | { 11 | 12 | [ApiController] 13 | [Route("api/[controller]")] 14 | public class MathAddController : ControllerBase 15 | { 16 | // GET: api/MathAdd 17 | [HttpGet] 18 | public IEnumerable Get() 19 | { 20 | return new int[] { 1, 2 }; 21 | } 22 | 23 | // GET: api/MathAdd/5 24 | [HttpGet("{id}", Name = "Get")] 25 | public async Task Get(int id) 26 | { 27 | await Task.Delay(1000); 28 | return "value" + id; 29 | } 30 | 31 | // POST: api/MathAdd 32 | [HttpPost] 33 | public void Post([FromBody] string value) 34 | { 35 | //Console.WriteLine("I am from POST MATH") 36 | } 37 | 38 | // PUT: api/MathAdd/5 39 | [HttpPut("{id}")] 40 | public void Put(int id, [FromBody] string value) 41 | { 42 | 43 | } 44 | 45 | // DELETE: api/ApiWithActions/5 46 | [HttpDelete("{id}")] 47 | public void Delete(int id) 48 | { 49 | 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/TestWebAPISite/Controllers/MyTestController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Http; 6 | using Microsoft.AspNetCore.Mvc; 7 | 8 | namespace TestWebAPISite.Controllers 9 | { 10 | [Route("api/[controller]/[action]")] 11 | [ApiController] 12 | public class MyTestController : ControllerBase 13 | { 14 | 15 | // POST: api/MyTest 16 | [HttpPost] 17 | public int AddValues([FromBody] SumArgs sumargs) 18 | { 19 | return sumargs.x + sumargs.y; 20 | } 21 | 22 | [HttpPost] 23 | public SumArgs GetTestValue() 24 | { 25 | return new SumArgs() 26 | { 27 | x = 10, 28 | y = 20 29 | }; 30 | } 31 | 32 | 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/TestWebAPISite/Controllers/SumArgs.cs: -------------------------------------------------------------------------------- 1 | namespace TestWebAPISite.Controllers 2 | { 3 | public class SumArgs 4 | { 5 | public int x { get; set; } 6 | public int y { get; set; } 7 | } 8 | } -------------------------------------------------------------------------------- /src/TestWebAPISite/Controllers/WeatherForecastController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Mvc; 6 | using Microsoft.Extensions.Logging; 7 | 8 | namespace TestWebAPISite.Controllers 9 | { 10 | [ApiController] 11 | [Route("[controller]")] 12 | public class WeatherForecastController : ControllerBase 13 | { 14 | private static readonly string[] Summaries = new[] 15 | { 16 | "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching" 17 | }; 18 | 19 | private readonly ILogger _logger; 20 | 21 | public WeatherForecastController(ILogger logger) 22 | { 23 | _logger = logger; 24 | } 25 | 26 | [HttpGet] 27 | public IEnumerable Get() 28 | { 29 | var myDate = new DateTime(1970, 04, 16); 30 | return Enumerable.Range(1, 5).Select(index => new WeatherForecast 31 | { 32 | Date = myDate.AddDays(index), 33 | TemperatureC = index*10-20, 34 | Summary = Summaries[index] 35 | }) 36 | .ToArray(); 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/TestWebAPISite/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Net; 5 | using System.Net.Security; 6 | using System.Security.Cryptography.X509Certificates; 7 | using System.Threading.Tasks; 8 | using Microsoft.AspNetCore.Hosting; 9 | using Microsoft.Extensions.Configuration; 10 | using Microsoft.Extensions.Hosting; 11 | using Microsoft.Extensions.Logging; 12 | 13 | namespace TestWebAPISite 14 | { 15 | public class Program 16 | { 17 | public static void Main(string[] args) 18 | { 19 | ServicePointManager.ServerCertificateValidationCallback = 20 | delegate ( 21 | object s, 22 | X509Certificate certificate, 23 | X509Chain chain, 24 | SslPolicyErrors sslPolicyErrors 25 | ) { 26 | return true; 27 | }; 28 | CreateHostBuilder(args).Build().Run(); 29 | } 30 | 31 | public static IHostBuilder CreateHostBuilder(string[] args) => 32 | Host.CreateDefaultBuilder(args) 33 | .ConfigureWebHostDefaults(webBuilder => 34 | { 35 | webBuilder.UseStartup(); 36 | }); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/TestWebAPISite/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:53928", 7 | "sslPort": 44342 8 | } 9 | }, 10 | "$schema": "http://json.schemastore.org/launchsettings.json", 11 | "profiles": { 12 | "IIS Express": { 13 | "commandName": "IISExpress", 14 | "launchBrowser": true, 15 | "launchUrl": "weatherforecast", 16 | "environmentVariables": { 17 | "ASPNETCORE_ENVIRONMENT": "Development" 18 | } 19 | }, 20 | "TestWebAPISite": { 21 | "commandName": "Project", 22 | "commandLineArgs": "--CLI_ENABLED=1", 23 | "launchUrl": "weatherforecast", 24 | "environmentVariables": { 25 | "ASPNETCORE_ENVIRONMENT": "Development" 26 | }, 27 | "applicationUrl": "https://localhost:5001;http://localhost:5000" 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /src/TestWebAPISite/Startup.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO.Compression; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using ExtensionNetCore3; 8 | using Microsoft.AspNetCore.Builder; 9 | using Microsoft.AspNetCore.Hosting; 10 | using Microsoft.AspNetCore.HttpsPolicy; 11 | using Microsoft.AspNetCore.Mvc; 12 | using Microsoft.Extensions.Configuration; 13 | using Microsoft.Extensions.DependencyInjection; 14 | using Microsoft.Extensions.Hosting; 15 | using Microsoft.Extensions.Logging; 16 | using Microsoft.OpenApi.Models; 17 | 18 | namespace TestWebAPISite 19 | { 20 | public class Startup 21 | { 22 | public Startup(IConfiguration configuration) 23 | { 24 | Configuration = configuration; 25 | } 26 | 27 | public IConfiguration Configuration { get; } 28 | 29 | // This method gets called by the runtime. Use this method to add services to the container. 30 | public void ConfigureServices(IServiceCollection services) 31 | { 32 | services.AddCLI(); 33 | services.AddControllers(); 34 | services.AddSwaggerGen(c => 35 | { 36 | c.SwaggerDoc("v1", new OpenApiInfo { 37 | Title = "WebAPI2CLI", 38 | Version = "v1", 39 | Contact=new OpenApiContact(){ 40 | Email= "ignatandrei@yahoo.com", 41 | Url =new Uri( "http://msprogrammer.serviciipeweb.ro/category/WEBAPI2CLI/"), 42 | Name="Andrei Ignat" 43 | }, 44 | Description=" please run the project with TestWebAPISite.exe --CLI_Enabled=1 --CLI_COMMANDS=\"GetMathId_Http,WeatherGet\" " 45 | }); 46 | }); 47 | } 48 | 49 | // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. 50 | public void Configure(IApplicationBuilder app, IWebHostEnvironment env) 51 | { 52 | app.UseStaticFiles(); 53 | app.UseSwagger(); 54 | app.UseSwaggerUI(c => 55 | { 56 | c.SwaggerEndpoint("/swagger/v1/swagger.json", "WebAPI2CLI"); 57 | }); 58 | app.UseCLI(); 59 | if (env.IsDevelopment()) 60 | { 61 | app.UseDeveloperExceptionPage(); 62 | } 63 | 64 | //app.UseHttpsRedirection(); 65 | 66 | app.UseRouting(); 67 | 68 | app.UseAuthorization(); 69 | 70 | app.UseEndpoints(endpoints => 71 | { 72 | endpoints.MapControllers(); 73 | 74 | endpoints.MapZip(app); 75 | }); 76 | } 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /src/TestWebAPISite/TestWebAPISite.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | netcoreapp3.1 5 | win10-x64 6 | true 7 | 8 | 9 | 10 | AnyCPU 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | PreserveNewest 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /src/TestWebAPISite/WeatherForecast.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace TestWebAPISite 4 | { 5 | public class WeatherForecast 6 | { 7 | public DateTime Date { get; set; } 8 | 9 | public int TemperatureC { get; set; } 10 | 11 | public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); 12 | 13 | public string Summary { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/TestWebAPISite/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/TestWebAPISite/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | }, 9 | "AllowedHosts": "*" 10 | } 11 | -------------------------------------------------------------------------------- /src/TestWebAPISite/cli.txt: -------------------------------------------------------------------------------- 1 | V1: 2 | - NameCommand: Test_Get_Add_Https 3 | Host: https:// 4 | RelativeRequestUrl: api/MathAdd 5 | Verb: GET 6 | ContentType: application/json 7 | DataToSend: 8 | - NameCommand: Test_Get_Add_Http 9 | Host: http:// 10 | RelativeRequestUrl: api/MathAdd 11 | Verb: GET 12 | ContentType: application/json 13 | DataToSend: 14 | - NameCommand: GetMathId_Https 15 | Host: https:// 16 | RelativeRequestUrl: api/MathAdd/5 17 | Verb: GET 18 | ContentType: application/json 19 | DataToSend: '' 20 | - NameCommand: GetMathId_Http 21 | Host: http:// 22 | RelativeRequestUrl: api/MathAdd/5 23 | Verb: GET 24 | ContentType: application/json 25 | DataToSend: '' 26 | - NameCommand: Command005 27 | Host: https:// 28 | RelativeRequestUrl: api/MathAdd 29 | Verb: POST 30 | ContentType: application/json 31 | DataToSend: '""' 32 | - NameCommand: MathPOST 33 | Host: http:// 34 | RelativeRequestUrl: api/MathAdd 35 | Verb: POST 36 | ContentType: application/json 37 | DataToSend: '"test post"' 38 | - NameCommand: Command007 39 | Host: https:// 40 | RelativeRequestUrl: api/MathAdd/23 41 | Verb: PUT 42 | ContentType: application/json 43 | DataToSend: '"test put"' 44 | - NameCommand: MathPut 45 | Host: http:// 46 | RelativeRequestUrl: api/MathAdd/175 47 | Verb: PUT 48 | ContentType: application/json 49 | DataToSend: '"test put"' 50 | - NameCommand: Command009 51 | Host: https:// 52 | RelativeRequestUrl: api/MathAdd/{id} 53 | Verb: DELETE 54 | ContentType: application/json 55 | DataToSend: '' 56 | - NameCommand: MathDelete 57 | Host: http:// 58 | RelativeRequestUrl: api/MathAdd/78 59 | Verb: DELETE 60 | ContentType: application/json 61 | DataToSend: '' 62 | - NameCommand: Command011 63 | Host: https:// 64 | RelativeRequestUrl: WeatherForecast 65 | Verb: GET 66 | ContentType: application/json 67 | DataToSend: 68 | - NameCommand: WeatherGet 69 | Host: http:// 70 | RelativeRequestUrl: WeatherForecast 71 | Verb: GET 72 | ContentType: application/json 73 | DataToSend: -------------------------------------------------------------------------------- /src/WebAPI2CLI.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.29728.190 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CLIExecute", "CLIExecute\CLIExecute.csproj", "{2943BC3F-8D5B-4FAC-BD59-4F75F27F51F0}" 7 | EndProject 8 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ExtensionNetCore3", "ExtensionNetCore3\ExtensionNetCore3.csproj", "{C8585726-A163-4105-94C1-3A05227CFADB}" 9 | EndProject 10 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{E0A7F156-A8FB-4616-86D0-04279C7915FE}" 11 | EndProject 12 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestWebAPISite", "TestWebAPISite\TestWebAPISite.csproj", "{DC65B552-2B58-48A9-85F1-D0C61D1706D5}" 13 | EndProject 14 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CLITests", "CLITests\CLITests.csproj", "{E92DF96A-E978-4980-BFF2-EBACE3A1DE1B}" 15 | EndProject 16 | Global 17 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 18 | Debug|Any CPU = Debug|Any CPU 19 | Release|Any CPU = Release|Any CPU 20 | EndGlobalSection 21 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 22 | {2943BC3F-8D5B-4FAC-BD59-4F75F27F51F0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 23 | {2943BC3F-8D5B-4FAC-BD59-4F75F27F51F0}.Debug|Any CPU.Build.0 = Debug|Any CPU 24 | {2943BC3F-8D5B-4FAC-BD59-4F75F27F51F0}.Release|Any CPU.ActiveCfg = Release|Any CPU 25 | {2943BC3F-8D5B-4FAC-BD59-4F75F27F51F0}.Release|Any CPU.Build.0 = Release|Any CPU 26 | {C8585726-A163-4105-94C1-3A05227CFADB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 27 | {C8585726-A163-4105-94C1-3A05227CFADB}.Debug|Any CPU.Build.0 = Debug|Any CPU 28 | {C8585726-A163-4105-94C1-3A05227CFADB}.Release|Any CPU.ActiveCfg = Release|Any CPU 29 | {C8585726-A163-4105-94C1-3A05227CFADB}.Release|Any CPU.Build.0 = Release|Any CPU 30 | {DC65B552-2B58-48A9-85F1-D0C61D1706D5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 31 | {DC65B552-2B58-48A9-85F1-D0C61D1706D5}.Debug|Any CPU.Build.0 = Debug|Any CPU 32 | {DC65B552-2B58-48A9-85F1-D0C61D1706D5}.Release|Any CPU.ActiveCfg = Release|Any CPU 33 | {DC65B552-2B58-48A9-85F1-D0C61D1706D5}.Release|Any CPU.Build.0 = Release|Any CPU 34 | {E92DF96A-E978-4980-BFF2-EBACE3A1DE1B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 35 | {E92DF96A-E978-4980-BFF2-EBACE3A1DE1B}.Debug|Any CPU.Build.0 = Debug|Any CPU 36 | {E92DF96A-E978-4980-BFF2-EBACE3A1DE1B}.Release|Any CPU.ActiveCfg = Release|Any CPU 37 | {E92DF96A-E978-4980-BFF2-EBACE3A1DE1B}.Release|Any CPU.Build.0 = Release|Any CPU 38 | EndGlobalSection 39 | GlobalSection(SolutionProperties) = preSolution 40 | HideSolutionNode = FALSE 41 | EndGlobalSection 42 | GlobalSection(NestedProjects) = preSolution 43 | {DC65B552-2B58-48A9-85F1-D0C61D1706D5} = {E0A7F156-A8FB-4616-86D0-04279C7915FE} 44 | {E92DF96A-E978-4980-BFF2-EBACE3A1DE1B} = {E0A7F156-A8FB-4616-86D0-04279C7915FE} 45 | EndGlobalSection 46 | GlobalSection(ExtensibilityGlobals) = postSolution 47 | SolutionGuid = {AD9D3650-7618-4A61-BD1A-B616F569142F} 48 | EndGlobalSection 49 | EndGlobal 50 | -------------------------------------------------------------------------------- /src/a.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ignatandrei/WebAPI2CLI/3c4e0ad9241f8684a7927e923dada0c0b6fbebd0/src/a.txt -------------------------------------------------------------------------------- /src/setVersion.ps1: -------------------------------------------------------------------------------- 1 | 2 | $TimeNow = Get-Date 3 | $d = $TimeNow.ToUniversalTime() 4 | $year = $TimeNow.Year 5 | $startOfYear = Get-Date -Year $year -Month 1 -Day 1 -Hour 0 -Minute 0 -Second 0 -Millisecond 0 6 | $dateToPrint=[long] $d.ToString('yyMMddHHmmss') 7 | $result = $dateToPrint % 2 8 | if($result -eq 0){ 9 | $moniker = "$(dotnet moniker -s moby)-$dateToPrint" 10 | } 11 | else{ 12 | $moniker = "$(dotnet moniker -s moniker)-$dateToPrint" 13 | } 14 | 15 | Write-Host $moniker 16 | $diff = NEW-TIMESPAN -Start $startOfYear -End $TimeNow 17 | #$diff.TotalSeconds -as [int] 18 | 19 | $assemblyVersion=$d.ToString("1.yyyy.1MMdd.1HHmm") 20 | dotnet-property "**/*.csproj" AssemblyVersion:"$assemblyVersion" 21 | dotnet dotnet-property "**/*.csproj" AssemblyVersion:"$assemblyVersion" 22 | 23 | $version=$d.ToString("1.0.yyyy.") + ($diff.TotalSeconds -as [int]).ToString() 24 | dotnet-property "**/*.csproj" Version:"$version" 25 | dotnet dotnet-property "**/*.csproj" Version:"$version" 26 | 27 | #$releaseNotes = "BuildNumber $env:BUILD_BUILDNUMBER" 28 | #$releaseNotes += ";author $env:BUILD_SOURCEVERSIONAUTHOR" 29 | #$releaseNotes += ";message $env:BUILD_SOURCEVERSIONMESSAGE" 30 | $releaseNotes = "version:" + $moniker 31 | $releaseNotes +=";source for this release github.com/ignatandrei/webAPI2CLI/commit/$env:BUILD_SOURCEVERSION" 32 | 33 | $releaseNotes 34 | 35 | dotnet-property "**/*.csproj" PackageReleaseNotes:"$releaseNotes" 36 | dotnet dotnet-property "**/*.csproj" PackageReleaseNotes:"$releaseNotes" 37 | --------------------------------------------------------------------------------