jason-c-daniels - Jcd.DoWhenRun 1.0.1
A netstandard 1.0 set of extension methods, Do, DoWhen and Run, that give a Fluent builder-pattern-like experience to operating on IEnumerable and IEnumerable<T> derived types.
PM> Install-Package Jcd.DoWhenRun -Version 1.0.1 -Source https://www.myget.org/F/jason-c-daniels/api/v3/index.json
> nuget.exe install Jcd.DoWhenRun -Version 1.0.1 -Source https://www.myget.org/F/jason-c-daniels/api/v3/index.json
> dotnet add package Jcd.DoWhenRun --version 1.0.1 --source https://www.myget.org/F/jason-c-daniels/api/v3/index.json
source https://www.myget.org/F/jason-c-daniels/api/v3/index.json
nuget Jcd.DoWhenRun ~> 1.0.1
Copy to clipboard
> choco install Jcd.DoWhenRun --version 1.0.1 --source https://www.myget.org/F/jason-c-daniels/api/v2
Import-Module PowerShellGet
Register-PSRepository -Name "jason-c-daniels" -SourceLocation "https://www.myget.org/F/jason-c-daniels/api/v2"
Install-Module -Name "Jcd.DoWhenRun" -RequiredVersion "1.0.1" -Repository "jason-c-daniels"
Copy to clipboard
Jcd.DoWhenRun
A netstandard 1.0 set of extension methods, Do, DoWhen and Run, that give a Fluent
builder-pattern-like experience to operating on IEnumerable and IEnumerable<T>
derived types.
Do
Do sets up an operation to perform on every item it iterates across.
DoWhen
DoWhen sets up an operation to perform on every item it iterates across that matches the predicate.
Run
Run enumerates an IEnumerable and therefore causes execution of the the code configured in Do and DoWhen blocks.
Example
(from x in Enumerable.Range(0, 4)
from y in Enumerable.Range(0, 4)
select (x, y))
.DoWhen((i,_)=>i > 0 && i % 4 == 0, (_,_)=>Console.WriteLine())
.Do(t=>Console.Write(t))
.Run();
Console.WriteLine();
/* outputs:
(0, 0)(0, 1)(0, 2)(0, 3)
(1, 0)(1, 1)(1, 2)(1, 3)
(2, 0)(2, 1)(2, 2)(2, 3)
(3, 0)(3, 1)(3, 2)(3, 3)
*/
- .NETStandard 1.0: 1.0.0.0
OwnersJason C. Daniels |
AuthorsJason C. Daniels |
Project URLhttps://github.com/jason-c-daniels/Jcd.DoWhenRun |
LicenseMIT |
Info162 total downloads |
| 84 downloads for version 1.0.1 |
| Download (9.52 KB) |
| Found on the current feed only |
Package history
| Version | Size | Last updated | Downloads | Mirrored? | |||
|---|---|---|---|---|---|---|---|
|
|
1.0.2 | 9.5 KB | Sat, 16 Oct 2021 10:27:17 GMT | 78 |
|
||
|
|
1.0.1 | 9.52 KB | Sat, 16 Oct 2021 10:20:05 GMT | 84 |
|