AsNet.Shared
3.2.0.3
dotnet add package AsNet.Shared --version 3.2.0.3
NuGet\Install-Package AsNet.Shared -Version 3.2.0.3
<PackageReference Include="AsNet.Shared" Version="3.2.0.3" />
<PackageVersion Include="AsNet.Shared" Version="3.2.0.3" />
<PackageReference Include="AsNet.Shared" />
paket add AsNet.Shared --version 3.2.0.3
#r "nuget: AsNet.Shared, 3.2.0.3"
#:package AsNet.Shared@3.2.0.3
#addin nuget:?package=AsNet.Shared&version=3.2.0.3
#tool nuget:?package=AsNet.Shared&version=3.2.0.3
AsNet.Shared v3.2.0.3
Description
AsNet.Shared is a foundational .NET library that provides shared and reusable components used across AsNet applications.
This library centralizes common cross-cutting functionality such as:
- Standardized result models for data, business and HTTP layers
- Auditing contracts and audit models
- Shared DTOs and domain-neutral entities
- Cryptography helpers
- Image utilities
- Language and framework extensions
- Constants, enums and helper services
AsNet.Shared is designed to be consumed by other AsNet libraries (such as AsNet.Shared.Http and AsNet.Shared.Data) and by enterprise applications that require consistent behavior across layers.
Starting with this version, the namespaces Service, Services and Report were removed from AsNet.Shared and relocated to AsNet.Shared.Http. AsNet.Shared now contains only foundational, infrastructure-agnostic components.
This version also introduces:
TimeSpanConverterfor proper JSON serialization of TimeSpan values in result objects.DateTime.ConvertTimeZoneextension for date time zone conversion.
For more information, see
https://www.asnetsolutions.com
Supported Frameworks
This version of AsNet.Shared is compatible with:
- .NET Standard 2.1
- .NET 8.0
- .NET 9.0
- .NET 10.0
The library uses conditional compilation to support modern .NET features while maintaining backward compatibility.
Key Features
- Standardized result models
DmlResultfor data and persistence operationsBResultfor business and application operationsHResultfor HTTP and service client operations
- Unified result metadata
- Operation status (
RType) - Business and data return codes
- Messages and exception details
- Execution time tracking (
TimeDto)
- Operation status (
- Auditing infrastructure
AuditFieldsIAuditableAuditTableFields
- Shared DTOs and entities
APIObject(with audit context support)StandardListDataCollection- Reporting and filtering DTOs
- Centralized constants and enums
DataConstantsResultConstantsSecurityConstantsAdministrationConstantsRType,ActiveFilterEnum
- Cryptography utilities
- AES encryption and decryption
- Salt and hash generation
ISimmetriccontract with default implementation
- Extensive extension methods
- Collections and enumerables
- Strings, numbers and dates
- JSON and XML helpers
- HTTP request helpers
- Exception diagnostics helpers
- Image utilities
- Thumbnail generation
- JPEG compression with quality control
Auditing Model
AsNet.Shared provides an opt-in auditing model that is completely decoupled from persistence and infrastructure layers.
AuditFieldsrepresents the audit context (who, when, from where).IAuditableallows entities to receive audit information explicitly.AuditTableFieldsis intended for database entities that persist audit metadata.
Auditing information is injected from the application layer and does
not rely on EF Core interceptors or SaveChanges overrides.
Result Model Philosophy
The library defines three explicit result models to enforce clear layer boundaries:
- DmlResult → persistence and data access
- BResult → business and application logic
- HResult → HTTP and service client interactions
All result models share the same execution timing and status semantics, making it easy to trace operations across layers.
Image Utilities
Image utilities included in this library support:
- Thumbnail creation
- JPEG encoding with configurable quality
- File, stream and byte array processing
Note: Image utilities rely on
System.Drawing. On Linux or containerized environments, additional configuration may be required.
Configuration
This version of AsNet.Shared does not require any configuration files.
All components work out of the box and can be integrated using standard dependency injection patterns where applicable.
Versioning
AsNet.Shared follows Semantic Versioning:
| 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 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. |
| .NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.1 is compatible. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | 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.1
- Microsoft.CSharp (>= 4.7.0)
- System.ComponentModel.Annotations (>= 5.0.0)
- System.Diagnostics.EventLog (>= 10.0.5)
- System.Drawing.Common (>= 10.0.5)
- System.Text.Json (>= 10.0.5)
-
net10.0
- System.ComponentModel.Annotations (>= 5.0.0)
- System.Diagnostics.EventLog (>= 10.0.5)
- System.Drawing.Common (>= 10.0.5)
-
net8.0
- System.Diagnostics.EventLog (>= 10.0.5)
- System.Drawing.Common (>= 10.0.5)
- System.Text.Json (>= 10.0.5)
-
net9.0
- System.Diagnostics.EventLog (>= 10.0.5)
- System.Drawing.Common (>= 10.0.5)
- System.Text.Json (>= 10.0.5)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on AsNet.Shared:
| Package | Downloads |
|---|---|
|
AsNet.Shared.Http
Enterprise‑grade shared HTTP infrastructure library for .NET that simplifies API and microservices consumption, supports high‑performance streaming, OAuth2 / OpenID Connect (IdentityServer), IP geolocation, and SQL Server Reporting Services (SSRS) integration. |
|
|
AsNet.Shared.Storage
AsNet.Shared.Storage es una librería que contiene funcionalidad para simplificar los procesos de integración con Azure Storage. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 3.2.0.3 | 190 | 4/4/2026 |
| 3.2.0.2 | 86 | 4/4/2026 |
| 3.2.0.1 | 170 | 2/8/2026 |
| 3.2.0 | 204 | 1/13/2026 |
| 3.1.0.3 | 684 | 11/11/2024 |
| 3.1.0.2 | 389 | 9/6/2024 |
| 3.1.0 | 377 | 6/9/2024 |
| 3.0.5.6 | 787 | 9/23/2023 |
| 3.0.5.5 | 318 | 9/2/2023 |
| 3.0.5.4 | 388 | 6/15/2023 |
| 3.0.5.3 | 407 | 6/12/2023 |
| 3.0.5.2 | 608 | 3/27/2023 |
| 3.0.5.1 | 643 | 2/16/2023 |
| 3.0.5 | 931 | 1/12/2023 |
| 3.0.4.4 | 445 | 12/13/2022 |
| 3.0.4.3 | 2,462 | 5/9/2022 |
| 3.0.4.2 | 1,733 | 9/13/2021 |
| 3.0.4.1 | 658 | 8/21/2021 |
| 3.0.4 | 662 | 6/17/2021 |
| 3.0.3 | 723 | 6/16/2021 |
- The Service, Services and Report namespaces were removed from AsNet.Shared
and relocated to the AsNet.Shared.Http library. All other shared
functionalities remain in this package.
- Added TimeSpanConverter to support proper JSON serialization of TimeSpan
values in result objects.
- Added DateTime.ConvertTimeZone extension method for date and time
zone conversion.
- Enabled compatibility with .NET 8.0, .NET 9.0, .NET 10.0 and
.NET Standard 2.1.