LinqTools 1.1.0
See the version list below for details.
dotnet add package LinqTools --version 1.1.0
NuGet\Install-Package LinqTools -Version 1.1.0
<PackageReference Include="LinqTools" Version="1.1.0" />
<PackageVersion Include="LinqTools" Version="1.1.0" />
<PackageReference Include="LinqTools" />
paket add LinqTools --version 1.1.0
#r "nuget: LinqTools, 1.1.0"
#:package LinqTools@1.1.0
#addin nuget:?package=LinqTools&version=1.1.0
#tool nuget:?package=LinqTools&version=1.1.0
LinqTools
Extensions for LINQ
Overview
- Extension functions to make Nullable a Monad/Functor
- Extension functions to make Async Function a Monad/Functor
- Ohter Tools usable for fluent syntax
Nullable Extensions
There are Extension Functions for nullables to make them Monads/Functors:
- Select
- SelectMany
If you are not sure, if an object is null although the compiler says no, you can create a Nullable from an apparently not Nullable with
static T? AsNullable<T>(this T t)
With the extension functions you can work with nullables as if they were not nullables:
var res = (from n in teststr
from m in GetFirstStringChecked(n)
where m.Length == 9
from p in ThrowIfNull(m)
select p)
.GetOrDefault("Nothing");
As soon as a function returns null, all further processing is skipped.
Result Monad/Functor
There is a Result Monad/Functor, containing either an Ok value or an Error value. You can transform Results with LINQ queries like:
var test = from n in await Process.RunAsync("lsblk", "--bytes --output SIZE,NAME,LABEL,MOUNTPOINT,FSTYPE")
let driveLines = n.Split('\n', StringSplitOptions.RemoveEmptyEntries)
let titles = driveLines[0]
let positions = new[]
{
0,
titles.IndexOf("NAME"),
titles.IndexOf("LABEL"),
titles.IndexOf("MOUNT"),
titles.IndexOf("FSTYPE")
}
select driveLines
.Skip(1)
.Select(n => CreateRootItem(n, positions))
.ToArray();
| 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 was computed. 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 was computed. 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. |
-
.NETStandard 2.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on LinqTools:
| Package | Downloads |
|---|---|
|
GtkDotNet
.NET 6 Bindings for GTK 3 |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 6.2.0 | 352 | 12/13/2023 |
| 6.1.0 | 258 | 12/13/2023 |
| 6.0.0 | 455 | 12/10/2023 |
| 5.5.0 | 1,086 | 11/18/2023 |
| 5.4.0 | 704 | 11/16/2023 |
| 5.3.0 | 1,308 | 11/11/2023 |
| 5.2.0 | 1,121 | 8/14/2023 |
| 5.1.1 | 489 | 8/12/2023 |
| 5.1.0 | 501 | 8/12/2023 |
| 5.0.0 | 1,003 | 8/10/2023 |
| 4.2.0 | 296 | 8/9/2023 |
| 4.1.0 | 435 | 4/24/2023 |
| 4.0.0 | 1,194 | 4/9/2023 |
| 3.3.0 | 772 | 4/8/2023 |
| 3.2.0 | 320 | 4/8/2023 |
| 3.1.0 | 325 | 4/8/2023 |
| 3.0.0 | 312 | 4/8/2023 |
| 2.0.0 | 419 | 3/28/2023 |
| 1.3.0 | 372 | 3/26/2023 |
| 1.2.0 | 2,026 | 3/18/2023 |
| 1.1.0 | 593 | 3/15/2023 |
| 1.0.0 | 1,202 | 3/11/2023 |
| 0.0.1-alpha.5 | 191 | 3/8/2023 |
| 0.0.1-alpha.4 | 189 | 3/8/2023 |
| 0.0.1-alpha.3 | 184 | 3/8/2023 |
| 0.0.1-alpha.2 | 178 | 3/8/2023 |
| 0.0.1-alpha.1 | 184 | 3/8/2023 |