diff --git a/.github/WorkflowGen/Program.cs b/.github/WorkflowGen/Program.cs index 0ba35eca..5d73fa75 100644 --- a/.github/WorkflowGen/Program.cs +++ b/.github/WorkflowGen/Program.cs @@ -17,7 +17,6 @@ void GenerateWorkflowsForLibs() "github", "hosting", "lambda", - "little-forker", "pulumi", "system-extensions", "webhook-relay" diff --git a/.github/workflows/little-forker-ci.yml b/.github/workflows/little-forker-ci.yml deleted file mode 100644 index ed198be6..00000000 --- a/.github/workflows/little-forker-ci.yml +++ /dev/null @@ -1,63 +0,0 @@ -# This was generated by tool. Edits will be overwritten. - -name: little-forker-ci -on: - pull_request: - paths: - - .github/workflows/little-forker-** - - libs/little-forker** - - build/** - push: - branches: - - main - paths: - - .github/workflows/little-forker-** - - libs/little-forker** - - build/** - tags: - - little-forker-** -jobs: - build: - runs-on: ubuntu-latest - env: - GITHUB_TOKEN: ${secrets.GITHUB_TOKEN} - LOGICALITY_NUGET_ORG: ${secrets.LOGICALITY_NUGET_ORG} - WEBHOOKRELAYTOKENKEY: ${secrets.WEBHOOKRELAYTOKENKEY} - WEBHOOKRELAYTOKENSECRET: ${secrets.WEBHOOKRELAYTOKENSECRET} - WEBHOOKURL: ${secrets.WEBHOOKURL} - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - name: Log into GitHub Container Registry - run: echo "${{secrets.GITHUB_TOKEN}}" | docker login ghcr.io -u ${{github.actor}} --password-stdin - - name: Setup Dotnet - uses: actions/setup-dotnet@v3 - with: - dotnet-version: 8.0.x - - name: Print Env - run: printenv - shell: bash - - name: Test - timeout-minutes: 5 - run: ./build.ps1 little-forker-test - shell: pwsh - - name: Pack - run: ./build.ps1 little-forker-pack - shell: pwsh - - name: Push to GitHub - if: github.event_name == 'push' - continue-on-error: true - run: ./build.ps1 push-github - shell: pwsh - - name: Push to Nuget.org (on tag) - if: startsWith(github.ref, 'refs/tags/little-forker') - continue-on-error: true - run: ./build.ps1 push-nugetorg - shell: pwsh - - name: Upload Artifacts - uses: actions/upload-artifact@v3 - with: - name: artifacts - path: artifacts diff --git a/PlatformLibs.sln b/PlatformLibs.sln index 88e767dc..41182302 100644 --- a/PlatformLibs.sln +++ b/PlatformLibs.sln @@ -234,23 +234,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "libs", "libs", "{5038BE98-A EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{216FB958-9A5A-4A1D-9C3C-605063CD8529}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "little-forker", "little-forker", "{C035DC26-7F31-432A-8CE2-221F7E1877B2}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{D87C8600-94DC-463D-947B-F1EFA6E748B4}" - ProjectSection(SolutionItems) = preProject - libs\little-forker\src\Directory.Build.props = libs\little-forker\src\Directory.Build.props - EndProjectSection -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{1137E742-AF34-47F0-BFAA-F7FD0FE246F0}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LittleForker", "libs\little-forker\src\LittleForker\LittleForker.csproj", "{6A977279-9C89-4292-819D-9A9D014473B8}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NonTerminatingProcess", "libs\little-forker\src\NonTerminatingProcess\NonTerminatingProcess.csproj", "{E66BAB05-F1D2-4236-96BE-4A61764448BA}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SelfTerminatingProcess", "libs\little-forker\src\SelfTerminatingProcess\SelfTerminatingProcess.csproj", "{A31B3ADF-27E6-4BB3-A7E7-8BB072D867FA}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LittleForker.Tests", "libs\little-forker\tests\LittleForker.Tests\LittleForker.Tests.csproj", "{A228A55A-51DF-4E95-982F-EB278D061893}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -397,22 +380,6 @@ Global {6A3454B3-27BF-45E6-81AA-44616F4766E2}.Debug|Any CPU.Build.0 = Debug|Any CPU {6A3454B3-27BF-45E6-81AA-44616F4766E2}.Release|Any CPU.ActiveCfg = Release|Any CPU {6A3454B3-27BF-45E6-81AA-44616F4766E2}.Release|Any CPU.Build.0 = Release|Any CPU - {6A977279-9C89-4292-819D-9A9D014473B8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6A977279-9C89-4292-819D-9A9D014473B8}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6A977279-9C89-4292-819D-9A9D014473B8}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6A977279-9C89-4292-819D-9A9D014473B8}.Release|Any CPU.Build.0 = Release|Any CPU - {E66BAB05-F1D2-4236-96BE-4A61764448BA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E66BAB05-F1D2-4236-96BE-4A61764448BA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E66BAB05-F1D2-4236-96BE-4A61764448BA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E66BAB05-F1D2-4236-96BE-4A61764448BA}.Release|Any CPU.Build.0 = Release|Any CPU - {A31B3ADF-27E6-4BB3-A7E7-8BB072D867FA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A31B3ADF-27E6-4BB3-A7E7-8BB072D867FA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A31B3ADF-27E6-4BB3-A7E7-8BB072D867FA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A31B3ADF-27E6-4BB3-A7E7-8BB072D867FA}.Release|Any CPU.Build.0 = Release|Any CPU - {A228A55A-51DF-4E95-982F-EB278D061893}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A228A55A-51DF-4E95-982F-EB278D061893}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A228A55A-51DF-4E95-982F-EB278D061893}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A228A55A-51DF-4E95-982F-EB278D061893}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -484,13 +451,6 @@ Global {03AD19CD-2637-4048-8D12-2829B4784C48} = {498AADAB-47D0-42A9-A0CB-FDCB88EA9851} {392FB6AF-14DC-4809-AA70-DB48D4EEBEB1} = {03AD19CD-2637-4048-8D12-2829B4784C48} {6A3454B3-27BF-45E6-81AA-44616F4766E2} = {03AD19CD-2637-4048-8D12-2829B4784C48} - {C035DC26-7F31-432A-8CE2-221F7E1877B2} = {5038BE98-AAF8-4FB1-B683-C03B760C36A7} - {D87C8600-94DC-463D-947B-F1EFA6E748B4} = {C035DC26-7F31-432A-8CE2-221F7E1877B2} - {1137E742-AF34-47F0-BFAA-F7FD0FE246F0} = {C035DC26-7F31-432A-8CE2-221F7E1877B2} - {6A977279-9C89-4292-819D-9A9D014473B8} = {D87C8600-94DC-463D-947B-F1EFA6E748B4} - {E66BAB05-F1D2-4236-96BE-4A61764448BA} = {D87C8600-94DC-463D-947B-F1EFA6E748B4} - {A31B3ADF-27E6-4BB3-A7E7-8BB072D867FA} = {D87C8600-94DC-463D-947B-F1EFA6E748B4} - {A228A55A-51DF-4E95-982F-EB278D061893} = {1137E742-AF34-47F0-BFAA-F7FD0FE246F0} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {4306F166-DCCF-4316-88FC-9E339F1ABEFE} diff --git a/libs/little-forker/LittleForker.slnf b/libs/little-forker/LittleForker.slnf deleted file mode 100644 index 1fb3b1ef..00000000 --- a/libs/little-forker/LittleForker.slnf +++ /dev/null @@ -1,11 +0,0 @@ -{ - "solution": { - "path": "..\\..\\PlatformLibs.sln", - "projects": [ - "libs\\little-forker\\src\\LittleForker\\LittleForker.csproj", - "libs\\little-forker\\src\\NonTerminatingProcess\\NonTerminatingProcess.csproj", - "libs\\little-forker\\src\\SelfTerminatingProcess\\SelfTerminatingProcess.csproj", - "libs\\little-forker\\tests\\LittleForker.Tests\\LittleForker.Tests.csproj" - ] - } -} \ No newline at end of file diff --git a/libs/little-forker/README.md b/libs/little-forker/README.md deleted file mode 100644 index f55484ad..00000000 --- a/libs/little-forker/README.md +++ /dev/null @@ -1,203 +0,0 @@ -# Little Forker - -[![CI](https://github.com/damianh/LittleForker/workflows/CI/badge.svg)](https://github.com/damianh/LittleForker/actions?query=workflow%3ACI) -[![NuGet](https://img.shields.io/nuget/v/LittleForker.svg)](https://www.nuget.org/packages/LittleForker) -[![feedz.io](https://img.shields.io/badge/endpoint.svg?url=https%3A%2F%2Ff.feedz.io%2Fdh%2Foss-ci%2Fshield%2FLittleForker%2Flatest)](https://f.feedz.io/dh/oss-ci/nuget/index.json) - -A utility to aid in the launching and supervision of processes. The original use -case is installing a single service who then spawns other processes as part of a -multi-process application. - -## Features - - 1. **ProcessExitedHelper**: a helper around `Process.Exited` with some additional - logging and event raising if the process has already exited or not found. - - 2. **ProcessSupervisor**: allows a parent process to launch a child process - and lifecycle is represented as a state machine. Supervisors can participate - in co-operative shutdown if supported by the child process. - - 3. **CooperativeShutdown**: allows a process to listen for a shutdown signal - over a NamedPipe for a parent process to instruct a process to shutdown. - -## Installation - -```bash -dotnet add package LittleForker -``` - -CI packages are on personal feed: https://www.myget.org/F/dh/api/v3/index.json - -## Using - -### 1. ProcessExitedHelper - -This helper is typically used by "child" processes to monitor a "parent" process -so that it exits itself when the parent exits. It's also safe guard in -co-operative shut down if the parent failed to signal correctly (i.e. it -crashed). - -It wraps `Process.Exited` with some additional behaviour: - -- Raises the event if the process is not found. -- Raises the event if the process has already exited which would otherwise - result in an `InvalidOperationException` -- Logging. - -This is something simple to implement in your own code so you may -consider copying it if you don't want a dependency on `LittleForker`. - -Typically you will tell a process to monitor another process by passing in the -other process's Id as a command line argument. Something like: - -```bash -.\MyApp --ParentProcessID=12345 -``` - -Here we extract the CLI arg using `Microsoft.Extensions.Configuration`, watch -for a parent to exit and exit ourselves when that happens. - -```csharp -var configRoot = new ConfigurationBuilder() - .AddCommandLine(args) - .Build(); - -var parentPid = _configRoot.GetValue("ParentProcessId"); -using(new ProcessExitedHelper(parentPid, exitedHelper => Environment.Exit(0))) -{ - // Rest of application -} -``` - -`Environment.Exit(0)` is quite an abrupt way to shut town; you may want to -handle things more gracefully such as flush data, cancel requests in flight etc. -For an example, see -[NotTerminatingProcess](src/NonTerminatingProcess/Program.cs) `Run()` that uses -a `CancellationTokenSource`. - -### 2. ProcessSupervisor - -Process supervisor launches a process and tracks it's lifecycle that is represented by a -state machine. Typically use case is a "parent" processes launching one or more "child" -processes. - -There are two types of processes that are supported: - -1. **Self-Terminating** where the process will exit of it's own accord. -2. **Non-Terminating** is a process that never shut down unless it is - signalled to do so (if it participates in co-operative shutdown) _or_ is killed. - -A process's state is represented by `ProcessSupervisor.State` enum: - -- NotStarted, -- Running, -- StartFailed, -- Stopping, -- ExitedSuccessfully, -- ExitedWithError, -- ExitedUnexpectedly, -- ExitedKilled - -... with the transitions between them described with this state machine depending -whether self-terminating or non-terminating: - -![statemachine](state-machine.png) - -Typically, you will want to launch a process and wait until it is in a specific -state before continuing (or handle errors). - -```csharp -// create the supervisor -var supervisor = new ProcessSupervisor( - processRunType: ProcessRunType.NonTerminating, // Expected to be a process that doesn't stop - workingDirectory: Environment.CurrentDirectory, - processPath: "dotnet", - arguments: "./LongRunningProcess/LongRunningProcess.dll"); - -// attach to events -supervisor.StateChanged += state => { /* handle state changes */ }; -supervisor.OutputDataReceived += s => { /* console output */ } - -// start the supervisor which will launch the process -await supervisor.Start(); - -// ... some time later -// attempts a co-operative shutdown with a timeout of 3 -// seconds otherwise kills the process - -await supervisor.Stop(TimeSpan.FromSeconds(3)); -``` - -With an async extension, it is possible to await a supervisor state: - -```csharp -var exitedSuccessfully = supervisor.WhenStateIs(ProcessSupervisor.State.ExitedSuccessfully); -await supervisor.Start(); -await Task.WhenAny(exitedSuccessfully). -``` - -You can also leverage tasks to combine waiting for various expected states: - -```csharp -var startFailed = supervisor.WhenStateIs(ProcessSupervisor.State.StartFailed); -var exitedSuccessfully = supervisor.WhenStateIs(ProcessSupervisor.State.ExitedSuccessfully); -var exitedWithError = supervisor.WhenStateIs(ProcessSupervisor.State.ExitedWithError); - -supervisor.Start(); - -var result = await Task.WhenAny(startFailed, exitedSuccessfully, exitedWithError); -if(result == startFailed) -{ - Log.Error(supervisor.OnStartException, $"Process start failed {supervisor.OnStartException.Message}") -} -// etc. -``` - -### CooperativeShutdown - -Cooperative shutdown allows a "parent" process to instruct a "child" process to -shut down. Different to `SIGTERM` and `Process.Kill()` in that it allows a child -to acknowledge receipt of the request and shut down cleanly (and fast!). Combined with -`Supervisor.Stop()` a parent can send the signal and then wait for `ExitedSuccessfully`. - -The inter-process communication is done via named pipes where the pipe name is -of the format `LittleForker-{processId}` - -For a "child" process to be able receive co-operative shut down requests it uses -`CooperativeShutdown.Listen()` to listen on a named pipe. Handling signals should -be fast operations and are typically implemented by signalling to another mechanism -to start cleanly shutting down: - -```csharp -var shutdown = new CancellationTokenSource(); -using(await CooperativeShutdown.Listen(() => shutdown.Cancel()) -{ - // rest of application checks shutdown token for co-operative - // cancellation. See MSDN for details. -} -``` - -For a "parent" process to be able to signal: - -```csharp -await CooperativeShutdown.SignalExit(childProcessId); -``` - -This is used in `ProcessSupervisor` so if your parent process is using that, then you -typically won't be using this explicitly. - -## Building - -With docker which is same as CI: - -- Run `build.cmd`/`build.sh` to compile, run tests and build package. - -Local build which requires .NET Core SDKs 2.1, 3.1 and .NET 5.0: - -- Run `build-local.cmd`/`build-local.sh` to compile, run tests and build package. - -## Credits & Feedback - -[@randompunter](https://twitter.com/randompunter) for feedback. - -Hat tip to [@markrendle](https://twitter.com/markrendle) for the project name. diff --git a/libs/little-forker/src/Directory.Build.props b/libs/little-forker/src/Directory.Build.props deleted file mode 100644 index 7bf51646..00000000 --- a/libs/little-forker/src/Directory.Build.props +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - little-forker- - 3.0 - - - \ No newline at end of file diff --git a/libs/little-forker/src/LittleForker.Tests/NonTerminatingProcess/Logicality.LittleForker.dll b/libs/little-forker/src/LittleForker.Tests/NonTerminatingProcess/Logicality.LittleForker.dll deleted file mode 100644 index 8b5b84e2..00000000 Binary files a/libs/little-forker/src/LittleForker.Tests/NonTerminatingProcess/Logicality.LittleForker.dll and /dev/null differ diff --git a/libs/little-forker/src/LittleForker.Tests/NonTerminatingProcess/Logicality.LittleForker.xml b/libs/little-forker/src/LittleForker.Tests/NonTerminatingProcess/Logicality.LittleForker.xml deleted file mode 100644 index 3e9bfe5f..00000000 --- a/libs/little-forker/src/LittleForker.Tests/NonTerminatingProcess/Logicality.LittleForker.xml +++ /dev/null @@ -1,240 +0,0 @@ - - - - Logicality.LittleForker - - - - - Allows a process to be co-cooperatively shut down (as opposed the more - brutal Process.Kill() - - - - - The pipe name a process will listen on for a EXIT signal. - - The process ID process listening. - A generated pipe name. - - - - Creates a listener for cooperative shutdown. - - - The callback that is invoked when cooperative shutdown has been - requested. - - - A logger factory. - - A method to be called if an error occurs while listening - - A disposable representing the named pipe listener. - - - - - Signals to a process to shut down. - - The process ID to signal too. - A logger factory. - A task representing the operation. - - - - Interlocked support for boolean values - - - - - Current value - - - - - Initializes a new instance of - - initial value - - - - Sets a new value - - new value - the original value before any operation was performed - - - - Compares the current value and the comparand for equality and, if they are equal, - replaces the current value with the new value in an atomic/thread-safe operation. - - new value - value to compare the current value with - the original value before any operation was performed - - - - The process's exit code. - - - - - The process's Id. - - - - - Helper that raises event when the process has exited. A wrapper around - Process.Exited with some error handling and logging. - - - - - Initializes a new instance of - - - The process Id of the process to watch for exited. - - - A callback that is invoked when process has exited or does not - exist with the instance as a - parameter. - - - A logger. - - - - - Defined how a process is expected to run. - - - - - Processes that are expected to terminate of their own accord. - - - - - Processes that are not expected to terminiate of their own - accord and that must be co-operatively shutdown or killed. - - - - - Launches an process and tracks it's lifecycle . - - - - - The state a process is in. - - - - - Initializes a new instance of - - - The working directory to start the process in. - - - The path to the process. - - - The process run type. - - - A logger factory. - - - Arguments to be passed to the process. - - - Environment variables that are set before the process starts. - - - A flag to indicated whether to capture standard error output. - - - - - Contains the caught exception in the event a process failed to - be launched. - - - - - Information about the launched process. - - - - - Raised when the process emits console data. - - - - - Raised when the process emits stderr console data. - - - - - Raised when the process state has changed. - - - - - Starts the process. - - - - - Initiates a process stop. If a timeout is supplied (and greater - than 0ms), it will attempt a "co-operative" shutdown by - signalling an EXIT command to the process. The process needs to - support such signalling and needs to complete within the timeout - otherwise the process will be terminated via Kill(). The maximum - recommended timeout is 25 seconds. This is 5 seconds less than - default 30 seconds that windows will consider a service to be - 'hung'. - - - - - - - Represents a queue of tasks where a task is processed one at a time. When disposed - the outstanding tasks are cancelled. - - - - - Enqueues a task for processing. - - The operations to invoke. - A task representing the operation. Awaiting is optional. - - - - Enqueues a task for processing. - - The operations to invoke. - A task representing the operation. Awaiting is optional. - - - - Enqueues a task for processing. - - The operation to invoke that is cooperatively cancelable. - A task representing the operation. Awaiting is optional. - - - - Enqueues a task for processing. - - The operation to invoke that is cooperatively cancelable. - A task representing the operation. Awaiting is optional. - - - diff --git a/libs/little-forker/src/LittleForker.Tests/NonTerminatingProcess/Logicality.NonTerminatingProcess.deps.json b/libs/little-forker/src/LittleForker.Tests/NonTerminatingProcess/Logicality.NonTerminatingProcess.deps.json deleted file mode 100644 index da5cb3a5..00000000 --- a/libs/little-forker/src/LittleForker.Tests/NonTerminatingProcess/Logicality.NonTerminatingProcess.deps.json +++ /dev/null @@ -1,786 +0,0 @@ -{ - "runtimeTarget": { - "name": ".NETCoreApp,Version=v8.0", - "signature": "" - }, - "compilationOptions": {}, - "targets": { - ".NETCoreApp,Version=v8.0": { - "Logicality.NonTerminatingProcess/3.0.1-alpha.0.3+build.0": { - "dependencies": { - "Logicality.LittleForker": "1.0.0", - "Microsoft.Extensions.Configuration.Binder": "3.1.0", - "Microsoft.Extensions.Configuration.CommandLine": "3.1.0", - "Microsoft.Extensions.Configuration.EnvironmentVariables": "3.1.0", - "Microsoft.SourceLink.GitHub": "8.0.0", - "MinVer": "4.3.0", - "Serilog.Sinks.Console": "3.1.1", - "Logicality.LittleForker.Reference": "1.0.0.0" - }, - "runtime": { - "Logicality.NonTerminatingProcess.dll": {} - } - }, - "Microsoft.Build.Tasks.Git/8.0.0": {}, - "Microsoft.CSharp/4.0.1": { - "dependencies": { - "System.Collections": "4.0.11", - "System.Diagnostics.Debug": "4.0.11", - "System.Dynamic.Runtime": "4.0.11", - "System.Globalization": "4.3.0", - "System.Linq": "4.1.0", - "System.Linq.Expressions": "4.1.0", - "System.ObjectModel": "4.0.12", - "System.Reflection": "4.3.0", - "System.Reflection.Extensions": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Reflection.TypeExtensions": "4.1.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.1.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Threading": "4.3.0" - } - }, - "Microsoft.Extensions.Configuration/3.1.0": { - "dependencies": { - "Microsoft.Extensions.Configuration.Abstractions": "3.1.0" - }, - "runtime": { - "lib/netcoreapp3.1/Microsoft.Extensions.Configuration.dll": { - "assemblyVersion": "3.1.0.0", - "fileVersion": "3.100.19.56504" - } - } - }, - "Microsoft.Extensions.Configuration.Abstractions/3.1.0": { - "dependencies": { - "Microsoft.Extensions.Primitives": "3.1.0" - }, - "runtime": { - "lib/netcoreapp3.1/Microsoft.Extensions.Configuration.Abstractions.dll": { - "assemblyVersion": "3.1.0.0", - "fileVersion": "3.100.19.56504" - } - } - }, - "Microsoft.Extensions.Configuration.Binder/3.1.0": { - "dependencies": { - "Microsoft.Extensions.Configuration": "3.1.0" - }, - "runtime": { - "lib/netcoreapp3.1/Microsoft.Extensions.Configuration.Binder.dll": { - "assemblyVersion": "3.1.0.0", - "fileVersion": "3.100.19.56504" - } - } - }, - "Microsoft.Extensions.Configuration.CommandLine/3.1.0": { - "dependencies": { - "Microsoft.Extensions.Configuration": "3.1.0" - }, - "runtime": { - "lib/netcoreapp3.1/Microsoft.Extensions.Configuration.CommandLine.dll": { - "assemblyVersion": "3.1.0.0", - "fileVersion": "3.100.19.56504" - } - } - }, - "Microsoft.Extensions.Configuration.EnvironmentVariables/3.1.0": { - "dependencies": { - "Microsoft.Extensions.Configuration": "3.1.0" - }, - "runtime": { - "lib/netcoreapp3.1/Microsoft.Extensions.Configuration.EnvironmentVariables.dll": { - "assemblyVersion": "3.1.0.0", - "fileVersion": "3.100.19.56504" - } - } - }, - "Microsoft.Extensions.DependencyInjection.Abstractions/8.0.0": { - "runtime": { - "lib/net8.0/Microsoft.Extensions.DependencyInjection.Abstractions.dll": { - "assemblyVersion": "8.0.0.0", - "fileVersion": "8.0.23.53103" - } - } - }, - "Microsoft.Extensions.Logging.Abstractions/8.0.0": { - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0" - }, - "runtime": { - "lib/net8.0/Microsoft.Extensions.Logging.Abstractions.dll": { - "assemblyVersion": "8.0.0.0", - "fileVersion": "8.0.23.53103" - } - } - }, - "Microsoft.Extensions.Primitives/3.1.0": { - "runtime": { - "lib/netcoreapp3.1/Microsoft.Extensions.Primitives.dll": { - "assemblyVersion": "3.1.0.0", - "fileVersion": "3.100.19.56504" - } - } - }, - "Microsoft.NETCore.Platforms/1.1.0": {}, - "Microsoft.NETCore.Targets/1.1.0": {}, - "Microsoft.SourceLink.Common/8.0.0": {}, - "Microsoft.SourceLink.GitHub/8.0.0": { - "dependencies": { - "Microsoft.Build.Tasks.Git": "8.0.0", - "Microsoft.SourceLink.Common": "8.0.0" - } - }, - "MinVer/4.3.0": {}, - "runtime.native.System/4.3.0": { - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0" - } - }, - "Serilog/2.5.0": { - "dependencies": { - "Microsoft.CSharp": "4.0.1", - "System.Collections": "4.0.11", - "System.Collections.NonGeneric": "4.0.1", - "System.Dynamic.Runtime": "4.0.11", - "System.Globalization": "4.3.0", - "System.Linq": "4.1.0", - "System.Reflection": "4.3.0", - "System.Reflection.Extensions": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.1.0", - "System.Text.RegularExpressions": "4.1.0", - "System.Threading": "4.3.0" - }, - "runtime": { - "lib/netstandard1.3/Serilog.dll": { - "assemblyVersion": "2.0.0.0", - "fileVersion": "2.5.0.0" - } - } - }, - "Serilog.Sinks.Console/3.1.1": { - "dependencies": { - "Serilog": "2.5.0", - "System.Console": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Runtime.InteropServices.RuntimeInformation": "4.3.0" - }, - "runtime": { - "lib/netcoreapp1.1/Serilog.Sinks.Console.dll": { - "assemblyVersion": "3.1.1.0", - "fileVersion": "3.1.1.0" - } - } - }, - "Stateless/5.13.0": { - "runtime": { - "lib/net6.0/Stateless.dll": { - "assemblyVersion": "4.0.0.0", - "fileVersion": "5.13.0.0" - } - } - }, - "System.Collections/4.0.11": { - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Collections.NonGeneric/4.0.1": { - "dependencies": { - "System.Diagnostics.Debug": "4.0.11", - "System.Globalization": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.1.0", - "System.Threading": "4.3.0" - } - }, - "System.Console/4.3.0": { - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.IO": "4.3.0", - "System.Runtime": "4.3.0", - "System.Text.Encoding": "4.3.0" - } - }, - "System.Diagnostics.Debug/4.0.11": { - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Dynamic.Runtime/4.0.11": { - "dependencies": { - "System.Collections": "4.0.11", - "System.Diagnostics.Debug": "4.0.11", - "System.Globalization": "4.3.0", - "System.Linq": "4.1.0", - "System.Linq.Expressions": "4.1.0", - "System.ObjectModel": "4.0.12", - "System.Reflection": "4.3.0", - "System.Reflection.Emit": "4.0.1", - "System.Reflection.Emit.ILGeneration": "4.0.1", - "System.Reflection.Primitives": "4.3.0", - "System.Reflection.TypeExtensions": "4.1.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.1.0", - "System.Threading": "4.3.0" - } - }, - "System.Globalization/4.3.0": { - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.IO/4.3.0": { - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading.Tasks": "4.3.0" - } - }, - "System.Linq/4.1.0": { - "dependencies": { - "System.Collections": "4.0.11", - "System.Diagnostics.Debug": "4.0.11", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.1.0" - } - }, - "System.Linq.Expressions/4.1.0": { - "dependencies": { - "System.Collections": "4.0.11", - "System.Diagnostics.Debug": "4.0.11", - "System.Globalization": "4.3.0", - "System.IO": "4.3.0", - "System.Linq": "4.1.0", - "System.ObjectModel": "4.0.12", - "System.Reflection": "4.3.0", - "System.Reflection.Emit": "4.0.1", - "System.Reflection.Emit.ILGeneration": "4.0.1", - "System.Reflection.Emit.Lightweight": "4.0.1", - "System.Reflection.Extensions": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Reflection.TypeExtensions": "4.1.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.1.0", - "System.Threading": "4.3.0" - } - }, - "System.ObjectModel/4.0.12": { - "dependencies": { - "System.Collections": "4.0.11", - "System.Diagnostics.Debug": "4.0.11", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Threading": "4.3.0" - } - }, - "System.Reflection/4.3.0": { - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.IO": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Reflection.Emit/4.0.1": { - "dependencies": { - "System.IO": "4.3.0", - "System.Reflection": "4.3.0", - "System.Reflection.Emit.ILGeneration": "4.0.1", - "System.Reflection.Primitives": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Reflection.Emit.ILGeneration/4.0.1": { - "dependencies": { - "System.Reflection": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Reflection.Emit.Lightweight/4.0.1": { - "dependencies": { - "System.Reflection": "4.3.0", - "System.Reflection.Emit.ILGeneration": "4.0.1", - "System.Reflection.Primitives": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Reflection.Extensions/4.3.0": { - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Reflection": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Reflection.Primitives/4.3.0": { - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Reflection.TypeExtensions/4.1.0": { - "dependencies": { - "System.Reflection": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Resources.ResourceManager/4.3.0": { - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Globalization": "4.3.0", - "System.Reflection": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Runtime/4.3.0": { - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0" - } - }, - "System.Runtime.Extensions/4.1.0": { - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Runtime.Handles/4.3.0": { - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Runtime.InteropServices/4.3.0": { - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Reflection": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Handles": "4.3.0" - } - }, - "System.Runtime.InteropServices.RuntimeInformation/4.3.0": { - "dependencies": { - "System.Reflection": "4.3.0", - "System.Reflection.Extensions": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Threading": "4.3.0", - "runtime.native.System": "4.3.0" - } - }, - "System.Text.Encoding/4.3.0": { - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Text.RegularExpressions/4.1.0": { - "dependencies": { - "System.Collections": "4.0.11", - "System.Globalization": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.1.0", - "System.Threading": "4.3.0" - } - }, - "System.Threading/4.3.0": { - "dependencies": { - "System.Runtime": "4.3.0", - "System.Threading.Tasks": "4.3.0" - } - }, - "System.Threading.Tasks/4.3.0": { - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "Logicality.LittleForker/1.0.0": { - "dependencies": { - "Microsoft.Extensions.Logging.Abstractions": "8.0.0", - "Stateless": "5.13.0" - }, - "runtime": { - "Logicality.LittleForker.dll": {} - } - }, - "Logicality.LittleForker.Reference/1.0.0.0": { - "runtime": { - "Logicality.LittleForker.dll": { - "assemblyVersion": "1.0.0.0", - "fileVersion": "1.0.0.0" - } - } - } - } - }, - "libraries": { - "Logicality.NonTerminatingProcess/3.0.1-alpha.0.3+build.0": { - "type": "project", - "serviceable": false, - "sha512": "" - }, - "Microsoft.Build.Tasks.Git/8.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-bZKfSIKJRXLTuSzLudMFte/8CempWjVamNUR5eHJizsy+iuOuO/k2gnh7W0dHJmYY0tBf+gUErfluCv5mySAOQ==", - "path": "microsoft.build.tasks.git/8.0.0", - "hashPath": "microsoft.build.tasks.git.8.0.0.nupkg.sha512" - }, - "Microsoft.CSharp/4.0.1": { - "type": "package", - "serviceable": true, - "sha512": "sha512-17h8b5mXa87XYKrrVqdgZ38JefSUqLChUQpXgSnpzsM0nDOhE40FTeNWOJ/YmySGV6tG6T8+hjz6vxbknHJr6A==", - "path": "microsoft.csharp/4.0.1", - "hashPath": "microsoft.csharp.4.0.1.nupkg.sha512" - }, - "Microsoft.Extensions.Configuration/3.1.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-Lu41BWNmwhKr6LgyQvcYBOge0pPvmiaK8R5UHXX4//wBhonJyWcT2OK1mqYfEM5G7pTf31fPrpIHOT6sN7EGOA==", - "path": "microsoft.extensions.configuration/3.1.0", - "hashPath": "microsoft.extensions.configuration.3.1.0.nupkg.sha512" - }, - "Microsoft.Extensions.Configuration.Abstractions/3.1.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-ESz6bVoDQX7sgWdKHF6G9Pq672T8k+19AFb/txDXwdz7MoqaNQj2/in3agm/3qae9V+WvQZH86LLTNVo0it8vQ==", - "path": "microsoft.extensions.configuration.abstractions/3.1.0", - "hashPath": "microsoft.extensions.configuration.abstractions.3.1.0.nupkg.sha512" - }, - "Microsoft.Extensions.Configuration.Binder/3.1.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-o9eELDBfNkR7sUtYysFZ1Q7BQ1mYt27DMkups/3vu7xgPyOpMD+iAfrBZFzUXT2iw0fmFb8s1gfNBZS+IgjKdQ==", - "path": "microsoft.extensions.configuration.binder/3.1.0", - "hashPath": "microsoft.extensions.configuration.binder.3.1.0.nupkg.sha512" - }, - "Microsoft.Extensions.Configuration.CommandLine/3.1.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-KDjz4HBw549oW4Y1eQAImAugCSYn84KXwgGZtgMqEwctvkdxZo0ObZC5QQI/YvX21U+DArR9+NfWZ3MxD9MhPA==", - "path": "microsoft.extensions.configuration.commandline/3.1.0", - "hashPath": "microsoft.extensions.configuration.commandline.3.1.0.nupkg.sha512" - }, - "Microsoft.Extensions.Configuration.EnvironmentVariables/3.1.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-WryksPlAFFRMWIGpFwDDbrVSD/kSO7P7fRRzBHh6vEIrgflsM8tpPCcgIvKszH4fz4vcuapih9RMdiiJ2VS7aw==", - "path": "microsoft.extensions.configuration.environmentvariables/3.1.0", - "hashPath": "microsoft.extensions.configuration.environmentvariables.3.1.0.nupkg.sha512" - }, - "Microsoft.Extensions.DependencyInjection.Abstractions/8.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-cjWrLkJXK0rs4zofsK4bSdg+jhDLTaxrkXu4gS6Y7MAlCvRyNNgwY/lJi5RDlQOnSZweHqoyvgvbdvQsRIW+hg==", - "path": "microsoft.extensions.dependencyinjection.abstractions/8.0.0", - "hashPath": "microsoft.extensions.dependencyinjection.abstractions.8.0.0.nupkg.sha512" - }, - "Microsoft.Extensions.Logging.Abstractions/8.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-arDBqTgFCyS0EvRV7O3MZturChstm50OJ0y9bDJvAcmEPJm0FFpFyjU/JLYyStNGGey081DvnQYlncNX5SJJGA==", - "path": "microsoft.extensions.logging.abstractions/8.0.0", - "hashPath": "microsoft.extensions.logging.abstractions.8.0.0.nupkg.sha512" - }, - "Microsoft.Extensions.Primitives/3.1.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-LEKAnX7lhUhSoIc2XraCTK3M4IU/LdVUzCe464Sa4+7F4ZJuXHHRzZli2mDbiT4xzAZhgqXbvfnb5+CNDcQFfg==", - "path": "microsoft.extensions.primitives/3.1.0", - "hashPath": "microsoft.extensions.primitives.3.1.0.nupkg.sha512" - }, - "Microsoft.NETCore.Platforms/1.1.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-kz0PEW2lhqygehI/d6XsPCQzD7ff7gUJaVGPVETX611eadGsA3A877GdSlU0LRVMCTH/+P3o2iDTak+S08V2+A==", - "path": "microsoft.netcore.platforms/1.1.0", - "hashPath": "microsoft.netcore.platforms.1.1.0.nupkg.sha512" - }, - "Microsoft.NETCore.Targets/1.1.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-aOZA3BWfz9RXjpzt0sRJJMjAscAUm3Hoa4UWAfceV9UTYxgwZ1lZt5nO2myFf+/jetYQo4uTP7zS8sJY67BBxg==", - "path": "microsoft.netcore.targets/1.1.0", - "hashPath": "microsoft.netcore.targets.1.1.0.nupkg.sha512" - }, - "Microsoft.SourceLink.Common/8.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-dk9JPxTCIevS75HyEQ0E4OVAFhB2N+V9ShCXf8Q6FkUQZDkgLI12y679Nym1YqsiSysuQskT7Z+6nUf3yab6Vw==", - "path": "microsoft.sourcelink.common/8.0.0", - "hashPath": "microsoft.sourcelink.common.8.0.0.nupkg.sha512" - }, - "Microsoft.SourceLink.GitHub/8.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-G5q7OqtwIyGTkeIOAc3u2ZuV/kicQaec5EaRnc0pIeSnh9LUjj+PYQrJYBURvDt7twGl2PKA7nSN0kz1Zw5bnQ==", - "path": "microsoft.sourcelink.github/8.0.0", - "hashPath": "microsoft.sourcelink.github.8.0.0.nupkg.sha512" - }, - "MinVer/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-YNVAW3loCFW4kTwensApaZUl+7xREK75QQNOFSbsbXx2sCSm9/IHBjUHsJGn3u0UA5r/sAqrdYBNUlOFfLhUrA==", - "path": "minver/4.3.0", - "hashPath": "minver.4.3.0.nupkg.sha512" - }, - "runtime.native.System/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-c/qWt2LieNZIj1jGnVNsE2Kl23Ya2aSTBuXMD6V7k9KWr6l16Tqdwq+hJScEpWER9753NWC8h96PaVNY5Ld7Jw==", - "path": "runtime.native.system/4.3.0", - "hashPath": "runtime.native.system.4.3.0.nupkg.sha512" - }, - "Serilog/2.5.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-JwwkgNYNFKT4kQZ3qBV3VqPgchUg1A6FnlFa9hgyanylwBhJ7eTFl3pgLVxijFEb+oHLImRcMaTsMzBt2AG0aQ==", - "path": "serilog/2.5.0", - "hashPath": "serilog.2.5.0.nupkg.sha512" - }, - "Serilog.Sinks.Console/3.1.1": { - "type": "package", - "serviceable": true, - "sha512": "sha512-56mI5AqvyF/i/c2451nvV71kq370XOCE4Uu5qiaJ295sOhMb9q3BWwG7mWLOVSnmpWiq0SBT3SXfgRXGNP6vzA==", - "path": "serilog.sinks.console/3.1.1", - "hashPath": "serilog.sinks.console.3.1.1.nupkg.sha512" - }, - "Stateless/5.13.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-M4Rb4b31TUEfhCd4en0WlRfuFgQ2rwva9e1CuXnto5vNGvRsNVimHENnvjegf6nKG9ZH+51McAZ/huqRtTziYg==", - "path": "stateless/5.13.0", - "hashPath": "stateless.5.13.0.nupkg.sha512" - }, - "System.Collections/4.0.11": { - "type": "package", - "serviceable": true, - "sha512": "sha512-YUJGz6eFKqS0V//mLt25vFGrrCvOnsXjlvFQs+KimpwNxug9x0Pzy4PlFMU3Q2IzqAa9G2L4LsK3+9vCBK7oTg==", - "path": "system.collections/4.0.11", - "hashPath": "system.collections.4.0.11.nupkg.sha512" - }, - "System.Collections.NonGeneric/4.0.1": { - "type": "package", - "serviceable": true, - "sha512": "sha512-hMxFT2RhhlffyCdKLDXjx8WEC5JfCvNozAZxCablAuFRH74SCV4AgzE8yJCh/73bFnEoZgJ9MJmkjQ0dJmnKqA==", - "path": "system.collections.nongeneric/4.0.1", - "hashPath": "system.collections.nongeneric.4.0.1.nupkg.sha512" - }, - "System.Console/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-DHDrIxiqk1h03m6khKWV2X8p/uvN79rgSqpilL6uzpmSfxfU5ng8VcPtW4qsDsQDHiTv6IPV9TmD5M/vElPNLg==", - "path": "system.console/4.3.0", - "hashPath": "system.console.4.3.0.nupkg.sha512" - }, - "System.Diagnostics.Debug/4.0.11": { - "type": "package", - "serviceable": true, - "sha512": "sha512-w5U95fVKHY4G8ASs/K5iK3J5LY+/dLFd4vKejsnI/ZhBsWS9hQakfx3Zr7lRWKg4tAw9r4iktyvsTagWkqYCiw==", - "path": "system.diagnostics.debug/4.0.11", - "hashPath": "system.diagnostics.debug.4.0.11.nupkg.sha512" - }, - "System.Dynamic.Runtime/4.0.11": { - "type": "package", - "serviceable": true, - "sha512": "sha512-db34f6LHYM0U0JpE+sOmjar27BnqTVkbLJhgfwMpTdgTigG/Hna3m2MYVwnFzGGKnEJk2UXFuoVTr8WUbU91/A==", - "path": "system.dynamic.runtime/4.0.11", - "hashPath": "system.dynamic.runtime.4.0.11.nupkg.sha512" - }, - "System.Globalization/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-kYdVd2f2PAdFGblzFswE4hkNANJBKRmsfa2X5LG2AcWE1c7/4t0pYae1L8vfZ5xvE2nK/R9JprtToA61OSHWIg==", - "path": "system.globalization/4.3.0", - "hashPath": "system.globalization.4.3.0.nupkg.sha512" - }, - "System.IO/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-3qjaHvxQPDpSOYICjUoTsmoq5u6QJAFRUITgeT/4gqkF1bajbSmb1kwSxEA8AHlofqgcKJcM8udgieRNhaJ5Cg==", - "path": "system.io/4.3.0", - "hashPath": "system.io.4.3.0.nupkg.sha512" - }, - "System.Linq/4.1.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-bQ0iYFOQI0nuTnt+NQADns6ucV4DUvMdwN6CbkB1yj8i7arTGiTN5eok1kQwdnnNWSDZfIUySQY+J3d5KjWn0g==", - "path": "system.linq/4.1.0", - "hashPath": "system.linq.4.1.0.nupkg.sha512" - }, - "System.Linq.Expressions/4.1.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-I+y02iqkgmCAyfbqOmSDOgqdZQ5tTj80Akm5BPSS8EeB0VGWdy6X1KCoYe8Pk6pwDoAKZUOdLVxnTJcExiv5zw==", - "path": "system.linq.expressions/4.1.0", - "hashPath": "system.linq.expressions.4.1.0.nupkg.sha512" - }, - "System.ObjectModel/4.0.12": { - "type": "package", - "serviceable": true, - "sha512": "sha512-tAgJM1xt3ytyMoW4qn4wIqgJYm7L7TShRZG4+Q4Qsi2PCcj96pXN7nRywS9KkB3p/xDUjc2HSwP9SROyPYDYKQ==", - "path": "system.objectmodel/4.0.12", - "hashPath": "system.objectmodel.4.0.12.nupkg.sha512" - }, - "System.Reflection/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-KMiAFoW7MfJGa9nDFNcfu+FpEdiHpWgTcS2HdMpDvt9saK3y/G4GwprPyzqjFH9NTaGPQeWNHU+iDlDILj96aQ==", - "path": "system.reflection/4.3.0", - "hashPath": "system.reflection.4.3.0.nupkg.sha512" - }, - "System.Reflection.Emit/4.0.1": { - "type": "package", - "serviceable": true, - "sha512": "sha512-P2wqAj72fFjpP6wb9nSfDqNBMab+2ovzSDzUZK7MVIm54tBJEPr9jWfSjjoTpPwj1LeKcmX3vr0ttyjSSFM47g==", - "path": "system.reflection.emit/4.0.1", - "hashPath": "system.reflection.emit.4.0.1.nupkg.sha512" - }, - "System.Reflection.Emit.ILGeneration/4.0.1": { - "type": "package", - "serviceable": true, - "sha512": "sha512-Ov6dU8Bu15Bc7zuqttgHF12J5lwSWyTf1S+FJouUXVMSqImLZzYaQ+vRr1rQ0OZ0HqsrwWl4dsKHELckQkVpgA==", - "path": "system.reflection.emit.ilgeneration/4.0.1", - "hashPath": "system.reflection.emit.ilgeneration.4.0.1.nupkg.sha512" - }, - "System.Reflection.Emit.Lightweight/4.0.1": { - "type": "package", - "serviceable": true, - "sha512": "sha512-sSzHHXueZ5Uh0OLpUQprhr+ZYJrLPA2Cmr4gn0wj9+FftNKXx8RIMKvO9qnjk2ebPYUjZ+F2ulGdPOsvj+MEjA==", - "path": "system.reflection.emit.lightweight/4.0.1", - "hashPath": "system.reflection.emit.lightweight.4.0.1.nupkg.sha512" - }, - "System.Reflection.Extensions/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-rJkrJD3kBI5B712aRu4DpSIiHRtr6QlfZSQsb0hYHrDCZORXCFjQfoipo2LaMUHoT9i1B7j7MnfaEKWDFmFQNQ==", - "path": "system.reflection.extensions/4.3.0", - "hashPath": "system.reflection.extensions.4.3.0.nupkg.sha512" - }, - "System.Reflection.Primitives/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-5RXItQz5As4xN2/YUDxdpsEkMhvw3e6aNveFXUn4Hl/udNTCNhnKp8lT9fnc3MhvGKh1baak5CovpuQUXHAlIA==", - "path": "system.reflection.primitives/4.3.0", - "hashPath": "system.reflection.primitives.4.3.0.nupkg.sha512" - }, - "System.Reflection.TypeExtensions/4.1.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-tsQ/ptQ3H5FYfON8lL4MxRk/8kFyE0A+tGPXmVP967cT/gzLHYxIejIYSxp4JmIeFHVP78g/F2FE1mUUTbDtrg==", - "path": "system.reflection.typeextensions/4.1.0", - "hashPath": "system.reflection.typeextensions.4.1.0.nupkg.sha512" - }, - "System.Resources.ResourceManager/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-/zrcPkkWdZmI4F92gL/TPumP98AVDu/Wxr3CSJGQQ+XN6wbRZcyfSKVoPo17ilb3iOr0cCRqJInGwNMolqhS8A==", - "path": "system.resources.resourcemanager/4.3.0", - "hashPath": "system.resources.resourcemanager.4.3.0.nupkg.sha512" - }, - "System.Runtime/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-JufQi0vPQ0xGnAczR13AUFglDyVYt4Kqnz1AZaiKZ5+GICq0/1MH/mO/eAJHt/mHW1zjKBJd7kV26SrxddAhiw==", - "path": "system.runtime/4.3.0", - "hashPath": "system.runtime.4.3.0.nupkg.sha512" - }, - "System.Runtime.Extensions/4.1.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-CUOHjTT/vgP0qGW22U4/hDlOqXmcPq5YicBaXdUR2UiUoLwBT+olO6we4DVbq57jeX5uXH2uerVZhf0qGj+sVQ==", - "path": "system.runtime.extensions/4.1.0", - "hashPath": "system.runtime.extensions.4.1.0.nupkg.sha512" - }, - "System.Runtime.Handles/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-OKiSUN7DmTWeYb3l51A7EYaeNMnvxwE249YtZz7yooT4gOZhmTjIn48KgSsw2k2lYdLgTKNJw/ZIfSElwDRVgg==", - "path": "system.runtime.handles/4.3.0", - "hashPath": "system.runtime.handles.4.3.0.nupkg.sha512" - }, - "System.Runtime.InteropServices/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-uv1ynXqiMK8mp1GM3jDqPCFN66eJ5w5XNomaK2XD+TuCroNTLFGeZ+WCmBMcBDyTFKou3P6cR6J/QsaqDp7fGQ==", - "path": "system.runtime.interopservices/4.3.0", - "hashPath": "system.runtime.interopservices.4.3.0.nupkg.sha512" - }, - "System.Runtime.InteropServices.RuntimeInformation/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-cbz4YJMqRDR7oLeMRbdYv7mYzc++17lNhScCX0goO2XpGWdvAt60CGN+FHdePUEHCe/Jy9jUlvNAiNdM+7jsOw==", - "path": "system.runtime.interopservices.runtimeinformation/4.3.0", - "hashPath": "system.runtime.interopservices.runtimeinformation.4.3.0.nupkg.sha512" - }, - "System.Text.Encoding/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-BiIg+KWaSDOITze6jGQynxg64naAPtqGHBwDrLaCtixsa5bKiR8dpPOHA7ge3C0JJQizJE+sfkz1wV+BAKAYZw==", - "path": "system.text.encoding/4.3.0", - "hashPath": "system.text.encoding.4.3.0.nupkg.sha512" - }, - "System.Text.RegularExpressions/4.1.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-i88YCXpRTjCnoSQZtdlHkAOx4KNNik4hMy83n0+Ftlb7jvV6ZiZWMpnEZHhjBp6hQVh8gWd/iKNPzlPF7iyA2g==", - "path": "system.text.regularexpressions/4.1.0", - "hashPath": "system.text.regularexpressions.4.1.0.nupkg.sha512" - }, - "System.Threading/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-VkUS0kOBcUf3Wwm0TSbrevDDZ6BlM+b/HRiapRFWjM5O0NS0LviG0glKmFK+hhPDd1XFeSdU1GmlLhb2CoVpIw==", - "path": "system.threading/4.3.0", - "hashPath": "system.threading.4.3.0.nupkg.sha512" - }, - "System.Threading.Tasks/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-LbSxKEdOUhVe8BezB/9uOGGppt+nZf6e1VFyw6v3DN6lqitm0OSn2uXMOdtP0M3W4iMcqcivm2J6UgqiwwnXiA==", - "path": "system.threading.tasks/4.3.0", - "hashPath": "system.threading.tasks.4.3.0.nupkg.sha512" - }, - "Logicality.LittleForker/1.0.0": { - "type": "project", - "serviceable": false, - "sha512": "" - }, - "Logicality.LittleForker.Reference/1.0.0.0": { - "type": "reference", - "serviceable": false, - "sha512": "" - } - } -} \ No newline at end of file diff --git a/libs/little-forker/src/LittleForker.Tests/NonTerminatingProcess/Logicality.NonTerminatingProcess.dll b/libs/little-forker/src/LittleForker.Tests/NonTerminatingProcess/Logicality.NonTerminatingProcess.dll deleted file mode 100644 index 84f8c379..00000000 Binary files a/libs/little-forker/src/LittleForker.Tests/NonTerminatingProcess/Logicality.NonTerminatingProcess.dll and /dev/null differ diff --git a/libs/little-forker/src/LittleForker.Tests/NonTerminatingProcess/Logicality.NonTerminatingProcess.exe b/libs/little-forker/src/LittleForker.Tests/NonTerminatingProcess/Logicality.NonTerminatingProcess.exe deleted file mode 100644 index f1193bd5..00000000 Binary files a/libs/little-forker/src/LittleForker.Tests/NonTerminatingProcess/Logicality.NonTerminatingProcess.exe and /dev/null differ diff --git a/libs/little-forker/src/LittleForker.Tests/NonTerminatingProcess/Logicality.NonTerminatingProcess.runtimeconfig.json b/libs/little-forker/src/LittleForker.Tests/NonTerminatingProcess/Logicality.NonTerminatingProcess.runtimeconfig.json deleted file mode 100644 index becfaeac..00000000 --- a/libs/little-forker/src/LittleForker.Tests/NonTerminatingProcess/Logicality.NonTerminatingProcess.runtimeconfig.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "runtimeOptions": { - "tfm": "net8.0", - "framework": { - "name": "Microsoft.NETCore.App", - "version": "8.0.0" - }, - "configProperties": { - "System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false - } - } -} \ No newline at end of file diff --git a/libs/little-forker/src/LittleForker.Tests/NonTerminatingProcess/Logicality.NonTerminatingProcess.xml b/libs/little-forker/src/LittleForker.Tests/NonTerminatingProcess/Logicality.NonTerminatingProcess.xml deleted file mode 100644 index 317e7632..00000000 --- a/libs/little-forker/src/LittleForker.Tests/NonTerminatingProcess/Logicality.NonTerminatingProcess.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - Logicality.NonTerminatingProcess - - - - diff --git a/libs/little-forker/src/LittleForker.Tests/NonTerminatingProcess/Microsoft.Extensions.Configuration.Abstractions.dll b/libs/little-forker/src/LittleForker.Tests/NonTerminatingProcess/Microsoft.Extensions.Configuration.Abstractions.dll deleted file mode 100644 index 52befe91..00000000 Binary files a/libs/little-forker/src/LittleForker.Tests/NonTerminatingProcess/Microsoft.Extensions.Configuration.Abstractions.dll and /dev/null differ diff --git a/libs/little-forker/src/LittleForker.Tests/NonTerminatingProcess/Microsoft.Extensions.Configuration.Binder.dll b/libs/little-forker/src/LittleForker.Tests/NonTerminatingProcess/Microsoft.Extensions.Configuration.Binder.dll deleted file mode 100644 index 84b0357b..00000000 Binary files a/libs/little-forker/src/LittleForker.Tests/NonTerminatingProcess/Microsoft.Extensions.Configuration.Binder.dll and /dev/null differ diff --git a/libs/little-forker/src/LittleForker.Tests/NonTerminatingProcess/Microsoft.Extensions.Configuration.CommandLine.dll b/libs/little-forker/src/LittleForker.Tests/NonTerminatingProcess/Microsoft.Extensions.Configuration.CommandLine.dll deleted file mode 100644 index 5cd78f5f..00000000 Binary files a/libs/little-forker/src/LittleForker.Tests/NonTerminatingProcess/Microsoft.Extensions.Configuration.CommandLine.dll and /dev/null differ diff --git a/libs/little-forker/src/LittleForker.Tests/NonTerminatingProcess/Microsoft.Extensions.Configuration.EnvironmentVariables.dll b/libs/little-forker/src/LittleForker.Tests/NonTerminatingProcess/Microsoft.Extensions.Configuration.EnvironmentVariables.dll deleted file mode 100644 index fa1bd7e8..00000000 Binary files a/libs/little-forker/src/LittleForker.Tests/NonTerminatingProcess/Microsoft.Extensions.Configuration.EnvironmentVariables.dll and /dev/null differ diff --git a/libs/little-forker/src/LittleForker.Tests/NonTerminatingProcess/Microsoft.Extensions.Configuration.dll b/libs/little-forker/src/LittleForker.Tests/NonTerminatingProcess/Microsoft.Extensions.Configuration.dll deleted file mode 100644 index 718180b5..00000000 Binary files a/libs/little-forker/src/LittleForker.Tests/NonTerminatingProcess/Microsoft.Extensions.Configuration.dll and /dev/null differ diff --git a/libs/little-forker/src/LittleForker.Tests/NonTerminatingProcess/Microsoft.Extensions.DependencyInjection.Abstractions.dll b/libs/little-forker/src/LittleForker.Tests/NonTerminatingProcess/Microsoft.Extensions.DependencyInjection.Abstractions.dll deleted file mode 100644 index 0b3c8e9a..00000000 Binary files a/libs/little-forker/src/LittleForker.Tests/NonTerminatingProcess/Microsoft.Extensions.DependencyInjection.Abstractions.dll and /dev/null differ diff --git a/libs/little-forker/src/LittleForker.Tests/NonTerminatingProcess/Microsoft.Extensions.Logging.Abstractions.dll b/libs/little-forker/src/LittleForker.Tests/NonTerminatingProcess/Microsoft.Extensions.Logging.Abstractions.dll deleted file mode 100644 index 085f4159..00000000 Binary files a/libs/little-forker/src/LittleForker.Tests/NonTerminatingProcess/Microsoft.Extensions.Logging.Abstractions.dll and /dev/null differ diff --git a/libs/little-forker/src/LittleForker.Tests/NonTerminatingProcess/Microsoft.Extensions.Primitives.dll b/libs/little-forker/src/LittleForker.Tests/NonTerminatingProcess/Microsoft.Extensions.Primitives.dll deleted file mode 100644 index d12ec5bd..00000000 Binary files a/libs/little-forker/src/LittleForker.Tests/NonTerminatingProcess/Microsoft.Extensions.Primitives.dll and /dev/null differ diff --git a/libs/little-forker/src/LittleForker.Tests/NonTerminatingProcess/Serilog.Sinks.Console.dll b/libs/little-forker/src/LittleForker.Tests/NonTerminatingProcess/Serilog.Sinks.Console.dll deleted file mode 100644 index b0178a75..00000000 Binary files a/libs/little-forker/src/LittleForker.Tests/NonTerminatingProcess/Serilog.Sinks.Console.dll and /dev/null differ diff --git a/libs/little-forker/src/LittleForker.Tests/NonTerminatingProcess/Serilog.dll b/libs/little-forker/src/LittleForker.Tests/NonTerminatingProcess/Serilog.dll deleted file mode 100644 index acb43403..00000000 Binary files a/libs/little-forker/src/LittleForker.Tests/NonTerminatingProcess/Serilog.dll and /dev/null differ diff --git a/libs/little-forker/src/LittleForker.Tests/NonTerminatingProcess/stateless.dll b/libs/little-forker/src/LittleForker.Tests/NonTerminatingProcess/stateless.dll deleted file mode 100644 index b001b283..00000000 Binary files a/libs/little-forker/src/LittleForker.Tests/NonTerminatingProcess/stateless.dll and /dev/null differ diff --git a/libs/little-forker/src/LittleForker.Tests/SelfTerminatingProcess/Logicality.SelfTerminatingProcess.deps.json b/libs/little-forker/src/LittleForker.Tests/SelfTerminatingProcess/Logicality.SelfTerminatingProcess.deps.json deleted file mode 100644 index 938e2772..00000000 --- a/libs/little-forker/src/LittleForker.Tests/SelfTerminatingProcess/Logicality.SelfTerminatingProcess.deps.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "runtimeTarget": { - "name": ".NETCoreApp,Version=v8.0", - "signature": "" - }, - "compilationOptions": {}, - "targets": { - ".NETCoreApp,Version=v8.0": { - "Logicality.SelfTerminatingProcess/3.0.1-alpha.0.3+build.0": { - "dependencies": { - "Microsoft.SourceLink.GitHub": "8.0.0", - "MinVer": "4.3.0" - }, - "runtime": { - "Logicality.SelfTerminatingProcess.dll": {} - } - }, - "Microsoft.Build.Tasks.Git/8.0.0": {}, - "Microsoft.SourceLink.Common/8.0.0": {}, - "Microsoft.SourceLink.GitHub/8.0.0": { - "dependencies": { - "Microsoft.Build.Tasks.Git": "8.0.0", - "Microsoft.SourceLink.Common": "8.0.0" - } - }, - "MinVer/4.3.0": {} - } - }, - "libraries": { - "Logicality.SelfTerminatingProcess/3.0.1-alpha.0.3+build.0": { - "type": "project", - "serviceable": false, - "sha512": "" - }, - "Microsoft.Build.Tasks.Git/8.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-bZKfSIKJRXLTuSzLudMFte/8CempWjVamNUR5eHJizsy+iuOuO/k2gnh7W0dHJmYY0tBf+gUErfluCv5mySAOQ==", - "path": "microsoft.build.tasks.git/8.0.0", - "hashPath": "microsoft.build.tasks.git.8.0.0.nupkg.sha512" - }, - "Microsoft.SourceLink.Common/8.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-dk9JPxTCIevS75HyEQ0E4OVAFhB2N+V9ShCXf8Q6FkUQZDkgLI12y679Nym1YqsiSysuQskT7Z+6nUf3yab6Vw==", - "path": "microsoft.sourcelink.common/8.0.0", - "hashPath": "microsoft.sourcelink.common.8.0.0.nupkg.sha512" - }, - "Microsoft.SourceLink.GitHub/8.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-G5q7OqtwIyGTkeIOAc3u2ZuV/kicQaec5EaRnc0pIeSnh9LUjj+PYQrJYBURvDt7twGl2PKA7nSN0kz1Zw5bnQ==", - "path": "microsoft.sourcelink.github/8.0.0", - "hashPath": "microsoft.sourcelink.github.8.0.0.nupkg.sha512" - }, - "MinVer/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-YNVAW3loCFW4kTwensApaZUl+7xREK75QQNOFSbsbXx2sCSm9/IHBjUHsJGn3u0UA5r/sAqrdYBNUlOFfLhUrA==", - "path": "minver/4.3.0", - "hashPath": "minver.4.3.0.nupkg.sha512" - } - } -} \ No newline at end of file diff --git a/libs/little-forker/src/LittleForker.Tests/SelfTerminatingProcess/Logicality.SelfTerminatingProcess.dll b/libs/little-forker/src/LittleForker.Tests/SelfTerminatingProcess/Logicality.SelfTerminatingProcess.dll deleted file mode 100644 index 58ef8ce5..00000000 Binary files a/libs/little-forker/src/LittleForker.Tests/SelfTerminatingProcess/Logicality.SelfTerminatingProcess.dll and /dev/null differ diff --git a/libs/little-forker/src/LittleForker.Tests/SelfTerminatingProcess/Logicality.SelfTerminatingProcess.exe b/libs/little-forker/src/LittleForker.Tests/SelfTerminatingProcess/Logicality.SelfTerminatingProcess.exe deleted file mode 100644 index 62ef856f..00000000 Binary files a/libs/little-forker/src/LittleForker.Tests/SelfTerminatingProcess/Logicality.SelfTerminatingProcess.exe and /dev/null differ diff --git a/libs/little-forker/src/LittleForker.Tests/SelfTerminatingProcess/Logicality.SelfTerminatingProcess.runtimeconfig.json b/libs/little-forker/src/LittleForker.Tests/SelfTerminatingProcess/Logicality.SelfTerminatingProcess.runtimeconfig.json deleted file mode 100644 index becfaeac..00000000 --- a/libs/little-forker/src/LittleForker.Tests/SelfTerminatingProcess/Logicality.SelfTerminatingProcess.runtimeconfig.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "runtimeOptions": { - "tfm": "net8.0", - "framework": { - "name": "Microsoft.NETCore.App", - "version": "8.0.0" - }, - "configProperties": { - "System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false - } - } -} \ No newline at end of file diff --git a/libs/little-forker/src/LittleForker.Tests/SelfTerminatingProcess/Logicality.SelfTerminatingProcess.xml b/libs/little-forker/src/LittleForker.Tests/SelfTerminatingProcess/Logicality.SelfTerminatingProcess.xml deleted file mode 100644 index bc9f95d3..00000000 --- a/libs/little-forker/src/LittleForker.Tests/SelfTerminatingProcess/Logicality.SelfTerminatingProcess.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - Logicality.SelfTerminatingProcess - - - - diff --git a/libs/little-forker/src/LittleForker/AssemblyInfo.cs b/libs/little-forker/src/LittleForker/AssemblyInfo.cs deleted file mode 100644 index a670b500..00000000 --- a/libs/little-forker/src/LittleForker/AssemblyInfo.cs +++ /dev/null @@ -1,3 +0,0 @@ -using System.Runtime.CompilerServices; - -[assembly: InternalsVisibleTo("LittleForker.Tests")] \ No newline at end of file diff --git a/libs/little-forker/src/LittleForker/CooperativeShutdown.cs b/libs/little-forker/src/LittleForker/CooperativeShutdown.cs deleted file mode 100644 index b3b99534..00000000 --- a/libs/little-forker/src/LittleForker/CooperativeShutdown.cs +++ /dev/null @@ -1,186 +0,0 @@ -using System.Diagnostics; -using System.IO.Pipes; -using Microsoft.Extensions.Logging; - -namespace Logicality.LittleForker; - -/// -/// Allows a process to be co-cooperatively shut down (as opposed the more -/// brutal Process.Kill() -/// -public static class CooperativeShutdown -{ - /// - /// The pipe name a process will listen on for a EXIT signal. - /// - /// The process ID process listening. - /// A generated pipe name. - public static string GetPipeName(int processId) => $"LittleForker-{processId}"; - - /// - /// Creates a listener for cooperative shutdown. - /// - /// - /// The callback that is invoked when cooperative shutdown has been - /// requested. - /// - /// - /// A logger factory. - /// - /// A method to be called if an error occurs while listening - /// - /// A disposable representing the named pipe listener. - /// - public static Task Listen(Action shutdownRequested, ILoggerFactory loggerFactory, Action? onError = default) - { - var listener = new CooperativeShutdownListener( - GetPipeName(Process.GetCurrentProcess().Id), - shutdownRequested, - loggerFactory.CreateLogger($"{nameof(LittleForker)}.{nameof(CooperativeShutdown)}")); - - Task.Run(async () => - { - try - { - await listener.Listen().ConfigureAwait(false); - } - catch (Exception ex) - { - onError?.Invoke(ex); - } - }); - - return Task.FromResult((IDisposable)listener); - } - - /// - /// Signals to a process to shut down. - /// - /// The process ID to signal too. - /// A logger factory. - /// A task representing the operation. - // TODO Should exceptions rethrow or should we let the caller that the signalling failed i.e. Task? - public static async Task SignalExit(int processId, ILoggerFactory loggerFactory) - { - var logger = loggerFactory.CreateLogger($"{nameof(LittleForker)}.{nameof(CooperativeShutdown)}"); - var pipeName = GetPipeName(processId); - using (var pipe = new NamedPipeClientStream(".", pipeName, PipeDirection.InOut, PipeOptions.Asynchronous)) - { - try - { - await pipe.ConnectAsync((int)TimeSpan.FromSeconds(3).TotalMilliseconds).ConfigureAwait(false); - var streamWriter = new StreamWriter(pipe); - var streamReader = new StreamReader(pipe, true); - logger.LogInformation($"Signalling EXIT to client on pipe {pipeName}..."); - await SignalExit(streamWriter, streamReader).TimeoutAfter(TimeSpan.FromSeconds(3)).ConfigureAwait(false); - logger.LogInformation($"Signalling EXIT to client on pipe {pipeName} successful."); - } - catch (IOException ex) - { - logger.LogError(ex, $"Failed to signal EXIT to client on pipe {pipeName}."); - } - catch (TimeoutException ex) - { - logger.LogError(ex, $"Timeout signalling EXIT on pipe {pipeName}."); - } - catch (Exception ex) - { - logger.LogError(ex, $"Failed to signal EXIT to client on pipe {pipeName}."); - } - } - } - - private static async Task SignalExit(TextWriter streamWriter, TextReader streamReader) - { - await streamWriter.WriteLineAsync("EXIT").ConfigureAwait(false); - await streamWriter.FlushAsync().ConfigureAwait(false); - await streamReader.ReadLineAsync().TimeoutAfter(TimeSpan.FromSeconds(3)).ConfigureAwait(false); // Reads an 'OK'. - } - - private sealed class CooperativeShutdownListener : IDisposable - { - private readonly string _pipeName; - private readonly Action _shutdownRequested; - private readonly ILogger _logger; - private readonly CancellationTokenSource _stopListening; - - internal CooperativeShutdownListener( - string pipeName, - Action shutdownRequested, - ILogger logger) - { - _pipeName = pipeName; - _shutdownRequested = shutdownRequested; - _logger = logger; - _stopListening = new CancellationTokenSource(); - } - - internal async Task Listen() - { - while (!_stopListening.IsCancellationRequested) - { - // message transmission mode is not supported on Unix - var pipe = new NamedPipeServerStream(_pipeName, - PipeDirection.InOut, - NamedPipeServerStream.MaxAllowedServerInstances, - PipeTransmissionMode.Byte, - PipeOptions.None); - - _logger.LogInformation($"Listening on pipe '{_pipeName}'."); - - await pipe - .WaitForConnectionAsync(_stopListening.Token) - .ConfigureAwait(false); - - _logger.LogInformation($"Client connected to pipe '{_pipeName}'."); - - try - { - using (var reader = new StreamReader(pipe)) - { - using (var writer = new StreamWriter(pipe) { AutoFlush = true }) - { - while (true) - { - // a pipe can get disconnected after OS pipes enumeration as well - if (!pipe.IsConnected) - { - _logger.LogDebug($"Pipe {_pipeName} connection is broken re-connecting"); - break; - } - - var s = await reader.ReadLineAsync().WithCancellation(_stopListening.Token) - .ConfigureAwait(false); - - if (s != "EXIT") - { - continue; - } - - _logger.LogInformation($"Received command from server: {s}"); - - await writer.WriteLineAsync("OK").ConfigureAwait(false); - _logger.LogInformation("Responded with OK"); - - _logger.LogInformation("Raising exit request..."); - _shutdownRequested(); - - return; - } - } - } - } - catch (IOException ex) - { - // As the pipe connection should be restored this exception should not be considered as terminating - _logger.LogDebug(ex, "Pipe connection failed"); - } - } - } - - public void Dispose() - { - _stopListening.Cancel(); - } - } -} \ No newline at end of file diff --git a/libs/little-forker/src/LittleForker/IProcessInfo.cs b/libs/little-forker/src/LittleForker/IProcessInfo.cs deleted file mode 100644 index 0e527cb6..00000000 --- a/libs/little-forker/src/LittleForker/IProcessInfo.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace Logicality.LittleForker -{ - public interface IProcessInfo - { - /// - /// The process's exit code. - /// - int ExitCode { get; } - - /// - /// The process's Id. - /// - int Id { get; } - } -} \ No newline at end of file diff --git a/libs/little-forker/src/LittleForker/InterlockedBoolean.cs b/libs/little-forker/src/LittleForker/InterlockedBoolean.cs deleted file mode 100644 index 6f93620b..00000000 --- a/libs/little-forker/src/LittleForker/InterlockedBoolean.cs +++ /dev/null @@ -1,66 +0,0 @@ -// -// Copyright 2013 Hans Wolff -// -// Source: https://gist.github.com/hanswolff/7926751 -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - - -namespace Logicality.LittleForker; - -/// -/// Interlocked support for boolean values -/// -internal class InterlockedBoolean -{ - private int _value; - - /// - /// Current value - /// - public bool Value => _value == 1; - - /// - /// Initializes a new instance of - /// - /// initial value - public InterlockedBoolean(bool initialValue = false) - { - _value = initialValue ? 1 : 0; - } - - /// - /// Sets a new value - /// - /// new value - /// the original value before any operation was performed - public bool Set(bool newValue) - { - var oldValue = Interlocked.Exchange(ref _value, newValue ? 1 : 0); - return oldValue == 1; - } - - /// - /// Compares the current value and the comparand for equality and, if they are equal, - /// replaces the current value with the new value in an atomic/thread-safe operation. - /// - /// new value - /// value to compare the current value with - /// the original value before any operation was performed - public bool CompareExchange(bool newValue, bool comparand) - { - var oldValue = Interlocked.CompareExchange(ref _value, newValue ? 1 : 0, comparand ? 1 : 0); - return oldValue == 1; - } -} \ No newline at end of file diff --git a/libs/little-forker/src/LittleForker/LittleForker.csproj b/libs/little-forker/src/LittleForker/LittleForker.csproj deleted file mode 100644 index 1149ee59..00000000 --- a/libs/little-forker/src/LittleForker/LittleForker.csproj +++ /dev/null @@ -1,15 +0,0 @@ - - - - process-supervision, child-process - A utility to assist with spawing child processes, monitor their lifecycle and co-operative shutdown. - - $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb - - - - - - - - diff --git a/libs/little-forker/src/LittleForker/ProcessExitedHelper.cs b/libs/little-forker/src/LittleForker/ProcessExitedHelper.cs deleted file mode 100644 index 2f5968b6..00000000 --- a/libs/little-forker/src/LittleForker/ProcessExitedHelper.cs +++ /dev/null @@ -1,84 +0,0 @@ -using System.Diagnostics; -using Microsoft.Extensions.Logging; - -namespace Logicality.LittleForker; - -/// -/// Helper that raises event when the process has exited. A wrapper around -/// Process.Exited with some error handling and logging. -/// -public sealed class ProcessExitedHelper : IDisposable -{ - private int _processExitedRaised; - private readonly Process? _process; - - /// - /// Initializes a new instance of - /// - /// - /// The process Id of the process to watch for exited. - /// - /// - /// A callback that is invoked when process has exited or does not - /// exist with the instance as a - /// parameter. - /// - /// - /// A logger. - /// - public ProcessExitedHelper( - int processId, - Action processExited, - ILoggerFactory loggerFactory) - { - ProcessId = processId; - var logger = loggerFactory.CreateLogger($"{nameof(LittleForker)}.{nameof(ProcessExitedHelper)}"); - - _process = Process.GetProcesses().SingleOrDefault(pr => pr.Id == processId); - if (_process == null) - { - logger.LogError("Process with Id {processId} was not found.", processId); - OnProcessExit(); - return; - } - logger.LogInformation("Process with Id {processId} found.", processId); - try - { - _process.EnableRaisingEvents = true; - _process.Exited += (_, __) => - { - logger.LogInformation("Parent process with Id {processId} exited.", processId); - OnProcessExit(); - }; - } - // Race condition: this may be thrown if the process has already exited before - // attaching to the Exited event - catch (InvalidOperationException ex) - { - logger.LogInformation(ex, "Process with Id {processId} has already exited.", processId); - OnProcessExit(); - } - - if (_process.HasExited) - { - logger.LogInformation("Process with Id {processId} has already exited.", processId); - OnProcessExit(); - } - - void OnProcessExit() - { - if (Interlocked.CompareExchange(ref _processExitedRaised, 1, 0) == 0) // Ensure raised once - { - logger.LogInformation("Raising process exited."); - processExited(this); - } - } - } - - public int ProcessId { get; } - - public void Dispose() - { - _process?.Dispose(); - } -} \ No newline at end of file diff --git a/libs/little-forker/src/LittleForker/ProcessInfo.cs b/libs/little-forker/src/LittleForker/ProcessInfo.cs deleted file mode 100644 index 7534603e..00000000 --- a/libs/little-forker/src/LittleForker/ProcessInfo.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System.Diagnostics; - -namespace Logicality.LittleForker; - -internal class ProcessInfo : IProcessInfo -{ - private readonly Process _process; - - internal ProcessInfo(Process process) - { - _process = process; - } - - public int ExitCode => _process.ExitCode; - - public int Id => _process.Id; -} \ No newline at end of file diff --git a/libs/little-forker/src/LittleForker/ProcessRunType.cs b/libs/little-forker/src/LittleForker/ProcessRunType.cs deleted file mode 100644 index 6becbab3..00000000 --- a/libs/little-forker/src/LittleForker/ProcessRunType.cs +++ /dev/null @@ -1,17 +0,0 @@ -namespace Logicality.LittleForker; - -/// -/// Defined how a process is expected to run. -/// -public enum ProcessRunType -{ - /// - /// Processes that are expected to terminate of their own accord. - /// - SelfTerminating, - /// - /// Processes that are not expected to terminiate of their own - /// accord and that must be co-operatively shutdown or killed. - /// - NonTerminating -} \ No newline at end of file diff --git a/libs/little-forker/src/LittleForker/ProcessSupervisor.cs b/libs/little-forker/src/LittleForker/ProcessSupervisor.cs deleted file mode 100644 index ea3c6179..00000000 --- a/libs/little-forker/src/LittleForker/ProcessSupervisor.cs +++ /dev/null @@ -1,370 +0,0 @@ -using System.Collections.Specialized; -using System.Diagnostics; -using Microsoft.Extensions.Logging; -using Stateless; -using Stateless.Graph; - -namespace Logicality.LittleForker; - -/// -/// Launches an process and tracks it's lifecycle . -/// -public class ProcessSupervisor : IDisposable -{ - private readonly ILogger _logger; - private readonly string _arguments; - private readonly StringDictionary? _environmentVariables; - private readonly bool _captureStdErr; - private readonly string _processPath; - private readonly StateMachine.TriggerWithParameters _startErrorTrigger; - private readonly StateMachine.TriggerWithParameters _stopTrigger; - private readonly StateMachine _processStateMachine = new(State.NotStarted, FiringMode.Immediate); - private readonly string _workingDirectory; - private Process? _process; - private readonly ILoggerFactory _loggerFactory; - private bool _killed; - private readonly TaskQueue _taskQueue = new(); - - /// - /// The state a process is in. - /// - public enum State - { - NotStarted, - Running, - StartFailed, - Stopping, - ExitedSuccessfully, - ExitedWithError, - ExitedUnexpectedly, - ExitedKilled - } - - private enum Trigger - { - Start, - StartError, - Stop, - ProcessExit - } - - /// - /// Initializes a new instance of - /// - /// - /// The working directory to start the process in. - /// - /// - /// The path to the process. - /// - /// - /// The process run type. - /// - /// - /// A logger factory. - /// - /// - /// Arguments to be passed to the process. - /// - /// - /// Environment variables that are set before the process starts. - /// - /// - /// A flag to indicated whether to capture standard error output. - /// - public ProcessSupervisor( - ILoggerFactory loggerFactory, - ProcessRunType processRunType, - string workingDirectory, - string processPath, - string? arguments = null, - StringDictionary? environmentVariables = null, - bool captureStdErr = false) - { - _loggerFactory = loggerFactory; - _workingDirectory = workingDirectory; - _processPath = processPath; - _arguments = arguments ?? string.Empty; - _environmentVariables = environmentVariables; - _captureStdErr = captureStdErr; - - _logger = loggerFactory.CreateLogger($"{nameof(LittleForker)}.{nameof(ProcessSupervisor)}-{processPath}"); - - _processStateMachine - .Configure(State.NotStarted) - .Permit(Trigger.Start, State.Running); - - _startErrorTrigger = _processStateMachine.SetTriggerParameters(Trigger.StartError); - _stopTrigger = _processStateMachine.SetTriggerParameters(Trigger.Stop); - - _processStateMachine - .Configure(State.Running) - .OnEntryFrom(Trigger.Start, OnStart) - .PermitIf( - Trigger.ProcessExit, - State.ExitedSuccessfully, - () => processRunType == ProcessRunType.SelfTerminating - && _process!.HasExited - && _process!.ExitCode == 0, - "SelfTerminating && ExitCode==0") - .PermitIf( - Trigger.ProcessExit, - State.ExitedWithError, - () => processRunType == ProcessRunType.SelfTerminating - && _process!.HasExited - && _process!.ExitCode != 0, - "SelfTerminating && ExitCode!=0") - .PermitIf( - Trigger.ProcessExit, - State.ExitedUnexpectedly, - () => processRunType == ProcessRunType.NonTerminating - && _process!.HasExited, - "NonTerminating and died.") - .Permit(Trigger.Stop, State.Stopping) - .Permit(Trigger.StartError, State.StartFailed); - - _processStateMachine - .Configure(State.StartFailed) - .OnEntryFrom(_startErrorTrigger, OnStartError); - - _processStateMachine - .Configure(State.Stopping) - .OnEntryFromAsync(_stopTrigger, OnStop) - .PermitIf(Trigger.ProcessExit, State.ExitedSuccessfully, - () => processRunType == ProcessRunType.NonTerminating - && !_killed - && _process!.HasExited - && _process!.ExitCode == 0, - "NonTerminating and shut down cleanly") - .PermitIf(Trigger.ProcessExit, State.ExitedWithError, - () => processRunType == ProcessRunType.NonTerminating - && !_killed - && _process!.HasExited - && _process!.ExitCode != 0, - "NonTerminating and shut down with non-zero exit code") - .PermitIf(Trigger.ProcessExit, State.ExitedKilled, - () => processRunType == ProcessRunType.NonTerminating - && _killed - && _process!.HasExited - && _process!.ExitCode != 0, - "NonTerminating and killed."); - - _processStateMachine - .Configure(State.StartFailed) - .Permit(Trigger.Start, State.Running); - - _processStateMachine - .Configure(State.ExitedSuccessfully) - .Permit(Trigger.Start, State.Running); - - _processStateMachine - .Configure(State.ExitedUnexpectedly) - .Permit(Trigger.Start, State.Running); - - _processStateMachine - .Configure(State.ExitedKilled) - .Permit(Trigger.Start, State.Running); - - _processStateMachine.OnTransitioned(transition => - { - _logger.LogInformation($"State transition from {transition.Source} to {transition.Destination}"); - StateChanged?.Invoke(transition.Destination); - }); - } - - /// - /// Contains the caught exception in the event a process failed to - /// be launched. - /// - public Exception? OnStartException { get; private set; } - - /// - /// Information about the launched process. - /// - public IProcessInfo? ProcessInfo { get; private set; } - - public State CurrentState => _processStateMachine.State; - - /// - /// Raised when the process emits console data. - /// - public event Action? OutputDataReceived; - - /// - /// Raised when the process emits stderr console data. - /// - public event Action? ErrorDataReceived; - - /// - /// Raised when the process state has changed. - /// - public event Action? StateChanged; - - public string GetDotGraph() => UmlDotGraph.Format(_processStateMachine.GetInfo()); - - /// - /// Starts the process. - /// - public Task Start() - => _taskQueue.Enqueue(() => - { - _killed = false; - _processStateMachine.Fire(Trigger.Start); - }); - - /// - /// Initiates a process stop. If a timeout is supplied (and greater - /// than 0ms), it will attempt a "co-operative" shutdown by - /// signalling an EXIT command to the process. The process needs to - /// support such signalling and needs to complete within the timeout - /// otherwise the process will be terminated via Kill(). The maximum - /// recommended timeout is 25 seconds. This is 5 seconds less than - /// default 30 seconds that windows will consider a service to be - /// 'hung'. - /// - /// - /// - public async Task Stop(TimeSpan? timeout = null) - { - await await _taskQueue - .Enqueue(() => _processStateMachine.FireAsync(_stopTrigger, timeout)) - .ConfigureAwait(false); - } - - private void OnStart() - { - OnStartException = null; - try - { - var processStartInfo = new ProcessStartInfo(_processPath) - { - Arguments = _arguments, - RedirectStandardOutput = true, - RedirectStandardError = _captureStdErr, - UseShellExecute = false, - CreateNoWindow = true, - WorkingDirectory = _workingDirectory - }; - - // Copy over environment variables - if (_environmentVariables != null) - { - foreach (string key in _environmentVariables.Keys) - { - processStartInfo.EnvironmentVariables[key] = _environmentVariables[key]; - } - } - - // Start the process and capture it's output. - _process = new Process - { - StartInfo = processStartInfo, - EnableRaisingEvents = true - }; - _process.OutputDataReceived += (_, args) => OutputDataReceived?.Invoke(args.Data!); - if (_captureStdErr) - { - _process.ErrorDataReceived += (_, args) => ErrorDataReceived?.Invoke(args.Data!); - } - _process.Exited += (sender, args) => - { - _taskQueue.Enqueue(() => - { - _processStateMachine.Fire(Trigger.ProcessExit); - }); - }; - _process.Start(); - _process.BeginOutputReadLine(); - if (_captureStdErr) - { - _process.BeginErrorReadLine(); - } - - ProcessInfo = new ProcessInfo(_process); - } - catch (Exception ex) - { - _logger.LogError(ex, $"Failed to start process {_processPath}"); - _processStateMachine.Fire(_startErrorTrigger, ex); - } - } - - private void OnStartError(Exception ex) - { - OnStartException = ex; - _process?.Dispose(); - ProcessInfo = null; - } - - private async Task OnStop(TimeSpan? timeout) - { - if (!timeout.HasValue || timeout.Value <= TimeSpan.Zero) - { - try - { - _logger.LogInformation("Killing process {processId}", _process!.Id); - _killed = true; - _process.Kill(); - } - catch (Exception ex) - { - _logger.LogWarning( - ex, - "Exception occurred attempting to kill process {processId}. This may if the " + - "in the a race condition where process has already exited and an attempt to kill it.", _process!.Id); - } - } - else - { - try - { - // Signal process to exit. If no response from process (busy or - // doesn't support signaling, then this will timeout. Note: a - // process acknowledging that it has received an EXIT signal - // only means the process has _started_ to shut down. - - var exited = this.WhenStateIs(State.ExitedSuccessfully); - var exitedWithError = this.WhenStateIs(State.ExitedWithError); - - await CooperativeShutdown - .SignalExit(ProcessInfo!.Id, _loggerFactory).TimeoutAfter(timeout.Value) - .ConfigureAwait(false); - - await Task - .WhenAny(exited, exitedWithError) - .TimeoutAfter(timeout.Value) - .ConfigureAwait(false); - } - catch (TimeoutException) - { - // Process doesn't support EXIT signal OR it didn't respond in - // time so Kill it. Note: still a race condition - the EXIT - // signal may have been received but just not acknowledged in - // time. - try - { - _logger.LogWarning( - "Timed out waiting to signal the process to exit or the " + - "process {processName} ({processId}) did not shutdown in " + - "the given time ({timeout})", _process!.ProcessName, _process!.Id, timeout); - _killed = true; - _process.Kill(); - } - catch (Exception ex) - { - _logger.LogWarning( - ex, - "Exception occurred attempting to kill process {processId}. This may occur " + - "in the a race condition where the process has exited, a timeout waiting for the exit," + - "and the attempt to kill it.", _process!.Id); - } - } - } - } - - public void Dispose() - { - _process?.Dispose(); - _taskQueue?.Dispose(); - } -} \ No newline at end of file diff --git a/libs/little-forker/src/LittleForker/ProcessSupervisorExtensions.cs b/libs/little-forker/src/LittleForker/ProcessSupervisorExtensions.cs deleted file mode 100644 index 2f6bf673..00000000 --- a/libs/little-forker/src/LittleForker/ProcessSupervisorExtensions.cs +++ /dev/null @@ -1,47 +0,0 @@ -namespace Logicality.LittleForker; - -public static class ProcessSupervisorExtensions -{ - public static Task WhenStateIs( - this ProcessSupervisor processSupervisor, - ProcessSupervisor.State processState, - CancellationToken cancellationToken = default) - { - var taskCompletionSource = new TaskCompletionSource(); - cancellationToken.Register(() => taskCompletionSource.TrySetCanceled()); - - void Handler(ProcessSupervisor.State state) - { - if (processState == state) - { - taskCompletionSource.SetResult(0); - processSupervisor.StateChanged -= Handler; - } - } - - processSupervisor.StateChanged += Handler; - - return taskCompletionSource.Task; - } - - public static Task WhenOutputStartsWith( - this ProcessSupervisor processSupervisor, - string startsWith, - CancellationToken cancellationToken = default) - { - var taskCompletionSource = new TaskCompletionSource(); - cancellationToken.Register(() => taskCompletionSource.TrySetCanceled()); - - void Handler(string data) - { - if (data != null && data.StartsWith(startsWith)) - { - taskCompletionSource.SetResult(0); - processSupervisor.OutputDataReceived -= Handler; - } - } - - processSupervisor.OutputDataReceived += Handler; - return taskCompletionSource.Task; - } -} \ No newline at end of file diff --git a/libs/little-forker/src/LittleForker/TaskExtensions.cs b/libs/little-forker/src/LittleForker/TaskExtensions.cs deleted file mode 100644 index 6ae31503..00000000 --- a/libs/little-forker/src/LittleForker/TaskExtensions.cs +++ /dev/null @@ -1,53 +0,0 @@ -namespace Logicality.LittleForker; - -internal static class TaskExtensions -{ - // https://stackoverflow.com/a/28626769 - - internal static Task WithCancellation(this Task task, CancellationToken cancellationToken) - { - return task.IsCompleted // fast-path optimization - ? task - : task.ContinueWith( - completedTask => completedTask.GetAwaiter().GetResult(), - cancellationToken, - TaskContinuationOptions.ExecuteSynchronously, - TaskScheduler.Default); - } - - internal static async Task TimeoutAfter(this Task task, TimeSpan timeout) - { - using (var timeoutCancellationTokenSource = new CancellationTokenSource()) - { - var completedTask = await Task - .WhenAny(task, Task.Delay(timeout, timeoutCancellationTokenSource.Token)) - .ConfigureAwait(false); - - if (completedTask == task) - { - timeoutCancellationTokenSource.Cancel(); - await task.ConfigureAwait(false); - return; - } - - throw new TimeoutException("The operation has timed out."); - } - } - - internal static async Task TimeoutAfter(this Task task, TimeSpan timeout) - { - using (var timeoutCancellationTokenSource = new CancellationTokenSource()) - { - var completedTask = await Task - .WhenAny(task, Task.Delay(timeout, timeoutCancellationTokenSource.Token)) - .ConfigureAwait(false); - if (completedTask == task) - { - timeoutCancellationTokenSource.Cancel(); - return await task.ConfigureAwait(false); - } - - throw new TimeoutException("The operation has timed out."); - } - } -} \ No newline at end of file diff --git a/libs/little-forker/src/LittleForker/TaskQueue.cs b/libs/little-forker/src/LittleForker/TaskQueue.cs deleted file mode 100644 index bab7eaa0..00000000 --- a/libs/little-forker/src/LittleForker/TaskQueue.cs +++ /dev/null @@ -1,122 +0,0 @@ -using System.Collections.Concurrent; - -namespace Logicality.LittleForker; - -/// -/// Represents a queue of tasks where a task is processed one at a time. When disposed -/// the outstanding tasks are cancelled. -/// -internal class TaskQueue : IDisposable -{ - private readonly ConcurrentQueue> _taskQueue = new(); - private readonly CancellationTokenSource _isDisposed = new(); - private readonly InterlockedBoolean _isProcessing = new(); - - /// - /// Enqueues a task for processing. - /// - /// The operations to invoke. - /// A task representing the operation. Awaiting is optional. - public Task Enqueue(Action action) - { - var task = Enqueue(_ => - { - action(); - return Task.CompletedTask; - }); - return task; - } - - /// - /// Enqueues a task for processing. - /// - /// The operations to invoke. - /// A task representing the operation. Awaiting is optional. - public Task Enqueue(Func function) - { - var task = Enqueue(_ => - { - var result = function(); - return Task.FromResult(result); - }); - return task; - } - - /// - /// Enqueues a task for processing. - /// - /// The operation to invoke that is cooperatively cancelable. - /// A task representing the operation. Awaiting is optional. - public Task Enqueue(Func function) - { - var task = Enqueue(async ct => - { - await function(ct).ConfigureAwait(false); - return true; - }); - return task; - } - - /// - /// Enqueues a task for processing. - /// - /// The operation to invoke that is cooperatively cancelable. - /// A task representing the operation. Awaiting is optional. - public Task Enqueue(Func> function) - => EnqueueInternal(_taskQueue, function); - - private Task EnqueueInternal( - ConcurrentQueue> taskQueue, - Func> function) - { - var tcs = new TaskCompletionSource(); - if (_isDisposed.IsCancellationRequested) - { - tcs.SetCanceled(); - return tcs.Task; - } - taskQueue.Enqueue(async () => - { - if (_isDisposed.IsCancellationRequested) - { - tcs.SetCanceled(); - return; - } - try - { - var result = await function(_isDisposed.Token) - .ConfigureAwait(false); - - tcs.SetResult(result); - } - catch (OperationCanceledException) - { - tcs.SetCanceled(); - } - catch (Exception ex) - { - tcs.SetException(ex); - } - - }); - if (_isProcessing.CompareExchange(true, false) == false) - { - Task.Run(ProcessTaskQueue).ConfigureAwait(false); - } - return tcs.Task; - } - - private async Task ProcessTaskQueue() - { - do - { - if (_taskQueue.TryDequeue(out var function)) - { - await function().ConfigureAwait(false); - } - _isProcessing.Set(false); - } while (_taskQueue.Count > 0 && _isProcessing.CompareExchange(true, false) == false); - } - - public void Dispose() => _isDisposed.Cancel(); -} \ No newline at end of file diff --git a/libs/little-forker/src/NonTerminatingProcess/NonTerminatingProcess.csproj b/libs/little-forker/src/NonTerminatingProcess/NonTerminatingProcess.csproj deleted file mode 100644 index c9d45a72..00000000 --- a/libs/little-forker/src/NonTerminatingProcess/NonTerminatingProcess.csproj +++ /dev/null @@ -1,25 +0,0 @@ - - - - Exe - ..\LittleForker.Tests\NonTerminatingProcess\ - false - false - - - - - - - - - - - - - - - - - - diff --git a/libs/little-forker/src/NonTerminatingProcess/Program.cs b/libs/little-forker/src/NonTerminatingProcess/Program.cs deleted file mode 100644 index 6e68e066..00000000 --- a/libs/little-forker/src/NonTerminatingProcess/Program.cs +++ /dev/null @@ -1,108 +0,0 @@ -using System.Diagnostics; -using Logicality.LittleForker; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.Logging.Abstractions; -using Serilog; - -namespace Logicality.NonTerminatingProcess -{ - internal sealed class Program - { - // Yeah this process is supposed to be "non-terminating" - // but we don't want tons of orphaned instances running - // because of tests so it terminates after a long - // enough time (100 seconds) - private readonly CancellationTokenSource _shutdown = new CancellationTokenSource(TimeSpan.FromSeconds(100)); - private readonly IConfigurationRoot _configRoot; - private readonly bool _ignoreShutdownSignal; - private readonly bool _exitWithNonZero; - - static Program() - { - Log.Logger = new LoggerConfiguration() - .WriteTo.Console() - .CreateLogger(); - } - - private Program(string[] args) - { - _configRoot = new ConfigurationBuilder() - .AddCommandLine(args) - .AddEnvironmentVariables() - .Build(); - - // Running program with --debug=true will attach a debugger. - // Used to assist with debugging LittleForker. - if (_configRoot.GetValue("debug", false)) - { - Debugger.Launch(); - } - - _ignoreShutdownSignal = _configRoot.GetValue("ignore-shutdown-signal", false); - if (_ignoreShutdownSignal) - { - Log.Logger.Information("Will ignore Shutdown Signal"); - } - - _exitWithNonZero = _configRoot.GetValue("exit-with-non-zero", false); - if (_exitWithNonZero) - { - Log.Logger.Information("Will exit with non-zero exit code"); - } - } - - private async Task Run() - { - var pid = Process.GetCurrentProcess().Id; - Log.Logger.Information($"Long running process started. PID={pid}"); - - var parentPid = _configRoot.GetValue("ParentProcessId"); - - using (parentPid.HasValue - ? new ProcessExitedHelper(parentPid.Value, _ => ParentExited(parentPid.Value), new NullLoggerFactory()) - : NoopDisposable.Instance) - { - using (await CooperativeShutdown.Listen(ExitRequested, new NullLoggerFactory())) - { - // Poll the shutdown token in a tight loop - while(!_shutdown.IsCancellationRequested || _ignoreShutdownSignal) - { - await Task.Delay(100); - } - Log.Information("Exiting."); - } - } - - return _exitWithNonZero ? -1 : 0; - } - - static Task Main(string[] args) => new Program(args).Run(); - - private void ExitRequested() - { - Log.Logger.Information("Cooperative shutdown requested."); - - if (_ignoreShutdownSignal) - { - Log.Logger.Information("Shut down signal ignored."); - return; - } - - _shutdown.Cancel(); - } - - private void ParentExited(int processId) - { - Log.Logger.Information($"Parent process {processId} exited."); - _shutdown.Cancel(); - } - - private class NoopDisposable : IDisposable - { - public void Dispose() - {} - - internal static readonly IDisposable Instance = new NoopDisposable(); - } - } -} diff --git a/libs/little-forker/src/SelfTerminatingProcess/Program.cs b/libs/little-forker/src/SelfTerminatingProcess/Program.cs deleted file mode 100644 index 9aecace3..00000000 --- a/libs/little-forker/src/SelfTerminatingProcess/Program.cs +++ /dev/null @@ -1 +0,0 @@ -Console.WriteLine("Done."); diff --git a/libs/little-forker/src/SelfTerminatingProcess/SelfTerminatingProcess.csproj b/libs/little-forker/src/SelfTerminatingProcess/SelfTerminatingProcess.csproj deleted file mode 100644 index 5fe56e82..00000000 --- a/libs/little-forker/src/SelfTerminatingProcess/SelfTerminatingProcess.csproj +++ /dev/null @@ -1,16 +0,0 @@ - - - - Exe - latest - bin - false - ..\LittleForker.Tests\SelfTerminatingProcess\ - false - - - - Off - - - diff --git a/libs/little-forker/state-machine.dotgraph b/libs/little-forker/state-machine.dotgraph deleted file mode 100644 index 98892507..00000000 --- a/libs/little-forker/state-machine.dotgraph +++ /dev/null @@ -1,28 +0,0 @@ -digraph { -compound=true; -node [shape=Mrecord] -rankdir="LR" -NotStarted [label="NotStarted"]; -Running [label="Running"]; -StartFailed [label="StartFailed"]; -Stopping [label="Stopping|entry / OnStop"]; -ExitedSuccessfully [label="ExitedSuccessfully"]; -ExitedUnexpectedly [label="ExitedUnexpectedly"]; -ExitedKilled [label="ExitedKilled"]; -ExitedWithError [label="ExitedWithError"]; - -NotStarted -> Running [style="solid", label="Start / OnStart"]; -Running -> ExitedSuccessfully [style="solid", label="ProcessExit [SelfTerminating && ExitCode==0]"]; -Running -> ExitedWithError [style="solid", label="ProcessExit [SelfTerminating && ExitCode!=0]"]; -Running -> ExitedUnexpectedly [style="solid", label="ProcessExit [NonTerminating and died.]"]; -Running -> Stopping [style="solid", label="Stop"]; -Running -> StartFailed [style="solid", label="StartError / OnStartError"]; -StartFailed -> Running [style="solid", label="Start / OnStart"]; -Stopping -> ExitedSuccessfully [style="solid", label="ProcessExit [NonTerminating and shut down cleanly]"]; -Stopping -> ExitedKilled [style="solid", label="ProcessExit [NonTerminating and killed.]"]; -ExitedSuccessfully -> Running [style="solid", label="Start / OnStart"]; -ExitedUnexpectedly -> Running [style="solid", label="Start / OnStart"]; -ExitedKilled -> Running [style="solid", label="Start / OnStart"]; - init [label="", shape=point]; - init -> NotStarted[style = "solid"] -} \ No newline at end of file diff --git a/libs/little-forker/state-machine.png b/libs/little-forker/state-machine.png deleted file mode 100644 index c082f571..00000000 Binary files a/libs/little-forker/state-machine.png and /dev/null differ diff --git a/libs/little-forker/tests/Directory.Build.props b/libs/little-forker/tests/Directory.Build.props deleted file mode 100644 index d6cc951a..00000000 --- a/libs/little-forker/tests/Directory.Build.props +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/libs/little-forker/tests/LittleForker.Tests/CooperativeShutdownTests.cs b/libs/little-forker/tests/LittleForker.Tests/CooperativeShutdownTests.cs deleted file mode 100644 index d2888306..00000000 --- a/libs/little-forker/tests/LittleForker.Tests/CooperativeShutdownTests.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System.Diagnostics; -using Microsoft.Extensions.Logging; -using Shouldly; -using Xunit; -using Xunit.Abstractions; - -namespace Logicality.LittleForker; - -public class CooperativeShutdownTests -{ - private readonly ILoggerFactory _loggerFactory; - - public CooperativeShutdownTests(ITestOutputHelper outputHelper) - { - _loggerFactory = new XunitLoggerFactory(outputHelper).LoggerFactory; - } - - [Fact] - public async Task When_server_signals_exit_then_should_notify_client_to_exit() - { - var exitCalled = new TaskCompletionSource(); - var listener = await CooperativeShutdown.Listen( - () => exitCalled.SetResult(true), - _loggerFactory); - - await CooperativeShutdown.SignalExit(Process.GetCurrentProcess().Id, _loggerFactory); - - (await exitCalled.Task).ShouldBeTrue(); - - listener.Dispose(); - } -} \ No newline at end of file diff --git a/libs/little-forker/tests/LittleForker.Tests/Infra/TestOutputHelperExtensions.cs b/libs/little-forker/tests/LittleForker.Tests/Infra/TestOutputHelperExtensions.cs deleted file mode 100644 index a7cfde82..00000000 --- a/libs/little-forker/tests/LittleForker.Tests/Infra/TestOutputHelperExtensions.cs +++ /dev/null @@ -1,14 +0,0 @@ -using Xunit.Abstractions; - -namespace Logicality.LittleForker.Infra; - -public static class TestOutputHelperExtensions -{ - public static void WriteLine2(this ITestOutputHelper outputHelper, object o) - { - if (o != null) - { - outputHelper.WriteLine(o.ToString()); - } - } -} \ No newline at end of file diff --git a/libs/little-forker/tests/LittleForker.Tests/LittleForker.Tests.csproj b/libs/little-forker/tests/LittleForker.Tests/LittleForker.Tests.csproj deleted file mode 100644 index 1f0c939b..00000000 --- a/libs/little-forker/tests/LittleForker.Tests/LittleForker.Tests.csproj +++ /dev/null @@ -1,23 +0,0 @@ - - - - Logicality.LittleForker - - - - - - - - - - - - - PreserveNewest - - - PreserveNewest - - - diff --git a/libs/little-forker/tests/LittleForker.Tests/NonTerminatingProcess/LittleForker.dll b/libs/little-forker/tests/LittleForker.Tests/NonTerminatingProcess/LittleForker.dll deleted file mode 100644 index 05147981..00000000 Binary files a/libs/little-forker/tests/LittleForker.Tests/NonTerminatingProcess/LittleForker.dll and /dev/null differ diff --git a/libs/little-forker/tests/LittleForker.Tests/NonTerminatingProcess/LittleForker.xml b/libs/little-forker/tests/LittleForker.Tests/NonTerminatingProcess/LittleForker.xml deleted file mode 100644 index b95694c5..00000000 --- a/libs/little-forker/tests/LittleForker.Tests/NonTerminatingProcess/LittleForker.xml +++ /dev/null @@ -1,240 +0,0 @@ - - - - LittleForker - - - - - Allows a process to be co-cooperatively shut down (as opposed the more - brutal Process.Kill() - - - - - The pipe name a process will listen on for a EXIT signal. - - The process ID process listening. - A generated pipe name. - - - - Creates a listener for cooperative shutdown. - - - The callback that is invoked when cooperative shutdown has been - requested. - - - A logger factory. - - A method to be called if an error occurs while listening - - A disposable representing the named pipe listener. - - - - - Signals to a process to shut down. - - The process ID to signal too. - A logger factory. - A task representing the operation. - - - - Interlocked support for boolean values - - - - - Current value - - - - - Initializes a new instance of - - initial value - - - - Sets a new value - - new value - the original value before any operation was performed - - - - Compares the current value and the comparand for equality and, if they are equal, - replaces the current value with the new value in an atomic/thread-safe operation. - - new value - value to compare the current value with - the original value before any operation was performed - - - - The process's exit code. - - - - - The process's Id. - - - - - Helper that raises event when the process has exited. A wrapper around - Process.Exited with some error handling and logging. - - - - - Initializes a new instance of - - - The process Id of the process to watch for exited. - - - A callback that is invoked when process has exited or does not - exist with the instance as a - parameter. - - - A logger. - - - - - Defined how a process is expected to run. - - - - - Processes that are expected to terminate of their own accord. - - - - - Processes that are not expected to terminiate of their own - accord and that must be co-operatively shutdown or killed. - - - - - Launches an process and tracks it's lifecycle . - - - - - The state a process is in. - - - - - Initializes a new instance of - - - The working directory to start the process in. - - - The path to the process. - - - The process run type. - - - A logger factory. - - - Arguments to be passed to the process. - - - Environment variables that are set before the process starts. - - - A flag to indicated whether to capture standard error output. - - - - - Contains the caught exception in the event a process failed to - be launched. - - - - - Information about the launched process. - - - - - Raised when the process emits console data. - - - - - Raised when the process emits stderr console data. - - - - - Raised when the process state has changed. - - - - - Starts the process. - - - - - Initiates a process stop. If a timeout is supplied (and greater - than 0ms), it will attempt a "co-operative" shutdown by - signalling an EXIT command to the process. The process needs to - support such signalling and needs to complete within the timeout - otherwise the process will be terminated via Kill(). The maximum - recommended timeout is 25 seconds. This is 5 seconds less than - default 30 seconds that windows will consider a service to be - 'hung'. - - - - - - - Represents a queue of tasks where a task is processed one at a time. When disposed - the outstanding tasks are cancelled. - - - - - Enqueues a task for processing. - - The operations to invoke. - A task representing the operation. Awaiting is optional. - - - - Enqueues a task for processing. - - The operations to invoke. - A task representing the operation. Awaiting is optional. - - - - Enqueues a task for processing. - - The operation to invoke that is co-operatively cancelable. - A task representing the operation. Awaiting is optional. - - - - Enqueues a task for processing. - - The operation to invoke that is co-operatively cancelable. - A task representing the operation. Awaiting is optional. - - - diff --git a/libs/little-forker/tests/LittleForker.Tests/NonTerminatingProcess/Microsoft.Extensions.Configuration.Abstractions.dll b/libs/little-forker/tests/LittleForker.Tests/NonTerminatingProcess/Microsoft.Extensions.Configuration.Abstractions.dll deleted file mode 100644 index 52befe91..00000000 Binary files a/libs/little-forker/tests/LittleForker.Tests/NonTerminatingProcess/Microsoft.Extensions.Configuration.Abstractions.dll and /dev/null differ diff --git a/libs/little-forker/tests/LittleForker.Tests/NonTerminatingProcess/Microsoft.Extensions.Configuration.Binder.dll b/libs/little-forker/tests/LittleForker.Tests/NonTerminatingProcess/Microsoft.Extensions.Configuration.Binder.dll deleted file mode 100644 index 84b0357b..00000000 Binary files a/libs/little-forker/tests/LittleForker.Tests/NonTerminatingProcess/Microsoft.Extensions.Configuration.Binder.dll and /dev/null differ diff --git a/libs/little-forker/tests/LittleForker.Tests/NonTerminatingProcess/Microsoft.Extensions.Configuration.CommandLine.dll b/libs/little-forker/tests/LittleForker.Tests/NonTerminatingProcess/Microsoft.Extensions.Configuration.CommandLine.dll deleted file mode 100644 index 5cd78f5f..00000000 Binary files a/libs/little-forker/tests/LittleForker.Tests/NonTerminatingProcess/Microsoft.Extensions.Configuration.CommandLine.dll and /dev/null differ diff --git a/libs/little-forker/tests/LittleForker.Tests/NonTerminatingProcess/Microsoft.Extensions.Configuration.EnvironmentVariables.dll b/libs/little-forker/tests/LittleForker.Tests/NonTerminatingProcess/Microsoft.Extensions.Configuration.EnvironmentVariables.dll deleted file mode 100644 index fa1bd7e8..00000000 Binary files a/libs/little-forker/tests/LittleForker.Tests/NonTerminatingProcess/Microsoft.Extensions.Configuration.EnvironmentVariables.dll and /dev/null differ diff --git a/libs/little-forker/tests/LittleForker.Tests/NonTerminatingProcess/Microsoft.Extensions.Configuration.dll b/libs/little-forker/tests/LittleForker.Tests/NonTerminatingProcess/Microsoft.Extensions.Configuration.dll deleted file mode 100644 index 718180b5..00000000 Binary files a/libs/little-forker/tests/LittleForker.Tests/NonTerminatingProcess/Microsoft.Extensions.Configuration.dll and /dev/null differ diff --git a/libs/little-forker/tests/LittleForker.Tests/NonTerminatingProcess/Microsoft.Extensions.Logging.Abstractions.dll b/libs/little-forker/tests/LittleForker.Tests/NonTerminatingProcess/Microsoft.Extensions.Logging.Abstractions.dll deleted file mode 100644 index 82e06989..00000000 Binary files a/libs/little-forker/tests/LittleForker.Tests/NonTerminatingProcess/Microsoft.Extensions.Logging.Abstractions.dll and /dev/null differ diff --git a/libs/little-forker/tests/LittleForker.Tests/NonTerminatingProcess/Microsoft.Extensions.Primitives.dll b/libs/little-forker/tests/LittleForker.Tests/NonTerminatingProcess/Microsoft.Extensions.Primitives.dll deleted file mode 100644 index d12ec5bd..00000000 Binary files a/libs/little-forker/tests/LittleForker.Tests/NonTerminatingProcess/Microsoft.Extensions.Primitives.dll and /dev/null differ diff --git a/libs/little-forker/tests/LittleForker.Tests/NonTerminatingProcess/NonTerminatingProcess.deps.json b/libs/little-forker/tests/LittleForker.Tests/NonTerminatingProcess/NonTerminatingProcess.deps.json deleted file mode 100644 index 9d6886b2..00000000 --- a/libs/little-forker/tests/LittleForker.Tests/NonTerminatingProcess/NonTerminatingProcess.deps.json +++ /dev/null @@ -1,715 +0,0 @@ -{ - "runtimeTarget": { - "name": ".NETCoreApp,Version=v3.1", - "signature": "" - }, - "compilationOptions": {}, - "targets": { - ".NETCoreApp,Version=v3.1": { - "NonTerminatingProcess/1.0.0": { - "dependencies": { - "LittleForker": "1.0.0", - "Microsoft.Extensions.Configuration.Binder": "3.1.0", - "Microsoft.Extensions.Configuration.CommandLine": "3.1.0", - "Microsoft.Extensions.Configuration.EnvironmentVariables": "3.1.0", - "Serilog.Sinks.Console": "3.1.1" - }, - "runtime": { - "NonTerminatingProcess.dll": {} - } - }, - "Microsoft.CSharp/4.0.1": { - "dependencies": { - "System.Collections": "4.0.11", - "System.Diagnostics.Debug": "4.0.11", - "System.Dynamic.Runtime": "4.0.11", - "System.Globalization": "4.3.0", - "System.Linq": "4.1.0", - "System.Linq.Expressions": "4.1.0", - "System.ObjectModel": "4.0.12", - "System.Reflection": "4.3.0", - "System.Reflection.Extensions": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Reflection.TypeExtensions": "4.1.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.1.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Threading": "4.3.0" - } - }, - "Microsoft.Extensions.Configuration/3.1.0": { - "dependencies": { - "Microsoft.Extensions.Configuration.Abstractions": "3.1.0" - }, - "runtime": { - "lib/netcoreapp3.1/Microsoft.Extensions.Configuration.dll": { - "assemblyVersion": "3.1.0.0", - "fileVersion": "3.100.19.56504" - } - } - }, - "Microsoft.Extensions.Configuration.Abstractions/3.1.0": { - "dependencies": { - "Microsoft.Extensions.Primitives": "3.1.0" - }, - "runtime": { - "lib/netcoreapp3.1/Microsoft.Extensions.Configuration.Abstractions.dll": { - "assemblyVersion": "3.1.0.0", - "fileVersion": "3.100.19.56504" - } - } - }, - "Microsoft.Extensions.Configuration.Binder/3.1.0": { - "dependencies": { - "Microsoft.Extensions.Configuration": "3.1.0" - }, - "runtime": { - "lib/netcoreapp3.1/Microsoft.Extensions.Configuration.Binder.dll": { - "assemblyVersion": "3.1.0.0", - "fileVersion": "3.100.19.56504" - } - } - }, - "Microsoft.Extensions.Configuration.CommandLine/3.1.0": { - "dependencies": { - "Microsoft.Extensions.Configuration": "3.1.0" - }, - "runtime": { - "lib/netcoreapp3.1/Microsoft.Extensions.Configuration.CommandLine.dll": { - "assemblyVersion": "3.1.0.0", - "fileVersion": "3.100.19.56504" - } - } - }, - "Microsoft.Extensions.Configuration.EnvironmentVariables/3.1.0": { - "dependencies": { - "Microsoft.Extensions.Configuration": "3.1.0" - }, - "runtime": { - "lib/netcoreapp3.1/Microsoft.Extensions.Configuration.EnvironmentVariables.dll": { - "assemblyVersion": "3.1.0.0", - "fileVersion": "3.100.19.56504" - } - } - }, - "Microsoft.Extensions.Logging.Abstractions/3.1.0": { - "runtime": { - "lib/netstandard2.0/Microsoft.Extensions.Logging.Abstractions.dll": { - "assemblyVersion": "3.1.0.0", - "fileVersion": "3.100.19.56504" - } - } - }, - "Microsoft.Extensions.Primitives/3.1.0": { - "runtime": { - "lib/netcoreapp3.1/Microsoft.Extensions.Primitives.dll": { - "assemblyVersion": "3.1.0.0", - "fileVersion": "3.100.19.56504" - } - } - }, - "Microsoft.NETCore.Platforms/1.1.0": {}, - "Microsoft.NETCore.Targets/1.1.0": {}, - "runtime.native.System/4.3.0": { - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0" - } - }, - "Serilog/2.5.0": { - "dependencies": { - "Microsoft.CSharp": "4.0.1", - "System.Collections": "4.0.11", - "System.Collections.NonGeneric": "4.0.1", - "System.Dynamic.Runtime": "4.0.11", - "System.Globalization": "4.3.0", - "System.Linq": "4.1.0", - "System.Reflection": "4.3.0", - "System.Reflection.Extensions": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.1.0", - "System.Text.RegularExpressions": "4.1.0", - "System.Threading": "4.3.0" - }, - "runtime": { - "lib/netstandard1.3/Serilog.dll": { - "assemblyVersion": "2.0.0.0", - "fileVersion": "2.5.0.0" - } - } - }, - "Serilog.Sinks.Console/3.1.1": { - "dependencies": { - "Serilog": "2.5.0", - "System.Console": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Runtime.InteropServices.RuntimeInformation": "4.3.0" - }, - "runtime": { - "lib/netcoreapp1.1/Serilog.Sinks.Console.dll": { - "assemblyVersion": "3.1.1.0", - "fileVersion": "3.1.1.0" - } - } - }, - "Stateless/5.1.3": { - "runtime": { - "lib/netstandard2.0/Stateless.dll": { - "assemblyVersion": "4.0.0.0", - "fileVersion": "5.1.3.0" - } - } - }, - "System.Collections/4.0.11": { - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Collections.NonGeneric/4.0.1": { - "dependencies": { - "System.Diagnostics.Debug": "4.0.11", - "System.Globalization": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.1.0", - "System.Threading": "4.3.0" - } - }, - "System.Console/4.3.0": { - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.IO": "4.3.0", - "System.Runtime": "4.3.0", - "System.Text.Encoding": "4.3.0" - } - }, - "System.Diagnostics.Debug/4.0.11": { - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Dynamic.Runtime/4.0.11": { - "dependencies": { - "System.Collections": "4.0.11", - "System.Diagnostics.Debug": "4.0.11", - "System.Globalization": "4.3.0", - "System.Linq": "4.1.0", - "System.Linq.Expressions": "4.1.0", - "System.ObjectModel": "4.0.12", - "System.Reflection": "4.3.0", - "System.Reflection.Emit": "4.0.1", - "System.Reflection.Emit.ILGeneration": "4.0.1", - "System.Reflection.Primitives": "4.3.0", - "System.Reflection.TypeExtensions": "4.1.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.1.0", - "System.Threading": "4.3.0" - } - }, - "System.Globalization/4.3.0": { - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.IO/4.3.0": { - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading.Tasks": "4.3.0" - } - }, - "System.Linq/4.1.0": { - "dependencies": { - "System.Collections": "4.0.11", - "System.Diagnostics.Debug": "4.0.11", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.1.0" - } - }, - "System.Linq.Expressions/4.1.0": { - "dependencies": { - "System.Collections": "4.0.11", - "System.Diagnostics.Debug": "4.0.11", - "System.Globalization": "4.3.0", - "System.IO": "4.3.0", - "System.Linq": "4.1.0", - "System.ObjectModel": "4.0.12", - "System.Reflection": "4.3.0", - "System.Reflection.Emit": "4.0.1", - "System.Reflection.Emit.ILGeneration": "4.0.1", - "System.Reflection.Emit.Lightweight": "4.0.1", - "System.Reflection.Extensions": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Reflection.TypeExtensions": "4.1.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.1.0", - "System.Threading": "4.3.0" - } - }, - "System.ObjectModel/4.0.12": { - "dependencies": { - "System.Collections": "4.0.11", - "System.Diagnostics.Debug": "4.0.11", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Threading": "4.3.0" - } - }, - "System.Reflection/4.3.0": { - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.IO": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Reflection.Emit/4.0.1": { - "dependencies": { - "System.IO": "4.3.0", - "System.Reflection": "4.3.0", - "System.Reflection.Emit.ILGeneration": "4.0.1", - "System.Reflection.Primitives": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Reflection.Emit.ILGeneration/4.0.1": { - "dependencies": { - "System.Reflection": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Reflection.Emit.Lightweight/4.0.1": { - "dependencies": { - "System.Reflection": "4.3.0", - "System.Reflection.Emit.ILGeneration": "4.0.1", - "System.Reflection.Primitives": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Reflection.Extensions/4.3.0": { - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Reflection": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Reflection.Primitives/4.3.0": { - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Reflection.TypeExtensions/4.1.0": { - "dependencies": { - "System.Reflection": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Resources.ResourceManager/4.3.0": { - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Globalization": "4.3.0", - "System.Reflection": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Runtime/4.3.0": { - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0" - } - }, - "System.Runtime.Extensions/4.1.0": { - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Runtime.Handles/4.3.0": { - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Runtime.InteropServices/4.3.0": { - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Reflection": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Handles": "4.3.0" - } - }, - "System.Runtime.InteropServices.RuntimeInformation/4.3.0": { - "dependencies": { - "System.Reflection": "4.3.0", - "System.Reflection.Extensions": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Threading": "4.3.0", - "runtime.native.System": "4.3.0" - } - }, - "System.Text.Encoding/4.3.0": { - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Text.RegularExpressions/4.1.0": { - "dependencies": { - "System.Collections": "4.0.11", - "System.Globalization": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.1.0", - "System.Threading": "4.3.0" - } - }, - "System.Threading/4.3.0": { - "dependencies": { - "System.Runtime": "4.3.0", - "System.Threading.Tasks": "4.3.0" - } - }, - "System.Threading.Tasks/4.3.0": { - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "LittleForker/1.0.0": { - "dependencies": { - "Microsoft.Extensions.Logging.Abstractions": "3.1.0", - "Stateless": "5.1.3" - }, - "runtime": { - "LittleForker.dll": {} - } - } - } - }, - "libraries": { - "NonTerminatingProcess/1.0.0": { - "type": "project", - "serviceable": false, - "sha512": "" - }, - "Microsoft.CSharp/4.0.1": { - "type": "package", - "serviceable": true, - "sha512": "sha512-17h8b5mXa87XYKrrVqdgZ38JefSUqLChUQpXgSnpzsM0nDOhE40FTeNWOJ/YmySGV6tG6T8+hjz6vxbknHJr6A==", - "path": "microsoft.csharp/4.0.1", - "hashPath": "microsoft.csharp.4.0.1.nupkg.sha512" - }, - "Microsoft.Extensions.Configuration/3.1.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-Lu41BWNmwhKr6LgyQvcYBOge0pPvmiaK8R5UHXX4//wBhonJyWcT2OK1mqYfEM5G7pTf31fPrpIHOT6sN7EGOA==", - "path": "microsoft.extensions.configuration/3.1.0", - "hashPath": "microsoft.extensions.configuration.3.1.0.nupkg.sha512" - }, - "Microsoft.Extensions.Configuration.Abstractions/3.1.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-ESz6bVoDQX7sgWdKHF6G9Pq672T8k+19AFb/txDXwdz7MoqaNQj2/in3agm/3qae9V+WvQZH86LLTNVo0it8vQ==", - "path": "microsoft.extensions.configuration.abstractions/3.1.0", - "hashPath": "microsoft.extensions.configuration.abstractions.3.1.0.nupkg.sha512" - }, - "Microsoft.Extensions.Configuration.Binder/3.1.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-o9eELDBfNkR7sUtYysFZ1Q7BQ1mYt27DMkups/3vu7xgPyOpMD+iAfrBZFzUXT2iw0fmFb8s1gfNBZS+IgjKdQ==", - "path": "microsoft.extensions.configuration.binder/3.1.0", - "hashPath": "microsoft.extensions.configuration.binder.3.1.0.nupkg.sha512" - }, - "Microsoft.Extensions.Configuration.CommandLine/3.1.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-KDjz4HBw549oW4Y1eQAImAugCSYn84KXwgGZtgMqEwctvkdxZo0ObZC5QQI/YvX21U+DArR9+NfWZ3MxD9MhPA==", - "path": "microsoft.extensions.configuration.commandline/3.1.0", - "hashPath": "microsoft.extensions.configuration.commandline.3.1.0.nupkg.sha512" - }, - "Microsoft.Extensions.Configuration.EnvironmentVariables/3.1.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-WryksPlAFFRMWIGpFwDDbrVSD/kSO7P7fRRzBHh6vEIrgflsM8tpPCcgIvKszH4fz4vcuapih9RMdiiJ2VS7aw==", - "path": "microsoft.extensions.configuration.environmentvariables/3.1.0", - "hashPath": "microsoft.extensions.configuration.environmentvariables.3.1.0.nupkg.sha512" - }, - "Microsoft.Extensions.Logging.Abstractions/3.1.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-jjo4YXRx6MIpv6DiRxJjSpl+sPP0+5VW0clMEdLyIAz44PPwrDTFrd5PZckIxIXl1kKZ2KK6IL2nkt0+ug2MQg==", - "path": "microsoft.extensions.logging.abstractions/3.1.0", - "hashPath": "microsoft.extensions.logging.abstractions.3.1.0.nupkg.sha512" - }, - "Microsoft.Extensions.Primitives/3.1.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-LEKAnX7lhUhSoIc2XraCTK3M4IU/LdVUzCe464Sa4+7F4ZJuXHHRzZli2mDbiT4xzAZhgqXbvfnb5+CNDcQFfg==", - "path": "microsoft.extensions.primitives/3.1.0", - "hashPath": "microsoft.extensions.primitives.3.1.0.nupkg.sha512" - }, - "Microsoft.NETCore.Platforms/1.1.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-idaVSR7ew5XDPrfLP7d36Ku/ccVVEL9UUELGX571U9pLLvUS40bfcpsMSbvwaAPBX5gLnz69G2cTb7+8uN3fNA==", - "path": "microsoft.netcore.platforms/1.1.0", - "hashPath": "microsoft.netcore.platforms.1.1.0.nupkg.sha512" - }, - "Microsoft.NETCore.Targets/1.1.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-BwoPHv7y0C6m1x9P0EqsanTX7hGx7/I6vTufhGR8oGzQQIYLrxhHrzVjXakRRIfPQLZ6cVrDDGJpkMefwjh1qw==", - "path": "microsoft.netcore.targets/1.1.0", - "hashPath": "microsoft.netcore.targets.1.1.0.nupkg.sha512" - }, - "runtime.native.System/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-TkXr4hGTR6iKbKfjodEXZqydO5JVQJufXKfUQD6cNqRKJzRNwoq7if1e+x5Oiqs4HEUiaxDFDzrDPRuuhAccLA==", - "path": "runtime.native.system/4.3.0", - "hashPath": "runtime.native.system.4.3.0.nupkg.sha512" - }, - "Serilog/2.5.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-JwwkgNYNFKT4kQZ3qBV3VqPgchUg1A6FnlFa9hgyanylwBhJ7eTFl3pgLVxijFEb+oHLImRcMaTsMzBt2AG0aQ==", - "path": "serilog/2.5.0", - "hashPath": "serilog.2.5.0.nupkg.sha512" - }, - "Serilog.Sinks.Console/3.1.1": { - "type": "package", - "serviceable": true, - "sha512": "sha512-56mI5AqvyF/i/c2451nvV71kq370XOCE4Uu5qiaJ295sOhMb9q3BWwG7mWLOVSnmpWiq0SBT3SXfgRXGNP6vzA==", - "path": "serilog.sinks.console/3.1.1", - "hashPath": "serilog.sinks.console.3.1.1.nupkg.sha512" - }, - "Stateless/5.1.3": { - "type": "package", - "serviceable": true, - "sha512": "sha512-ZQ4XGc1DyrrCxhjIoj6cCIEF39KE8eWP/nyLji5IJOTMc0/JQuhzHUF7YTp1gZ/GWx7QHyQSKuSkSF0wAaV8/g==", - "path": "stateless/5.1.3", - "hashPath": "stateless.5.1.3.nupkg.sha512" - }, - "System.Collections/4.0.11": { - "type": "package", - "serviceable": true, - "sha512": "sha512-YUJGz6eFKqS0V//mLt25vFGrrCvOnsXjlvFQs+KimpwNxug9x0Pzy4PlFMU3Q2IzqAa9G2L4LsK3+9vCBK7oTg==", - "path": "system.collections/4.0.11", - "hashPath": "system.collections.4.0.11.nupkg.sha512" - }, - "System.Collections.NonGeneric/4.0.1": { - "type": "package", - "serviceable": true, - "sha512": "sha512-hMxFT2RhhlffyCdKLDXjx8WEC5JfCvNozAZxCablAuFRH74SCV4AgzE8yJCh/73bFnEoZgJ9MJmkjQ0dJmnKqA==", - "path": "system.collections.nongeneric/4.0.1", - "hashPath": "system.collections.nongeneric.4.0.1.nupkg.sha512" - }, - "System.Console/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-cEaRntm8ZPeydLEgB9BFgSCtLq1OH8NKEOYbScAuS951k/SkRNHoOa7eH/j7laqQRemlRs+OfWT3PfJC25KomA==", - "path": "system.console/4.3.0", - "hashPath": "system.console.4.3.0.nupkg.sha512" - }, - "System.Diagnostics.Debug/4.0.11": { - "type": "package", - "serviceable": true, - "sha512": "sha512-w5U95fVKHY4G8ASs/K5iK3J5LY+/dLFd4vKejsnI/ZhBsWS9hQakfx3Zr7lRWKg4tAw9r4iktyvsTagWkqYCiw==", - "path": "system.diagnostics.debug/4.0.11", - "hashPath": "system.diagnostics.debug.4.0.11.nupkg.sha512" - }, - "System.Dynamic.Runtime/4.0.11": { - "type": "package", - "serviceable": true, - "sha512": "sha512-db34f6LHYM0U0JpE+sOmjar27BnqTVkbLJhgfwMpTdgTigG/Hna3m2MYVwnFzGGKnEJk2UXFuoVTr8WUbU91/A==", - "path": "system.dynamic.runtime/4.0.11", - "hashPath": "system.dynamic.runtime.4.0.11.nupkg.sha512" - }, - "System.Globalization/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-FTwzGe2H4gLc3ntm182f3urwoW/XOo86zWR18UTnmAhGiP86xVal32NPy8TF+tGtUNH6Swx1NxfuF5WcX4g30A==", - "path": "system.globalization/4.3.0", - "hashPath": "system.globalization.4.3.0.nupkg.sha512" - }, - "System.IO/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-w7XW+nMsWTj1rYjEWgpq9cvJUtCwghvCDlBgjbzp/P/B6wVFTgO66CIuqJtyDk6aVlFRj0sCMjQuHav3C/7L2A==", - "path": "system.io/4.3.0", - "hashPath": "system.io.4.3.0.nupkg.sha512" - }, - "System.Linq/4.1.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-bQ0iYFOQI0nuTnt+NQADns6ucV4DUvMdwN6CbkB1yj8i7arTGiTN5eok1kQwdnnNWSDZfIUySQY+J3d5KjWn0g==", - "path": "system.linq/4.1.0", - "hashPath": "system.linq.4.1.0.nupkg.sha512" - }, - "System.Linq.Expressions/4.1.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-I+y02iqkgmCAyfbqOmSDOgqdZQ5tTj80Akm5BPSS8EeB0VGWdy6X1KCoYe8Pk6pwDoAKZUOdLVxnTJcExiv5zw==", - "path": "system.linq.expressions/4.1.0", - "hashPath": "system.linq.expressions.4.1.0.nupkg.sha512" - }, - "System.ObjectModel/4.0.12": { - "type": "package", - "serviceable": true, - "sha512": "sha512-tAgJM1xt3ytyMoW4qn4wIqgJYm7L7TShRZG4+Q4Qsi2PCcj96pXN7nRywS9KkB3p/xDUjc2HSwP9SROyPYDYKQ==", - "path": "system.objectmodel/4.0.12", - "hashPath": "system.objectmodel.4.0.12.nupkg.sha512" - }, - "System.Reflection/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-QvYQf904nQBXZ5aecu0SYhXIDxvPTNyyNK5GJk5scORZ+suONOEoLEnVVVNBh2oo0iOMxs0wNnUSRYUKjTOY1g==", - "path": "system.reflection/4.3.0", - "hashPath": "system.reflection.4.3.0.nupkg.sha512" - }, - "System.Reflection.Emit/4.0.1": { - "type": "package", - "serviceable": true, - "sha512": "sha512-P2wqAj72fFjpP6wb9nSfDqNBMab+2ovzSDzUZK7MVIm54tBJEPr9jWfSjjoTpPwj1LeKcmX3vr0ttyjSSFM47g==", - "path": "system.reflection.emit/4.0.1", - "hashPath": "system.reflection.emit.4.0.1.nupkg.sha512" - }, - "System.Reflection.Emit.ILGeneration/4.0.1": { - "type": "package", - "serviceable": true, - "sha512": "sha512-Ov6dU8Bu15Bc7zuqttgHF12J5lwSWyTf1S+FJouUXVMSqImLZzYaQ+vRr1rQ0OZ0HqsrwWl4dsKHELckQkVpgA==", - "path": "system.reflection.emit.ilgeneration/4.0.1", - "hashPath": "system.reflection.emit.ilgeneration.4.0.1.nupkg.sha512" - }, - "System.Reflection.Emit.Lightweight/4.0.1": { - "type": "package", - "serviceable": true, - "sha512": "sha512-sSzHHXueZ5Uh0OLpUQprhr+ZYJrLPA2Cmr4gn0wj9+FftNKXx8RIMKvO9qnjk2ebPYUjZ+F2ulGdPOsvj+MEjA==", - "path": "system.reflection.emit.lightweight/4.0.1", - "hashPath": "system.reflection.emit.lightweight.4.0.1.nupkg.sha512" - }, - "System.Reflection.Extensions/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-ceOwyoOAcGXe5RcsxOa5YTv+WkusdkcgI4uLWAruXJQqzsm+JpykgmVl1qIEteujPe25CSiuZ0bia6bEC91wjg==", - "path": "system.reflection.extensions/4.3.0", - "hashPath": "system.reflection.extensions.4.3.0.nupkg.sha512" - }, - "System.Reflection.Primitives/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-t4hYC7B1Nx1nfCita2rvT5jmUIBdB9WetwDCNRM563xaMe2OJG6B/IYw/3G3yjVNSnDwNE4ZCgX1+sWaWiFdtw==", - "path": "system.reflection.primitives/4.3.0", - "hashPath": "system.reflection.primitives.4.3.0.nupkg.sha512" - }, - "System.Reflection.TypeExtensions/4.1.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-tsQ/ptQ3H5FYfON8lL4MxRk/8kFyE0A+tGPXmVP967cT/gzLHYxIejIYSxp4JmIeFHVP78g/F2FE1mUUTbDtrg==", - "path": "system.reflection.typeextensions/4.1.0", - "hashPath": "system.reflection.typeextensions.4.1.0.nupkg.sha512" - }, - "System.Resources.ResourceManager/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-9wMxekOHhBZK/q67VtoJqMatuAtYxxvMwPZaNtcE4hDE7ABntfCwYGfiI2Py85NF1a4+vEFxbs0aU4lZLapIJA==", - "path": "system.resources.resourcemanager/4.3.0", - "hashPath": "system.resources.resourcemanager.4.3.0.nupkg.sha512" - }, - "System.Runtime/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-lzGIsYqFiek4CIq57IfoD82j2eDEY8MUuaeydMYqPbMGtwQjIrQOBkQ8BEZt6/OFFdbzrTMTBYDSwknfZ3cINA==", - "path": "system.runtime/4.3.0", - "hashPath": "system.runtime.4.3.0.nupkg.sha512" - }, - "System.Runtime.Extensions/4.1.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-CUOHjTT/vgP0qGW22U4/hDlOqXmcPq5YicBaXdUR2UiUoLwBT+olO6we4DVbq57jeX5uXH2uerVZhf0qGj+sVQ==", - "path": "system.runtime.extensions/4.1.0", - "hashPath": "system.runtime.extensions.4.1.0.nupkg.sha512" - }, - "System.Runtime.Handles/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-C9iaNbc8GDTo1QhPZfM9rMVAW4bvGIyy2dQNfkLH9cWTN1SciXs3vAiUocQa2+B/qoSxWFGVToCVufdjdtu52A==", - "path": "system.runtime.handles/4.3.0", - "hashPath": "system.runtime.handles.4.3.0.nupkg.sha512" - }, - "System.Runtime.InteropServices/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-Bw8KLS0ShC4QpngDuL3T8Xh8FysQL9hCOnxtQptYkDpn1kuI5AxovlxfLG0c9AIgUGacShvMklB9J35knOZlSQ==", - "path": "system.runtime.interopservices/4.3.0", - "hashPath": "system.runtime.interopservices.4.3.0.nupkg.sha512" - }, - "System.Runtime.InteropServices.RuntimeInformation/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-Yd576GicDywTfJFH7Q7xr5yKWqIInr7c11zhyDIfQvIqreKIQ+86ChmaIDXaq1k3lPSnEH76YD8ZVCHLBl8sOw==", - "path": "system.runtime.interopservices.runtimeinformation/4.3.0", - "hashPath": "system.runtime.interopservices.runtimeinformation.4.3.0.nupkg.sha512" - }, - "System.Text.Encoding/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-IinDSYC7nZb0lQk79K+IOK7iiMJBYB91QtYzfKUyUWaP+TDVHoLJbYc6Qo53NSTXqnYOZL5BjTqXjp1SGsIGKA==", - "path": "system.text.encoding/4.3.0", - "hashPath": "system.text.encoding.4.3.0.nupkg.sha512" - }, - "System.Text.RegularExpressions/4.1.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-i88YCXpRTjCnoSQZtdlHkAOx4KNNik4hMy83n0+Ftlb7jvV6ZiZWMpnEZHhjBp6hQVh8gWd/iKNPzlPF7iyA2g==", - "path": "system.text.regularexpressions/4.1.0", - "hashPath": "system.text.regularexpressions.4.1.0.nupkg.sha512" - }, - "System.Threading/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-a2F+Zx5I0i9eiralJbAzTio7iYgMNK49g4pHWOuOFndEPpTtNpJjY4/w5Dd5LhVRtrfcm/hLBU5h9S9wkBXSFw==", - "path": "system.threading/4.3.0", - "hashPath": "system.threading.4.3.0.nupkg.sha512" - }, - "System.Threading.Tasks/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-3qCGA18efLdzj3ypbcV3tDHTE+U9ubICeDBxmNvSNTcDrwUX7u+JDD8MhVq2DtMEf4mxqHTf3gegXBTXYoes7g==", - "path": "system.threading.tasks/4.3.0", - "hashPath": "system.threading.tasks.4.3.0.nupkg.sha512" - }, - "LittleForker/1.0.0": { - "type": "project", - "serviceable": false, - "sha512": "" - } - } -} \ No newline at end of file diff --git a/libs/little-forker/tests/LittleForker.Tests/NonTerminatingProcess/NonTerminatingProcess.dll b/libs/little-forker/tests/LittleForker.Tests/NonTerminatingProcess/NonTerminatingProcess.dll deleted file mode 100644 index 531525ef..00000000 Binary files a/libs/little-forker/tests/LittleForker.Tests/NonTerminatingProcess/NonTerminatingProcess.dll and /dev/null differ diff --git a/libs/little-forker/tests/LittleForker.Tests/NonTerminatingProcess/NonTerminatingProcess.exe b/libs/little-forker/tests/LittleForker.Tests/NonTerminatingProcess/NonTerminatingProcess.exe deleted file mode 100644 index 9f546b47..00000000 Binary files a/libs/little-forker/tests/LittleForker.Tests/NonTerminatingProcess/NonTerminatingProcess.exe and /dev/null differ diff --git a/libs/little-forker/tests/LittleForker.Tests/NonTerminatingProcess/NonTerminatingProcess.runtimeconfig.dev.json b/libs/little-forker/tests/LittleForker.Tests/NonTerminatingProcess/NonTerminatingProcess.runtimeconfig.dev.json deleted file mode 100644 index 477e698c..00000000 --- a/libs/little-forker/tests/LittleForker.Tests/NonTerminatingProcess/NonTerminatingProcess.runtimeconfig.dev.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "runtimeOptions": { - "additionalProbingPaths": [ - "C:\\Users\\damian\\.dotnet\\store\\|arch|\\|tfm|", - "C:\\Users\\damian\\.nuget\\packages", - "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder" - ] - } -} \ No newline at end of file diff --git a/libs/little-forker/tests/LittleForker.Tests/NonTerminatingProcess/NonTerminatingProcess.runtimeconfig.json b/libs/little-forker/tests/LittleForker.Tests/NonTerminatingProcess/NonTerminatingProcess.runtimeconfig.json deleted file mode 100644 index bc456d78..00000000 --- a/libs/little-forker/tests/LittleForker.Tests/NonTerminatingProcess/NonTerminatingProcess.runtimeconfig.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "runtimeOptions": { - "tfm": "netcoreapp3.1", - "framework": { - "name": "Microsoft.NETCore.App", - "version": "3.1.0" - } - } -} \ No newline at end of file diff --git a/libs/little-forker/tests/LittleForker.Tests/NonTerminatingProcess/NonTerminatingProcess.xml b/libs/little-forker/tests/LittleForker.Tests/NonTerminatingProcess/NonTerminatingProcess.xml deleted file mode 100644 index ac11791a..00000000 --- a/libs/little-forker/tests/LittleForker.Tests/NonTerminatingProcess/NonTerminatingProcess.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - NonTerminatingProcess - - - - diff --git a/libs/little-forker/tests/LittleForker.Tests/NonTerminatingProcess/Serilog.Sinks.Console.dll b/libs/little-forker/tests/LittleForker.Tests/NonTerminatingProcess/Serilog.Sinks.Console.dll deleted file mode 100644 index b0178a75..00000000 Binary files a/libs/little-forker/tests/LittleForker.Tests/NonTerminatingProcess/Serilog.Sinks.Console.dll and /dev/null differ diff --git a/libs/little-forker/tests/LittleForker.Tests/NonTerminatingProcess/Serilog.dll b/libs/little-forker/tests/LittleForker.Tests/NonTerminatingProcess/Serilog.dll deleted file mode 100644 index acb43403..00000000 Binary files a/libs/little-forker/tests/LittleForker.Tests/NonTerminatingProcess/Serilog.dll and /dev/null differ diff --git a/libs/little-forker/tests/LittleForker.Tests/NonTerminatingProcess/Stateless.dll b/libs/little-forker/tests/LittleForker.Tests/NonTerminatingProcess/Stateless.dll deleted file mode 100644 index 89419fed..00000000 Binary files a/libs/little-forker/tests/LittleForker.Tests/NonTerminatingProcess/Stateless.dll and /dev/null differ diff --git a/libs/little-forker/tests/LittleForker.Tests/ProcessExitedHelperTests.cs b/libs/little-forker/tests/LittleForker.Tests/ProcessExitedHelperTests.cs deleted file mode 100644 index 84aa9b2c..00000000 --- a/libs/little-forker/tests/LittleForker.Tests/ProcessExitedHelperTests.cs +++ /dev/null @@ -1,90 +0,0 @@ -using Microsoft.Extensions.Logging; -using Shouldly; -using Xunit; -using Xunit.Abstractions; - -namespace Logicality.LittleForker; - -public class ProcessExitedHelperTests -{ - private readonly ITestOutputHelper _outputHelper; - private readonly ILoggerFactory _loggerFactory; - - public ProcessExitedHelperTests(ITestOutputHelper outputHelper) - { - _outputHelper = outputHelper; - _loggerFactory = new XunitLoggerFactory(outputHelper).LoggerFactory; - } - - [Fact] - public async Task When_parent_process_does_not_exist_then_should_call_parent_exited_callback() - { - var parentExited = new TaskCompletionSource(); - using (new ProcessExitedHelper(-1, watcher => parentExited.SetResult(watcher.ProcessId), _loggerFactory)) - { - var processId = await parentExited.Task.TimeoutAfter(TimeSpan.FromSeconds(2)); - processId.ShouldBe(-1); - } - } - - [Fact] - public async Task When_parent_process_exits_than_should_call_parent_exited_callback() - { - // Start parent - var supervisor = new ProcessSupervisor( - _loggerFactory, - ProcessRunType.NonTerminating, - Environment.CurrentDirectory, - "dotnet", - "./NonTerminatingProcess/NonTerminatingProcess.dll"); - var parentIsRunning = supervisor.WhenStateIs(ProcessSupervisor.State.Running); - supervisor.OutputDataReceived += data => _outputHelper.WriteLine($"Parent Process: {data}"); - await supervisor.Start(); - await parentIsRunning; - - // Monitor parent - var parentExited = new TaskCompletionSource(); - using (new ProcessExitedHelper(supervisor.ProcessInfo.Id, watcher => parentExited.SetResult(watcher.ProcessId), _loggerFactory)) - { - // Stop parent - await supervisor.Stop(TimeSpan.FromSeconds(2)); - var processId = await parentExited.Task.TimeoutAfter(TimeSpan.FromSeconds(2)); - processId.Value.ShouldBeGreaterThan(0); - } - } - - [Fact] - public async Task When_parent_process_exits_then_child_process_should_also_do_so() - { - // Start parent - var parentSupervisor = new ProcessSupervisor( - _loggerFactory, - ProcessRunType.NonTerminating, - Environment.CurrentDirectory, - "dotnet", - "./NonTerminatingProcess/NonTerminatingProcess.dll"); - parentSupervisor.OutputDataReceived += data => _outputHelper.WriteLine($"Parent: {data}"); - var parentIsRunning = parentSupervisor.WhenStateIs(ProcessSupervisor.State.Running); - await parentSupervisor.Start(); - await parentIsRunning; - - // Start child - var childSupervisor = new ProcessSupervisor( - _loggerFactory, - ProcessRunType.SelfTerminating, - Environment.CurrentDirectory, - "dotnet", - $"./NonTerminatingProcess/NonTerminatingProcess.dll --ParentProcessId={parentSupervisor.ProcessInfo.Id}"); - childSupervisor.OutputDataReceived += data => _outputHelper.WriteLine($"Child: {data}"); - var childIsRunning = childSupervisor.WhenStateIs(ProcessSupervisor.State.Running); - var childHasStopped = childSupervisor.WhenStateIs(ProcessSupervisor.State.ExitedSuccessfully); - await childSupervisor.Start(); - await childIsRunning; - - // Stop parent - await parentSupervisor.Stop(); - - // Wait for child to stop - await childHasStopped.TimeoutAfter(TimeSpan.FromSeconds(2)); - } -} \ No newline at end of file diff --git a/libs/little-forker/tests/LittleForker.Tests/ProcessSupervisorTests.cs b/libs/little-forker/tests/LittleForker.Tests/ProcessSupervisorTests.cs deleted file mode 100644 index 66217b12..00000000 --- a/libs/little-forker/tests/LittleForker.Tests/ProcessSupervisorTests.cs +++ /dev/null @@ -1,223 +0,0 @@ -using System.Collections.Specialized; -using Logicality.LittleForker.Infra; -using Microsoft.Extensions.Logging; -using Shouldly; -using Xunit; -using Xunit.Abstractions; - -namespace Logicality.LittleForker; - -public class ProcessSupervisorTests : IDisposable -{ - private readonly ITestOutputHelper _outputHelper; - private readonly ILoggerFactory _loggerFactory; - - public ProcessSupervisorTests(ITestOutputHelper outputHelper) - { - _outputHelper = outputHelper; - _loggerFactory = new XunitLoggerFactory(outputHelper).LoggerFactory; - } - - [Fact] - public async Task Given_invalid_process_path_then_state_should_be_StartError() - { - var supervisor = new ProcessSupervisor(_loggerFactory, ProcessRunType.NonTerminating, "c:/", "invalid.exe"); - var stateIsStartFailed = supervisor.WhenStateIs(ProcessSupervisor.State.StartFailed); - await supervisor.Start(); - - await stateIsStartFailed; - supervisor.CurrentState.ShouldBe(ProcessSupervisor.State.StartFailed); - supervisor.OnStartException.ShouldNotBeNull(); - - _outputHelper.WriteLine(supervisor.OnStartException.ToString()); - } - - [Fact] - public async Task Given_invalid_working_directory_then_state_should_be_StartError() - { - var supervisor = new ProcessSupervisor(_loggerFactory, ProcessRunType.NonTerminating, "c:/does_not_exist", "git.exe"); - await supervisor.Start(); - - supervisor.CurrentState.ShouldBe(ProcessSupervisor.State.StartFailed); - supervisor.OnStartException.ShouldNotBeNull(); - - _outputHelper.WriteLine(supervisor.OnStartException.ToString()); - } - - [Fact] - public async Task Given_short_running_exe_then_should_run_to_exit() - { - var envVars = new StringDictionary {{"a", "b"}}; - var supervisor = new ProcessSupervisor( - _loggerFactory, - ProcessRunType.SelfTerminating, - Environment.CurrentDirectory, - "dotnet", - "./SelfTerminatingProcess/SelfTerminatingProcess.dll", - envVars); - supervisor.OutputDataReceived += data => _outputHelper.WriteLine2(data); - var whenStateIsExited = supervisor.WhenStateIs(ProcessSupervisor.State.ExitedSuccessfully); - var whenStateIsExitedWithError = supervisor.WhenStateIs(ProcessSupervisor.State.ExitedWithError); - - await supervisor.Start(); - - var task = await Task.WhenAny(whenStateIsExited, whenStateIsExitedWithError); - - task.ShouldBe(whenStateIsExited); - supervisor.CurrentState.ShouldBe(ProcessSupervisor.State.ExitedSuccessfully); - supervisor.OnStartException.ShouldBeNull(); - supervisor.ProcessInfo.ExitCode.ShouldBe(0); - } - - [Fact] - public async Task Given_non_terminating_process_then_should_exit_when_stopped() - { - var supervisor = new ProcessSupervisor( - _loggerFactory, - ProcessRunType.NonTerminating, - Environment.CurrentDirectory, - "dotnet", - "./NonTerminatingProcess/NonTerminatingProcess.dll"); - supervisor.OutputDataReceived += data => _outputHelper.WriteLine2($"Process: {data}"); - var running = supervisor.WhenStateIs(ProcessSupervisor.State.Running); - await supervisor.Start(); - - supervisor.CurrentState.ShouldBe(ProcessSupervisor.State.Running); - await running; - - await supervisor.Stop(TimeSpan.FromSeconds(5)); - - supervisor.CurrentState.ShouldBe(ProcessSupervisor.State.ExitedSuccessfully); - supervisor.OnStartException.ShouldBeNull(); - supervisor.ProcessInfo.ExitCode.ShouldBe(0); - } - - [Fact] - public async Task Can_restart_a_stopped_short_running_process() - { - var supervisor = new ProcessSupervisor( - _loggerFactory, - ProcessRunType.SelfTerminating, - Environment.CurrentDirectory, - "dotnet", - "./SelfTerminatingProcess/SelfTerminatingProcess.dll"); - supervisor.OutputDataReceived += data => _outputHelper.WriteLine2(data); - var stateIsStopped = supervisor.WhenStateIs(ProcessSupervisor.State.ExitedSuccessfully); - await supervisor.Start(); - await stateIsStopped; - - await supervisor.Start(); - await stateIsStopped; - } - - [Fact] - public async Task Can_restart_a_stopped_long_running_process() - { - var supervisor = new ProcessSupervisor( - _loggerFactory, - ProcessRunType.NonTerminating, - Environment.CurrentDirectory, - "dotnet", - "./NonTerminatingProcess/NonTerminatingProcess.dll"); - supervisor.OutputDataReceived += data => _outputHelper.WriteLine2(data); - var exitedKilled = supervisor.WhenStateIs(ProcessSupervisor.State.ExitedKilled); - await supervisor.Start(); - await supervisor.Stop(); - await exitedKilled.TimeoutAfter(TimeSpan.FromSeconds(5)); - - // Restart - var exitedSuccessfully = supervisor.WhenStateIs(ProcessSupervisor.State.ExitedSuccessfully); - await supervisor.Start(); - await supervisor.Stop(TimeSpan.FromSeconds(2)); - await exitedSuccessfully; - } - - [Fact] - public async Task When_stop_a_non_terminating_process_without_a_timeout_then_should_exit_killed() - { - var supervisor = new ProcessSupervisor( - _loggerFactory, - ProcessRunType.NonTerminating, - Environment.CurrentDirectory, - "dotnet", - "./NonTerminatingProcess/NonTerminatingProcess.dll"); - supervisor.OutputDataReceived += data => _outputHelper.WriteLine2(data); - var stateIsStopped = supervisor.WhenStateIs(ProcessSupervisor.State.ExitedKilled); - await supervisor.Start(); - await supervisor.Stop(); // No timeout so will just kill the process - await stateIsStopped.TimeoutAfter(TimeSpan.FromSeconds(2)); - - _outputHelper.WriteLine($"Exit code {supervisor.ProcessInfo.ExitCode}"); - } - - [Fact] - public async Task When_stop_a_non_terminating_process_that_does_not_shutdown_within_timeout_then_should_exit_killed() - { - var supervisor = new ProcessSupervisor( - _loggerFactory, - ProcessRunType.NonTerminating, - Environment.CurrentDirectory, - "dotnet", - "./NonTerminatingProcess/NonTerminatingProcess.dll --ignore-shutdown-signal=true"); - supervisor.OutputDataReceived += data => _outputHelper.WriteLine2(data); - var stateIsKilled = supervisor.WhenStateIs(ProcessSupervisor.State.ExitedKilled); - await supervisor.Start(); - await supervisor.Stop(TimeSpan.FromSeconds(2)); - await stateIsKilled.TimeoutAfter(TimeSpan.FromSeconds(5)); - - _outputHelper.WriteLine($"Exit code {supervisor.ProcessInfo.ExitCode}"); - } - - [Fact] - public async Task When_stop_a_non_terminating_process_with_non_zero_then_should_exit_error() - { - var supervisor = new ProcessSupervisor( - _loggerFactory, - ProcessRunType.NonTerminating, - Environment.CurrentDirectory, - "dotnet", - "./NonTerminatingProcess/NonTerminatingProcess.dll --exit-with-non-zero=true"); - supervisor.OutputDataReceived += data => _outputHelper.WriteLine2(data); - var stateExitWithError = supervisor.WhenStateIs(ProcessSupervisor.State.ExitedWithError); - await supervisor.Start(); - await supervisor.Stop(TimeSpan.FromSeconds(5)); - await stateExitWithError.TimeoutAfter(TimeSpan.FromSeconds(5)); - supervisor.ProcessInfo.ExitCode.ShouldNotBe(0); - - _outputHelper.WriteLine($"Exit code {supervisor.ProcessInfo.ExitCode}"); - } - - [Fact] - public async Task Can_attempt_to_restart_a_failed_short_running_process() - { - var supervisor = new ProcessSupervisor( - _loggerFactory, - ProcessRunType.NonTerminating, - Environment.CurrentDirectory, - "invalid.exe"); - await supervisor.Start(); - - supervisor.CurrentState.ShouldBe(ProcessSupervisor.State.StartFailed); - supervisor.OnStartException.ShouldNotBeNull(); - - await supervisor.Start(); - - supervisor.CurrentState.ShouldBe(ProcessSupervisor.State.StartFailed); - supervisor.OnStartException.ShouldNotBeNull(); - } - - [Fact] - public void WriteDotGraph() - { - var processController = new ProcessSupervisor( - _loggerFactory, - ProcessRunType.NonTerminating, - Environment.CurrentDirectory, - "invalid.exe"); - _outputHelper.WriteLine(processController.GetDotGraph()); - } - - public void Dispose() - { - } -} \ No newline at end of file diff --git a/libs/little-forker/tests/LittleForker.Tests/SelfTerminatingProcess/SelfTerminatingProcess.deps.json b/libs/little-forker/tests/LittleForker.Tests/SelfTerminatingProcess/SelfTerminatingProcess.deps.json deleted file mode 100644 index ca283660..00000000 --- a/libs/little-forker/tests/LittleForker.Tests/SelfTerminatingProcess/SelfTerminatingProcess.deps.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "runtimeTarget": { - "name": ".NETCoreApp,Version=v3.1", - "signature": "" - }, - "compilationOptions": {}, - "targets": { - ".NETCoreApp,Version=v3.1": { - "SelfTerminatingProcess/1.0.0": { - "runtime": { - "SelfTerminatingProcess.dll": {} - } - } - } - }, - "libraries": { - "SelfTerminatingProcess/1.0.0": { - "type": "project", - "serviceable": false, - "sha512": "" - } - } -} \ No newline at end of file diff --git a/libs/little-forker/tests/LittleForker.Tests/SelfTerminatingProcess/SelfTerminatingProcess.dll b/libs/little-forker/tests/LittleForker.Tests/SelfTerminatingProcess/SelfTerminatingProcess.dll deleted file mode 100644 index d2fcddf7..00000000 Binary files a/libs/little-forker/tests/LittleForker.Tests/SelfTerminatingProcess/SelfTerminatingProcess.dll and /dev/null differ diff --git a/libs/little-forker/tests/LittleForker.Tests/SelfTerminatingProcess/SelfTerminatingProcess.exe b/libs/little-forker/tests/LittleForker.Tests/SelfTerminatingProcess/SelfTerminatingProcess.exe deleted file mode 100644 index 4e4ae680..00000000 Binary files a/libs/little-forker/tests/LittleForker.Tests/SelfTerminatingProcess/SelfTerminatingProcess.exe and /dev/null differ diff --git a/libs/little-forker/tests/LittleForker.Tests/SelfTerminatingProcess/SelfTerminatingProcess.runtimeconfig.dev.json b/libs/little-forker/tests/LittleForker.Tests/SelfTerminatingProcess/SelfTerminatingProcess.runtimeconfig.dev.json deleted file mode 100644 index 477e698c..00000000 --- a/libs/little-forker/tests/LittleForker.Tests/SelfTerminatingProcess/SelfTerminatingProcess.runtimeconfig.dev.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "runtimeOptions": { - "additionalProbingPaths": [ - "C:\\Users\\damian\\.dotnet\\store\\|arch|\\|tfm|", - "C:\\Users\\damian\\.nuget\\packages", - "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder" - ] - } -} \ No newline at end of file diff --git a/libs/little-forker/tests/LittleForker.Tests/SelfTerminatingProcess/SelfTerminatingProcess.runtimeconfig.json b/libs/little-forker/tests/LittleForker.Tests/SelfTerminatingProcess/SelfTerminatingProcess.runtimeconfig.json deleted file mode 100644 index bc456d78..00000000 --- a/libs/little-forker/tests/LittleForker.Tests/SelfTerminatingProcess/SelfTerminatingProcess.runtimeconfig.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "runtimeOptions": { - "tfm": "netcoreapp3.1", - "framework": { - "name": "Microsoft.NETCore.App", - "version": "3.1.0" - } - } -} \ No newline at end of file diff --git a/libs/little-forker/tests/LittleForker.Tests/SelfTerminatingProcess/SelfTerminatingProcess.xml b/libs/little-forker/tests/LittleForker.Tests/SelfTerminatingProcess/SelfTerminatingProcess.xml deleted file mode 100644 index 84b67a7c..00000000 --- a/libs/little-forker/tests/LittleForker.Tests/SelfTerminatingProcess/SelfTerminatingProcess.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - SelfTerminatingProcess - - - - diff --git a/libs/little-forker/tests/LittleForker.Tests/XunitLoggerFactory.cs b/libs/little-forker/tests/LittleForker.Tests/XunitLoggerFactory.cs deleted file mode 100644 index c75c1e77..00000000 --- a/libs/little-forker/tests/LittleForker.Tests/XunitLoggerFactory.cs +++ /dev/null @@ -1,18 +0,0 @@ -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Logging; -using Xunit.Abstractions; - -namespace Logicality.LittleForker; - -public class XunitLoggerFactory -{ - public XunitLoggerFactory(ITestOutputHelper outputHelper) - { - var serviceCollection = new ServiceCollection(); - serviceCollection.AddLogging(builder => builder.AddXUnit(outputHelper)); - var provider = serviceCollection.BuildServiceProvider(); - LoggerFactory = provider.GetRequiredService(); - } - - public ILoggerFactory LoggerFactory { get; } -} \ No newline at end of file