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
                    
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="AsNet.Shared" Version="3.2.0.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AsNet.Shared" Version="3.2.0.3" />
                    
Directory.Packages.props
<PackageReference Include="AsNet.Shared" />
                    
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 AsNet.Shared --version 3.2.0.3
                    
#r "nuget: AsNet.Shared, 3.2.0.3"
                    
#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 AsNet.Shared@3.2.0.3
                    
#: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=AsNet.Shared&version=3.2.0.3
                    
Install as a Cake Addin
#tool nuget:?package=AsNet.Shared&version=3.2.0.3
                    
Install as a Cake Tool

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:

  • TimeSpanConverter for proper JSON serialization of TimeSpan values in result objects.
  • DateTime.ConvertTimeZone extension 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
    • DmlResult for data and persistence operations
    • BResult for business and application operations
    • HResult for HTTP and service client operations
  • Unified result metadata
    • Operation status (RType)
    • Business and data return codes
    • Messages and exception details
    • Execution time tracking (TimeDto)
  • Auditing infrastructure
    • AuditFields
    • IAuditable
    • AuditTableFields
  • Shared DTOs and entities
    • APIObject (with audit context support)
    • StandardList
    • DataCollection
    • Reporting and filtering DTOs
  • Centralized constants and enums
    • DataConstants
    • ResultConstants
    • SecurityConstants
    • AdministrationConstants
    • RType, ActiveFilterEnum
  • Cryptography utilities
    • AES encryption and decryption
    • Salt and hash generation
    • ISimmetric contract 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.

  • AuditFields represents the audit context (who, when, from where).
  • IAuditable allows entities to receive audit information explicitly.
  • AuditTableFields is 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 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. 
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 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
Loading failed

- 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.