Sundew.Base.Numeric 18.0.0

This package has a SemVer 2.0.0 package version: 18.0.0+2e8991d6c7.
dotnet add package Sundew.Base.Numeric --version 18.0.0
                    
NuGet\Install-Package Sundew.Base.Numeric -Version 18.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Sundew.Base.Numeric" Version="18.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Sundew.Base.Numeric" Version="18.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Sundew.Base.Numeric" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Sundew.Base.Numeric --version 18.0.0
                    
#r "nuget: Sundew.Base.Numeric, 18.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Sundew.Base.Numeric@18.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Sundew.Base.Numeric&version=18.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Sundew.Base.Numeric&version=18.0.0
                    
Install as a Cake Tool

Sundew.Base

Sundew.Base is a collection of smaller NuGet packages that work on various .NETStandard targets:

Collections

Contains various Linq style extension methods for collection types suchs IEnumerable, IReadOnlyList etc.

  • For, ForEach, ForReverse, IndexOf, ToReadOnly.
  • AllOrFailed extension allows seemless conversion from IEnumerable<TItem?> to IEnumerable<TItem>.
  • OnlyOneOrDefault similar to SingleOrDefault, but never throws.
  • DistinctInOrder items only appear once, while preserving order.
  • ByCardinality extension allows checking whether an IEnumerable<TItem> is empty, has a single element or multiple elements.
  • Value-Array, List and Dictionary* wrappers for Immutable collections with value semantics.

Primitives

  • Result types (R<T, E> and R<T>, RoE<E>)
  • Option type T? (through extension methods).
  • Flag is an Interlocked.Exchanged based flag.
  • Cancellation unifies CancellationToken and timeout support in a single parameter, avoiding token/timeout overloads: accept Cancellation cancellation = default and either pass it on, or call EnableCancellation() where cancellation is actually implemented.

Computation

  • Attempter for implementing retry logic.
  • Progress reporting

Numeric

  • Interval represents an interval of two values.
  • Percentage value type.

Time

  • DateTime provider.

IO

  • Paths - search upwards for relative paths.

Text

  • AlignedString and AlignAndLimitFormatProvider providers aligning and length limiting string formatting.
  • NamedFormatString allows to define a string format using names rather than indices.
  • NaturalTextComparer does logical text comparison for all platforms with performance similar to the Windows specific StrCmpLogicalW.
  • AppendItems allows joining items into a StringBuilder.

Initialization

  • IInitializable for implementing async initialization logic.
  • InitializeAction for wrapping an Action in an IInitializable.
  • Initializer provides initialization of IInitializables.
  • InitializeFlag for keeping tracking whether initialization is completed.

Disposal

  • DisposeAction for wrapping an Action in an IDisposable.
  • DisposeAsyncAction for wrapping an Action in an IAsyncDisposable.
  • Disposer provides disposal of a fixed set of IDisposables.
  • DisposableState provides an easy way to implement the Dispose(bool) pattern.
  • DisposingDictionary allows building a list of IDisposables that supports disposal by a key and otherwise supports disposal in the same order.
  • DisposingList allows building a list of IDisposables for disposal in the same order.

IAsyncDisposable is only supported on .NETStandard2.1

Equality

  • ReferenceEqualityComparer compares objects by reference.
  • TargetEqualityWeakReference is a weak reference that implements equality based on target equality.

Memory

  • Buffer allows building arrays
  • Split extensions allows Linq style splitting memory in to segments.

Notifications

  • DelegateEvent<TEvent> is an asynchronous event that never keeps its subscribers alive. Handlers return ValueTask, may observe cancellation and can run sequentially or in parallel, and raising allocates nothing.
  • A subscription is owned by an INotificationOwner, a class with a Subscriptions property, and stays active exactly as long as those Subscriptions are reachable, so nothing has to be disposed. Subscriptions.UnsubscribeAll(owner) or Subscription.Unsubscribe() end subscriptions deterministically, and a dedicated Subscriptions instance controls the lifetime explicitly.
  • The package ships a source generator that implements INotificationOwner for partial classes, so an owner only has to be declared partial.
  • INotify<TEvent> and INotifyAny<TEvent> are the subscribe side, INotifier<TEvent> the raise side, and IEvent<TEvent> and IEvents<TEvent> combine them.
  • Notifications.Reactive bridges IObservable<TEvent> sources into the same subscription model with ReactiveEventSubscriber.
