peSHIr.Core
0.0.45-alpha
Prefix Reserved
Due to an inconsistent use of Tuple/ValueTuple in ZipWith() and MakeBatches() extension method, unexpected CastExceptions can occur if you try to use MakeBatches() with a set of items with given sizes. Please no longer use this version.
See the version list below for details.
dotnet add package peSHIr.Core --version 0.0.45-alpha
NuGet\Install-Package peSHIr.Core -Version 0.0.45-alpha
<PackageReference Include="peSHIr.Core" Version="0.0.45-alpha" />
<PackageVersion Include="peSHIr.Core" Version="0.0.45-alpha" />
<PackageReference Include="peSHIr.Core" />
paket add peSHIr.Core --version 0.0.45-alpha
#r "nuget: peSHIr.Core, 0.0.45-alpha"
#addin nuget:?package=peSHIr.Core&version=0.0.45-alpha&prerelease
#tool nuget:?package=peSHIr.Core&version=0.0.45-alpha&prerelease
About
What's this?
This library contains some utility functions I have been developing over the last decade or so (some even longer) and that I use extensively in almost anything I write/maintain these days.
What's so special about that?
There might not be anything really special about this, but maybe you think some of this is useful in your daily .NET developing life? These include things like:
- An interface plus some utility code for optionally supplying basic progress messages to callers/UI.
- Formatting of values/messages for the purpose of showing information to (UIs used by) human users.
- Parsing/unparsing string values to/from strongly typed values.
- Some utility extension methods on sequences/collections.
- Abstract base and concrete sub classes for working with sets and ranges.
- Some math and calculation related code.
Who created this?
My name is Jarno Peschier. I started programming on a Commodore 64 in high school, got a masters degree in Computer Science at Utrecht University at the end of the last century, specializing in GIS algorithms, and I have been developing software all my professional life.
You might also know me by my online name of peSHIr
, which is basically the way you write my last name phonetically in Klingon.
At the start of 2025 I worked as a software engineer at Dutch engineering firm Iv, where I personally handled all software development around our scan vehicle (YouTube) using multiple third party software packages, C#, and PowerShell.
The laserscan and photo data Iv collects using this vehicle is used in infrastructure projects all over the Netherlands, but also for monitoring things like trees or quay walls in Amsterdam.
How do I use it?
Currently I am in the process of setting up the package, so really at the moment you can not do very much more than flatten a sequence of sequences into a flat sequence like this
using peSHIr.Collections;
//...
IEnumerable<List<int>> values = [[1, 2, 3, 4, 5], [99], [2024,2025]];
IEnumerable<int>? flat = values.Flatten();
Don't worry, winter... ehh... more useful code... is coming, including the code from a blog post of mine from 2011. 😉
There is more there already now, but it's not fleshed out or documented all yet. That should (also) be coming.
Download
This library is available as a NuGet package on https://nuget.org. To install it, use the following command-line:
dotnet add package peSHIr.Core
License and Versioning
This library is licensed under the MIT License - please see the LICENSE file for details - and makes use of Semantic Versioning to try and give meaning to the version numbers, at least for the non-prereleased stuff.
Credits
This library wouldn't have been possible without the following:
- xUnit - Community-focused unit testing tool for .NET by Brad Wilson
- FluentAssertions - Support library for using fluent unit test assertions by Dennis Doomen
- Polysharp - Generated, source-only polyfills for C# language features by Sergio Pedri
- C# Helper - Website with some helpful articles on C# helper code by Rod Stephens
- Matrix Inversion Using C# - MSDN article by James McCaffrey
Show your appreciation for my work
If you like what you see/use you could try one of these links to let me know:
You may also like
- My Link Tree
- My NuGet packages
- My English blog (long dead at the moment..)
- My Dutch blog (long dead at the moment..)
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 is compatible. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.7
- System.ValueTuple (>= 4.6.1)
-
.NETStandard 2.0
- System.ValueTuple (>= 4.6.1)
-
net8.0
- No dependencies.
NuGet packages (3)
Showing the top 3 NuGet packages that depend on peSHIr.Core:
Package | Downloads |
---|---|
peSHIr.Forms
Basic .NET library containing utility code related to Windows Forms applications, by the author of peSHIr.Core. |
|
peSHIr.Speech
Very basic .NET library easy use of System.Speech in Windows Forms applications in Dutch/English, by the author of peSHIr.Core. |
|
peSHIr.Drawing
Basic .NET library containing drawing/bitmap related utility code (re)used within the last decade by the author. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
0.0.46-alpha | 36 | 5/20/2025 |
Some minor changes and extra sequence helpers, like MakeBatches(), BringValuesForward(), MergeMultiples(), and getting lowest/highest count value from a Dictionary<T,int> (as you can easily fill using Increase/Decrease methods to count values).
Increase the unit code count as well, and no longer have any nullable related warnings any more.
From 0.0.33-alpha the matrix code from https://www.microsoft.com/en-us/research/people/jammc with some extra usability wrappers and all test is finally there.
(Still not everything is all documented and unit tested properly; this is still a work in progress, mostly for internal reuse for now.)