Acontplus.Utilities
1.2.1
See the version list below for details.
dotnet add package Acontplus.Utilities --version 1.2.1
NuGet\Install-Package Acontplus.Utilities -Version 1.2.1
<PackageReference Include="Acontplus.Utilities" Version="1.2.1" />
<PackageVersion Include="Acontplus.Utilities" Version="1.2.1" />
<PackageReference Include="Acontplus.Utilities" />
paket add Acontplus.Utilities --version 1.2.1
#r "nuget: Acontplus.Utilities, 1.2.1"
#:package Acontplus.Utilities@1.2.1
#addin nuget:?package=Acontplus.Utilities&version=1.2.1
#tool nuget:?package=Acontplus.Utilities&version=1.2.1
Acontplus.Utilities
A comprehensive .NET 9+ utility library providing common functionality for enterprise applications. Modern async, extension methods, minimal API support, and more.
🚀 Features
- Encryption - Data encryption/decryption utilities
- External Validations - Third-party validation integrations
- Barcode Generation - Barcode creation and processing
- Custom Logging - Enhanced logging capabilities
- Enum Extensions - Enhanced enum functionality
- Picture Helper - Image processing utilities
- Text Handlers - Text manipulation and processing
- API Response Extensions - Convert results to
IActionResultorIResultfor MVC/Minimal APIs - Pagination & Metadata - Helpers for API metadata, pagination, and diagnostics
📦 Installation
NuGet Package Manager
Install-Package Acontplus.Utilities
.NET CLI
dotnet add package Acontplus.Utilities
PackageReference
<ItemGroup>
<PackageReference Include="Acontplus.Utilities" Version="1.0.12" />
</ItemGroup>
🎯 Quick Start
1. API Response Extensions (Minimal API)
using Acontplus.Utilities.Extensions;
app.MapGet("/example", () =>
{
var response = new ApiResponse<string>("Hello World");
return response.ToMinimalApiResult();
});
2. API Response Extensions (Controller)
using Acontplus.Utilities.Extensions;
public IActionResult Get()
{
var response = new ApiResponse<string>("Hello World");
return response.ToActionResult();
}
3. Encryption Example
var encryptionService = new SensitiveDataEncryptionService();
byte[] encrypted = await encryptionService.EncryptToBytesAsync("password", "data");
string decrypted = await encryptionService.DecryptFromBytesAsync("password", encrypted);
4. Pagination Metadata Example
var metadata = new Dictionary<string, object>()
.WithPagination(page: 1, pageSize: 10, totalItems: 100);
🗃️ Data Utilities
DataConverters
using Acontplus.Utilities.Data;
// Convert DataTable to JSON
string json = DataConverters.DataTableToJson(myDataTable);
// Convert DataSet to JSON
string json = DataConverters.DataSetToJson(myDataSet);
// Convert JSON to DataTable
DataTable table = DataConverters.JsonToDataTable(jsonString);
// Serialize any object (with DataTable/DataSet support)
string json = DataConverters.SerializeObjectCustom(myObject);
// Serialize and sanitize complex objects
string json = DataConverters.SerializeSanitizedData(myObject);
DataTableMapper
using Acontplus.Utilities.Data;
// Map a DataRow to a strongly-typed model
var model = DataTableMapper.MapDataRowToModel<MyModel>(dataRow);
// Map a DataTable to a list of models
List<MyModel> models = DataTableMapper.MapDataTableToList<MyModel>(dataTable);
🧩 JSON Utilities
JsonHelper
using Acontplus.Utilities.Json;
// Validate JSON
var result = JsonHelper.ValidateJson(jsonString);
if (!result.IsValid) Console.WriteLine(result.ErrorMessage);
// Get a property value from JSON
string? value = JsonHelper.GetJsonProperty<string>(jsonString, "propertyName");
// Merge two JSON objects
string merged = JsonHelper.MergeJson(json1, json2);
// Compare two JSON strings (ignoring property order)
bool areEqual = JsonHelper.AreEqual(json1, json2);
JsonManipulationExtensions
using Acontplus.Utilities.Json;
// Validate JSON using extension
bool isValid = jsonString.IsValidJson();
// Get property value using extension
int? id = jsonString.GetJsonProperty<int>("id");
// Merge JSON using extension
string merged = json1.MergeJson(json2);
// Compare JSON using extension
bool equal = json1.JsonEquals(json2);
🔄 Object Mapping
ObjectMapper
using Acontplus.Utilities.Mapping;
// Map between objects (AutoMapper-like)
var target = ObjectMapper.Map<SourceType, TargetType>(sourceObject);
// Configure custom mapping
ObjectMapper.CreateMap<SourceType, TargetType>()
.ForMember(dest => dest.SomeProperty, src => src.OtherProperty)
.Ignore(dest => dest.IgnoredProperty);
// Map with configuration
var mapped = ObjectMapper.Map<SourceType, TargetType>(sourceObject);
🔧 Advanced Usage
File Name Sanitization
string safeName = FileExtensions.SanitizeFileName("my*illegal:file?.txt");
Base64 Conversion
string base64 = FileExtensions.GetBase64FromByte(myBytes);
Compression Utilities
byte[] compressed = CompressionUtils.CompressGZip(data);
byte[] decompressed = CompressionUtils.DecompressGZip(compressed);
📚 API Documentation
SensitiveDataEncryptionService- AES encryption/decryption helpersFileExtensions- File name and byte array utilitiesCompressionUtils- GZip/Deflate compression helpersTextHandlers- String formatting and splittingApiResponseExtensions- API response helpers for MVC/Minimal APIsDirectoryHelper/EnvironmentHelper- Runtime and environment utilities
🤝 Contributing
We welcome contributions! Please see our Contributing Guidelines for details.
Development Setup
git clone https://github.com/Acontplus-S-A-S/acontplus-dotnet-libs.git
cd acontplus-dotnet-libs
dotnet restore
dotnet build
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🆘 Support
- 📧 Email: proyectos@acontplus.com
- 🐛 Issues: GitHub Issues
- 📖 Documentation: Wiki
👨💻 Author
Ivan Paz - @iferpaz7
🏢 Company
Acontplus S.A.S. - Enterprise software solutions
Built with ❤️ for the .NET community
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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 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. |
-
net9.0
- Acontplus.Core (>= 1.3.0)
- BCrypt.Net-Next (>= 4.0.3)
NuGet packages (4)
Showing the top 4 NuGet packages that depend on Acontplus.Utilities:
| Package | Downloads |
|---|---|
|
Acontplus.Notifications
Comprehensive library for notification services. Includes email (MailKit, Amazon SES), WhatsApp, push notifications, templating with Scriban, queue management, and enterprise-ready delivery patterns for cloud-native applications. |
|
|
Acontplus.Reports
Advanced library for comprehensive report generation and management. Includes RDLC report processing, PDF/Excel export capabilities, ReportViewer integration, template support, and enterprise-ready reporting patterns for business applications. |
|
|
Acontplus.Billing
Complete library for electronic invoicing and SRI integration in Ecuador. Includes models, services, XML validation, SRI web service support, and embedded XSD schemas for compliance. |
|
|
Acontplus.Analytics
Analytics and statistics library for AcontPlus applications providing comprehensive metrics, trends, and business intelligence capabilities across multiple domains. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.0.6 | 223 | 1/11/2026 |
| 2.0.5 | 291 | 12/25/2025 |
| 2.0.4 | 482 | 12/5/2025 |
| 2.0.3 | 228 | 12/4/2025 |
| 2.0.2 | 218 | 12/3/2025 |
| 2.0.1 | 219 | 11/27/2025 |
| 2.0.0 | 221 | 11/23/2025 |
| 1.4.4 | 434 | 11/17/2025 |
| 1.4.3 | 433 | 11/17/2025 |
| 1.4.2 | 379 | 11/17/2025 |
| 1.4.1 | 322 | 11/11/2025 |
| 1.4.0 | 310 | 11/10/2025 |
| 1.3.19 | 255 | 11/5/2025 |
| 1.3.18 | 245 | 11/5/2025 |
| 1.3.17 | 232 | 11/5/2025 |
| 1.3.16 | 253 | 11/5/2025 |
| 1.3.15 | 278 | 10/23/2025 |
| 1.3.14 | 227 | 9/26/2025 |
| 1.3.13 | 230 | 9/25/2025 |
| 1.3.12 | 224 | 9/25/2025 |
| 1.3.11 | 243 | 9/24/2025 |
| 1.3.10 | 274 | 9/14/2025 |
| 1.3.9 | 280 | 9/14/2025 |
| 1.3.8 | 270 | 9/14/2025 |
| 1.3.7 | 222 | 9/10/2025 |
| 1.3.6 | 293 | 8/21/2025 |
| 1.3.5 | 226 | 8/19/2025 |
| 1.3.4 | 233 | 8/8/2025 |
| 1.3.3 | 185 | 8/8/2025 |
| 1.3.2 | 298 | 8/7/2025 |
| 1.3.1 | 262 | 8/7/2025 |
| 1.3.0 | 268 | 8/7/2025 |
| 1.2.5 | 298 | 8/5/2025 |
| 1.2.4 | 595 | 7/23/2025 |
| 1.2.3 | 173 | 7/18/2025 |
| 1.2.2 | 223 | 7/15/2025 |
| 1.2.1 | 210 | 7/15/2025 |
| 1.2.0 | 216 | 7/14/2025 |
| 1.1.4 | 225 | 7/14/2025 |
| 1.1.3 | 179 | 7/11/2025 |
| 1.1.2 | 173 | 7/11/2025 |
| 1.1.1 | 225 | 7/10/2025 |
| 1.1.0 | 221 | 7/10/2025 |
| 1.0.13 | 203 | 7/10/2025 |
| 1.0.12 | 237 | 7/9/2025 |
| 1.0.11 | 279 | 7/7/2025 |
| 1.0.10 | 215 | 7/6/2025 |
| 1.0.9 | 237 | 7/6/2025 |
| 1.0.8 | 174 | 7/4/2025 |
| 1.0.7 | 218 | 7/3/2025 |
| 1.0.6 | 224 | 7/2/2025 |
| 1.0.5 | 215 | 7/2/2025 |
| 1.0.4 | 231 | 7/1/2025 |
Updated for .NET 9+ with async/await, extension methods, and enhanced documentation.