public partial class Dashboard : INotificationOwner
{
    public Dashboard(IEvents<ISensorEvent> sensorEvents)
    {
        sensorEvents.Subscribe((TemperatureChanged changed, CancellationToken token) => this.ShowAsync(changed, token), this);
    }
}

The dashboard receives temperature events for as long as it is alive and can be garbage collected while the event source lives on.

Threading and Threading.Jobs

  • AsyncLazy provides a cancellable async lazy implementation
  • AsyncLock provides a reentrant async lock, where waiting for the lock can be cancelled or time out.
  • CancellableJob is implementation of a cancellable task.
  • ContinusJob is implementation of a cancellable task that keeps running.

Timers

  • Timer is an easy to use and modify timer.
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 is compatible.  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 is compatible.  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 is compatible.  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.  net11.0 is compatible. 
.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 is compatible. 
.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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Sundew.Base.Numeric:

Package Downloads
Sundew.Base

All in one package including: Sundew.Base.Collections Sundew.Base.Disposal Sundew.Base.Equality Sundew.Base.Initialization Sundew.Base.Memory Sundew.Base.Primitives Sundew.Base.Computation Sundew.Base.Numeric Sundew.Base.Globalization Sundew.Base.Notifications Sundew.Base.Time Sundew.Base.IO Sundew.Base.Reporting Sundew.Base.Text Sundew.Base.Threading.Jobs Sundew.Base.Threading Sundew.Base.Timers

Sundew.Base.Memory

Various extensions and classes for working with memory.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
18.0.0 99 11/21/2026
18.0.0-u20261116-001427-ci 352 11/16/2026
17.0.1-u20261108-234028-ci 1,497 11/8/2026
17.0.1-u20261031-124224-ci 138 10/31/2026
17.0.1-u20261025-231935-ci 117 10/25/2026
17.0.0 2,844 10/17/2026
17.0.0-u20261017-190128-ci 116 10/17/2026
17.0.0-u20261010-202948-ci 115 10/10/2026
17.0.0-u20261003-235612-ci 128 10/3/2026
17.0.0-u20260912-094759-ci 2,794 9/12/2026
16.0.1-u20260803-052148-ci 201 8/3/2026
16.0.1-u20260727-064501-ci 125 7/27/2026
16.0.1-u20260711-085919-ci 121 7/11/2026
16.0.1-u20260502-183506-ci 123 5/2/2026
16.0.1-u20260322-230418-ci 70 3/22/2026
16.0.0 6,203 2/1/2026
16.0.0-u20260131-215542-ci 98 1/31/2026
16.0.0-u20260131-210447-ci 99 1/31/2026
15.1.0-u20260126-013109-ci 93 1/26/2026
15.1.0-u20260119-061127-ci 91 1/19/2026
Loading failed

17.0 - Notifications improvements.
16.0 - Added Sundew.Base.Identification, Cancellation redesign: all copies share one core, so enablers across a call chain are linked
15.0 - .NET 10 support, dropped older than netstandard2.0
14.0 - Result and collections improvements
13.0 - Results improvements
12.0 - Restructing into smaller packages
11.0 - Unified Disposal and Initialization
10.0 - O.None was changed to a property
9.0 - Immutable collections with value semantics, Result type redesign and new Option type, AppendItems replaces AggregateToStringBuilder and JoinToStringBuilder.
8.5 - JoinToStringBuilder and AggregateToStringBuilder improvements
8.4 - AllOrFailed extension for IEnumerable<T>
8.3 - NamedFormatString and AsyncLazy improvements
8.2 - ToEnumerable returns IReadOnlyCollection, Added Disposer ctors to avoid ambiguous calls
8.1 - Added NaturalTextComparer
8.0 - Added NamedFormatProvider, removed Text Split, use Memory.Split instead
7.0 - Split into separate packages and cleanup