Bodu.Core
1.3.0
dotnet add package Bodu.Core --version 1.3.0
NuGet\Install-Package Bodu.Core -Version 1.3.0
<PackageReference Include="Bodu.Core" Version="1.3.0" />
<PackageVersion Include="Bodu.Core" Version="1.3.0" />
<PackageReference Include="Bodu.Core" />
paket add Bodu.Core --version 1.3.0
#r "nuget: Bodu.Core, 1.3.0"
#:package Bodu.Core@1.3.0
#addin nuget:?package=Bodu.Core&version=1.3.0
#tool nuget:?package=Bodu.Core&version=1.3.0
Bodu.Core
API stability - Stable. The public API surface is committed: breaking changes are reserved for a major-version bump per SemVer, except a deliberate break that is recorded in the release notes and in the package's
CompatibilitySuppressions.xml. See versioning and support.
Foundational building blocks for .NET 8 and .NET 10: extension methods over strings, dates, numerics, spans; pooled buffer builders; argument validation helpers; a non-cryptographic RNG; a synchronous rate limiter; immutable calendar value sets (days of the week, months, days of the month, hours, minutes, and seconds); and a Result<T> type for explicit error handling.
Collections
Note: Specialized generic collections (CircularBuffer<T>, Deque<T>, etc.) have been
moved to the separate Bodu.Collections package. The namespace structure is unchanged;
consumers update the package reference only. Bodu.Collections depends on Bodu.Core.
Key Types
ThrowHelper- argument validation helpers (null, range, enum, argument-expression capture)RateGate(Bodu.Threading) - synchronous rate limiter (leading-edge throttling)DayOfWeekSet- immutable set of days of the week with set operators and working-week presets; it replacesWeekPattern, removed in 1.3.0MonthSet,DayOfMonthSet,HourSet,MinuteSet,SecondSet- the same shape over the other calendar fields, written as a list of values and ranges (1-3,12), every value (L), binary text (B), or, for months, a mask of initials (J,JFM________D)ICalendarValueSet<TSelf, TValue>- the interface the six calendar value sets share, for code that works with any of them; every set also reads and writes its text over spans of characters and UTF-8 bytes (ISpanParsable,IUtf8SpanParsable,ISpanFormattable,IUtf8SpanFormattable)Result<T>(Bodu.Functional) - explicit success/failure typeXorShiftRandom- high-performance xorshift128 PRNG (non-cryptographic)SequenceGenerator(Bodu.Sequences) - lazy sequence factories (Range, NextWhile, Factory, Fibonacci, etc.)
Extensions
| Target | Methods | Namespace |
|---|---|---|
Array<T> |
PadLeft, PadRight |
Bodu.Extensions |
DateOnly |
Quarter queries, working-day checks | Bodu.Extensions |
DateTime |
Unix epoch conversions, formatting | Bodu.Extensions |
string |
Line splitting, case conversion | Bodu.Extensions |
IEnumerable<T>, IList<T>, IDictionary<TKey,TValue> |
Sequence operators: batching, caching, recursive selection, shuffling | Bodu.Collections.Generic.Extensions |
IEnumerable (non-generic) |
CountOrDefault, RecursiveSelect |
Bodu.Collections.Extensions |
Span<T>, ReadOnlySpan<T> |
AsReadOnly, ToReversed |
Bodu.Extensions |
Buffers
PooledBufferBuilder<T>(Bodu.Buffers) - ArrayPool-backed accumulator with auto-growth
Building and testing
To build this package from source and run its tests, see CONTRIBUTING.md.
License
MIT. © Bodu Pty. Ltd.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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 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. |
-
net10.0
- No dependencies.
-
net8.0
- No dependencies.
NuGet packages (44)
Showing the top 5 NuGet packages that depend on Bodu.Core:
| Package | Downloads |
|---|---|
|
Bodu.Security.Cryptography
Managed implementations of modern and legacy cryptographic primitives for .NET (block ciphers, AEAD modes, hashes/MACs, padding, transforms, the RFC 6962 Merkle tree with inclusion and consistency proofs, and asymmetric algorithms: X25519, Ed25519, and the post-quantum ML-KEM / ML-DSA). NOT independently audited, NOT FIPS-validated, and side-channel resistance is best-effort only - see the package README. Use the platform System.Security.Cryptography types where they cover your needs. |
|
|
Bodu.Collections
Specialized generic collections for .NET 8 and .NET 10: circular buffer, deque, evicting dictionary, sequenced dictionary, indexed and ordered sets, indexed priority queue, multi-value dictionary, multiset, range set and range dictionary, segmented buffer, graphs (adjacency-list graph, traversal and shortest-path algorithms, disjoint set), and trees (n-ary tree, tries). Also ships the approximate sketches in Bodu.Collections.Probabilistic and the packed BitSet in Bodu.Collections.Specialized. Every collection ships a struct enumerator for allocation-free iteration and implements the standard BCL collection interfaces. Thread-safe variants live in Bodu.Collections.Concurrent. |
|
|
Bodu.Text.Encoding
Binary-to-text encodings for .NET 8 and .NET 10 - Base16, Base32, Base45, Base58, Base62, Base64, Base85, and Bech32, plus percent-encoding and quoted-printable - with a uniform static API, variant selection, encode-time formatting options, and decode-time leniency styles. The five core encodings (Base16, Base32, Base58, Base64, Base85) expose span, string, UTF-8, and IBufferWriter surfaces with Try* and length-calculation overloads for allocation-free use. |
|
|
Bodu.Globalization.Recurrence
Recurrence-rule evaluation for .NET. Provides RecurrenceRule, an RFC 5545 iCalendar RRULE parser and occurrence enumerator (FREQ SECONDLY/MINUTELY/HOURLY/DAILY/WEEKLY/MONTHLY/YEARLY with INTERVAL, COUNT, UNTIL, WKST, and the BYMONTH/BYWEEKNO/BYYEARDAY/BYMONTHDAY/BYDAY/BYHOUR/BYMINUTE/BYSECOND/BYSETPOS parts); RecurrenceSet, which composes one or more rules with explicit RDATE additions and EXDATE exclusions; CronExpression, a Vixie-style cron parser (five-field, optional-seconds six-field, the @yearly/@monthly/@weekly/@daily/@hourly macros, and the Quartz day tokens L, W, # and ?); and AnchoredInterval, an instant-anchored interval recurrence ("every 4 hours after the last completed run") in the RFC 5545 duration grammar. Every form answers next- and previous-occurrence queries with inclusive flags over DateTime and DateTimeOffset, parses with defect-naming TryParse overloads, round-trips its canonical text, and compares by value; every answer is a pure function of the arguments - no wall clock, no machine time zone. A natural sibling of the Bodu.Globalization.Calendar notable-date engine; depends only on Bodu.Core. |
|
|
Bodu.Numerics
Numeric value primitives for .NET. Provides Fraction<T>, a generic exact-rational number type backed by any IBinaryInteger<T>; Interval<T>, an immutable bounded interval over any INumber<T> with independent open or closed endpoints and full set algebra; BigDecimal, an arbitrary-precision decimal beyond System.Decimal's precision and range; Complex<T>, a generic complex number over any IFloatingPointIeee754<T> (where System.Numerics.Complex is fixed to double); and single-pass statistics aggregates - RunningStatistics<T> (Welford mean/variance), RunningQuantile<T> (P² streaming quantile), and the rolling-window MovingSum<T> / MovingMinMax<T>. Money, currency, and foreign-exchange types ship in the companion Bodu.Financial package. |
GitHub repositories
This package is not used by any popular GitHub repositories.