Skip to content

Commit 73c019f

Browse files
committed
Names refactored
1 parent 5ac2448 commit 73c019f

File tree

8 files changed

+31
-36
lines changed

8 files changed

+31
-36
lines changed

src/Simplify.Pipelines/Processing/IPipeline{T}.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ namespace Simplify.Pipelines.Processing
77
public interface IPipeline<in T>
88
{
99
/// <summary>
10-
/// Process args through pipeline.
10+
/// Process item through pipeline.
1111
/// </summary>
12-
/// <param name="args">The arguments.</param>
12+
/// <param name="item">The item for execution.</param>
1313
/// <returns></returns>
14-
bool Execute(T args);
14+
bool Execute(T item);
1515
}
1616
}
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
namespace Simplify.Pipelines.Processing
22
{
33
/// <summary>
4-
/// Represent pipeline with processing error result informatioo
4+
/// Represent pipeline with processing error result information
55
/// </summary>
66
/// <typeparam name="T"></typeparam>
77
/// <typeparam name="TResult">The type of the result.</typeparam>
88
public interface IResultingPipeline<in T, out TResult>
99
{
10-
/// <summary>
11-
/// Process args through pipeline.
12-
/// </summary>
13-
/// <param name="args">The arguments.</param>
14-
/// <returns></returns>
15-
bool Execute(T args);
16-
1710
/// <summary>
1811
/// Gets the error result.
1912
/// </summary>
2013
/// <value>
2114
/// The error result.
2215
/// </value>
2316
TResult ErrorResult { get; }
17+
18+
/// <summary>
19+
/// Process item through pipeline.
20+
/// </summary>
21+
/// <param name="item">The item for execution.</param>
22+
/// <returns></returns>
23+
bool Execute(T item);
2424
}
2525
}

src/Simplify.Pipelines/Processing/PipelineProcessor{T}.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
namespace Simplify.Pipelines.Processing
22
{
33
/// <summary>
4-
///Provides default pipeline processor
4+
/// Provides default pipeline processor
55
/// </summary>
66
/// <typeparam name="T"></typeparam>
77
/// <seealso cref="IPipelineProcessor" />

src/Simplify.Pipelines/Processing/Pipeline{T}.cs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System.Collections.Generic;
2+
using System.Linq;
23

34
namespace Simplify.Pipelines.Processing
45
{
@@ -23,17 +24,12 @@ public Pipeline(IList<IPipelineStage<T>> stages)
2324
/// <summary>
2425
/// Process pipeline stages.
2526
/// </summary>
26-
/// <param name="args">The arguments.</param>
27+
/// <param name="item">The item for execution.</param>
2728
/// <returns></returns>
2829

29-
public virtual bool Execute(T args)
30+
public virtual bool Execute(T item)
3031
{
31-
// ReSharper disable once LoopCanBeConvertedToQuery
32-
foreach (var stage in _stages)
33-
if (!stage.Execute(args))
34-
return false;
35-
36-
return true;
32+
return _stages.All(stage => stage.Execute(item));
3733
}
3834
}
3935
}

src/Simplify.Pipelines/Processing/ResultingPipeline{T}.cs

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
namespace Simplify.Pipelines.Processing
44
{
55
/// <summary>
6-
///Provides default resulting pipeline
6+
/// Provides default resulting pipeline
77
/// </summary>
88
/// <typeparam name="T"></typeparam>
99
/// <typeparam name="TResult">The type of the result.</typeparam>
@@ -21,14 +21,21 @@ public ResultingPipeline(IList<IResultingPipelineStage<T, TResult>> stages)
2121
_stages = stages;
2222
}
2323

24+
/// <summary>
25+
/// Gets the error result.
26+
/// </summary>
27+
/// <value>
28+
/// The error result.
29+
/// </value>
30+
public TResult ErrorResult { get; private set; }
31+
2432
/// <summary>
2533
/// Process pipeline stages.
2634
/// </summary>
27-
/// <param name="item">The item.</param>
35+
/// <param name="item">The item for execution.</param>
2836
/// <returns></returns>
2937
public bool Execute(T item)
3038
{
31-
// ReSharper disable once LoopCanBeConvertedToQuery
3239
foreach (var stage in _stages)
3340
if (!stage.Execute(item))
3441
{
@@ -38,13 +45,5 @@ public bool Execute(T item)
3845

3946
return true;
4047
}
41-
42-
/// <summary>
43-
/// Gets the error result.
44-
/// </summary>
45-
/// <value>
46-
/// The error result.
47-
/// </value>
48-
public TResult ErrorResult { get; private set; }
4948
}
5049
}

src/Simplify.Pipelines/Simplify.Pipelines.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
<Product>Simplify</Product>
66
<Description>Pipelines processing, validation patterns</Description>
77
<Copyright>Licensed under LGPL</Copyright>
8-
<Version>0.4</Version>
8+
<Version>0.5</Version>
99
<PackageProjectUrl>https://github.com/SimplifyNet/Simplify</PackageProjectUrl>
1010
<PackageIconUrl>https://raw.githubusercontent.com/SimplifyNet/Images/master/Logo.png</PackageIconUrl>
1111
<RepositoryUrl>https://github.com/SimplifyNet/Simplify/tree/master/src/Simplify.Pipelines</RepositoryUrl>
1212
<RepositoryType>GIT</RepositoryType>
1313
<PackageTags>.NET pipelines</PackageTags>
1414
<PackageReleaseNotes>
15-
New
16-
* Conveyor patterns
15+
Updates
16+
* Names refactored
1717
</PackageReleaseNotes>
1818
<OutputPath>bin\Any CPU\$(Configuration)\</OutputPath>
1919
<DocumentationFile>bin\Any CPU\$(Configuration)\$(TargetFramework)\Simplify.Pipelines.xml</DocumentationFile>

src/Simplify.Pipelines/Validation/IDataRule{T}.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
/// <typeparam name="TData">The type of the data.</typeparam>
77
/// <typeparam name="T"></typeparam>
88
/// <typeparam name="TResult">The type of the result.</typeparam>
9-
/// <seealso cref="Simplify.Pipelines.Validation.IRule{T, TResult}" />
9+
/// <seealso cref="IRule{T, TResult}" />
1010
public interface IDataRule<out TData, in T, out TResult> : IRule<T, TResult>
1111
{
1212
/// <summary>

src/Simplify.Pipelines/Validation/IRule{T}.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public interface IRule<in T, out TResult>
2323
bool Check(T item);
2424

2525
/// <summary>
26-
/// Perfrom some action in case of invalid rule status.
26+
/// Perform some action in case of invalid rule status.
2727
/// </summary>
2828
void GenerateInvalidAction();
2929
}

0 commit comments

Comments
 (0)