AnointedAutomation.Optimization
1.0.2
See the version list below for details.
dotnet add package AnointedAutomation.Optimization --version 1.0.2
NuGet\Install-Package AnointedAutomation.Optimization -Version 1.0.2
<PackageReference Include="AnointedAutomation.Optimization" Version="1.0.2" />
<PackageVersion Include="AnointedAutomation.Optimization" Version="1.0.2" />
<PackageReference Include="AnointedAutomation.Optimization" />
paket add AnointedAutomation.Optimization --version 1.0.2
#r "nuget: AnointedAutomation.Optimization, 1.0.2"
#:package AnointedAutomation.Optimization@1.0.2
#addin nuget:?package=AnointedAutomation.Optimization&version=1.0.2
#tool nuget:?package=AnointedAutomation.Optimization&version=1.0.2
AnointedAutomation.Optimization
Jesus is King ✝️
Reusable optimization utilities for .NET: DataTable/DataReader conversion, CSV generation, string and array helpers, chunking, Roman numerals, JSON flattening, file management, and null-safe field accessors over System.Text.Json.JsonElement and MongoDB BsonDocument.
Installation
dotnet add package AnointedAutomation.Optimization
- Target framework:
net10.0 - Dependencies:
MongoDB.Bson(used only by theBsonMapaccessors)
Namespace: AnointedAutomation.Optimization.
What is inside
| Type | Purpose |
|---|---|
Utility |
DataTable/DataReader to list mapping, CSV writers/readers, base64 encode/decode, random string generation, chunking (ToChunks), jagged array conversion, substring helpers, recursive delete. |
ChunkDataReader |
An in-memory IDataReader over a list of rows, for feeding batched data into readers/exporters. |
JsonFlattener |
Flattens nested JSON into a single-level dictionary of underscore-joined keys; dictionary to single-row DataTable. Built on the dependency-free System.Text.Json. |
Roman |
Integer to/from Roman numerals (with overline multipliers for large numbers) and whole-word detection. |
FileManagement |
Idempotent directory/file create, delete (with try variants), in-place line replacement, download-to-file. |
FileComparator |
Byte-for-byte file compare and replace. |
JsonElementExtensions |
Null-safe, strict and coercing accessors over JsonElement (strings, numbers, booleans, arrays, GraphQL connection enumeration). |
BsonMap |
Null-safe, strict and coercing accessors over BsonDocument / BsonValue. |
Quick start
using AnointedAutomation.Optimization;
// Chunk a big sequence.
foreach (var batch in bigList.ToChunks(500))
{
Process(batch);
}
// Read a JSON field safely.
double? price = element.GetDoubleCoercedOrNull("price", NumberStyles.Any);
// Roman numerals.
string mmxxvi = Roman.IntegerToRoman(2026); // "MMXXVI"
License
MIT. See LICENSE. Copyright © Anointed Automation, LLC. Stewarded by Alexander Fields.
Support This Project
This library is free and open source. The best way to support the work is to shop with us:
- Christian items: https://store.anointed.company
- Pets: https://www.animaldander.com
- Everything else: https://www.mart.club
Found a bug or have a request? Open an issue: https://github.com/AnointedAutomation/AnointedAutomation/issues
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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
- MongoDB.Bson (>= 3.12.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.