Skip to content

Commit 46e77e0

Browse files
committed
Simplify everything.
1 parent 43ed7c8 commit 46e77e0

22 files changed

+155
-255
lines changed

.vscode/launch.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
{
2-
// Use IntelliSense to find out which attributes exist for C# debugging
3-
// Use hover for the description of the existing attributes
4-
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
5-
"version": "0.2.0",
6-
"configurations": [
2+
"version": "0.2.0",
3+
"configurations": [
74
{
5+
// Use IntelliSense to find out which attributes exist for C# debugging
6+
// Use hover for the description of the existing attributes
7+
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
88
"name": ".NET Core Launch (console)",
99
"type": "coreclr",
1010
"request": "launch",
1111
"preLaunchTask": "build",
1212
// If you have changed target frameworks, make sure to update the program path.
13-
"program": "${workspaceFolder}/src/Pipr.Tests/bin/Debug/netcoreapp2.1/Pipeline.Tests.dll",
13+
"program": "${workspaceFolder}/Pipr.Tests/bin/Debug/netcoreapp3.1/Pipr.Tests.dll",
1414
"args": [],
15-
"cwd": "${workspaceFolder}/src/Pipr.Tests",
16-
// For more information about the 'console' field, see https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md#console-terminal-window
15+
"cwd": "${workspaceFolder}/Pipr.Tests",
16+
// For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
1717
"console": "internalConsole",
1818
"stopAtEntry": false
1919
},

.vscode/tasks.json

Lines changed: 33 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,41 @@
11
{
2-
// See https://go.microsoft.com/fwlink/?LinkId=733558
3-
// for the documentation about the tasks.json format
42
"version": "2.0.0",
53
"tasks": [
64
{
75
"label": "build",
8-
"command": "dotnet build",
9-
"type": "shell",
10-
"group": "build",
11-
"presentation": {
12-
"reveal": "silent"
13-
},
6+
"command": "dotnet",
7+
"type": "process",
8+
"args": [
9+
"build",
10+
"${workspaceFolder}/Pipr.Tests/Pipr.Tests.csproj",
11+
"/property:GenerateFullPaths=true",
12+
"/consoleloggerparameters:NoSummary"
13+
],
14+
"problemMatcher": "$msCompile"
15+
},
16+
{
17+
"label": "publish",
18+
"command": "dotnet",
19+
"type": "process",
20+
"args": [
21+
"publish",
22+
"${workspaceFolder}/Pipr.Tests/Pipr.Tests.csproj",
23+
"/property:GenerateFullPaths=true",
24+
"/consoleloggerparameters:NoSummary"
25+
],
26+
"problemMatcher": "$msCompile"
27+
},
28+
{
29+
"label": "watch",
30+
"command": "dotnet",
31+
"type": "process",
32+
"args": [
33+
"watch",
34+
"run",
35+
"${workspaceFolder}/Pipr.Tests/Pipr.Tests.csproj",
36+
"/property:GenerateFullPaths=true",
37+
"/consoleloggerparameters:NoSummary"
38+
],
1439
"problemMatcher": "$msCompile"
1540
}
1641
]

src/Pipr.Tests/PipelineBuilderTests.cs renamed to Pipr.Tests/PipelineBuilderTests.cs

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
using System;
2-
using Microsoft.Extensions.DependencyInjection;
31
using Pipr;
42
using Xunit;
53

@@ -54,25 +52,6 @@ public void Simple()
5452
Assert.Equal("12121212", result.Value);
5553
}
5654

57-
[Fact(DisplayName = "With dependency injection")]
58-
public void FromProvider()
59-
{
60-
IServiceCollection serviceCollection = new ServiceCollection();
61-
serviceCollection.AddTransient<ToStringStep>();
62-
serviceCollection.AddTransient<DoublerStep>();
63-
64-
serviceCollection.AddPipr();
65-
66-
var pipeline = new PipelineBuilder()
67-
.AddStep(PipelineBuilder.UseService<ToStringStep>())
68-
.AddStep(PipelineBuilder.UseService<DoublerStep>())
69-
.AddStep(PipelineBuilder.UseService<DoublerStep>())
70-
.Build();
71-
72-
var result = pipeline.Execute(12);
73-
Assert.Equal("12121212", result.Value);
74-
}
75-
7655
[Fact(DisplayName = "Cancel usage")]
7756
public void Cancel()
7857
{

src/Pipr.Tests/Pipr.Tests.csproj renamed to Pipr.Tests/Pipr.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>netcoreapp2.1</TargetFramework>
4+
<TargetFramework>netcoreapp3.1</TargetFramework>
55

66
<IsPackable>false</IsPackable>
77
</PropertyGroup>

Pipr.sln

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 15
4+
VisualStudioVersion = 15.0.26124.0
5+
MinimumVisualStudioVersion = 15.0.26124.0
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Pipr", "Pipr\Pipr.csproj", "{A52471B5-3144-4E7A-8A5A-D814A9067EF8}"
7+
EndProject
8+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Pipr.Tests", "Pipr.Tests\Pipr.Tests.csproj", "{9847D52F-73E6-4DE8-9507-E584A6641AD8}"
9+
EndProject
10+
Global
11+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
12+
Debug|Any CPU = Debug|Any CPU
13+
Debug|x64 = Debug|x64
14+
Debug|x86 = Debug|x86
15+
Release|Any CPU = Release|Any CPU
16+
Release|x64 = Release|x64
17+
Release|x86 = Release|x86
18+
EndGlobalSection
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
23+
{A52471B5-3144-4E7A-8A5A-D814A9067EF8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
24+
{A52471B5-3144-4E7A-8A5A-D814A9067EF8}.Debug|Any CPU.Build.0 = Debug|Any CPU
25+
{A52471B5-3144-4E7A-8A5A-D814A9067EF8}.Debug|x64.ActiveCfg = Debug|Any CPU
26+
{A52471B5-3144-4E7A-8A5A-D814A9067EF8}.Debug|x64.Build.0 = Debug|Any CPU
27+
{A52471B5-3144-4E7A-8A5A-D814A9067EF8}.Debug|x86.ActiveCfg = Debug|Any CPU
28+
{A52471B5-3144-4E7A-8A5A-D814A9067EF8}.Debug|x86.Build.0 = Debug|Any CPU
29+
{A52471B5-3144-4E7A-8A5A-D814A9067EF8}.Release|Any CPU.ActiveCfg = Release|Any CPU
30+
{A52471B5-3144-4E7A-8A5A-D814A9067EF8}.Release|Any CPU.Build.0 = Release|Any CPU
31+
{A52471B5-3144-4E7A-8A5A-D814A9067EF8}.Release|x64.ActiveCfg = Release|Any CPU
32+
{A52471B5-3144-4E7A-8A5A-D814A9067EF8}.Release|x64.Build.0 = Release|Any CPU
33+
{A52471B5-3144-4E7A-8A5A-D814A9067EF8}.Release|x86.ActiveCfg = Release|Any CPU
34+
{A52471B5-3144-4E7A-8A5A-D814A9067EF8}.Release|x86.Build.0 = Release|Any CPU
35+
{9847D52F-73E6-4DE8-9507-E584A6641AD8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
36+
{9847D52F-73E6-4DE8-9507-E584A6641AD8}.Debug|Any CPU.Build.0 = Debug|Any CPU
37+
{9847D52F-73E6-4DE8-9507-E584A6641AD8}.Debug|x64.ActiveCfg = Debug|Any CPU
38+
{9847D52F-73E6-4DE8-9507-E584A6641AD8}.Debug|x64.Build.0 = Debug|Any CPU
39+
{9847D52F-73E6-4DE8-9507-E584A6641AD8}.Debug|x86.ActiveCfg = Debug|Any CPU
40+
{9847D52F-73E6-4DE8-9507-E584A6641AD8}.Debug|x86.Build.0 = Debug|Any CPU
41+
{9847D52F-73E6-4DE8-9507-E584A6641AD8}.Release|Any CPU.ActiveCfg = Release|Any CPU
42+
{9847D52F-73E6-4DE8-9507-E584A6641AD8}.Release|Any CPU.Build.0 = Release|Any CPU
43+
{9847D52F-73E6-4DE8-9507-E584A6641AD8}.Release|x64.ActiveCfg = Release|Any CPU
44+
{9847D52F-73E6-4DE8-9507-E584A6641AD8}.Release|x64.Build.0 = Release|Any CPU
45+
{9847D52F-73E6-4DE8-9507-E584A6641AD8}.Release|x86.ActiveCfg = Release|Any CPU
46+
{9847D52F-73E6-4DE8-9507-E584A6641AD8}.Release|x86.Build.0 = Release|Any CPU
47+
EndGlobalSection
48+
EndGlobal
File renamed without changes.

src/Pipr/IStep.cs renamed to Pipr/IStep.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
1-
using System;
2-
using System.Threading;
3-
using System.Threading.Tasks;
4-
using Microsoft.Extensions.DependencyInjection;
5-
61
namespace Pipr
72
{
8-
93
public interface IStep<Tin, Tout>
104
{
115
Tout Execute(Tin input, PipelineContext context);

Pipr/InjectedType.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
namespace Pipr
2+
{
3+
public class InjectedType<T>
4+
{
5+
public static T Configure()
6+
{
7+
return default(T);
8+
}
9+
}
10+
}
File renamed without changes.

src/Pipr/Pipeline.cs renamed to Pipr/Pipeline.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
using System;
2-
using System.Threading;
3-
using System.Threading.Tasks;
4-
using Microsoft.Extensions.DependencyInjection;
5-
61
namespace Pipr
72
{
83
public class Pipeline<Tin, Tout>

0 commit comments

Comments
 (0)